turtlecode 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/{_basePickBy-B_7ShcHh.js → _basePickBy-BcOvpC5b.js} +1 -1
- package/assets/assets/{_baseUniq-BsW7XEuT.js → _baseUniq-D9AKNI-S.js} +1 -1
- package/assets/assets/{arc-BbW57NUb.js → arc-ClcBVsDq.js} +1 -1
- package/assets/assets/architectureDiagram-2XIMDMQ5-CRV28Qi0.js +36 -0
- package/assets/assets/{auth-callback-C2n64Qcj.js → auth-callback-D7CK9pHp.js} +1 -1
- package/assets/assets/{blockDiagram-WCTKOSBZ-C1Ni5oSK.js → blockDiagram-WCTKOSBZ-CL-sI8NU.js} +2 -2
- package/assets/assets/{c4Diagram-IC4MRINW-g8EmnUUA.js → c4Diagram-IC4MRINW-AFG5p1yt.js} +2 -2
- package/assets/assets/channel-BXqEQVGi.js +1 -0
- package/assets/assets/{chunk-4BX2VUAB-CGR6NDgJ.js → chunk-4BX2VUAB-CgNy2Qqu.js} +1 -1
- package/assets/assets/chunk-55IACEB6-Bsz0SHtO.js +1 -0
- package/assets/assets/{chunk-FMBD7UC4-CBSUaebz.js → chunk-FMBD7UC4-BRuwu34q.js} +1 -1
- package/assets/assets/chunk-JSJVCQXG-Bt0GkrjS.js +1 -0
- package/assets/assets/{chunk-KX2RTZJC-D_r6FHlr.js → chunk-KX2RTZJC-BiUvn-D7.js} +1 -1
- package/assets/assets/{chunk-NQ4KR5QH-_-NyPl-E.js → chunk-NQ4KR5QH-DH4YUQE9.js} +1 -1
- package/assets/assets/{chunk-QZHKN3VN-CMDZeFvi.js → chunk-QZHKN3VN-CrLB363X.js} +1 -1
- package/assets/assets/chunk-VVM5DH6Z-D2vG_ZPx.js +1 -0
- package/assets/assets/{chunk-WL4C6EOR-p1mj0O6S.js → chunk-WL4C6EOR-913dgDB-.js} +1 -1
- package/assets/assets/classDiagram-VBA2DB6C-gcpKg8SN.js +1 -0
- package/assets/assets/classDiagram-v2-RAHNMMFH-gcpKg8SN.js +1 -0
- package/assets/assets/clone-oMsF326O.js +1 -0
- package/assets/assets/{connection-popover-Sip4k8lc.js → connection-popover-D2MEtT6z.js} +1 -1
- package/assets/assets/{context-popover-jX8NoD9w.js → context-popover-C1ZDT4aK.js} +1 -1
- package/assets/assets/cose-bilkent-S5V4N54A-DRWnwV5H.js +1 -0
- package/assets/assets/{cssMode-xHiM5mcb.js → cssMode-DX-s2EC8.js} +2 -2
- package/assets/assets/dagre-KLK3FWXG-CN4ule0l.js +4 -0
- package/assets/assets/diagram-E7M64L7V-docJyJu4.js +24 -0
- package/assets/assets/diagram-IFDJBPK2-ChVpZldk.js +43 -0
- package/assets/assets/diagram-P4PSJMXO-Bf1-kRnd.js +24 -0
- package/assets/assets/dialog-clone-project-B1wF7jYQ.js +1 -0
- package/assets/assets/{dialog-connect-provider-BEqcXIot.js → dialog-connect-provider-Ot6Qr5dL.js} +2 -2
- package/assets/assets/dialog-create-project-BUc4DxX6.js +1 -0
- package/assets/assets/{dialog-edit-project-BfeaBlLZ.js → dialog-edit-project-BrkjzrGe.js} +1 -1
- package/assets/assets/{dialog-fork-D0oj4IQ5.js → dialog-fork-CyeKjf0e.js} +1 -1
- package/assets/assets/{dialog-manage-models-mDJUOPob.js → dialog-manage-models-CoiwPdu-.js} +1 -1
- package/assets/assets/{dialog-select-directory-BocFiQ9d.js → dialog-select-directory-K0nOY5Ky.js} +3 -3
- package/assets/assets/{dialog-select-file-CifFpv3x.js → dialog-select-file-Dx0Bny2E.js} +1 -1
- package/assets/assets/{dialog-select-mcp-Bz0DoDof.js → dialog-select-mcp-ehJzhdpz.js} +1 -1
- package/assets/assets/{dialog-select-model-unpaid-Da_CQzO4.js → dialog-select-model-unpaid-IVl97Sa_.js} +2 -2
- package/assets/assets/{dialog-select-provider-2iOfyWxy.js → dialog-select-provider-CBq6hNDx.js} +1 -1
- package/assets/assets/{dialog-select-server-DBhmJ2f8.js → dialog-select-server-DA5hATxx.js} +1 -1
- package/assets/assets/{dialog-settings-gGxknIbS.js → dialog-settings-BoOPbXZp.js} +1 -1
- package/assets/assets/{erDiagram-INFDFZHY-7L6v8ikj.js → erDiagram-INFDFZHY-kDj6gvOH.js} +2 -2
- package/assets/assets/{file-icon-CgbvTpIc.js → file-icon-DVEMs7Sx.js} +1 -1
- package/assets/assets/{flowDiagram-PKNHOUZH-aJT2T3cx.js → flowDiagram-PKNHOUZH-CsQeJUub.js} +2 -2
- package/assets/assets/{freemarker2-BgcPHQt-.js → freemarker2-B_-gEFnj.js} +2 -2
- package/assets/assets/ganttDiagram-A5KZAMGK-D1W7NciY.js +292 -0
- package/assets/assets/{ghostty-web-CyXMoQwm.js → ghostty-web-BQl0ls6m.js} +1 -1
- package/assets/assets/gitGraphDiagram-K3NZZRJ6-D4eeLV-l.js +65 -0
- package/assets/assets/{graph-CFcaDaoV.js → graph-KGuLNbW2.js} +1 -1
- package/assets/assets/{handlebars-DSpGDIPh.js → handlebars-DlnQtQmF.js} +2 -2
- package/assets/assets/{home-6Va-8zmR.js → home-BnHPimua.js} +1 -1
- package/assets/assets/{html-CNWh6Ln_.js → html-DrjCwvQg.js} +2 -2
- package/assets/assets/{htmlMode-LcU-TZaJ.js → htmlMode-C1xX0YwN.js} +3 -3
- package/assets/assets/index-DKwABhnu.js +2584 -0
- package/assets/assets/{index-DpJDxStT.css → index-DTxAHLat.css} +1 -1
- package/assets/assets/infoDiagram-LFFYTUFH-DsQ9EVx0.js +2 -0
- package/assets/assets/{ishikawaDiagram-PHBUUO56-y62OJXdI.js → ishikawaDiagram-PHBUUO56-MzetUfFK.js} +6 -6
- package/assets/assets/{javascript-CTmFPESg.js → javascript-CBQQIA5q.js} +2 -2
- package/assets/assets/{jobs-popover-DRbIcR2O.js → jobs-popover-DQmVz-e0.js} +1 -1
- package/assets/assets/{journeyDiagram-4ABVD52K-Bi9XcKs5.js → journeyDiagram-4ABVD52K-BkKgSN_9.js} +2 -2
- package/assets/assets/{jsonMode-CW1XLtuQ.js → jsonMode-B2Ye6w7y.js} +3 -3
- package/assets/assets/{kanban-definition-K7BYSVSG-DE01LQ5I.js → kanban-definition-K7BYSVSG-DIJz6AsI.js} +4 -4
- package/assets/assets/{layout-C6rurAvx.js → layout-BZKpv2Gr.js} +1 -1
- package/assets/assets/linear-COY9pyF4.js +1 -0
- package/assets/assets/{liquid-DB5uFXiY.js → liquid-CQXVmj19.js} +2 -2
- package/assets/assets/{list-BPk4NMWt.js → list-DPJi0fzr.js} +1 -1
- package/assets/assets/{mdx-Q7_EfF7H.js → mdx-QuCI1OJC.js} +2 -2
- package/assets/assets/{mermaid.core-DdXWHS-1.js → mermaid.core-bhqKFRxj.js} +10 -10
- package/assets/assets/{mindmap-definition-YRQLILUH-BajbwusW.js → mindmap-definition-YRQLILUH-CVv44i-B.js} +2 -2
- package/assets/assets/pieDiagram-SKSYHLDU-2ekrtn6z.js +30 -0
- package/assets/assets/{python-B3qjyNJj.js → python-Bx2b-xP4.js} +2 -2
- package/assets/assets/{quadrantDiagram-337W2JSQ-CZMB9UKV.js → quadrantDiagram-337W2JSQ-BoTofVsV.js} +2 -2
- package/assets/assets/{razor-CJkx1qh1.js → razor-2zgukQRj.js} +2 -2
- package/assets/assets/{requirementDiagram-Z7DCOOCP-BlyteLn_.js → requirementDiagram-Z7DCOOCP-LSodooxy.js} +2 -2
- package/assets/assets/sankeyDiagram-WA2Y5GQK-DUXSSMar.js +10 -0
- package/assets/assets/{select-CEKfrTm2.js → select-BbwOgh1Q.js} +1 -1
- package/assets/assets/{sequenceDiagram-2WXFIKYE-B2cOVhRx.js → sequenceDiagram-2WXFIKYE-C01qZdHR.js} +11 -11
- package/assets/assets/{server-row-BhbnbNJy.js → server-row-mRVGCgvL.js} +1 -1
- package/assets/assets/session-BXKBDkSI.js +34 -0
- package/assets/assets/stateDiagram-RAJIS63D-BuPj1Py4.js +1 -0
- package/assets/assets/stateDiagram-v2-FVOUBMTO-CjYACBI3.js +1 -0
- package/assets/assets/{status-popover-body-DkLpfJ2k.js → status-popover-body-9YRn8z8W.js} +2 -2
- package/assets/assets/{switch-DPq0vsit.js → switch-CHySmW8J.js} +1 -1
- package/assets/assets/{tabs-dF68ik4J.js → tabs-CKNlwTKd.js} +1 -1
- package/assets/assets/{tag--BCZ5q7_.js → tag-C4xikCZp.js} +1 -1
- package/assets/assets/{timeline-definition-YZTLITO2-C18tfizI.js → timeline-definition-YZTLITO2-CPcDqVYw.js} +2 -2
- package/assets/assets/transform-BwXaE9hv.js +1 -0
- package/assets/assets/{treemap-KZPCXAKY-C7fWdgj-.js → treemap-KZPCXAKY-Bin819KW.js} +1 -1
- package/assets/assets/{trellis-6YKi26t8.js → trellis-Csm7WAqm.js} +217 -231
- package/assets/assets/{trellis-badge-demo-BDa3ILpo.js → trellis-badge-demo-nxtlIRoh.js} +1 -1
- package/assets/assets/{trellis-op-icon-5x1lMwNH.js → trellis-op-icon-CzIuo5X7.js} +1 -1
- package/assets/assets/{tsMode-Bg19hQiu.js → tsMode-qOM514sL.js} +2 -2
- package/assets/assets/{typescript-8CtqEj8t.js → typescript-XOJMwr_m.js} +2 -2
- package/assets/assets/{vennDiagram-LZ73GAT5-DWmAgqdE.js → vennDiagram-LZ73GAT5-BDAdfrV5.js} +2 -2
- package/assets/assets/{xml-BKjz9euG.js → xml-BIwomT_0.js} +2 -2
- package/assets/assets/{xychartDiagram-JWTSCODW-Ckcyhr_q.js → xychartDiagram-JWTSCODW-Be2x0vdX.js} +2 -2
- package/assets/assets/{yaml-jJWTWPtR.js → yaml-BZMZa-4Z.js} +2 -2
- package/assets/index.html +2 -4
- package/assets/oc-theme-preload.js +0 -2
- package/bin/cli.mjs +203 -25
- package/package.json +1 -1
- package/assets/assets/architectureDiagram-2XIMDMQ5-DVePwAIo.js +0 -36
- package/assets/assets/channel-CPcPUiyc.js +0 -1
- package/assets/assets/chunk-55IACEB6-CuagpIkW.js +0 -1
- package/assets/assets/chunk-JSJVCQXG-DK5RSVJJ.js +0 -1
- package/assets/assets/chunk-VVM5DH6Z-COaOSPgd.js +0 -1
- package/assets/assets/classDiagram-VBA2DB6C-BAnp4Zaa.js +0 -1
- package/assets/assets/classDiagram-v2-RAHNMMFH-BAnp4Zaa.js +0 -1
- package/assets/assets/clone-Cf5BTVxd.js +0 -1
- package/assets/assets/cose-bilkent-S5V4N54A-C5LXU9pd.js +0 -1
- package/assets/assets/dagre-KLK3FWXG-m-9cmD-w.js +0 -4
- package/assets/assets/diagram-E7M64L7V-Cn-5LVpt.js +0 -24
- package/assets/assets/diagram-IFDJBPK2-CD8BK0Gp.js +0 -43
- package/assets/assets/diagram-P4PSJMXO-JVUlmg7w.js +0 -24
- package/assets/assets/dialog-clone-project-BgrtjUcd.js +0 -1
- package/assets/assets/dialog-create-project-TcSOut-3.js +0 -1
- package/assets/assets/ganttDiagram-A5KZAMGK-C5vwClxA.js +0 -292
- package/assets/assets/gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js +0 -65
- package/assets/assets/index-bSvs-Qh3.js +0 -2544
- package/assets/assets/infoDiagram-LFFYTUFH-H6835-cD.js +0 -2
- package/assets/assets/linear-ilW0Y4uJ.js +0 -1
- package/assets/assets/pieDiagram-SKSYHLDU-DxK57epR.js +0 -30
- package/assets/assets/purify.es-A66Cw1IH.js +0 -2
- package/assets/assets/sankeyDiagram-WA2Y5GQK-DrdtRBZz.js +0 -10
- package/assets/assets/session-CdcUAq9-.js +0 -60
- package/assets/assets/stateDiagram-RAJIS63D-C4udRYnl.js +0 -1
- package/assets/assets/stateDiagram-v2-FVOUBMTO-CECUON5A.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as r,m as t,F as o,t as i}from"./index-
|
|
1
|
+
import{l as r,m as t,F as o,t as i}from"./index-DKwABhnu.js";import{T as n}from"./trellis-op-icon-CzIuo5X7.js";var v=i('<div class="min-h-dvh bg-background-base text-text-base flex items-center justify-center p-8"><div class="w-full max-w-4xl rounded-16 border border-border-weaker-base bg-surface-base p-8 shadow-lg"><div class="mb-6 flex flex-col gap-2"><div class="text-14-medium text-text-strong">Trellis op badge preview</div><div class="text-12-regular text-text-weak">Isolated route for testing the symbol and color mapping before we commit to it.</div></div><div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">'),m=i('<div class="rounded-12 border border-border-weaker-base bg-background-stronger/40 p-3">');const u=["vcs:fileAdd","vcs:fileModify","vcs:fileDelete","vcs:fileRename","vcs:branchCreate","vcs:branchDelete","vcs:milestoneCreate","vcs:checkpointCreate","vcs:issueCreate","vcs:issueUpdate","vcs:issueStart","vcs:issuePause","vcs:issueResume","vcs:issueClose","vcs:issueReopen","vcs:decisionRecord"];function p(){return(()=>{var e=v(),a=e.firstChild,l=a.firstChild,c=l.nextSibling;return r(c,t(o,{each:u,children:d=>(()=>{var s=m();return r(s,t(n,{kind:d})),s})()})),e})()}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as r,m as u,I as d,q as b,x as v,y as f,t as x}from"./index-
|
|
1
|
+
import{l as r,m as u,I as d,q as b,x as v,y as f,t as x}from"./index-DKwABhnu.js";var m=x('<div><div></div><div class="text-12-medium text-text-strong">');const g={"vcs:fileAdd":"file","vcs:fileModify":"file","vcs:fileDelete":"file","vcs:fileRename":"file","vcs:branchCreate":"git-branch","vcs:branchDelete":"git-branch","vcs:milestoneCreate":"milestone","vcs:checkpointCreate":"checklist","vcs:issueCreate":"issue","vcs:issueUpdate":"issue","vcs:issueStart":"enter","vcs:issuePause":"stop","vcs:issueResume":"enter","vcs:issueClose":"check-small","vcs:issueReopen":"arrow-right","vcs:decisionRecord":"brain"},C={"vcs:fileAdd":"text-success-base","vcs:fileModify":"text-warning-base","vcs:fileDelete":"text-danger-base","vcs:fileRename":"text-info-base","vcs:branchCreate":"text-info-base","vcs:branchDelete":"text-danger-base","vcs:milestoneCreate":"text-accent-base","vcs:checkpointCreate":"text-accent-base","vcs:issueCreate":"text-info-base","vcs:issueUpdate":"text-warning-base","vcs:issueStart":"text-success-base","vcs:issuePause":"text-warning-base","vcs:issueResume":"text-success-base","vcs:issueClose":"text-success-base","vcs:issueReopen":"text-info-base","vcs:decisionRecord":"text-accent-base"};function l(e){return e.replace("vcs:","").replace(/([A-Z])/g," $1").trim()}function k(e){return(()=>{var t=m(),c=t.firstChild,o=c.nextSibling;return r(c,u(d,{get name(){return g[e.kind]??"dot"},size:"small"})),r(o,()=>l(e.kind)),b(s=>{var i=`flex items-center gap-2 ${e.class??""}`,a=l(e.kind),n=`shrink-0 ${C[e.kind]??"text-icon-weak"}`;return i!==s.e&&v(t,s.e=i),a!==s.t&&f(t,"title",s.t=a),n!==s.a&&v(c,s.a=n),s},{e:void 0,t:void 0,a:void 0}),t})()}export{k as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as L,m as O}from"./trellis-
|
|
1
|
+
import{t as L,m as O}from"./trellis-Csm7WAqm.js";import"./index-DKwABhnu.js";import"./select-BbwOgh1Q.js";import"./chunk-VVM5DH6Z-D2vG_ZPx.js";import"./transform-BwXaE9hv.js";import"./trellis-op-icon-CzIuo5X7.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -13,4 +13,4 @@ ${F(o)}`;return i}};function F(e){let t=`*@${e.name}*`;if(e.name==="param"&&e.te
|
|
|
13
13
|
|
|
14
14
|
`+l:"")}]}}},$=class extends m{async provideDocumentHighlights(e,t,i){const o=e.uri,n=e.getOffsetAt(t),c=await this._worker(o);if(e.isDisposed())return;const u=await c.getDocumentHighlights(o.toString(),n,[o.toString()]);if(!(!u||e.isDisposed()))return u.flatMap(s=>s.highlightSpans.map(l=>({range:this._textSpanToRange(e,l.textSpan),kind:l.kind==="writtenReference"?a.languages.DocumentHighlightKind.Write:a.languages.DocumentHighlightKind.Text})))}},z=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const o=e.uri,n=e.getOffsetAt(t),c=await this._worker(o);if(e.isDisposed())return;const u=await c.getDefinitionAtPosition(o.toString(),n);if(!u||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(u.map(l=>a.Uri.parse(l.fileName))),e.isDisposed()))return;const s=[];for(let l of u){const g=this._libFiles.getOrCreateModel(l.fileName);g&&s.push({uri:g.uri,range:this._textSpanToRange(g,l.textSpan)})}return s}},G=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,o){const n=e.uri,c=e.getOffsetAt(t),u=await this._worker(n);if(e.isDisposed())return;const s=await u.getReferencesAtPosition(n.toString(),c);if(!s||e.isDisposed()||(await this._libFiles.fetchLibFilesIfNecessary(s.map(g=>a.Uri.parse(g.fileName))),e.isDisposed()))return;const l=[];for(let g of s){const d=this._libFiles.getOrCreateModel(g.fileName);d&&l.push({uri:d.uri,range:this._textSpanToRange(d,g.textSpan)})}return l}},J=class extends m{async provideDocumentSymbols(e,t){const i=e.uri,o=await this._worker(i);if(e.isDisposed())return;const n=await o.getNavigationTree(i.toString());if(!n||e.isDisposed())return;const c=(s,l)=>({name:s.text,detail:"",kind:b[s.kind]||a.languages.SymbolKind.Variable,range:this._textSpanToRange(e,s.spans[0]),selectionRange:this._textSpanToRange(e,s.spans[0]),tags:[],children:s.childItems?.map(d=>c(d,s.text)),containerName:l});return n.childItems?n.childItems.map(s=>c(s)):[]}},p=class{static{this.unknown=""}static{this.keyword="keyword"}static{this.script="script"}static{this.module="module"}static{this.class="class"}static{this.interface="interface"}static{this.type="type"}static{this.enum="enum"}static{this.variable="var"}static{this.localVariable="local var"}static{this.function="function"}static{this.localFunction="local function"}static{this.memberFunction="method"}static{this.memberGetAccessor="getter"}static{this.memberSetAccessor="setter"}static{this.memberVariable="property"}static{this.constructorImplementation="constructor"}static{this.callSignature="call"}static{this.indexSignature="index"}static{this.constructSignature="construct"}static{this.parameter="parameter"}static{this.typeParameter="type parameter"}static{this.primitiveType="primitive type"}static{this.label="label"}static{this.alias="alias"}static{this.const="const"}static{this.let="let"}static{this.warning="warning"}},b=Object.create(null);b[p.module]=a.languages.SymbolKind.Module;b[p.class]=a.languages.SymbolKind.Class;b[p.enum]=a.languages.SymbolKind.Enum;b[p.interface]=a.languages.SymbolKind.Interface;b[p.memberFunction]=a.languages.SymbolKind.Method;b[p.memberVariable]=a.languages.SymbolKind.Property;b[p.memberGetAccessor]=a.languages.SymbolKind.Property;b[p.memberSetAccessor]=a.languages.SymbolKind.Property;b[p.variable]=a.languages.SymbolKind.Variable;b[p.const]=a.languages.SymbolKind.Variable;b[p.localVariable]=a.languages.SymbolKind.Variable;b[p.variable]=a.languages.SymbolKind.Variable;b[p.function]=a.languages.SymbolKind.Function;b[p.localFunction]=a.languages.SymbolKind.Function;var y=class extends m{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:`
|
|
15
15
|
`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},Q=class extends y{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,o){const n=e.uri,c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(n);if(e.isDisposed())return;const l=await s.getFormattingEditsForRange(n.toString(),c,u,y._convertOptions(i));if(!(!l||e.isDisposed()))return l.map(g=>this._convertTextChanges(e,g))}},q=class extends y{get autoFormatTriggerCharacters(){return[";","}",`
|
|
16
|
-
`]}async provideOnTypeFormattingEdits(e,t,i,o,n){const c=e.uri,u=e.getOffsetAt(t),s=await this._worker(c);if(e.isDisposed())return;const l=await s.getFormattingEditsAfterKeystroke(c.toString(),u,i,y._convertOptions(o));if(!(!l||e.isDisposed()))return l.map(g=>this._convertTextChanges(e,g))}},X=class extends y{async provideCodeActions(e,t,i,o){const n=e.uri,c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=y._convertOptions(e.getOptions()),l=i.markers.filter(f=>f.code).map(f=>f.code).map(Number),g=await this._worker(n);if(e.isDisposed())return;const d=await g.getCodeFixesAtPosition(n.toString(),c,u,l,s);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(f=>f.changes.filter(w=>w.isNewFile).length===0).map(f=>this._tsCodeFixActionToMonacoCodeAction(e,i,f)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const o=[];for(const c of i.changes)for(const u of c.textChanges)o.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,u.span),text:u.newText}});return{title:i.description,edit:{edits:o},diagnostics:t.markers,kind:"quickfix"}}},Y=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,o){const n=e.uri,c=n.toString(),u=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const l=await s.getRenameInfo(c,u,{allowRenameOfImportPath:!1});if(l.canRename===!1)return{edits:[],rejectReason:l.localizedErrorMessage};if(l.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const g=await s.findRenameLocations(c,u,!1,!1,!1);if(!g||e.isDisposed())return;const d=[];for(const h of g){const f=this._libFiles.getOrCreateModel(h.fileName);if(f)d.push({resource:f.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(f,h.textSpan),text:i}});else throw new Error(`Unknown file ${h.fileName}.`)}return{edits:d}}},Z=class extends m{async provideInlayHints(e,t,i){const o=e.uri,n=o.toString(),c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(o);return e.isDisposed()?null:{hints:(await s.provideInlayHints(n,c,u)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return a.languages.InlayHintKind.Parameter;case"Type":return a.languages.InlayHintKind.Type;default:return a.languages.InlayHintKind.Type}}},D,A;function
|
|
16
|
+
`]}async provideOnTypeFormattingEdits(e,t,i,o,n){const c=e.uri,u=e.getOffsetAt(t),s=await this._worker(c);if(e.isDisposed())return;const l=await s.getFormattingEditsAfterKeystroke(c.toString(),u,i,y._convertOptions(o));if(!(!l||e.isDisposed()))return l.map(g=>this._convertTextChanges(e,g))}},X=class extends y{async provideCodeActions(e,t,i,o){const n=e.uri,c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=y._convertOptions(e.getOptions()),l=i.markers.filter(f=>f.code).map(f=>f.code).map(Number),g=await this._worker(n);if(e.isDisposed())return;const d=await g.getCodeFixesAtPosition(n.toString(),c,u,l,s);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter(f=>f.changes.filter(w=>w.isNewFile).length===0).map(f=>this._tsCodeFixActionToMonacoCodeAction(e,i,f)),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const o=[];for(const c of i.changes)for(const u of c.textChanges)o.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,u.span),text:u.newText}});return{title:i.description,edit:{edits:o},diagnostics:t.markers,kind:"quickfix"}}},Y=class extends m{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,o){const n=e.uri,c=n.toString(),u=e.getOffsetAt(t),s=await this._worker(n);if(e.isDisposed())return;const l=await s.getRenameInfo(c,u,{allowRenameOfImportPath:!1});if(l.canRename===!1)return{edits:[],rejectReason:l.localizedErrorMessage};if(l.fileToRename!==void 0)throw new Error("Renaming files is not supported.");const g=await s.findRenameLocations(c,u,!1,!1,!1);if(!g||e.isDisposed())return;const d=[];for(const h of g){const f=this._libFiles.getOrCreateModel(h.fileName);if(f)d.push({resource:f.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(f,h.textSpan),text:i}});else throw new Error(`Unknown file ${h.fileName}.`)}return{edits:d}}},Z=class extends m{async provideInlayHints(e,t,i){const o=e.uri,n=o.toString(),c=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),u=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=await this._worker(o);return e.isDisposed()?null:{hints:(await s.provideInlayHints(n,c,u)).map(d=>({...d,label:d.text,position:e.getPositionAt(d.position),kind:this._convertHintKind(d.kind)})),dispose:()=>{}}}_convertHintKind(e){switch(e){case"Parameter":return a.languages.InlayHintKind.Parameter;case"Type":return a.languages.InlayHintKind.Type;default:return a.languages.InlayHintKind.Type}}},D,A;function oe(e){A=P(e,"typescript")}function le(e){D=P(e,"javascript")}function ce(){return new Promise((e,t)=>{if(!D)return t("JavaScript not registered!");e(D)})}function ue(){return new Promise((e,t)=>{if(!A)return t("TypeScript not registered!");e(A)})}function P(e,t){const i=[],o=new H(t,e),n=(...s)=>o.getLanguageServiceWorker(...s),c=new V(n);function u(){const{modeConfiguration:s}=e;ee(i),s.completionItems&&i.push(a.languages.registerCompletionItemProvider(t,new j(n))),s.signatureHelp&&i.push(a.languages.registerSignatureHelpProvider(t,new B(n))),s.hovers&&i.push(a.languages.registerHoverProvider(t,new U(n))),s.documentHighlights&&i.push(a.languages.registerDocumentHighlightProvider(t,new $(n))),s.definitions&&i.push(a.languages.registerDefinitionProvider(t,new z(c,n))),s.references&&i.push(a.languages.registerReferenceProvider(t,new G(c,n))),s.documentSymbols&&i.push(a.languages.registerDocumentSymbolProvider(t,new J(n))),s.rename&&i.push(a.languages.registerRenameProvider(t,new Y(c,n))),s.documentRangeFormattingEdits&&i.push(a.languages.registerDocumentRangeFormattingEditProvider(t,new Q(n))),s.onTypeFormattingEdits&&i.push(a.languages.registerOnTypeFormattingEditProvider(t,new q(n))),s.codeActions&&i.push(a.languages.registerCodeActionProvider(t,new X(n))),s.inlayHints&&i.push(a.languages.registerInlayHintsProvider(t,new Z(n))),s.diagnostics&&i.push(new W(c,e,t,n))}return u(),n}function ee(e){for(;e.length;)e.pop().dispose()}export{m as Adapter,X as CodeActionAdaptor,z as DefinitionAdapter,W as DiagnosticsAdapter,$ as DocumentHighlightAdapter,Q as FormatAdapter,y as FormatHelper,q as FormatOnTypeAdapter,Z as InlayHintsAdapter,p as Kind,V as LibFiles,J as OutlineAdapter,U as QuickInfoAdapter,G as ReferenceAdapter,Y as RenameAdapter,B as SignatureHelpAdapter,j as SuggestAdapter,H as WorkerManager,C as flattenDiagnosticMessageText,ce as getJavaScriptWorker,ue as getTypeScriptWorker,le as setupJavaScript,oe as setupTypeScript};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{m as s}from"./trellis-
|
|
1
|
+
import{m as s}from"./trellis-Csm7WAqm.js";import"./index-DKwABhnu.js";import"./select-BbwOgh1Q.js";import"./chunk-VVM5DH6Z-D2vG_ZPx.js";import"./transform-BwXaE9hv.js";import"./trellis-op-icon-CzIuo5X7.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
-
*-----------------------------------------------------------------------------*/var c=Object.defineProperty,a=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,l=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t},d=(t,e,o)=>(l(t,e,"default"),o),r={};d(r,s);var
|
|
6
|
+
*-----------------------------------------------------------------------------*/var c=Object.defineProperty,a=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,l=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t},d=(t,e,o)=>(l(t,e,"default"),o),r={};d(r,s);var y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},_={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{y as conf,_ as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Ut,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as w,G as wt,I as Jt,aq as Qt,ab as $t,ac as te,ad as ee,d as ne,y as se,E as ie,F as oe}from"./mermaid.core-DdXWHS-1.js";import{s as ot}from"./trellis-6YKi26t8.js";import"./index-bSvs-Qh3.js";import"./purify.es-A66Cw1IH.js";import"./select-CEKfrTm2.js";import"./chunk-VVM5DH6Z-COaOSPgd.js";import"./trellis-op-icon-5x1lMwNH.js";const kt=(t,n)=>Ut(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let E=A-M;E<0&&(E+=2*Math.PI);const S=A-E/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,E=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){E[p]=0;for(let f=0;f<b;++f)E[p]+=x[f][p];E[p]/=b}const l=x[b];if(J(S,1+h,E,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,E,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,E,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,E,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let E=0;E<16;++E)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Et({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,E=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,E=S)}u(E,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=E[S];return S+=1,S>=E.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const G={};f.forEach(k=>{k.label&&(G[k.sets]=k.label)});function j(k){if(k.sets in G)return G[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const T=p.select("svg");n?T.attr("viewBox",`0 0 ${s} ${e}`):T.attr("width",s).attr("height",e);const R={};let _=!1;T.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=T.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,E=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",E),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aG as Ut,s as Wt,g as Kt,q as Ht,p as Yt,a as Xt,b as Zt,_ as w,G as wt,I as Jt,aq as Qt,ab as $t,ac as te,ad as ee,d as ne,y as se,E as ie,F as oe}from"./mermaid.core-bhqKFRxj.js";import{s as ot}from"./transform-BwXaE9hv.js";import"./index-DKwABhnu.js";const kt=(t,n)=>Ut(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>re(c,t));let i=0,o=0;const a=[];if(e.length>1){const c=Tt(e);for(let u=0;u<e.length;++u){const r=e[u];r.angle=Math.atan2(r.x-c.x,r.y-c.y)}e.sort((u,r)=>r.angle-u.angle);let h=e[e.length-1];for(let u=0;u<e.length;++u){const r=e[u];o+=(h.x+r.x)*(r.y-h.y);const y={x:(r.x+h.x)/2,y:(r.y+h.y)/2};let d=null;for(let b=0;b<r.parentIndex.length;++b)if(h.parentIndex.includes(r.parentIndex[b])){const x=t[r.parentIndex[b]],M=Math.atan2(r.x-x.x,r.y-x.y),A=Math.atan2(h.x-x.x,h.y-x.y);let E=A-M;E<0&&(E+=2*Math.PI);const S=A-E/2;let g=q(y,{x:x.x+x.radius*Math.sin(S),y:x.y+x.radius*Math.cos(S)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:r,p2:h,large:g>x.radius,sweep:!0})}d!=null&&(a.push(d),i+=lt(d.circle.radius,d.width),h=r)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let h=!1;for(let u=0;u<t.length;++u)if(q(t[u],c)>Math.abs(c.radius-t[u].radius)){h=!0;break}h?i=o=0:(i=c.radius*c.radius*Math.PI,a.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=a,n.innerPoints=e,n.intersectionPoints=s),i+o}function re(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Et(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Et(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),a=Math.sqrt(e*e-o*o),c=t.x+o*(n.x-t.x)/s,h=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(a/s),r=-(n.x-t.x)*(a/s);return[{x:c+u,y:h-r},{x:c-u,y:h+r}]}function Tt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,a=t(n),c=t(s);let h=s-n;if(a*c>0)throw"Initial bisect points must have opposite signs";if(a===0)return n;if(c===0)return s;for(let u=0;u<i;++u){h/=2;const r=n+h,y=t(r);if(y*a>=0&&(n=r),Math.abs(h)<o||y===0)return r}return n+h}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,a=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,h=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,r=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const b=n.length,x=new Array(b+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<b;++v){const l=n.slice();l[v]=l[v]?l[v]*i:o,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[b][l]=v[l];x[b].fx=v.fx}const A=(v,l)=>v.fx-l.fx,E=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(x.sort(A),s.history){const p=x.map(f=>{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});p.sort((f,N)=>f.id-N.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<b;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[b].fx)<a&&d<c)break;for(let p=0;p<b;++p){E[p]=0;for(let f=0;f<b;++f)E[p]+=x[f][p];E[p]/=b}const l=x[b];if(J(S,1+h,E,-h,l),S.fx=t(S),S.fx<x[0].fx)J(m,1+u,E,-u,l),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=x[b-1].fx){let p=!1;if(S.fx>l.fx?(J(g,1+r,E,-r,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(J(g,1-r*h,E,r*h,l),g.fx=t(g),g.fx<S.fx?M(g):p=!0),p){if(y>=1)break;for(let f=1;f<x.length;++f)J(x[f],1-y,x[0],y,x[f]),x[f].fx=t(x[f])}}else M(S)}return x.sort(A),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,o,a){const c=s.fx,h=$(s.fxprime,n);let u=c,r=c,y=h,d=0;i=i||1,o=o||1e-6,a=a||.1;function b(x,M,A){for(let E=0;E<16;++E)if(i=(x+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||u>=A)M=i;else{if(Math.abs(y)<=-a*h)return i;y*(M-x)>=0&&(M=x),x=i,A=u}return 0}for(let x=0;x<10;++x){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>c+o*i*h||x&&u>=r)return b(d,i,r);if(Math.abs(y)<=-a*h)return i;if(y>=0)return b(i,d,u);r=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let a,c,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),a=e.fxprime.slice(),ft(a,e.fxprime,-1);for(let r=0;r<u;++r){if(h=ce(t,a,e,i,h),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),!h)ft(a,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),d=Math.max(0,$(o,i.fxprime)/y);J(a,d,a,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:h}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||tt,i=fe(t,n),o=s(i,n),a=Object.keys(o),c=[];for(const r of a)c.push(o[r].x),c.push(o[r].y);const u=zt(r=>{const y={};for(let d=0;d<a.length;++d){const b=a[d];y[b]={x:r[2*d],y:r[2*d+1],radius:o[b].radius}}return e(y,i)},c,n).x;for(let r=0;r<a.length;++r){const y=a[r];o[y].x=u[2*r],o[y].y=u[2*r+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const h of e)for(let u=0;u<h.sets.length;u++){const r=String(h.sets[u]);c.set(r,h.size+(c.get(r)||0));for(let y=u+1;y<h.sets.length;y++){const d=String(h.sets[y]),b=`${r};${d}`,x=`${d};${r}`;c.set(b,h.size+(c.get(b)||0)),c.set(x,h.size+(c.get(x)||0))}}for(const h of e)h.sets.length<3&&(h.size=c.get(i(h.sets)))}const o=[],a=new Set;for(const c of e)if(c.sets.length===1)o.push(c.sets[0]);else if(c.sets.length===2){const h=c.sets[0],u=c.sets[1];a.add(i(c.sets)),a.add(i([u,h]))}o.sort((c,h)=>c===h?0:c<h?-1:1);for(let c=0;c<o.length;++c){const h=o[c];for(let u=c+1;u<o.length;++u){const r=o[u];a.has(i([h,r]))||e.push({sets:[h,r],size:0})}}return e}function he(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const a=s[o.sets[0]],c=s[o.sets[1]],h=Math.sqrt(n[a].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),r=ht(h,u,o.size);e[a][c]=e[c][a]=r;let y=0;o.size+1e-10>=Math.min(n[a].size,n[c].size)?y=1:o.size<=1e-10&&(y=-1),i[a][c]=i[c][a]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const a=t[2*o],c=t[2*o+1];for(let h=o+1;h<s.length;++h){const u=t[2*h],r=t[2*h+1],y=s[o][h],d=e[o][h],b=(u-a)*(u-a)+(r-c)*(r-c),x=Math.sqrt(b),M=b-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*o]+=4*M*(a-u),n[2*o+1]+=4*M*(c-r),n[2*h]+=4*M*(u-a),n[2*h+1]+=4*M*(r-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=xe(t,n),o=e(i,t),a=e(s,t);o+1e-8<a&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:o,constraints:a}=he(t,e,i);const c=ut(o.map(ut))/o.length;o=o.map(d=>d.map(b=>b/c));const h=(d,b)=>de(d,b,o,a);let u=null;for(let d=0;d<s;++d){const b=ct(o.length*2).map(Math.random),x=ue(h,b,n);(!u||x.fx<u.fx)&&(u=x)}const r=u.x,y={};for(let d=0;d<e.length;++d){const b=e[d];y[b.sets[0]]={x:r[2*d]*c,y:r[2*d+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const d of n.history)ft(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const b=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[x].size)&&(d=0),i[b].push({set:x,size:y.size,weight:d}),i[x].push({set:b,size:y.size,weight:d})}const o=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;o.push({set:y,size:d})});function a(y,d){return d.size-y.size}o.sort(a);const c={};function h(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const d=o[y].set,b=i[d].filter(h),x=e[d];if(b.sort(a),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var r=0;r<b.length;++r){const S=e[b[r].set],g=ht(x.radius,S.radius,b[r].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=r+1;m<b.length;++m){const v=e[b[m].set],l=ht(x.radius,v.radius,b[m].size),p=Et({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let A=1e50,E=M[0];for(const S of M){e[d].x=S.x,e[d].y=S.y;const g=s(e,t);g<A&&(A=g,E=S)}u(E,d)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const a=t[e.sets[0]],c=t[e.sets[1]];i=xt(a.radius,c.radius,q(a,c))}else i=st(e.sets.map(a=>t[a]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],h=t[e.sets[1]];i=xt(c.radius,h.radius,q(c,h))}else i=st(e.sets.map(c=>t[c]));const o=e.weight!=null?e.weight:1,a=Math.log((i+1)/(e.size+1));s+=o*a*a}return s}function pe(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const a of t)a.x-=i,a.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),a=Math.sin(i);for(const c of t){const h=c.x,u=c.y;c.x=o*h-a*u,c.y=a*h+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const a of t){var e=(a.x+o*a.y)/(1+o*o);a.x=2*e-a.x,a.y=2*e*o-a.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const a=n(i),c=n(o);a.parent=c}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const a=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<a&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,a)=>Math.max(o,a[s]+a.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,a)=>Math.min(o,a[s]-a.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const r=dt(u);u.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),u.bounds=r}i.sort((u,r)=>r.size-u.size),e=i[0];let o=e.bounds;const a=(o.xRange.max-o.xRange.min)/50;function c(u,r,y){if(!u)return;const d=u.bounds;let b,x;if(r)b=o.xRange.max-d.xRange.min+a;else{b=o.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)x=o.yRange.max-d.yRange.min+a;else{x=o.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=b,M.y+=x,e.push(M)}let h=1;for(;h<i.length;)c(i[h],!0,!1),c(i[h+1],!1,!0),c(i[h+2],!0,!0),h+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:a,yRange:c}=dt(o);if(a.max===a.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let h,u;if(i){const b=Math.sqrt(i/Math.PI)*2;h=n/b,u=s/b}else h=n/(a.max-a.min),u=s/(c.max-c.min);const r=Math.min(u,h),y=(n-(a.max-a.min)*r)/2,d=(s-(c.max-c.min)*r)/2;return Ot(o.map(b=>({radius:r*b.radius,x:e+y+(b.x-a.min)*r,y:e+d+(b.y-c.min)*r,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,o=1e3,a=Math.PI/2,c=!0,h=null,u=!0,r=!0,y=null,d=null,b=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,A={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(p){if(p in A)return A[p];var f=A[p]=E[S];return S+=1,S>=E.length&&(S=0),f},m=At,v=tt;function l(p){let f=p.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(F=>N.has(F)));let I={},C={};if(f.length>0){let k=m(f,{lossFunction:v,distinct:b});c&&(k=Dt(k,a,d)),I=Nt(k,s,e,i,h),C=jt(I,f,M)}const G={};f.forEach(k=>{k.label&&(G[k.sets]=k.label)});function j(k){if(k.sets in G)return G[k.sets];if(k.sets.length==1)return""+k.sets[0]}p.selectAll("svg").data([I]).enter().append("svg");const T=p.select("svg");n?T.attr("viewBox",`0 0 ${s} ${e}`):T.attr("width",s).attr("height",e);const R={};let _=!1;T.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(_=!0,R[k.sets[0]]=ke(F))});function P(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,x)}}const V=T.selectAll(".venn-area").data(f,k=>k.sets),O=V.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=O.append("path"),W=O.append("text").attr("class","label").text(k=>j(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);r&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=p;_&&typeof z.transition=="function"?(z=K(p),z.selectAll("path").attrTween("d",P)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),x);const L=z.selectAll("text").filter(k=>k.sets in C).text(k=>j(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(_?"on"in L?L.on("end",rt(I,j)):L.each("end",rt(I,j)):L.each(rt(I,j)));const D=K(V.exit()).remove();typeof V.transition=="function"&&D.selectAll("path").attrTween("d",P);const X=D.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),L.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:V,enter:O,update:z,exit:D}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(b=p,l):b},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(o=p,l):o},l.layoutFunction=function(p){return arguments.length?(m=p,l):m},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(h=p,l):h},l.styled=function(p){return arguments.length?(r=p,l):r},l.orientation=function(p){return arguments.length?(a=p,l):a},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?tt:p==="logRatio"?Ct:p,l):v},l}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",a=o.split(/\s+/).reverse(),h=(o.length+a.length)/3;let u=a.pop(),r=[u],y=0;const d=1.1;e.textContent=null;const b=[];function x(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=x(u);for(;u=a.pop(),!!u;){r.push(u);const g=r.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(r.pop(),M.textContent=r.join(" "),r=[u],M=x(u),y++)}const A=.35-y*d/2,E=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",E),g.setAttribute("y",S),g.setAttribute("dy",`${A+m*d}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function Lt(t,n,s){const e=[];for(const r of t)e.push({x:r.x,y:r.y}),e.push({x:r.x+r.radius/2,y:r.y}),e.push({x:r.x-r.radius/2,y:r.y}),e.push({x:r.x,y:r.y+r.radius/2}),e.push({x:r.x,y:r.y-r.radius/2});let i=e[0],o=at(e[0],t,n);for(let r=1;r<e.length;++r){const y=at(e[r],t,n);y>=o&&(i=e[r],o=y)}const a=zt(r=>-1*at({x:r[0],y:r[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:a[0],y:a[1]};let h=!0;for(const r of t)if(q(c,r)>r.radius){h=!1;break}for(const r of n)if(q(c,r)<r.radius){h=!1;break}if(h)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Tt(u.arcs.map(r=>r.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let a=e+1;a<s.length;++a){const c=s[a],h=t[c],u=q(o,h);u+h.radius<=o.radius+1e-10?n[c].push(i):u+o.radius<=h.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let o=0;o<n.length;++o){const a=n[o].sets,c={},h={};for(let d=0;d<a.length;++d){c[a[d]]=!0;const b=i[a[d]];for(let x=0;x<b.length;++x)h[b[x]]=!0}const u=[],r=[];for(let d in t)d in c?u.push(t[d]):d in h||r.push(t[d]);const y=Lt(u,r,s);e[a]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -31,4 +31,4 @@ Expecting `+Y.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Z="Parse error on
|
|
|
31
31
|
font-family: ${t.fontFamily};
|
|
32
32
|
color: ${t.vennSetTextColor};
|
|
33
33
|
}
|
|
34
|
-
`,"getStyles"),Ve=Pe;function qt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}w(qt,"buildStyleByKey");var Be=w((t,n,s,e)=>{const i=e.db,o=i.getConfig?.(),{themeVariables:a,look:c,handDrawnSeed:h}=wt(),u=c==="handDrawn",r=[a.venn1,a.venn2,a.venn3,a.venn4,a.venn5,a.venn6,a.venn7,a.venn8].filter(Boolean),y=i.getDiagramTitle?.(),d=i.getSubsetData(),b=i.getTextData(),x=qt(i.getStyleData()),M=o?.width??800,A=o?.height??450,S=M/1600,g=y?48*S:0,m=a.primaryTextColor??a.textColor,v=Jt(n);v.attr("viewBox",`0 0 ${M} ${A}`),y&&v.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*S}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*S).style("fill",a.vennTitleTextColor||a.titleColor);const l=ot(document.createElement("div")),p=be().width(M).height(A-g);l.datum(d).call(p);const f=u?Qt.svg(l.select("svg").node()):void 0,N=Me(d,{width:M,height:A-g,padding:o?.padding??15}),I=new Map;for(const T of N){const R=Q([...T.data.sets].sort());I.set(R,T)}b.length>0&&Gt(o,I,l,b,S,x);const C=$t(a.background||"#f4f4f4");l.selectAll(".venn-circle").each(function(T,R){const _=ot(this),V=Q([...T.sets].sort()),O=x.get(V),B=O?.fill||r[R%r.length]||a.primaryColor;_.classed(`venn-set-${R%8}`,!0);const W=O?.["fill-opacity"]??.1,K=O?.stroke||B,z=O?.["stroke-width"]||`${5*S}`;if(u&&f){const D=I.get(V);if(D&&D.circles.length>0){const X=D.circles[0],k=f.circle(X.x,X.y,X.radius*2,{roughness:.7,seed:h,fill:kt(B,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+R*60,stroke:K,strokeWidth:parseFloat(String(z))});_.select("path").remove(),_.node()?.insertBefore(k,_.select("text").node())}}else _.select("path").style("fill",B).style("fill-opacity",W).style("stroke",K).style("stroke-width",z).style("stroke-opacity",.95);const L=O?.color||(C?te(B,30):ee(B,30));_.select("text").style("font-size",`${48*S}px`).style("fill",L)}),u&&f?l.selectAll(".venn-intersection").each(function(T){const R=ot(this),P=Q([...T.sets].sort()),V=x.get(P),O=V?.fill;if(O){const B=R.select("path"),W=B.attr("d");if(W){const K=f.path(W,{roughness:.7,seed:h,fill:kt(O,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),z=B.node();z?.parentNode?.insertBefore(K,z),B.remove()}}else R.select("path").style("fill-opacity",0);R.select("text").style("font-size",`${48*S}px`).style("fill",V?.color??a.vennSetTextColor??m)}):(l.selectAll(".venn-intersection text").style("font-size",`${48*S}px`).style("fill",T=>{const _=Q([...T.sets].sort());return x.get(_)?.color??a.vennSetTextColor??m}),l.selectAll(".venn-intersection path").style("fill-opacity",T=>{const _=Q([...T.sets].sort());return x.get(_)?.fill?1:0}).style("fill",T=>{const _=Q([...T.sets].sort());return x.get(_)?.fill??"transparent"}));const G=v.append("g").attr("transform",`translate(0, ${g})`),j=l.select("svg").node();if(j&&"childNodes"in j)for(const T of[...j.childNodes])G.node()?.appendChild(T);ne(v,A,M,o?.useMaxWidth??!0)},"draw");function Q(t){return t.join("|")}w(Q,"stableSetsKey");function Gt(t,n,s,e,i,o){const a=t?.useDebugLayout??!1,h=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const r of e){const y=Q(r.sets),d=u.get(y);d?d.push(r):u.set(y,[r])}for(const[r,y]of u.entries()){const d=n.get(r);if(!d?.text)continue;const b=d.text.x,x=d.text.y,M=Math.min(...d.circles.map(T=>T.radius)),A=Math.min(...d.circles.map(T=>T.radius-Math.hypot(b-T.x,x-T.y)));let E=Number.isFinite(A)?Math.max(0,A):0;E===0&&Number.isFinite(M)&&(E=M*.6);const S=h.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);a&&S.append("circle").attr("class","venn-text-debug-circle").attr("cx",b).attr("cy",x).attr("r",E).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const g=Math.max(80*i,E*2*.95),m=Math.max(60*i,E*2*.95),p=(d.data.label&&d.data.label.length>0?Math.min(32*i,E*.25):0)+(y.length<=2?30*i:0),f=b-g/2,N=x-m/2+p,I=Math.max(1,Math.ceil(Math.sqrt(y.length))),C=Math.max(1,Math.ceil(y.length/I)),G=g/I,j=m/C;for(const[T,R]of y.entries()){const _=T%I,P=Math.floor(T/I),V=f+G*(_+.5),O=N+j*(P+.5);a&&S.append("rect").attr("class","venn-text-debug-cell").attr("x",f+G*_).attr("y",N+j*P).attr("width",G).attr("height",j).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const B=G*.9,W=j*.9,K=S.append("foreignObject").attr("class","venn-text-node-fo").attr("width",B).attr("height",W).attr("x",V-B/2).attr("y",O-W/2).attr("overflow","visible"),z=o.get(R.id)?.color,L=K.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(R.label??R.id);z&&L.style("color",z)}}}w(Gt,"renderTextNodes");var qe={draw:Be},
|
|
34
|
+
`,"getStyles"),Ve=Pe;function qt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}w(qt,"buildStyleByKey");var Be=w((t,n,s,e)=>{const i=e.db,o=i.getConfig?.(),{themeVariables:a,look:c,handDrawnSeed:h}=wt(),u=c==="handDrawn",r=[a.venn1,a.venn2,a.venn3,a.venn4,a.venn5,a.venn6,a.venn7,a.venn8].filter(Boolean),y=i.getDiagramTitle?.(),d=i.getSubsetData(),b=i.getTextData(),x=qt(i.getStyleData()),M=o?.width??800,A=o?.height??450,S=M/1600,g=y?48*S:0,m=a.primaryTextColor??a.textColor,v=Jt(n);v.attr("viewBox",`0 0 ${M} ${A}`),y&&v.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*S}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*S).style("fill",a.vennTitleTextColor||a.titleColor);const l=ot(document.createElement("div")),p=be().width(M).height(A-g);l.datum(d).call(p);const f=u?Qt.svg(l.select("svg").node()):void 0,N=Me(d,{width:M,height:A-g,padding:o?.padding??15}),I=new Map;for(const T of N){const R=Q([...T.data.sets].sort());I.set(R,T)}b.length>0&&Gt(o,I,l,b,S,x);const C=$t(a.background||"#f4f4f4");l.selectAll(".venn-circle").each(function(T,R){const _=ot(this),V=Q([...T.sets].sort()),O=x.get(V),B=O?.fill||r[R%r.length]||a.primaryColor;_.classed(`venn-set-${R%8}`,!0);const W=O?.["fill-opacity"]??.1,K=O?.stroke||B,z=O?.["stroke-width"]||`${5*S}`;if(u&&f){const D=I.get(V);if(D&&D.circles.length>0){const X=D.circles[0],k=f.circle(X.x,X.y,X.radius*2,{roughness:.7,seed:h,fill:kt(B,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+R*60,stroke:K,strokeWidth:parseFloat(String(z))});_.select("path").remove(),_.node()?.insertBefore(k,_.select("text").node())}}else _.select("path").style("fill",B).style("fill-opacity",W).style("stroke",K).style("stroke-width",z).style("stroke-opacity",.95);const L=O?.color||(C?te(B,30):ee(B,30));_.select("text").style("font-size",`${48*S}px`).style("fill",L)}),u&&f?l.selectAll(".venn-intersection").each(function(T){const R=ot(this),P=Q([...T.sets].sort()),V=x.get(P),O=V?.fill;if(O){const B=R.select("path"),W=B.attr("d");if(W){const K=f.path(W,{roughness:.7,seed:h,fill:kt(O,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),z=B.node();z?.parentNode?.insertBefore(K,z),B.remove()}}else R.select("path").style("fill-opacity",0);R.select("text").style("font-size",`${48*S}px`).style("fill",V?.color??a.vennSetTextColor??m)}):(l.selectAll(".venn-intersection text").style("font-size",`${48*S}px`).style("fill",T=>{const _=Q([...T.sets].sort());return x.get(_)?.color??a.vennSetTextColor??m}),l.selectAll(".venn-intersection path").style("fill-opacity",T=>{const _=Q([...T.sets].sort());return x.get(_)?.fill?1:0}).style("fill",T=>{const _=Q([...T.sets].sort());return x.get(_)?.fill??"transparent"}));const G=v.append("g").attr("transform",`translate(0, ${g})`),j=l.select("svg").node();if(j&&"childNodes"in j)for(const T of[...j.childNodes])G.node()?.appendChild(T);ne(v,A,M,o?.useMaxWidth??!0)},"draw");function Q(t){return t.join("|")}w(Q,"stableSetsKey");function Gt(t,n,s,e,i,o){const a=t?.useDebugLayout??!1,h=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const r of e){const y=Q(r.sets),d=u.get(y);d?d.push(r):u.set(y,[r])}for(const[r,y]of u.entries()){const d=n.get(r);if(!d?.text)continue;const b=d.text.x,x=d.text.y,M=Math.min(...d.circles.map(T=>T.radius)),A=Math.min(...d.circles.map(T=>T.radius-Math.hypot(b-T.x,x-T.y)));let E=Number.isFinite(A)?Math.max(0,A):0;E===0&&Number.isFinite(M)&&(E=M*.6);const S=h.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);a&&S.append("circle").attr("class","venn-text-debug-circle").attr("cx",b).attr("cy",x).attr("r",E).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const g=Math.max(80*i,E*2*.95),m=Math.max(60*i,E*2*.95),p=(d.data.label&&d.data.label.length>0?Math.min(32*i,E*.25):0)+(y.length<=2?30*i:0),f=b-g/2,N=x-m/2+p,I=Math.max(1,Math.ceil(Math.sqrt(y.length))),C=Math.max(1,Math.ceil(y.length/I)),G=g/I,j=m/C;for(const[T,R]of y.entries()){const _=T%I,P=Math.floor(T/I),V=f+G*(_+.5),O=N+j*(P+.5);a&&S.append("rect").attr("class","venn-text-debug-cell").attr("x",f+G*_).attr("y",N+j*P).attr("width",G).attr("height",j).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const B=G*.9,W=j*.9,K=S.append("foreignObject").attr("class","venn-text-node-fo").attr("width",B).attr("height",W).attr("x",V-B/2).attr("y",O-W/2).attr("overflow","visible"),z=o.get(R.id)?.color,L=K.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(R.label??R.id);z&&L.style("color",z)}}}w(Gt,"renderTextNodes");var qe={draw:Be},Ke={parser:Se,db:je,renderer:qe,styles:Ve};export{Ke as diagram};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{m as r}from"./trellis-
|
|
1
|
+
import{m as r}from"./trellis-Csm7WAqm.js";import"./index-DKwABhnu.js";import"./select-BbwOgh1Q.js";import"./chunk-VVM5DH6Z-D2vG_ZPx.js";import"./transform-BwXaE9hv.js";import"./trellis-op-icon-CzIuo5X7.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
-
*-----------------------------------------------------------------------------*/var m=Object.defineProperty,c=Object.getOwnPropertyDescriptor,
|
|
6
|
+
*-----------------------------------------------------------------------------*/var m=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,d=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!l.call(t,n)&&n!==o&&m(t,n,{get:()=>e[n],enumerable:!(i=c(e,n))||i.enumerable});return t},s=(t,e,o)=>(d(t,e,"default"),o),a={};s(a,r);var w={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},b={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{w as conf,b as language};
|
package/assets/assets/{xychartDiagram-JWTSCODW-Ckcyhr_q.js → xychartDiagram-JWTSCODW-Be2x0vdX.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{s as ei,g as si,q as Lt,p as ni,a as ai,b as ri,_ as a,l as Et,I as oi,d as hi,y as li,G as xt,h as ci,E as It,F as ui,$ as gi,aF as xi,a7 as Tt}from"./mermaid.core-
|
|
1
|
+
import{s as ei,g as si,q as Lt,p as ni,a as ai,b as ri,_ as a,l as Et,I as oi,d as hi,y as li,G as xt,h as ci,E as It,F as ui,$ as gi,aF as xi,a7 as Tt}from"./mermaid.core-bhqKFRxj.js";import"./transform-BwXaE9hv.js";import{i as di}from"./init-Gi6I4Gst.js";import{o as fi}from"./ordinal-Cboi1Yqb.js";import{l as Dt}from"./linear-COY9pyF4.js";import"./index-DKwABhnu.js";import"./defaultLocale-DX6XiGOO.js";function pi(t,i,e){t=+t,i=+i,e=(n=arguments.length)<2?(i=t,t=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((i-t)/e))|0,x=new Array(n);++s<n;)x[s]=t+s*e;return x}function ht(){var t=fi().unknown(void 0),i=t.domain,e=t.range,s=0,n=1,x,g,m=!1,S=0,D=0,v=.5;delete t.unknown;function w(){var y=i().length,E=n<s,T=E?n:s,P=E?s:n;x=(P-T)/Math.max(1,y-S+D*2),m&&(x=Math.floor(x)),T+=(P-T-x*(y-S))*v,g=x*(1-S),m&&(T=Math.round(T),g=Math.round(g));var I=pi(y).map(function(p){return T+x*p});return e(E?I.reverse():I)}return t.domain=function(y){return arguments.length?(i(y),w()):i()},t.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,w()):[s,n]},t.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,m=!0,w()},t.bandwidth=function(){return g},t.step=function(){return x},t.round=function(y){return arguments.length?(m=!!y,w()):m},t.padding=function(y){return arguments.length?(S=Math.min(1,D=+y),w()):S},t.paddingInner=function(y){return arguments.length?(S=Math.min(1,y),w()):S},t.paddingOuter=function(y){return arguments.length?(D=+y,w()):D},t.align=function(y){return arguments.length?(v=Math.max(0,Math.min(1,y)),w()):v},t.copy=function(){return ht(i(),[s,n]).round(m).paddingInner(S).paddingOuter(D).align(v)},di.apply(w(),arguments)}var lt=(function(){var t=a(function(F,o,c,u){for(c=c||{},u=F.length;u--;c[F[u]]=o);return c},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],x=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],S=[1,25],D=[1,26],v=[1,28],w=[1,29],y=[1,30],E=[1,31],T=[1,32],P=[1,33],I=[1,34],p=[1,35],_=[1,36],l=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[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],k=[1,64],$={trace:a(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:a(function(o,c,u,d,A,r,j){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:x,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:x,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:x,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]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:x,36:g}),{1:[2,3]},t(m,[2,5]),t(i,[2,7],{4:22,34:n,35:x,36:g}),{11:23,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},{11:45,15:44,27:U,33:46,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},{11:49,17:48,24:X,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},{11:52,17:51,24:X,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},{20:[1,53]},{22:[1,54]},t(h,[2,18]),{1:[2,2]},t(h,[2,8]),t(h,[2,9]),t(L,[2,37],{40:55,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l}),t(L,[2,38]),t(L,[2,39]),t(C,[2,40]),t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),t(C,[2,50]),t(C,[2,51]),t(h,[2,10]),t(h,[2,22],{30:41,29:56,24:W,27:z}),t(h,[2,24]),t(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},t(h,[2,11]),t(h,[2,30],{33:60,27:U}),t(h,[2,32]),{31:[1,61]},t(h,[2,12]),{17:62,24:X},{25:63,27:k},t(h,[2,14]),{17:65,24:X},t(h,[2,16]),t(h,[2,17]),t(C,[2,41]),t(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(h,[2,31]),{27:[1,69]},t(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(h,[2,15]),t(h,[2,26]),t(h,[2,27]),{11:59,32:72,37:24,38:S,39:D,40:27,41:v,42:w,43:y,44:E,45:T,46:P,47:I,48:p,49:_,50:l},t(h,[2,33]),t(h,[2,19]),{25:73,27:k},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(o,c){if(c.recoverable)this.trace(o);else{var u=new Error(o);throw u.hash=c,u}},"parseError"),parse:a(function(o){var c=this,u=[0],d=[],A=[null],r=[],j=this.table,f="",J=0,St=0,Zt=2,_t=1,Jt=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nt)&&(Y.yy[nt]=this.yy[nt]);R.setInput(o,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var at=R.yylloc;r.push(at);var ti=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(V){u.length=u.length-2*V,A.length=A.length-V,r.length=r.length-V}a(ii,"popStack");function kt(){var V;return V=d.pop()||R.lex()||_t,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=c.symbols_[V]||V),V}a(kt,"lex");for(var M,H,B,rt,q={},tt,O,Rt,it;;){if(H=u[u.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=kt()),B=j[H]&&j[H][M]),typeof B>"u"||!B.length||!B[0]){var ot="";it=[];for(tt in j[H])this.terminals_[tt]&&tt>Zt&&it.push("'"+this.terminals_[tt]+"'");R.showPosition?ot="Parse error on line "+(J+1)+`:
|
|
2
2
|
`+R.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[M]||M)+"'":ot="Parse error on line "+(J+1)+": Unexpected "+(M==_t?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(ot,{text:R.match,token:this.terminals_[M]||M,line:R.yylineno,loc:at,expected:it})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:u.push(M),A.push(R.yytext),r.push(R.yylloc),u.push(B[1]),M=null,St=R.yyleng,f=R.yytext,J=R.yylineno,at=R.yylloc;break;case 2:if(O=this.productions_[B[1]][1],q.$=A[A.length-O],q._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},ti&&(q._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),rt=this.performAction.apply(q,[f,St,J,Y.yy,B[1],A,r].concat(Jt)),typeof rt<"u")return rt;O&&(u=u.slice(0,-1*O*2),A=A.slice(0,-1*O),r=r.slice(0,-1*O)),u.push(this.productions_[B[1]][0]),A.push(q.$),r.push(q._$),Rt=j[u[u.length-2]][u[u.length-1]],u.push(Rt);break;case 3:return!0}}return!0},"parse")},Ct=(function(){var F={EOF:1,parseError:a(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),setInput:a(function(o,c){return this.yy=c||this.yy||{},this._input=o,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:a(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var c=o.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),o},"input"),unput:a(function(o){var c=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var d=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===d.length?this.yylloc.first_column:0)+d[d.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:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(o){this.unput(this.match.slice(o))},"less"),pastInput:a(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var o=this.pastInput(),c=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
5
|
`+c+"^"},"showPosition"),test_match:a(function(o,c){var u,d,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],u=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,c,u,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;r<A.length;r++)if(u=this._input.match(this.rules[A[r]]),u&&(!c||u[0].length>c[0].length)){if(c=u,d=r,this.options.backtrack_lexer){if(o=this.test_match(u,A[r]),o!==!1)return o;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(o=this.test_match(c,A[d]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,u,d,A){switch(d){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F})();$.lexer=Ct;function N(){this.yy={}}return a(N,"Parser"),N.prototype=$,$.Parser=N,new N})();lt.parser=lt;var mi=lt;function ct(t){return t.type==="bar"}a(ct,"isBarPlot");function dt(t){return t.type==="band"}a(dt,"isBandAxisData");function G(t){return t.type==="linear"}a(G,"isLinearAxisData");var Mt=class{constructor(t){this.parentGroup=t}static{a(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((n,x)=>Math.max(x.length,n),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const x=xi(s,1,n),g=x?x.width:n.length*i,m=x?x.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,m)}return s.remove(),e}},vt=.7,Pt=.2,Vt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{a(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){vt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(vt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+this.axisConfig.labelPadding*2;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},yi=class extends Vt{static{a(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=ht().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=ht().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Et.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},bi=class extends Vt{static{a(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=Dt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Dt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ut(t,i,e,s){const n=new Mt(s);return dt(t)?new yi(i,e,t.categories,t.title,n):new bi(i,e,[t.min,t.max],t.title,n)}a(ut,"getAxis");var Ai=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{a(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Bt(t,i,e,s){const n=new Mt(s);return new Ai(n,t,i,e)}a(Bt,"getChartTitleComponent");var wi=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{a(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Tt().y(e=>e[0]).x(e=>e[1])(t):i=Tt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},Ci=class{constructor(t,i,e,s,n,x){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=x}static{a(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:this.boundingRect.x,y:n[0]-s,height:e,width:n[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:n[0]-s,y:n[1],width:e,height:this.boundingRect.y+this.boundingRect.height-n[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Si=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{a(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new wi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new Ci(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}};function Wt(t,i,e){return new Si(t,i,e)}a(Wt,"getPlotComponent");var _i=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Bt(t,i,e,s),plot:Wt(t,i,e),xAxis:ut(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:ut(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{a(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:n,height:x});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(n+=t,t=0),i>0&&(x+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:x}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+x}),this.componentStore.yAxis.setRange([s,s+x]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(m=>ct(m))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,x=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:x,height:g});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("left"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=m.width,s=m.width,this.componentStore.yAxis.setAxisPosition("top"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=m.height,n=e+m.height,t>0&&(x+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:x,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+x]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(S=>ct(S))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},ki=class{static{a(this,"XYChartBuilder")}static build(t,i,e,s){return new _i(t,i,e,s).getDrawableElement()}},Q=0,zt,K=mt(),Z=pt(),b=yt(),gt=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,ft=!1;function pt(){const t=gi(),i=xt();return It(t.xyChart,i.themeVariables.xyChart)}a(pt,"getChartDefaultThemeConfig");function mt(){const t=xt();return It(ui.xyChart,t.xyChart)}a(mt,"getChartDefaultConfig");function yt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(yt,"getChartDefaultData");function st(t){const i=xt();return ci(t.trim(),i)}a(st,"textSanitizer");function Ft(t){zt=t}a(Ft,"setTmpSVGG");function Ot(t){t==="horizontal"?K.chartOrientation="horizontal":K.chartOrientation="vertical"}a(Ot,"setOrientation");function Xt(t){b.xAxis.title=st(t.text)}a(Xt,"setXAxisTitle");function bt(t,i){b.xAxis={type:"linear",title:b.xAxis.title,min:t,max:i},et=!0}a(bt,"setXAxisRangeData");function Nt(t){b.xAxis={type:"band",title:b.xAxis.title,categories:t.map(i=>st(i.text))},et=!0}a(Nt,"setXAxisBand");function Yt(t){b.yAxis.title=st(t.text)}a(Yt,"setYAxisTitle");function Ht(t,i){b.yAxis={type:"linear",title:b.yAxis.title,min:t,max:i},ft=!0}a(Ht,"setYAxisRangeData");function Ut(t){const i=Math.min(...t),e=Math.max(...t),s=G(b.yAxis)?b.yAxis.min:1/0,n=G(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}a(Ut,"setYAxisRangeFromPlotData");function At(t){let i=[];if(t.length===0)return i;if(!et){const e=G(b.xAxis)?b.xAxis.min:1/0,s=G(b.xAxis)?b.xAxis.max:-1/0;bt(Math.min(e,1),Math.max(s,t.length))}if(ft||Ut(t),dt(b.xAxis)&&(i=b.xAxis.categories.map((e,s)=>[e,t[s]])),G(b.xAxis)){const e=b.xAxis.min,s=b.xAxis.max,n=(s-e)/(t.length-1),x=[];for(let g=e;g<=s;g+=n)x.push(`${g}`);i=x.map((g,m)=>[g,t[m]])}return i}a(At,"transformDataWithoutCategory");function wt(t){return gt[t===0?0:t%gt.length]}a(wt,"getPlotColorFromPalette");function $t(t,i){const e=At(i);b.plots.push({type:"line",strokeFill:wt(Q),strokeWidth:2,data:e}),Q++}a($t,"setLineData");function qt(t,i){const e=At(i);b.plots.push({type:"bar",fill:wt(Q),data:e}),Q++}a(qt,"setBarData");function Gt(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Lt(),ki.build(K,b,Z,zt)}a(Gt,"getDrawableElem");function jt(){return Z}a(jt,"getChartThemeConfig");function Qt(){return K}a(Qt,"getChartConfig");function Kt(){return b}a(Kt,"getXYChartData");var Ri=a(function(){li(),Q=0,K=mt(),b=yt(),Z=pt(),gt=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,ft=!1},"clear"),Ti={getDrawableElem:Gt,clear:Ri,setAccTitle:ri,getAccTitle:ai,setDiagramTitle:ni,getDiagramTitle:Lt,getAccDescription:si,setAccDescription:ei,setOrientation:Ot,setXAxisTitle:Xt,setXAxisRangeData:bt,setXAxisBand:Nt,setYAxisTitle:Yt,setYAxisRangeData:Ht,setLineData:$t,setBarData:qt,setTmpSVGG:Ft,getChartThemeConfig:jt,getChartConfig:Qt,getXYChartData:Kt},Di=a((t,i,e,s)=>{const n=s.db,x=n.getChartThemeConfig(),g=n.getChartConfig(),m=n.getXYChartData().plots[0].data.map(p=>p[1]);function S(p){return p==="top"?"text-before-edge":"middle"}a(S,"getDominantBaseLine");function D(p){return p==="left"?"start":p==="right"?"end":"middle"}a(D,"getTextAnchor");function v(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}a(v,"getTextTransformation"),Et.debug(`Rendering xychart chart
|
|
7
|
-
`+t);const w=oi(i),y=w.append("g").attr("class","main"),E=y.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),E.attr("fill",x.backgroundColor),n.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));const T=n.getDrawableElem(),P={};function I(p){let _=y,l="";for(const[W]of p.entries()){let z=y;W>0&&P[l]&&(z=P[l]),l+=p[W],_=P[l],_||(_=P[l]=z.append("g").attr("class",p[W]))}return _}a(I,"getGroup");for(const p of T){if(p.data.length===0)continue;const _=I(p.groupTexts);switch(p.type){case"rect":if(_.selectAll("rect").data(p.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let l=function(h,L){const{data:C,label:k}=h;return L*k.length*W<=C.width-10};a(l,"fitsHorizontally");const W=.7,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L}=h;let C=L.height*.7;for(;!l(h,C)&&C>0;)C-=1;return C}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width-10).attr("y",h=>h.data.y+h.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}else{let l=function(h,L,C){const{data:k,label:$}=h,N=L*$.length*.7,F=k.x+k.width/2,o=F-N/2,c=F+N/2,u=o>=k.x&&c<=k.x+k.width,d=k.y+C+L<=k.y+k.height;return u&&d};a(l,"fitsInBar");const W=10,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L,label:C}=h;let k=L.width/(C.length*.7);for(;!l(h,k,W)&&k>0;)k-=1;return k}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width/2).attr("y",h=>h.data.y+W).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}break;case"text":_.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>S(l.verticalPos)).attr("text-anchor",l=>D(l.horizontalPos)).attr("transform",l=>v(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(p.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),vi={draw:Di},
|
|
7
|
+
`+t);const w=oi(i),y=w.append("g").attr("class","main"),E=y.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),E.attr("fill",x.backgroundColor),n.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));const T=n.getDrawableElem(),P={};function I(p){let _=y,l="";for(const[W]of p.entries()){let z=y;W>0&&P[l]&&(z=P[l]),l+=p[W],_=P[l],_||(_=P[l]=z.append("g").attr("class",p[W]))}return _}a(I,"getGroup");for(const p of T){if(p.data.length===0)continue;const _=I(p.groupTexts);switch(p.type){case"rect":if(_.selectAll("rect").data(p.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let l=function(h,L){const{data:C,label:k}=h;return L*k.length*W<=C.width-10};a(l,"fitsHorizontally");const W=.7,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L}=h;let C=L.height*.7;for(;!l(h,C)&&C>0;)C-=1;return C}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width-10).attr("y",h=>h.data.y+h.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}else{let l=function(h,L,C){const{data:k,label:$}=h,N=L*$.length*.7,F=k.x+k.width/2,o=F-N/2,c=F+N/2,u=o>=k.x&&c<=k.x+k.width,d=k.y+C+L<=k.y+k.height;return u&&d};a(l,"fitsInBar");const W=10,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L,label:C}=h;let k=L.width/(C.length*.7);for(;!l(h,k,W)&&k>0;)k-=1;return k}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width/2).attr("y",h=>h.data.y+W).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}break;case"text":_.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>S(l.verticalPos)).attr("text-anchor",l=>D(l.horizontalPos)).attr("transform",l=>v(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(p.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),vi={draw:Di},Wi={parser:mi,db:Ti,renderer:vi};export{Wi as diagram};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{m as
|
|
1
|
+
import{m as i}from"./trellis-Csm7WAqm.js";import"./index-DKwABhnu.js";import"./select-BbwOgh1Q.js";import"./chunk-VVM5DH6Z-D2vG_ZPx.js";import"./transform-BwXaE9hv.js";import"./trellis-op-icon-CzIuo5X7.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
6
|
-
*-----------------------------------------------------------------------------*/var
|
|
6
|
+
*-----------------------------------------------------------------------------*/var l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,d=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!s.call(n,t)&&t!==r&&l(n,t,{get:()=>e[t],enumerable:!(o=c(e,t))||o.enumerable});return n},m=(n,e,r)=>(d(n,e,"default"),r),a={};m(a,i);var k={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:a.languages.IndentAction.Indent}}]},S={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{k as conf,S as language};
|
package/assets/index.html
CHANGED
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
document.documentElement.dataset.theme = themeId
|
|
29
29
|
document.documentElement.dataset.colorScheme = mode
|
|
30
30
|
|
|
31
|
-
if (themeId === "oc-2") return
|
|
32
|
-
|
|
33
31
|
var css = localStorage.getItem("opencode-theme-css-" + mode)
|
|
34
32
|
if (css) {
|
|
35
33
|
var style = document.createElement("style")
|
|
@@ -46,8 +44,8 @@
|
|
|
46
44
|
}
|
|
47
45
|
})()
|
|
48
46
|
</script>
|
|
49
|
-
<script type="module" crossorigin src="/assets/index-
|
|
50
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
47
|
+
<script type="module" crossorigin src="/assets/index-DKwABhnu.js"></script>
|
|
48
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DTxAHLat.css">
|
|
51
49
|
</head>
|
|
52
50
|
<body class="antialiased overscroll-none text-12-regular overflow-hidden">
|
|
53
51
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
document.documentElement.dataset.theme = themeId
|
|
17
17
|
document.documentElement.dataset.colorScheme = mode
|
|
18
18
|
|
|
19
|
-
if (themeId === "oc-2") return
|
|
20
|
-
|
|
21
19
|
var css = localStorage.getItem("opencode-theme-css-" + mode)
|
|
22
20
|
if (css) {
|
|
23
21
|
var style = document.createElement("style")
|