uigraph 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -51
- package/dist/bin.mjs +1608 -59037
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
- package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
- package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
- package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
- package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
- package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
- package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
- package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
- package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
- package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
- package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
- package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
- package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
- package/dist/viewer/assets/button-DZj74qS7.js +1 -0
- package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
- package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
- package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
- package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
- package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
- package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
- package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
- package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
- package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
- package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
- package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
- package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
- package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
- package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
- package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
- package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
- package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
- package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
- package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
- package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
- package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
- package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
- package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
- package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
- package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
- package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
- package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
- package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
- package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
- package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
- package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
- package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
- package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
- package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
- package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
- package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
- package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
- package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
- package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
- package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
- package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
- package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
- package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
- package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
- package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
- package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
- package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
- package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
- package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
- package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
- package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
- package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
- package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
- package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
- package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
- package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
- package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
- package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
- package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
- package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
- package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
- package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
- package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
- package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
- package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
- package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
- package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
- package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
- package/dist/viewer/assets/index-CIf0GId3.js +74 -0
- package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
- package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
- package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
- package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
- package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
- package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
- package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
- package/dist/viewer/assets/input--C59pq6j.js +1 -0
- package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
- package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
- package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
- package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
- package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
- package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
- package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
- package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
- package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
- package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
- package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
- package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
- package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
- package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
- package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
- package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
- package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
- package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
- package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
- package/dist/viewer/assets/popover-476u3TN0.js +1 -0
- package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
- package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
- package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
- package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
- package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
- package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
- package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
- package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
- package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
- package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
- package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
- package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
- package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
- package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
- package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
- package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
- package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
- package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
- package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
- package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
- package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
- package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
- package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
- package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
- package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
- package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
- package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
- package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
- package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
- package/dist/viewer/assets/table-B4pFND-o.js +1 -0
- package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
- package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
- package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
- package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
- package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
- package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
- package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
- package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
- package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
- package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
- package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
- package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
- package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
- package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
- package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
- package/dist/viewer/index.html +10 -1
- package/package.json +57 -57
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- package/dist/agents.md +0 -28
- package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
- package/dist/auth-storage-BvNH97p9.mjs +0 -2180
- package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
- package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
- package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
- package/dist/cli-2R6QQFp1.mjs +0 -451
- package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
- package/dist/config-D8DMGzIq.mjs +0 -647
- package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
- package/dist/diagnostics-xdSgQR8t.mjs +0 -131
- package/dist/dist-BRyghrKX.mjs +0 -404
- package/dist/dist-D0EzrblG.mjs +0 -12161
- package/dist/dist-EKhnHWHG.mjs +0 -140221
- package/dist/dist-pQtuusFv.mjs +0 -1243
- package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
- package/dist/env-api-keys-uytNub6O.mjs +0 -122
- package/dist/error-body-FhmCtR7m.mjs +0 -101
- package/dist/esm-D5isprgl.mjs +0 -1533
- package/dist/esm-DnqE4pfM.mjs +0 -104876
- package/dist/execute-BoTKl80U.mjs +0 -1715
- package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
- package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
- package/dist/google-shared-2CyYa4VE.mjs +0 -33438
- package/dist/google-vertex-DZDUQPKa.mjs +0 -378
- package/dist/hash-DN7ukSfd.mjs +0 -16
- package/dist/headers-GhQHLk-3.mjs +0 -17
- package/dist/jiti-9kWALm4Y.mjs +0 -5439
- package/dist/jiti-loader-f21DrY1K.mjs +0 -27
- package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
- package/dist/json-parse-B2mHg7o7.mjs +0 -381
- package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
- package/dist/lib-Dj1gKQJc.mjs +0 -24379
- package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
- package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
- package/dist/models-DBdii9gQ.mjs +0 -1255
- package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
- package/dist/node-B0NU8X55.mjs +0 -2479
- package/dist/node-B8gaKm9g.mjs +0 -23
- package/dist/openai-I3_AqKDX.mjs +0 -17357
- package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
- package/dist/openai-completions-a_mH01ii.mjs +0 -994
- package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
- package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
- package/dist/openai-responses-a9lV_U7O.mjs +0 -270
- package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
- package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
- package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
- package/dist/pi-messages-B5ietIBq.mjs +0 -306
- package/dist/plan-prompt.md +0 -56
- package/dist/prompt.md +0 -44
- package/dist/provider-env-BJhgA66g.mjs +0 -37
- package/dist/provider-retry-DXYM7rVE.mjs +0 -79
- package/dist/runtime-DTkBxiaM.mjs +0 -2822
- package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
- package/dist/shell-836_JFnI.mjs +0 -162
- package/dist/source-CKPndhKl.mjs +0 -478
- package/dist/src-DNm2QRm3.mjs +0 -5028
- package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
- package/dist/token-DEUkymby.mjs +0 -56
- package/dist/token-util-Cx5S4eKt.mjs +0 -3
- package/dist/tool-DHDYqsyG.mjs +0 -6673
- package/dist/transform-messages-BClk99Vn.mjs +0 -477
- package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
- package/dist/typescript-Br-vsRJV.mjs +0 -6737
- package/dist/uuid-CNCZqNBb.mjs +0 -49
- package/dist/v2-1z8ijsD3.mjs +0 -6120
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
- package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
- package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
- package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
- package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
- package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
- package/dist/viewer/assets/button-DadqadpO.js +0 -1
- package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
- package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
- package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
- package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
- package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
- package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
- package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
- package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
- package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
- package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
- package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
- package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
- package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
- package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
- package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
- package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
- package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
- package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
- package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
- package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
- package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
- package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
- package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
- package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
- package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
- package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
- package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
- package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
- package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
- package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
- package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
- package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
- package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
- package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
- package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
- package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
- package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
- package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
- package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
- package/dist/viewer/assets/select-DDtnmSET.js +0 -1
- package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
- package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
- package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
- package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
- package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
- package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
- package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
- package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
- package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
- package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
- package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
- package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
- package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
- package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
- package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
- package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as V,l as k}from"./mermaid.core-BCRBv8Us.js";import{c as tt}from"./cytoscape.esm-CtNdOvlO.js";import{J as lt}from"./index-5E1tJ7yK.js";import{s as gt}from"./transform-BqqRT-Iy.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,J;function pt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,z;function vt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,c as s}from"./index-5E1tJ7yK.js";function o({className:e,...r}){return t.jsx("button",{className:s("bg-shading-gray hover:bg-destructive/10 text-paragraph hover:text-destructive flex size-10 items-center justify-center rounded-[0.75rem] transition-all",e),...r,children:t.jsx("svg",{fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"size-[60%] transition-all",children:t.jsx("path",{d:"M15.5281 4.02002L4.32812 15.22M4.32812 4.02002L15.5281 15.22",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})})}export{o as C};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import{p as ht}from"./chunk-JWPE2WC7-DDjyvUmZ.js";import{s as gt,g as $t,n as bt,m as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,d as kt,o as At,z as U,x as Q,A as Tt,W as ot}from"./mermaid.core-BCRBv8Us.js";import{p as Bt}from"./cynefin-OW5HDTMX-yz-uw9Kz.js";import"./index-5E1tJ7yK.js";import"./transform-BqqRT-Iy.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{At(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{ht(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,x=m*1.5*b*E(n+o*31+7),F=p.x+x,R=f,_=i.x-x;D+=` C${F},${R} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,x=m*1.5*b*E(n+o*37+11),F=f,R=p.y+x,_=f,z=i.y-x;D+=` C${F},${R} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Ft=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,x=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",x?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",x?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),x){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=x?22:14;B=u.cy+g}else B=u.cy+(x?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const h=P.node();if(h&&typeof h.getBBox=="function"){const G=h.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const h=P+tt*2,C=u.cx-h/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",h).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",h/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,h=w-g,C=Math.sqrt($*$+h*h),W=C*.15,G=-h/C,xt=$/C,et=M+G*W,nt=P+xt*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&A.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return`
|
|
2
|
-
.cynefinDomain {
|
|
3
|
-
stroke: none;
|
|
4
|
-
}
|
|
5
|
-
.cynefinDomainLabel {
|
|
6
|
-
font-size: ${t.domainFontSize}px;
|
|
7
|
-
font-weight: bold;
|
|
8
|
-
fill: ${t.labelColor};
|
|
9
|
-
}
|
|
10
|
-
.cynefinSubtitle {
|
|
11
|
-
font-size: ${t.itemFontSize-1}px;
|
|
12
|
-
fill: ${t.textColor};
|
|
13
|
-
font-style: italic;
|
|
14
|
-
}
|
|
15
|
-
.cynefinItem {
|
|
16
|
-
fill-opacity: 0.95;
|
|
17
|
-
stroke: ${t.boundaryColor};
|
|
18
|
-
stroke-width: 1;
|
|
19
|
-
}
|
|
20
|
-
.cynefinItemText {
|
|
21
|
-
font-size: ${t.itemFontSize}px;
|
|
22
|
-
fill: ${t.textColor};
|
|
23
|
-
}
|
|
24
|
-
.cynefinItemOverflow {
|
|
25
|
-
fill-opacity: 0.6;
|
|
26
|
-
stroke: ${t.boundaryColor};
|
|
27
|
-
stroke-width: 1;
|
|
28
|
-
stroke-dasharray: 3 2;
|
|
29
|
-
}
|
|
30
|
-
.cynefinBoundary {
|
|
31
|
-
stroke: ${t.boundaryColor};
|
|
32
|
-
stroke-width: ${t.boundaryWidth};
|
|
33
|
-
stroke-dasharray: 6 3;
|
|
34
|
-
}
|
|
35
|
-
.cynefinCliff {
|
|
36
|
-
stroke: ${t.cliffColor};
|
|
37
|
-
stroke-width: ${t.cliffWidth};
|
|
38
|
-
}
|
|
39
|
-
.cynefinConfusion {
|
|
40
|
-
stroke: ${t.boundaryColor};
|
|
41
|
-
stroke-width: 1.5;
|
|
42
|
-
stroke-dasharray: 4 2;
|
|
43
|
-
}
|
|
44
|
-
.cynefinArrowLine {
|
|
45
|
-
stroke: ${t.arrowColor};
|
|
46
|
-
stroke-width: ${t.arrowWidth};
|
|
47
|
-
fill: none;
|
|
48
|
-
}
|
|
49
|
-
.cynefinArrowHead {
|
|
50
|
-
fill: ${t.arrowColor};
|
|
51
|
-
stroke: none;
|
|
52
|
-
}
|
|
53
|
-
.cynefinArrowLabel {
|
|
54
|
-
font-size: ${t.itemFontSize-1}px;
|
|
55
|
-
fill: ${t.textColor};
|
|
56
|
-
}
|
|
57
|
-
.cynefinTitle {
|
|
58
|
-
font-size: ${t.domainFontSize+2}px;
|
|
59
|
-
font-weight: bold;
|
|
60
|
-
fill: ${t.labelColor};
|
|
61
|
-
}
|
|
62
|
-
`},"styles"),Gt=Ht,Ut={parser:It,db:Y,renderer:Vt,styles:Gt};export{Ut as diagram};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dashboard-diagrams-page-inner-Dh0yKh2A.js","assets/index-5E1tJ7yK.js","assets/index-m8s6_jQi.css","assets/common-Y7ySZBdh.js","assets/better-dialog-D3AAiahr.js","assets/button-DadqadpO.js","assets/iconBase-BoDZfJgC.js","assets/dialog-D_HtNS17.js","assets/nav-links-8vT2ixiI.js","assets/loader-circle-C5jZoM7X.js","assets/better-dialog-B58_5-Gn.css","assets/input-YvHTVS0E.js","assets/index-7XpV2DRw.js","assets/scroll-area-BodE-n7W.js","assets/ui-graph-logo-D4jRhd4z.js","assets/dashboard-layout-D36InAaB.js","assets/grid-scroll-body-CPqSxU6-.js","assets/popover-CN9ni1N3.js","assets/diagrams-C1xkRPqT.js","assets/use-debounced-value-Ba-kkCUY.js","assets/index-Dj_05fqk.js","assets/react-BNzYaZuG.js","assets/useQuery-B8yYhO0c.js","assets/section-loader-BzpYM_Nx.js","assets/super-logo-loader-DJYiRbCS.js","assets/actor-avatar-DqmoY8Xc.js","assets/avatar-BI7D-Aia.js","assets/git-BilAlIQ8.js","assets/better-delete-confirmation-modal-Dib31LVb.js","assets/super-circle-loader-D8MElOMh.js","assets/diagram-live-preview-i5doxXLH.js","assets/use-permissions-6JVET753.js","assets/calendar-C0xdI_ag.js","assets/format-BquKoU4D.js","assets/en-US-B1Lg1a1H.js","assets/useMutation-CmVaR9zz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as a,r,_ as s}from"./index-5E1tJ7yK.js";const t=r.lazy(()=>s(()=>import("./dashboard-diagrams-page-inner-Dh0yKh2A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35])).then(e=>({default:e.DashboardDiagramsPageInner})));function n(){return a.jsx(r.Suspense,{children:a.jsx(t,{})})}export{n as DashboardDiagramsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,r as d,j as e,L as w,c as g,t as p,S as v}from"./index-5E1tJ7yK.js";import{C as D}from"./common-Y7ySZBdh.js";import{B as C,a as y}from"./better-dialog-D3AAiahr.js";import{B as u}from"./button-DadqadpO.js";import{I as b}from"./input-YvHTVS0E.js";import{M as N}from"./nav-links-8vT2ixiI.js";import{DashboardPageSectionLayout as A}from"./index-7XpV2DRw.js";import{D as S,a as F,C as I}from"./diagrams-C1xkRPqT.js";import{u as _}from"./use-debounced-value-Ba-kkCUY.js";import{a as M}from"./index-Dj_05fqk.js";import{c as k}from"./react-BNzYaZuG.js";import{u as B}from"./useQuery-B8yYhO0c.js";import{S as E}from"./section-loader-BzpYM_Nx.js";import{A as P}from"./actor-avatar-DqmoY8Xc.js";import{B as L}from"./better-delete-confirmation-modal-Dib31LVb.js";import{D as O,a as R,b as Q,c as T}from"./scroll-area-BodE-n7W.js";import{D as z}from"./diagram-live-preview-i5doxXLH.js";import{u as G}from"./use-permissions-6JVET753.js";import{C as H}from"./calendar-C0xdI_ag.js";import{f as $}from"./format-BquKoU4D.js";import{u as j}from"./useMutation-CmVaR9zz.js";import"./dialog-D_HtNS17.js";import"./iconBase-BoDZfJgC.js";import"./loader-circle-C5jZoM7X.js";import"./dashboard-layout-D36InAaB.js";import"./grid-scroll-body-CPqSxU6-.js";import"./popover-CN9ni1N3.js";import"./super-logo-loader-DJYiRbCS.js";import"./avatar-BI7D-Aia.js";import"./git-BilAlIQ8.js";import"./super-circle-loader-D8MElOMh.js";import"./ui-graph-logo-D4jRhd4z.js";import"./en-US-B1Lg1a1H.js";const h=24,[V,W]=k(()=>{const t=x().id,[s,r]=d.useState(""),i=_(s),[n,o]=d.useState(0);d.useEffect(()=>{o(0)},[i]);const a=B(S,{fetchPolicy:"cache-and-network",variables:{orgId:t,folderId:null,teamId:null,search:i||null,sortBy:"name",sortDir:"asc",limit:h,offset:n*h}}),l=d.useMemo(()=>M(a.data?.diagrams.items??[]),[a.data?.diagrams.items]),c=a.data?.diagrams.totalCount??0,m=a.loading&&!a.data?.diagrams;return{diagrams:l,totalCount:c,pageSize:h,page:n,setPage:o,isLoading:m,search:s,setSearch:r}});function q({diagram:t}){const{canWrite:s}=G(),r=x().id,[i,n]=d.useState(!1),[o,a]=d.useState(!1),[l]=j(F,{awaitRefetchQueries:!0,refetchQueries:["Diagrams"]}),c=t.id?`/diagram/${t.id}`:"#",m=t.updatedAt?new Date(t.updatedAt):t.createdAt?new Date(t.createdAt):null;return e.jsxs("div",{className:"group relative",children:[e.jsxs(w,{target:"_blank",to:c,draggable:!1,className:"relative block cursor-pointer overflow-hidden rounded-[1.4525rem] bg-[#141925] shadow-[0_1px_3px_rgba(0,0,0,0.3),0_1px_2px_rgba(0,0,0,0.2)] ring-1 ring-[#2A3242] transition-all duration-300 hover:shadow-[0_0_0_3px_rgba(59,107,255,0.22),0_8px_24px_rgba(0,0,0,0.4)] hover:ring-2 hover:ring-[#3B6BFF]",children:[e.jsxs("div",{className:"relative aspect-[16/10] w-full bg-[#1A2030] transition-colors duration-300",children:[e.jsx(z,{diagramId:t.id}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t from-black/30 to-transparent"})]}),e.jsx("div",{className:"h-px bg-[#2A3242]"}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("h4",{className:"line-clamp-1 text-sm font-semibold text-[#F4F7FC]",children:t.name?t.name.charAt(0).toUpperCase()+t.name.slice(1):e.jsx("span",{className:"text-[#586378]",children:"Blank Diagram"})}),e.jsxs("div",{className:"mt-2 flex min-h-[1.75rem] items-center justify-between gap-2",children:[m?e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5 text-[#586378]",children:[e.jsx(H,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"text-[11px]",children:$(m,"dd MMM yyyy")})]}):e.jsx("span",{}),e.jsx(P,{actor:t.updatedByActor??t.createdByActor,commitHash:t.updatedByActor?t.updatedByCommitHash:t.createdByCommitHash,className:"shrink-0"})]})]})]}),e.jsxs(O,{open:i,onOpenChange:n,children:[e.jsx(R,{asChild:!0,children:e.jsx(u,{size:"icon",variant:"ghost",className:g("absolute top-2 right-2 h-7 w-7 rounded-lg bg-[#1E2533]/80 opacity-0 shadow-sm backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-[#2A3242]",i&&"opacity-100"),children:e.jsx(N,{className:"h-3.5 w-3.5 text-[#828DA3]"})})}),e.jsx(Q,{align:"end",children:e.jsx(T,{variant:"destructive",disabled:!s,onClick:()=>a(!0),children:"Delete"})})]}),e.jsx(L,{open:o,onOpenChange:a,title:"Do you want to delete this flow diagram?",description:"Deleting this flow diagram removes its files from the project and cannot be undone.",onConfirm:async()=>{try{await l({variables:{orgId:r,id:t.id}}),p.success("Diagram deleted"),a(!1)}catch(f){p.error(f instanceof Error?f.message:"Failed to delete diagram")}}})]})}function U(){const{diagrams:t,totalCount:s,pageSize:r,page:i,setPage:n,isLoading:o,search:a,setSearch:l}=W();return e.jsxs("div",{className:"space-y-6 pb-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(b,{value:a,onChange:c=>l(c.target.value),placeholder:"Search flows",className:"h-11 max-w-sm flex-1 rounded-[16px] border-[#2A3242] bg-transparent px-6 text-sm text-[#F4F7FC] shadow-none placeholder:text-[#586378] focus-visible:border-[#5C84FF]"})}),o?e.jsx(E,{label:"Loading flows..."}):t.length>0?e.jsx(J,{diagrams:t,page:i,pageSize:r,totalCount:s,onPageChange:n}):e.jsx(v,{label:a?"No flows match your search.":"The .uigraph artifacts have no diagrams."})]})}function Z(t,s){if(s<=5)return Array.from({length:s},(o,a)=>a);const r=[];r.push(0);const i=Math.max(1,t-1),n=Math.min(s-2,t+1);i>1&&r.push("...");for(let o=i;o<=n;o++)r.push(o);return n<s-2&&r.push("..."),r.push(s-1),r}function J({diagrams:t,page:s,pageSize:r,totalCount:i,onPageChange:n}){const o=Math.ceil(i/r);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid gap-4 pb-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:t.map(a=>e.jsx(q,{diagram:a},a.id))}),o>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[e.jsx(u,{preset:"outline",className:"h-8 px-3 text-sm",disabled:s===0,onClick:()=>n(s-1),children:"Previous"}),e.jsx("div",{className:"flex items-center gap-1",children:Z(s,o).map((a,l)=>a==="..."?e.jsx("span",{className:"flex h-8 w-8 items-center justify-center text-sm text-[#586378]",children:"…"},`ellipsis-${l}`):e.jsx("button",{onClick:()=>n(a),className:g("flex h-8 w-8 items-center justify-center rounded-lg text-sm transition-colors",a===s?"bg-primary text-white":"text-[#828DA3] hover:bg-[#2A3242]"),children:a+1},a))}),e.jsx(u,{preset:"outline",className:"h-8 px-3 text-sm",disabled:s===o-1,onClick:()=>n(s+1),children:"Next"})]})]})}function _e(){const t=x().id,[s,r]=d.useState(!1),[i,n]=d.useState(""),[o,{loading:a}]=j(I,{refetchQueries:["Diagrams"],awaitRefetchQueries:!0});async function l(){if(i.trim()===""){p.error("Name is required");return}try{const{data:c}=await o({variables:{orgId:t,input:{name:i.trim(),content:"{}"}}}),m=c?.createDiagram?.id;if(!m)throw new Error;window.open(`/diagram/${m}`,"_blank"),r(!1),n(""),p.success("Diagram created")}catch{p.error("Failed to create diagram")}}return e.jsx(V,{children:e.jsxs(A,{title:"System Flows",description:"Diagrams from your registered projects and ~/.uigraph.",crumbs:[{to:"/dashboard/diagrams",label:"Diagrams"}],headerContent:e.jsxs(u,{preset:"cta",onClick:()=>r(!0),children:[e.jsx(D,{}),"Create Flow"]}),children:[e.jsx(U,{}),e.jsx(C,{open:s,onOpenChange:r,children:e.jsx(y,{title:"Create Flow",description:"The flow is saved in ~/.uigraph and isn't part of any service.",footerSubmit:"Create Flow",footerSubmitLoading:a,onFooterSubmitClick:l,footerCancel:!0,children:e.jsx("form",{onSubmit:c=>{c.preventDefault(),l()},children:e.jsx(b,{value:i,onChange:c=>n(c.target.value),placeholder:"Enter flow name",className:"h-[56px] rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",autoComplete:"off"})})})})]})})}export{_e as DashboardDiagramsPageInner};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dashboard-docs-page-inner-Fs6G3oGo.js","assets/index-5E1tJ7yK.js","assets/index-m8s6_jQi.css","assets/common-Y7ySZBdh.js","assets/better-dialog-D3AAiahr.js","assets/button-DadqadpO.js","assets/iconBase-BoDZfJgC.js","assets/dialog-D_HtNS17.js","assets/nav-links-8vT2ixiI.js","assets/loader-circle-C5jZoM7X.js","assets/better-dialog-B58_5-Gn.css","assets/index-7XpV2DRw.js","assets/scroll-area-BodE-n7W.js","assets/ui-graph-logo-D4jRhd4z.js","assets/dashboard-layout-D36InAaB.js","assets/grid-scroll-body-CPqSxU6-.js","assets/popover-CN9ni1N3.js","assets/service-doc-preview-modal-bJ6tJ5YR.js","assets/component-icons-D1BDAuEt.js","assets/component-icons-BD8MpcyB.css","assets/input-YvHTVS0E.js","assets/textarea-MgxZ5x6-.js","assets/select-DDtnmSET.js","assets/chevron-down-R7pQzyLD.js","assets/check-XjanpAFg.js","assets/chevron-up-CRPypfOs.js","assets/uploads-BOQHX9l4.js","assets/zod-Dc4H6VVJ.js","assets/index-Dj_05fqk.js","assets/index-Bt2YHgxl.js","assets/doc-file-content-B06roi8L.js","assets/file-text-BvszilVL.js","assets/globe-Jl6eIZmG.js","assets/index-jm22RWpY.js","assets/index-DcEA6SIV.js","assets/mermaid.core-BCRBv8Us.js","assets/transform-BqqRT-Iy.js","assets/index-c6Bxcoqm.js","assets/index-BSyJbFDG.js","assets/katex-HP8lGamR.js","assets/doc-file-content-Cp579UoJ.css","assets/use-permissions-6JVET753.js","assets/use-debounced-value-Ba-kkCUY.js","assets/react-BNzYaZuG.js","assets/index-D7MEHpJf.js","assets/useQuery-B8yYhO0c.js","assets/useMutation-CmVaR9zz.js","assets/section-loader-BzpYM_Nx.js","assets/super-logo-loader-DJYiRbCS.js","assets/better-delete-confirmation-modal-Dib31LVb.js","assets/super-circle-loader-D8MElOMh.js","assets/calendar-C0xdI_ag.js","assets/format-BquKoU4D.js","assets/en-US-B1Lg1a1H.js","assets/download-CLdCXVsO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as r,r as e,_ as a}from"./index-5E1tJ7yK.js";const o=e.lazy(()=>a(()=>import("./dashboard-docs-page-inner-Fs6G3oGo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54])).then(s=>({default:s.DashboardDocsPageInner})));function n(){return r.jsx(e.Suspense,{children:r.jsx(o,{})})}export{n as DashboardDocsPage};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import{g as O,u as T,r as l,d as V,j as e,c as C,t as I,S as q}from"./index-5E1tJ7yK.js";import{C as K}from"./common-Y7ySZBdh.js";import{B}from"./better-dialog-D3AAiahr.js";import{B as S}from"./button-DadqadpO.js";import{M as G}from"./nav-links-8vT2ixiI.js";import{DashboardPageSectionLayout as Q}from"./index-7XpV2DRw.js";import{E as Z,S as J,C as X}from"./service-doc-preview-modal-bJ6tJ5YR.js";import{u as W}from"./use-permissions-6JVET753.js";import{u as Y}from"./use-debounced-value-Ba-kkCUY.js";import{a as R}from"./index-Dj_05fqk.js";import{c as ee}from"./react-BNzYaZuG.js";import{g as te}from"./index-D7MEHpJf.js";import{u as re}from"./useQuery-B8yYhO0c.js";import{u as E}from"./useMutation-CmVaR9zz.js";import{S as se}from"./section-loader-BzpYM_Nx.js";import{I as oe}from"./input-YvHTVS0E.js";import{B as ne}from"./better-delete-confirmation-modal-Dib31LVb.js";import{D as ae,a as ie,b as le,c as $}from"./scroll-area-BodE-n7W.js";import{e as z,g as L,a as de}from"./doc-file-content-B06roi8L.js";import{C as ce}from"./calendar-C0xdI_ag.js";import{f as me}from"./format-BquKoU4D.js";import{D as pe}from"./download-CLdCXVsO.js";import{T as ue}from"./uploads-BOQHX9l4.js";import"./dialog-D_HtNS17.js";import"./iconBase-BoDZfJgC.js";import"./loader-circle-C5jZoM7X.js";import"./dashboard-layout-D36InAaB.js";import"./grid-scroll-body-CPqSxU6-.js";import"./popover-CN9ni1N3.js";import"./component-icons-D1BDAuEt.js";import"./textarea-MgxZ5x6-.js";import"./select-DDtnmSET.js";import"./chevron-down-R7pQzyLD.js";import"./check-XjanpAFg.js";import"./chevron-up-CRPypfOs.js";import"./zod-Dc4H6VVJ.js";import"./index-Bt2YHgxl.js";import"./file-text-BvszilVL.js";import"./index-DcEA6SIV.js";import"./super-logo-loader-DJYiRbCS.js";import"./super-circle-loader-D8MElOMh.js";import"./ui-graph-logo-D4jRhd4z.js";import"./globe-Jl6eIZmG.js";import"./index-jm22RWpY.js";import"./mermaid.core-BCRBv8Us.js";import"./transform-BqqRT-Iy.js";import"./index-c6Bxcoqm.js";import"./index-BSyJbFDG.js";import"./katex-HP8lGamR.js";import"./en-US-B1Lg1a1H.js";const fe=te(`
|
|
2
|
-
query Docs(
|
|
3
|
-
$orgId: ID!
|
|
4
|
-
$folderId: ID
|
|
5
|
-
$teamId: ID
|
|
6
|
-
$search: String
|
|
7
|
-
$sortBy: String
|
|
8
|
-
$sortDir: String
|
|
9
|
-
$limit: Int
|
|
10
|
-
$offset: Int
|
|
11
|
-
) {
|
|
12
|
-
docs(
|
|
13
|
-
orgId: $orgId
|
|
14
|
-
folderId: $folderId
|
|
15
|
-
teamId: $teamId
|
|
16
|
-
search: $search
|
|
17
|
-
sortBy: $sortBy
|
|
18
|
-
sortDir: $sortDir
|
|
19
|
-
limit: $limit
|
|
20
|
-
offset: $offset
|
|
21
|
-
) {
|
|
22
|
-
totalCount
|
|
23
|
-
items {
|
|
24
|
-
id
|
|
25
|
-
orgId
|
|
26
|
-
folderId
|
|
27
|
-
teamId
|
|
28
|
-
fileAssetId
|
|
29
|
-
fileUrl
|
|
30
|
-
fileName
|
|
31
|
-
serviceName
|
|
32
|
-
fileType
|
|
33
|
-
description
|
|
34
|
-
contentHash
|
|
35
|
-
createdBy
|
|
36
|
-
updatedBy
|
|
37
|
-
createdAt
|
|
38
|
-
updatedAt
|
|
39
|
-
createdByActor {
|
|
40
|
-
id
|
|
41
|
-
type
|
|
42
|
-
name
|
|
43
|
-
email
|
|
44
|
-
avatarUrl
|
|
45
|
-
}
|
|
46
|
-
updatedByActor {
|
|
47
|
-
id
|
|
48
|
-
type
|
|
49
|
-
name
|
|
50
|
-
email
|
|
51
|
-
avatarUrl
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`),he=O(`
|
|
57
|
-
mutation CreateDoc($orgId: ID!, $input: CreateDocInput!) {
|
|
58
|
-
createDoc(orgId: $orgId, input: $input) {
|
|
59
|
-
id
|
|
60
|
-
fileName
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
`),xe=O(`
|
|
64
|
-
mutation DeleteDoc($orgId: ID!, $id: ID!) {
|
|
65
|
-
deleteDoc(orgId: $orgId, id: $id)
|
|
66
|
-
}
|
|
67
|
-
`),M=24,[ge,F]=ee(()=>{const t=T().id,[o,n]=l.useState(""),i=Y(o),[a,r]=l.useState(0);l.useEffect(()=>{r(0)},[i]);const s=re(fe,{fetchPolicy:"cache-and-network",variables:{orgId:t,folderId:null,teamId:null,search:i||null,sortBy:"name",sortDir:"asc",limit:M,offset:a*M}});function c(){return s.refetch()}const[p]=E(he,{onCompleted:c}),[w]=E(xe,{onCompleted:c}),x=l.useMemo(()=>R(s.data?.docs.items??[]),[s.data?.docs.items]),u=s.data?.docs.totalCount??0,f=s.loading&&!s.data?.docs;return{docs:x,totalCount:u,pageSize:M,page:a,setPage:r,isLoading:f,search:o,setSearch:n,createDoc:p,deleteDoc:w}});function ve({fileURL:t,fileType:o,fileName:n,fallback:i}){const a=o?.toLowerCase()||"",r=n?.toLowerCase()||"",[s,c]=l.useState(null),[p,w]=l.useState(null),[x,u]=l.useState(null),[f,D]=l.useState(null),[g,b]=l.useState(null),[v,N]=l.useState(null),k=a==="image"||/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(r),m=a==="pdf"||r.endsWith(".pdf"),h=a==="html"||r.endsWith(".html")||r.endsWith(".htm"),A=a==="markdown"||r.endsWith(".md")||r.endsWith(".markdown"),U=a==="audio"||/\.(mp3|wav|ogg|m4a|aac|flac|wma)$/i.test(r),H=a==="video"||/\.(mp4|mov|avi|wmv|flv|mkv|webm)$/i.test(r),P=z(o,n),y=P==="text"||P==="code";return l.useEffect(()=>{!t||!A||fetch(t).then(d=>d.text()).then(c).catch(()=>null)},[t,A]),l.useEffect(()=>{!t||!h||fetch(t).then(d=>d.text()).then(w).catch(()=>null)},[t,h]),l.useEffect(()=>{!t||!y||fetch(t).then(d=>d.text()).then(N).catch(()=>null)},[t,y]),l.useEffect(()=>{if(!t||!m)return;let d=null,_=!1;return fetch(t).then(j=>j.blob()).then(j=>{_||(d=URL.createObjectURL(j.type?j:new Blob([j],{type:"application/pdf"})),u(d))}).catch(()=>null),()=>{_=!0,d&&URL.revokeObjectURL(d),u(null)}},[t,m]),t?k?e.jsx("img",{src:t,alt:n||"",className:"h-full w-full object-cover"}):H?e.jsxs("div",{className:"relative h-full w-full",children:[e.jsx("video",{src:t,muted:!0,playsInline:!0,preload:"metadata",className:"h-full w-full object-cover",onLoadedMetadata:d=>b(d.currentTarget.duration)}),g!==null&&e.jsxs("span",{className:"absolute right-2 bottom-2 rounded-md bg-black/70 px-1.5 py-0.5 font-mono text-[11px] text-white",children:[Math.floor(g/60),":",Math.floor(g%60).toString().padStart(2,"0")]})]}):U?e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-3 [&_svg]:size-10 [&_svg]:shrink-0 [&_svg]:stroke-[1.15]",children:[L("audio"),f!==null&&e.jsxs("span",{className:"font-mono text-xs text-[#828DA3]",children:[Math.floor(f/60),":",Math.floor(f%60).toString().padStart(2,"0")]}),e.jsx("audio",{src:t,preload:"metadata",className:"hidden",onLoadedMetadata:d=>D(d.currentTarget.duration),children:e.jsx("track",{kind:"captions"})})]}):m||h?h&&p===null?e.jsx(e.Fragment,{children:i}):m&&x===null?e.jsx(e.Fragment,{children:i}):e.jsx("div",{className:"relative h-full w-full overflow-hidden",children:e.jsx("iframe",{src:m?`${x}#toolbar=0&navpanes=0&scrollbar=0&view=FitH`:void 0,srcDoc:h?p??void 0:void 0,className:"pointer-events-none absolute top-0 left-0",style:{width:"400%",height:"400%",transform:"scale(0.25)",transformOrigin:"0 0",border:"none",backgroundColor:h?"#ffffff":void 0},sandbox:h?"allow-same-origin allow-scripts":void 0,title:"preview"})}):A?e.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-gradient-to-br from-[#1A2030] to-[#141925] p-5",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-relaxed break-words whitespace-pre-wrap text-[#828DA3]",children:s?.slice(0,700)}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[#141925] to-transparent"})]}):y&&v!==null?e.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-gradient-to-br from-[#1A2030] to-[#141925] p-5",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-relaxed break-words whitespace-pre-wrap text-[#828DA3]",children:v.slice(0,700)}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[#141925] to-transparent"})]}):y&&v!==null?e.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-gradient-to-br from-[#1A2030] to-[#141925] p-5",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-relaxed break-words whitespace-pre-wrap text-[#828DA3]",children:v.slice(0,700)}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[#141925] to-transparent"})]}):e.jsx(e.Fragment,{children:i}):e.jsx(e.Fragment,{children:i})}function we(t,o){const n=t?.toLowerCase()||"",i=o?.toLowerCase()||"";return n==="pdf"||i.endsWith(".pdf")?"bg-red-100 text-red-700 border-red-200":n==="html"||i.endsWith(".html")||i.endsWith(".htm")?"bg-blue-100 text-blue-700 border-blue-200":n==="readme"||n==="markdown"||i.endsWith(".md")||i.endsWith(".markdown")?"bg-orange-100 text-orange-700 border-orange-200":"bg-[#1E2533] text-[#D2D9E6] border-[#2A3242]"}function be({doc:t}){const{canWrite:o}=W(),n=T().id,{deleteDoc:i}=F(),[a,r]=l.useState(!1),[s,c]=l.useState(!1),[p,w]=V(),x=p.get("open")===t.id;function u(N){w(k=>{const m=new URLSearchParams(k);return N&&m.set("open",t.id),N||m.delete("open"),m})}function f(){t.fileUrl&&window.open(t.fileUrl,"_blank")}function D(){t.fileUrl&&u(!0)}const g=t.updatedAt?new Date(t.updatedAt):t.createdAt?new Date(t.createdAt):null,b=z(t.fileType,t.fileName),v=b==="audio"?"[--width:min(90vw,38rem)]":b==="video"?"[--width:min(92vw,64rem)]":b==="image"?"[--width:min(92vw,72rem)]":"min-h-[95vh] [--width:min(95vw,100rem)]";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"group relative",children:[e.jsxs("div",{className:C("relative cursor-pointer overflow-hidden rounded-[1.4525rem] bg-[#141925] shadow-[0_1px_3px_rgba(0,0,0,0.07),0_1px_2px_rgba(0,0,0,0.04)] ring-1 ring-[#2A3242] transition-all duration-300 hover:shadow-[0_0_0_3px_rgba(1,90,235,0.18),0_8px_24px_rgba(0,0,0,0.10)] hover:ring-2 hover:ring-[#015AEB]",!t.fileUrl&&"cursor-default opacity-60"),onClick:t.fileUrl?D:void 0,children:[e.jsx("div",{className:"relative aspect-[16/10] w-full overflow-hidden bg-[#1E2533] transition-colors duration-300",children:e.jsx(ve,{fileURL:t.fileUrl,fileType:t.fileType,fileName:t.fileName,fallback:e.jsx("div",{className:"flex h-full w-full items-center justify-center [&_svg]:size-10 [&_svg]:shrink-0 [&_svg]:stroke-[1.15]",children:L(t.fileType??"")})})}),e.jsx("div",{className:"h-px bg-[#1E2533]"}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("h4",{className:"line-clamp-1 text-sm font-semibold text-[#F4F7FC]",children:t.fileName||"Untitled Document"}),e.jsx("p",{className:"text-paragraph mt-1 truncate text-xs",children:t.serviceName??"Standalone doc"}),e.jsxs("div",{className:"mt-2 flex min-h-[1.75rem] items-center justify-between gap-2",children:[e.jsx("span",{className:C("inline-flex shrink-0 items-center rounded-md border px-1.5 py-0.5 font-mono text-[10px] font-medium",we(t.fileType,t.fileName)),children:de(t.fileType??"")}),g&&e.jsxs("div",{className:"flex items-center gap-1.5 text-[#828DA3]",children:[e.jsx(ce,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"text-[11px]",children:me(g,"dd MMM yyyy")})]})]})]})]}),e.jsxs(ae,{open:a,onOpenChange:r,children:[e.jsx(ie,{asChild:!0,children:e.jsx(S,{size:"icon",variant:"ghost",className:C("absolute top-2 right-2 h-7 w-7 rounded-lg bg-[#1E2533]/80 opacity-0 shadow-sm backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-[#141925]",a&&"opacity-100"),children:e.jsx(G,{className:"h-3.5 w-3.5 text-[#555]"})})}),e.jsxs(le,{align:"end",children:[t.fileUrl&&e.jsxs(e.Fragment,{children:[e.jsxs($,{onClick:D,children:[e.jsx(Z,{className:"h-4 w-4"}),"Preview"]}),e.jsxs($,{onClick:f,children:[e.jsx(pe,{className:"h-4 w-4"}),"Download"]})]}),e.jsxs($,{variant:"destructive",disabled:!o,onClick:()=>c(!0),children:[e.jsx(ue,{className:"h-4 w-4"}),"Delete"]})]})]})]}),e.jsx(ne,{open:s,onOpenChange:c,title:"Do you want to delete this documentation?",description:"Deleting this documentation is a permanent action and cannot be undone. Please think carefully before proceeding.",onConfirm:async()=>{try{await i({variables:{orgId:n,id:t.id}}),c(!1),I.success("Documentation deleted successfully")}catch{I.error("Failed to delete documentation")}}}),e.jsx(B,{open:x,onOpenChange:u,className:v,children:e.jsx(J,{fileURL:t.fileUrl||void 0,fileName:t.fileName||void 0,fileType:t.fileType||void 0})})]})}function je(){const{docs:t,totalCount:o,pageSize:n,page:i,setPage:a,isLoading:r,search:s,setSearch:c}=F();return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(oe,{value:s,onChange:p=>c(p.target.value),placeholder:"Search docs",className:"h-11 max-w-sm flex-1 rounded-[16px] border-[#2A3242] bg-transparent px-6 text-sm text-[#F4F7FC] shadow-none placeholder:text-[#586378] focus-visible:border-[#5C84FF]"})}),r?e.jsx(se,{label:"Loading docs..."}):t.length>0?e.jsx(Ne,{docs:t,page:i,pageSize:n,totalCount:o,onPageChange:a}):e.jsx(q,{label:s?"No docs match your filters.":"No docs yet."})]})}function De(t,o){if(o<=5)return Array.from({length:o},(r,s)=>s);const n=[];n.push(0);const i=Math.max(1,t-1),a=Math.min(o-2,t+1);i>1&&n.push("...");for(let r=i;r<=a;r++)n.push(r);return a<o-2&&n.push("..."),n.push(o-1),n}function Ne({docs:t,page:o,pageSize:n,totalCount:i,onPageChange:a}){const r=Math.ceil(i/n);return e.jsxs("div",{className:"space-y-4 pb-4",children:[e.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:t.map(s=>e.jsx(be,{doc:s},s.id))}),r>1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[e.jsx(S,{preset:"outline",className:"h-8 px-3 text-sm",disabled:o===0,onClick:()=>a(o-1),children:"Previous"}),e.jsx("div",{className:"flex items-center gap-1",children:De(o,r).map((s,c)=>s==="..."?e.jsx("span",{className:"flex h-8 w-8 items-center justify-center text-sm text-[#586378]",children:"…"},`ellipsis-${c}`):e.jsx("button",{onClick:()=>a(s),className:C("flex h-8 w-8 items-center justify-center rounded-lg text-sm transition-colors",s===o?"bg-primary text-white":"text-[#828DA3] hover:bg-[#2A3242]"),children:s+1},s))}),e.jsx(S,{preset:"outline",className:"h-8 px-3 text-sm",disabled:o===r-1,onClick:()=>a(o+1),children:"Next"})]})]})}function jt(){return e.jsx(ge,{children:e.jsx(ye,{})})}function ye(){const t=T().id,{createDoc:o}=F(),{canWrite:n}=W(),[i,a]=l.useState(!1);return e.jsxs(Q,{title:"Documentation",description:"Docs from your registered projects and ~/.uigraph.",crumbs:[{to:"/dashboard/docs",label:"Docs"}],headerContent:e.jsxs(S,{preset:"cta",disabled:!n,onClick:()=>a(!0),children:[e.jsx(K,{}),"Upload"]}),children:[e.jsx(je,{}),e.jsx(B,{open:i,onOpenChange:a,children:e.jsx(X,{mode:"create",orgId:t,onSubmit:async r=>{try{await o({variables:{orgId:t,input:{fileName:r.fileName??"",fileType:r.fileType??"",description:r.description??"",fileAssetId:r.fileId??""}}}),I.success("Documentation uploaded successfully"),a(!1)}catch(s){throw console.error(s),I.error("Failed to upload documentation"),s}}})})]})}export{jt as DashboardDocsPageInner};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as u,n as l,j as e,L as t,U as g,c as i}from"./index-5E1tJ7yK.js";import{G as o}from"./grid-scroll-body-CPqSxU6-.js";import{r as j,q as c,s as p,T as d,n as h,o as x,t as f}from"./nav-links-8vT2ixiI.js";import{d as N}from"./scroll-area-BodE-n7W.js";import{P as v,a as y,b as k}from"./popover-CN9ni1N3.js";function A(){const s=u().pathname,a=l(r=>r.organizations.length>0),m=l(r=>r.user?.isServerAdmin),b=j.filter(r=>(a||r.id!=="/server")&&(!r.serverAdminOnly||m));return e.jsxs("aside",{className:"flex h-full min-h-0 flex-col gap-[1.31rem] bg-[#141925] py-4",children:[e.jsx("div",{className:"shrink-0 px-4",children:e.jsx(t,{to:"/dashboard",className:"flex items-center justify-center",children:e.jsx(g,{size:42})})}),e.jsxs(c,{delayDuration:400,children:[e.jsx("ul",{className:"no-scrollbar flex min-h-0 w-full flex-1 flex-col gap-3 overflow-y-auto px-2",children:b.map(r=>e.jsx(n,{to:r.id,label:r.label,icon:r.icon,isActive:r.isActive(s)},r.id))}),e.jsx("ul",{className:"shrink-0 px-2",children:e.jsx(n,{to:"/plans",label:"Cloud",icon:e.jsx(p,{}),isActive:s.startsWith("/plans")})})]})]})}function n(s){return e.jsx("li",{className:"relative block select-none",children:e.jsxs(d,{children:[e.jsx(h,{asChild:!0,children:e.jsxs(t,{to:s.to,className:i("block rounded-[0.75rem] p-1 transition-all",!s.isActive&&"cursor-pointer hover:bg-[#1E2533]",s.isActive&&"text-primary cursor-default"),children:[e.jsx("span",{className:i("relative mx-auto flex size-10 items-center justify-center bg-transparent text-2xl transition-all *:transition-all",s.isActive&&"bg-primary/5 rounded-[0.75rem]"),children:s.icon}),e.jsx("span",{className:"block text-center text-[10px]",children:s.label})]})}),e.jsx(x,{side:"right",children:s.label})]})})}function S(s){return e.jsxs(v,{children:[e.jsx(c,{delayDuration:400,children:e.jsxs(d,{children:[e.jsx(h,{asChild:!0,children:e.jsx(y,{asChild:!0,children:s.children})}),e.jsx(x,{side:"right",children:s.message})]})}),e.jsxs(k,{side:"right",align:"start",className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:s.label}),e.jsx("p",{className:"text-paragraph text-sm",children:s.message})]})]})}function P({children:s}){return e.jsxs("main",{className:"bg-shading-gray grid h-screen grid-cols-[5.25rem_1fr] grid-rows-[1fr] gap-2 overflow-hidden",children:[e.jsx(A,{}),s]})}function z({children:s}){return e.jsx(D,{crumbs:[{to:"/settings",label:"Settings"}],children:e.jsxs("div",{className:"grid h-full grid-cols-[15rem_1fr] gap-3 p-3",children:[e.jsxs("aside",{className:"border-stock bg-card block rounded-[0.75rem] border",children:[e.jsx("label",{className:"border-stock flex h-14 items-center border-b px-4",children:"Settings"}),e.jsx("ul",{className:"flex flex-col gap-2 px-4 py-2",children:f.map(a=>e.jsx("li",{className:"relative block select-none",children:e.jsx(S,{label:a.label,message:typeof a.disabled=="string"?a.disabled:"Not available in the local version",children:e.jsxs("button",{type:"button","aria-label":`${a.label}: ${a.disabled}`,className:"text-paragraph hover:bg-stock flex h-[2.4375rem] w-full cursor-pointer items-center rounded-[0.5rem] bg-transparent px-3 py-2",children:[e.jsx("span",{className:"block text-base",children:a.icon}),e.jsx("span",{className:"ml-2 block text-sm",children:a.label})]})})},a.id))})]}),e.jsx(o,{className:"border-stock bg-card rounded-[0.75rem] border",children:s})]})})}function D({children:s,crumbs:a}){return e.jsxs("div",{className:"grid h-full min-h-0 grid-rows-[auto_1fr] gap-[0.81rem] pt-3 pr-3",children:[e.jsx(N,{crumbs:a}),e.jsx(o,{className:"bg-shading min-h-0 rounded-t-[1.2rem]",children:s})]})}export{D,P as a,z as b,A as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as r}from"./index-5E1tJ7yK.js";import{P as s}from"./nav-links-8vT2ixiI.js";import{D as t}from"./dashboard-layout-D36InAaB.js";import"./iconBase-BoDZfJgC.js";import"./grid-scroll-body-CPqSxU6-.js";import"./scroll-area-BodE-n7W.js";import"./ui-graph-logo-D4jRhd4z.js";import"./popover-CN9ni1N3.js";function u(){return o.jsx(t,{crumbs:[{to:s.lens.dashboard,label:"Lens"}],children:o.jsx("div",{className:"flex h-full min-h-0 flex-col",children:o.jsx(r,{})})})}export{u as DashboardLensLayout};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as Re,u as Pe,r as x,j as e,c as y,t as Te}from"./index-5E1tJ7yK.js";import{S as W}from"./super-circle-loader-D8MElOMh.js";import{S as De}from"./section-loader-BzpYM_Nx.js";import{B as N}from"./button-DadqadpO.js";import{D as _e,a as Oe,b as Ge,c as ze}from"./scroll-area-BodE-n7W.js";import{H as Ye,y as Xe,z as He,B as Qe}from"./nav-links-8vT2ixiI.js";import{DashboardPageSectionLayout as Ve}from"./index-7XpV2DRw.js";import{u as Fe}from"./use-permissions-6JVET753.js";import{A as Ce,b as We,c as Be}from"./react-flow-wrapper-BPlRstyO.js";import{P as Se,C as Ue}from"./component-icons-D1BDAuEt.js";import{G as K}from"./grid-scroll-body-CPqSxU6-.js";import{u as qe,F as $e,M as Ke,a as de,b as me,c as ue,C as Ze,U as Je,D as et,d as tt,e as at,f as ot,g as rt,h as st,i as nt,j as it,k as ee,l as lt,m as te,n as ct,o as dt,p as mt,I as ut,q as pt,L as ht,r as xt,s as ft,t as bt,v as gt,G as jt}from"./linked-project-dot-Ds2uEmJ9.js";import{u as vt}from"./use-localstorage-DIisTx-J.js";import{a as X}from"./index-Dj_05fqk.js";import{c as yt}from"./react-BNzYaZuG.js";import{u as L}from"./useQuery-B8yYhO0c.js";import{u as C}from"./useMutation-CmVaR9zz.js";import{C as ae}from"./cross-button-5Sr5rWVP.js";import{I as oe}from"./input-YvHTVS0E.js";import{L as H}from"./textarea-MgxZ5x6-.js";import{P as re,a as se,b as ne}from"./popover-CN9ni1N3.js";import{u as ie,a as le,C as Q}from"./zod-Dc4H6VVJ.js";import{o as ce,s as V}from"./index-DcEA6SIV.js";import{S as pe,a as he,b as xe,c as fe,d as be}from"./select-DDtnmSET.js";import{m as B}from"./index-C_43VC19.js";import{H as Pt}from"./index-jm22RWpY.js";import"./super-logo-loader-DJYiRbCS.js";import"./iconBase-BoDZfJgC.js";import"./ui-graph-logo-D4jRhd4z.js";import"./dashboard-layout-D36InAaB.js";import"./index-HU5pz3kj.js";import"./mermaid.core-BCRBv8Us.js";import"./transform-BqqRT-Iy.js";import"./last-DXTTfs9a.js";import"./index-C0Rs3s9Z.js";import"./value-wA6veExk.js";import"./style-DgSU0bQl.js";import"./index-D7MEHpJf.js";import"./avatar-BI7D-Aia.js";import"./chevron-down-R7pQzyLD.js";import"./better-delete-confirmation-modal-Dib31LVb.js";import"./dialog-D_HtNS17.js";import"./check-XjanpAFg.js";import"./badge-870-A4Y6.js";import"./table-Bi4Auk9Z.js";import"./services-Crqkffr5.js";import"./common-Y7ySZBdh.js";import"./color-input-Efm-lxDy.js";import"./checkbox-BXpR079x.js";import"./en-US-B1Lg1a1H.js";import"./format-BquKoU4D.js";import"./endOfMonth-CMPv5yN4.js";import"./index-Bt2YHgxl.js";import"./uploads-BOQHX9l4.js";import"./index-BS94XVnd.js";import"./index-CzHjJWeV.js";import"./better-dialog-D3AAiahr.js";import"./loader-circle-C5jZoM7X.js";import"./index-c6Bxcoqm.js";import"./method-badge-DMYDKdDZ.js";import"./api-adapters-CnQpLiWI.js";import"./api-endpoints-DCA5GNpC.js";import"./diagrams-C1xkRPqT.js";import"./use-debounced-value-Ba-kkCUY.js";import"./link-2-C75goIOt.js";import"./flow-diagram-preview-T0Z4iMVU.js";import"./getRoundingMethod-DC1wW3rl.js";import"./quill-rCHj4fCw.js";import"./merge-Cy7YkrN7.js";import"./doc-file-content-B06roi8L.js";import"./file-text-BvszilVL.js";import"./globe-Jl6eIZmG.js";import"./index-BSyJbFDG.js";import"./katex-HP8lGamR.js";import"./service-doc-Dir8g83J.js";import"./chevron-up-CRPypfOs.js";const Ft=[["path",{d:"M12 17H8C5.17157 17 3.75736 17 2.87868 16.1213C2 15.2426 2 13.8284 2 11V9C2 6.17157 2 4.75736 2.87868 3.87868C3.75736 3 5.17157 3 8 3H16C18.8284 3 20.2426 3 21.1213 3.87868C21.9466 4.70398 21.9968 6.00173 21.9998 8.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 14V18C16 19.4142 16 20.1213 16.4393 20.5607C16.8787 21 17.5858 21 19 21C20.4142 21 21.1213 21 21.5607 20.5607C22 20.1213 22 19.4142 22 18V14C22 12.5858 22 11.8787 21.5607 11.4393C21.1213 11 20.4142 11 19 11C17.5858 11 16.8787 11 16.4393 11.4393C16 11.8787 16 12.5858 16 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M10 21H12.5V17L12 17M12 17V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],[Ct,k]=yt(()=>{const{frameId:l}=Re(),i=String(l),n=qe(),r=Pe()?.id,c=L($e,{fetchPolicy:"cache-first",variables:{orgId:r,id:i},skip:!r||!l}),a=c.data?.frameById??null,s=a?.mapId??"",m=L(Ke,{fetchPolicy:"cache-first",variables:{orgId:r,id:s},skip:!r||!s}),d=m.data?.map??null,b={orgId:r,mapId:s,frameId:i},v={skip:!r||!s},p=L(de,{fetchPolicy:"cache-and-network",variables:b,...v}),f=L(me,{fetchPolicy:"cache-and-network",variables:b,...v}),j=L(ue,{fetchPolicy:"cache-and-network",variables:b,...v}),[D,_]=x.useState(100),S=`focal-point-preset:${i}`,[A,P]=vt(S,null),[I,F]=x.useState(null),[E,O]=x.useState(null),o=I?.type??E?.type??null;function w(h){if(h==="group"){F(null),O({type:"group",position:null});return}if(O(null),h===null){F(null);return}F({type:h,position:null})}const G=[{query:de,variables:b}],R=[{query:me,variables:b}],t=[{query:ue,variables:b}],u={awaitRefetchQueries:!0},[g]=C(Ze,{...u,refetchQueries:G}),[z]=C(Je,{...u,refetchQueries:G}),[U]=C(et,{...u,refetchQueries:G}),[q]=C(tt,{...u,refetchQueries:R}),[we]=C(at,{...u,refetchQueries:R}),[Ne]=C(ot,{...u,refetchQueries:R}),[ke]=C(rt,{...u,refetchQueries:t}),[Me]=C(st,{...u,refetchQueries:t}),[Le]=C(nt,{...u,refetchQueries:t}),T=x.useMemo(()=>X(p.data?.focalPoints),[p.data?.focalPoints]),$=x.useMemo(()=>X(f.data?.frameGroups),[f.data?.frameGroups]),Ae=x.useMemo(()=>X(j.data?.frameLinks),[j.data?.frameLinks]),Ie=x.useMemo(()=>T.find(h=>h.id===n.focalPoint),[T,n.focalPoint]),M=x.useMemo(()=>$.find(h=>h.id===n.frameGroup),[$,n.frameGroup]),Ee=x.useMemo(()=>!M||T.length===0?[]:T.filter(h=>it({x:M.locationX,y:M.locationY,width:M.width,height:M.height},{x:h.locationX,y:h.locationY})),[T,M]);return{zoom:D,setZoom:_,preset:A,setPreset:P,newPoint:I,setNewPoint:F,drawRectMode:E,setDrawRectMode:O,activeTool:o,setActiveTool:w,canvasTarget:n,selectedFocalPoint:Ie,selectedFrameGroup:M,selectedFrameGroupPoints:Ee,orgId:r,mapId:s,frameId:i,frame:a,frameLoading:!a&&c.loading,map:d,mapLoading:!a&&c.loading||!d&&m.loading,focalPoints:T,frameGroups:$,frameLinks:Ae,createFocalPoint(h){return g({variables:{orgId:r,mapId:s,frameId:i,input:h}})},async updateFocalPoint(h,Y){await z({variables:{orgId:r,mapId:s,frameId:i,id:h,input:Y}})},async deleteFocalPoint(h){await U({variables:{orgId:r,mapId:s,frameId:i,id:h}})},createFrameGroup(h){return q({variables:{orgId:r,mapId:s,frameId:i,input:h}})},updateFrameGroup(h,Y){return we({variables:{orgId:r,mapId:s,frameId:i,id:h,input:Y}})},deleteFrameGroup(h){return Ne({variables:{orgId:r,mapId:s,frameId:i,id:h}})},createFrameLink(h){return ke({variables:{orgId:r,mapId:s,frameId:i,input:h}})},updateFrameLink(h,Y){return Me({variables:{orgId:r,mapId:s,frameId:i,id:h,input:Y}})},deleteFrameLink(h){return Le({variables:{orgId:r,mapId:s,frameId:i,id:h}})}}});function St(){const{setDrawRectMode:l}=k(),i=x.useRef(null),[n,r]=x.useState(null),[c,a]=x.useState(null),[s,m]=x.useState(null);return x.useEffect(()=>{const d=i.current;if(!d)return;r(d.getBoundingClientRect());let b=null;function v(j){b={x:j.clientX,y:j.clientY},a(b)}function p(j){m({x:j.clientX,y:j.clientY})}function f(j){if(m(null),!b)return a(null);d.removeEventListener("mousedown",v),d.removeEventListener("mousemove",p),d.removeEventListener("mouseup",f);const D=j.clientX,_=j.clientY,S=b.x,A=b.y,P=d.getBoundingClientRect(),I=ee(P.width,{x:S-P.left,y:A-P.top}),F=lt(P.width,Math.abs(S-D),Math.abs(A-_));l(E=>({...E,position:{...I,...F}}))}return d.addEventListener("mousedown",v),d.addEventListener("mousemove",p),d.addEventListener("mouseup",f),()=>{d.removeEventListener("mousedown",v),d.removeEventListener("mousemove",p),d.removeEventListener("mouseup",f)}},[l]),e.jsx("div",{ref:i,className:"absolute inset-0 z-50 rounded-[0.75rem] bg-red-500/50 select-none",children:c&&s&&e.jsx("div",{className:"bg-opacity-20 absolute border-2 border-dashed border-blue-500 bg-blue-100",style:{left:c.x-(n?.left??0),top:c.y-(n?.top??0),width:Math.abs(s.x-c.x),height:Math.abs(s.y-c.y)}})})}function ge(){const{setNewPoint:l,canvasTarget:i}=k();function n(r){i.clearTarget();const c=r.currentTarget.getBoundingClientRect(),a=ee(c.width,{x:r.clientX-c.left,y:r.clientY-c.top});l(s=>({...s,position:a}))}return e.jsx("div",{className:"absolute inset-0 z-50 cursor-crosshair rounded-[0.75rem]",onClick:n})}const wt="h-[56px] rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Nt=ce({name:V().min(1,"Name is required")});function kt({x:l,y:i}){const{createFocalPoint:n,canvasTarget:r,setNewPoint:c}=k(),a=ie({resolver:le(Nt),defaultValues:{name:""}});return e.jsxs(re,{open:!0,children:[e.jsx(se,{asChild:!0,children:e.jsx("div",{className:"absolute",style:te({x:l,y:i}),children:e.jsx("div",{className:"bg-stock absolute top-0 left-0 flex size-12 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-white shadow-[0_4px_6px_rgba(0,0,0,0.1)]",children:e.jsx(Se,{className:"text-[1.25rem]"})})})}),e.jsxs(ne,{align:"start",sideOffset:40,alignOffset:40,className:"w-[24.0625rem] rounded-2xl border border-[#2A3242] bg-[#141925] p-0",children:[e.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[#2A3242] p-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-[#F4F7FC]",children:"Add Focal Point"}),e.jsx(ae,{onClick:()=>{c(null)}})]}),e.jsxs("form",{className:"space-y-6 p-3",onSubmit:a.handleSubmit(async({name:s})=>{const{data:m}=await n({visibility:"public",name:s,locationX:l,locationY:i}),d=m?.createFocalPoint?.id;d&&r.setTarget("point",d),c(null)}),children:[e.jsx(Q,{name:"name",control:a.control,render:({field:s})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{htmlFor:"focal-point-name",className:"text-sm font-normal",children:"Name"}),e.jsx(oe,{...s,id:"focal-point-name",disabled:a.formState.isSubmitting,placeholder:"Enter focal point name",className:y(wt,a.formState.errors.name&&"border-red-500"),autoCorrect:"off",autoComplete:"off",autoCapitalize:"off"}),a.formState.errors.name?.message&&e.jsx("p",{className:"text-destructive text-xs",children:a.formState.errors.name.message})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx(N,{type:"button",preset:"outline",onClick:()=>c(null),children:"Cancel"}),e.jsxs(N,{preset:"primary",type:"submit",disabled:a.formState.isSubmitting,children:[a.formState.isSubmitting&&e.jsx(W,{}),"Save Focal Point"]})]})]})]})]})}const Mt="h-[56px] rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Lt=ce({name:V().min(1,"Name is required")});function At({y:l,x:i,width:n,height:r}){const{setDrawRectMode:c,createFrameGroup:a}=k(),s=ie({resolver:le(Lt),defaultValues:{name:""}});return e.jsxs(re,{open:!0,children:[e.jsx(se,{asChild:!0,children:e.jsx("div",{className:"bg-destructive/30 absolute rounded-[0.25rem] transition-[box-shadow,background-color]",style:{...te({x:i,y:l}),...ct(n,r)}})}),e.jsxs(ne,{align:"center",className:"w-[24.0625rem] rounded-2xl border border-[#2A3242] bg-[#141925] p-0",children:[e.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[#2A3242] p-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-[#F4F7FC]",children:"Add Frame Group"}),e.jsx(ae,{onClick:()=>c(null)})]}),e.jsxs("form",{className:"space-y-6 p-3",onSubmit:s.handleSubmit(async({name:m})=>{await a({name:m,locationX:i,locationY:l,width:n,height:r}),c(null)}),children:[e.jsx(Q,{name:"name",control:s.control,render:({field:m})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{htmlFor:"frame-group-name",className:"text-sm font-normal",children:"Name"}),e.jsx(oe,{...m,id:"frame-group-name",disabled:s.formState.isSubmitting,placeholder:"Enter group name",className:y(Mt,s.formState.errors.name&&"border-red-500"),autoCorrect:"off",autoComplete:"off",autoCapitalize:"off"}),s.formState.errors.name?.message&&e.jsx("p",{className:"text-destructive text-xs",children:s.formState.errors.name.message})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx(N,{type:"button",preset:"outline",onClick:()=>c(null),children:"Cancel"}),e.jsxs(N,{preset:"primary",type:"submit",disabled:s.formState.isSubmitting,children:[s.formState.isSubmitting&&e.jsx(W,{}),"Save Group"]})]})]})]})]})}const It="h-[56px] rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",je="!h-14 w-full rounded-[16px] border border-[#2A3242] bg-transparent px-6 focus:outline-none",Et=ce({targetMapId:V().min(1,"Map is required"),targetFrameId:V().nullable().optional(),label:V()});function Rt({x:l,y:i}){const n=Pe()?.id,{setNewPoint:r,createFrameLink:c}=k(),a=ie({resolver:le(Et),defaultValues:{label:"",targetMapId:"",targetFrameId:null}}),s=L(dt,{fetchPolicy:"cache-first",variables:{orgId:n},skip:!n}),m=a.watch("targetMapId"),d=L(mt,{fetchPolicy:"cache-first",variables:{orgId:n,mapId:m},skip:!n||!m}),b=x.useMemo(()=>X(s.data?.maps.items),[s.data?.maps.items]),v=x.useMemo(()=>X(d.data?.frames.items),[d.data?.frames.items]);return e.jsxs(re,{open:!0,children:[e.jsx(se,{asChild:!0,children:e.jsx("div",{className:"absolute",style:te({x:l,y:i}),children:e.jsx("div",{className:"bg-stock absolute top-0 left-0 flex size-12 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-white shadow-[0_4px_6px_rgba(0,0,0,0.1)]",children:e.jsx(Se,{className:"text-[1.25rem]"})})})}),e.jsxs(ne,{align:"start",sideOffset:40,alignOffset:40,className:"w-[24.0625rem] rounded-2xl border border-[#2A3242] bg-[#141925] p-0",children:[e.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[#2A3242] p-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-[#F4F7FC]",children:"Add External Link"}),e.jsx(ae,{onClick:()=>{r(null)}})]}),e.jsxs("form",{className:"space-y-6 p-3",onSubmit:a.handleSubmit(async p=>{p.targetFrameId?await c({kind:"frame",targetFrameId:p.targetFrameId,label:p.label,locationX:l,locationY:i}):await c({kind:"map",targetMapId:p.targetMapId,label:p.label,locationX:l,locationY:i}),r(null)}),children:[e.jsx(Q,{name:"targetMapId",control:a.control,render:({field:p})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{htmlFor:"link-map",className:"text-sm font-normal",children:"Map"}),e.jsxs(pe,{...p,value:p.value,onValueChange:p.onChange,children:[e.jsx(he,{id:"link-map",className:y(je,a.formState.errors.targetMapId&&"border-red-500"),children:e.jsx(xe,{placeholder:"Select map"})}),e.jsx(fe,{children:b.map(f=>e.jsx(be,{value:f.id,children:f.name},f.id))})]}),a.formState.errors.targetMapId?.message&&e.jsx("p",{className:"text-destructive text-xs",children:a.formState.errors.targetMapId.message})]})}),e.jsx(Q,{name:"targetFrameId",control:a.control,render:({field:p})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{htmlFor:"link-frame",className:"text-sm font-normal",children:"Frame"}),e.jsxs(pe,{...p,value:p.value??"",onValueChange:p.onChange,children:[e.jsx(he,{id:"link-frame",className:y(je,a.formState.errors.targetFrameId&&"border-red-500"),children:e.jsx(xe,{placeholder:"Select frame"})}),e.jsx(fe,{children:v.map(f=>e.jsx(be,{value:f.id,children:f.name},f.id))})]}),a.formState.errors.targetFrameId?.message&&e.jsx("p",{className:"text-destructive text-xs",children:a.formState.errors.targetFrameId.message})]})}),e.jsx(Q,{name:"label",control:a.control,render:({field:p})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{htmlFor:"link-label",className:"text-sm font-normal",children:"Label"}),e.jsx(oe,{...p,id:"link-label",value:p.value,onChange:p.onChange,className:y(It,a.formState.errors.label&&"border-red-500"),placeholder:"Enter link label"}),a.formState.errors.label?.message&&e.jsx("p",{className:"text-destructive text-xs",children:a.formState.errors.label.message})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-3",children:[e.jsx(N,{type:"button",preset:"outline",onClick:()=>r(null),children:"Cancel"}),e.jsxs(N,{preset:"primary",type:"submit",disabled:a.formState.isSubmitting,children:[a.formState.isSubmitting&&e.jsx(W,{}),"Save Link"]})]})]})]})]})}function Tt(){const{frame:l,preset:i,newPoint:n,drawRectMode:r,focalPoints:c,frameGroups:a,frameLinks:s,canvasTarget:m,selectedFrameGroup:d,updateFocalPoint:b,updateFrameGroup:v,updateFrameLink:p,deleteFrameLink:f}=k(),{canWrite:j}=Fe(),D=s.filter(t=>t.kind==="frame"),_=s.filter(t=>t.kind==="map"),S=x.useRef(null),[A,P]=x.useState(0),[I,F]=x.useState(0),[E,O]=x.useState(null),[o,w]=x.useState(null);x.useEffect(()=>{const t=S.current,u=t.closest("#focal-point-editor");if(!t||!u)return;const g=new ResizeObserver(()=>{P(t.clientWidth),F(u.clientHeight)});return P(t.clientWidth),F(u.clientHeight),g.observe(t),g.observe(u),()=>g.disconnect()},[S]);function G(t){if(!o||o.isSaving)return;const u=t.currentTarget.getBoundingClientRect(),g=ee(u.width,{x:t.clientX-u.left,y:Math.min(t.clientY-u.top,u.height)});o.type==="point"?w({...o,x:g.x,y:g.y}):o.type==="group"&&w({...o,x:Math.min(o.anchorX,g.x),y:Math.min(o.anchorY,g.y),width:Math.abs(g.x-o.anchorX),height:Math.abs(g.y-o.anchorY)})}async function R(){if(!(!o||o.isSaving)){w({...o,isSaving:!0});try{if(o.type==="point"){m.setTarget("point",o.id);const t=c.find(u=>u.id===o.id);(o.x!==t.locationX||o.y!==t.locationY)&&await b(o.id,{locationX:o.x,locationY:o.y})}else if(o.type==="group"){const t=a.find(g=>g.id===o.id);(o.x!==t.locationX||o.y!==t.locationY||o.width!==t.width||o.height!==t.height)&&o.width>0&&o.height>0&&await v(o.id,{locationX:o.x,locationY:o.y,width:o.width,height:o.height})}}catch{Te.error(o.type==="point"?"Failed to move focal point":"Failed to resize group")}finally{w(null)}}}return e.jsx("div",{ref:S,className:"select-none",children:e.jsx("div",{className:"relative isolate mx-auto",style:{maxWidth:i==="mobile"?"max(500px,30%)":i==="tablet"?"max(768px,50%)":i==="desktop"?"100%":Dt(I,A,E)},children:e.jsx(ut,{frame:l,setCanvasSize:({width:t,height:u})=>O(t/u),onEmptyClick:()=>{m.clearTarget()},content:e.jsxs(e.Fragment,{children:[a.map(t=>e.jsx(pt,{frame:l,frameGroup:o?.type==="group"&&o.id===t.id?{...t,locationX:o.x,locationY:o.y,width:o.width,height:o.height}:t,isSelected:d?.id===t.id,contentSize:"md",onClick:()=>{m.setTarget("group",t.id)},onResizePointerDown:j?u=>{const g=t.locationX,z=t.locationY,U=g+t.width,q=z+t.height;w({type:"group",id:t.id,anchorX:u.endsWith("-left")?U:g,anchorY:u.startsWith("top-")?q:z,x:g,y:z,width:t.width,height:t.height,isSaving:!1})}:void 0},t.id)),D.map(t=>e.jsx(ht,{pageLink:t,contentSize:"md",deletePageLink:async()=>{await f(t.id)},updatePageLink:async u=>{await p(t.id,{label:u.label})}},t.id)),_.map(t=>e.jsx(xt,{projectLink:t,contentSize:"md",deleteProjectLink:async()=>{await f(t.id)},updateProjectLink:async u=>{await p(t.id,{label:u.label})}},t.id)),c.map(t=>e.jsx(ft,{focalPoint:o?.type==="point"&&o.id===t.id?{...t,locationX:o.x,locationY:o.y}:t,contentSize:"md",onClick:()=>{m.setTarget("point",t.id)},onPointerDown:j?()=>{w({type:"point",id:t.id,x:t.locationX,y:t.locationY,isSaving:!1})}:void 0},t.id)),o&&!o.isSaving&&e.jsx("div",{className:y("absolute inset-0 z-50",o.type==="point"&&"cursor-grabbing",o.type==="group"&&"cursor-crosshair"),onPointerMove:G,onPointerUp:R,onPointerLeave:R}),e.jsx(Ce,{children:(n&&n.position||r&&r.position)&&e.jsx(B.div,{className:"pointer-events-none absolute inset-0 rounded-[0.75rem] bg-black/20 transition-opacity",transition:{duration:.2,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})}),n&&n.type==="focal"&&(n.position?e.jsx(e.Fragment,{children:e.jsx(kt,{x:n.position.x,y:n.position.y})}):e.jsx(ge,{})),n&&n.type==="link"&&(n.position?e.jsx(e.Fragment,{children:e.jsx(Rt,{x:n.position.x,y:n.position.y})}):e.jsx(ge,{})),r&&(r.position?e.jsx(At,{x:r.position.x,y:r.position.y,width:r.position.width,height:r.position.height}):e.jsx(St,{}))]})})})})}function Dt(l,i,n){if(!n)return;const r=i/l;if(n>r)return;const a=l*3*n;return Math.min(i,a,1600)}const ve=[{value:"mobile",label:"Mobile",Icon:Ye},{value:"tablet",label:"Tablet",Icon:Xe},{value:"desktop",label:"Desktop",Icon:We}],Z={type:"spring",stiffness:500,damping:34};function _t({preset:l,setPreset:i}){const[n,r]=x.useState(!1),c=ve.find(a=>a.value===l);return e.jsx(B.div,{layout:!0,transition:Z,onHoverEnd:()=>r(!1),onHoverStart:()=>r(!0),className:y("absolute top-3 right-3 flex items-center gap-1 overflow-hidden rounded-2xl border border-[#2A3242] bg-[#141925] p-1 shadow-sm",!n&&"p-0"),children:e.jsx(Ce,{mode:"popLayout",initial:!1,children:n?ve.map(a=>{const s=a.value===l;return e.jsx(B.button,{layout:!0,initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:Z,onClick:()=>i(s?null:a.value),className:y("flex size-8 items-center justify-center rounded-[0.625rem] border border-[#2A3242] text-[#F4F7FC] transition-colors hover:bg-[#1E2533] [&>svg]:size-4",s&&"border-primary/30 bg-primary/10 text-primary"),children:e.jsx(a.Icon,{})},a.label)}):e.jsx(B.div,{layout:!0,initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:Z,className:"flex size-10 items-center justify-center [&>svg]:size-5",children:c?e.jsx(c.Icon,{}):e.jsx(Pt,{icon:Ft})},"collapsed")})})}function Ot(){const{frame:l,mapId:i,preset:n,setPreset:r,updateFocalPoint:c,deleteFocalPoint:a,selectedFocalPoint:s,selectedFrameGroup:m,selectedFrameGroupPoints:d,updateFrameGroup:b,deleteFrameGroup:v}=k(),p=!!(m||s);return e.jsx("div",{className:"h-full p-4",children:e.jsxs("div",{id:"focal-point-editor",className:y("grid h-full transition-[grid-template-columns,gap]",p?"grid-cols-[1fr_27.25rem] gap-2":"grid-cols-[1fr_0] gap-0"),children:[e.jsxs("div",{className:"relative grid",children:[e.jsx(K,{className:"border-stock bg-shading-gray flex-1 rounded-[0.75rem] border p-4 transition-opacity duration-200",children:e.jsx("div",{className:"p-2",children:e.jsx(Tt,{})})}),e.jsx(_t,{preset:n,setPreset:r})]}),e.jsxs("div",{className:"h-full overflow-hidden",children:[s&&e.jsx(K,{className:"border-stock h-full w-[27.25rem] rounded-[0.75rem] border bg-[#141925]",children:e.jsx(bt,{focalPoint:s,mapId:i,children:e.jsx(gt,{focalPoint:s,updateFocalPoint:c,deleteFocalPoint:a})})}),m&&e.jsx(K,{className:"border-stock h-full w-[27.25rem] rounded-[0.75rem] border bg-[#141925]",children:e.jsx(jt,{frame:l,frameGroup:m,frameGroupPoints:d,updateFrameGroup:async f=>{await b(m.id,f)},deleteFrameGroup:async()=>{await v(m.id)}})})]})]})})}const J=[{id:"focal",label:"Add Focal Point",icon:e.jsx(Ue,{})},{id:"link",label:"Link Point",icon:e.jsx(Qe,{})},{id:"group",label:"Add Group",icon:e.jsx(Be,{})}],ye="border-primary/30 bg-primary/10 text-primary";function lo(){return e.jsx(Ct,{children:e.jsx(Gt,{})})}function Gt(){const{activeTool:l,setActiveTool:i,frame:n,frameLoading:r,map:c,mapLoading:a}=k(),{canWrite:s}=Fe(),m=J.find(d=>d.id===l)??J[0];return e.jsx(Ve,{noPadding:!0,title:"Focal Point",description:"Allows users to add focal points to an image and input related metadata like implementation and quality details.",crumbs:[{to:"/dashboard/maps",label:"Maps"},{to:`/dashboard/maps/${c?.id}`,label:a?e.jsx(W,{}):c?.name??"Untitled Map"},{to:`/dashboard/frame/${n?.id}`,label:r?e.jsx(W,{}):n?.name??"Frame"}],headerContent:n&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("div",{className:"flex items-center",children:[e.jsxs(N,{preset:l?"outline":"primary",className:y("rounded-r-none border-r-0",l&&ye),disabled:!s,title:l?`Exit ${m.label}`:void 0,onClick:()=>i(l?null:m.id),children:[m.icon,m.label]}),e.jsxs(_e,{children:[e.jsx(Oe,{asChild:!0,children:e.jsx(N,{preset:l?"outline":"primary",className:y("rounded-l-none px-3 has-[>svg]:px-3",l&&ye),disabled:!s,title:"Canvas tools",children:e.jsx(He,{})})}),e.jsx(Ge,{align:"end",children:J.filter(d=>d.id!==m.id).map(d=>e.jsxs(ze,{onClick:()=>i(d.id),children:[d.icon,d.label]},d.id))})]})]})}),children:n?e.jsx(Ot,{}):e.jsx(e.Fragment,{children:r?e.jsx(De,{}):e.jsx("div",{className:"text-center text-gray-500",children:"Frame not found"})})})}export{lo as DashboardMapFramePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./index-5E1tJ7yK.js";import{B as t}from"./button-DadqadpO.js";import{L as a}from"./nav-links-8vT2ixiI.js";import{DashboardPageSectionLayout as o}from"./index-7XpV2DRw.js";import"./iconBase-BoDZfJgC.js";import"./scroll-area-BodE-n7W.js";import"./ui-graph-logo-D4jRhd4z.js";import"./dashboard-layout-D36InAaB.js";import"./grid-scroll-body-CPqSxU6-.js";import"./popover-CN9ni1N3.js";const i=[{name:"Free",description:"Runs locally on your machine.",features:["Unlimited projects","Services, APIs, diagrams and docs","Your data stays in your repository"],action:null},{name:"Cloud",description:"Hosted by UIGraph, ready for your team.",features:["Teams and users","AI Assist and ML Studio","Integrations and cloud connections"],action:{label:"Try for free",href:"https://console.uigraph.app/signup",preset:"primary"}},{name:"Self-hosted / Enterprise",description:"Run UIGraph on your own infrastructure.",features:["Everything in Cloud","SSO","Deploy in your own environment"],action:{label:"Contact us",href:"https://uigraph.app",preset:"outline"}}];function g(){return e.jsx(o,{crumbs:[{to:"/plans",label:"Plans"}],title:"Plans",description:"Compare the local version with UIGraph Cloud and self-hosted UIGraph.",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:i.map(r=>e.jsxs("div",{className:"border-stock bg-card flex flex-col gap-4 rounded-[0.75rem] border p-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-base font-semibold text-[#F4F7FC]",children:r.name}),e.jsx("p",{className:"text-paragraph text-sm",children:r.description})]}),e.jsx("ul",{className:"flex flex-1 flex-col gap-2",children:r.features.map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-sm text-[#F4F7FC]",children:[e.jsx(a,{className:"text-primary size-4 shrink-0"}),s]},s))}),r.action?e.jsx(t,{asChild:!0,preset:r.action.preset,children:e.jsx("a",{href:r.action.href,target:"_blank",rel:"noopener noreferrer",children:r.action.label})}):e.jsx("p",{className:"text-paragraph flex h-[2.7938125rem] items-center justify-center text-sm",children:"Current plan"})]},r.name))})})}export{g as DashboardPlansPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as S,a as A,r as o,j as r,u as j,S as g,c as C}from"./index-5E1tJ7yK.js";import{S as I}from"./section-loader-BzpYM_Nx.js";import{I as F}from"./input-YvHTVS0E.js";import"./nav-links-8vT2ixiI.js";import{DashboardSectionHeader as N,DashboardSectionContent as w}from"./index-7XpV2DRw.js";import{a as P}from"./api-adapters-CnQpLiWI.js";import{A as L}from"./api-endpoints-DCA5GNpC.js";import{a as y}from"./index-Dj_05fqk.js";import{u as D}from"./service-context-C17u_Fw9.js";import{O,S as E}from"./brands-Bd4RklRx.js";import{S as G}from"./share-2-BmYmqN4k.js";import{N as _}from"./network-COWNXGMM.js";import{f as q}from"./formatDistanceToNow-DdN6W2RC.js";import{u as R}from"./useQuery-B8yYhO0c.js";import"./super-logo-loader-DJYiRbCS.js";import"./iconBase-BoDZfJgC.js";import"./scroll-area-BodE-n7W.js";import"./ui-graph-logo-D4jRhd4z.js";import"./dashboard-layout-D36InAaB.js";import"./grid-scroll-body-CPqSxU6-.js";import"./popover-CN9ni1N3.js";import"./index-HU5pz3kj.js";import"./index-DcEA6SIV.js";import"./mermaid.core-BCRBv8Us.js";import"./transform-BqqRT-Iy.js";import"./last-DXTTfs9a.js";import"./index-C0Rs3s9Z.js";import"./value-wA6veExk.js";import"./react-BNzYaZuG.js";import"./services-Crqkffr5.js";import"./getRoundingMethod-DC1wW3rl.js";import"./en-US-B1Lg1a1H.js";import"./endOfMonth-CMPv5yN4.js";const k={rest:{border:"#2563EB",badge:"rgba(37,99,235,0.15)",text:"#93B4FF"},graphql:{border:"#DB2777",badge:"rgba(219,39,119,0.15)",text:"#F9A8D4"},grpc:{border:"#0D9488",badge:"rgba(13,148,136,0.15)",text:"#5EEAD4"},serverless:{border:"#EA580C",badge:"rgba(234,88,12,0.15)",text:"#FDBA74"}},f={border:"#94A3B8",badge:"rgba(148,163,184,0.15)",text:"#CBD5E1"};function B(e){return e?k[e.toLowerCase()]??f:f}function T(e){return e==="grpc"?"gRPC":e==="graphql"?"GraphQL":e==="rest"?"REST":e==="serverless"?"Serverless":e.toUpperCase()}function Q({group:e}){const{serviceId:n}=S(),i=A(),c=o.useMemo(()=>{const a=[];return e.openApiSpecFileId&&a.push({icon:r.jsx(O,{className:"h-3 w-3"}),label:"OpenAPI"}),e.swaggerSpecFileId&&a.push({icon:r.jsx(E,{className:"h-3 w-3"}),label:"Swagger"}),e.graphqlSpecFileIds&&e.graphqlSpecFileIds.length>0&&a.push({icon:r.jsx(G,{className:"h-3 w-3"}),label:`GraphQL${e.graphqlSpecFileIds.length>1?` (${e.graphqlSpecFileIds.length})`:""}`}),e.grpcSpecFileIds&&e.grpcSpecFileIds.length>0&&a.push({icon:r.jsx(_,{className:"h-3 w-3"}),label:`gRPC${e.grpcSpecFileIds.length>1?` (${e.grpcSpecFileIds.length})`:""}`}),a},[e]),s=o.useMemo(()=>e.protocol?e.protocol.toLowerCase():e.graphqlSpecFileIds&&e.graphqlSpecFileIds.length>0?"graphql":e.grpcSpecFileIds&&e.grpcSpecFileIds.length>0?"grpc":e.openApiSpecFileId||e.swaggerSpecFileId?"rest":null,[e]);function d(){i(`/services/${n}/apis/${e.serviceApiGroupId}`)}const l=B(s);return r.jsx("div",{className:"group relative",children:r.jsx("div",{onClick:d,className:"h-full cursor-pointer overflow-hidden rounded-[16px] bg-[#141925] ring-1 ring-[#2A3242] transition-all duration-200 hover:-translate-y-px hover:shadow-[0_0_0_2px_rgba(37,99,235,0.2),0_6px_20px_rgba(0,0,0,0.08)] hover:ring-[#015AEB]",children:r.jsxs("div",{className:"p-5",children:[r.jsxs("div",{className:"mb-3 flex items-start justify-between gap-2 pr-6",children:[r.jsx("h3",{className:"text-[14px] leading-snug font-semibold tracking-tight text-[#F4F7FC]",children:e.name??e.version??"—"}),s&&r.jsx("span",{className:"mt-0.5 shrink-0 rounded-md px-2 py-0.5 text-[11px] font-semibold",style:{backgroundColor:l.badge,color:l.text},children:T(s)})]}),e.updatedAt&&r.jsxs("p",{className:"text-[12px] text-[#828DA3]",children:["Updated"," ",q(new Date(e.updatedAt),{addSuffix:!0})]}),c.length>0&&r.jsx("div",{className:"mt-4 flex flex-wrap gap-1.5 border-t border-[#2A3242] pt-3",children:c.map(a=>r.jsxs("div",{className:"flex items-center gap-1 rounded-md bg-[#1E2533] px-2 py-1 ring-1 ring-[#2A3242]",children:[a.icon,r.jsx("span",{className:"text-[11px] font-medium text-[#828DA3]",children:a.label})]},a.label))}),!s&&c.length===0&&r.jsx("p",{className:"mt-4 text-[12px] text-[#586378]",children:"No files configured"})]})},e.serviceApiGroupId)})}function Ae(){const{serviceId:e}=D(),n=j().id,[i,c]=o.useState(""),[s,d]=o.useState(null),{data:l,loading:a}=R(L,{fetchPolicy:"cache-first",skip:!n,variables:{orgId:n,serviceId:e}}),v=a&&!l?.apiGroups,p=o.useMemo(()=>y(l?.apiGroups).map(P),[l?.apiGroups]),x=o.useMemo(()=>{const t=new Set;for(const h of p){const m=h.protocol?.toLowerCase();m&&t.add(m)}return Array.from(t)},[p]),u=o.useMemo(()=>p.filter(t=>{const h=!i||(t.name??t.version??"").toLowerCase().includes(i.toLowerCase()),m=!s||t.protocol?.toLowerCase()===s;return h&&m}),[p,i,s]);return r.jsxs("div",{className:"flex h-full flex-col",children:[r.jsx(N,{title:"API & Behavior",description:"API groups and endpoints found in this service's code and specs."}),r.jsx(w,{noPadding:!0,children:v?r.jsx(I,{label:"Loading API groups..."}):p.length===0?r.jsx(g,{plain:!0,label:"The .uigraph artifacts have no API endpoints for this service."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-[#2A3242] px-6 py-3",children:[r.jsx(F,{value:i,onChange:t=>c(t.target.value),placeholder:"Search groups...",className:"h-8 w-48 rounded-lg border-[#2A3242] bg-[#141925] text-[13px] shadow-none focus-visible:bg-[#141925]"}),x.length>1&&r.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg bg-[#1E2533] p-0.5 ring-1 ring-[#2A3242]",children:[r.jsx(b,{label:"All",active:s===null,onClick:()=>d(null)}),x.map(t=>r.jsx(b,{label:t==="grpc"?"gRPC":t==="graphql"?"GraphQL":t.toUpperCase(),active:s===t,onClick:()=>d(s===t?null:t)},t))]})]}),r.jsx("div",{className:"grid gap-4 p-6",style:{gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"},children:u.length===0?r.jsx("div",{className:"col-span-full",children:r.jsx(g,{plain:!0,label:"No groups match your search."})}):u.map(t=>r.jsx(Q,{group:t},t.serviceApiGroupId))})]})})]})}function b({label:e,active:n,onClick:i}){return r.jsx("button",{type:"button",onClick:i,className:C("inline-flex h-7 items-center rounded-md px-3 text-[12px] font-medium transition-all duration-150",n?"bg-[#0F172A] text-white":"text-[#828DA3] hover:bg-[#1E2533] hover:text-[#F4F7FC]"),children:e})}export{Ae as DashboardServiceApis};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as C,r as p,d as O,j as e,c as j,t as g,S as P}from"./index-5E1tJ7yK.js";import{C as A}from"./common-Y7ySZBdh.js";import{B as N}from"./better-dialog-D3AAiahr.js";import{S as W}from"./section-loader-BzpYM_Nx.js";import{B as S}from"./button-DadqadpO.js";import{M as U}from"./nav-links-8vT2ixiI.js";import{DashboardSectionHeader as B,DashboardSectionContent as L}from"./index-7XpV2DRw.js";import{u as E}from"./use-permissions-6JVET753.js";import{a as z}from"./index-Dj_05fqk.js";import{S as y,D as V,C as Q}from"./service-doc-Dir8g83J.js";import{E as R,S as H,C as q}from"./service-doc-preview-modal-bJ6tJ5YR.js";import{B as $}from"./better-delete-confirmation-modal-Dib31LVb.js";import{D as G,a as J,b as K,c as D}from"./scroll-area-BodE-n7W.js";import{u as k}from"./service-context-C17u_Fw9.js";import{g as X,a as Y}from"./doc-file-content-B06roi8L.js";import{C as Z}from"./calendar-C0xdI_ag.js";import{f as ee}from"./format-BquKoU4D.js";import{D as re}from"./download-CLdCXVsO.js";import{T as te}from"./uploads-BOQHX9l4.js";import{u as M}from"./useMutation-CmVaR9zz.js";import{u as ie}from"./useQuery-B8yYhO0c.js";import"./dialog-D_HtNS17.js";import"./iconBase-BoDZfJgC.js";import"./loader-circle-C5jZoM7X.js";import"./super-logo-loader-DJYiRbCS.js";import"./dashboard-layout-D36InAaB.js";import"./grid-scroll-body-CPqSxU6-.js";import"./popover-CN9ni1N3.js";import"./component-icons-D1BDAuEt.js";import"./input-YvHTVS0E.js";import"./textarea-MgxZ5x6-.js";import"./select-DDtnmSET.js";import"./chevron-down-R7pQzyLD.js";import"./check-XjanpAFg.js";import"./chevron-up-CRPypfOs.js";import"./zod-Dc4H6VVJ.js";import"./index-Bt2YHgxl.js";import"./file-text-BvszilVL.js";import"./index-DcEA6SIV.js";import"./super-circle-loader-D8MElOMh.js";import"./ui-graph-logo-D4jRhd4z.js";import"./react-BNzYaZuG.js";import"./services-Crqkffr5.js";import"./globe-Jl6eIZmG.js";import"./index-jm22RWpY.js";import"./mermaid.core-BCRBv8Us.js";import"./transform-BqqRT-Iy.js";import"./index-c6Bxcoqm.js";import"./index-BSyJbFDG.js";import"./katex-HP8lGamR.js";import"./en-US-B1Lg1a1H.js";function oe({fileURL:r,fileType:c,fileName:o,fallback:d}){const s=c?.toLowerCase()||"",i=o?.toLowerCase()||"",[m,u]=p.useState(null),f=s==="image"||/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(i),n=s==="pdf"||i.endsWith(".pdf"),t=s==="html"||i.endsWith(".html")||i.endsWith(".htm"),a=s==="markdown"||i.endsWith(".md")||i.endsWith(".markdown");return p.useEffect(()=>{!r||!a||fetch(r).then(v=>v.text()).then(u).catch(()=>null)},[r,a]),r?f?e.jsx("img",{src:r,alt:o||"",className:"h-full w-full object-cover"}):n||t?e.jsx("div",{className:"relative h-full w-full overflow-hidden",children:e.jsx("iframe",{src:n?`${r}#toolbar=0&navpanes=0&scrollbar=0&view=FitH`:r,className:"pointer-events-none absolute top-0 left-0",style:{width:"400%",height:"400%",transform:"scale(0.25)",transformOrigin:"0 0",border:"none"},sandbox:t?"allow-same-origin allow-scripts":void 0,title:"preview"})}):a?e.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-gradient-to-br from-[#1A2030] to-[#141925] p-5",children:[e.jsx("pre",{className:"font-mono text-[10px] leading-relaxed break-words whitespace-pre-wrap text-[#828DA3]",children:m?.slice(0,700)}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-[#141925] to-transparent"})]}):e.jsx(e.Fragment,{children:d}):e.jsx(e.Fragment,{children:d})}function se({doc:r}){const{canWrite:c}=E(),{serviceId:o}=k(),d=C().id,s={orgId:d,serviceId:o},[i]=M(V,{refetchQueries:[{query:y,variables:s}],awaitRefetchQueries:!0}),[m,u]=p.useState(!1),[f,n]=p.useState(!1),[t,a]=O(),v=t.get("open")===r.id;function w(x){a(b=>{const l=new URLSearchParams(b);return x&&l.set("open",r.id),x||l.delete("open"),l})}function T(x,b){const l=x?.toLowerCase()||"",h=b?.toLowerCase()||"";return l==="pdf"||h.endsWith(".pdf")?"bg-red-100 text-red-700 border-red-200":l==="html"||h.endsWith(".html")||h.endsWith(".htm")?"bg-blue-100 text-blue-700 border-blue-200":l==="readme"||l==="markdown"||h.endsWith(".md")||h.endsWith(".markdown")?"bg-orange-100 text-orange-700 border-orange-200":"bg-[#1E2533] text-[#D2D9E6] border-[#2A3242]"}function _(){r.fileUrl&&window.open(r.fileUrl,"_blank")}function F(){r.fileUrl&&w(!0)}function I(){r.fileUrl&&w(!0)}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"group relative",children:[e.jsxs("div",{className:j("relative cursor-pointer overflow-hidden rounded-[1.4525rem] bg-[#141925] shadow-[0_1px_3px_rgba(0,0,0,0.07),0_1px_2px_rgba(0,0,0,0.04)] ring-1 ring-[#2A3242] transition-all duration-300 hover:shadow-[0_0_0_3px_rgba(1,90,235,0.18),0_8px_24px_rgba(0,0,0,0.10)] hover:ring-2 hover:ring-[#015AEB]",!r.fileUrl&&"cursor-default opacity-60"),onClick:r.fileUrl?F:void 0,children:[e.jsx("div",{className:"relative aspect-[16/10] w-full overflow-hidden bg-[#1E2533] transition-colors duration-300 group-hover:bg-[#1E2533]",children:e.jsx(oe,{fileURL:r.fileUrl,fileType:r.fileType,fileName:r.fileName,fallback:e.jsx("div",{className:"flex h-full w-full items-center justify-center [&_svg]:size-10 [&_svg]:shrink-0 [&_svg]:stroke-[1.15]",children:X(r.fileType??"")})})}),e.jsx("div",{className:"h-px bg-[#1E2533]"}),e.jsxs("div",{className:"px-4 py-3",children:[e.jsx("h4",{className:"line-clamp-1 text-sm font-semibold text-[#F4F7FC]",children:r.fileName||"Untitled Document"}),e.jsxs("div",{className:"mt-2 flex min-h-[1.75rem] items-center justify-between gap-2",children:[e.jsx("span",{className:j("inline-flex shrink-0 items-center rounded-md border px-1.5 py-0.5 font-mono text-[10px] font-medium",T(r.fileType,r.fileName)),children:Y(r.fileType??"")}),r.updatedAt&&e.jsxs("div",{className:"flex items-center gap-1.5 text-[#828DA3]",children:[e.jsx(Z,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"text-[11px]",children:ee(new Date(r.updatedAt),"dd MMM yyyy")})]})]})]})]}),e.jsxs(G,{open:m,onOpenChange:u,children:[e.jsx(J,{asChild:!0,children:e.jsx(S,{size:"icon",variant:"ghost",className:j("absolute top-2 right-2 h-7 w-7 rounded-lg bg-[#1E2533]/80 opacity-0 shadow-sm backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-[#141925]",m&&"opacity-100"),children:e.jsx(U,{className:"h-3.5 w-3.5 text-[#555]"})})}),e.jsxs(K,{align:"end",children:[r.fileUrl&&e.jsxs(e.Fragment,{children:[e.jsxs(D,{onClick:I,children:[e.jsx(R,{className:"h-4 w-4"}),"Preview"]}),e.jsxs(D,{onClick:_,children:[e.jsx(re,{className:"h-4 w-4"}),"Download"]})]}),e.jsxs(D,{variant:"destructive",disabled:!c,onClick:()=>n(!0),children:[e.jsx(te,{className:"h-4 w-4"}),"Delete"]})]})]})]}),e.jsx($,{open:f,onOpenChange:n,title:"Do you want to delete this documentation?",description:"Deleting this documentation is a permanent action and cannot be undone. Please think carefully before proceeding.",onConfirm:async()=>{try{await i({variables:{orgId:d,serviceId:o,docId:r.id}}),n(!1),g.success("Documentation deleted successfully")}catch{g.error("Failed to delete documentation")}}}),e.jsx(N,{open:v,onOpenChange:w,className:"min-h-[95vh] [--width:min(95vw,100rem)]",children:e.jsx(H,{fileURL:r.fileUrl||void 0,fileName:r.fileName||void 0,fileType:r.fileType||void 0})})]})}function ir(){const{canWrite:r}=E(),{serviceId:c}=k(),o=C().id,[d,s]=p.useState(!1),i={orgId:o,serviceId:c},{data:m,loading:u}=ie(y,{errorPolicy:"ignore",fetchPolicy:"cache-first",variables:i,skip:!o||!c}),[f]=M(Q,{awaitRefetchQueries:!0,refetchQueries:[{query:y,variables:i}]}),n=p.useMemo(()=>z(m?.serviceDocs).map(t=>t.doc).filter(t=>!!t),[m?.serviceDocs]);return e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsxs(B,{title:"Documentation",description:"Upload and manage documentation files like PDFs, READMEs, HTML files, and more.",children:[e.jsxs(S,{preset:"primary",disabled:!r,onClick:()=>s(!0),children:[e.jsx(A,{}),"Upload"]}),e.jsx(N,{open:d,onOpenChange:s,children:e.jsx(q,{mode:"create",orgId:o,onSubmit:async t=>{try{await f({variables:{orgId:o,serviceId:c,input:{fileName:t.fileName??"",fileType:t.fileType??"",description:t.description??"",fileAssetId:t.fileId??""}}}),g.success("Documentation uploaded successfully"),s(!1)}catch(a){throw console.error(a),g.error("Failed to upload documentation"),a}}})})]}),e.jsx(L,{noPadding:!0,children:u?e.jsx(W,{label:"Loading documentation..."}):n.length>0?e.jsx("div",{className:"grid gap-4 p-6",style:{gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))"},children:n.map(t=>e.jsx(se,{doc:t},t.id))}):e.jsx(P,{label:"No documentation uploaded yet."})})]})}export{ir as DashboardServiceDocs};
|