limixbot 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ActivityPanel-BHCUppbs.js → ActivityPanel-Crvi6UFN.js} +1 -1
- package/dist/assets/{App-D93hKk8l.js → App-DBQxC6tF.js} +9 -9
- package/dist/assets/{AppEventEditor-tGh5VM2Z.js → AppEventEditor-BKkrL3lm.js} +1 -1
- package/dist/assets/{BotSettingsDialog-D6Y7Bflm.js → BotSettingsDialog-BVTAiGvS.js} +1 -1
- package/dist/assets/{BrowserPanel-k55-4cIw.js → BrowserPanel-CXiPysF8.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-BRZM0q_M.js → BrowserProfilesManager-B5ZQeFJ9.js} +1 -1
- package/dist/assets/{CloudAddDialog-BZQDNnKi.js → CloudAddDialog-CjSOW3Ui.js} +1 -1
- package/dist/assets/{ComputerFilesPane-DAQhcfSG.js → ComputerFilesPane-VwEQWopG.js} +1 -1
- package/dist/assets/{ComputerPanel-ExjbTj4s.js → ComputerPanel-C4y6Mvwd.js} +2 -2
- package/dist/assets/{DataPanel-DRPDfcrQ.js → DataPanel-CeaLVEeb.js} +1 -1
- package/dist/assets/{DesktopViewer-D9jr2w9X.js → DesktopViewer-CfxFVwdn.js} +1 -1
- package/dist/assets/{FilesView-CplahKQt.js → FilesView-B9X_qlkn.js} +1 -1
- package/dist/assets/{GrokMoveDialog-Cc5o6HuE.js → GrokMoveDialog-CuC9v4Fd.js} +1 -1
- package/dist/assets/{InspectorPanel-B5iY0Ism.js → InspectorPanel-B6ZAVTyD.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-DhUpWvIZ.js → KeyboardShortcutsModal-DkoOxF2t.js} +1 -1
- package/dist/assets/{LiveDesktop-DRcJOYg3.js → LiveDesktop-BsPQ6sGB.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-CrRyugwl.js → LocalVmWorkspace-U6rVY7_g.js} +1 -1
- package/dist/assets/{MacLocalControl-D2pf75xx.js → MacLocalControl-CC-lKazM.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-CLYypRvz.js → MarkdownFilePreview-D0maDIQ1.js} +1 -1
- package/dist/assets/{MenuMotion-CNjHVOE4.js → MenuMotion-CLF0GByT.js} +1 -1
- package/dist/assets/{NewBotDialog-CuYIfLJL.js → NewBotDialog-D9e-ED-j.js} +1 -1
- package/dist/assets/{PhoneAppDialog-EKN4JV-B.js → PhoneAppDialog-CTPZwJnL.js} +1 -1
- package/dist/assets/{PlacesRail-eySktVNq.js → PlacesRail-D510vk5R.js} +1 -1
- package/dist/assets/{PluginsPanel-D8Kw3j_E.js → PluginsPanel-BC0YDZ8h.js} +1 -1
- package/dist/assets/{ProIntroduction-Dutut6C-.js → ProIntroduction-BIiaveWm.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-BuNfrHcn.js → RemoteAgentSettingsPanel-OVWheJHu.js} +1 -1
- package/dist/assets/{RoomPanel-vlOHVr2o.js → RoomPanel-mDRTZ2vs.js} +1 -1
- package/dist/assets/{RoutinesPage-Dgl6g38a.js → RoutinesPage-9VDuovqw.js} +1 -1
- package/dist/assets/{SettingsModal-B6mWaU4-.js → SettingsModal-BHJvNrwz.js} +1 -1
- package/dist/assets/{ShareTeamDialog-BNMxpMeG.js → ShareTeamDialog-C4go2USY.js} +1 -1
- package/dist/assets/{SignedInSites-rqBhWQLe.js → SignedInSites-Cm_X_p_X.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-pCffPnk4.js → TeamLibraryPanel-B-R6YFK-.js} +1 -1
- package/dist/assets/{TeamMapPage-BPNPSuOR.js → TeamMapPage-CkYOrZ7X.js} +1 -1
- package/dist/assets/{TriggersPage--eDtuNSl.js → TriggersPage-_qYPJ97Z.js} +1 -1
- package/dist/assets/{VisibilitySection-BCqfMHFk.js → VisibilitySection-CpwyInUL.js} +1 -1
- package/dist/assets/{WebhookTrigger-AXmqIpLx.js → WebhookTrigger-CfspvK5m.js} +1 -1
- package/dist/assets/{WorksOnGrid-IvyvcWBI.js → WorksOnGrid-BtfeNPO2.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-CNbBpzNE.js → abnfDiagram-YUKMZFIV-qTIn3JJ1.js} +1 -1
- package/dist/assets/{activity-CtCHrNz-.js → activity-CEhxqMcq.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-BZ3BXsFv.js → architectureDiagram-47P4ROYG-BQls0L4i.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-9DpYtThS.js → blockDiagram-E7TT5TSB-DMD6noIL.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-C9ygyYDI.js → c4Diagram-CRA5TL53-CIp2zuwT.js} +1 -1
- package/dist/assets/{calendar-days-7b_rKY9F.js → calendar-days-Di_J-dvc.js} +1 -1
- package/dist/assets/channel-DRGNbeY-.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-DXA1dGYf.js → chunk-2Q5K7J3B-BBkqbpZ4.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-Cmdn6u6A.js → chunk-5VM5RSS4-JdwNE0CO.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-C6_3KbD6.js → chunk-7TKQ45FW-D_Zh7_1M.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-DE_9xcGW.js → chunk-AW2ZBBNX-BvSbOQeA.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-DeXezLUR.js → chunk-FVRAUYC3-CXYsdaIb.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-WoJSboze.js → chunk-HTAEGDNF-CO93FKYG.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BarwLFEj.js → chunk-JWPE2WC7-Ko0D98Sv.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-DZV0Hgcq.js → chunk-KQW6MTUR-DBGMbUnJ.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-XRA7d5ef.js → chunk-XXDRQBXY-PVMPph1f.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-BB9-8H0H.js → classDiagram-v2-K4WV4PDN-Z-SRrzrQ.js} +1 -1
- package/dist/assets/{coins-RZxks5Iq.js → coins-QIRjm19F.js} +1 -1
- package/dist/assets/{core-CNxiO5i6.js → core-Cb-3LQeb.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-DlAty1qX.js → cose-bilkent-JH36ORCC-DcOhjasx.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-DjVt4mTB.js → cynefin-EF2NZ3EQ-D9Pv76Si.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-BP3mxzbM.js → cynefinDiagram-3GCD6N5R-1Nlm6fT4.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-D6R89cka.js → dagre-W4DXFKR2-CW-TdWBz.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-ED6ZLR9P.js → diagram-2UJZ2QOL-DJYwBSWN.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-DS5DPgfj.js → diagram-OVF4WLC6-ZajDgMU2.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-CkwWFUys.js → diagram-PFPMY2P6-D03UoQDq.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-B6_INDe2.js → diagram-UMYRVEAY-B9gI6La0.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-Dt30zl92.js → diagram-YEKJPTXX-Dxzg_fDQ.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-BWQrszzW.js → diagram-ZIFT7M5P-Cv6eTFZE.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-B40bZpn4.js → ebnfDiagram-VR2GEFS7-BCUklW6x.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-BOAPURLs.js → elk-IJKZMXRS-VcZs96wT.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-DhIN8EFk.js → erDiagram-O2IAPWRE-CJ61fO-Z.js} +1 -1
- package/dist/assets/{file-up-Dg7JsLFP.js → file-up-BObBqrEg.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-o61yZ5Jp.js → flowDiagram-OXPTDLAJ-CQMoLXxB.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-DKwTsk_A.js → ganttDiagram-R7TSEDQI-ev5i74AH.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-Dqte4h2a.js → gitGraphDiagram-XJZIOB7I-B8MGdCiz.js} +1 -1
- package/dist/assets/{import-name-BpcY7eF3.js → import-name-6aD0J6QH.js} +1 -1
- package/dist/assets/{index-Df4sIScD.js → index-CRF26t5P.js} +1 -1
- package/dist/assets/{index-CN3qYQZ7.js → index-DgGTgaCO.js} +2 -2
- package/dist/assets/{index-y3wal1WK.js → index-Dpov1WyC.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-CeOhDqP5.js → infoDiagram-5W2HQ5XZ-CoqaIohe.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-BLxBG4Ku.js → ishikawaDiagram-K3B6WC7H-BMzA3Pkb.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-a7-OqFVb.js → journeyDiagram-COXZFDF6-DLNIN037.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-BpqE9wv9.js → kanban-definition-P3RFRI5V-savLUzO8.js} +1 -1
- package/dist/assets/{mcp-servers-Cb7NFF4i.js → mcp-servers-D2hHUxUp.js} +1 -1
- package/dist/assets/{mermaid.core-DCkDS2l6.js → mermaid.core-1h5EGl1v.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-CbVxI-Dw.js → mindmap-definition-LZFPQGKD-hMbAYcVv.js} +1 -1
- package/dist/assets/{minimize-BzhEcU2C.js → minimize-63hYzV5y.js} +1 -1
- package/dist/assets/{monitor-tq9gQZRc.js → monitor-DOeLdhQc.js} +1 -1
- package/dist/assets/{new-bot-FZ7p0MaB.js → new-bot-DkcWCdL_.js} +1 -1
- package/dist/assets/{org-library-BurlfP-M.js → org-library-C-rnQ1YG.js} +1 -1
- package/dist/assets/{package-format-B2CMS446.js → package-format-CMpBgycc.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-JzbTYrpF.js → pegDiagram-BGZESJAR-BIY55aib.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-FJGAn2CJ.js → pieDiagram-CAPJLFHJ-DR8o8piD.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-BH0XP_4R.js → quadrantDiagram-GDMTTRAM-Dqb1703W.js} +1 -1
- package/dist/assets/{rail-Cq1USSn9.js → rail-Ok1gt1lN.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-DdmOm9v7.js → railroadDiagram-SM67HX2B-ZWJ9xWQY.js} +1 -1
- package/dist/assets/{remote-desktop-panel-ByjBIDKD.js → remote-desktop-panel-ganxVzJo.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-CmHsqVU3.js → requirementDiagram-X7JNWC4A-Cjv_VLZj.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-20UkT1qC.js → sankeyDiagram-UM26HJRW-ChHoiXzB.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-DbOCvva9.js → sequenceDiagram-ZO4K6R2Y-B67gwOH0.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-BiRygHwv.js → sizeCapture-INFHLROL-DOr4ZALb.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-_b0RTe98.js → stateDiagram-v2-TBUQTH76-DnoBtm-E.js} +1 -1
- package/dist/assets/{styles-b2tBrp-F.js → styles-BcVNrxGE.js} +1 -1
- package/dist/assets/{swimlanes-N4OXWK64-Cph2675B.js → swimlanes-N4OXWK64-2TFXb7MH.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-C_836Lnu.js +8 -0
- package/dist/assets/{team-share-BegoEw7-.js → team-share-C9qIusMs.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-2fj61Rzb.js → timeline-definition-YOQAKGHF-4zjxAMyG.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-Cfx3YEF_.js → usecaseDiagram-VIAY4XPW-CCfZ1eoO.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-BX_M6eTv.js → vennDiagram-BLWOH2XV-h7rTFRTN.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-BfDn4ghH.js → wardleyDiagram-YMQ3BMBF-CXwA22zv.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-CqrDBgpf.js → xychartDiagram-TAQBALBS-d4qol5BJ.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/rail.html +4 -4
- package/dist-server/package.json +1 -1
- package/package.json +1 -1
- package/dist/assets/channel-CkUESPbF.js +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-DqgQUDUL.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ut}from"./chunk-XXDRQBXY-XRA7d5ef.js";import{s as Kt}from"./chunk-KQW6MTUR-DZV0Hgcq.js";import{_ as f,L as Tt,b as Zt,a as jt,s as qt,g as Wt,v as Ht,x as Qt,c as tt,l as F,m as Xt,D as Jt,A as $t,F as te,G as ee,H as se,M as ie,K as re,N as ne,r as ae,t as oe,k as ce,u as le}from"./mermaid.core-DCkDS2l6.js";import{c as he}from"./channel-CkUESPbF.js";import"./styles-b2tBrp-F.js";import"./step-CkmJJ7wq.js";var Nt=(function(){var s=f(function(G,a,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=a);return l},"o"),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],N=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],C=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Ct=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],nt=[1,101],at=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(a,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(n,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:N,38:p,39:b,40:A,41:v,43:O,46:C,47:I,51:x,53:D,54:L,55:w},s(n,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:N,38:p,39:b,40:A,41:v,43:O,46:C,47:I,51:x,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Ct,[2,82]),s(Ct,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:nt,53:at,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:nt,53:at,76:ot},{15:127,43:V,44:M},{13:128,43:nt,53:at,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:nt,53:at,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(a,l){if(l.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=l,d}},"parseError"),parse:f(function(a){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(a,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
|
|
1
|
+
import{g as Ut}from"./chunk-XXDRQBXY-PVMPph1f.js";import{s as Kt}from"./chunk-KQW6MTUR-DBGMbUnJ.js";import{_ as f,L as Tt,b as Zt,a as jt,s as qt,g as Wt,v as Ht,x as Qt,c as tt,l as F,m as Xt,D as Jt,A as $t,F as te,G as ee,H as se,M as ie,K as re,N as ne,r as ae,t as oe,k as ce,u as le}from"./mermaid.core-1h5EGl1v.js";import{c as he}from"./channel-DRGNbeY-.js";import"./styles-BcVNrxGE.js";import"./step-CkmJJ7wq.js";var Nt=(function(){var s=f(function(G,a,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=a);return l},"o"),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],N=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],C=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Ct=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],nt=[1,101],at=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(a,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(n,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:N,38:p,39:b,40:A,41:v,43:O,46:C,47:I,51:x,53:D,54:L,55:w},s(n,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:N,38:p,39:b,40:A,41:v,43:O,46:C,47:I,51:x,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Ct,[2,82]),s(Ct,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:nt,53:at,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:nt,53:at,76:ot},{15:127,43:V,44:M},{13:128,43:nt,53:at,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:nt,53:at,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(a,l){if(l.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=l,d}},"parseError"),parse:f(function(a){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(a,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:mt,expected:ut})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(T[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(T[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,mt=m.yylloc;break;case 2:if(R=this.productions_[T[1]][1],U.$=_[_.length-R],U._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(U,[e,Dt,lt,Y.yy,T[1],_,t].concat(Yt)),typeof Et<"u")return Et;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[T[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},"parseError"),setInput:f(function(a,l){return this.yy=l||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.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),a},"input"),unput:f(function(a){var l=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=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),d.length-1&&(this.yylineno-=d.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:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[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(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./styles-
|
|
1
|
+
import{c as a}from"./styles-BcVNrxGE.js";const e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],o=a("file-up",e);export{o as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as qt}from"./chunk-5VM5RSS4-
|
|
1
|
+
import{g as qt}from"./chunk-5VM5RSS4-JdwNE0CO.js";import{g as Xt}from"./chunk-XXDRQBXY-PVMPph1f.js";import{s as Qt}from"./chunk-KQW6MTUR-DBGMbUnJ.js";import{_ as C,q as Jt,l as ee,c as Ae,r as Zt,t as $t,u as rt,b as e1,s as t1,v as s1,a as i1,g as r1,x as a1,m as n1,y as u1,J as o1,z as l1,A as st,k as it,B as c1,D as h1,E as d1,F as p1,G as f1,H as g1,I as b1,K as k1}from"./mermaid.core-1h5EGl1v.js";import{c as A1}from"./chunk-7TKQ45FW-D_Zh7_1M.js";import{c as m1}from"./channel-DRGNbeY-.js";var C1="flowchart-",Pe,D1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=e1,this.setAccDescription=t1,this.setDiagramTitle=s1,this.getAccTitle=i1,this.getAccDescription=r1,this.getDiagramTitle=a1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return n1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,l,b,u={},m){if(!i||i.trim().length===0)return;let h;if(m!==void 0){let k;m.includes(`
|
|
2
2
|
`)?k=m+`
|
|
3
3
|
`:k=`{
|
|
4
4
|
`+m+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as be,s as we,x as _e,v as De,a as Se,b as Ce,_ as l,c as dt,k as vt,d as Me,b2 as U,l as st,m as Ee,p as Ie,D as $e,u as Ae}from"./mermaid.core-DCkDS2l6.js";import{ag as It}from"./styles-b2tBrp-F.js";import{t as Ye,m as Fe,a as Le,i as Oe,b as Zt,c as Qt,d as We,e as Pe,f as Ve,g as ze,h as Re,j as Ne,k as He,l as Kt,n as Jt,o as te,s as ee,p as re}from"./time-CZ0C3Dvk.js";import{l as Be}from"./linear-ChbPfC31.js";import"./step-CkmJJ7wq.js";import"./init-Dmth1JHB.js";import"./defaultLocale-CzDG__Ur.js";function qe(t){return t}var Tt=1,At=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function je(t){return"translate(0,"+t+")"}function Xe(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===At?"x":"y",W=t===Tt||t===Ft?Ge:je;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:Xe)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===At?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===At?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,A=o.day,Y=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=A||(G||c?1:at.getDate()),lt=G||at.getFullYear(),j=0;G&&!c||(j=c>0?c-1:at.getMonth());var K,Z=Y||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,j,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,j,yt,Z,ot,J,it)):(K=new Date(lt,j,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,A=2,Y=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||Y,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var j,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=lt()),Z=$[K]&&$[K][j]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>A&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
1
|
+
import{g as be,s as we,x as _e,v as De,a as Se,b as Ce,_ as l,c as dt,k as vt,d as Me,b2 as U,l as st,m as Ee,p as Ie,D as $e,u as Ae}from"./mermaid.core-1h5EGl1v.js";import{ag as It}from"./styles-BcVNrxGE.js";import{t as Ye,m as Fe,a as Le,i as Oe,b as Zt,c as Qt,d as We,e as Pe,f as Ve,g as ze,h as Re,j as Ne,k as He,l as Kt,n as Jt,o as te,s as ee,p as re}from"./time-CZ0C3Dvk.js";import{l as Be}from"./linear-ChbPfC31.js";import"./step-CkmJJ7wq.js";import"./init-Dmth1JHB.js";import"./defaultLocale-CzDG__Ur.js";function qe(t){return t}var Tt=1,At=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function je(t){return"translate(0,"+t+")"}function Xe(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===At?"x":"y",W=t===Tt||t===Ft?Ge:je;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:Xe)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===At?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===At?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,A=o.day,Y=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=A||(G||c?1:at.getDate()),lt=G||at.getFullYear(),j=0;G&&!c||(j=c>0?c-1:at.getMonth());var K,Z=Y||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,j,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,j,yt,Z,ot,J,it)):(K=new Date(lt,j,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,A=2,Y=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||Y,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var j,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=lt()),Z=$[K]&&$[K][j]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>A&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[j]||j)+"'":$t="Parse error on line "+(G+1)+": Unexpected "+(j==Y?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError($t,{text:F.match,token:this.terminals_[j]||j,line:F.yylineno,loc:nt,expected:pt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+j);switch(Z[0]){case 1:m.push(j),C.push(F.yytext),n.push(F.yylloc),m.push(Z[1]),j=null,c=F.yyleng,o=F.yytext,G=F.yylineno,nt=F.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=C[C.length-tt],J._$={first_line:n[n.length-(tt||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(tt||1)].first_column,last_column:n[n.length-1].last_column},at&&(J._$.range=[n[n.length-(tt||1)].range[0],n[n.length-1].range[1]]),ot=this.performAction.apply(J,[o,c,G,q.yy,Z[1],C,n].concat(R)),typeof ot<"u")return ot;tt&&(m=m.slice(0,-1*tt*2),C=C.slice(0,-1*tt),n=n.slice(0,-1*tt)),m.push(this.productions_[Z[1]][0]),C.push(J.$),n.push(J._$),Ut=$[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0},"parse")},T=(function(){var p={EOF:1,parseError:l(function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},"parseError"),setInput:l(function(a,d){return this.yy=d||this.yy||{},this._input=a,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:l(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var d=a.length,m=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=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),m.length-1&&(this.yylineno-=m.length-1);var C=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
package/dist/assets/{gitGraphDiagram-XJZIOB7I-Dqte4h2a.js → gitGraphDiagram-XJZIOB7I-B8MGdCiz.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as le}from"./chunk-2Q5K7J3B-DXA1dGYf.js";import{p as he}from"./chunk-JWPE2WC7-BarwLFEj.js";import{x as $e,v as fe,s as ge,g as ue,a as ye,b as xe,_ as h,O as Q,l as w,k as me,c as q,u as pe,P as be,D as we,m as B,Q as ke,R as ve,S as Ce}from"./mermaid.core-DCkDS2l6.js";import{p as Ee}from"./cynefin-EF2NZ3EQ-DjVt4mTB.js";import"./styles-b2tBrp-F.js";import"./step-CkmJJ7wq.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...Q().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function J(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),J(e)}h(J,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];J([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Qe=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Je=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Je(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as le}from"./chunk-2Q5K7J3B-BBkqbpZ4.js";import{p as he}from"./chunk-JWPE2WC7-Ko0D98Sv.js";import{x as $e,v as fe,s as ge,g as ue,a as ye,b as xe,_ as h,O as Q,l as w,k as me,c as q,u as pe,P as be,D as we,m as B,Q as ke,R as ve,S as Ce}from"./mermaid.core-1h5EGl1v.js";import{p as Ee}from"./cynefin-EF2NZ3EQ-D9Pv76Si.js";import"./styles-BcVNrxGE.js";import"./step-CkmJJ7wq.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...Q().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function J(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),J(e)}h(J,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];J([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Qe=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Je=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Je(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+R}
|
|
3
3
|
${s-i/2-L/2},${x-R}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-R}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a}from"./App-
|
|
1
|
+
import{n as a}from"./App-DBQxC6tF.js";async function f(s,e){const t=await a("/api/teams/import?mode=add",{method:"POST",body:JSON.stringify(s)});for(const o of t.bots)e({type:"botAdded",bot:o});for(const o of t.groups??[])e({type:"groupPatched",group:o});for(const o of t.routines??[])e({type:"routinePatched",routine:o});const r=t.bots.find(o=>!o.hidden);return r&&e({type:"select",id:r.id}),{...t,...r?{first:r}:{}}}function c(s,e,t=100){const r=s.trim().slice(0,t);let o=r;for(let n=2;e.has(o.toLowerCase());n++){const i=` ${n}`;o=`${r.slice(0,t-i.length).trimEnd()}${i}`}return e.add(o.toLowerCase()),o}export{f as a,c as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d4 as W,d5 as A,d6 as k,d7 as C,d8 as $,d9 as q,da as z,db as U,dc as X}from"./App-
|
|
1
|
+
import{d4 as W,d5 as A,d6 as k,d7 as C,d8 as $,d9 as q,da as z,db as U,dc as X}from"./App-DBQxC6tF.js";import T from"./katex-HP8lGamR.js";import"./styles-BcVNrxGE.js";import"./index-DgGTgaCO.js";import"./PlacesRail-D510vk5R.js";import"./monitor-DOeLdhQc.js";import"./MenuMotion-CLF0GByT.js";const j=/[#.]/g;function Y(e,t){const n=e||"",r={};let o=0,i,s;for(;o<n.length;){j.lastIndex=o;const a=j.exec(n),c=n.slice(o,a?a.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:s=c,o+=c.length),a&&(i=a[0],o++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function B(e,t,n){const r=n?v(n):void 0;function o(i,s,...a){let c;if(i==null){c={type:"root",children:[]};const f=s;a.unshift(f)}else{c=Y(i,t);const f=c.tagName.toLowerCase(),l=r?r.get(f):void 0;if(c.tagName=l||f,J(s))a.unshift(s);else for(const[u,d]of Object.entries(s))Q(e,c.properties,u,d)}for(const f of a)w(c.children,f);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return o}function J(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Q(e,t,n,r){const o=W(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?o.spaceSeparated?i=A(r):o.commaSeparated?i=k(r):o.commaOrSpaceSeparated?i=A(k(r).join(" ")):i=E(o,o.property,r):Array.isArray(r)?i=[...r]:i=o.property==="style"?Z(r):String(r);if(Array.isArray(i)){const s=[];for(const a of i)s.push(E(o,o.property,a));i=s}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function w(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)w(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?w(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function E(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||C(n)===C(t)))return!0}return n}function Z(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function v(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ee=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],te=B($,"div"),ne=B(q,"g",ee),y={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function re(e,t){return P(e,{})||{type:"root",children:[]}}function P(e,t){const n=oe(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function oe(e,t){switch(e.nodeType){case 1:return ae(e,t);case 3:return se(e);case 8:return ce(e);case 9:return S(e,t);case 10:return ie();case 11:return S(e,t);default:return}}function S(e,t){return{type:"root",children:D(e,t)}}function ie(){return{type:"doctype"}}function se(e){return{type:"text",value:e.nodeValue||""}}function ce(e){return{type:"comment",value:e.nodeValue||""}}function ae(e,t){const n=e.namespaceURI,r=n===y.svg?ne:te,o=n===y.html?e.tagName.toLowerCase():e.tagName,i=n===y.html&&o==="template"?e.content:e,s=e.getAttributeNames(),a={};let c=-1;for(;++c<s.length;)a[s[c]]=e.getAttribute(s[c])||"";return r(o,a,D(i,t))}function D(e,t){const n=e.childNodes,r=[];let o=-1;for(;++o<n.length;){const i=P(n[o],t);i!==void 0&&r.push(i)}return r}new DOMParser;function fe(e,t){const n=le(e);return re(n)}function le(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const I=(function(e,t,n){const r=z(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),h=(function(e){if(e==null)return he;if(typeof e=="string")return pe(e);if(typeof e=="object")return ue(e);if(typeof e=="function")return b(e);throw new Error("Expected function, string, or array as `test`")});function ue(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=h(e[n]);return b(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function pe(e){return b(t);function t(n){return n.tagName===e}}function b(e){return t;function t(n,r,o){return!!(de(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function he(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function de(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const O=/\n/g,M=/[\t ]+/g,N=h("br"),F=h(Ae),me=h("p"),L=h("tr"),ge=h(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",xe,ke]),G=h(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function ye(e,t){const n=t||{},r="children"in e?e.children:[],o=G(e),i=H(e,{whitespace:n.whitespace||"normal"}),s=[];(e.type==="text"||e.type==="comment")&&s.push(..._(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)s.push(...R(r[a],e,{whitespace:i,breakBefore:a?void 0:o,breakAfter:a<r.length-1?N(r[a+1]):o}));const c=[];let f;for(a=-1;++a<s.length;){const l=s[a];typeof l=="number"?f!==void 0&&l>f&&(f=l):l&&(f!==void 0&&f>-1&&c.push(`
|
|
2
2
|
`.repeat(f)||" "),f=-1,c.push(l))}return c.join("")}function R(e,t,n){return e.type==="element"?we(e,t,n):e.type==="text"?n.whitespace==="normal"?_(e,n):Ne(e):[]}function we(e,t,n){const r=H(e,n),o=e.children||[];let i=-1,s=[];if(ge(e))return s;let a,c;for(N(e)||L(e)&&I(t,e,L)?c=`
|
|
3
3
|
`:me(e)?(a=2,c=2):G(e)&&(a=1,c=1);++i<o.length;)s=s.concat(R(o[i],e,{whitespace:r,breakBefore:i?void 0:a,breakAfter:i<o.length-1?N(o[i+1]):c}));return F(e)&&I(t,e,F)&&s.push(" "),a&&s.unshift(a),c&&s.push(c),s}function _(e,t){const n=String(e.value),r=[],o=[];let i=0;for(;i<=n.length;){O.lastIndex=i;const c=O.exec(n),f=c&&"index"in c?c.index:n.length;r.push(be(n.slice(i,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),i=f+1}let s=-1,a;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(o.push(r[s]),a=void 0):r[s]?(typeof a=="number"&&o.push(a),o.push(r[s]),a=0):(s===0||s===r.length-1)&&o.push(0);return o}function Ne(e){return[String(e.value)]}function be(e,t,n){const r=[];let o=0,i;for(;o<e.length;){M.lastIndex=o;const s=M.exec(e);i=s?s.index:e.length,!o&&!i&&s&&!t&&r.push(""),o!==i&&r.push(e.slice(o,i)),o=s?i+s[0].length:i}return o!==i&&!n&&r.push(""),r.join(" ")}function H(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function xe(e){return!!(e.properties||{}).hidden}function Ae(e){return e.tagName==="td"||e.tagName==="th"}function ke(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const Ce={},Te=[];function Le(e){const t=e||Ce;return function(n,r){U(n,"element",function(o,i){const s=Array.isArray(o.properties.className)?o.properties.className:Te,a=s.includes("language-math"),c=s.includes("math-display"),f=s.includes("math-inline");let l=c;if(!a&&!c&&!f)return;let u=i[i.length-1],d=o;if(o.tagName==="code"&&a&&u&&u.type==="element"&&u.tagName==="pre"&&(d=u,u=i[i.length-2],l=!0),!u)return;const m=ye(d,{whitespace:"pre"});let p;try{p=T.renderToString(m,{...t,displayMode:l,throwOnError:!0})}catch(g){const x=g,V=x.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...i,o],cause:x,place:o.position,ruleId:V,source:"rehype-katex"});try{p=T.renderToString(m,{...t,displayMode:l,strict:"ignore",throwOnError:!1})}catch{p=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(g)},children:[{type:"text",value:m}]}]}}typeof p=="string"&&(p=fe(p).children);const K=u.children.indexOf(d);return u.children.splice(K,1,...p),X})}}export{Le as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-
|
|
2
|
-
import{t as o,aq as Pe,r as i,j as n,S as pe,X as Ie,a as I,ar as Ae,as as Te,g as $,L as _e,a5 as M,F as W,ae as ne,D as Le,at as Oe,au as Re,p as A,av as $e,b as De,s as He,l as Be,m as Fe,q as ze,v as Ue,aw as Me,ax as We,y as Xe,x as Ge,z as Ve,P as Ke,_ as me}from"./styles-b2tBrp-F.js";function Qt(e,t){if(!t)return;if(t.kind!=="session")return t.kind==="loopback"?e:void 0;if(t.team||t.scopes.includes("admin"))return e;const r=t.email;if(r?.trim())return e?.email?.trim().toLowerCase()===r.trim().toLowerCase()?e:{email:r}}const fe="omb.team-sign-in";function qe(e){try{e&&globalThis.localStorage?.setItem(fe,e)}catch{}}function Ye(){try{return globalThis.localStorage?.getItem(fe)??null}catch{return null}}async function F(e=fetch){let t;try{t=await e("/api/auth/session",{credentials:"same-origin"})}catch(s){return{kind:"unreachable",error:s instanceof Error?s.message:String(s)}}const r=await t.json().catch(()=>({})),a=Object(r);return t.status===401||t.status===403?{kind:"unauthenticated",error:typeof a.error=="string"?a.error:`${t.status}`}:t.ok?a.kind==="session"&&typeof a.id=="string"?{kind:"session",id:a.id,label:typeof a.label=="string"?a.label:"",...typeof a.email=="string"?{email:a.email}:{},scopes:Array.isArray(a.scopes)?a.scopes.filter(s=>typeof s=="string"):[],expiresAt:typeof a.expiresAt=="number"?a.expiresAt:0,...typeof a.reactor=="string"?{reactor:a.reactor}:{},...typeof a.teamSignIn=="string"?{teamSignIn:a.teamSignIn}:{},...re(a.team)?{team:re(a.team),openedThreads:Array.isArray(a.openedThreads)?a.openedThreads.filter(s=>typeof s=="string"):[]}:{},...a.cloudGuest===!0?{cloudGuest:!0,openedThreads:Array.isArray(a.openedThreads)?a.openedThreads.filter(s=>typeof s=="string"):[]}:{}}:a.trust==="service"?{kind:"loopback",trust:"service"}:{kind:"loopback"}:{kind:"unreachable",error:`${t.status} ${t.statusText}`}}function re(e){const t=Object(e);return typeof t.id=="string"&&typeof t.name=="string"&&typeof t.role=="string"?{id:t.id,name:t.name,role:t.role}:null}function Je(e){return e?.kind==="session"||e?.kind==="loopback"&&e.trust!=="service"}function he(e){return e?e.kind==="loopback"?e.trust!=="service":e.kind==="session"&&e.scopes.includes("admin"):!1}function Ze(){const e=/[#&]code=([^&]+)/.exec(location.hash);return e?(history.replaceState(null,"",location.pathname+location.search),decodeURIComponent(e[1])):null}function Qe(){if(!/[#&]signin=/.test(location.hash))return null;const e=/[#&]signin=(omb_pair_[A-Za-z0-9_-]{43})(?:&|$)/.exec(location.hash);return history.replaceState(null,"",location.pathname+location.search),e?e[1]:null}function et(){const e=new URLSearchParams(location.search),t=e.get("email")?.trim().toLowerCase()??"";if(!t)return null;e.delete("email");const r=e.toString();return history.replaceState(null,"",location.pathname+(r?`?${r}`:"")+location.hash),/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(t)?t:null}function xe(e=navigator.userAgent){const t=/Edg\//.test(e)?"Edge":/OPR\//.test(e)?"Opera":/Chrome\//.test(e)?"Chrome":/Firefox\//.test(e)?"Firefox":/Safari\//.test(e)?"Safari":"Browser",r=/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?"Android":/Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"";return r?`${t} on ${r}`:t}function B(){return typeof crypto?.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,14)}`}function be(e,t){const r=Reflect.get(Object(e),"error");return Pe(e,typeof r=="string"?r:`${t.status} ${t.statusText}`)}async function V(e,t=fetch){let r;try{r=await t("/api/auth/pair",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({code:e.code,label:e.label,cookie:!0,attemptId:e.attemptId??B(),...e.browser?{browser:!0}:{}})})}catch(s){return{ok:!1,error:o("pair.unreachable",{error:s instanceof Error?s.message:String(s)})}}const a=await r.json().catch(()=>({}));return r.ok?{ok:!0}:{ok:!1,error:be(a,r)}}async function tt(e,t=fetch){try{const r=await t("/api/auth/pair",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({code:e,browser:!0,preview:!0})}),a=Object(await r.json().catch(()=>({}))),s=Reflect.get(a,"owner"),c=Reflect.get(a,"team");return r.ok&&typeof s=="string"&&s?{owner:s,...typeof c=="string"&&c.trim()?{team:c.trim()}:{}}:null}catch{return null}}function nt(e,t,r=fetch){return V({code:e,label:xe(),attemptId:t,browser:!0},r)}function en(e){const t=Object(e);return t.cloudHome===!0&&typeof t.owner=="string"&&t.owner?t.owner:null}async function ge(e,t,r){let a;try{a=await r(e,{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}catch(c){return{ok:!1,error:o("pair.unreachable",{error:c instanceof Error?c.message:String(c)})}}const s=await a.json().catch(()=>({}));return a.ok?{ok:!0}:{ok:!1,error:be(s,a)}}function rt(e,t=fetch){return ge("/api/auth/email/start",{email:e},t)}function at(e,t=fetch){return ge("/api/auth/email/verify",{email:e.email,code:e.code,label:e.label},t)}function ae(e){return!e||/through a proxy|loopback host required|cross-origin request|^40[13]$/i.test(e)?null:e}function ot(){window.ogb?.softwareRendering===!0&&(document.documentElement.dataset.softwareRendering="")}function st({credential:e,owner:t,team:r}){const[a]=i.useState(()=>B()),[s,c]=i.useState(!1),[u,l]=i.useState(null);async function y(){c(!0),l(null);const f=await nt(e,a);if(f.ok){location.replace("/");return}c(!1),l(f.error)}return n.jsx("main",{className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsxs("div",{className:"w-full max-w-[420px]",children:[n.jsx("h1",{className:"text-[20px] font-semibold",children:r?o("pair.browser.teamTitle",{team:r,owner:t}):o("pair.browser.title",{owner:t})}),n.jsx("p",{className:"mt-1.5 text-[14px] text-ink-secondary",children:o("pair.browser.notYou")}),u?n.jsx("p",{role:"alert",className:"mt-3 text-[13px] text-danger",children:u}):null,n.jsx("button",{type:"button",onClick:()=>{y()},disabled:s,className:"mt-5 w-full rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink disabled:opacity-50",children:o(s?"pair.signingIn":"pair.continue")})]})})}const Y="bg-composer ring-1 ring-inset ring-ink/[0.07]",it="bg-composer ring-[0.5px] ring-ink/10",tn=`${it} shadow-(--shadow-float)`,ye="transition-colors duration-[120ms] hover:bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]",lt=`${ye} aria-expanded:bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]`,nn="bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]",rn="focus-visible:outline-2 focus-visible:-outline-offset-2! focus-visible:outline-focus",ke="flex size-9 shrink-0 items-center justify-center rounded-full text-ink/90",J="focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",ct=`${ke} ${Y} ${lt} ${J}`,an=`${ke} ${Y} ${ye} ${J}`,ut=`flex size-[26px] shrink-0 items-center justify-center rounded-lg text-ink-secondary transition-colors hover:bg-ink/[0.06] hover:text-ink aria-expanded:bg-ink/[0.06] aria-expanded:text-ink ${J}`,on="flex size-10 shrink-0 items-center justify-center rounded-full border border-hairline bg-card text-ink hover:bg-raised focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",dt="flex size-9 shrink-0 items-center justify-center rounded-xl text-ink-secondary hover:bg-raised/60 hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus";function sn({open:e,onToggle:t,corner:r=!1,ref:a}){return n.jsx("button",{ref:a,type:"button","data-sidebar-search-toggle":!0,onClick:t,"aria-label":o("sidebar.searchAria"),"aria-expanded":e,title:o("sidebar.searchAria"),className:r?ut:ct,children:n.jsx(pe,{size:r?17:18,strokeWidth:1.5,"aria-hidden":"true"})})}function ln({query:e,onQuery:t,onClose:r}){return n.jsx("div",{"data-sidebar-search-pill":!0,className:"px-3 pb-2 pt-0.5",children:n.jsxs("div",{className:I("flex h-[34px] items-center gap-2 rounded-full pl-3 pr-1.5 text-ink-secondary focus-within:ring-focus",Y),children:[n.jsx(pe,{size:15,"aria-hidden":"true",className:"shrink-0"}),n.jsx("input",{autoFocus:!0,value:e,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Escape"&&(a.preventDefault(),r())},placeholder:o("sidebar.searchAria"),"aria-label":o("sidebar.searchAria"),className:"min-w-0 flex-1 bg-transparent text-[13px] text-ink placeholder:text-ink-tertiary focus:outline-none"}),n.jsx("button",{type:"button",onClick:r,"aria-label":o("sidebar.searchClose"),title:o("sidebar.searchClose"),className:"flex size-6 shrink-0 items-center justify-center rounded-full text-ink-tertiary hover:bg-raised hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-focus",children:n.jsx(Ie,{size:14,"aria-hidden":"true"})})]})})}function pt(e,{howTo:t=!1,onClosed:r}={}){return e.menu(t?{from:"howto"}:void 0).finally(()=>{t&&r?.()})}function cn(e){Le("cloud_howto",{result:"closed"}),e({type:"cloudHowTo",open:!1})}function oe({text:e}){return n.jsxs("span",{className:"font-normal text-ink-secondary",children:[" · ",e]})}function mt(e){return e?.sleeps===!0?!0:e?.status==="paid"?!1:null}function ft(e){const t=e&&!window.ogb?.remoteClient?.active?window.ogb?.cloudPlan:void 0,r=e||window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[a,s]=i.useState(null),[c,u]=i.useState(!1);return i.useEffect(()=>{if(!t)return;let l=!0;return t.state().then(y=>{l&&s(mt(y))}).catch(()=>{}),()=>{l=!1}},[t]),i.useEffect(()=>r?.onState(l=>u(l.waking===!0)),[r]),{sleeps:t?a:null,waking:c}}function ht({cloudHome:e=!1,howTo:t=!1,onMenuClosed:r}){const a=window.ogb?.workspaces,[s,c]=i.useState(null),[u,l]=i.useState(!1),[y,f]=i.useState("");i.useEffect(()=>{let p=!0;const g=()=>{a?.state().then(j=>{p&&c(j)}).catch(()=>{})};g();const S=a?.onChanged?.(g);return()=>{p=!1,S?.()}},[a]);const k=ft(e||s?.home===!0),d=k.sleeps===null?"":o(k.sleeps?"cloudSetup.sleepsWhenIdle":"cloudSetup.alwaysOn"),x=k.waking?o("cloudHome.waking"):"";return{bridge:a,current:s,cloudHome:e,open:u,error:y,onLine:d,waking:x,openMenu:()=>{!a||u||(f(""),l(!0),pt(a,{howTo:t,onClosed:r}).catch(()=>f(o("sidebar.switchServerError"))).finally(()=>l(!1)))},switchable:!!a&&s?.home!==!0}}function xt(e){const t=Ae(),r=n.jsx(bt,{...e});return Te(t)?n.jsx("div",{"data-switcher-beside-rail":!0,className:t.beside?"hidden":"contents md:hidden",children:r}):r}function bt({compact:e=!1,inline:t=!1,pill:r=!1,rail:a=!1,cloudHome:s=!1,owner:c=null,howTo:u=!1,place:l,onMenuClosed:y}){const f=l||o("cloudSetup.myCloud"),{bridge:k,current:d,open:x,error:b,onLine:p,waking:g,openMenu:S}=ht({cloudHome:s,howTo:u,onMenuClosed:y}),j=h=>p?`${h} · ${p}`:h;if(!k||d?.home===!0){if(!s&&!d?.home)return null;const h=c?o("sidebar.cloudOwner",{email:c}):"",v=`${j(f)}${h?` · ${h}`:""}`;return a?n.jsx("div",{"data-cloud-home-indicator":!0,"data-workspace-switcher":"rail",role:"img","aria-label":v,title:v,className:"flex size-9 items-center justify-center text-ink-secondary",children:n.jsx($,{size:18,"aria-hidden":"true"})}):t?n.jsxs("div",{"data-cloud-home-indicator":!0,"data-workspace-switcher":"inline",title:v,className:r?"flex h-8 min-w-0 items-center gap-1 rounded-full bg-raised/50 px-3 text-[13px] font-medium text-ink":"flex min-w-0 items-center gap-1.5 px-1.5 text-[13px] font-medium text-ink",children:[n.jsx($,{size:r?15:14,"aria-hidden":"true",className:r?"hidden shrink-0 text-ink-secondary @max-[124px]/sidebar-top:block":"shrink-0 text-ink-secondary"}),n.jsx("span",{className:r?"min-w-0 truncate @max-[124px]/sidebar-top:hidden":"min-w-0 truncate",children:f}),(p||h)&&n.jsxs("span",{className:"sr-only",children:[p?` · ${p}`:"",h?` · ${h}`:""]})]}):n.jsx("div",{"data-cloud-home-indicator":!0,className:I("py-1.5",e?"px-2":"px-3"),children:n.jsxs("div",{title:v,className:I("flex items-center gap-2 py-2 text-[13px] font-medium text-ink",e?"justify-center px-1":"px-2"),children:[n.jsx($,{size:16,"aria-hidden":"true",className:"shrink-0 text-ink-secondary"}),e?n.jsx("span",{className:"sr-only",children:v}):n.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[f,p&&n.jsx(oe,{text:p}),h&&n.jsx("span",{className:"block truncate text-[12px] font-normal text-ink-secondary",children:h})]})]})})}const C=d?.profileName??(d?.local&&!d.localPath?o("place.local"):d?.name)??(s?f:o("sidebar.servers")),w=d?.local===!1||s&&!d?$:_e,T=s?j(C):C,E=d?.origin?`${T} · ${d.origin}`:T,P=o("sidebar.switchServer",{name:T});return a?n.jsxs("div",{"data-workspace-switcher":"rail",className:"relative",children:[n.jsx("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:I(dt,"aria-expanded:bg-raised"),style:{WebkitAppRegion:"no-drag"},children:M(d?.color)?n.jsx(W,{color:d?.color,size:18}):n.jsx(w,{size:18,"aria-hidden":"true"})}),b&&n.jsx("p",{role:"alert",className:"absolute bottom-0 left-full z-40 ml-2 w-56 rounded-md bg-menu px-2 py-1 text-[11px] text-danger shadow-lg",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"absolute bottom-0 left-full z-40 ml-2 w-56 rounded-md bg-menu px-2 py-1 text-[11px] text-ink-secondary shadow-lg",children:g})]}):t?n.jsxs("div",{"data-workspace-switcher":"inline",className:"flex min-w-0",children:[n.jsxs("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:r?"flex h-8 min-w-0 max-w-full items-center gap-1 overflow-hidden rounded-full bg-raised/50 pl-2.5 pr-1.5 text-left text-[13px] font-medium text-ink hover:bg-raised aria-expanded:bg-raised focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus":"flex h-7 min-w-0 max-w-full items-center gap-1.5 overflow-hidden rounded-md px-1.5 text-left text-[13px] font-medium text-ink hover:bg-control focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",style:{WebkitAppRegion:"no-drag"},children:[M(d?.color)?n.jsx(W,{color:d?.color,size:16}):n.jsx(w,{size:r?15:14,"aria-hidden":"true","data-switcher-icon":!0,className:r?"hidden shrink-0 text-ink-secondary @max-[124px]/sidebar-top:block":"shrink-0 text-ink-secondary"}),n.jsx("span",{className:r?"min-w-0 truncate @max-[124px]/sidebar-top:hidden":"min-w-0 truncate @max-[96px]/sidebar-top:hidden",children:C}),n.jsx(ne,{size:r?12:11,"aria-hidden":"true",className:r?"shrink-0 text-ink-tertiary":"shrink-0 text-ink-secondary"})]}),b&&n.jsx("p",{role:"alert",className:"absolute right-2 top-full z-40 mt-1 w-56 max-w-[calc(100%-1rem)] rounded-md bg-menu px-2 py-1 text-[11px] text-danger shadow-lg",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"absolute right-2 top-full z-40 mt-1 w-56 max-w-[calc(100%-1rem)] rounded-md bg-menu px-2 py-1 text-[11px] text-ink-secondary shadow-lg",children:g})]}):n.jsxs("div",{className:I("py-1.5",e?"px-2":"px-3"),children:[n.jsxs("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:I("flex w-full items-center gap-2 rounded-lg py-2 text-left text-[13px] font-medium text-ink hover:bg-control focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",e?"justify-center px-1":"px-2"),style:{WebkitAppRegion:"no-drag"},children:[M(d?.color)?n.jsx(W,{color:d?.color,size:20}):n.jsx(w,{size:16,className:"shrink-0 text-ink-secondary"}),!e&&n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[C,s&&p&&n.jsx(oe,{text:p})]}),n.jsx(ne,{size:13,className:"shrink-0 text-ink-secondary"})]})]}),b&&n.jsx("p",{role:"alert",className:"mt-1 text-[11px] text-danger",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"mt-1 text-[11px] text-ink-secondary",children:g})]})}function gt(e){const t=e&&typeof e=="object"?e.membership:void 0,r=t&&typeof t=="object"?t:{};let a=null;if(typeof r.peopleUrl=="string")try{new URL(r.peopleUrl).protocol==="https:"&&(a=r.peopleUrl)}catch{a=null}return{authority:r.authority==="portal"?"portal":"local",pairingCodes:r.pairingCodes!==!1,peopleUrl:a}}const un=()=>({type:"toggleAppSettings",open:!0,section:"companion",phonePairing:!0});function dn(e){const t=typeof window>"u"?void 0:window.ogb;return yt({companion:!!t?.companion,remoteClient:t?.remoteClient?.active===!0,cloudHome:e})}function yt(e){return e.cloudHome?"cloud":e.companion&&!e.remoteClient?"computer":"server"}const kt={computer:"sidebar.menu.connectPhone.computer",cloud:"sidebar.menu.connectPhone.cloud",server:"sidebar.menu.connectPhone.server"};function pn(e,t){const r=t?.session?.kind==="session"?t.session.team?.name:void 0;return r?{target:e,subtitleKey:"sidebar.menu.connectPhone.team",team:r}:e!=="computer"&&!(t&&t.pairingCodes&&he(t.session))?null:{target:e,subtitleKey:kt[e]}}function mn(e){return Oe(e).kind!=="paid"||Re(e)?null:e?.status==="connected"&&e.machine?.status==="ready"?"ready":"not-ready"}function fn(e,t){if(!e)return[];const r={...e,id:"here"};return e.target!=="computer"||!t?[r]:t==="not-ready"?[{...r,noteKey:"sidebar.menu.connectPhone.cloudNotReady"}]:[{id:"cloud",target:"cloud",subtitleKey:"sidebar.menu.connectPhone.cloudAlwaysOn"},r]}let se=null;function hn(e=fetch){return se??=F(e).then(async t=>{if(!he(t))return{session:t,pairingCodes:!1};const r=await e("/api/config",{credentials:"same-origin"}).then(a=>a.ok?a.json():null).catch(()=>null);return{session:t,pairingCodes:gt(r).pairingCodes}}),se}const wt="data-phone-pairing-action";function xn(e,t=r=>window.requestAnimationFrame(r)){return e?(t(()=>{e.scrollIntoView?.({block:"start"}),(e.querySelector(`[${wt}]:not([disabled])`)??e).focus({preventScroll:!0})}),!0):!1}function bn(e){const t=new URL(e);return t.searchParams.get("desktop-settings")!=="phone"?null:(t.searchParams.delete("desktop-settings"),`${t.pathname}${t.search}${t.hash}`)}function X(e){const t=new URLSearchParams(e);if(t.get("desktop-settings")==="phone")return"/?desktop-settings=phone";const r=t.get("next");return r&&/^\/(?!\/)/.test(r)&&!r.startsWith("/pair")&&!/[\\\s]/.test(r)?r:"/"}const vt="23456789ABCDEFGHJKLMNPQRSTUVWXYZ",jt=12,Nt="omb_pair_",St=/^omb_pair_[A-Za-z0-9_-]{43}$/;function we(e){return e.toUpperCase().replace(/[^A-Z0-9]/g,"").replace(/0/g,"O").replace(/1/g,"I")}function Et(e){return we(e).match(/.{1,4}/g)?.join("-")??e}const Ct={emailCode:"serverError.pair.emailCode",oldCode:"serverError.pair.oldCode",scriptKey:"serverError.pair.scriptKey",notACode:"serverError.pair.notACode"};function Pt(e){let t;try{t=new URL(e)}catch{return null}const r=new URLSearchParams(t.hash.replace(/^#/,""));return t.searchParams.get("token")??t.searchParams.get("code")??r.get("code")}function Z(e){let t=e.trim();if(!t)return{kind:"empty"};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(t)){const s=Pt(t);if(!s)return{kind:"wrong",problem:"notACode"};t=s.trim()}if(t.startsWith("omb_sess_"))return{kind:"wrong",problem:"scriptKey"};if(t.startsWith(Nt))return St.test(t)?{kind:"credential",credential:t}:{kind:"wrong",problem:"notACode"};const r=t.replace(/[\s-]/g,"");if(/^\d{8}$/.test(r))return{kind:"wrong",problem:"emailCode"};if(/^\d{6}$/.test(r))return{kind:"wrong",problem:"oldCode"};const a=we(t);return a.length!==jt||[...a].some(s=>!vt.includes(s))?{kind:"wrong",problem:"notACode"}:{kind:"code",code:a}}const L="mt-1 w-full rounded-md border border-hairline/40 bg-inset px-3 py-2 text-[14px] text-ink outline-none focus:border-accent-border",ie="mt-5 w-full rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink disabled:opacity-50",O="mt-4 block text-[12px] font-medium text-ink-secondary";function It(e,t=typeof window<"u"&&!!window.ogb?.workspaces){return!!e&&t}function At({mode:e,sent:t,email:r,cloudHome:a}){return e==="email"?t?o("pair.intro.emailSent",{email:r}):o("pair.intro.email"):a?o("pair.intro.cloud",{app:A(),open:o("cloudHome.connect"),section:o("settings.section.cloudAccount")}):o("pair.intro.code")}function Tt(e){const t=Z(e);return t.kind==="wrong"&&t.problem!=="notACode"?o(Ct[t.problem]):null}function _t(e){const t=Z(e).kind;return t==="code"||t==="credential"}function Lt(e,t){const r=Z(t),a=r.kind==="code"?`&code=${encodeURIComponent(Et(r.code))}`:"";return`openmausbot://pair?address=${encodeURIComponent(e)}${a}`}function Ot(e){return e.protocol==="http:"&&!$e(e.hostname)}function le(e,t=Ye()){if(!e?.capabilities.cloudTeam||typeof t!="string")return null;try{const r=new URL(t),a=r.protocol==="http:"&&["127.0.0.1","localhost","[::1]"].includes(r.hostname);return(r.protocol==="https:"||a)&&!r.username&&!r.password&&!r.hash?r.href:null}catch{return null}}function Rt(e,t){return e?.capabilities.cloudTeam?e.label:e?.capabilities.cloudHome?o("pair.myCloud"):o(t==="email"?"pair.signInTo":"pair.connectTo",{name:e?.label??o("pair.thisOpenMausBot",{app:A()})})}function $t({team:e}){return n.jsx("main",{"data-team-left":!0,className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsx("p",{role:"status",className:"max-w-[420px] text-[16px]",children:o("homeLine.left",{name:e??o("pair.thisOpenMausBot",{app:A()})})})})}function D({initialCode:e,initialEmail:t=null,reason:r}){const[a,s]=i.useState(e??""),[c,u]=i.useState(xe()),[l,y]=i.useState(null),[f,k]=i.useState(null),[d,x]=i.useState(!1),[b,p]=i.useState(null),[g,S]=i.useState(()=>B()),[j,C]=i.useState(t&&!e?"email":"code"),[w,T]=i.useState(t??""),[E,P]=i.useState(""),[h,v]=i.useState(!1),[z,je]=i.useState(()=>It(e));i.useEffect(()=>{if(!z||!e)return;let m=!0;return V({code:e,label:c,attemptId:g}).then(N=>{if(m){if(N.ok){location.replace(X(location.search));return}je(!1),p(N.error)}}),()=>{m=!1}},[]),i.useEffect(()=>{fetch("/.well-known/openmausbot/environment").then(m=>m.ok?m.json():null).then(m=>{y(m)}).catch(()=>{y(null)}),F().then(k)},[]);const U=Je(f),Ne=l?.capabilities.emailSignIn===!0,_=l?.capabilities.cloudHome===!0,Se=!_&&l?.capabilities.cloudTeam!==!0,ee=Tt(a),R=typeof location<"u"&&typeof location.protocol=="string"?location:null;async function Ee(m){m.preventDefault(),x(!0),p(null);const N=await V({code:a,label:c,attemptId:g});if(x(!1),N.ok){location.replace(X(location.search));return}p(N.error)}async function Ce(m){m.preventDefault(),x(!0),p(null);const N=h?await at({email:w,code:E,label:c}):await rt(w);if(x(!1),!N.ok){p(N.error);return}if(h){location.replace(X(location.search));return}v(!0)}function te(m){C(m),p(null)}return n.jsxs("main",{className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:[n.jsx("div",{className:"absolute left-3 top-12 max-w-[280px]",children:n.jsx(xt,{})}),n.jsxs("div",{className:"w-full max-w-[420px]",children:[R&&Ot(R)?n.jsx("p",{role:"alert",className:"mb-4 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-[13px] text-warning",children:o("pair.notEncrypted")}):null,z?n.jsx("p",{role:"status",className:"text-[20px] font-semibold",children:_?o("pair.openingCloud"):o("pair.connectingTo",{name:l?.label??o("pair.thisOpenMausBot")})}):n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-[20px] font-semibold",children:Rt(l,j)}),n.jsxs("p",{className:"mt-1.5 text-[14px] leading-relaxed text-ink-secondary",children:[l&&!_?`${o("pair.version",{version:l.version,platform:l.platform})} `:"",At({mode:j,sent:h,email:w,cloudHome:_})]}),ae(r)&&!U?n.jsx("p",{className:"mt-3 text-[13px] text-ink-secondary",children:ae(r)}):null,b&&_&&e?n.jsx("p",{className:"mt-3 text-[13px] text-ink-secondary",children:o("pair.expired",{app:A(),open:o("cloudHome.connect"),section:o("settings.section.cloudAccount")})}):null,!U&&le(l)?n.jsxs("div",{"data-team-sign-in":!0,className:"mt-4 flex flex-col items-start gap-1.5",children:[n.jsx("a",{href:le(l),className:"rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink",children:o("pair.team.open",{team:l.label})}),n.jsx("p",{className:"text-[13px] text-ink-secondary",children:o("pair.team.openHint")})]}):null]}),z?null:U?n.jsxs("p",{className:"mt-4 text-[14px]",children:[o("pair.alreadyConnected")," ",n.jsx("a",{href:"/",className:"text-accent underline",children:o("pair.openApp")})]}):j==="email"?n.jsxs("form",{onSubmit:Ce,children:[n.jsx("label",{className:O,htmlFor:"signin-email",children:o("cloudBuy.signIn.email")}),n.jsx("input",{id:"signin-email",type:"email",value:w,onChange:m=>{T(m.target.value),v(!1),P("")},autoComplete:"email",inputMode:"email",spellCheck:!1,className:L}),h?n.jsxs(n.Fragment,{children:[n.jsx("label",{className:O,htmlFor:"signin-code",children:o("pair.emailCode")}),n.jsx("input",{id:"signin-code",value:E,onChange:m=>P(m.target.value),placeholder:"12345678",autoComplete:"one-time-code",inputMode:"numeric",spellCheck:!1,className:`${L} font-mono text-[15px] tracking-[0.12em]`}),n.jsx("label",{className:O,htmlFor:"signin-label",children:o("pair.deviceLabel")}),n.jsx("input",{id:"signin-label",value:c,onChange:m=>u(m.target.value),maxLength:80,className:L})]}):null,b?n.jsx("p",{className:"mt-3 text-[13px] text-danger",children:b}):null,n.jsx("button",{type:"submit",disabled:d||!w.includes("@")||h&&E.replace(/\D/g,"").length<8,className:ie,children:o(d?h?"pair.signingIn":"pair.sending":h?"pair.signIn":"cloudBuy.signIn.send")}),h?n.jsx("button",{type:"button",onClick:()=>v(!1),className:"mt-3 w-full text-[13px] text-ink-secondary underline",children:o("pair.resend")}):null,n.jsx("button",{type:"button",onClick:()=>te("code"),className:"mt-3 w-full text-[13px] text-ink-secondary underline",children:o("pair.useCode")})]}):n.jsxs("form",{onSubmit:Ee,children:[n.jsx("label",{className:O,htmlFor:"pair-code",children:o("pair.code")}),n.jsx("input",{id:"pair-code",value:a,onChange:m=>{s(m.target.value),S(B())},placeholder:"XXXX-XXXX-XXXX","aria-describedby":e&&a===e?"pair-code-from-link":void 0,autoComplete:"one-time-code",autoCapitalize:"characters",spellCheck:!1,className:`${L} font-mono text-[15px] tracking-[0.12em]`}),e&&a===e?n.jsx("p",{id:"pair-code-from-link",className:"mt-1 text-[12px] text-ink-secondary",children:o("pair.fromLink")}):null,n.jsx("label",{className:O,htmlFor:"pair-label",children:o("pair.deviceLabel")}),n.jsx("input",{id:"pair-label",value:c,onChange:m=>u(m.target.value),maxLength:80,className:L}),ee?n.jsx("p",{role:"alert",className:"mt-3 text-[13px] text-danger",children:ee}):b?n.jsx("p",{className:"mt-3 text-[13px] text-danger",children:b}):null,n.jsx("button",{type:"submit",disabled:d||!_t(a),className:ie,children:o(d?"pair.connecting":"pair.connect")}),R?.origin?n.jsxs("p",{className:"mt-3 text-[13px] text-ink-secondary",children:[o("pair.onPhone")," ",n.jsx("a",{href:Lt(R.origin,a),className:"text-accent underline",children:o("pair.openInApp",{app:A()})})]}):null,Se?n.jsxs("p",{className:"mt-3 text-[13px] text-ink-secondary",children:[o("pair.noCode")," ",n.jsx("code",{className:"select-all rounded bg-inset px-1.5 py-0.5 text-[12px] text-ink",children:"npx limixbot pair"})]}):null,Ne?n.jsxs("p",{className:"mt-5 border-t border-hairline/40 pt-4 text-[13px] text-ink-secondary",children:[o("pair.invitedByEmail")," ",n.jsx("button",{type:"button",onClick:()=>te("email"),className:"text-accent underline",children:o("pair.useEmail")})]}):null]})]})]})}const gn="cloud-welcome-done",Dt="unauthorized: you are no longer in this team",ce=[["reserving","cloudHome.step.reserving"],["storage","cloudHome.step.storage"],["starting","cloudHome.step.starting"],["checking","cloudHome.step.checking"]];function Ht({step:e}){const t=ce.findIndex(([r])=>r===e);return n.jsx("ol",{"data-cloud-setup":e,className:"flex flex-col gap-1 text-[13px]",children:ce.map(([r,a],s)=>n.jsx("li",{"aria-current":s===t?"step":void 0,className:s===t?"font-medium text-ink":s<t?"text-ink-secondary line-through decoration-ink-secondary/40":"text-ink-secondary",children:o(a)},r))})}const Bt={stopped:"cloudHome.stopped","payment-problem":"cloudHome.paymentProblem",failed:"cloudHome.failed"},ue={host:"cloudHome.unreachableHost",no_answer:"cloudHome.unreachable"};function Ft(e,t=Date.now()){const r=new Date(e).getFullYear()!==new Date(t).getFullYear();return new Intl.DateTimeFormat(De(),{day:"numeric",month:"long",...r?{year:"numeric"}:{}}).format(new Date(e))}function zt(e,t=Date.now()){const r=e?.name??null,a=(s,c)=>r?o(c,{name:r}):o(s);return e?.screen==="setup"?{title:a("homeScreen.setup","homeScreen.setupNamed"),body:o(e.slow?"cloudHome.slow":"homeScreen.setupBody"),reason:null,action:null,busy:!0}:e?.screen==="offline"?{title:a("homeScreen.offline","homeScreen.offlineNamed"),body:o("homeScreen.offlineBack"),reason:e.cause&&Object.hasOwn(ue,e.cause)?o(ue[e.cause]):e.reason??null,action:"retry",busy:!1}:e?.screen==="signin"?{title:a("homeScreen.signIn","homeScreen.signInNamed"),body:o(e.other?"homeScreen.signInOther":"homeScreen.signInEnded"),reason:null,action:"sign-in",busy:!1}:e?.screen==="plan"&&e.member&&e.machine!=="failed"?{title:a("homeScreen.plan","homeScreen.planNamed"),body:o("cloudHome.stoppedMember"),reason:null,action:null,busy:!1}:e?.screen==="plan"?{title:a("homeScreen.plan","homeScreen.planNamed"),body:o(Bt[e.machine]??"cloudHome.failed"),reason:null,action:e.machine==="failed"?null:"manage",busy:!1}:e?.screen==="ended"?{title:a("cloudHome.ended","cloudHome.endedNamed"),body:e.deleteAt?o("cloudHome.endedFiles",{date:Ft(e.deleteAt,t)}):null,reason:null,action:"buy",busy:!1}:e?.screen==="checkout"?{title:a("cloudHome.checkout","cloudHome.checkoutNamed"),body:null,reason:null,action:"continue",busy:!1}:e?.screen==="payment"?{title:a("cloudHome.payment","cloudHome.paymentNamed"),body:o("cloudHome.paymentBody"),reason:null,action:"card",busy:!1}:e?.screen==="waking"?{title:o("homeScreen.waking"),body:null,reason:null,action:null,busy:!0}:e?.screen==="moving"?{title:a("homeScreen.moving","homeScreen.movingNamed"),body:null,reason:null,action:null,busy:!0}:{title:a("homeScreen.opening","homeScreen.openingNamed"),body:null,reason:null,action:null,busy:!0}}const Ut={retry:"cloudHome.tryAgain",buy:"cloudHome.buyAgain",continue:"cloudHome.continue",card:"cloudHome.updateCard"};function Mt({name:e,remove:t}){const[r,a]=i.useState(!1),[s,c]=i.useState(!1),[u,l]=i.useState(null),y=()=>{c(!0),l(null),t().then(f=>{c(!1),f!=="removed"&&f!=="gone"&&(a(!1),l(f==="refused"?"refused":"failed"))},()=>{c(!1),a(!1),l("failed")})};return n.jsxs("div",{"data-home-remove":!0,className:"flex flex-col items-start gap-2",children:[r?n.jsxs("div",{role:"alertdialog","aria-label":o("rail.remove"),className:"flex flex-col gap-2 rounded-xl border border-hairline/70 bg-card/70 px-4 py-3",children:[n.jsx("p",{className:"text-[13px] leading-relaxed text-ink",children:o("rail.removeAsk",{name:e})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button","data-home-remove-confirm":!0,className:"ui-button ui-button-primary",disabled:s,onClick:y,children:o("rail.removeYes")}),n.jsx("button",{type:"button",className:"ui-button",disabled:s,onClick:()=>a(!1),children:o("rail.removeNo")})]})]}):n.jsx("button",{type:"button","data-home-remove-ask":!0,className:"text-[13px] text-ink-secondary underline-offset-2 hover:text-ink hover:underline",onClick:()=>{l(null),a(!0)},children:o("rail.remove")}),u&&n.jsx("p",{role:"alert",className:"text-[13px] text-danger",children:o(u==="refused"?"rail.removeRefused":"rail.removeFailed")})]})}function Wt({bridge:e,manage:t}){const[r,a]=i.useState(null),[s,c]=i.useState(!1);i.useEffect(()=>{let x=!0;const b=e.onState(g=>a(g)),p=()=>{e.retry().then(g=>{x&&a(g)}).catch(()=>{})};return e.state().then(g=>{x&&a(g)}).catch(()=>{}).then(p),window.addEventListener("online",p),window.addEventListener("focus",p),()=>{x=!1,b(),window.removeEventListener("online",p),window.removeEventListener("focus",p)}},[e]);const u=zt(r),l=x=>{c(!1),x().catch(()=>c(!0))},y=window.ogb?.cloudAdd?.reopen,f={retry:()=>e.retry().then(x=>a(x)),...t?{manage:t,buy:t,card:t,continue:async()=>{y&&await y().catch(()=>!1)||await t()}}:{}},k=u.action&&u.action!=="sign-in"&&u.action!=="manage"?u.action:null,d=(r?.screen==="ended"||r?.screen==="payment")&&r.removable===!0&&typeof e.remove=="function";return n.jsx("main",{"data-home-screen":r?.screen??"opening",className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",style:{WebkitAppRegion:"drag"},children:n.jsxs("div",{className:"flex w-full max-w-[420px] flex-col items-start gap-3",style:{WebkitAppRegion:"no-drag"},children:[n.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[20px] font-semibold",children:[u.busy&&n.jsx("span",{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin rounded-full border-2 border-hairline border-t-accent"}),u.title]}),u.body&&n.jsx("p",{className:"text-[14px] leading-relaxed text-ink-secondary",children:u.body}),r?.screen==="setup"&&n.jsx(Ht,{step:r.step??"reserving"}),u.reason&&n.jsx("p",{"data-home-reason":!0,className:"text-[13px] leading-relaxed text-ink-secondary",children:u.reason}),u.action==="sign-in"&&n.jsx("button",{type:"button",className:"ui-button ui-button-primary mt-2",onClick:()=>l(()=>e.signIn()),children:o("homeScreen.signInButton")}),u.action==="manage"&&t&&n.jsx("button",{type:"button",className:"ui-button mt-2",onClick:()=>l(t),children:o("cloudAccount.manageInBrowser")}),k&&f[k]&&n.jsx("button",{type:"button","data-home-action":k,className:k==="retry"?"ui-button mt-2":"ui-button ui-button-primary mt-2",onClick:()=>l(f[k]),children:o(Ut[k])}),d&&n.jsx(Mt,{name:r.name??o("cloudSetup.myCloud"),remove:()=>e.remove()}),s&&n.jsx("p",{role:"alert",className:"text-[13px] text-danger",children:o("cloudAccount.actionFailed")})]})})}function Xt({bridge:e,fallback:t}){const[r,a]=i.useState(!1);return i.useEffect(()=>{e.repair().catch(()=>a(!0))},[e]),r?n.jsx(n.Fragment,{children:t}):n.jsx("main",{"data-home-screen":"opening",className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsx("p",{role:"status",className:"w-full max-w-[420px] text-[20px] font-semibold",children:o("homeScreen.opening")})})}const Q="omb.session-ended";let K=!1,G=null;const q=new Set;function yn(){K||G||(G=F().then(e=>{if(e.kind==="unauthenticated"){K=!0;try{sessionStorage.setItem(Q,"1")}catch{}for(const t of q)t()}}).finally(()=>{G=null}))}function de(){return K}function kn(){return i.useSyncExternalStore(e=>(q.add(e),()=>q.delete(e)),de,de)}function Gt(){try{return sessionStorage.getItem(Q)==="1"}catch{return!1}}function Vt(){try{sessionStorage.removeItem(Q)}catch{}}He();Be(Fe());ze(Ue());ot();Me(We());const H=Xe(),Kt=new Set(["/home","/pair","/desktop-viewer"]),ve=()=>me(()=>import("./App-D93hKk8l.js").then(e=>e.jI),__vite__mapDeps([0,1,2,3,4,5])).catch(e=>({default:()=>{throw e}})),qt=Kt.has(location.pathname)?null:ve(),Yt=()=>fetch("/.well-known/openmausbot/environment").then(e=>e.json()).then(e=>e.capabilities?.cloudTeam===!0&&typeof e.label=="string"?e.label:null,()=>null);async function Jt(){const e=window.ogb?.home;if(location.pathname==="/home"&&e)return n.jsx(Wt,{bridge:e,manage:window.ogb?.cloudPlan?.manage});if(location.pathname==="/pair"){const a=Qe();if(a){const s=await tt(a);return await H,s?n.jsx(st,{credential:a,owner:s.owner,team:s.team}):n.jsx(D,{initialCode:null,reason:o("pair.browser.signInFailed")})}return n.jsx(D,{initialCode:Ze(),initialEmail:et()})}const t=await F();if(t.kind==="unauthenticated"){if(await H,t.error===Dt)return n.jsx($t,{team:await Yt()});const a=n.jsx(D,{initialCode:null,reason:Gt()?o("pair.sessionEnded"):t.error});return e?n.jsx(Xt,{bridge:e,fallback:a}):a}if(Vt(),t.kind==="session"&&qe(t.teamSignIn),t.kind==="loopback"&&t.trust==="service")return await H,n.jsx(D,{initialCode:null,reason:o("pair.serviceTrust")});if(location.pathname==="/desktop-viewer"){const{DesktopViewer:a}=await me(async()=>{const{DesktopViewer:s}=await import("./DesktopViewer-D9jr2w9X.js");return{DesktopViewer:s}},__vite__mapDeps([6,1,2,7,8,5,4,9]));return n.jsx(a,{})}const{default:r}=await(qt??ve());return n.jsx(r,{})}document.title=A();Promise.all([Ge(),Jt(),H]).then(([,e])=>{Ve.createRoot(document.getElementById("root")).render(n.jsx(i.StrictMode,{children:n.jsx(Ke,{children:e})}))});export{kn as A,D as B,Ht as C,xt as D,tn as E,bn as F,on as P,ct as S,gt as a,xn as b,dn as c,lt as d,Y as e,fn as f,Qt as g,pn as h,he as i,mn as j,cn as k,hn as l,an as m,yn as n,pt as o,un as p,en as q,F as r,rn as s,ut as t,ht as u,sn as v,ln as w,it as x,nn as y,gn as z};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-DBQxC6tF.js","assets/styles-BcVNrxGE.js","assets/styles-D-yh7Z23.css","assets/PlacesRail-D510vk5R.js","assets/monitor-DOeLdhQc.js","assets/MenuMotion-CLF0GByT.js","assets/DesktopViewer-CfxFVwdn.js","assets/desktop-connection-Dfaq6k5a.js","assets/desktop-viewer-CF-OpSo0.js","assets/minimize-63hYzV5y.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as o,aq as Pe,r as i,j as n,S as pe,X as Ie,a as I,ar as Ae,as as Te,g as $,L as _e,a5 as M,F as W,ae as ne,D as Le,at as Oe,au as Re,p as A,av as $e,b as De,s as He,l as Be,m as Fe,q as ze,v as Ue,aw as Me,ax as We,y as Xe,x as Ge,z as Ve,P as Ke,_ as me}from"./styles-BcVNrxGE.js";function Qt(e,t){if(!t)return;if(t.kind!=="session")return t.kind==="loopback"?e:void 0;if(t.team||t.scopes.includes("admin"))return e;const r=t.email;if(r?.trim())return e?.email?.trim().toLowerCase()===r.trim().toLowerCase()?e:{email:r}}const fe="omb.team-sign-in";function qe(e){try{e&&globalThis.localStorage?.setItem(fe,e)}catch{}}function Ye(){try{return globalThis.localStorage?.getItem(fe)??null}catch{return null}}async function F(e=fetch){let t;try{t=await e("/api/auth/session",{credentials:"same-origin"})}catch(s){return{kind:"unreachable",error:s instanceof Error?s.message:String(s)}}const r=await t.json().catch(()=>({})),a=Object(r);return t.status===401||t.status===403?{kind:"unauthenticated",error:typeof a.error=="string"?a.error:`${t.status}`}:t.ok?a.kind==="session"&&typeof a.id=="string"?{kind:"session",id:a.id,label:typeof a.label=="string"?a.label:"",...typeof a.email=="string"?{email:a.email}:{},scopes:Array.isArray(a.scopes)?a.scopes.filter(s=>typeof s=="string"):[],expiresAt:typeof a.expiresAt=="number"?a.expiresAt:0,...typeof a.reactor=="string"?{reactor:a.reactor}:{},...typeof a.teamSignIn=="string"?{teamSignIn:a.teamSignIn}:{},...re(a.team)?{team:re(a.team),openedThreads:Array.isArray(a.openedThreads)?a.openedThreads.filter(s=>typeof s=="string"):[]}:{},...a.cloudGuest===!0?{cloudGuest:!0,openedThreads:Array.isArray(a.openedThreads)?a.openedThreads.filter(s=>typeof s=="string"):[]}:{}}:a.trust==="service"?{kind:"loopback",trust:"service"}:{kind:"loopback"}:{kind:"unreachable",error:`${t.status} ${t.statusText}`}}function re(e){const t=Object(e);return typeof t.id=="string"&&typeof t.name=="string"&&typeof t.role=="string"?{id:t.id,name:t.name,role:t.role}:null}function Je(e){return e?.kind==="session"||e?.kind==="loopback"&&e.trust!=="service"}function he(e){return e?e.kind==="loopback"?e.trust!=="service":e.kind==="session"&&e.scopes.includes("admin"):!1}function Ze(){const e=/[#&]code=([^&]+)/.exec(location.hash);return e?(history.replaceState(null,"",location.pathname+location.search),decodeURIComponent(e[1])):null}function Qe(){if(!/[#&]signin=/.test(location.hash))return null;const e=/[#&]signin=(omb_pair_[A-Za-z0-9_-]{43})(?:&|$)/.exec(location.hash);return history.replaceState(null,"",location.pathname+location.search),e?e[1]:null}function et(){const e=new URLSearchParams(location.search),t=e.get("email")?.trim().toLowerCase()??"";if(!t)return null;e.delete("email");const r=e.toString();return history.replaceState(null,"",location.pathname+(r?`?${r}`:"")+location.hash),/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(t)?t:null}function xe(e=navigator.userAgent){const t=/Edg\//.test(e)?"Edge":/OPR\//.test(e)?"Opera":/Chrome\//.test(e)?"Chrome":/Firefox\//.test(e)?"Firefox":/Safari\//.test(e)?"Safari":"Browser",r=/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?"Android":/Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"";return r?`${t} on ${r}`:t}function B(){return typeof crypto?.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,14)}`}function be(e,t){const r=Reflect.get(Object(e),"error");return Pe(e,typeof r=="string"?r:`${t.status} ${t.statusText}`)}async function V(e,t=fetch){let r;try{r=await t("/api/auth/pair",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({code:e.code,label:e.label,cookie:!0,attemptId:e.attemptId??B(),...e.browser?{browser:!0}:{}})})}catch(s){return{ok:!1,error:o("pair.unreachable",{error:s instanceof Error?s.message:String(s)})}}const a=await r.json().catch(()=>({}));return r.ok?{ok:!0}:{ok:!1,error:be(a,r)}}async function tt(e,t=fetch){try{const r=await t("/api/auth/pair",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({code:e,browser:!0,preview:!0})}),a=Object(await r.json().catch(()=>({}))),s=Reflect.get(a,"owner"),c=Reflect.get(a,"team");return r.ok&&typeof s=="string"&&s?{owner:s,...typeof c=="string"&&c.trim()?{team:c.trim()}:{}}:null}catch{return null}}function nt(e,t,r=fetch){return V({code:e,label:xe(),attemptId:t,browser:!0},r)}function en(e){const t=Object(e);return t.cloudHome===!0&&typeof t.owner=="string"&&t.owner?t.owner:null}async function ge(e,t,r){let a;try{a=await r(e,{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}catch(c){return{ok:!1,error:o("pair.unreachable",{error:c instanceof Error?c.message:String(c)})}}const s=await a.json().catch(()=>({}));return a.ok?{ok:!0}:{ok:!1,error:be(s,a)}}function rt(e,t=fetch){return ge("/api/auth/email/start",{email:e},t)}function at(e,t=fetch){return ge("/api/auth/email/verify",{email:e.email,code:e.code,label:e.label},t)}function ae(e){return!e||/through a proxy|loopback host required|cross-origin request|^40[13]$/i.test(e)?null:e}function ot(){window.ogb?.softwareRendering===!0&&(document.documentElement.dataset.softwareRendering="")}function st({credential:e,owner:t,team:r}){const[a]=i.useState(()=>B()),[s,c]=i.useState(!1),[u,l]=i.useState(null);async function y(){c(!0),l(null);const f=await nt(e,a);if(f.ok){location.replace("/");return}c(!1),l(f.error)}return n.jsx("main",{className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsxs("div",{className:"w-full max-w-[420px]",children:[n.jsx("h1",{className:"text-[20px] font-semibold",children:r?o("pair.browser.teamTitle",{team:r,owner:t}):o("pair.browser.title",{owner:t})}),n.jsx("p",{className:"mt-1.5 text-[14px] text-ink-secondary",children:o("pair.browser.notYou")}),u?n.jsx("p",{role:"alert",className:"mt-3 text-[13px] text-danger",children:u}):null,n.jsx("button",{type:"button",onClick:()=>{y()},disabled:s,className:"mt-5 w-full rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink disabled:opacity-50",children:o(s?"pair.signingIn":"pair.continue")})]})})}const Y="bg-composer ring-1 ring-inset ring-ink/[0.07]",it="bg-composer ring-[0.5px] ring-ink/10",tn=`${it} shadow-(--shadow-float)`,ye="transition-colors duration-[120ms] hover:bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]",lt=`${ye} aria-expanded:bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]`,nn="bg-[color-mix(in_srgb,var(--color-composer),var(--color-ink)_7%)]",rn="focus-visible:outline-2 focus-visible:-outline-offset-2! focus-visible:outline-focus",ke="flex size-9 shrink-0 items-center justify-center rounded-full text-ink/90",J="focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",ct=`${ke} ${Y} ${lt} ${J}`,an=`${ke} ${Y} ${ye} ${J}`,ut=`flex size-[26px] shrink-0 items-center justify-center rounded-lg text-ink-secondary transition-colors hover:bg-ink/[0.06] hover:text-ink aria-expanded:bg-ink/[0.06] aria-expanded:text-ink ${J}`,on="flex size-10 shrink-0 items-center justify-center rounded-full border border-hairline bg-card text-ink hover:bg-raised focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",dt="flex size-9 shrink-0 items-center justify-center rounded-xl text-ink-secondary hover:bg-raised/60 hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus";function sn({open:e,onToggle:t,corner:r=!1,ref:a}){return n.jsx("button",{ref:a,type:"button","data-sidebar-search-toggle":!0,onClick:t,"aria-label":o("sidebar.searchAria"),"aria-expanded":e,title:o("sidebar.searchAria"),className:r?ut:ct,children:n.jsx(pe,{size:r?17:18,strokeWidth:1.5,"aria-hidden":"true"})})}function ln({query:e,onQuery:t,onClose:r}){return n.jsx("div",{"data-sidebar-search-pill":!0,className:"px-3 pb-2 pt-0.5",children:n.jsxs("div",{className:I("flex h-[34px] items-center gap-2 rounded-full pl-3 pr-1.5 text-ink-secondary focus-within:ring-focus",Y),children:[n.jsx(pe,{size:15,"aria-hidden":"true",className:"shrink-0"}),n.jsx("input",{autoFocus:!0,value:e,onChange:a=>t(a.target.value),onKeyDown:a=>{a.key==="Escape"&&(a.preventDefault(),r())},placeholder:o("sidebar.searchAria"),"aria-label":o("sidebar.searchAria"),className:"min-w-0 flex-1 bg-transparent text-[13px] text-ink placeholder:text-ink-tertiary focus:outline-none"}),n.jsx("button",{type:"button",onClick:r,"aria-label":o("sidebar.searchClose"),title:o("sidebar.searchClose"),className:"flex size-6 shrink-0 items-center justify-center rounded-full text-ink-tertiary hover:bg-raised hover:text-ink focus-visible:outline focus-visible:outline-2 focus-visible:outline-focus",children:n.jsx(Ie,{size:14,"aria-hidden":"true"})})]})})}function pt(e,{howTo:t=!1,onClosed:r}={}){return e.menu(t?{from:"howto"}:void 0).finally(()=>{t&&r?.()})}function cn(e){Le("cloud_howto",{result:"closed"}),e({type:"cloudHowTo",open:!1})}function oe({text:e}){return n.jsxs("span",{className:"font-normal text-ink-secondary",children:[" · ",e]})}function mt(e){return e?.sleeps===!0?!0:e?.status==="paid"?!1:null}function ft(e){const t=e&&!window.ogb?.remoteClient?.active?window.ogb?.cloudPlan:void 0,r=e||window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[a,s]=i.useState(null),[c,u]=i.useState(!1);return i.useEffect(()=>{if(!t)return;let l=!0;return t.state().then(y=>{l&&s(mt(y))}).catch(()=>{}),()=>{l=!1}},[t]),i.useEffect(()=>r?.onState(l=>u(l.waking===!0)),[r]),{sleeps:t?a:null,waking:c}}function ht({cloudHome:e=!1,howTo:t=!1,onMenuClosed:r}){const a=window.ogb?.workspaces,[s,c]=i.useState(null),[u,l]=i.useState(!1),[y,f]=i.useState("");i.useEffect(()=>{let p=!0;const g=()=>{a?.state().then(j=>{p&&c(j)}).catch(()=>{})};g();const S=a?.onChanged?.(g);return()=>{p=!1,S?.()}},[a]);const k=ft(e||s?.home===!0),d=k.sleeps===null?"":o(k.sleeps?"cloudSetup.sleepsWhenIdle":"cloudSetup.alwaysOn"),x=k.waking?o("cloudHome.waking"):"";return{bridge:a,current:s,cloudHome:e,open:u,error:y,onLine:d,waking:x,openMenu:()=>{!a||u||(f(""),l(!0),pt(a,{howTo:t,onClosed:r}).catch(()=>f(o("sidebar.switchServerError"))).finally(()=>l(!1)))},switchable:!!a&&s?.home!==!0}}function xt(e){const t=Ae(),r=n.jsx(bt,{...e});return Te(t)?n.jsx("div",{"data-switcher-beside-rail":!0,className:t.beside?"hidden":"contents md:hidden",children:r}):r}function bt({compact:e=!1,inline:t=!1,pill:r=!1,rail:a=!1,cloudHome:s=!1,owner:c=null,howTo:u=!1,place:l,onMenuClosed:y}){const f=l||o("cloudSetup.myCloud"),{bridge:k,current:d,open:x,error:b,onLine:p,waking:g,openMenu:S}=ht({cloudHome:s,howTo:u,onMenuClosed:y}),j=h=>p?`${h} · ${p}`:h;if(!k||d?.home===!0){if(!s&&!d?.home)return null;const h=c?o("sidebar.cloudOwner",{email:c}):"",v=`${j(f)}${h?` · ${h}`:""}`;return a?n.jsx("div",{"data-cloud-home-indicator":!0,"data-workspace-switcher":"rail",role:"img","aria-label":v,title:v,className:"flex size-9 items-center justify-center text-ink-secondary",children:n.jsx($,{size:18,"aria-hidden":"true"})}):t?n.jsxs("div",{"data-cloud-home-indicator":!0,"data-workspace-switcher":"inline",title:v,className:r?"flex h-8 min-w-0 items-center gap-1 rounded-full bg-raised/50 px-3 text-[13px] font-medium text-ink":"flex min-w-0 items-center gap-1.5 px-1.5 text-[13px] font-medium text-ink",children:[n.jsx($,{size:r?15:14,"aria-hidden":"true",className:r?"hidden shrink-0 text-ink-secondary @max-[124px]/sidebar-top:block":"shrink-0 text-ink-secondary"}),n.jsx("span",{className:r?"min-w-0 truncate @max-[124px]/sidebar-top:hidden":"min-w-0 truncate",children:f}),(p||h)&&n.jsxs("span",{className:"sr-only",children:[p?` · ${p}`:"",h?` · ${h}`:""]})]}):n.jsx("div",{"data-cloud-home-indicator":!0,className:I("py-1.5",e?"px-2":"px-3"),children:n.jsxs("div",{title:v,className:I("flex items-center gap-2 py-2 text-[13px] font-medium text-ink",e?"justify-center px-1":"px-2"),children:[n.jsx($,{size:16,"aria-hidden":"true",className:"shrink-0 text-ink-secondary"}),e?n.jsx("span",{className:"sr-only",children:v}):n.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[f,p&&n.jsx(oe,{text:p}),h&&n.jsx("span",{className:"block truncate text-[12px] font-normal text-ink-secondary",children:h})]})]})})}const C=d?.profileName??(d?.local&&!d.localPath?o("place.local"):d?.name)??(s?f:o("sidebar.servers")),w=d?.local===!1||s&&!d?$:_e,T=s?j(C):C,E=d?.origin?`${T} · ${d.origin}`:T,P=o("sidebar.switchServer",{name:T});return a?n.jsxs("div",{"data-workspace-switcher":"rail",className:"relative",children:[n.jsx("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:I(dt,"aria-expanded:bg-raised"),style:{WebkitAppRegion:"no-drag"},children:M(d?.color)?n.jsx(W,{color:d?.color,size:18}):n.jsx(w,{size:18,"aria-hidden":"true"})}),b&&n.jsx("p",{role:"alert",className:"absolute bottom-0 left-full z-40 ml-2 w-56 rounded-md bg-menu px-2 py-1 text-[11px] text-danger shadow-lg",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"absolute bottom-0 left-full z-40 ml-2 w-56 rounded-md bg-menu px-2 py-1 text-[11px] text-ink-secondary shadow-lg",children:g})]}):t?n.jsxs("div",{"data-workspace-switcher":"inline",className:"flex min-w-0",children:[n.jsxs("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:r?"flex h-8 min-w-0 max-w-full items-center gap-1 overflow-hidden rounded-full bg-raised/50 pl-2.5 pr-1.5 text-left text-[13px] font-medium text-ink hover:bg-raised aria-expanded:bg-raised focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus":"flex h-7 min-w-0 max-w-full items-center gap-1.5 overflow-hidden rounded-md px-1.5 text-left text-[13px] font-medium text-ink hover:bg-control focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",style:{WebkitAppRegion:"no-drag"},children:[M(d?.color)?n.jsx(W,{color:d?.color,size:16}):n.jsx(w,{size:r?15:14,"aria-hidden":"true","data-switcher-icon":!0,className:r?"hidden shrink-0 text-ink-secondary @max-[124px]/sidebar-top:block":"shrink-0 text-ink-secondary"}),n.jsx("span",{className:r?"min-w-0 truncate @max-[124px]/sidebar-top:hidden":"min-w-0 truncate @max-[96px]/sidebar-top:hidden",children:C}),n.jsx(ne,{size:r?12:11,"aria-hidden":"true",className:r?"shrink-0 text-ink-tertiary":"shrink-0 text-ink-secondary"})]}),b&&n.jsx("p",{role:"alert",className:"absolute right-2 top-full z-40 mt-1 w-56 max-w-[calc(100%-1rem)] rounded-md bg-menu px-2 py-1 text-[11px] text-danger shadow-lg",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"absolute right-2 top-full z-40 mt-1 w-56 max-w-[calc(100%-1rem)] rounded-md bg-menu px-2 py-1 text-[11px] text-ink-secondary shadow-lg",children:g})]}):n.jsxs("div",{className:I("py-1.5",e?"px-2":"px-3"),children:[n.jsxs("button",{type:"button","aria-label":P,"aria-haspopup":"menu","aria-expanded":x,"data-cloud-home-indicator":s||void 0,"data-tour":"server-switcher",title:E,onClick:S,className:I("flex w-full items-center gap-2 rounded-lg py-2 text-left text-[13px] font-medium text-ink hover:bg-control focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",e?"justify-center px-1":"px-2"),style:{WebkitAppRegion:"no-drag"},children:[M(d?.color)?n.jsx(W,{color:d?.color,size:20}):n.jsx(w,{size:16,className:"shrink-0 text-ink-secondary"}),!e&&n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[C,s&&p&&n.jsx(oe,{text:p})]}),n.jsx(ne,{size:13,className:"shrink-0 text-ink-secondary"})]})]}),b&&n.jsx("p",{role:"alert",className:"mt-1 text-[11px] text-danger",children:b}),g&&!b&&n.jsx("p",{role:"status","data-cloud-waking":!0,className:"mt-1 text-[11px] text-ink-secondary",children:g})]})}function gt(e){const t=e&&typeof e=="object"?e.membership:void 0,r=t&&typeof t=="object"?t:{};let a=null;if(typeof r.peopleUrl=="string")try{new URL(r.peopleUrl).protocol==="https:"&&(a=r.peopleUrl)}catch{a=null}return{authority:r.authority==="portal"?"portal":"local",pairingCodes:r.pairingCodes!==!1,peopleUrl:a}}const un=()=>({type:"toggleAppSettings",open:!0,section:"companion",phonePairing:!0});function dn(e){const t=typeof window>"u"?void 0:window.ogb;return yt({companion:!!t?.companion,remoteClient:t?.remoteClient?.active===!0,cloudHome:e})}function yt(e){return e.cloudHome?"cloud":e.companion&&!e.remoteClient?"computer":"server"}const kt={computer:"sidebar.menu.connectPhone.computer",cloud:"sidebar.menu.connectPhone.cloud",server:"sidebar.menu.connectPhone.server"};function pn(e,t){const r=t?.session?.kind==="session"?t.session.team?.name:void 0;return r?{target:e,subtitleKey:"sidebar.menu.connectPhone.team",team:r}:e!=="computer"&&!(t&&t.pairingCodes&&he(t.session))?null:{target:e,subtitleKey:kt[e]}}function mn(e){return Oe(e).kind!=="paid"||Re(e)?null:e?.status==="connected"&&e.machine?.status==="ready"?"ready":"not-ready"}function fn(e,t){if(!e)return[];const r={...e,id:"here"};return e.target!=="computer"||!t?[r]:t==="not-ready"?[{...r,noteKey:"sidebar.menu.connectPhone.cloudNotReady"}]:[{id:"cloud",target:"cloud",subtitleKey:"sidebar.menu.connectPhone.cloudAlwaysOn"},r]}let se=null;function hn(e=fetch){return se??=F(e).then(async t=>{if(!he(t))return{session:t,pairingCodes:!1};const r=await e("/api/config",{credentials:"same-origin"}).then(a=>a.ok?a.json():null).catch(()=>null);return{session:t,pairingCodes:gt(r).pairingCodes}}),se}const wt="data-phone-pairing-action";function xn(e,t=r=>window.requestAnimationFrame(r)){return e?(t(()=>{e.scrollIntoView?.({block:"start"}),(e.querySelector(`[${wt}]:not([disabled])`)??e).focus({preventScroll:!0})}),!0):!1}function bn(e){const t=new URL(e);return t.searchParams.get("desktop-settings")!=="phone"?null:(t.searchParams.delete("desktop-settings"),`${t.pathname}${t.search}${t.hash}`)}function X(e){const t=new URLSearchParams(e);if(t.get("desktop-settings")==="phone")return"/?desktop-settings=phone";const r=t.get("next");return r&&/^\/(?!\/)/.test(r)&&!r.startsWith("/pair")&&!/[\\\s]/.test(r)?r:"/"}const vt="23456789ABCDEFGHJKLMNPQRSTUVWXYZ",jt=12,Nt="omb_pair_",St=/^omb_pair_[A-Za-z0-9_-]{43}$/;function we(e){return e.toUpperCase().replace(/[^A-Z0-9]/g,"").replace(/0/g,"O").replace(/1/g,"I")}function Et(e){return we(e).match(/.{1,4}/g)?.join("-")??e}const Ct={emailCode:"serverError.pair.emailCode",oldCode:"serverError.pair.oldCode",scriptKey:"serverError.pair.scriptKey",notACode:"serverError.pair.notACode"};function Pt(e){let t;try{t=new URL(e)}catch{return null}const r=new URLSearchParams(t.hash.replace(/^#/,""));return t.searchParams.get("token")??t.searchParams.get("code")??r.get("code")}function Z(e){let t=e.trim();if(!t)return{kind:"empty"};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(t)){const s=Pt(t);if(!s)return{kind:"wrong",problem:"notACode"};t=s.trim()}if(t.startsWith("omb_sess_"))return{kind:"wrong",problem:"scriptKey"};if(t.startsWith(Nt))return St.test(t)?{kind:"credential",credential:t}:{kind:"wrong",problem:"notACode"};const r=t.replace(/[\s-]/g,"");if(/^\d{8}$/.test(r))return{kind:"wrong",problem:"emailCode"};if(/^\d{6}$/.test(r))return{kind:"wrong",problem:"oldCode"};const a=we(t);return a.length!==jt||[...a].some(s=>!vt.includes(s))?{kind:"wrong",problem:"notACode"}:{kind:"code",code:a}}const L="mt-1 w-full rounded-md border border-hairline/40 bg-inset px-3 py-2 text-[14px] text-ink outline-none focus:border-accent-border",ie="mt-5 w-full rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink disabled:opacity-50",O="mt-4 block text-[12px] font-medium text-ink-secondary";function It(e,t=typeof window<"u"&&!!window.ogb?.workspaces){return!!e&&t}function At({mode:e,sent:t,email:r,cloudHome:a}){return e==="email"?t?o("pair.intro.emailSent",{email:r}):o("pair.intro.email"):a?o("pair.intro.cloud",{app:A(),open:o("cloudHome.connect"),section:o("settings.section.cloudAccount")}):o("pair.intro.code")}function Tt(e){const t=Z(e);return t.kind==="wrong"&&t.problem!=="notACode"?o(Ct[t.problem]):null}function _t(e){const t=Z(e).kind;return t==="code"||t==="credential"}function Lt(e,t){const r=Z(t),a=r.kind==="code"?`&code=${encodeURIComponent(Et(r.code))}`:"";return`openmausbot://pair?address=${encodeURIComponent(e)}${a}`}function Ot(e){return e.protocol==="http:"&&!$e(e.hostname)}function le(e,t=Ye()){if(!e?.capabilities.cloudTeam||typeof t!="string")return null;try{const r=new URL(t),a=r.protocol==="http:"&&["127.0.0.1","localhost","[::1]"].includes(r.hostname);return(r.protocol==="https:"||a)&&!r.username&&!r.password&&!r.hash?r.href:null}catch{return null}}function Rt(e,t){return e?.capabilities.cloudTeam?e.label:e?.capabilities.cloudHome?o("pair.myCloud"):o(t==="email"?"pair.signInTo":"pair.connectTo",{name:e?.label??o("pair.thisOpenMausBot",{app:A()})})}function $t({team:e}){return n.jsx("main",{"data-team-left":!0,className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsx("p",{role:"status",className:"max-w-[420px] text-[16px]",children:o("homeLine.left",{name:e??o("pair.thisOpenMausBot",{app:A()})})})})}function D({initialCode:e,initialEmail:t=null,reason:r}){const[a,s]=i.useState(e??""),[c,u]=i.useState(xe()),[l,y]=i.useState(null),[f,k]=i.useState(null),[d,x]=i.useState(!1),[b,p]=i.useState(null),[g,S]=i.useState(()=>B()),[j,C]=i.useState(t&&!e?"email":"code"),[w,T]=i.useState(t??""),[E,P]=i.useState(""),[h,v]=i.useState(!1),[z,je]=i.useState(()=>It(e));i.useEffect(()=>{if(!z||!e)return;let m=!0;return V({code:e,label:c,attemptId:g}).then(N=>{if(m){if(N.ok){location.replace(X(location.search));return}je(!1),p(N.error)}}),()=>{m=!1}},[]),i.useEffect(()=>{fetch("/.well-known/openmausbot/environment").then(m=>m.ok?m.json():null).then(m=>{y(m)}).catch(()=>{y(null)}),F().then(k)},[]);const U=Je(f),Ne=l?.capabilities.emailSignIn===!0,_=l?.capabilities.cloudHome===!0,Se=!_&&l?.capabilities.cloudTeam!==!0,ee=Tt(a),R=typeof location<"u"&&typeof location.protocol=="string"?location:null;async function Ee(m){m.preventDefault(),x(!0),p(null);const N=await V({code:a,label:c,attemptId:g});if(x(!1),N.ok){location.replace(X(location.search));return}p(N.error)}async function Ce(m){m.preventDefault(),x(!0),p(null);const N=h?await at({email:w,code:E,label:c}):await rt(w);if(x(!1),!N.ok){p(N.error);return}if(h){location.replace(X(location.search));return}v(!0)}function te(m){C(m),p(null)}return n.jsxs("main",{className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:[n.jsx("div",{className:"absolute left-3 top-12 max-w-[280px]",children:n.jsx(xt,{})}),n.jsxs("div",{className:"w-full max-w-[420px]",children:[R&&Ot(R)?n.jsx("p",{role:"alert",className:"mb-4 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-[13px] text-warning",children:o("pair.notEncrypted")}):null,z?n.jsx("p",{role:"status",className:"text-[20px] font-semibold",children:_?o("pair.openingCloud"):o("pair.connectingTo",{name:l?.label??o("pair.thisOpenMausBot")})}):n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-[20px] font-semibold",children:Rt(l,j)}),n.jsxs("p",{className:"mt-1.5 text-[14px] leading-relaxed text-ink-secondary",children:[l&&!_?`${o("pair.version",{version:l.version,platform:l.platform})} `:"",At({mode:j,sent:h,email:w,cloudHome:_})]}),ae(r)&&!U?n.jsx("p",{className:"mt-3 text-[13px] text-ink-secondary",children:ae(r)}):null,b&&_&&e?n.jsx("p",{className:"mt-3 text-[13px] text-ink-secondary",children:o("pair.expired",{app:A(),open:o("cloudHome.connect"),section:o("settings.section.cloudAccount")})}):null,!U&&le(l)?n.jsxs("div",{"data-team-sign-in":!0,className:"mt-4 flex flex-col items-start gap-1.5",children:[n.jsx("a",{href:le(l),className:"rounded-md bg-accent px-4 py-2 text-[14px] font-medium text-accent-ink",children:o("pair.team.open",{team:l.label})}),n.jsx("p",{className:"text-[13px] text-ink-secondary",children:o("pair.team.openHint")})]}):null]}),z?null:U?n.jsxs("p",{className:"mt-4 text-[14px]",children:[o("pair.alreadyConnected")," ",n.jsx("a",{href:"/",className:"text-accent underline",children:o("pair.openApp")})]}):j==="email"?n.jsxs("form",{onSubmit:Ce,children:[n.jsx("label",{className:O,htmlFor:"signin-email",children:o("cloudBuy.signIn.email")}),n.jsx("input",{id:"signin-email",type:"email",value:w,onChange:m=>{T(m.target.value),v(!1),P("")},autoComplete:"email",inputMode:"email",spellCheck:!1,className:L}),h?n.jsxs(n.Fragment,{children:[n.jsx("label",{className:O,htmlFor:"signin-code",children:o("pair.emailCode")}),n.jsx("input",{id:"signin-code",value:E,onChange:m=>P(m.target.value),placeholder:"12345678",autoComplete:"one-time-code",inputMode:"numeric",spellCheck:!1,className:`${L} font-mono text-[15px] tracking-[0.12em]`}),n.jsx("label",{className:O,htmlFor:"signin-label",children:o("pair.deviceLabel")}),n.jsx("input",{id:"signin-label",value:c,onChange:m=>u(m.target.value),maxLength:80,className:L})]}):null,b?n.jsx("p",{className:"mt-3 text-[13px] text-danger",children:b}):null,n.jsx("button",{type:"submit",disabled:d||!w.includes("@")||h&&E.replace(/\D/g,"").length<8,className:ie,children:o(d?h?"pair.signingIn":"pair.sending":h?"pair.signIn":"cloudBuy.signIn.send")}),h?n.jsx("button",{type:"button",onClick:()=>v(!1),className:"mt-3 w-full text-[13px] text-ink-secondary underline",children:o("pair.resend")}):null,n.jsx("button",{type:"button",onClick:()=>te("code"),className:"mt-3 w-full text-[13px] text-ink-secondary underline",children:o("pair.useCode")})]}):n.jsxs("form",{onSubmit:Ee,children:[n.jsx("label",{className:O,htmlFor:"pair-code",children:o("pair.code")}),n.jsx("input",{id:"pair-code",value:a,onChange:m=>{s(m.target.value),S(B())},placeholder:"XXXX-XXXX-XXXX","aria-describedby":e&&a===e?"pair-code-from-link":void 0,autoComplete:"one-time-code",autoCapitalize:"characters",spellCheck:!1,className:`${L} font-mono text-[15px] tracking-[0.12em]`}),e&&a===e?n.jsx("p",{id:"pair-code-from-link",className:"mt-1 text-[12px] text-ink-secondary",children:o("pair.fromLink")}):null,n.jsx("label",{className:O,htmlFor:"pair-label",children:o("pair.deviceLabel")}),n.jsx("input",{id:"pair-label",value:c,onChange:m=>u(m.target.value),maxLength:80,className:L}),ee?n.jsx("p",{role:"alert",className:"mt-3 text-[13px] text-danger",children:ee}):b?n.jsx("p",{className:"mt-3 text-[13px] text-danger",children:b}):null,n.jsx("button",{type:"submit",disabled:d||!_t(a),className:ie,children:o(d?"pair.connecting":"pair.connect")}),R?.origin?n.jsxs("p",{className:"mt-3 text-[13px] text-ink-secondary",children:[o("pair.onPhone")," ",n.jsx("a",{href:Lt(R.origin,a),className:"text-accent underline",children:o("pair.openInApp",{app:A()})})]}):null,Se?n.jsxs("p",{className:"mt-3 text-[13px] text-ink-secondary",children:[o("pair.noCode")," ",n.jsx("code",{className:"select-all rounded bg-inset px-1.5 py-0.5 text-[12px] text-ink",children:"npx limixbot pair"})]}):null,Ne?n.jsxs("p",{className:"mt-5 border-t border-hairline/40 pt-4 text-[13px] text-ink-secondary",children:[o("pair.invitedByEmail")," ",n.jsx("button",{type:"button",onClick:()=>te("email"),className:"text-accent underline",children:o("pair.useEmail")})]}):null]})]})]})}const gn="cloud-welcome-done",Dt="unauthorized: you are no longer in this team",ce=[["reserving","cloudHome.step.reserving"],["storage","cloudHome.step.storage"],["starting","cloudHome.step.starting"],["checking","cloudHome.step.checking"]];function Ht({step:e}){const t=ce.findIndex(([r])=>r===e);return n.jsx("ol",{"data-cloud-setup":e,className:"flex flex-col gap-1 text-[13px]",children:ce.map(([r,a],s)=>n.jsx("li",{"aria-current":s===t?"step":void 0,className:s===t?"font-medium text-ink":s<t?"text-ink-secondary line-through decoration-ink-secondary/40":"text-ink-secondary",children:o(a)},r))})}const Bt={stopped:"cloudHome.stopped","payment-problem":"cloudHome.paymentProblem",failed:"cloudHome.failed"},ue={host:"cloudHome.unreachableHost",no_answer:"cloudHome.unreachable"};function Ft(e,t=Date.now()){const r=new Date(e).getFullYear()!==new Date(t).getFullYear();return new Intl.DateTimeFormat(De(),{day:"numeric",month:"long",...r?{year:"numeric"}:{}}).format(new Date(e))}function zt(e,t=Date.now()){const r=e?.name??null,a=(s,c)=>r?o(c,{name:r}):o(s);return e?.screen==="setup"?{title:a("homeScreen.setup","homeScreen.setupNamed"),body:o(e.slow?"cloudHome.slow":"homeScreen.setupBody"),reason:null,action:null,busy:!0}:e?.screen==="offline"?{title:a("homeScreen.offline","homeScreen.offlineNamed"),body:o("homeScreen.offlineBack"),reason:e.cause&&Object.hasOwn(ue,e.cause)?o(ue[e.cause]):e.reason??null,action:"retry",busy:!1}:e?.screen==="signin"?{title:a("homeScreen.signIn","homeScreen.signInNamed"),body:o(e.other?"homeScreen.signInOther":"homeScreen.signInEnded"),reason:null,action:"sign-in",busy:!1}:e?.screen==="plan"&&e.member&&e.machine!=="failed"?{title:a("homeScreen.plan","homeScreen.planNamed"),body:o("cloudHome.stoppedMember"),reason:null,action:null,busy:!1}:e?.screen==="plan"?{title:a("homeScreen.plan","homeScreen.planNamed"),body:o(Bt[e.machine]??"cloudHome.failed"),reason:null,action:e.machine==="failed"?null:"manage",busy:!1}:e?.screen==="ended"?{title:a("cloudHome.ended","cloudHome.endedNamed"),body:e.deleteAt?o("cloudHome.endedFiles",{date:Ft(e.deleteAt,t)}):null,reason:null,action:"buy",busy:!1}:e?.screen==="checkout"?{title:a("cloudHome.checkout","cloudHome.checkoutNamed"),body:null,reason:null,action:"continue",busy:!1}:e?.screen==="payment"?{title:a("cloudHome.payment","cloudHome.paymentNamed"),body:o("cloudHome.paymentBody"),reason:null,action:"card",busy:!1}:e?.screen==="waking"?{title:o("homeScreen.waking"),body:null,reason:null,action:null,busy:!0}:e?.screen==="moving"?{title:a("homeScreen.moving","homeScreen.movingNamed"),body:null,reason:null,action:null,busy:!0}:{title:a("homeScreen.opening","homeScreen.openingNamed"),body:null,reason:null,action:null,busy:!0}}const Ut={retry:"cloudHome.tryAgain",buy:"cloudHome.buyAgain",continue:"cloudHome.continue",card:"cloudHome.updateCard"};function Mt({name:e,remove:t}){const[r,a]=i.useState(!1),[s,c]=i.useState(!1),[u,l]=i.useState(null),y=()=>{c(!0),l(null),t().then(f=>{c(!1),f!=="removed"&&f!=="gone"&&(a(!1),l(f==="refused"?"refused":"failed"))},()=>{c(!1),a(!1),l("failed")})};return n.jsxs("div",{"data-home-remove":!0,className:"flex flex-col items-start gap-2",children:[r?n.jsxs("div",{role:"alertdialog","aria-label":o("rail.remove"),className:"flex flex-col gap-2 rounded-xl border border-hairline/70 bg-card/70 px-4 py-3",children:[n.jsx("p",{className:"text-[13px] leading-relaxed text-ink",children:o("rail.removeAsk",{name:e})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button","data-home-remove-confirm":!0,className:"ui-button ui-button-primary",disabled:s,onClick:y,children:o("rail.removeYes")}),n.jsx("button",{type:"button",className:"ui-button",disabled:s,onClick:()=>a(!1),children:o("rail.removeNo")})]})]}):n.jsx("button",{type:"button","data-home-remove-ask":!0,className:"text-[13px] text-ink-secondary underline-offset-2 hover:text-ink hover:underline",onClick:()=>{l(null),a(!0)},children:o("rail.remove")}),u&&n.jsx("p",{role:"alert",className:"text-[13px] text-danger",children:o(u==="refused"?"rail.removeRefused":"rail.removeFailed")})]})}function Wt({bridge:e,manage:t}){const[r,a]=i.useState(null),[s,c]=i.useState(!1);i.useEffect(()=>{let x=!0;const b=e.onState(g=>a(g)),p=()=>{e.retry().then(g=>{x&&a(g)}).catch(()=>{})};return e.state().then(g=>{x&&a(g)}).catch(()=>{}).then(p),window.addEventListener("online",p),window.addEventListener("focus",p),()=>{x=!1,b(),window.removeEventListener("online",p),window.removeEventListener("focus",p)}},[e]);const u=zt(r),l=x=>{c(!1),x().catch(()=>c(!0))},y=window.ogb?.cloudAdd?.reopen,f={retry:()=>e.retry().then(x=>a(x)),...t?{manage:t,buy:t,card:t,continue:async()=>{y&&await y().catch(()=>!1)||await t()}}:{}},k=u.action&&u.action!=="sign-in"&&u.action!=="manage"?u.action:null,d=(r?.screen==="ended"||r?.screen==="payment")&&r.removable===!0&&typeof e.remove=="function";return n.jsx("main",{"data-home-screen":r?.screen??"opening",className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",style:{WebkitAppRegion:"drag"},children:n.jsxs("div",{className:"flex w-full max-w-[420px] flex-col items-start gap-3",style:{WebkitAppRegion:"no-drag"},children:[n.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[20px] font-semibold",children:[u.busy&&n.jsx("span",{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin rounded-full border-2 border-hairline border-t-accent"}),u.title]}),u.body&&n.jsx("p",{className:"text-[14px] leading-relaxed text-ink-secondary",children:u.body}),r?.screen==="setup"&&n.jsx(Ht,{step:r.step??"reserving"}),u.reason&&n.jsx("p",{"data-home-reason":!0,className:"text-[13px] leading-relaxed text-ink-secondary",children:u.reason}),u.action==="sign-in"&&n.jsx("button",{type:"button",className:"ui-button ui-button-primary mt-2",onClick:()=>l(()=>e.signIn()),children:o("homeScreen.signInButton")}),u.action==="manage"&&t&&n.jsx("button",{type:"button",className:"ui-button mt-2",onClick:()=>l(t),children:o("cloudAccount.manageInBrowser")}),k&&f[k]&&n.jsx("button",{type:"button","data-home-action":k,className:k==="retry"?"ui-button mt-2":"ui-button ui-button-primary mt-2",onClick:()=>l(f[k]),children:o(Ut[k])}),d&&n.jsx(Mt,{name:r.name??o("cloudSetup.myCloud"),remove:()=>e.remove()}),s&&n.jsx("p",{role:"alert",className:"text-[13px] text-danger",children:o("cloudAccount.actionFailed")})]})})}function Xt({bridge:e,fallback:t}){const[r,a]=i.useState(!1);return i.useEffect(()=>{e.repair().catch(()=>a(!0))},[e]),r?n.jsx(n.Fragment,{children:t}):n.jsx("main",{"data-home-screen":"opening",className:"flex min-h-screen items-center justify-center bg-app px-6 text-ink",children:n.jsx("p",{role:"status",className:"w-full max-w-[420px] text-[20px] font-semibold",children:o("homeScreen.opening")})})}const Q="omb.session-ended";let K=!1,G=null;const q=new Set;function yn(){K||G||(G=F().then(e=>{if(e.kind==="unauthenticated"){K=!0;try{sessionStorage.setItem(Q,"1")}catch{}for(const t of q)t()}}).finally(()=>{G=null}))}function de(){return K}function kn(){return i.useSyncExternalStore(e=>(q.add(e),()=>q.delete(e)),de,de)}function Gt(){try{return sessionStorage.getItem(Q)==="1"}catch{return!1}}function Vt(){try{sessionStorage.removeItem(Q)}catch{}}He();Be(Fe());ze(Ue());ot();Me(We());const H=Xe(),Kt=new Set(["/home","/pair","/desktop-viewer"]),ve=()=>me(()=>import("./App-DBQxC6tF.js").then(e=>e.jI),__vite__mapDeps([0,1,2,3,4,5])).catch(e=>({default:()=>{throw e}})),qt=Kt.has(location.pathname)?null:ve(),Yt=()=>fetch("/.well-known/openmausbot/environment").then(e=>e.json()).then(e=>e.capabilities?.cloudTeam===!0&&typeof e.label=="string"?e.label:null,()=>null);async function Jt(){const e=window.ogb?.home;if(location.pathname==="/home"&&e)return n.jsx(Wt,{bridge:e,manage:window.ogb?.cloudPlan?.manage});if(location.pathname==="/pair"){const a=Qe();if(a){const s=await tt(a);return await H,s?n.jsx(st,{credential:a,owner:s.owner,team:s.team}):n.jsx(D,{initialCode:null,reason:o("pair.browser.signInFailed")})}return n.jsx(D,{initialCode:Ze(),initialEmail:et()})}const t=await F();if(t.kind==="unauthenticated"){if(await H,t.error===Dt)return n.jsx($t,{team:await Yt()});const a=n.jsx(D,{initialCode:null,reason:Gt()?o("pair.sessionEnded"):t.error});return e?n.jsx(Xt,{bridge:e,fallback:a}):a}if(Vt(),t.kind==="session"&&qe(t.teamSignIn),t.kind==="loopback"&&t.trust==="service")return await H,n.jsx(D,{initialCode:null,reason:o("pair.serviceTrust")});if(location.pathname==="/desktop-viewer"){const{DesktopViewer:a}=await me(async()=>{const{DesktopViewer:s}=await import("./DesktopViewer-CfxFVwdn.js");return{DesktopViewer:s}},__vite__mapDeps([6,1,2,7,8,5,4,9]));return n.jsx(a,{})}const{default:r}=await(qt??ve());return n.jsx(r,{})}document.title=A();Promise.all([Ge(),Jt(),H]).then(([,e])=>{Ve.createRoot(document.getElementById("root")).render(n.jsx(i.StrictMode,{children:n.jsx(Ke,{children:e})}))});export{kn as A,D as B,Ht as C,xt as D,tn as E,bn as F,on as P,ct as S,gt as a,xn as b,dn as c,lt as d,Y as e,fn as f,Qt as g,pn as h,he as i,mn as j,cn as k,hn as l,an as m,yn as n,pt as o,un as p,en as q,F as r,rn as s,ut as t,ht as u,sn as v,ln as w,it as x,nn as y,gn as z};
|