ocean-brain 0.12.0 → 0.12.2
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/README.md +1 -1
- package/package.json +4 -2
- package/server/client/dist/assets/{ArrowRight.es-DZTjsBaI.js → ArrowRight.es-CD1IMhU2.js} +1 -1
- package/server/client/dist/assets/{AuxiliaryPanelHeader-Bp3iRjm6.js → AuxiliaryPanelHeader-zoJGsYWR.js} +1 -1
- package/server/client/dist/assets/Calendar-6otw_EJn.js +25 -0
- package/server/client/dist/assets/{Callout-Cye6_6BM.js → Callout-C1QiCWCa.js} +1 -1
- package/server/client/dist/assets/{CheckCircle.es-BTloiuti.js → CheckCircle.es-C7fkzE3t.js} +1 -1
- package/server/client/dist/assets/{Copy.es-CkLUgwY-.js → Copy.es-D6rl6b78.js} +1 -1
- package/server/client/dist/assets/{File.es-c83QExqr.js → File.es-CcjtzE38.js} +1 -1
- package/server/client/dist/assets/{FlowArrow.es-DWiIXWQG.js → FlowArrow.es-CAIThqWk.js} +1 -1
- package/server/client/dist/assets/{Graph-jbPLcne9.js → Graph-BHsmPDPh.js} +1 -1
- package/server/client/dist/assets/{Image.es-vY-nTyOe.js → Image.es-BDpo5R66.js} +1 -1
- package/server/client/dist/assets/Note-Dq2Szaxd.js +19 -0
- package/server/client/dist/assets/{NotePropertiesPanel-uO-JKy19.js → NotePropertiesPanel-Cu3RgDic.js} +2 -2
- package/server/client/dist/assets/{Plus.es-CaRgmXc_.js → Plus.es-P9Fjwtud.js} +1 -1
- package/server/client/dist/assets/{Reminders-BAgZEUwV.js → Reminders-DKm0GFI2.js} +1 -1
- package/server/client/dist/assets/{Search-BxozUWkC.js → Search-DVROxY_B.js} +1 -1
- package/server/client/dist/assets/{SurfaceCard-BAlcul6z.js → SurfaceCard-D_OU_Oy6.js} +1 -1
- package/server/client/dist/assets/{Tag-BhCf_mil.js → Tag-wMHTRwlF.js} +1 -1
- package/server/client/dist/assets/{TagNotes-BIzhXqwp.js → TagNotes-BRza6i14.js} +1 -1
- package/server/client/dist/assets/{Trash.es-prxIxo9c.js → Trash.es-BeR1sZMe.js} +1 -1
- package/server/client/dist/assets/{ViewChip-Cq_YzRvB.js → ViewChip-D-Ax5PdL.js} +1 -1
- package/server/client/dist/assets/{Views-C26uWznP.js → Views-CL7rC05G.js} +1 -1
- package/server/client/dist/assets/{abnfDiagram-VRR7QNED-2cuaaDg0.js → abnfDiagram-N423BO3Z-D44O4T7q.js} +1 -1
- package/server/client/dist/assets/{app-DbQdHfMb.js → app-CyQtGTtn.js} +3 -3
- package/server/client/dist/assets/app-DGFNtdpS.css +1 -0
- package/server/client/dist/assets/{arc-Cr-oYJoQ.js → arc-Cil9fXuW.js} +1 -1
- package/server/client/dist/assets/architectureDiagram-T3A2C74G-Cjq6ayF2.js +36 -0
- package/server/client/dist/assets/{blockDiagram-677ZJIJ3-evR8rlpQ.js → blockDiagram-VBNYF7ZC-B2Xm5N0i.js} +1 -1
- package/server/client/dist/assets/{c4Diagram-LMCZKHZV-zCjuWUmC.js → c4Diagram-5PPSVZJV-Dp0y-lCR.js} +1 -1
- package/server/client/dist/assets/channel-DZFalh-h.js +1 -0
- package/server/client/dist/assets/{chunk-32BRIVSS-102-EyWU.js → chunk-2GRJ4B5K-CWaaNkFx.js} +1 -1
- package/server/client/dist/assets/{chunk-2Q5K7J3B-P0v1gRui.js → chunk-2Q5K7J3B-Ces-xz2S.js} +1 -1
- package/server/client/dist/assets/{chunk-EX3LRPZG-k5hlNinR.js → chunk-5RXB4S5H-B-4Chlfc.js} +1 -1
- package/server/client/dist/assets/{chunk-5VM5RSS4-uqI_1K1p.js → chunk-5VM5RSS4-C8_HVwuz.js} +1 -1
- package/server/client/dist/assets/{chunk-MOJQB5TN-B-LmIwhJ.js → chunk-6Q2QTUOP-xZ8ofRqk.js} +1 -1
- package/server/client/dist/assets/{chunk-V7JOEXUC-CmSzAkUx.js → chunk-GF5L2VYU-Bpa43a7s.js} +1 -1
- package/server/client/dist/assets/{chunk-JWPE2WC7-PLvgEy_B.js → chunk-JWPE2WC7-DsyTXbuq.js} +1 -1
- package/server/client/dist/assets/{chunk-VR4S4FIN-IiOfWaBG.js → chunk-KBJHAD2P-BDhjm9-8.js} +1 -1
- package/server/client/dist/assets/{chunk-RYQCIY6F-CaNSMki0.js → chunk-RYQCIY6F-Cn-jdp6I.js} +1 -1
- package/server/client/dist/assets/{chunk-XXDRQBXY-DRXrI6SM.js → chunk-XXDRQBXY-BKsc_0wh.js} +1 -1
- package/server/client/dist/assets/classDiagram-JCYQIIEL-CkEhFvVV.js +1 -0
- package/server/client/dist/assets/classDiagram-v2-OCEON4UE-CkEhFvVV.js +1 -0
- package/server/client/dist/assets/{cose-bilkent-JH36ORCC-COcEaZRS.js → cose-bilkent-JH36ORCC-jmn3Q4zj.js} +1 -1
- package/server/client/dist/assets/{cynefinDiagram-TSTJHNR4-CSHqcg9K.js → cynefinDiagram-MW4NZA55-BpLstuBJ.js} +1 -1
- package/server/client/dist/assets/{dagre-VKFMJZFB-XAWCPOS0.js → dagre-VZM6K2ZE-B5ft5Yzm.js} +1 -1
- package/server/client/dist/assets/{diagram-OA4YK3LP-CXTlHB5A.js → diagram-7IWD3JNH-B_W9IsWZ.js} +1 -1
- package/server/client/dist/assets/{diagram-FQU43EPY-scBCDUnE.js → diagram-B4RE2ZJO-32chS3GX.js} +1 -1
- package/server/client/dist/assets/{diagram-NH7WQ7WH-DcWalY4j.js → diagram-LBJQPF4R-Bqupdb3-.js} +1 -1
- package/server/client/dist/assets/{diagram-G47NLZAW-nPKP5kd8.js → diagram-Q27KOJAE-BD8jKBsv.js} +1 -1
- package/server/client/dist/assets/diagram-UB23O5K3-C40jAU8D.js +41 -0
- package/server/client/dist/assets/{ebnfDiagram-CCIWWBDH-nHt3vRNt.js → ebnfDiagram-BXEA7PRR-BQfW9mFA.js} +1 -1
- package/server/client/dist/assets/{erDiagram-Q63AITRT-K6stUUV2.js → erDiagram-JOGREHBK-ILZnLzz2.js} +1 -1
- package/server/client/dist/assets/{flowDiagram-23GEKE2U-DDWtKrEp.js → flowDiagram-UKHOOZJN-CDmwr2dI.js} +4 -4
- package/server/client/dist/assets/{ganttDiagram-NO4QXBWP-Daqh7b4I.js → ganttDiagram-PKOTCBZU-DBcrUc49.js} +1 -1
- package/server/client/dist/assets/{gitGraphDiagram-IHSO6WYX-D73CLkcG.js → gitGraphDiagram-DS77QQ5N-_xO6__FK.js} +1 -1
- package/server/client/dist/assets/{image.api-Bbwmcw0T.js → image.api-CtfyPwkV.js} +1 -1
- package/server/client/dist/assets/{index-8bsOoxxg.js → index-BEfKfbvr.js} +1 -1
- package/server/client/dist/assets/{infoDiagram-FWYZ7A6U-Bc1YI5Iu.js → infoDiagram-6WML65LV-CuIIcu-L.js} +1 -1
- package/server/client/dist/assets/{ishikawaDiagram-FXEZZL3T-BJDXbmaY.js → ishikawaDiagram-WSZJBQD7-BVtRGTOj.js} +1 -1
- package/server/client/dist/assets/{journeyDiagram-5HDEW3XC-DlyJx4xT.js → journeyDiagram-NVQOT4AX-D5-Nzb2N.js} +1 -1
- package/server/client/dist/assets/{kanban-definition-HUTT4EX6-AmTeXesc.js → kanban-definition-27J2QSJJ-DmOhgC8H.js} +1 -1
- package/server/client/dist/assets/{manage-image-detail-CPpeRZD4.js → manage-image-detail-BNYOCSmu.js} +1 -1
- package/server/client/dist/assets/{manage-image-DCBgglLx.js → manage-image-m-7v_Z1W.js} +1 -1
- package/server/client/dist/assets/{mcp-Y2p95Lm9.js → mcp-B-aGeAQD.js} +1 -1
- package/server/client/dist/assets/{mcp-admin-adapter-z9OaMVrl.js → mcp-admin-adapter-Cw6w5mfg.js} +1 -1
- package/server/client/dist/assets/mermaid.core-C2tL9tq7.js +308 -0
- package/server/client/dist/assets/{mindmap-definition-LN4V7U3C-C_6tKVmY.js → mindmap-definition-FAOFIHXS-DuvsPqrh.js} +1 -1
- package/server/client/dist/assets/{note-ui-Cv6quEYh.js → note-ui-CYsZc3DI.js} +1 -1
- package/server/client/dist/assets/{pegDiagram-2B236MQR-CGKCNdrV.js → pegDiagram-VL7TDLO6-D64crEZV.js} +1 -1
- package/server/client/dist/assets/{pieDiagram-ENE6RG2P-C3cMh7d5.js → pieDiagram-7S7Q4E2Y--kl7vopC.js} +1 -1
- package/server/client/dist/assets/{placeholder-CHRQt_T8.js → placeholder-C5fNzKrL.js} +1 -1
- package/server/client/dist/assets/{properties-CwxDtivz.js → properties-B93_V2uD.js} +1 -1
- package/server/client/dist/assets/{quadrantDiagram-ABIIQ3AL-CVVzGxBd.js → quadrantDiagram-CIZ2JOQS-DuvJ4M2y.js} +1 -1
- package/server/client/dist/assets/{railroadDiagram-RFXS5EU6-wa-4aJR9.js → railroadDiagram-AXF67PYL-BMKmCOY7.js} +1 -1
- package/server/client/dist/assets/{requirementDiagram-TGXJPOKE-DyuC9W7q.js → requirementDiagram-LRYGKXZP-DY1eJcy0.js} +1 -1
- package/server/client/dist/assets/route-preload.js +2 -2
- package/server/client/dist/assets/{sankeyDiagram-HTMAVEWB-B70y-MQg.js → sankeyDiagram-W5VNT64P-C3Ka4GKM.js} +1 -1
- package/server/client/dist/assets/{search-DCLnUWYd.js → search-BmXuuK26.js} +1 -1
- package/server/client/dist/assets/{search-admin-adapter-BLMYNm9w.js → search-admin-adapter-Dj0KKKrJ.js} +1 -1
- package/server/client/dist/assets/{sequenceDiagram-DBY2YBRQ-mGkh3IEy.js → sequenceDiagram-SI44F4Z6-Bhpwtk2s.js} +1 -1
- package/server/client/dist/assets/{sizeCapture-X5ZJPWSS-BhnCNP5z.js → sizeCapture-X5ZJPWSS-BFta71TW.js} +1 -1
- package/server/client/dist/assets/{stateDiagram-2N3HPSRC-BqSKSfKi.js → stateDiagram-OKZ733FA-D6GCn1io.js} +1 -1
- package/server/client/dist/assets/{stateDiagram-v2-6OUMAXLB-Wl7lGTf3.js → stateDiagram-v2-UEYNNEHI-g4yinGDn.js} +1 -1
- package/server/client/dist/assets/{swimlanes-5IMT3BWC-CZ7ckdmY.js → swimlanes-SLNWSIFB-DLFvOjUl.js} +2 -2
- package/server/client/dist/assets/swimlanesDiagram-ULZ7WXOC-Ci4mcvmo.js +8 -0
- package/server/client/dist/assets/{tag.api-bU52U0tT.js → tag.api-BJ6eaHui.js} +1 -1
- package/server/client/dist/assets/{time-DZKkPFUi.js → time-DI902Sxa.js} +1 -1
- package/server/client/dist/assets/{timeline-definition-FHXFAJF6-C-t9-x4M.js → timeline-definition-Z64GVDOM-DTSIekSM.js} +1 -1
- package/server/client/dist/assets/{trash-BNeUFJnC.js → trash-GulvRh9f.js} +1 -1
- package/server/client/dist/assets/{useNoteMutate-VJYw0Vt_.js → useNoteMutate-xEIypxi5.js} +1 -1
- package/server/client/dist/assets/{useReminderMutate-DaO0QssD.js → useReminderMutate-kTBRSjYc.js} +1 -1
- package/server/client/dist/assets/{vennDiagram-L72KCM5P-CP014Nl5.js → vennDiagram-T6HMQDX7-CMNqSI2X.js} +1 -1
- package/server/client/dist/assets/{wardleyDiagram-EHGQE667-B7Ghd-94.js → wardleyDiagram-T6FBY63Y-DV-JOYqB.js} +1 -1
- package/server/client/dist/assets/{xychartDiagram-FW5EYKEG-C4YGS0YJ.js → xychartDiagram-ELKLHX3M-BUIniF4m.js} +4 -4
- package/server/client/dist/index.html +4 -4
- package/server/dist/app.js +5 -5
- package/server/dist/features/note/graphql/note.query.resolver.js +18 -16
- package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js +2 -3
- package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js +4 -3
- package/server/dist/features/search/sqlite-vector-index.js +71 -138
- package/server/dist/features/view/graphql/view.query.resolver.js +15 -7
- package/server/dist/main.js +1 -35
- package/server/dist/modules/blocknote.js +33 -17
- package/server/dist/routes/api.js +6 -1
- package/server/dist/routes/client.js +15 -4
- package/server/dist/server.js +40 -0
- package/server/client/dist/assets/Calendar-BLiViCGr.js +0 -25
- package/server/client/dist/assets/Note-BTQLB80Y.js +0 -25
- package/server/client/dist/assets/app-CEkicO08.css +0 -1
- package/server/client/dist/assets/architectureDiagram-ZJ3FMSHR-HF8-bEM0.js +0 -36
- package/server/client/dist/assets/channel-Cq5ZBtfo.js +0 -1
- package/server/client/dist/assets/classDiagram-OUVF2IWQ-BqUaa8a6.js +0 -1
- package/server/client/dist/assets/classDiagram-v2-EOCWNBFH-BqUaa8a6.js +0 -1
- package/server/client/dist/assets/diagram-WEI45ONY-D1uvaJub.js +0 -41
- package/server/client/dist/assets/mermaid.core-B528P54n.js +0 -308
- package/server/client/dist/assets/swimlanesDiagram-G3AALYLV-BZL3DQ-c.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ze}from"./chunk-XXDRQBXY-DRXrI6SM.js";import{s as Xe}from"./chunk-VR4S4FIN-IiOfWaBG.js";import{_ as f,y as Be,b as Je,a as Ze,s as et,g as tt,m as st,n as it,c as Ne,l as qe,o as rt,q as nt,t as at,u as lt,v as ct}from"./mermaid.core-B528P54n.js";import"./transform-BUB79_za.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";var Ce=(function(){var e=f(function($,i,l,o){for(l=l||{},o=$.length;o--;l[$[o]]=i);return l},"o"),n=[1,3],u=[1,4],h=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],m=[1,22],p=[2,7],y=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],R=[1,39],g=[1,40],E=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:f(function(i,l,o,s,d,t,de){var c=t.length-1;switch(d){case 4:this.$=t[c].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[c].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[c-3],t[c-4]);break;case 22:s.addRequirement(t[c-5],t[c-6]),s.setClass([t[c-5]],t[c-3]);break;case 23:s.setNewReqId(t[c-2]);break;case 24:s.setNewReqText(t[c-2]);break;case 25:s.setNewReqRisk(t[c-2]);break;case 26:s.setNewReqVerifyMethod(t[c-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[c-3]);break;case 43:s.addElement(t[c-5]),s.setClass([t[c-5]],t[c-3]);break;case 44:s.setNewElementType(t[c-2]);break;case 45:s.setNewElementDocRef(t[c-2]);break;case 48:s.addRelationship(t[c-2],t[c],t[c-4]);break;case 49:s.addRelationship(t[c-2],t[c-4],t[c]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[c-2],s.defineClass(t[c-1],t[c]);break;case 58:s.setClass(t[c-1],t[c]);break;case 59:s.setClass([t[c-2]],t[c]);break;case 60:case 62:this.$=[t[c]];break;case 61:case 63:this.$=t[c-2].concat([t[c]]);break;case 64:this.$=t[c-2],s.setCssStyle(t[c-1],t[c]);break;case 65:this.$=[t[c]];break;case 66:t[c-2].push(t[c]),this.$=t[c-2];break;case 68:this.$=t[c-1]+t[c];break}},"anonymous"),table:[{3:1,4:2,6:n,9:u,11:h,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:u,11:h,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:n,9:u,11:h,13:r},{1:[2,2]},{4:17,5:m,7:13,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:m,7:42,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:43,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:44,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:45,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:46,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:47,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:48,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:49,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:50,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(E,[2,17]),e(E,[2,18]),e(E,[2,19]),e(E,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ve,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(E,[2,59],{76:U}),e(E,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(E,[2,57],{76:Me}),e(E,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(E,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(E,[2,28]),{5:[1,127]},e(E,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(E,[2,47]),{5:[1,131]},e(E,[2,48]),e(E,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(E,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(E,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(E,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(E,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(E,[2,23]),e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,44]),e(E,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:f(function(i,l){if(l.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=l,o}},"parseError"),parse:f(function(i){var l=this,o=[0],s=[],d=[null],t=[],de=this.table,c="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);_.setInput(i,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Ie=_.yylloc;t.push(Ie);var je=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(I){o.length=o.length-2*I,d.length=d.length-I,t.length=t.length-I}f(Ge,"popStack");function Ue(){var I;return I=s.pop()||_.lex()||Pe,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=l.symbols_[I]||I),I}f(Ue,"lex");for(var b,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((b===null||typeof b>"u")&&(b=Ue()),N=de[z]&&de[z][b]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");_.showPosition?Te="Parse error on line "+(ge+1)+`:
|
|
1
|
+
import{g as ze}from"./chunk-XXDRQBXY-BKsc_0wh.js";import{s as Xe}from"./chunk-KBJHAD2P-BDhjm9-8.js";import{_ as f,y as Be,b as Je,a as Ze,s as et,g as tt,m as st,n as it,c as Ne,l as qe,o as rt,q as nt,t as at,u as lt,v as ct}from"./mermaid.core-C2tL9tq7.js";import"./transform-BUB79_za.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";var Ce=(function(){var e=f(function($,i,l,o){for(l=l||{},o=$.length;o--;l[$[o]]=i);return l},"o"),n=[1,3],u=[1,4],h=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],m=[1,22],p=[2,7],y=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],R=[1,39],g=[1,40],E=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:f(function(i,l,o,s,d,t,de){var c=t.length-1;switch(d){case 4:this.$=t[c].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[c].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[c-3],t[c-4]);break;case 22:s.addRequirement(t[c-5],t[c-6]),s.setClass([t[c-5]],t[c-3]);break;case 23:s.setNewReqId(t[c-2]);break;case 24:s.setNewReqText(t[c-2]);break;case 25:s.setNewReqRisk(t[c-2]);break;case 26:s.setNewReqVerifyMethod(t[c-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[c-3]);break;case 43:s.addElement(t[c-5]),s.setClass([t[c-5]],t[c-3]);break;case 44:s.setNewElementType(t[c-2]);break;case 45:s.setNewElementDocRef(t[c-2]);break;case 48:s.addRelationship(t[c-2],t[c],t[c-4]);break;case 49:s.addRelationship(t[c-2],t[c-4],t[c]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[c-2],s.defineClass(t[c-1],t[c]);break;case 58:s.setClass(t[c-1],t[c]);break;case 59:s.setClass([t[c-2]],t[c]);break;case 60:case 62:this.$=[t[c]];break;case 61:case 63:this.$=t[c-2].concat([t[c]]);break;case 64:this.$=t[c-2],s.setCssStyle(t[c-1],t[c]);break;case 65:this.$=[t[c]];break;case 66:t[c-2].push(t[c]),this.$=t[c-2];break;case 68:this.$=t[c-1]+t[c];break}},"anonymous"),table:[{3:1,4:2,6:n,9:u,11:h,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:u,11:h,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:n,9:u,11:h,13:r},{1:[2,2]},{4:17,5:m,7:13,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:m,7:42,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:43,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:44,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:45,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:46,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:47,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:48,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:49,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{4:17,5:m,7:50,8:p,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:y,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(E,[2,17]),e(E,[2,18]),e(E,[2,19]),e(E,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ve,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(E,[2,59],{76:U}),e(E,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(E,[2,57],{76:Me}),e(E,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(E,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(E,[2,28]),{5:[1,127]},e(E,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(E,[2,47]),{5:[1,131]},e(E,[2,48]),e(E,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(E,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(E,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(E,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(E,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(E,[2,23]),e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,44]),e(E,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:f(function(i,l){if(l.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=l,o}},"parseError"),parse:f(function(i){var l=this,o=[0],s=[],d=[null],t=[],de=this.table,c="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),_=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);_.setInput(i,G.yy),G.yy.lexer=_,G.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Ie=_.yylloc;t.push(Ie);var je=_.options&&_.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(I){o.length=o.length-2*I,d.length=d.length-I,t.length=t.length-I}f(Ge,"popStack");function Ue(){var I;return I=s.pop()||_.lex()||Pe,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=l.symbols_[I]||I),I}f(Ue,"lex");for(var b,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((b===null||typeof b>"u")&&(b=Ue()),N=de[z]&&de[z][b]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");_.showPosition?Te="Parse error on line "+(ge+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+_e.join(", ")+", got '"+(this.terminals_[b]||b)+"'":Te="Parse error on line "+(ge+1)+": Unexpected "+(b==Pe?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(Te,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Ie,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+b);switch(N[0]){case 1:o.push(b),d.push(_.yytext),t.push(_.yylloc),o.push(N[1]),b=null,$e=_.yyleng,c=_.yytext,ge=_.yylineno,Ie=_.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=d[d.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),ke=this.performAction.apply(J,[c,$e,ge,G.yy,N[1],d,t].concat(We)),typeof ke<"u")return ke;F&&(o=o.slice(0,-1*F*2),d=d.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),d.push(J.$),t.push(J._$),Ye=de[o[o.length-2]][o[o.length-1]],o.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:f(function(l,o){if(this.yy.parser)this.yy.parser.parseError(l,o);else throw new Error(l)},"parseError"),setInput:f(function(i,l){return this.yy=l||this.yy||{},this._input=i,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:f(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var l=i.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:f(function(i){var l=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var s=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),o.length-1&&(this.yylineno-=o.length-1);var d=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:o?(o.length===s.length?this.yylloc.first_column:0)+s[s.length-o.length].length-o[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(i){this.unput(this.match.slice(i))},"less"),pastInput:f(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var i=this.pastInput(),l=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Note-
|
|
2
|
-
import{_ as r}from"./preload-helper-BXl3LOEh.js";import{A as n,N as a,G as _}from"./url-BvjSC8PU.js";const l=new Set(Object.values(n).filter(t=>t!==a).map(t=>t.split("/")[1]).filter(t=>!!t)),s=t=>{const o=t.split("/").filter(Boolean);if(o.length!==1)return null;const[e]=o;return`/${e}`===_?"graph":!e||l.has(e)?null:"note"},i=s(window.location.pathname);i==="note"?r(()=>import("./Note-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Note-Dq2Szaxd.js","assets/floating-ui.react-dom-BWTnA00G.js","assets/time-DI902Sxa.js","assets/url-BvjSC8PU.js","assets/useNoteMutate-xEIypxi5.js","assets/Callout-C1QiCWCa.js","assets/NotePropertiesPanel-Cu3RgDic.js","assets/AuxiliaryPanelHeader-zoJGsYWR.js","assets/Plus.es-P9Fjwtud.js","assets/SurfaceCard-D_OU_Oy6.js","assets/useReminderMutate-kTBRSjYc.js","assets/note-ui-CYsZc3DI.js","assets/note-core-DUTqUh5N.js","assets/note-runtime-zN5ddTba.js","assets/preload-helper-BXl3LOEh.js","assets/note-ui-DL8owV-U.css","assets/image.api-CtfyPwkV.js","assets/FlowArrow.es-CAIThqWk.js","assets/Copy.es-D6rl6b78.js","assets/tag.api-BJ6eaHui.js","assets/File.es-CcjtzE38.js","assets/Graph-BHsmPDPh.js","assets/transform-BUB79_za.js","assets/isObject-U9U2HXiq.js","assets/toNumber-DE3J3kMD.js","assets/ordinal-Cboi1Yqb.js","assets/init-Gi6I4Gst.js","assets/colors-Cc3OSVma.js","assets/min-tv6RD-6E.js","assets/ViewChip-D-Ax5PdL.js","assets/sortable.esm-DgSW3bAA.js","assets/ArrowRight.es-CD1IMhU2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as r}from"./preload-helper-BXl3LOEh.js";import{A as n,N as a,G as _}from"./url-BvjSC8PU.js";const l=new Set(Object.values(n).filter(t=>t!==a).map(t=>t.split("/")[1]).filter(t=>!!t)),s=t=>{const o=t.split("/").filter(Boolean);if(o.length!==1)return null;const[e]=o;return`/${e}`===_?"graph":!e||l.has(e)?null:"note"},i=s(window.location.pathname);i==="note"?r(()=>import("./Note-Dq2Szaxd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])).catch(()=>{}):i==="graph"&&r(()=>import("./Graph-BHsmPDPh.js"),__vite__mapDeps([21,1,2,3,22,23,24,25,26,27,28,29,30,17,31])).catch(()=>{});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as xt,n as _t,s as vt,g as bt,b as St,a as wt,_ as y,c as lt,b7 as Lt,ac as Et,o as At,j as Tt}from"./mermaid.core-B528P54n.js";import{s as X}from"./transform-BUB79_za.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import{c as Nt}from"./colors-Cc3OSVma.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";import"./init-Gi6I4Gst.js";const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,i){return i-1-t.height}function mt(t,i){return t.sourceLinks.length?t.depth:i-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,i){return Q(t.source,i.source)||t.index-i.index}function ht(t,i){return Q(t.target,i.target)||t.index-i.index}function Q(t,i){return t.y0-i.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function yt({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Bt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,m=jt,o=mt,a,h,k=Dt,_=zt,d=6;function v(){const n={nodes:k.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(m=typeof n=="function"?n:q(n),v):m},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:q(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(k=typeof n=="function"?n:q(n),v):k},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:q(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[m(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ft(c,p)),typeof b!="object"&&(b=r.target=ft(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=ct(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function j(n){const f=pt(n,c=>(l-i-(c.length-1)*g)/nt(c,it));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);R(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let H=et*(b.layer-Y.layer);L+=P(Y,b)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}a===void 0&&p.sort(Q),D(p,c)}}function R(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}a===void 0&&p.sort(Q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),V(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),V(n,i,0,f)}function V(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function z({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of n)c.sort(ut)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ht),c.sort(ut)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,m=s-t,o=l-i,a=x-t,h=g-i,k=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(k>F)if(!(Math.abs(h*m-o*a)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=m*m+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(k),I=u*Math.tan((rt-Math.acos((v+k-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+j*m)+","+(this._y1=i+j*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),m=s*Math.sin(l),o=t+g,a=i+m,h=1^x,k=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>F||Math.abs(this._y1-a)>F)&&(this._+="L"+o+","+a),s&&(k<0&&(k=k%st+st),k>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):k>F&&(this._+="A"+s+","+s+",0,"+ +(k>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var i=Gt,s=Ut,l=Rt,u=Vt,x=null;function g(){var m,o=Wt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=m=kt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return x=null,m+""||null}return g.source=function(m){return arguments.length?(i=m,g):i},g.target=function(m){return arguments.length?(s=m,g):s},g.x=function(m){return arguments.length?(l=typeof m=="function"?m:dt(+m),g):l},g.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),g):u},g.context=function(m){return arguments.length?(x=m??null,g):x},g}function Ht(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=(function(){var t=y(function(m,o,a,h){for(a=a||{},h=m.length;h--;a[m[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,k,_,d,v){var T=d.length-1;switch(_){case 7:const A=k.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=k.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());k.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],k=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function z(){var L;return L=k.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(k=L,L=k.pop()),L=a.symbols_[L]||L),L}y(z,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
|
|
1
|
+
import{m as xt,n as _t,s as vt,g as bt,b as St,a as wt,_ as y,c as lt,b7 as Lt,ac as Et,o as At,j as Tt}from"./mermaid.core-C2tL9tq7.js";import{s as X}from"./transform-BUB79_za.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import{c as Nt}from"./colors-Cc3OSVma.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";import"./init-Gi6I4Gst.js";const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,i){return i-1-t.height}function mt(t,i){return t.sourceLinks.length?t.depth:i-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,i){return Q(t.source,i.source)||t.index-i.index}function ht(t,i){return Q(t.target,i.target)||t.index-i.index}function Q(t,i){return t.y0-i.y0}function it(t){return t.value}function jt(t){return t.index}function Dt(t){return t.nodes}function zt(t){return t.links}function ft(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function yt({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function Bt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,m=jt,o=mt,a,h,k=Dt,_=zt,d=6;function v(){const n={nodes:k.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(m=typeof n=="function"?n:q(n),v):m},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:q(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(k=typeof n=="function"?n:q(n),v):k},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:q(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[m(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ft(c,p)),typeof b!="object"&&(b=r.target=ft(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=ct(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function j(n){const f=pt(n,c=>(l-i-(c.length-1)*g)/nt(c,it));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(ct(f,c=>c.length)-1)),j(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);R(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let H=et*(b.layer-Y.layer);L+=P(Y,b)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}a===void 0&&p.sort(Q),D(p,c)}}function R(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}a===void 0&&p.sort(Q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),V(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),V(n,i,0,f)}function V(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function z({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of n)c.sort(ut)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ht),c.sort(ut)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,m=s-t,o=l-i,a=x-t,h=g-i,k=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(k>F)if(!(Math.abs(h*m-o*a)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=m*m+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(k),I=u*Math.tan((rt-Math.acos((v+k-T)/(2*A*M)))/2),N=I/M,j=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+j*m)+","+(this._y1=i+j*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),m=s*Math.sin(l),o=t+g,a=i+m,h=1^x,k=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>F||Math.abs(this._y1-a)>F)&&(this._+="L"+o+","+a),s&&(k<0&&(k=k%st+st),k>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):k>F&&(this._+="A"+s+","+s+",0,"+ +(k>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var i=Gt,s=Ut,l=Rt,u=Vt,x=null;function g(){var m,o=Wt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=m=kt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return x=null,m+""||null}return g.source=function(m){return arguments.length?(i=m,g):i},g.target=function(m){return arguments.length?(s=m,g):s},g.x=function(m){return arguments.length?(l=typeof m=="function"?m:dt(+m),g):l},g.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),g):u},g.context=function(m){return arguments.length?(x=m??null,g):x},g}function Ht(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=(function(){var t=y(function(m,o,a,h){for(a=a||{},h=m.length;h--;a[m[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,k,_,d,v){var T=d.length-1;switch(_){case 7:const A=k.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=k.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());k.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],k=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,j=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function z(){var L;return L=k.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(k=L,L=k.pop()),L=a.symbols_[L]||L),L}y(z,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
3
|
Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},V&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat(j)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var m={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||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:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(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:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===k.length?this.yylloc.first_column:0)+k[k.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(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:y(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:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e}from"./floating-ui.react-dom-BWTnA00G.js";import{a as ve,b as E}from"./useNoteMutate-VJYw0Vt_.js";import{C as je,u as Ne,P as we,T as n,L as A,I as R,B as N,y as Ce,z as ke,s as ee,d as Ae,S as Se,H as Ie,q as Ee,e as Me,f as Pe}from"./time-DZKkPFUi.js";import{f as Le,s as Fe,a as qe,t as Ke,b as Be}from"./search-admin-adapter-BLMYNm9w.js";import{f as Ue}from"./app-DbQdHfMb.js";import{s as T}from"./CheckCircle.es-BTloiuti.js";import"./url-BvjSC8PU.js";import"./preload-helper-BXl3LOEh.js";import"./sortable.esm-DgSW3bAA.js";const Re=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),ae=r.forwardRef((t,i)=>r.createElement(je,{ref:i,...t,weights:Re}));ae.displayName="ArrowClockwiseIcon";const Te=ae,He={enabled:!1,baseUrl:"",model:"",queryInstruction:""},De={disabled:"Meaning search off","needs-connection":"Connection test needed","needs-index":"Index needed",indexing:"Building index",ready:"Meaning search ready",error:"Index error"},$e=(t,i)=>t.enabled===i.enabled&&t.baseUrl===i.baseUrl&&t.model===i.model&&t.queryInstruction===i.queryInstruction,w=t=>{const i=t.trim();let o=i.length;for(;o>0&&i.charCodeAt(o-1)===47;)o-=1;return o===i.length?i:i.slice(0,o)},Ve=t=>/(^|[-_/])(embed|embedding|bge|e5|gte)([-_/.]|$)/i.test(t),ze=t=>{try{const i=new URL(t),o=i.hostname.toLowerCase(),d=o==="localhost"||o==="::1"||o==="[::1]"||o.startsWith("127.");return i.protocol==="http:"&&!d}catch{return!1}},Qe=({hasConnectionFields:t,enabled:i,savedConnectionValidated:o,dirty:d,phase:g,available:m})=>t?i?d?"Save this setting. You can test the model before or after saving.":g==="needs-connection"?"Test the selected model to make meaning search available.":m?"Meaning search is active.":"Build the local index to activate meaning search.":o?"Your saved connection is ready to turn on again.":"You can save this provider now and test it when you are ready.":"Connect an API and choose a model first.",C=(t,i)=>Pe.isAxiosError(t)?t.response?.data?.message??t.message??i:t instanceof Error?t.message:i,Ze=t=>{if(!t)return"Not built yet";const i=new Date(t);return Number.isNaN(i.getTime())?t:i.toLocaleString()},na=()=>{const t=Me(),i=Ne(),o=Ee.search.adminStatus(),[d,g]=r.useState(He),[m,se]=r.useState(!1),[y,H]=r.useState([]),[ne,D]=r.useState(""),[te,$]=r.useState(""),[M,P]=r.useState(""),[f,L]=r.useState(!1),[re,V]=r.useState(0),F=a=>{const l=M.trim();return l?{...a,apiKey:l}:f?{...a,apiKey:null}:a},{data:s,error:z,isLoading:ie}=ve({queryKey:o,queryFn:Le,refetchInterval:a=>a.state.data?.phase==="indexing"||(a.state.data?.pendingNoteCount??0)>0?1e3:!1});r.useEffect(()=>{s&&!m&&(g(s.config),se(!0))},[m,s]);const Q=E({mutationFn:Fe,onSuccess:a=>{i.setQueryData(o,a),g(a.config),P(""),L(!1),t("Search settings saved.")},onError:a=>{t(C(a,"Failed to save search settings."))}}),p=E({mutationFn:qe,onSuccess:({models:a},l)=>{const h=w(l.baseUrl);H(a),D(h),g(j=>{if(w(j.baseUrl)!==h||a.some(U=>U.id===j.model))return j;const J=a.filter(U=>U.likelyEmbedding),X=J.length===1?J[0]:a.length===1?a[0]:null;return X?{...j,model:X.id}:j})}}),u=E({mutationFn:({input:a})=>Ke(a),onSuccess:async({dimensions:a,model:l},{connectionKey:h})=>{$(h),t(`Connected to ${l} (${a} dimensions).`),await i.invalidateQueries({queryKey:o})},onError:a=>{t(C(a,"Could not connect to the embedding API."))}}),Z=E({mutationFn:Be,onSuccess:({started:a,status:l})=>{i.setQueryData(o,l),t(a?"Search index build started.":l.needsReindex?"Search index is already updating.":"Search index is already up to date.")},onError:a=>{t(C(a,"Could not start the search index build."))}}),b=w(d.baseUrl),O=`${b}::${d.model.trim()}::${re}`,Y=!!(M.trim()||f),S=!!(s&&(!$e(d,s.config)||Y)),c=s?.phase==="indexing",x=p.isPending||u.isPending,k=!!(b&&d.model.trim()),_=!!y.length&&ne===b,de=k&&te===O,le=!!(!!(k&&s&&w(s.config.baseUrl)===b&&s.config.model.trim()===d.model.trim())&&s?.connectionValidated&&!Y),q=k,oe=!!(m&&S&&!c&&!x&&(!d.enabled||q)),ce=!!(s?.config.enabled&&s.needsReindex&&!S&&!c),me=ze(b),v=s?.progress,he=s?De[s.phase]:ie?"Loading":"Unavailable",ue=d.queryInstruction.trim()?"Customized":"Optional",xe=Qe({hasConnectionFields:k,enabled:d.enabled,savedConnectionValidated:le,dirty:S,phase:s?.phase,available:s?.available}),W=r.useMemo(()=>{const a=[...y],l=d.model.trim();return l&&!a.some(h=>h.id===l)&&a.unshift({id:l,likelyEmbedding:Ve(l)}),a},[y,d.model]),I=(a,l)=>{g(h=>({...h,[a]:l}))},K=()=>{$(""),u.reset()},B=()=>{H([]),D(""),K(),p.reset()},ge=a=>{const l=b!==w(a);g(h=>({...h,baseUrl:a,model:l?"":h.model})),l&&B()},pe=a=>{P(a),L(!1),V(l=>l+1),B()},be=()=>{P(""),L(a=>!a),V(a=>a+1),B()},ye=()=>{const a=w(d.baseUrl);g(l=>({...l,baseUrl:a})),K(),p.mutate(F({baseUrl:a}))},G=a=>{I("model",a),K()},fe=a=>{(!a||q)&&I("enabled",a)};return e.jsx(we,{title:"Search",variant:"default",description:"Keyword search is always available. Add an embedding API only when you want meaning-based recall.",headerRight:e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:s?.phase==="error"?"error":"secondary",className:"rounded-full border border-border-subtle bg-muted px-3 py-1.5",children:he}),children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"embedding-api-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"1"}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{id:"embedding-api-heading",as:"h2",variant:"label",weight:"medium",children:"Connect an embedding API"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Enter an OpenAI-compatible API URL and an API key when the provider requires one."})]})]}),e.jsxs("div",{className:"ml-0 space-y-2 sm:ml-10",children:[e.jsx(A,{htmlFor:"semantic-search-base-url",className:"font-medium text-fg-tertiary",children:"API base URL"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(R,{id:"semantic-search-base-url",inputMode:"url",placeholder:"http://127.0.0.1:1234/v1",value:d.baseUrl,disabled:!m||c||x,onChange:a=>ge(a.target.value),className:"w-full min-w-0 sm:flex-1"}),e.jsxs(N,{type:"button",variant:"subtle",onClick:ye,isLoading:p.isPending,disabled:!b||c||u.isPending,className:"w-full sm:w-auto",children:[e.jsx(Ue,{className:"h-4 w-4"}),"Find models"]})]}),me&&e.jsx("div",{className:"rounded-[12px] border border-border-secondary/70 bg-muted px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"This provider uses unencrypted HTTP. API credentials and note text can be read on the network."})}),e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsxs(A,{htmlFor:"semantic-search-api-key",className:"font-medium text-fg-tertiary",children:["API key ",e.jsx("span",{className:"font-normal text-fg-tertiary",children:"(optional)"})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(R,{id:"semantic-search-api-key",type:"password",autoComplete:"new-password",placeholder:f?"No API key":s?.apiKeyConfigured?"Saved API key":"Enter API key",value:M,disabled:!m||c||x||f,onChange:a=>pe(a.target.value),className:"w-full min-w-0 sm:flex-1"}),s?.apiKeyConfigured&&e.jsx(N,{type:"button",variant:"subtle",onClick:be,disabled:c||x,className:"w-full sm:w-auto",children:f?"Keep saved key":"Remove saved key"})]}),f&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"The saved key will be removed when you save."})]}),_&&e.jsxs("div",{className:"flex items-start gap-2 rounded-[12px] border border-border-subtle bg-accent-soft-success px-3 py-2.5",role:"status",children:[e.jsx(T,{className:"mt-0.5 h-4 w-4 shrink-0 text-accent-success"}),e.jsxs(n,{as:"p",variant:"meta",className:"leading-relaxed text-accent-success",children:["API connected. Found ",y.length," ",y.length===1?"model":"models","."]})]}),p.isError&&e.jsx("div",{className:"rounded-[12px] border border-border-error bg-accent-soft-danger/40 px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:C(p.error,"Could not list models from this API.")})})]})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"embedding-model-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"2"}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{id:"embedding-model-heading",as:"h2",variant:"label",weight:"medium",children:"Choose and test a model"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Choose an embedding model and verify the connection."})]})]}),e.jsxs("div",{className:"ml-0 space-y-3 sm:ml-10",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{htmlFor:"semantic-search-model",className:"font-medium text-fg-tertiary",children:"Embedding model"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(Ce,{id:"semantic-search-model",ariaLabel:"Embedding model",value:d.model,placeholder:p.isPending?"Loading models…":"Find models first",disabled:!W.length||!m||c||x,onValueChange:G,className:"w-full min-w-0 sm:flex-1",children:W.map(a=>e.jsxs(ke,{value:a.id,children:[a.id,a.likelyEmbedding?" · Embedding":""]},a.id))}),e.jsxs(N,{type:"button",variant:"subtle",onClick:()=>u.mutate({input:F(d),connectionKey:O}),isLoading:u.isPending,disabled:!k||c||p.isPending,className:"w-full sm:w-auto",children:[e.jsx(T,{className:"h-4 w-4"}),"Test selected model"]})]}),_&&y.every(a=>!a.likelyEmbedding)&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"None of these model names clearly identifies an embedding model. Choose one only if your provider documents it as an embedding model, then run the test."})]}),de&&u.data&&e.jsxs("div",{className:"flex items-start gap-2 rounded-[12px] border border-border-subtle bg-accent-soft-success px-3 py-2.5",role:"status",children:[e.jsx(T,{className:"mt-0.5 h-4 w-4 shrink-0 text-accent-success"}),e.jsxs(n,{as:"p",variant:"meta",className:"leading-relaxed text-accent-success",children:["This model works · ",u.data.dimensions," dimensions"]})]}),u.isError&&e.jsx("div",{className:"rounded-[12px] border border-border-error bg-accent-soft-danger/40 px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:C(u.error,"Could not connect to the embedding API.")})}),e.jsxs("details",{className:"group rounded-[12px] border border-border-subtle bg-muted",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 marker:hidden",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Can't find the model? Enter its ID manually"}),e.jsx(ee,{className:"h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-open:rotate-180","aria-hidden":"true"})]}),e.jsxs("div",{className:"space-y-2 border-t border-border-subtle px-3 py-3",children:[e.jsx(A,{htmlFor:"semantic-search-manual-model",className:"font-medium text-fg-tertiary",children:"Model ID"}),e.jsx(R,{id:"semantic-search-manual-model",placeholder:"text-embedding-qwen3-embedding-0.6b",value:d.model,disabled:!m||c||x,onChange:a=>G(a.target.value)}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Use this fallback when a compatible API does not support model listing."})]})]}),e.jsxs("details",{className:"group rounded-[12px] border border-border-subtle bg-muted",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 marker:hidden",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Advanced query instruction"}),e.jsxs(n,{as:"span",variant:"meta",tone:"tertiary",children:[" · ",ue]})]}),e.jsx(ee,{className:"h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-open:rotate-180","aria-hidden":"true"})]}),e.jsxs("div",{className:"space-y-3 border-t border-border-subtle px-3 py-3",children:[e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Leave this blank unless your embedding model documentation explicitly recommends a query instruction. Ocean Brain does not assume a language or retrieval prompt."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{htmlFor:"semantic-search-instruction",className:"font-medium text-fg-tertiary",children:"Query instruction"}),e.jsx(Ae,{id:"semantic-search-instruction",rows:3,placeholder:"Leave blank unless your model recommends an instruction.",value:d.queryInstruction,disabled:!m||c||x,onChange:a=>I("queryInstruction",a.target.value)})]}),d.queryInstruction&&e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsx(N,{type:"button",size:"sm",variant:"ghost",disabled:c||x,onClick:()=>I("queryInstruction",""),children:"Clear"})}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"This is added only to the search query, never to note chunks. Changing it does not require rebuilding the index."})]})]})]})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"meaning-search-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"3"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx(n,{id:"meaning-search-heading",as:"h2",variant:"label",weight:"medium",children:"Turn on meaning search"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"max-w-[44rem] leading-relaxed",children:"This adds Meaning and All modes to the full search page. Keyword search remains the default fallback and keeps working even when this feature is off."})]})]}),e.jsx("div",{className:"ml-0 rounded-[14px] border border-border-subtle bg-muted px-3.5 py-3 sm:ml-10",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{as:"p",variant:"meta",weight:"medium",children:"Meaning search"}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:xe})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:d.enabled?"Enabled":"Disabled"}),e.jsx(Se,{"aria-label":"Meaning search",checked:d.enabled,disabled:!m||c||x||!d.enabled&&!q,onCheckedChange:fe})]})]})}),e.jsx("div",{className:"flex flex-wrap justify-end gap-2 border-t border-border-subtle pt-4",children:e.jsx(N,{type:"button",variant:"primary",onClick:()=>Q.mutate(F(d)),isLoading:Q.isPending,disabled:!oe,children:"Save settings"})})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"search-index-heading",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-[28rem] space-y-1",children:[e.jsx(n,{id:"search-index-heading",as:"h2",variant:"label",weight:"medium",children:"Local search index"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",children:s?.available?`${s.noteCount} notes · ${s.chunkCount} chunks · ${s.dimensions??0} dimensions`:"Keyword search works without this index."}),e.jsxs(n,{as:"p",variant:"meta",tone:"tertiary",children:["Last synced: ",Ze(s?.lastSyncedAt??s?.indexedAt??null)]}),(s?.pendingNoteCount??0)>0&&e.jsxs(n,{as:"p",variant:"meta",tone:"tertiary",role:"status",children:[s?.pendingNoteCount," ",s?.pendingNoteCount===1?"note is":"notes are"," waiting to sync. Recent edits are grouped before embedding."]})]}),e.jsxs(N,{type:"button",variant:"primary",onClick:()=>Z.mutate(),isLoading:Z.isPending,disabled:!ce,children:[e.jsx(Te,{className:"h-4 w-4"}),s?.available&&!s.needsReindex?"Index is up to date":"Build search index"]})]}),S&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Save these settings before building the index."}),c&&e.jsxs("div",{className:"space-y-2","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Building embeddings"}),e.jsx(n,{as:"span",variant:"meta",tone:"tertiary",children:v&&v.totalChunks>0?`${v.processedChunks} / ${v.totalChunks} chunks`:"Preparing notes…"})]}),e.jsx(Ie,{value:v?.processedChunks??0,max:Math.max(v?.totalChunks??0,1)})]}),s?.needsReindex&&!c&&s.phase!=="error"&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Build the index once to activate meaning search for this model."}),s?.error&&e.jsx("div",{className:"rounded-[14px] border border-border-error bg-accent-soft-danger/40 px-3.5 py-3",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:s.error})}),s?.syncError&&e.jsx("div",{className:"rounded-[14px] border border-border-error bg-accent-soft-danger/40 px-3.5 py-3",children:e.jsxs(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:["Automatic note sync will retry: ",s.syncError]})}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"Note and query text is sent to the embedding API you configure."}),z&&e.jsx(n,{as:"p",variant:"meta",tone:"error",children:C(z,"Could not load search settings.")})]})]})})};export{na as default};
|
|
1
|
+
import{r,j as e}from"./floating-ui.react-dom-BWTnA00G.js";import{a as ve,b as E}from"./useNoteMutate-xEIypxi5.js";import{C as je,u as Ne,P as we,T as n,L as A,I as R,B as N,y as Ce,z as ke,s as ee,d as Ae,S as Se,H as Ie,q as Ee,e as Me,f as Pe}from"./time-DI902Sxa.js";import{f as Le,s as Fe,a as qe,t as Ke,b as Be}from"./search-admin-adapter-Dj0KKKrJ.js";import{f as Ue}from"./app-CyQtGTtn.js";import{s as T}from"./CheckCircle.es-C7fkzE3t.js";import"./url-BvjSC8PU.js";import"./preload-helper-BXl3LOEh.js";import"./sortable.esm-DgSW3bAA.js";const Re=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),ae=r.forwardRef((t,i)=>r.createElement(je,{ref:i,...t,weights:Re}));ae.displayName="ArrowClockwiseIcon";const Te=ae,He={enabled:!1,baseUrl:"",model:"",queryInstruction:""},De={disabled:"Meaning search off","needs-connection":"Connection test needed","needs-index":"Index needed",indexing:"Building index",ready:"Meaning search ready",error:"Index error"},$e=(t,i)=>t.enabled===i.enabled&&t.baseUrl===i.baseUrl&&t.model===i.model&&t.queryInstruction===i.queryInstruction,w=t=>{const i=t.trim();let o=i.length;for(;o>0&&i.charCodeAt(o-1)===47;)o-=1;return o===i.length?i:i.slice(0,o)},Ve=t=>/(^|[-_/])(embed|embedding|bge|e5|gte)([-_/.]|$)/i.test(t),ze=t=>{try{const i=new URL(t),o=i.hostname.toLowerCase(),d=o==="localhost"||o==="::1"||o==="[::1]"||o.startsWith("127.");return i.protocol==="http:"&&!d}catch{return!1}},Qe=({hasConnectionFields:t,enabled:i,savedConnectionValidated:o,dirty:d,phase:g,available:m})=>t?i?d?"Save this setting. You can test the model before or after saving.":g==="needs-connection"?"Test the selected model to make meaning search available.":m?"Meaning search is active.":"Build the local index to activate meaning search.":o?"Your saved connection is ready to turn on again.":"You can save this provider now and test it when you are ready.":"Connect an API and choose a model first.",C=(t,i)=>Pe.isAxiosError(t)?t.response?.data?.message??t.message??i:t instanceof Error?t.message:i,Ze=t=>{if(!t)return"Not built yet";const i=new Date(t);return Number.isNaN(i.getTime())?t:i.toLocaleString()},na=()=>{const t=Me(),i=Ne(),o=Ee.search.adminStatus(),[d,g]=r.useState(He),[m,se]=r.useState(!1),[y,H]=r.useState([]),[ne,D]=r.useState(""),[te,$]=r.useState(""),[M,P]=r.useState(""),[f,L]=r.useState(!1),[re,V]=r.useState(0),F=a=>{const l=M.trim();return l?{...a,apiKey:l}:f?{...a,apiKey:null}:a},{data:s,error:z,isLoading:ie}=ve({queryKey:o,queryFn:Le,refetchInterval:a=>a.state.data?.phase==="indexing"||(a.state.data?.pendingNoteCount??0)>0?1e3:!1});r.useEffect(()=>{s&&!m&&(g(s.config),se(!0))},[m,s]);const Q=E({mutationFn:Fe,onSuccess:a=>{i.setQueryData(o,a),g(a.config),P(""),L(!1),t("Search settings saved.")},onError:a=>{t(C(a,"Failed to save search settings."))}}),p=E({mutationFn:qe,onSuccess:({models:a},l)=>{const h=w(l.baseUrl);H(a),D(h),g(j=>{if(w(j.baseUrl)!==h||a.some(U=>U.id===j.model))return j;const J=a.filter(U=>U.likelyEmbedding),X=J.length===1?J[0]:a.length===1?a[0]:null;return X?{...j,model:X.id}:j})}}),u=E({mutationFn:({input:a})=>Ke(a),onSuccess:async({dimensions:a,model:l},{connectionKey:h})=>{$(h),t(`Connected to ${l} (${a} dimensions).`),await i.invalidateQueries({queryKey:o})},onError:a=>{t(C(a,"Could not connect to the embedding API."))}}),Z=E({mutationFn:Be,onSuccess:({started:a,status:l})=>{i.setQueryData(o,l),t(a?"Search index build started.":l.needsReindex?"Search index is already updating.":"Search index is already up to date.")},onError:a=>{t(C(a,"Could not start the search index build."))}}),b=w(d.baseUrl),O=`${b}::${d.model.trim()}::${re}`,Y=!!(M.trim()||f),S=!!(s&&(!$e(d,s.config)||Y)),c=s?.phase==="indexing",x=p.isPending||u.isPending,k=!!(b&&d.model.trim()),_=!!y.length&&ne===b,de=k&&te===O,le=!!(!!(k&&s&&w(s.config.baseUrl)===b&&s.config.model.trim()===d.model.trim())&&s?.connectionValidated&&!Y),q=k,oe=!!(m&&S&&!c&&!x&&(!d.enabled||q)),ce=!!(s?.config.enabled&&s.needsReindex&&!S&&!c),me=ze(b),v=s?.progress,he=s?De[s.phase]:ie?"Loading":"Unavailable",ue=d.queryInstruction.trim()?"Customized":"Optional",xe=Qe({hasConnectionFields:k,enabled:d.enabled,savedConnectionValidated:le,dirty:S,phase:s?.phase,available:s?.available}),W=r.useMemo(()=>{const a=[...y],l=d.model.trim();return l&&!a.some(h=>h.id===l)&&a.unshift({id:l,likelyEmbedding:Ve(l)}),a},[y,d.model]),I=(a,l)=>{g(h=>({...h,[a]:l}))},K=()=>{$(""),u.reset()},B=()=>{H([]),D(""),K(),p.reset()},ge=a=>{const l=b!==w(a);g(h=>({...h,baseUrl:a,model:l?"":h.model})),l&&B()},pe=a=>{P(a),L(!1),V(l=>l+1),B()},be=()=>{P(""),L(a=>!a),V(a=>a+1),B()},ye=()=>{const a=w(d.baseUrl);g(l=>({...l,baseUrl:a})),K(),p.mutate(F({baseUrl:a}))},G=a=>{I("model",a),K()},fe=a=>{(!a||q)&&I("enabled",a)};return e.jsx(we,{title:"Search",variant:"default",description:"Keyword search is always available. Add an embedding API only when you want meaning-based recall.",headerRight:e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:s?.phase==="error"?"error":"secondary",className:"rounded-full border border-border-subtle bg-muted px-3 py-1.5",children:he}),children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"embedding-api-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"1"}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{id:"embedding-api-heading",as:"h2",variant:"label",weight:"medium",children:"Connect an embedding API"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Enter an OpenAI-compatible API URL and an API key when the provider requires one."})]})]}),e.jsxs("div",{className:"ml-0 space-y-2 sm:ml-10",children:[e.jsx(A,{htmlFor:"semantic-search-base-url",className:"font-medium text-fg-tertiary",children:"API base URL"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(R,{id:"semantic-search-base-url",inputMode:"url",placeholder:"http://127.0.0.1:1234/v1",value:d.baseUrl,disabled:!m||c||x,onChange:a=>ge(a.target.value),className:"w-full min-w-0 sm:flex-1"}),e.jsxs(N,{type:"button",variant:"subtle",onClick:ye,isLoading:p.isPending,disabled:!b||c||u.isPending,className:"w-full sm:w-auto",children:[e.jsx(Ue,{className:"h-4 w-4"}),"Find models"]})]}),me&&e.jsx("div",{className:"rounded-[12px] border border-border-secondary/70 bg-muted px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"This provider uses unencrypted HTTP. API credentials and note text can be read on the network."})}),e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsxs(A,{htmlFor:"semantic-search-api-key",className:"font-medium text-fg-tertiary",children:["API key ",e.jsx("span",{className:"font-normal text-fg-tertiary",children:"(optional)"})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(R,{id:"semantic-search-api-key",type:"password",autoComplete:"new-password",placeholder:f?"No API key":s?.apiKeyConfigured?"Saved API key":"Enter API key",value:M,disabled:!m||c||x||f,onChange:a=>pe(a.target.value),className:"w-full min-w-0 sm:flex-1"}),s?.apiKeyConfigured&&e.jsx(N,{type:"button",variant:"subtle",onClick:be,disabled:c||x,className:"w-full sm:w-auto",children:f?"Keep saved key":"Remove saved key"})]}),f&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"The saved key will be removed when you save."})]}),_&&e.jsxs("div",{className:"flex items-start gap-2 rounded-[12px] border border-border-subtle bg-accent-soft-success px-3 py-2.5",role:"status",children:[e.jsx(T,{className:"mt-0.5 h-4 w-4 shrink-0 text-accent-success"}),e.jsxs(n,{as:"p",variant:"meta",className:"leading-relaxed text-accent-success",children:["API connected. Found ",y.length," ",y.length===1?"model":"models","."]})]}),p.isError&&e.jsx("div",{className:"rounded-[12px] border border-border-error bg-accent-soft-danger/40 px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:C(p.error,"Could not list models from this API.")})})]})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"embedding-model-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"2"}),e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{id:"embedding-model-heading",as:"h2",variant:"label",weight:"medium",children:"Choose and test a model"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Choose an embedding model and verify the connection."})]})]}),e.jsxs("div",{className:"ml-0 space-y-3 sm:ml-10",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{htmlFor:"semantic-search-model",className:"font-medium text-fg-tertiary",children:"Embedding model"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(Ce,{id:"semantic-search-model",ariaLabel:"Embedding model",value:d.model,placeholder:p.isPending?"Loading models…":"Find models first",disabled:!W.length||!m||c||x,onValueChange:G,className:"w-full min-w-0 sm:flex-1",children:W.map(a=>e.jsxs(ke,{value:a.id,children:[a.id,a.likelyEmbedding?" · Embedding":""]},a.id))}),e.jsxs(N,{type:"button",variant:"subtle",onClick:()=>u.mutate({input:F(d),connectionKey:O}),isLoading:u.isPending,disabled:!k||c||p.isPending,className:"w-full sm:w-auto",children:[e.jsx(T,{className:"h-4 w-4"}),"Test selected model"]})]}),_&&y.every(a=>!a.likelyEmbedding)&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"None of these model names clearly identifies an embedding model. Choose one only if your provider documents it as an embedding model, then run the test."})]}),de&&u.data&&e.jsxs("div",{className:"flex items-start gap-2 rounded-[12px] border border-border-subtle bg-accent-soft-success px-3 py-2.5",role:"status",children:[e.jsx(T,{className:"mt-0.5 h-4 w-4 shrink-0 text-accent-success"}),e.jsxs(n,{as:"p",variant:"meta",className:"leading-relaxed text-accent-success",children:["This model works · ",u.data.dimensions," dimensions"]})]}),u.isError&&e.jsx("div",{className:"rounded-[12px] border border-border-error bg-accent-soft-danger/40 px-3 py-2.5",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:C(u.error,"Could not connect to the embedding API.")})}),e.jsxs("details",{className:"group rounded-[12px] border border-border-subtle bg-muted",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 marker:hidden",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Can't find the model? Enter its ID manually"}),e.jsx(ee,{className:"h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-open:rotate-180","aria-hidden":"true"})]}),e.jsxs("div",{className:"space-y-2 border-t border-border-subtle px-3 py-3",children:[e.jsx(A,{htmlFor:"semantic-search-manual-model",className:"font-medium text-fg-tertiary",children:"Model ID"}),e.jsx(R,{id:"semantic-search-manual-model",placeholder:"text-embedding-qwen3-embedding-0.6b",value:d.model,disabled:!m||c||x,onChange:a=>G(a.target.value)}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Use this fallback when a compatible API does not support model listing."})]})]}),e.jsxs("details",{className:"group rounded-[12px] border border-border-subtle bg-muted",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 marker:hidden",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Advanced query instruction"}),e.jsxs(n,{as:"span",variant:"meta",tone:"tertiary",children:[" · ",ue]})]}),e.jsx(ee,{className:"h-4 w-4 shrink-0 text-fg-tertiary transition-transform group-open:rotate-180","aria-hidden":"true"})]}),e.jsxs("div",{className:"space-y-3 border-t border-border-subtle px-3 py-3",children:[e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"leading-relaxed",children:"Leave this blank unless your embedding model documentation explicitly recommends a query instruction. Ocean Brain does not assume a language or retrieval prompt."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{htmlFor:"semantic-search-instruction",className:"font-medium text-fg-tertiary",children:"Query instruction"}),e.jsx(Ae,{id:"semantic-search-instruction",rows:3,placeholder:"Leave blank unless your model recommends an instruction.",value:d.queryInstruction,disabled:!m||c||x,onChange:a=>I("queryInstruction",a.target.value)})]}),d.queryInstruction&&e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsx(N,{type:"button",size:"sm",variant:"ghost",disabled:c||x,onClick:()=>I("queryInstruction",""),children:"Clear"})}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"This is added only to the search query, never to note chunks. Changing it does not require rebuilding the index."})]})]})]})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"meaning-search-heading",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold text-fg-secondary",children:"3"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[e.jsx(n,{id:"meaning-search-heading",as:"h2",variant:"label",weight:"medium",children:"Turn on meaning search"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",className:"max-w-[44rem] leading-relaxed",children:"This adds Meaning and All modes to the full search page. Keyword search remains the default fallback and keeps working even when this feature is off."})]})]}),e.jsx("div",{className:"ml-0 rounded-[14px] border border-border-subtle bg-muted px-3.5 py-3 sm:ml-10",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(n,{as:"p",variant:"meta",weight:"medium",children:"Meaning search"}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:xe})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:d.enabled?"Enabled":"Disabled"}),e.jsx(Se,{"aria-label":"Meaning search",checked:d.enabled,disabled:!m||c||x||!d.enabled&&!q,onCheckedChange:fe})]})]})}),e.jsx("div",{className:"flex flex-wrap justify-end gap-2 border-t border-border-subtle pt-4",children:e.jsx(N,{type:"button",variant:"primary",onClick:()=>Q.mutate(F(d)),isLoading:Q.isPending,disabled:!oe,children:"Save settings"})})]}),e.jsxs("section",{className:"surface-base flex flex-col gap-4 p-4","aria-labelledby":"search-index-heading",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-[28rem] space-y-1",children:[e.jsx(n,{id:"search-index-heading",as:"h2",variant:"label",weight:"medium",children:"Local search index"}),e.jsx(n,{as:"p",variant:"meta",tone:"secondary",children:s?.available?`${s.noteCount} notes · ${s.chunkCount} chunks · ${s.dimensions??0} dimensions`:"Keyword search works without this index."}),e.jsxs(n,{as:"p",variant:"meta",tone:"tertiary",children:["Last synced: ",Ze(s?.lastSyncedAt??s?.indexedAt??null)]}),(s?.pendingNoteCount??0)>0&&e.jsxs(n,{as:"p",variant:"meta",tone:"tertiary",role:"status",children:[s?.pendingNoteCount," ",s?.pendingNoteCount===1?"note is":"notes are"," waiting to sync. Recent edits are grouped before embedding."]})]}),e.jsxs(N,{type:"button",variant:"primary",onClick:()=>Z.mutate(),isLoading:Z.isPending,disabled:!ce,children:[e.jsx(Te,{className:"h-4 w-4"}),s?.available&&!s.needsReindex?"Index is up to date":"Build search index"]})]}),S&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Save these settings before building the index."}),c&&e.jsxs("div",{className:"space-y-2","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(n,{as:"span",variant:"meta",weight:"medium",tone:"secondary",children:"Building embeddings"}),e.jsx(n,{as:"span",variant:"meta",tone:"tertiary",children:v&&v.totalChunks>0?`${v.processedChunks} / ${v.totalChunks} chunks`:"Preparing notes…"})]}),e.jsx(Ie,{value:v?.processedChunks??0,max:Math.max(v?.totalChunks??0,1)})]}),s?.needsReindex&&!c&&s.phase!=="error"&&e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",children:"Build the index once to activate meaning search for this model."}),s?.error&&e.jsx("div",{className:"rounded-[14px] border border-border-error bg-accent-soft-danger/40 px-3.5 py-3",children:e.jsx(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:s.error})}),s?.syncError&&e.jsx("div",{className:"rounded-[14px] border border-border-error bg-accent-soft-danger/40 px-3.5 py-3",children:e.jsxs(n,{as:"p",variant:"meta",tone:"error",className:"leading-relaxed",children:["Automatic note sync will retry: ",s.syncError]})}),e.jsx(n,{as:"p",variant:"meta",tone:"tertiary",className:"leading-relaxed",children:"Note and query text is sent to the embedding API you configure."}),z&&e.jsx(n,{as:"p",variant:"meta",tone:"error",children:C(z,"Could not load search settings.")})]})]})})};export{na as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as s}from"./time-
|
|
1
|
+
import{f as s}from"./time-DI902Sxa.js";const c=async()=>{const{data:a}=await s.get("/api/search-admin/status");return a},e=async a=>{const{data:t}=await s.post("/api/search-admin/config",a);return t},i=async a=>{const{data:t}=await s.post("/api/search-admin/models",a);return t},r=async a=>{const{data:t}=await s.post("/api/search-admin/test",a);return t},o=async()=>{const{data:a}=await s.post("/api/search-admin/reindex");return a};export{i as a,o as b,c as f,e as s,r as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as er}from"./chunk-2Q5K7J3B-P0v1gRui.js";import{_ as x,W as rr,c as $,l as at,i as Me,d as ar,e as sr,j as N,b as De,s as ir,m as nr,a as or,g as cr,n as lr,X as hr,Y as dr,o as Tr,h as Yt,v as Z,Z as Q,$ as kt,a0 as Be,a1 as pr,y as Ft,a2 as Er,a3 as Ve}from"./mermaid.core-B528P54n.js";import{a as ur,b as se,g as dt,d as fr,c as ie,e as ne}from"./chunk-32BRIVSS-102-EyWU.js";import{s as Wt}from"./transform-BUB79_za.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";var ee=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],c=[1,12],E=[1,14],h=[1,15],p=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],q=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],St=[1,74],Dt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],me=[2,78],wt=[4,5,17,51,53,54],vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Xt=[5,52],F=[70,71,72,73],ot=[1,151],Jt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,o,Nt){var d=o.length-1;switch(z){case 3:return y.apply(o[d]),o[d];case 4:case 10:this.$=[];break;case 5:case 11:o[d-1].push(o[d]),this.$=o[d-1];break;case 6:case 7:case 12:case 13:this.$=o[d];break;case 8:case 9:case 14:this.$=[];break;case 16:o[d].type="createParticipant",this.$=o[d];break;case 17:o[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(o[d-2])}),o[d-1].push({type:"boxEnd",boxText:o[d-2]}),this.$=o[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[d-2]),sequenceIndexStep:Number(o[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[d-1].actor};break;case 30:y.setDiagramTitle(o[d].substring(6)),this.$=o[d].substring(6);break;case 31:y.setDiagramTitle(o[d].substring(7)),this.$=o[d].substring(7);break;case 32:this.$=o[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=o[d].trim(),y.setAccDescription(this.$);break;case 35:o[d-1].unshift({type:"loopStart",loopText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.LOOP_START}),o[d-1].push({type:"loopEnd",loopText:o[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=o[d-1];break;case 36:o[d-1].unshift({type:"rectStart",color:y.parseMessage(o[d-2]),signalType:y.LINETYPE.RECT_START}),o[d-1].push({type:"rectEnd",color:y.parseMessage(o[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=o[d-1];break;case 37:o[d-1].unshift({type:"optStart",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.OPT_START}),o[d-1].push({type:"optEnd",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=o[d-1];break;case 38:o[d-1].unshift({type:"altStart",altText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.ALT_START}),o[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=o[d-1];break;case 39:o[d-1].unshift({type:"parStart",parText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.PAR_START}),o[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[d-1];break;case 40:o[d-1].unshift({type:"parStart",parText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),o[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[d-1];break;case 41:o[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.CRITICAL_START}),o[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=o[d-1];break;case 42:o[d-1].unshift({type:"breakStart",breakText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.BREAK_START}),o[d-1].push({type:"breakEnd",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=o[d-1];break;case 44:this.$=o[d-3].concat([{type:"option",optionText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},o[d]]);break;case 46:this.$=o[d-3].concat([{type:"and",parText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.PAR_AND},o[d]]);break;case 48:this.$=o[d-3].concat([{type:"else",altText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.ALT_ELSE},o[d]]);break;case 49:o[d-3].draw="participant",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 50:o[d-1].draw="participant",o[d-1].type="addParticipant",this.$=o[d-1];break;case 51:o[d-3].draw="actor",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 52:case 57:o[d-1].draw="actor",o[d-1].type="addParticipant",this.$=o[d-1];break;case 53:o[d-1].type="destroyParticipant",this.$=o[d-1];break;case 54:o[d-3].draw="participant",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 55:o[d-1].draw="participant",o[d-1].type="addParticipant",this.$=o[d-1];break;case 56:o[d-3].draw="actor",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 58:this.$=[o[d-1],{type:"addNote",placement:o[d-2],actor:o[d-1].actor,text:o[d]}];break;case 59:o[d-2]=[].concat(o[d-1],o[d-1]).slice(0,2),o[d-2][0]=o[d-2][0].actor,o[d-2][1]=o[d-2][1].actor,this.$=[o[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:o[d-2].slice(0,2),text:o[d]}];break;case 60:this.$=[o[d-1],{type:"addLinks",actor:o[d-1].actor,text:o[d]}];break;case 61:this.$=[o[d-1],{type:"addALink",actor:o[d-1].actor,text:o[d]}];break;case 62:this.$=[o[d-1],{type:"addProperties",actor:o[d-1].actor,text:o[d]}];break;case 63:this.$=[o[d-1],{type:"addDetails",actor:o[d-1].actor,text:o[d]}];break;case 66:this.$=[o[d-2],o[d]];break;case 67:this.$=o[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[d-1].actor}];break;case 71:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[d-4].actor}];break;case 72:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[d-1].actor}];break;case 73:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-2],msg:o[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[d-4].actor}];break;case 74:this.$=[o[d-5],o[d-1],{type:"addMessage",from:o[d-5].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[d-5].actor}];break;case 75:this.$=[o[d-3],o[d-1],{type:"addMessage",from:o[d-3].actor,to:o[d-1].actor,signalType:o[d-2],msg:o[d]}];break;case 76:this.$={type:"addParticipant",actor:o[d-1],config:o[d]};break;case 77:this.$=o[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(o[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:St},{23:75,55:76,73:St},{23:77,73:Y},{69:78,72:[1,79],78:Dt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],me),e(C,[2,6]),e(C,[2,16]),e(wt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(vt,i,{7:120}),e(vt,i,{7:121}),e(vt,i,{7:122}),e(Ae,i,{41:123,7:124}),e(Gt,i,{43:125,7:126}),e(Gt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(vt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,me,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:Dt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,161],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,162],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,163],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,47],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,45],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,43],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,171],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(wt,[2,11]),{13:186,51:U,53:G,54:X},e(wt,[2,13]),e(wt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(wt,[2,12]),e(Ae,i,{7:124,41:201}),e(Gt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Xt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],o=[],Nt=this.table,d="",Mt=0,we=0,Qe=2,Ne=1,$e=o.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Zt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zt)&&(gt.yy[Zt]=this.yy[Zt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Qt=J.yylloc;o.push(Qt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(it){P.length=P.length-2*it,z.length=z.length-it,o.length=o.length-it}x(tr,"popStack");function Pe(){var it;return it=y.pop()||J.lex()||Ne,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Pe,"lex");for(var rt,xt,ct,$t,Lt={},Bt,Tt,ke,Vt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Pe()),ct=Nt[xt]&&Nt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var jt="";Vt=[];for(Bt in Nt[xt])this.terminals_[Bt]&&Bt>Qe&&Vt.push("'"+this.terminals_[Bt]+"'");J.showPosition?jt="Parse error on line "+(Mt+1)+`:
|
|
1
|
+
import{I as er}from"./chunk-2Q5K7J3B-Ces-xz2S.js";import{_ as x,W as rr,c as $,l as at,i as Me,d as ar,e as sr,j as N,b as De,s as ir,m as nr,a as or,g as cr,n as lr,X as hr,Y as dr,o as Tr,h as Yt,v as Z,Z as Q,$ as kt,a0 as Be,a1 as pr,y as Ft,a2 as Er,a3 as Ve}from"./mermaid.core-C2tL9tq7.js";import{a as ur,b as se,g as dt,d as fr,c as ie,e as ne}from"./chunk-2GRJ4B5K-CWaaNkFx.js";import{s as Wt}from"./transform-BUB79_za.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";var ee=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],c=[1,12],E=[1,14],h=[1,15],p=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],q=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],St=[1,74],Dt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],me=[2,78],wt=[4,5,17,51,53,54],vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Xt=[5,52],F=[70,71,72,73],ot=[1,151],Jt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,o,Nt){var d=o.length-1;switch(z){case 3:return y.apply(o[d]),o[d];case 4:case 10:this.$=[];break;case 5:case 11:o[d-1].push(o[d]),this.$=o[d-1];break;case 6:case 7:case 12:case 13:this.$=o[d];break;case 8:case 9:case 14:this.$=[];break;case 16:o[d].type="createParticipant",this.$=o[d];break;case 17:o[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(o[d-2])}),o[d-1].push({type:"boxEnd",boxText:o[d-2]}),this.$=o[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[d-2]),sequenceIndexStep:Number(o[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[d-1].actor};break;case 30:y.setDiagramTitle(o[d].substring(6)),this.$=o[d].substring(6);break;case 31:y.setDiagramTitle(o[d].substring(7)),this.$=o[d].substring(7);break;case 32:this.$=o[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=o[d].trim(),y.setAccDescription(this.$);break;case 35:o[d-1].unshift({type:"loopStart",loopText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.LOOP_START}),o[d-1].push({type:"loopEnd",loopText:o[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=o[d-1];break;case 36:o[d-1].unshift({type:"rectStart",color:y.parseMessage(o[d-2]),signalType:y.LINETYPE.RECT_START}),o[d-1].push({type:"rectEnd",color:y.parseMessage(o[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=o[d-1];break;case 37:o[d-1].unshift({type:"optStart",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.OPT_START}),o[d-1].push({type:"optEnd",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=o[d-1];break;case 38:o[d-1].unshift({type:"altStart",altText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.ALT_START}),o[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=o[d-1];break;case 39:o[d-1].unshift({type:"parStart",parText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.PAR_START}),o[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[d-1];break;case 40:o[d-1].unshift({type:"parStart",parText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),o[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[d-1];break;case 41:o[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.CRITICAL_START}),o[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=o[d-1];break;case 42:o[d-1].unshift({type:"breakStart",breakText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.BREAK_START}),o[d-1].push({type:"breakEnd",optText:y.parseMessage(o[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=o[d-1];break;case 44:this.$=o[d-3].concat([{type:"option",optionText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},o[d]]);break;case 46:this.$=o[d-3].concat([{type:"and",parText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.PAR_AND},o[d]]);break;case 48:this.$=o[d-3].concat([{type:"else",altText:y.parseMessage(o[d-1]),signalType:y.LINETYPE.ALT_ELSE},o[d]]);break;case 49:o[d-3].draw="participant",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 50:o[d-1].draw="participant",o[d-1].type="addParticipant",this.$=o[d-1];break;case 51:o[d-3].draw="actor",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 52:case 57:o[d-1].draw="actor",o[d-1].type="addParticipant",this.$=o[d-1];break;case 53:o[d-1].type="destroyParticipant",this.$=o[d-1];break;case 54:o[d-3].draw="participant",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 55:o[d-1].draw="participant",o[d-1].type="addParticipant",this.$=o[d-1];break;case 56:o[d-3].draw="actor",o[d-3].type="addParticipant",o[d-3].description=y.parseMessage(o[d-1]),this.$=o[d-3];break;case 58:this.$=[o[d-1],{type:"addNote",placement:o[d-2],actor:o[d-1].actor,text:o[d]}];break;case 59:o[d-2]=[].concat(o[d-1],o[d-1]).slice(0,2),o[d-2][0]=o[d-2][0].actor,o[d-2][1]=o[d-2][1].actor,this.$=[o[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:o[d-2].slice(0,2),text:o[d]}];break;case 60:this.$=[o[d-1],{type:"addLinks",actor:o[d-1].actor,text:o[d]}];break;case 61:this.$=[o[d-1],{type:"addALink",actor:o[d-1].actor,text:o[d]}];break;case 62:this.$=[o[d-1],{type:"addProperties",actor:o[d-1].actor,text:o[d]}];break;case 63:this.$=[o[d-1],{type:"addDetails",actor:o[d-1].actor,text:o[d]}];break;case 66:this.$=[o[d-2],o[d]];break;case 67:this.$=o[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[d-1].actor}];break;case 71:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[d-4].actor}];break;case 72:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[d-1].actor}];break;case 73:this.$=[o[d-4],o[d-1],{type:"addMessage",from:o[d-4].actor,to:o[d-1].actor,signalType:o[d-2],msg:o[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[d-4].actor}];break;case 74:this.$=[o[d-5],o[d-1],{type:"addMessage",from:o[d-5].actor,to:o[d-1].actor,signalType:o[d-3],msg:o[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[d-5].actor}];break;case 75:this.$=[o[d-3],o[d-1],{type:"addMessage",from:o[d-3].actor,to:o[d-1].actor,signalType:o[d-2],msg:o[d]}];break;case 76:this.$={type:"addParticipant",actor:o[d-1],config:o[d]};break;case 77:this.$=o[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(o[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:St},{23:75,55:76,73:St},{23:77,73:Y},{69:78,72:[1,79],78:Dt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],me),e(C,[2,6]),e(C,[2,16]),e(wt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(vt,i,{7:120}),e(vt,i,{7:121}),e(vt,i,{7:122}),e(Ae,i,{41:123,7:124}),e(Gt,i,{43:125,7:126}),e(Gt,i,{7:126,43:127}),e(Se,i,{46:128,7:129}),e(vt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,me,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:Dt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,161],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,162],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,163],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,47],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,45],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[2,43],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:h,17:[1,171],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:q,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(wt,[2,11]),{13:186,51:U,53:G,54:X},e(wt,[2,13]),e(wt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(wt,[2,12]),e(Ae,i,{7:124,41:201}),e(Gt,i,{7:126,43:202}),e(Se,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Xt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],o=[],Nt=this.table,d="",Mt=0,we=0,Qe=2,Ne=1,$e=o.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Zt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zt)&&(gt.yy[Zt]=this.yy[Zt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Qt=J.yylloc;o.push(Qt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(it){P.length=P.length-2*it,z.length=z.length-it,o.length=o.length-it}x(tr,"popStack");function Pe(){var it;return it=y.pop()||J.lex()||Ne,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Pe,"lex");for(var rt,xt,ct,$t,Lt={},Bt,Tt,ke,Vt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Pe()),ct=Nt[xt]&&Nt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var jt="";Vt=[];for(Bt in Nt[xt])this.terminals_[Bt]&&Bt>Qe&&Vt.push("'"+this.terminals_[Bt]+"'");J.showPosition?jt="Parse error on line "+(Mt+1)+`:
|
|
2
2
|
`+J.showPosition()+`
|
|
3
3
|
Expecting `+Vt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":jt="Parse error on line "+(Mt+1)+": Unexpected "+(rt==Ne?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Qt,expected:Vt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),o.push(J.yylloc),P.push(ct[1]),rt=null,we=J.yyleng,d=J.yytext,Mt=J.yylineno,Qt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:o[o.length-(Tt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Tt||1)].first_column,last_column:o[o.length-1].last_column},je&&(Lt._$.range=[o[o.length-(Tt||1)].range[0],o[o.length-1].range[1]]),$t=this.performAction.apply(Lt,[d,we,Mt,gt.yy,ct[1],z,o].concat($e)),typeof $t<"u")return $t;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),o=o.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),o.push(Lt._$),ke=Nt[P[P.length-2]][P[P.length-1]],P.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=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),P.length-1&&(this.yylineno-=P.length-1);var z=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:P?(P.length===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o}from"./mermaid.core-
|
|
1
|
+
import{_ as o}from"./mermaid.core-C2tL9tq7.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";import"./transform-BUB79_za.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as R,a as W,S as N}from"./chunk-EX3LRPZG-k5hlNinR.js";import{_ as f,c as t,l as S,d as P,j as z,a6 as _,a7 as U,a2 as C,v as F}from"./mermaid.core-B528P54n.js";import{s as H}from"./transform-BUB79_za.js";import{G as O}from"./graph-C5DFNLrC.js";import{l as J}from"./layout-Cz0MDlGi.js";import"./chunk-XXDRQBXY-DRXrI6SM.js";import"./chunk-VR4S4FIN-IiOfWaBG.js";import"./chunk-32BRIVSS-102-EyWU.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";import"./isObject-U9U2HXiq.js";import"./map-Mm1V-_Na.js";import"./toNumber-DE3J3kMD.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,h=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(h,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=h.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),h=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=h&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),h=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),h.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const h=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,h,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,h)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=A(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else p=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(p=>{const w=p.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),p.setAttribute("x1",0-M+8),p.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},yt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{yt as diagram};
|
|
1
|
+
import{s as R,a as W,S as N}from"./chunk-5RXB4S5H-B-4Chlfc.js";import{_ as f,c as t,l as S,d as P,j as z,a6 as _,a7 as U,a2 as C,v as F}from"./mermaid.core-C2tL9tq7.js";import{s as H}from"./transform-BUB79_za.js";import{G as O}from"./graph-C5DFNLrC.js";import{l as J}from"./layout-Cz0MDlGi.js";import"./chunk-XXDRQBXY-BKsc_0wh.js";import"./chunk-KBJHAD2P-BDhjm9-8.js";import"./chunk-2GRJ4B5K-CWaaNkFx.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";import"./isObject-U9U2HXiq.js";import"./map-Mm1V-_Na.js";import"./toNumber-DE3J3kMD.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,h=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(h,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=h.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),h=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,h);g===h&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>h&&(o=(h-g)/2+c),Math.abs(a-B.x)<c&&x>h&&(o=a-(x-h)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=h&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),j=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),q=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),Z=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let h=e.replace(/\r\n/g,"<br/>");h=h.replace(/\n/g,"<br/>");const a=h.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=Z(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&j(n),(i.type==="fork"||i.type==="join")&&q(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),h=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),h.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=p.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=p.node().getBBox().height,S.info("Title height",o,x)),B.push(p)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((p,w)=>p.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const h=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=h.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,h,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,h)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=h.db.getStates(),g=h.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let p;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=A(u.doc,w,u.id,!c,n,l,h);{w=$(w,u,c);let E=w.node().getBBox();p.width=E.width,p.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else p=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(p.id+"-note",E),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",E)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(p=>{const w=p.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),p.setAttribute("x1",0-M+8),p.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},yt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{yt as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-
|
|
1
|
+
import{s as r,b as e,a,S as s}from"./chunk-5RXB4S5H-B-4Chlfc.js";import{_ as i}from"./mermaid.core-C2tL9tq7.js";import"./transform-BUB79_za.js";import"./chunk-XXDRQBXY-BKsc_0wh.js";import"./chunk-KBJHAD2P-BDhjm9-8.js";import"./chunk-2GRJ4B5K-CWaaNkFx.js";import"./preload-helper-BXl3LOEh.js";import"./floating-ui.react-dom-BWTnA00G.js";var b={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{b as diagram};
|