@layers-app/editor 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{layers.RS0WJHwH.js → layers.-IolsXvg.js} +2 -2
- package/dist/{layers.DZkBAt2g.js → layers.0Z6j9Ihh.js} +1 -1
- package/dist/{layers.DqS33TAh.js → layers.0u5YZiCa.js} +1 -1
- package/dist/{layers.BuaNKOtP.js → layers.1Cn4xi-U.js} +1 -1
- package/dist/{layers.UcK5Vs-a.js → layers.2Cxpe3bw.js} +1 -1
- package/dist/{layers.DMQtKpio.js → layers.3ac36b3i.js} +1 -1
- package/dist/{layers.BsnnDFHO.js → layers.8WtSRCsR.js} +1 -1
- package/dist/{layers._h0ZGrkm.js → layers.8dmXyFue.js} +1 -1
- package/dist/{layers.Dxo9EpeY.js → layers.8zxbpS64.js} +3 -3
- package/dist/{layers.rmsdA2BX.js → layers.90QhMJRp.js} +1 -1
- package/dist/{layers.BC9Ta9Hx.js → layers.B-Wv7F14.js} +1 -1
- package/dist/{layers.DOPxREHY.js → layers.B-gOOiTL.js} +5 -5
- package/dist/{layers.Zpy4OtML.js → layers.B-yHcuXb.js} +1 -1
- package/dist/{layers.C8pJLrtc.js → layers.B0Wsxo3_.js} +1 -1
- package/dist/{layers.CR9dOfnN.js → layers.B1qbx7OB.js} +1 -1
- package/dist/{layers.DqCTFJFY.js → layers.B3wz3dZV.js} +3 -3
- package/dist/{layers.DEP-AjTh.js → layers.B4FRFUAR.js} +1 -1
- package/dist/{layers.DmppM3g0.js → layers.B7UL16y7.js} +1 -1
- package/dist/{layers.6L-8IdEJ.js → layers.B96DPxYl.js} +3 -3
- package/dist/{layers.Dnu2_3fs.js → layers.B9qe3aM-.js} +1 -1
- package/dist/{layers.D8hsbx0m.js → layers.BAquxUUt.js} +1 -1
- package/dist/{layers.Blj8PunY.js → layers.BB52mA2w.js} +3 -3
- package/dist/{layers.DccGJMA7.js → layers.BCqS7Ueo.js} +1 -1
- package/dist/layers.BEvkhOlC.js +1 -0
- package/dist/{layers.BYcn3EhB.js → layers.BFI-aETN.js} +4 -4
- package/dist/{layers.UWy9i04B.js → layers.BJKzxD76.js} +1 -1
- package/dist/{layers.jMkdQKWD.js → layers.BJbkLqGM.js} +1 -1
- package/dist/{layers.huZxINBr.js → layers.BMNJ4nge.js} +6 -6
- package/dist/{layers.CxxJoRQH.js → layers.BQrPfTec.js} +1 -1
- package/dist/{layers.CstAZBbg.js → layers.BRb_coUS.js} +1 -1
- package/dist/{layers.CId3lB2f.js → layers.BUfApR4o.js} +1 -1
- package/dist/{layers.4AhGfJQD.js → layers.BVgi8UXZ.js} +1 -1
- package/dist/{layers.BZfP-y28.js → layers.BYWUQHCs.js} +1 -1
- package/dist/{layers.C7eTn6N3.js → layers.BYY1zxpW.js} +1 -1
- package/dist/{layers.CaYVM7VE.js → layers.BZGwRE3b.js} +1 -1
- package/dist/{layers.3pcabAHz.js → layers.B_0rneGC.js} +1 -1
- package/dist/{layers.poJKVMF0.js → layers.B_hHGOOx.js} +1 -1
- package/dist/{layers.CrWA_hm9.js → layers.Bb_o_dzl.js} +4 -4
- package/dist/{layers.xh85NorZ.js → layers.BbllNLGe.js} +2 -2
- package/dist/{layers.tPLRXJCt.js → layers.Bd31Crw0.js} +1 -1
- package/dist/{layers.DlvVJKhr.js → layers.BdAxXGD9.js} +1 -1
- package/dist/{layers.DzbUaqeX.js → layers.BdUQskI_.js} +1 -1
- package/dist/{layers.B79R9xs-.js → layers.Be79dZ_a.js} +1 -1
- package/dist/{layers.CkLkFSmV.js → layers.BeuS9dIT.js} +1 -1
- package/dist/{layers.VTnN4t7B.js → layers.BhEuxqVE.js} +1 -1
- package/dist/{layers.B7N9ffE7.js → layers.BhP2A_r6.js} +1 -1
- package/dist/{layers.vG5wGqvT.js → layers.BhSx4mRy.js} +1 -1
- package/dist/{layers.iUPauFZz.js → layers.BhkeJPMe.js} +1 -1
- package/dist/{layers.BxIIncxp.js → layers.Bi-lzWNX.js} +1 -1
- package/dist/{layers.Dg0RmsZN.js → layers.BjADNs3R.js} +1 -1
- package/dist/{layers.BQP-spRn.js → layers.BlTQLC5q.js} +1 -1
- package/dist/{layers.CBWAkI6c.js → layers.Bn91Q7pK.js} +1 -1
- package/dist/{layers.Cpiw00UU.js → layers.Bt-vWZYh.js} +1 -1
- package/dist/{layers.Cn6SFYoj.js → layers.Bu-3WSQy.js} +4 -4
- package/dist/{layers.CcI33ZMp.js → layers.BwLHeN8h.js} +1 -1
- package/dist/{layers.BklqxNop.js → layers.Bxk0p-2e.js} +1 -1
- package/dist/{layers.nY1R_MdN.js → layers.ByWxjhWB.js} +1 -1
- package/dist/{layers.T4Dn235L.js → layers.C--olWlj.js} +1 -1
- package/dist/{layers.BZ1JCnKl.js → layers.C-XEEpaJ.js} +1 -1
- package/dist/{layers.GG1BY9YL.js → layers.C-ecYpwW.js} +1 -1
- package/dist/{layers.B_pPu4Cc.js → layers.C038YiRN.js} +1 -1
- package/dist/{layers.zodOIKut.js → layers.C4Ntnp_p.js} +1 -1
- package/dist/{layers.hf22omlD.js → layers.C5cN-q0V.js} +1 -1
- package/dist/{layers.CuxRLK4p.js → layers.C7Hdh37K.js} +1 -1
- package/dist/{layers.Bw1pS5xR.js → layers.C8PxXVRp.js} +1 -1
- package/dist/{layers.Bf23zC1Z.js → layers.C8mIu8t1.js} +1 -1
- package/dist/{layers.Cl2JBJVr.js → layers.CB5BXgpX.js} +1 -1
- package/dist/{layers.C93y9L8p.js → layers.CEwdsIL_.js} +1 -1
- package/dist/{layers.B_ysTw-c.js → layers.CF6XgGD3.js} +1 -1
- package/dist/{layers.ikBLyi0S.js → layers.CH3Jw-29.js} +1 -1
- package/dist/{layers.C9-IPj4n.js → layers.CJ67Jq_J.js} +1 -1
- package/dist/{layers.C0RA2I2j.js → layers.CKJNrD1I.js} +8 -8
- package/dist/{layers.B9-pcuKu.js → layers.CLhljB4E.js} +1 -1
- package/dist/{layers.Ct4tnpCN.js → layers.CM1_sANF.js} +1 -1
- package/dist/{layers.BW2HsCOS.js → layers.CN9c4W2x.js} +2 -2
- package/dist/{layers.CxAxpyiL.js → layers.CNQG-DVF.js} +3 -3
- package/dist/{layers.BZeKzdUM.js → layers.CPmR3HBt.js} +1 -1
- package/dist/{layers.Dw4z9CLc.js → layers.CQRJTJ8e.js} +1 -1
- package/dist/{layers.CrLfS6Ib.js → layers.CSVk5X10.js} +1 -1
- package/dist/{layers.BO6oLGUo.js → layers.CYefo37i.js} +1 -1
- package/dist/{layers.Coghe3vX.js → layers.C_Vjfjhf.js} +1 -1
- package/dist/{layers.DTRwu_PQ.js → layers.Ca_OY6Je.js} +1 -1
- package/dist/{layers.C2uZNWzS.js → layers.CfPZz6cw.js} +1 -1
- package/dist/{layers.3jysusWs.js → layers.CgeFC_cV.js} +1 -1
- package/dist/{layers.1IwoGIls.js → layers.Ch0PrFgf.js} +1 -1
- package/dist/{layers.Vhm20pRe.js → layers.ChbnEtfr.js} +1 -1
- package/dist/{layers.Dz2_6IAx.js → layers.CiM7w_bU.js} +1 -1
- package/dist/{layers.BsWmn9a0.js → layers.Cj4x8w5M.js} +1 -1
- package/dist/{layers.4jubRpKa.js → layers.CkJ3i3-j.js} +1 -1
- package/dist/{layers.ZtCigGAU.js → layers.Ckm2DHmw.js} +32 -26
- package/dist/{layers.B6CqH3xD.js → layers.Cm8zHN4y.js} +1 -1
- package/dist/{layers.ClKAOUlz.js → layers.Cmqhn3yL.js} +1 -1
- package/dist/{layers.DwdomOG6.js → layers.CnLO9gN2.js} +1 -1
- package/dist/{layers.DpXgJ1hq.js → layers.CpCVdwqL.js} +3 -3
- package/dist/{layers.Bqo1GJcp.js → layers.CqPbAX98.js} +5 -5
- package/dist/{layers.BgSJDm9O.js → layers.CqT4PI0-.js} +1 -1
- package/dist/{layers.xUNWUmXT.js → layers.Cqedx9B-.js} +26 -16
- package/dist/{layers.D3WNNlVl.js → layers.CrZPd1km.js} +1 -1
- package/dist/layers.Cs2QCQbw.js +6 -0
- package/dist/{layers.DVV2w5Xq.js → layers.Cs77V8_W.js} +1 -1
- package/dist/{layers.JA4LVaGk.js → layers.CtxQr_WA.js} +1 -1
- package/dist/{layers.VfGWICTc.js → layers.CvSEIUrv.js} +1 -1
- package/dist/{layers.CEuedTAl.js → layers.CwEq_nTe.js} +1 -1
- package/dist/layers.CzUjiyXf.js +8 -0
- package/dist/{layers.BL9hmGfz.js → layers.Czqf1YmI.js} +2 -2
- package/dist/{layers.C52SQB2C.js → layers.D-TROoD4.js} +1 -1
- package/dist/{layers.CzkNj6s2.js → layers.D0lCBkic.js} +1 -1
- package/dist/{layers.BDDuqhag.js → layers.D1x5UWE7.js} +1 -1
- package/dist/{layers.CCDPnMWc.js → layers.D2Sx_Icj.js} +5 -5
- package/dist/{layers.CzKT_DJb.js → layers.D3dqxk6M.js} +3 -3
- package/dist/{layers.C1HaOE1o.js → layers.D4XZeBq-.js} +1 -1
- package/dist/{layers.CSqGeK3n.js → layers.D4hr6Jm9.js} +1 -1
- package/dist/{layers.Dr_1h0KT.js → layers.D7UAkkkr.js} +1 -1
- package/dist/{layers.DZwRwrrj.js → layers.D8b3PQPc.js} +1 -1
- package/dist/{layers.aXelDrrg.js → layers.DBQ_38OI.js} +1 -1
- package/dist/{layers.NY96bHg5.js → layers.DCtZYcks.js} +1 -1
- package/dist/{layers.DB77DfQL.js → layers.DGOpjSt8.js} +1 -1
- package/dist/{layers.DSdTlg9s.js → layers.DGWU6YZs.js} +1 -1
- package/dist/{layers.gxsl__Qp.js → layers.DJ4C4hX3.js} +7 -7
- package/dist/{layers.VADxcvy6.js → layers.DJIqgXPS.js} +1 -1
- package/dist/{layers.C-LM2Ew4.js → layers.DJSKwbNO.js} +1 -1
- package/dist/{layers.CN_tDYYa.js → layers.DKqX4aTw.js} +1 -1
- package/dist/{layers.CwV2W27c.js → layers.DKuiiQ1H.js} +1 -1
- package/dist/{layers.CxVtjBt8.js → layers.DMcBaiLd.js} +1 -1
- package/dist/{layers.DeT-03Gr.js → layers.DO4jNyGY.js} +1 -1
- package/dist/{layers.BvhvBWlt.js → layers.DOuFHjWB.js} +4 -4
- package/dist/{layers.C1hI63dq.js → layers.DQIBWC-j.js} +1 -1
- package/dist/{layers.DV720UnU.js → layers.DQMrnoNq.js} +3 -3
- package/dist/{layers.B6FQ8_x0.js → layers.DTdha6YC.js} +1 -1
- package/dist/{layers.gZms3f91.js → layers.DW-9yJRS.js} +1 -1
- package/dist/{layers.loxwQNj1.js → layers.DX3zXYx9.js} +4 -4
- package/dist/{layers.D-bwb7A0.js → layers.DYTZ6-6p.js} +1 -1
- package/dist/{layers.jzKYooUK.js → layers.DYb1K2eB.js} +3 -3
- package/dist/{layers.BSFWPEoa.js → layers.DYfpU7cb.js} +1 -1
- package/dist/{layers.zYSBkjNG.js → layers.DZESl-2o.js} +3 -3
- package/dist/{layers.B0Va6Tdv.js → layers.DZm5ZJn8.js} +1 -1
- package/dist/{layers.DqNhzL9Q.js → layers.DakUTQQK.js} +4 -4
- package/dist/{layers.CUley3kX.js → layers.DgnLID-_.js} +1 -1
- package/dist/{layers.CQJFpH5E.js → layers.DjChzCU3.js} +1 -1
- package/dist/{layers.BW0Fb1Bt.js → layers.DjqSRz3u.js} +1 -1
- package/dist/{layers.7t_Z9FN1.js → layers.Dk5Io1OP.js} +1 -1
- package/dist/{layers.KUHKc0V0.js → layers.DkCQWAt0.js} +1 -1
- package/dist/{layers.qXOWpYCL.js → layers.DktA6tPE.js} +1 -1
- package/dist/{layers.5X79FASs.js → layers.DkzAucOC.js} +1 -1
- package/dist/{layers.u1ACXCyS.js → layers.Dl4GrJ_4.js} +1 -1
- package/dist/{layers.79pG_aNi.js → layers.Dlyy56Dl.js} +1 -1
- package/dist/{layers.DoI6LxUC.js → layers.DmAglgor.js} +1 -1
- package/dist/{layers.BYs74JtY.js → layers.DmkR016c.js} +1 -1
- package/dist/{layers.BppPlNHt.js → layers.DnAorcga.js} +1 -1
- package/dist/{layers.Czf-JjKD.js → layers.Dns0hnXX.js} +1 -1
- package/dist/{layers.Bvt6aynd.js → layers.DorTU_no.js} +1 -1
- package/dist/{layers.B4INvCuG.js → layers.DowoKKr7.js} +2 -2
- package/dist/{layers.BUp4PRUG.js → layers.DpcejUsX.js} +1 -1
- package/dist/{layers.X5OYC12o.js → layers.DptFrdBd.js} +1 -1
- package/dist/{layers.CKVHAWTu.js → layers.DqKxycYp.js} +1 -1
- package/dist/{layers.DBNFscmY.js → layers.DrASFzL1.js} +1 -1
- package/dist/{layers.DiulC4TM.js → layers.Du4z3INS.js} +1 -1
- package/dist/{layers.C4WUyvzz.js → layers.Dw-qPI0T.js} +1 -1
- package/dist/{layers.D2_tv_2K.js → layers.DwLvx3Xe.js} +1 -1
- package/dist/{layers.BBfzVQ4W.js → layers.DwM7sRZZ.js} +1 -1
- package/dist/{layers.D53Zo502.js → layers.DzQz0FlA.js} +1 -1
- package/dist/{layers.B8hw3Ow8.js → layers.FO9986Uv.js} +1 -1
- package/dist/{layers.CLAVAB8h.js → layers.GWkXNVa5.js} +1 -1
- package/dist/{layers.Cu8zrvAV.js → layers.GhVhR4xt.js} +1 -1
- package/dist/{layers.BAiYdu8g.js → layers.JWv4Cg--.js} +1 -1
- package/dist/{layers.DyHXncGW.js → layers.K0YfA0oG.js} +2 -2
- package/dist/{layers.8q7HPttR.js → layers.K4V1ISYX.js} +4 -4
- package/dist/{layers.DknBVIeA.js → layers.N4PxmrSt.js} +4 -4
- package/dist/{layers.mft6kYFr.js → layers.NhzUHqtj.js} +1 -1
- package/dist/layers.NrqcxlyN.js +1 -0
- package/dist/{layers.C4R5ylFa.js → layers.QSvYIgiE.js} +1 -1
- package/dist/{layers.el5NSWu5.js → layers.Rami84BR.js} +1 -1
- package/dist/{layers.DLlI_M-f.js → layers.S6q6Pw_R.js} +1 -1
- package/dist/{layers.yTyclsrh.js → layers.SWCyJn8U.js} +1 -1
- package/dist/{layers.BWyta0lO.js → layers.VV-BQvQl.js} +1 -1
- package/dist/{layers.D2b_kz8e.js → layers.VfJaDIt5.js} +1 -1
- package/dist/{layers.OptcGJ_M.js → layers.Y-Ax6Re5.js} +1 -1
- package/dist/{layers.CgVc1g2Z.js → layers.Zjz46rbH.js} +1 -1
- package/dist/{layers.BMcniDOS.js → layers._jGCKP71.js} +1 -1
- package/dist/{layers.BhUpKDhQ.js → layers.alb-cHeC.js} +1 -1
- package/dist/{layers.KOiPczfL.js → layers.c6Ebrzgw.js} +1 -1
- package/dist/{layers.BOxSjmie.js → layers.fbjqAQTc.js} +1 -1
- package/dist/{layers.CPFwwm5y.js → layers.hEuNZzrE.js} +1 -1
- package/dist/{layers.PUnEpYn-.js → layers.i1xP7wSK.js} +1 -1
- package/dist/{layers.BLtUxxoI.js → layers.iz5t3ETL.js} +1 -1
- package/dist/{layers.Bk8dw2ZG.js → layers.j82wkv-G.js} +24 -24
- package/dist/{layers.CmAyDt1g.js → layers.jiAnv1e_.js} +1 -1
- package/dist/{layers.CnSO6zX8.js → layers.k1RNnpJK.js} +1 -1
- package/dist/{layers.Cn4i2tOe.js → layers.liDIleE6.js} +1 -1
- package/dist/{layers.CVCO7e7z.js → layers.n7pR95Ln.js} +3 -3
- package/dist/{layers.C-mxUaos.js → layers.njCRc9Kl.js} +1 -1
- package/dist/{layers.Ca6S8pPs.js → layers.qUSuG2vj.js} +4 -4
- package/dist/{layers._bTjzRRt.js → layers.rJfi2Y_y.js} +1 -1
- package/dist/{layers.BAGopVRH.js → layers.rVgUYy7L.js} +1 -1
- package/dist/{layers.DJbo_VBt.js → layers.rnJGednL.js} +1 -1
- package/dist/{layers.DLY4DfP9.js → layers.s3nYiKDa.js} +1 -1
- package/dist/{layers.ttGzIT25.js → layers.ucmAH9Z0.js} +1 -1
- package/dist/{layers.CitvP-dI.js → layers.vKxZr6Zq.js} +1 -1
- package/dist/{layers.J1G8T5Di.js → layers.vx-ICt1F.js} +1 -1
- package/dist/{layers.mDAMQtYc.js → layers.w8Mm8TF9.js} +2 -2
- package/dist/{layers.DU3ijL1F.js → layers.wUjRnirm.js} +1 -1
- package/dist/{layers.BYH5izn7.js → layers.xWDUMz9D.js} +1 -1
- package/package.json +1 -1
- package/dist/layers.BCMbwfjD.js +0 -1
- package/dist/layers.BDP08bcM.js +0 -8
- package/dist/layers.BZSm05d3.js +0 -1
- package/dist/layers.DnV-VMFD.js +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as V } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as $, useState as I, useContext as q, useEffect as v } from "react";
|
|
3
3
|
import { useTranslation as J } from "react-i18next";
|
|
4
|
-
import { l as Q, a as X, C as Y, u as Z, b as K, d as
|
|
4
|
+
import { l as Q, a as X, C as Y, u as Z, b as K, d as E, e as y, t as ee, I as te, f as ie, g as oe, R as ne, m as ae } from "./layers.Cqedx9B-.js";
|
|
5
5
|
import { LoadingOverlay as H, Flex as se, Alert as re } from "@mantine/core";
|
|
6
6
|
import { IconInfoCircle as le } from "@tabler/icons-react";
|
|
7
7
|
const T = (t) => {
|
|
@@ -113,29 +113,29 @@ function Ie({
|
|
|
113
113
|
create: x,
|
|
114
114
|
alignment: j
|
|
115
115
|
}) {
|
|
116
|
-
const N = $(null), [P,
|
|
116
|
+
const N = $(null), [P, b] = I(!0), [R, _] = I(!1), { isCollabActive: k } = Q(), [h] = X(), [m, S] = I(!0), [r, W] = I({
|
|
117
117
|
width: 0,
|
|
118
118
|
height: 0
|
|
119
119
|
}), { fetchUploadMedia: A, fetchDeleteMedia: L, maxFileSize: he } = q(Y), { t: M } = J();
|
|
120
120
|
v(() => {
|
|
121
121
|
if (!t || t.startsWith("data:image/")) {
|
|
122
|
-
|
|
122
|
+
b(!1);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
const e = new Image();
|
|
126
|
-
e.src = t, e.onload = () =>
|
|
127
|
-
|
|
126
|
+
e.src = t, e.onload = () => b(!1), e.onerror = () => {
|
|
127
|
+
b(!1), _(!0);
|
|
128
128
|
};
|
|
129
129
|
}, [t]);
|
|
130
130
|
const U = (e, n) => {
|
|
131
131
|
h.update(() => {
|
|
132
132
|
ae(null);
|
|
133
|
-
const l =
|
|
134
|
-
|
|
133
|
+
const l = E(a);
|
|
134
|
+
y(l) && l.setWidthAndHeight(e, n);
|
|
135
135
|
});
|
|
136
136
|
}, { historyState: O } = Z(), {
|
|
137
137
|
settings: { showNestedEditorTreeView: D }
|
|
138
|
-
} = K(), [
|
|
138
|
+
} = K(), [C, p] = I(!1);
|
|
139
139
|
function B(e) {
|
|
140
140
|
return e.endsWith(".svg") || e.includes("image/svg+xml");
|
|
141
141
|
}
|
|
@@ -171,13 +171,13 @@ function Ie({
|
|
|
171
171
|
});
|
|
172
172
|
}, [t]), v(() => {
|
|
173
173
|
r.width && r.height && m && h.update(() => {
|
|
174
|
-
const e =
|
|
175
|
-
|
|
174
|
+
const e = E(a);
|
|
175
|
+
y(e) && e.setWidthAndHeight(r.width, r.height);
|
|
176
176
|
});
|
|
177
177
|
}, [r.width, r.height, m]), v(() => {
|
|
178
178
|
const e = document.documentElement;
|
|
179
|
-
ee(
|
|
180
|
-
}, [
|
|
179
|
+
ee(C, e);
|
|
180
|
+
}, [C]), t ? m ? /* @__PURE__ */ o(
|
|
181
181
|
T,
|
|
182
182
|
{
|
|
183
183
|
width: r.width,
|
|
@@ -242,27 +242,33 @@ function Ie({
|
|
|
242
242
|
uploading: !1,
|
|
243
243
|
onUpload: (e) => {
|
|
244
244
|
!A || !e.length || (e.forEach((n, l) => {
|
|
245
|
-
A(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
245
|
+
A(
|
|
246
|
+
n,
|
|
247
|
+
(i, F) => {
|
|
248
|
+
l === 0 ? h.update(() => {
|
|
249
|
+
const z = E(a);
|
|
250
|
+
y(z) && (z.setSrc(i), z.setId(F));
|
|
251
|
+
}) : h.dispatchCommand(oe, {
|
|
252
|
+
altText: "",
|
|
253
|
+
src: i,
|
|
254
|
+
id: F
|
|
255
|
+
});
|
|
256
|
+
},
|
|
257
|
+
() => {
|
|
258
|
+
b(!1);
|
|
259
|
+
}
|
|
260
|
+
);
|
|
255
261
|
}), p(!1));
|
|
256
262
|
},
|
|
257
263
|
popoverProps: {
|
|
258
|
-
opened:
|
|
264
|
+
opened: C,
|
|
259
265
|
position: "bottom",
|
|
260
266
|
onChange: p
|
|
261
267
|
},
|
|
262
268
|
onChange: (e) => {
|
|
263
269
|
p(!1), h.update(() => {
|
|
264
|
-
const n =
|
|
265
|
-
|
|
270
|
+
const n = E(a);
|
|
271
|
+
y(n) && n.setSrc(e);
|
|
266
272
|
});
|
|
267
273
|
},
|
|
268
274
|
children: /* @__PURE__ */ o(
|
|
@@ -270,7 +276,7 @@ function Ie({
|
|
|
270
276
|
{
|
|
271
277
|
title: M("editor.image.add_photo"),
|
|
272
278
|
icon: "photo",
|
|
273
|
-
onClick: () => p(!
|
|
279
|
+
onClick: () => p(!C)
|
|
274
280
|
}
|
|
275
281
|
)
|
|
276
282
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./layers.DJ4C4hX3.js");var e={paste:"Colar",pasteAsPlaintext:"Colar como texto simples",pasteCharts:"Colar gráficos",selectAll:"Selecionar tudo",multiSelect:"Adicionar elemento à seleção",moveCanvas:"Mover tela",cut:"Cortar",copy:"Copiar",copyAsPng:"Copiar para a área de transferência como PNG",copyAsSvg:"Copiar para a área de transferência como SVG",copyText:"Copiar para Área de Transferência como texto",copySource:"",convertToCode:"",bringForward:"Trazer para o primeiro plano",sendToBack:"Enviar para o plano de fundo",bringToFront:"Trazer para o primeiro plano",sendBackward:"Enviar para trás",delete:"Apagar",copyStyles:"Copiar os estilos",pasteStyles:"Colar os estilos",stroke:"Contornos",background:"Fundo",fill:"Preenchimento",strokeWidth:"Espessura do traço",strokeStyle:"Estilo de traço",strokeStyle_solid:"Sólido",strokeStyle_dashed:"Tracejado",strokeStyle_dotted:"Pontilhado",sloppiness:"Desleixo",opacity:"Opacidade",textAlign:"Alinhamento do texto",edges:"Arestas",sharp:"Aguçado",round:"Redondo",arrowheads:"Pontas",arrowhead_none:"Nenhuma",arrowhead_arrow:"Seta",arrowhead_bar:"Barra",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"Triângulo",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"Tamanho da fonte",fontFamily:"Família da fontes",addWatermark:'Adicionar "Feito com Excalidraw"',handDrawn:"Manuscrito",normal:"Normal",code:"Código",small:"Pequeno",medium:"Médio",large:"Grande",veryLarge:"Muito grande",solid:"Sólido",hachure:"Eclosão",zigzag:"ziguezague",crossHatch:"Sombreado",thin:"Fino",bold:"Espesso",left:"Esquerda",center:"Centralizar",right:"Direita",extraBold:"Muito espesso",architect:"Arquitecto",artist:"Artista",cartoonist:"Caricaturista",fileTitle:"Nome do ficheiro",colorPicker:"Seletor de cores",canvasColors:"Usado na tela",canvasBackground:"Fundo da área de desenho",drawingCanvas:"Área de desenho",layers:"Camadas",actions:"Ações",language:"Idioma",liveCollaboration:"Colaboração ao vivo...",duplicateSelection:"Duplicar",untitled:"Sem título",name:"Nome",yourName:"O seu nome",madeWithExcalidraw:"Feito com Excalidraw",group:"Agrupar seleção",ungroup:"Desagrupar seleção",collaborators:"Colaboradores",showGrid:"Mostrar grelha",addToLibrary:"Adicionar à biblioteca",removeFromLibrary:"Remover da biblioteca",libraryLoadingMessage:"A carregar a biblioteca…",libraries:"Procurar bibliotecas",loadingScene:"A carregar a cena…",align:"Alinhamento",alignTop:"Alinhar ao topo",alignBottom:"Alinhar ao fundo",alignLeft:"Alinhar à esquerda",alignRight:"Alinhar à direita",centerVertically:"Centrar verticalmente",centerHorizontally:"Centrar horizontalmente",distributeHorizontally:"Distribuir horizontalmente",distributeVertically:"Distribuir verticalmente",flipHorizontal:"Inverter horizontalmente",flipVertical:"Inverter verticalmente",viewMode:"Modo de visualização",share:"Partilhar",showStroke:"Mostrar seletor de cores do traço",showBackground:"Mostrar seletor de cores do fundo",toggleTheme:"Alternar tema",personalLib:"Biblioteca pessoal",excalidrawLib:"Biblioteca do Excalidraw",decreaseFontSize:"Reduzir o tamanho do tipo de letra",increaseFontSize:"Aumentar o tamanho do tipo de letra",unbindText:"Desvincular texto",bindText:"Ligar texto ao recipiente",createContainerFromText:"Envolver texto num recipiente",link:{edit:"Editar ligação",editEmbed:"",create:"Criar ligação",createEmbed:"",label:"Ligação",labelEmbed:"",empty:""},lineEditor:{edit:"Editar linha",exit:"Sair do editor de linha"},elementLock:{lock:"Bloquear",unlock:"Desbloquear",lockAll:"Bloquear todos",unlockAll:"Desbloquear todos"},statusPublished:"Publicado",sidebarLock:"Manter a barra lateral aberta",selectAllElementsInFrame:"",removeAllElementsFromFrame:"",eyeDropper:"",textToDiagram:"",prompt:""},a={noItems:"Ainda não foram adicionados nenhuns itens...",hint_emptyLibrary:"Seleccione um item na tela para adicioná-lo aqui, ou então instale uma biblioteca do repositório público abaixo.",hint_emptyPrivateLibrary:"Seleccione um item na tela para adicioná-lo aqui."},o={clearReset:"Limpar a área de desenho e redefinir a cor de fundo",exportJSON:"Exportar para ficheiro",exportImage:"Exportar imagem...",export:"Guardar para...",copyToClipboard:"Copiar para o clipboard",save:"Guardar no ficheiro atual",saveAs:"Guardar como",load:"Abrir",getShareableLink:"Obter um link de partilha",close:"Fechar",selectLanguage:"Selecionar idioma",scrollBackToContent:"Voltar ao conteúdo",zoomIn:"Aumentar zoom",zoomOut:"Diminuir zoom",resetZoom:"Redefinir zoom",menu:"Menu",done:"Concluído",edit:"Editar",undo:"Desfazer",redo:"Refazer",resetLibrary:"Repor a biblioteca",createNewRoom:"Criar nova sala",fullScreen:"Ecrã inteiro",darkMode:"Modo escuro",lightMode:"Modo claro",zenMode:"Modo zen",objectsSnapMode:"",exitZenMode:"Sair do modo zen",cancel:"Cancelar",clear:"Limpar",remove:"Remover",embed:"",publishLibrary:"Publicar",submit:"Enviar",confirm:"Confirmar",embeddableInteractionButton:""},r={clearReset:"Isto irá limpar toda a área de desenho. Tem a certeza?",couldNotCreateShareableLink:"Não foi possível criar um link partilhável.",couldNotCreateShareableLinkTooBig:"Não foi possível criar um link partilhável: a cena é muito grande",couldNotLoadInvalidFile:"Não foi possível carregar o ficheiro inválido",importBackendFailed:"A importação do servidor falhou.",cannotExportEmptyCanvas:"Não é possível exportar uma área de desenho vazia.",couldNotCopyToClipboard:"Não foi possível copiar para a área de transferência.",decryptFailed:"Não foi possível desencriptar os dados.",uploadedSecurly:"O upload foi protegido com criptografia de ponta a ponta, o que significa que o servidor do Excalidraw e terceiros não podem ler o conteúdo.",loadSceneOverridePrompt:"Se carregar um desenho externo substituirá o conteúdo existente. Quer continuar?",collabStopOverridePrompt:`Ao interromper a sessão irá substituir o último desenho guardado. Tem a certeza?
|
|
2
2
|
|
|
3
3
|
(Caso queira manter o último desenho, simplesmente feche a janela do navegador.)`,errorAddingToLibrary:"Não foi possível adicionar o item à biblioteca",errorRemovingFromLibrary:"Não foi possível remover o item da biblioteca",confirmAddLibrary:"Isso adicionará {{numShapes}} forma(s) à sua biblioteca. Tem a certeza?",imageDoesNotContainScene:"Esta imagem parece não conter dados de cenas. Ativou a incorporação da cena durante a exportação?",cannotRestoreFromImage:"Não foi possível restaurar a cena deste ficheiro de imagem",invalidSceneUrl:"Não foi possível importar a cena a partir do URL fornecido. Ou está mal formado ou não contém dados JSON do Excalidraw válidos.",resetLibrary:"Isto irá limpar a sua biblioteca. Tem a certeza?",removeItemsFromsLibrary:"Apagar {{count}} item(ns) da biblioteca?",invalidEncryptionKey:"Chave de encriptação deve ter 22 caracteres. A colaboração ao vivo está desativada.",collabOfflineWarning:`Sem ligação à internet disponível.
|
|
4
4
|
As suas alterações não serão salvas!`},i={unsupportedFileType:"Tipo de ficheiro não suportado.",imageInsertError:"Não foi possível inserir a imagem, tente novamente mais tarde...",fileTooBig:"O ficheiro é muito grande. O tamanho máximo permitido é {{maxSize}}.",svgImageInsertError:"Não foi possível inserir a imagem SVG. A marcação SVG parece inválida.",failedToFetchImage:"",invalidSVGString:"SVG inválido.",cannotResolveCollabServer:"Não foi possível fazer a ligação ao servidor colaborativo. Por favor, volte a carregar a página e tente novamente.",importLibraryError:"Não foi possível carregar a biblioteca",collabSaveFailed:"Não foi possível guardar na base de dados de backend. Se os problemas persistirem, guarde o ficheiro localmente para garantir que não perde o seu trabalho.",collabSaveFailed_sizeExceeded:"Não foi possível guardar na base de dados de backend, o ecrã parece estar muito grande. Deve guardar o ficheiro localmente para garantir que não perde o seu trabalho.",imageToolNotSupported:"",brave_measure_text_error:{line1:"",line2:"",line3:"",line4:""},libraryElementTypeError:{embeddable:"",iframe:"",image:""},asyncPasteFailedOnRead:"",asyncPasteFailedOnParse:"",copyToSystemClipboardFailed:""},t={selection:"Seleção",image:"Inserir imagem",rectangle:"Retângulo",diamond:"Losango",ellipse:"Elipse",arrow:"Flecha",line:"Linha",freedraw:"Desenhar",text:"Texto",library:"Biblioteca",lock:"Manter a ferramenta selecionada ativa após desenhar",penMode:"Modo caneta - impedir toque",link:"Acrescentar/ Adicionar ligação para uma forma seleccionada",eraser:"Borracha",frame:"",magicframe:"",embeddable:"",laser:"",hand:"Mão (ferramenta de movimento da tela)",extraTools:"",mermaidToExcalidraw:"",magicSettings:""},n={canvasActions:"Ações da área de desenho",selectedShapeActions:"Ações das formas selecionadas",shapes:"Formas"},s={canvasPanning:"Para mover a tela, carregue na roda do rato ou na barra de espaço enquanto arrasta, ou use a ferramenta da mão",linearElement:"Clique para iniciar vários pontos, arraste para uma única linha",freeDraw:"Clique e arraste, large quando terminar",text:"Dica: também pode adicionar texto clicando duas vezes em qualquer lugar com a ferramenta de seleção",embeddable:"",text_selected:"Clique duas vezes ou pressione a tecla Enter para editar o texto",text_editing:"Pressione a tecla Escape ou CtrlOrCmd+ENTER para terminar a edição",linearElementMulti:"Clique no último ponto ou pressione Escape ou Enter para terminar",lockAngle:"Pode restringir o ângulo mantendo premida a tecla SHIFT",resize:`Pode restringir as proporções mantendo a tecla SHIFT premida enquanto redimensiona,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./layers.
|
|
1
|
+
import "./layers.CKJNrD1I.js";
|
|
2
2
|
var e = { paste: "Pegar", pasteAsPlaintext: "Pegar como texto sin formato", pasteCharts: "Pegar gráficos", selectAll: "Seleccionar todo", multiSelect: "Añadir elemento a la selección", moveCanvas: "Mover el lienzo", cut: "Cortar", copy: "Copiar", copyAsPng: "Copiar al portapapeles como PNG", copyAsSvg: "Copiar al portapapeles como SVG", copyText: "Copiar al portapapeles como texto", copySource: "Copiar fuente al portapapeles", convertToCode: "Convertir a código", bringForward: "Traer hacia delante", sendToBack: "Enviar al fondo", bringToFront: "Traer al frente", sendBackward: "Enviar atrás", delete: "Borrar", copyStyles: "Copiar estilos", pasteStyles: "Pegar estilos", stroke: "Trazo", background: "Fondo", fill: "Rellenar", strokeWidth: "Grosor del trazo", strokeStyle: "Estilo del trazo", strokeStyle_solid: "Sólido", strokeStyle_dashed: "Discontinua", strokeStyle_dotted: "Punteado", sloppiness: "Estilo de trazo", opacity: "Opacidad", textAlign: "Alineado de texto", edges: "Bordes", sharp: "Afilado", round: "Redondo", arrowheads: "Puntas de flecha", arrowhead_none: "Ninguna", arrowhead_arrow: "Flecha", arrowhead_bar: "Barra", arrowhead_circle: "Círculo", arrowhead_circle_outline: "Círculo (contorno)", arrowhead_triangle: "Triángulo", arrowhead_triangle_outline: "Triángulo (contorno)", arrowhead_diamond: "Diamante", arrowhead_diamond_outline: "Diamante (contorno)", fontSize: "Tamaño de la fuente", fontFamily: "Tipo de fuente", addWatermark: 'Agregar "Hecho con Excalidraw"', handDrawn: "Dibujado a mano", normal: "Normal", code: "Código", small: "Pequeña", medium: "Mediana", large: "Grande", veryLarge: "Muy grande", solid: "Sólido", hachure: "Folleto", zigzag: "Zigzag", crossHatch: "Rayado transversal", thin: "Fino", bold: "Grueso", left: "Izquierda", center: "Centrado", right: "Derecha", extraBold: "Extra negrita", architect: "Arquitecto", artist: "Artista", cartoonist: "Caricatura", fileTitle: "Nombre del archivo", colorPicker: "Selector de color", canvasColors: "Usado en lienzo", canvasBackground: "Fondo del lienzo", drawingCanvas: "Lienzo de dibujo", layers: "Capas", actions: "Acciones", language: "Idioma", liveCollaboration: "Colaboración en directo...", duplicateSelection: "Duplicar", untitled: "Sin título", name: "Nombre", yourName: "Tu nombre", madeWithExcalidraw: "Hecho con Excalidraw", group: "Agrupar selección", ungroup: "Desagrupar selección", collaborators: "Colaboradores", showGrid: "Mostrar cuadrícula", addToLibrary: "Añadir a la biblioteca", removeFromLibrary: "Eliminar de la biblioteca", libraryLoadingMessage: "Cargando biblioteca…", libraries: "Explorar bibliotecas", loadingScene: "Cargando escena…", align: "Alinear", alignTop: "Alineación superior", alignBottom: "Alineación inferior", alignLeft: "Alinear a la izquierda", alignRight: "Alinear a la derecha", centerVertically: "Centrar verticalmente", centerHorizontally: "Centrar horizontalmente", distributeHorizontally: "Distribuir horizontalmente", distributeVertically: "Distribuir verticalmente", flipHorizontal: "Girar horizontalmente", flipVertical: "Girar verticalmente", viewMode: "Modo presentación", share: "Compartir", showStroke: "Mostrar selector de color de trazo", showBackground: "Mostrar el selector de color de fondo", toggleTheme: "Cambiar tema", personalLib: "Biblioteca personal", excalidrawLib: "Biblioteca Excalidraw", decreaseFontSize: "Disminuir tamaño de letra", increaseFontSize: "Aumentar el tamaño de letra", unbindText: "Desvincular texto", bindText: "Vincular texto al contenedor", createContainerFromText: "Envolver el texto en un contenedor", link: { edit: "Editar enlace", editEmbed: "Editar enlace e incrustar", create: "Crear enlace", createEmbed: "Crear enlace e incrustar", label: "Enlace", labelEmbed: "Enlazar e incrustar", empty: "No se ha establecido un enlace" }, lineEditor: { edit: "Editar línea", exit: "Salir del editor en línea" }, elementLock: { lock: "Bloquear", unlock: "Desbloquear", lockAll: "Bloquear todo", unlockAll: "Desbloquear todo" }, statusPublished: "Publicado", sidebarLock: "Mantener barra lateral abierta", selectAllElementsInFrame: "Seleccionar todos los elementos en el marco", removeAllElementsFromFrame: "Eliminar todos los elementos del marco", eyeDropper: "Seleccionar un color del lienzo", textToDiagram: "Texto a diagrama", prompt: "Sugerencia" }, a = { noItems: "No hay elementos añadidos todavía...", hint_emptyLibrary: "Seleccione un elemento en el lienzo para añadirlo aquí, o instale una biblioteca del repositorio público, a continuación.", hint_emptyPrivateLibrary: "Seleccione un elemento del lienzo para añadirlo aquí." }, o = { clearReset: "Limpiar lienzo y reiniciar el color de fondo", exportJSON: "Exportar a archivo", exportImage: "Exportar imagen...", export: "Guardar en...", copyToClipboard: "Copiar al portapapeles", save: "Guardar en archivo actual", saveAs: "Guardar como", load: "Abrir", getShareableLink: "Obtener enlace para compartir", close: "Cerrar", selectLanguage: "Elegir idioma", scrollBackToContent: "Volver al contenido", zoomIn: "Acercarse", zoomOut: "Alejarse", resetZoom: "Restablecer zoom", menu: "Menú", done: "Hecho", edit: "Editar", undo: "Deshacer", redo: "Rehacer", resetLibrary: "Reiniciar biblioteca", createNewRoom: "Crear nueva sala", fullScreen: "Pantalla completa", darkMode: "Modo oscuro", lightMode: "Modo claro", zenMode: "Modo Zen", objectsSnapMode: "Ajustar a los objetos", exitZenMode: "Salir del modo Zen", cancel: "Cancelar", clear: "Borrar", remove: "Eliminar", embed: "", publishLibrary: "Publicar", submit: "Enviar", confirm: "Confirmar", embeddableInteractionButton: "Pulsa para interactuar" }, r = { clearReset: "Esto limpiará todo el lienzo. Estás seguro?", couldNotCreateShareableLink: "No se pudo crear un enlace para compartir.", couldNotCreateShareableLinkTooBig: "No se pudo crear el enlace para compartir: la escena es demasiado grande", couldNotLoadInvalidFile: "No se pudo cargar el archivo no válido", importBackendFailed: "La importación falló.", cannotExportEmptyCanvas: "No se puede exportar un lienzo vació", couldNotCopyToClipboard: "No se pudo copiar al portapapeles.", decryptFailed: "No se pudieron descifrar los datos.", uploadedSecurly: "La carga ha sido asegurada con cifrado de principio a fin, lo que significa que el servidor de Excalidraw y terceros no pueden leer el contenido.", loadSceneOverridePrompt: "Si carga este dibujo externo, reemplazará el que tiene. ¿Desea continuar?", collabStopOverridePrompt: `Detener la sesión sobrescribirá su dibujo anterior almacenado localmente. ¿Está seguro?
|
|
3
3
|
|
|
4
4
|
(Si desea mantener su dibujo local, simplemente cierre la pestaña del navegador.)`, errorAddingToLibrary: "No se pudo agregar el elemento a la biblioteca", errorRemovingFromLibrary: "No se pudo quitar el elemento de la biblioteca", confirmAddLibrary: "Esto añadirá {{numShapes}} forma(s) a tu biblioteca. ¿Estás seguro?", imageDoesNotContainScene: "Esta imagen no parece contener datos de escena. ¿Ha habilitado la inserción de la escena durante la exportación?", cannotRestoreFromImage: "No se pudo restaurar la escena desde este archivo de imagen", invalidSceneUrl: "No se ha podido importar la escena desde la URL proporcionada. Está mal formada, o no contiene datos de Excalidraw JSON válidos.", resetLibrary: "Esto borrará tu biblioteca. ¿Estás seguro?", removeItemsFromsLibrary: "¿Eliminar {{count}} elemento(s) de la biblioteca?", invalidEncryptionKey: "La clave de cifrado debe tener 22 caracteres. La colaboración en vivo está deshabilitada.", collabOfflineWarning: `No hay conexión a internet disponible.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("./layers.DpXgJ1hq.js"),K=require("./layers.iUPauFZz.js"),it=require("./layers.Cn4i2tOe.js"),nt=(e,t,a,i)=>{t.forEach(l=>{xt[l](e,a,i)})},lt=(e,t,a)=>{h.log$1.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},ct=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ot=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ht=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},yt=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},ft=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},gt=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},pt=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},dt=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},xt={extension:lt,composition:ct,aggregation:ot,dependency:ht,lollipop:yt,point:ft,circle:gt,cross:pt,barb:dt},ut=nt;function bt(e,t){t&&e.attr("style",t)}function wt(e){const t=h.select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=t.append("xhtml:div"),i=e.label,l=e.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+l+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),bt(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const mt=(e,t,a,i)=>{let l=e||"";if(typeof l=="object"&&(l=l[0]),h.evaluate(h.getConfig().flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),h.log$1.debug("vertexText"+l);const r={isNode:i,label:h.decodeEntities(l).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return wt(r)}else{const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof l=="string"?s=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?s=l:s=[];for(const n of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),a?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}return r}},B=mt,L=async(e,t,a,i)=>{let l;const r=t.useHtmlLabels||h.evaluate(h.getConfig().flowchart.htmlLabels);a?l=a:l="node default";const s=e.insert("g").attr("class",l).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const y=n.node();let o;t.labelType==="markdown"?o=K.createText(n,h.sanitizeText$2(h.decodeEntities(c),h.getConfig()),{useHtmlLabels:r,width:t.width||h.getConfig().flowchart.wrappingWidth,classes:"markdown-node-label"}):o=y.appendChild(B(h.sanitizeText$2(h.decodeEntities(c),h.getConfig()),t.labelStyle,!1,i));let f=o.getBBox();const p=t.padding/2;if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const g=o.children[0],x=h.select(o),m=g.getElementsByTagName("img");if(m){const d=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(u=>new Promise(S=>{function C(){if(u.style.display="flex",u.style.flexDirection="column",d){const M=h.getConfig().fontSize?h.getConfig().fontSize:window.getComputedStyle(document.body).fontSize,W=parseInt(M,10)*5+"px";u.style.minWidth=W,u.style.maxWidth=W}else u.style.width="100%";S(u)}setTimeout(()=>{u.complete&&C()}),u.addEventListener("error",C),u.addEventListener("load",C)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return r?n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):n.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:p,label:n}},w=(e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height};function _(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}function kt(e,t){return e.intersect(t)}function P(e,t,a,i){var l=e.x,r=e.y,s=l-i.x,n=r-i.y,c=Math.sqrt(t*t*n*n+a*a*s*s),y=Math.abs(t*a*s/c);i.x<l&&(y=-y);var o=Math.abs(t*a*n/c);return i.y<r&&(o=-o),{x:l+y,y:r+o}}function vt(e,t,a){return P(e,t,t,a)}function Lt(e,t,a,i){var l,r,s,n,c,y,o,f,p,g,x,m,d,u,S;if(l=t.y-e.y,s=e.x-t.x,c=t.x*e.y-e.x*t.y,p=l*a.x+s*a.y+c,g=l*i.x+s*i.y+c,!(p!==0&&g!==0&&G(p,g))&&(r=i.y-a.y,n=a.x-i.x,y=i.x*a.y-a.x*i.y,o=r*e.x+n*e.y+y,f=r*t.x+n*t.y+y,!(o!==0&&f!==0&&G(o,f))&&(x=l*n-r*s,x!==0)))return m=Math.abs(x/2),d=s*y-n*c,u=d<0?(d-m)/x:(d+m)/x,d=r*c-l*y,S=d<0?(d-m)/x:(d+m)/x,{x:u,y:S}}function G(e,t){return e*t>0}function St(e,t,a){var i=e.x,l=e.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(x){s=Math.min(s,x.x),n=Math.min(n,x.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var c=i-e.width/2-s,y=l-e.height/2-n,o=0;o<t.length;o++){var f=t[o],p=t[o<t.length-1?o+1:0],g=Lt(e,a,{x:c+f.x,y:y+f.y},{x:c+p.x,y:y+p.y});g&&r.push(g)}return r.length?(r.length>1&&r.sort(function(x,m){var d=x.x-a.x,u=x.y-a.y,S=Math.sqrt(d*d+u*u),C=m.x-a.x,M=m.y-a.y,I=Math.sqrt(C*C+M*M);return S<I?-1:S===I?0:1}),r[0]):e}const $t=(e,t)=>{var a=e.x,i=e.y,l=t.x-a,r=t.y-i,s=e.width/2,n=e.height/2,c,y;return Math.abs(r)*s>Math.abs(l)*n?(r<0&&(n=-n),c=r===0?0:n*l/r,y=n):(l<0&&(s=-s),c=s,y=l===0?0:s*r/l),{x:a+c,y:i+y}},tt=$t,b={node:kt,circle:vt,ellipse:P,polygon:St,rect:tt},Ct=async(e,t)=>{t.useHtmlLabels||h.getConfig().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:i,bbox:l,halfPadding:r}=await L(e,t,"node "+t.classes,!0);h.log$1.info("Classes = ",t.classes);const s=i.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-r).attr("y",-l.height/2-r).attr("width",l.width+t.padding).attr("height",l.height+t.padding),w(t,s),t.intersect=function(n){return b.rect(t,n)},i},Mt=Ct,Tt=e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},Bt=(e,t,a)=>{const i=Tt(e),l=2,r=t.height+2*a.padding,s=r/l,n=t.width+2*s+a.padding,c=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*c},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*c,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*c},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*c,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-c},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r+c}]:i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},Z=e=>e?" "+e:"",E=(e,t)=>`node default${Z(e.classes)} ${Z(e.class)}`,F=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=l+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];h.log$1.info("Question main (Circle)");const c=_(a,s,s,n);return c.attr("style",t.style),w(t,c),t.intersect=function(y){return h.log$1.warn("Intersect called"),b.polygon(t,n,y)},a},Et=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",l.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return b.circle(t,14,s)},a},_t=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=4,r=i.height+t.padding,s=r/l,n=i.width+2*s+t.padding,c=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],y=_(a,n,r,c);return y.attr("style",t.style),w(t,y),t.intersect=function(o){return b.polygon(t,c,o)},a},Nt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,void 0,!0),l=2,r=i.height+2*t.padding,s=r/l,n=i.width+2*s+t.padding,c=Bt(t.directions,i,t),y=_(a,n,r,c);return y.attr("style",t.style),w(t,y),t.intersect=function(o){return b.polygon(t,c,o)},a},Rt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:l,y:0},{x:l,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return _(a,l,r,s).attr("style",t.style),t.width=l+r,t.height=r,t.intersect=function(c){return b.polygon(t,s,c)},a},Ht=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},It=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:l+r/6,y:0},{x:l-2*r/6,y:-r},{x:-r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Ot=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l+2*r/6,y:0},{x:l-r/6,y:-r},{x:r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Wt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Xt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l+r/2,y:0},{x:l,y:-r/2},{x:l+r/2,y:-r},{x:0,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Yt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=l/2,s=r/(2.5+l/50),n=i.height+s+t.padding,c="M 0,"+s+" a "+r+","+s+" 0,0,0 "+l+" 0 a "+r+","+s+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+l+" 0 l 0,"+-n,y=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+s)+")");return w(t,y),t.intersect=function(o){const f=b.rect(t,o),p=f.x-t.x;if(r!=0&&(Math.abs(p)<t.width/2||Math.abs(p)==t.width/2&&Math.abs(f.y-t.y)>t.height/2-s)){let g=s*s*(1-p*p/(r*r));g!=0&&(g=Math.sqrt(g)),g=s-g,o.y-t.y>0&&(g=-g),f.y+=g}return f},a},Dt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,"node "+t.classes+" "+t.class,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,y=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",y).attr("width",s).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(z(r,t.props.borders,s,n),o.delete("borders")),o.forEach(f=>{h.log$1.warn(`Unknown node property ${f}`)})}return w(t,r),t.intersect=function(o){return b.rect(t,o)},a},At=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,"node "+t.classes,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,y=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",y).attr("width",s).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(z(r,t.props.borders,s,n),o.delete("borders")),o.forEach(f=>{h.log$1.warn(`Unknown node property ${f}`)})}return w(t,r),t.intersect=function(o){return b.rect(t,o)},a},jt=async(e,t)=>{const{shapeSvg:a}=await L(e,t,"label",!0);h.log$1.trace("Classes = ",t.class);const i=a.insert("rect",":first-child"),l=0,r=0;if(i.attr("width",l).attr("height",r),a.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(z(i,t.props.borders,l,r),s.delete("borders")),s.forEach(n=>{h.log$1.warn(`Unknown node property ${n}`)})}return w(t,i),t.intersect=function(s){return b.rect(t,s)},a};function z(e,t,a,i){const l=[],r=n=>{l.push(n,0)},s=n=>{l.push(0,n)};t.includes("t")?(h.log$1.debug("add top border"),r(a)):s(a),t.includes("r")?(h.log$1.debug("add right border"),r(i)):s(i),t.includes("b")?(h.log$1.debug("add bottom border"),r(a)):s(a),t.includes("l")?(h.log$1.debug("add left border"),r(i)):s(i),e.attr("stroke-dasharray",l.join(" "))}const Ut=(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,h.log$1.info("Label text abc79",c,n,typeof n=="object");const y=s.node().appendChild(B(c,t.labelStyle,!0,!0));let o={width:0,height:0};if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const m=y.children[0],d=h.select(y);o=m.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}h.log$1.info("Text 2",n);const f=n.slice(1,n.length);let p=y.getBBox();const g=s.node().appendChild(B(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0));if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const m=g.children[0],d=h.select(g);o=m.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}const x=t.padding/2;return h.select(g).attr("transform","translate( "+(o.width>p.width?0:(p.width-o.width)/2)+", "+(p.height+x+5)+")"),h.select(y).attr("transform","translate( "+(o.width<p.width?0:-(p.width-o.width)/2)+", 0)"),o=s.node().getBBox(),s.attr("transform","translate("+-o.width/2+", "+(-o.height/2-x+3)+")"),l.attr("class","outer title-state").attr("x",-o.width/2-x).attr("y",-o.height/2-x).attr("width",o.width+t.padding).attr("height",o.height+t.padding),r.attr("class","divider").attr("x1",-o.width/2-x).attr("x2",o.width/2+x).attr("y1",-o.height/2-x+p.height+x).attr("y2",-o.height/2-x+p.height+x),w(t,l),t.intersect=function(m){return b.rect(t,m)},i},zt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.height+t.padding,r=i.width+l/4+t.padding,s=a.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-r/2).attr("y",-l/2).attr("width",r).attr("height",l);return w(t,s),t.intersect=function(n){return b.rect(t,n)},a},Gt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,E(t),!0),r=a.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),h.log$1.info("Circle main"),w(t,r),t.intersect=function(s){return h.log$1.info("Circle intersect",t,i.width/2+l,s),b.circle(t,i.width/2+l,s)},a},Zt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,E(t),!0),r=5,s=a.insert("g",":first-child"),n=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),h.log$1.info("DoubleCircle main"),w(t,n),t.intersect=function(y){return h.log$1.info("DoubleCircle intersect",t,i.width/2+l+r,y),b.circle(t,i.width/2+l+r,y)},a},Ft=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l,y:0},{x:l,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},qt=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),w(t,i),t.intersect=function(l){return b.circle(t,7,l)},a},q=(e,t,a)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,r=10;a==="LR"&&(l=10,r=70);const s=i.append("rect").attr("x",-1*l/2).attr("y",-1*r/2).attr("width",l).attr("height",r).attr("class","fork-join");return w(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return b.rect(t,n)},i},Qt=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),l=a.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),w(t,l),t.intersect=function(r){return b.circle(t,7,r)},a},Vt=(e,t)=>{const a=t.padding/2,i=4,l=8;let r;t.classes?r="node "+t.classes:r="node default";const s=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),c=s.insert("line"),y=s.insert("line");let o=0,f=i;const p=s.insert("g").attr("class","label");let g=0;const x=t.classData.annotations&&t.classData.annotations[0],m=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",d=p.node().appendChild(B(m,t.labelStyle,!0,!0));let u=d.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const k=d.children[0],v=h.select(d);u=k.getBoundingClientRect(),v.attr("width",u.width),v.attr("height",u.height)}t.classData.annotations[0]&&(f+=u.height+i,o+=u.width);let S=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(h.getConfig().flowchart.htmlLabels?S+="<"+t.classData.type+">":S+="<"+t.classData.type+">");const C=p.node().appendChild(B(S,t.labelStyle,!0,!0));h.select(C).attr("class","classTitle");let M=C.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const k=C.children[0],v=h.select(C);M=k.getBoundingClientRect(),v.attr("width",M.width),v.attr("height",M.height)}f+=M.height+i,M.width>o&&(o=M.width);const I=[];t.classData.members.forEach(k=>{const v=k.getDisplayDetails();let H=v.displayText;h.getConfig().flowchart.htmlLabels&&(H=H.replace(/</g,"<").replace(/>/g,">"));const N=p.node().appendChild(B(H,v.cssStyle?v.cssStyle:t.labelStyle,!0,!0));let T=N.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const U=N.children[0],X=h.select(N);T=U.getBoundingClientRect(),X.attr("width",T.width),X.attr("height",T.height)}T.width>o&&(o=T.width),f+=T.height+i,I.push(N)}),f+=l;const W=[];if(t.classData.methods.forEach(k=>{const v=k.getDisplayDetails();let H=v.displayText;h.getConfig().flowchart.htmlLabels&&(H=H.replace(/</g,"<").replace(/>/g,">"));const N=p.node().appendChild(B(H,v.cssStyle?v.cssStyle:t.labelStyle,!0,!0));let T=N.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const U=N.children[0],X=h.select(N);T=U.getBoundingClientRect(),X.attr("width",T.width),X.attr("height",T.height)}T.width>o&&(o=T.width),f+=T.height+i,W.push(N)}),f+=l,x){let k=(o-u.width)/2;h.select(d).attr("transform","translate( "+(-1*o/2+k)+", "+-1*f/2+")"),g=u.height+i}let st=(o-M.width)/2;return h.select(C).attr("transform","translate( "+(-1*o/2+st)+", "+(-1*f/2+g)+")"),g+=M.height+i,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-f/2-a+l+g).attr("y2",-f/2-a+l+g),g+=l,I.forEach(k=>{h.select(k).attr("transform","translate( "+-o/2+", "+(-1*f/2+g+l/2)+")");const v=k==null?void 0:k.getBBox();g+=((v==null?void 0:v.height)??0)+i}),g+=l,y.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-f/2-a+l+g).attr("y2",-f/2-a+l+g),g+=l,W.forEach(k=>{h.select(k).attr("transform","translate( "+-o/2+", "+(-1*f/2+g)+")");const v=k==null?void 0:k.getBBox();g+=((v==null?void 0:v.height)??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(f/2)-a).attr("width",o+t.padding).attr("height",f+t.padding),w(t,n),t.intersect=function(k){return b.rect(t,k)},s},Q={rhombus:F,composite:At,question:F,rect:Dt,labelRect:jt,rectWithTitle:Ut,choice:Et,circle:Gt,doublecircle:Zt,stadium:zt,hexagon:_t,block_arrow:Nt,rect_left_inv_arrow:Rt,lean_right:Ht,lean_left:It,trapezoid:Ot,inv_trapezoid:Wt,rect_right_inv_arrow:Xt,cylinder:Yt,start:qt,end:Qt,note:Mt,subroutine:Ft,fork:q,join:q,class_box:Vt};let O={};const Jt=async(e,t,a)=>{let i,l;if(t.link){let r;h.getConfig().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",r),l=await Q[t.shape](i,t,a)}else l=await Q[t.shape](e,t,a),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),i.attr("data-node","true"),i.attr("data-id",t.id),O[t.id]=i,t.haveCallback&&O[t.id].attr("class",O[t.id].attr("class")+" clickable"),i},Kt=(e,t)=>{O[t.id]=e},Pt=()=>{O={}},tr=e=>{const t=O[e.id];h.log$1.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},rt=({flowchart:e})=>{var t,a;const i=((t=e==null?void 0:e.subGraphTitleMargin)==null?void 0:t.top)??0,l=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,r=i+l;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:l,subGraphTitleTotalMargin:r}},R={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function Y(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=A(e),t=A(t);const[a,i]=[e.x,e.y],[l,r]=[t.x,t.y],s=l-a,n=r-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}const A=e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,at=e=>({x:function(t,a,i){let l=0;if(a===0&&Object.hasOwn(R,e.arrowTypeStart)){const{angle:r,deltaX:s}=Y(i[0],i[1]);l=R[e.arrowTypeStart]*Math.cos(r)*(s>=0?1:-1)}else if(a===i.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){const{angle:r,deltaX:s}=Y(i[i.length-1],i[i.length-2]);l=R[e.arrowTypeEnd]*Math.cos(r)*(s>=0?1:-1)}return A(t).x+l},y:function(t,a,i){let l=0;if(a===0&&Object.hasOwn(R,e.arrowTypeStart)){const{angle:r,deltaY:s}=Y(i[0],i[1]);l=R[e.arrowTypeStart]*Math.abs(Math.sin(r))*(s>=0?1:-1)}else if(a===i.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){const{angle:r,deltaY:s}=Y(i[i.length-1],i[i.length-2]);l=R[e.arrowTypeEnd]*Math.abs(Math.sin(r))*(s>=0?1:-1)}return A(t).y+l}}),et=(e,t,a,i,l)=>{t.arrowTypeStart&&V(e,"start",t.arrowTypeStart,a,i,l),t.arrowTypeEnd&&V(e,"end",t.arrowTypeEnd,a,i,l)},rr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},V=(e,t,a,i,l,r)=>{const s=rr[a];if(!s){h.log$1.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${l}_${r}-${s}${n})`)};let j={},$={};const ar=()=>{j={},$={}},er=(e,t)=>{const a=h.evaluate(h.getConfig().flowchart.htmlLabels),i=t.labelType==="markdown"?K.createText(e,t.label,{style:t.labelStyle,useHtmlLabels:a,addSvgBackground:!0}):B(t.label,t.labelStyle),l=e.insert("g").attr("class","edgeLabel"),r=l.insert("g").attr("class","label");r.node().appendChild(i);let s=i.getBBox();if(a){const c=i.children[0],y=h.select(i);s=c.getBoundingClientRect(),y.attr("width",s.width),y.attr("height",s.height)}r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),j[t.id]=l,t.width=s.width,t.height=s.height;let n;if(t.startLabelLeft){const c=B(t.startLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$[t.id]||($[t.id]={}),$[t.id].startLeft=y,D(n,t.startLabelLeft)}if(t.startLabelRight){const c=B(t.startLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=y.node().appendChild(c),o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$[t.id]||($[t.id]={}),$[t.id].startRight=y,D(n,t.startLabelRight)}if(t.endLabelLeft){const c=B(t.endLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(c),$[t.id]||($[t.id]={}),$[t.id].endLeft=y,D(n,t.endLabelLeft)}if(t.endLabelRight){const c=B(t.endLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(c),$[t.id]||($[t.id]={}),$[t.id].endRight=y,D(n,t.endLabelRight)}return i};function D(e,t){h.getConfig().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}const sr=(e,t)=>{h.log$1.debug("Moving label abc88 ",e.id,e.label,j[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const i=h.getConfig(),{subGraphTitleTotalMargin:l}=rt(i);if(e.label){const r=j[e.id];let s=e.x,n=e.y;if(a){const c=h.utils.calcLabelPosition(a);h.log$1.debug("Moving label "+e.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}r.attr("transform",`translate(${s}, ${n+l/2})`)}if(e.startLabelLeft){const r=$[e.id].startLeft;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const r=$[e.id].startRight;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const r=$[e.id].endLeft;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const r=$[e.id].endRight;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}},ir=(e,t)=>{const a=e.x,i=e.y,l=Math.abs(t.x-a),r=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return l>=s||r>=n},nr=(e,t,a)=>{h.log$1.debug(`intersection calc abc89:
|
|
1
|
+
"use strict";const h=require("./layers.CpCVdwqL.js"),K=require("./layers.BhkeJPMe.js"),it=require("./layers.liDIleE6.js"),nt=(e,t,a,i)=>{t.forEach(l=>{xt[l](e,a,i)})},lt=(e,t,a)=>{h.log$1.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},ct=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ot=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},ht=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},yt=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},ft=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},gt=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},pt=(e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},dt=(e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},xt={extension:lt,composition:ct,aggregation:ot,dependency:ht,lollipop:yt,point:ft,circle:gt,cross:pt,barb:dt},ut=nt;function bt(e,t){t&&e.attr("style",t)}function wt(e){const t=h.select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=t.append("xhtml:div"),i=e.label,l=e.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+l+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+i+"</span>"),bt(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const mt=(e,t,a,i)=>{let l=e||"";if(typeof l=="object"&&(l=l[0]),h.evaluate(h.getConfig().flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"<br />"),h.log$1.debug("vertexText"+l);const r={isNode:i,label:h.decodeEntities(l).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t.replace("fill:","color:")};return wt(r)}else{const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof l=="string"?s=l.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(l)?s=l:s=[];for(const n of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),a?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}return r}},B=mt,L=async(e,t,a,i)=>{let l;const r=t.useHtmlLabels||h.evaluate(h.getConfig().flowchart.htmlLabels);a?l=a:l="node default";const s=e.insert("g").attr("class",l).attr("id",t.domId||t.id),n=s.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const y=n.node();let o;t.labelType==="markdown"?o=K.createText(n,h.sanitizeText$2(h.decodeEntities(c),h.getConfig()),{useHtmlLabels:r,width:t.width||h.getConfig().flowchart.wrappingWidth,classes:"markdown-node-label"}):o=y.appendChild(B(h.sanitizeText$2(h.decodeEntities(c),h.getConfig()),t.labelStyle,!1,i));let f=o.getBBox();const p=t.padding/2;if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const g=o.children[0],x=h.select(o),m=g.getElementsByTagName("img");if(m){const d=c.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(u=>new Promise(S=>{function C(){if(u.style.display="flex",u.style.flexDirection="column",d){const M=h.getConfig().fontSize?h.getConfig().fontSize:window.getComputedStyle(document.body).fontSize,W=parseInt(M,10)*5+"px";u.style.minWidth=W,u.style.maxWidth=W}else u.style.width="100%";S(u)}setTimeout(()=>{u.complete&&C()}),u.addEventListener("error",C),u.addEventListener("load",C)})))}f=g.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return r?n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):n.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:p,label:n}},w=(e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height};function _(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}function kt(e,t){return e.intersect(t)}function P(e,t,a,i){var l=e.x,r=e.y,s=l-i.x,n=r-i.y,c=Math.sqrt(t*t*n*n+a*a*s*s),y=Math.abs(t*a*s/c);i.x<l&&(y=-y);var o=Math.abs(t*a*n/c);return i.y<r&&(o=-o),{x:l+y,y:r+o}}function vt(e,t,a){return P(e,t,t,a)}function Lt(e,t,a,i){var l,r,s,n,c,y,o,f,p,g,x,m,d,u,S;if(l=t.y-e.y,s=e.x-t.x,c=t.x*e.y-e.x*t.y,p=l*a.x+s*a.y+c,g=l*i.x+s*i.y+c,!(p!==0&&g!==0&&G(p,g))&&(r=i.y-a.y,n=a.x-i.x,y=i.x*a.y-a.x*i.y,o=r*e.x+n*e.y+y,f=r*t.x+n*t.y+y,!(o!==0&&f!==0&&G(o,f))&&(x=l*n-r*s,x!==0)))return m=Math.abs(x/2),d=s*y-n*c,u=d<0?(d-m)/x:(d+m)/x,d=r*c-l*y,S=d<0?(d-m)/x:(d+m)/x,{x:u,y:S}}function G(e,t){return e*t>0}function St(e,t,a){var i=e.x,l=e.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(x){s=Math.min(s,x.x),n=Math.min(n,x.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var c=i-e.width/2-s,y=l-e.height/2-n,o=0;o<t.length;o++){var f=t[o],p=t[o<t.length-1?o+1:0],g=Lt(e,a,{x:c+f.x,y:y+f.y},{x:c+p.x,y:y+p.y});g&&r.push(g)}return r.length?(r.length>1&&r.sort(function(x,m){var d=x.x-a.x,u=x.y-a.y,S=Math.sqrt(d*d+u*u),C=m.x-a.x,M=m.y-a.y,I=Math.sqrt(C*C+M*M);return S<I?-1:S===I?0:1}),r[0]):e}const $t=(e,t)=>{var a=e.x,i=e.y,l=t.x-a,r=t.y-i,s=e.width/2,n=e.height/2,c,y;return Math.abs(r)*s>Math.abs(l)*n?(r<0&&(n=-n),c=r===0?0:n*l/r,y=n):(l<0&&(s=-s),c=s,y=l===0?0:s*r/l),{x:a+c,y:i+y}},tt=$t,b={node:kt,circle:vt,ellipse:P,polygon:St,rect:tt},Ct=async(e,t)=>{t.useHtmlLabels||h.getConfig().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:i,bbox:l,halfPadding:r}=await L(e,t,"node "+t.classes,!0);h.log$1.info("Classes = ",t.classes);const s=i.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-r).attr("y",-l.height/2-r).attr("width",l.width+t.padding).attr("height",l.height+t.padding),w(t,s),t.intersect=function(n){return b.rect(t,n)},i},Mt=Ct,Tt=e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},Bt=(e,t,a)=>{const i=Tt(e),l=2,r=t.height+2*a.padding,s=r/l,n=t.width+2*s+a.padding,c=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*c},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*c,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*c},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*c,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-c},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r+c}]:i.has("left")?[{x:s,y:0},{x:s,y:-c},{x:n-s,y:-c},{x:n-s,y:-r+c},{x:s,y:-r+c},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-c},{x:s,y:-r+c},{x:0,y:-r+c},{x:n/2,y:-r},{x:n,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:s,y:-c},{x:s,y:-r+c},{x:n-s,y:-r+c},{x:n-s,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},Z=e=>e?" "+e:"",E=(e,t)=>`node default${Z(e.classes)} ${Z(e.class)}`,F=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=l+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];h.log$1.info("Question main (Circle)");const c=_(a,s,s,n);return c.attr("style",t.style),w(t,c),t.intersect=function(y){return h.log$1.warn("Intersect called"),b.polygon(t,n,y)},a},Et=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",l.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return b.circle(t,14,s)},a},_t=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=4,r=i.height+t.padding,s=r/l,n=i.width+2*s+t.padding,c=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],y=_(a,n,r,c);return y.attr("style",t.style),w(t,y),t.intersect=function(o){return b.polygon(t,c,o)},a},Nt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,void 0,!0),l=2,r=i.height+2*t.padding,s=r/l,n=i.width+2*s+t.padding,c=Bt(t.directions,i,t),y=_(a,n,r,c);return y.attr("style",t.style),w(t,y),t.intersect=function(o){return b.polygon(t,c,o)},a},Rt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:l,y:0},{x:l,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return _(a,l,r,s).attr("style",t.style),t.width=l+r,t.height=r,t.intersect=function(c){return b.polygon(t,s,c)},a},Ht=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},It=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:l+r/6,y:0},{x:l-2*r/6,y:-r},{x:-r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Ot=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:l+2*r/6,y:0},{x:l-r/6,y:-r},{x:r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Wt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:l-r/6,y:0},{x:l+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Xt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l+r/2,y:0},{x:l,y:-r/2},{x:l+r/2,y:-r},{x:0,y:-r}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},Yt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=l/2,s=r/(2.5+l/50),n=i.height+s+t.padding,c="M 0,"+s+" a "+r+","+s+" 0,0,0 "+l+" 0 a "+r+","+s+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+l+" 0 l 0,"+-n,y=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+s)+")");return w(t,y),t.intersect=function(o){const f=b.rect(t,o),p=f.x-t.x;if(r!=0&&(Math.abs(p)<t.width/2||Math.abs(p)==t.width/2&&Math.abs(f.y-t.y)>t.height/2-s)){let g=s*s*(1-p*p/(r*r));g!=0&&(g=Math.sqrt(g)),g=s-g,o.y-t.y>0&&(g=-g),f.y+=g}return f},a},Dt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,"node "+t.classes+" "+t.class,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,y=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",y).attr("width",s).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(z(r,t.props.borders,s,n),o.delete("borders")),o.forEach(f=>{h.log$1.warn(`Unknown node property ${f}`)})}return w(t,r),t.intersect=function(o){return b.rect(t,o)},a},At=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,"node "+t.classes,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-s/2:-i.width/2-l,y=t.positioned?-n/2:-i.height/2-l;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",y).attr("width",s).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(z(r,t.props.borders,s,n),o.delete("borders")),o.forEach(f=>{h.log$1.warn(`Unknown node property ${f}`)})}return w(t,r),t.intersect=function(o){return b.rect(t,o)},a},jt=async(e,t)=>{const{shapeSvg:a}=await L(e,t,"label",!0);h.log$1.trace("Classes = ",t.class);const i=a.insert("rect",":first-child"),l=0,r=0;if(i.attr("width",l).attr("height",r),a.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(z(i,t.props.borders,l,r),s.delete("borders")),s.forEach(n=>{h.log$1.warn(`Unknown node property ${n}`)})}return w(t,i),t.intersect=function(s){return b.rect(t,s)},a};function z(e,t,a,i){const l=[],r=n=>{l.push(n,0)},s=n=>{l.push(0,n)};t.includes("t")?(h.log$1.debug("add top border"),r(a)):s(a),t.includes("r")?(h.log$1.debug("add right border"),r(i)):s(i),t.includes("b")?(h.log$1.debug("add bottom border"),r(a)):s(a),t.includes("l")?(h.log$1.debug("add left border"),r(i)):s(i),e.attr("stroke-dasharray",l.join(" "))}const Ut=(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,h.log$1.info("Label text abc79",c,n,typeof n=="object");const y=s.node().appendChild(B(c,t.labelStyle,!0,!0));let o={width:0,height:0};if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const m=y.children[0],d=h.select(y);o=m.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}h.log$1.info("Text 2",n);const f=n.slice(1,n.length);let p=y.getBBox();const g=s.node().appendChild(B(f.join?f.join("<br/>"):f,t.labelStyle,!0,!0));if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const m=g.children[0],d=h.select(g);o=m.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}const x=t.padding/2;return h.select(g).attr("transform","translate( "+(o.width>p.width?0:(p.width-o.width)/2)+", "+(p.height+x+5)+")"),h.select(y).attr("transform","translate( "+(o.width<p.width?0:-(p.width-o.width)/2)+", 0)"),o=s.node().getBBox(),s.attr("transform","translate("+-o.width/2+", "+(-o.height/2-x+3)+")"),l.attr("class","outer title-state").attr("x",-o.width/2-x).attr("y",-o.height/2-x).attr("width",o.width+t.padding).attr("height",o.height+t.padding),r.attr("class","divider").attr("x1",-o.width/2-x).attr("x2",o.width/2+x).attr("y1",-o.height/2-x+p.height+x).attr("y2",-o.height/2-x+p.height+x),w(t,l),t.intersect=function(m){return b.rect(t,m)},i},zt=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.height+t.padding,r=i.width+l/4+t.padding,s=a.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-r/2).attr("y",-l/2).attr("width",r).attr("height",l);return w(t,s),t.intersect=function(n){return b.rect(t,n)},a},Gt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,E(t),!0),r=a.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),h.log$1.info("Circle main"),w(t,r),t.intersect=function(s){return h.log$1.info("Circle intersect",t,i.width/2+l,s),b.circle(t,i.width/2+l,s)},a},Zt=async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await L(e,t,E(t),!0),r=5,s=a.insert("g",":first-child"),n=s.insert("circle"),c=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),h.log$1.info("DoubleCircle main"),w(t,n),t.intersect=function(y){return h.log$1.info("DoubleCircle intersect",t,i.width/2+l+r,y),b.circle(t,i.width/2+l+r,y)},a},Ft=async(e,t)=>{const{shapeSvg:a,bbox:i}=await L(e,t,E(t),!0),l=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:l,y:0},{x:l,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=_(a,l,r,s);return n.attr("style",t.style),w(t,n),t.intersect=function(c){return b.polygon(t,s,c)},a},qt=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),w(t,i),t.intersect=function(l){return b.circle(t,7,l)},a},q=(e,t,a)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,r=10;a==="LR"&&(l=10,r=70);const s=i.append("rect").attr("x",-1*l/2).attr("y",-1*r/2).attr("width",l).attr("height",r).attr("class","fork-join");return w(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return b.rect(t,n)},i},Qt=(e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),l=a.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),w(t,l),t.intersect=function(r){return b.circle(t,7,r)},a},Vt=(e,t)=>{const a=t.padding/2,i=4,l=8;let r;t.classes?r="node "+t.classes:r="node default";const s=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),c=s.insert("line"),y=s.insert("line");let o=0,f=i;const p=s.insert("g").attr("class","label");let g=0;const x=t.classData.annotations&&t.classData.annotations[0],m=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",d=p.node().appendChild(B(m,t.labelStyle,!0,!0));let u=d.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const k=d.children[0],v=h.select(d);u=k.getBoundingClientRect(),v.attr("width",u.width),v.attr("height",u.height)}t.classData.annotations[0]&&(f+=u.height+i,o+=u.width);let S=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(h.getConfig().flowchart.htmlLabels?S+="<"+t.classData.type+">":S+="<"+t.classData.type+">");const C=p.node().appendChild(B(S,t.labelStyle,!0,!0));h.select(C).attr("class","classTitle");let M=C.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const k=C.children[0],v=h.select(C);M=k.getBoundingClientRect(),v.attr("width",M.width),v.attr("height",M.height)}f+=M.height+i,M.width>o&&(o=M.width);const I=[];t.classData.members.forEach(k=>{const v=k.getDisplayDetails();let H=v.displayText;h.getConfig().flowchart.htmlLabels&&(H=H.replace(/</g,"<").replace(/>/g,">"));const N=p.node().appendChild(B(H,v.cssStyle?v.cssStyle:t.labelStyle,!0,!0));let T=N.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const U=N.children[0],X=h.select(N);T=U.getBoundingClientRect(),X.attr("width",T.width),X.attr("height",T.height)}T.width>o&&(o=T.width),f+=T.height+i,I.push(N)}),f+=l;const W=[];if(t.classData.methods.forEach(k=>{const v=k.getDisplayDetails();let H=v.displayText;h.getConfig().flowchart.htmlLabels&&(H=H.replace(/</g,"<").replace(/>/g,">"));const N=p.node().appendChild(B(H,v.cssStyle?v.cssStyle:t.labelStyle,!0,!0));let T=N.getBBox();if(h.evaluate(h.getConfig().flowchart.htmlLabels)){const U=N.children[0],X=h.select(N);T=U.getBoundingClientRect(),X.attr("width",T.width),X.attr("height",T.height)}T.width>o&&(o=T.width),f+=T.height+i,W.push(N)}),f+=l,x){let k=(o-u.width)/2;h.select(d).attr("transform","translate( "+(-1*o/2+k)+", "+-1*f/2+")"),g=u.height+i}let st=(o-M.width)/2;return h.select(C).attr("transform","translate( "+(-1*o/2+st)+", "+(-1*f/2+g)+")"),g+=M.height+i,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-f/2-a+l+g).attr("y2",-f/2-a+l+g),g+=l,I.forEach(k=>{h.select(k).attr("transform","translate( "+-o/2+", "+(-1*f/2+g+l/2)+")");const v=k==null?void 0:k.getBBox();g+=((v==null?void 0:v.height)??0)+i}),g+=l,y.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-f/2-a+l+g).attr("y2",-f/2-a+l+g),g+=l,W.forEach(k=>{h.select(k).attr("transform","translate( "+-o/2+", "+(-1*f/2+g)+")");const v=k==null?void 0:k.getBBox();g+=((v==null?void 0:v.height)??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(f/2)-a).attr("width",o+t.padding).attr("height",f+t.padding),w(t,n),t.intersect=function(k){return b.rect(t,k)},s},Q={rhombus:F,composite:At,question:F,rect:Dt,labelRect:jt,rectWithTitle:Ut,choice:Et,circle:Gt,doublecircle:Zt,stadium:zt,hexagon:_t,block_arrow:Nt,rect_left_inv_arrow:Rt,lean_right:Ht,lean_left:It,trapezoid:Ot,inv_trapezoid:Wt,rect_right_inv_arrow:Xt,cylinder:Yt,start:qt,end:Qt,note:Mt,subroutine:Ft,fork:q,join:q,class_box:Vt};let O={};const Jt=async(e,t,a)=>{let i,l;if(t.link){let r;h.getConfig().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",r),l=await Q[t.shape](i,t,a)}else l=await Q[t.shape](e,t,a),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),i.attr("data-node","true"),i.attr("data-id",t.id),O[t.id]=i,t.haveCallback&&O[t.id].attr("class",O[t.id].attr("class")+" clickable"),i},Kt=(e,t)=>{O[t.id]=e},Pt=()=>{O={}},tr=e=>{const t=O[e.id];h.log$1.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},rt=({flowchart:e})=>{var t,a;const i=((t=e==null?void 0:e.subGraphTitleMargin)==null?void 0:t.top)??0,l=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,r=i+l;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:l,subGraphTitleTotalMargin:r}},R={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function Y(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=A(e),t=A(t);const[a,i]=[e.x,e.y],[l,r]=[t.x,t.y],s=l-a,n=r-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}const A=e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,at=e=>({x:function(t,a,i){let l=0;if(a===0&&Object.hasOwn(R,e.arrowTypeStart)){const{angle:r,deltaX:s}=Y(i[0],i[1]);l=R[e.arrowTypeStart]*Math.cos(r)*(s>=0?1:-1)}else if(a===i.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){const{angle:r,deltaX:s}=Y(i[i.length-1],i[i.length-2]);l=R[e.arrowTypeEnd]*Math.cos(r)*(s>=0?1:-1)}return A(t).x+l},y:function(t,a,i){let l=0;if(a===0&&Object.hasOwn(R,e.arrowTypeStart)){const{angle:r,deltaY:s}=Y(i[0],i[1]);l=R[e.arrowTypeStart]*Math.abs(Math.sin(r))*(s>=0?1:-1)}else if(a===i.length-1&&Object.hasOwn(R,e.arrowTypeEnd)){const{angle:r,deltaY:s}=Y(i[i.length-1],i[i.length-2]);l=R[e.arrowTypeEnd]*Math.abs(Math.sin(r))*(s>=0?1:-1)}return A(t).y+l}}),et=(e,t,a,i,l)=>{t.arrowTypeStart&&V(e,"start",t.arrowTypeStart,a,i,l),t.arrowTypeEnd&&V(e,"end",t.arrowTypeEnd,a,i,l)},rr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},V=(e,t,a,i,l,r)=>{const s=rr[a];if(!s){h.log$1.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${l}_${r}-${s}${n})`)};let j={},$={};const ar=()=>{j={},$={}},er=(e,t)=>{const a=h.evaluate(h.getConfig().flowchart.htmlLabels),i=t.labelType==="markdown"?K.createText(e,t.label,{style:t.labelStyle,useHtmlLabels:a,addSvgBackground:!0}):B(t.label,t.labelStyle),l=e.insert("g").attr("class","edgeLabel"),r=l.insert("g").attr("class","label");r.node().appendChild(i);let s=i.getBBox();if(a){const c=i.children[0],y=h.select(i);s=c.getBoundingClientRect(),y.attr("width",s.width),y.attr("height",s.height)}r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),j[t.id]=l,t.width=s.width,t.height=s.height;let n;if(t.startLabelLeft){const c=B(t.startLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$[t.id]||($[t.id]={}),$[t.id].startLeft=y,D(n,t.startLabelLeft)}if(t.startLabelRight){const c=B(t.startLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=y.node().appendChild(c),o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$[t.id]||($[t.id]={}),$[t.id].startRight=y,D(n,t.startLabelRight)}if(t.endLabelLeft){const c=B(t.endLabelLeft,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(c),$[t.id]||($[t.id]={}),$[t.id].endLeft=y,D(n,t.endLabelLeft)}if(t.endLabelRight){const c=B(t.endLabelRight,t.labelStyle),y=e.insert("g").attr("class","edgeTerminals"),o=y.insert("g").attr("class","inner");n=o.node().appendChild(c);const f=c.getBBox();o.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.node().appendChild(c),$[t.id]||($[t.id]={}),$[t.id].endRight=y,D(n,t.endLabelRight)}return i};function D(e,t){h.getConfig().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}const sr=(e,t)=>{h.log$1.debug("Moving label abc88 ",e.id,e.label,j[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const i=h.getConfig(),{subGraphTitleTotalMargin:l}=rt(i);if(e.label){const r=j[e.id];let s=e.x,n=e.y;if(a){const c=h.utils.calcLabelPosition(a);h.log$1.debug("Moving label "+e.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}r.attr("transform",`translate(${s}, ${n+l/2})`)}if(e.startLabelLeft){const r=$[e.id].startLeft;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const r=$[e.id].startRight;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const r=$[e.id].endLeft;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const r=$[e.id].endRight;let s=e.x,n=e.y;if(a){const c=h.utils.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);s=c.x,n=c.y}r.attr("transform",`translate(${s}, ${n})`)}},ir=(e,t)=>{const a=e.x,i=e.y,l=Math.abs(t.x-a),r=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return l>=s||r>=n},nr=(e,t,a)=>{h.log$1.debug(`intersection calc abc89:
|
|
2
2
|
outsidePoint: ${JSON.stringify(t)}
|
|
3
3
|
insidePoint : ${JSON.stringify(a)}
|
|
4
4
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,l=e.y,r=Math.abs(i-a.x),s=e.width/2;let n=a.x<t.x?s-r:s+r;const c=e.height/2,y=Math.abs(t.y-a.y),o=Math.abs(t.x-a.x);if(Math.abs(l-t.y)*s>Math.abs(i-t.x)*c){let f=a.y<t.y?t.y-c-l:l-c-t.y;n=o*f/y;const p={x:a.x<t.x?a.x+n:a.x-o+n,y:a.y<t.y?a.y+y-f:a.y-y+f};return n===0&&(p.x=t.x,p.y=t.y),o===0&&(p.x=t.x),y===0&&(p.y=t.y),h.log$1.debug(`abc89 topp/bott calc, Q ${y}, q ${f}, R ${o}, r ${n}`,p),p}else{a.x<t.x?n=t.x-s-i:n=i-s-t.x;let f=y*n/o,p=a.x<t.x?a.x+o-n:a.x-o+n,g=a.y<t.y?a.y+f:a.y-f;return h.log$1.debug(`sides calc abc89, Q ${y}, q ${f}, R ${o}, r ${n}`,{_x:p,_y:g}),n===0&&(p=t.x,g=t.y),o===0&&(p=t.x),y===0&&(g=t.y),{x:p,y:g}}},J=(e,t)=>{h.log$1.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],l=!1;return e.forEach(r=>{if(!ir(t,r)&&!l){const s=nr(t,i,r);let n=!1;a.forEach(c=>{n=n||c.x===s.x&&c.y===s.y}),a.some(c=>c.x===s.x&&c.y===s.y)||a.push(s),l=!0}else i=r,l||a.push(r)}),a},lr=function(e,t,a,i,l,r,s){let n=a.points;h.log$1.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1;const y=r.node(t.v);var o=r.node(t.w);o!=null&&o.intersect&&(y!=null&&y.intersect)&&(n=n.slice(1,a.points.length-1),n.unshift(y.intersect(n[0])),n.push(o.intersect(n[n.length-1]))),a.toCluster&&(h.log$1.debug("to cluster abc88",i[a.toCluster]),n=J(a.points,i[a.toCluster].node),c=!0),a.fromCluster&&(h.log$1.debug("from cluster abc88",i[a.fromCluster]),n=J(n.reverse(),i[a.fromCluster].node).reverse(),c=!0);const f=n.filter(M=>!Number.isNaN(M.y));let p=h.curveBasis;a.curve&&(l==="graph"||l==="flowchart")&&(p=a.curve);const{x:g,y:x}=at(a),m=it.line().x(g).y(x).curve(p);let d;switch(a.thickness){case"normal":d="edge-thickness-normal";break;case"thick":d="edge-thickness-thick";break;case"invisible":d="edge-thickness-thick";break;default:d=""}switch(a.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed";break}const u=e.append("path").attr("d",m(f)).attr("id",a.id).attr("class"," "+d+(a.classes?" "+a.classes:"")).attr("style",a.style);let S="";(h.getConfig().flowchart.arrowMarkerAbsolute||h.getConfig().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\("),S=S.replace(/\)/g,"\\)")),et(u,a,S,s,l);let C={};return c&&(C.updatedPath=n),C.originalPath=a.points,C};exports.addEdgeMarkers=et;exports.clear=ar;exports.clear$1=Pt;exports.createLabel$1=B;exports.getLineFunctionsWithOffset=at;exports.getSubGraphTitleMargins=rt;exports.insertEdge=lr;exports.insertEdgeLabel=er;exports.insertMarkers$1=ut;exports.insertNode=Jt;exports.intersectRect$1=tt;exports.labelHelper=L;exports.positionEdgeLabel=sr;exports.positionNode=tr;exports.setNodeElem=Kt;exports.updateNodeBounds=w;
|