@layers-app/editor 2.2.45 → 2.3.0
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 +2 -2
- package/dist/index.js +2 -2
- package/dist/{layers.CSsCFhvL.js → layers.-2KfQ6RG.js} +1 -1
- package/dist/{layers.C-TQ4gDg.js → layers.2VLsd23I.js} +1 -1
- package/dist/{layers.CjUQRZCf.js → layers.3t60RULo.js} +96 -95
- package/dist/{layers.0ohwJnJO.js → layers.5g-d1lPI.js} +361 -342
- package/dist/{layers.DGO5wxx-.js → layers.6fNZWRMy.js} +1 -1
- package/dist/{layers.cCd9G0s7.js → layers.6nxhuUZS.js} +1 -1
- package/dist/{layers.CKLSBcei.js → layers.77ToS0vJ.js} +1 -1
- package/dist/{layers.txhP70wF.js → layers.7oPXw6se.js} +1 -1
- package/dist/{layers.D2IuhDCQ.js → layers.8aC_7H6s.js} +1 -1
- package/dist/{layers.BKrToDbz.js → layers.9_5gtlo0.js} +1 -1
- package/dist/{layers.n-DYmU2Z.js → layers.A2b0zfpv.js} +1 -1
- package/dist/{layers.CmXdbn8_.js → layers.AHmwp-MB.js} +1 -1
- package/dist/{layers.CYW1WEKe.js → layers.B-EeOsPN.js} +1 -1
- package/dist/{layers.sKO5wWzt.js → layers.B-knJAmg.js} +1 -1
- package/dist/{layers.CQESVhxO.js → layers.B0YPk_J2.js} +1 -1
- package/dist/layers.B0aoB6yM.js +1 -0
- package/dist/{layers.BTBRVGFs.js → layers.B0c5OY_G.js} +1 -1
- package/dist/{layers.Dx2lhGzZ.js → layers.B1Asn8n_.js} +3 -3
- package/dist/{layers.DcYmpYNe.js → layers.B1QlqLSe.js} +1 -1
- package/dist/{layers.BaVDbZc-.js → layers.B1YHDbg8.js} +1 -1
- package/dist/{layers.Dd_MQmMI.js → layers.B4dgRxLi.js} +8 -8
- package/dist/{layers.B22dcdRZ.js → layers.B4n7r8Ul.js} +1 -1
- package/dist/{layers.CP2x77Hz.js → layers.B5AMuW0E.js} +1 -1
- package/dist/{layers.DinGcvYA.js → layers.B5R_HMQi.js} +33 -33
- package/dist/{layers.NEN1dVNO.js → layers.B7fR53su.js} +1 -1
- package/dist/{layers.DNqMXVNp.js → layers.B8XK-8I-.js} +1 -1
- package/dist/{layers.CY17OEce.js → layers.B9Xz7B4H.js} +1 -1
- package/dist/{layers.DvhAl2Y2.js → layers.BBT4Tvg5.js} +1 -1
- package/dist/{layers.mHLeiSFC.js → layers.BC_YpOSp.js} +1 -1
- package/dist/{layers.QhZDFUq4.js → layers.BD7kYiWS.js} +1 -1
- package/dist/{layers.DveF4Taj.js → layers.BDQtN1aD.js} +1 -1
- package/dist/{layers.Du94jGQf.js → layers.BExC2g6w.js} +1 -1
- package/dist/{layers.B028_Pfk.js → layers.BFreQdwW.js} +13 -13
- package/dist/{layers.BOkb4Kwr.js → layers.BJkqxsDC.js} +1 -1
- package/dist/{layers.CqFgGsQ4.js → layers.BKvhj3Jc.js} +3 -3
- package/dist/{layers.CAs2-nlo.js → layers.BKyKCEyP.js} +24 -24
- package/dist/{layers.Co4l7_YV.js → layers.BPdavEfb.js} +1 -1
- package/dist/{layers.Cvc8xBfw.js → layers.BQjo-s-b.js} +4104 -4138
- package/dist/{layers.DYK2Cc2v.js → layers.BQy5VO07.js} +6 -6
- package/dist/{layers.Bb6_oKs8.js → layers.BSWJm3U8.js} +1 -1
- package/dist/{layers.CGra3CE8.js → layers.BWD2tONt.js} +2 -2
- package/dist/{layers.wby51kRL.js → layers.BaZ9oGNz.js} +4 -4
- package/dist/{layers.DjG7qFHf.js → layers.BatQCiGf.js} +11 -11
- package/dist/{layers.BEIgYyne.js → layers.BccLIbKe.js} +1 -1
- package/dist/{layers.yftdzODL.js → layers.BfWe9IcW.js} +1 -1
- package/dist/layers.Bg7BQcmt.js +31 -0
- package/dist/{layers.BmnporKE.js → layers.Bgd7myyy.js} +1 -1
- package/dist/{layers.B7VPVY9m.js → layers.BhvmN99n.js} +1 -1
- package/dist/{layers.j6LRzfso.js → layers.Bi4--lcT.js} +1 -1
- package/dist/{layers.DiA7fPFt.js → layers.Bj2_ntq3.js} +3 -3
- package/dist/{layers.bWZDlvmW.js → layers.Blhb8ubC.js} +1 -1
- package/dist/{layers.9PIBmdB5.js → layers.Bnjo7X5G.js} +31 -31
- package/dist/{layers.B5yZJBoB.js → layers.Bnozyuub.js} +1 -1
- package/dist/{layers.oXNzpBlK.js → layers.Bptrc7aE.js} +27 -27
- package/dist/{layers.jg--vRcI.js → layers.BrPGpTKD.js} +9895 -9802
- package/dist/{layers.BaMwv1jF.js → layers.Brsx_95a.js} +1 -1
- package/dist/{layers.BqnQzZ9x.js → layers.Bs8dWBby.js} +1 -1
- package/dist/{layers.BcfRIrYG.js → layers.Bsr7C4ON.js} +1 -1
- package/dist/{layers.bk9EcYJr.js → layers.BtXZCoH_.js} +39 -39
- package/dist/{layers.DVZjfzxM.js → layers.BtXqThYa.js} +1 -1
- package/dist/layers.Bwc-8Isq.js +6 -0
- package/dist/{layers.CgtkYIke.js → layers.Bx77WE5O.js} +1 -1
- package/dist/{layers.CmSiqz4U.js → layers.C-78wB0V.js} +3 -3
- package/dist/{layers.CuZ6oi1Y.js → layers.C1rqQip5.js} +1 -1
- package/dist/{layers.JKpsQUa8.js → layers.C3_GElaJ.js} +1 -1
- package/dist/{layers.CZzgBinT.js → layers.C53iq2Ma.js} +1 -1
- package/dist/{layers.ByyJrMEp.js → layers.C6LbKv-M.js} +2 -2
- package/dist/{layers.BUZ2pvws.js → layers.C6ueC3Z0.js} +1 -1
- package/dist/{layers.Cof8D_jH.js → layers.C71O9vAp.js} +1 -1
- package/dist/{layers.C2CWUW0P.js → layers.C7b_RmTv.js} +1 -1
- package/dist/{layers.C2pTMR38.js → layers.C8Tfd7sP.js} +1 -1
- package/dist/{layers.DuNmb6iV.js → layers.C8WbGo3j.js} +1 -1
- package/dist/{layers.BC7Cg5cy.js → layers.C9Lko7YH.js} +1 -1
- package/dist/{layers.NCy-p2UI.js → layers.CAFSzILX.js} +21 -21
- package/dist/layers.CCHvuvhF.js +8 -0
- package/dist/{layers.Bmw_ImFW.js → layers.CFAdy1gb.js} +1 -1
- package/dist/{layers.BxaGfbS4.js → layers.CFL3W3X8.js} +2 -2
- package/dist/{layers.fnoJpR74.js → layers.CFcETIOb.js} +1 -1
- package/dist/{layers.CbG7bPrw.js → layers.CIvcS__9.js} +1 -1
- package/dist/{layers.CLP8NLxE.js → layers.COTQMo6A.js} +1 -1
- package/dist/{layers.CtFiU_U-.js → layers.CQ7hsV-G.js} +1 -1
- package/dist/{layers.Db7WC46z.js → layers.CRRnsu0U.js} +1 -1
- package/dist/layers.CSJKF8Yc.js +1 -0
- package/dist/{layers.BkUV4peM.js → layers.CT2g1VRg.js} +1 -1
- package/dist/{layers.DgBtq91i.js → layers.CUGBlmw8.js} +1 -1
- package/dist/{layers.DhOjjk4e.js → layers.CUV2M_pU.js} +1 -1
- package/dist/{layers.CwiLAF0n.js → layers.CWkQixNL.js} +1 -1
- package/dist/{layers.CDc-JAN1.js → layers.CXsKBYuP.js} +1 -1
- package/dist/{layers.Cx21Vx7C.js → layers.CZVAUi9T.js} +1 -1
- package/dist/{layers.Cjk9bUrz.js → layers.CZWgMRsn.js} +1 -1
- package/dist/layers.Ca29Mcjy.js +1 -0
- package/dist/{layers.YdWr9xoX.js → layers.CacnnrTU.js} +1 -1
- package/dist/{layers.CO180qeA.js → layers.CbuDjZaw.js} +1 -1
- package/dist/{layers.0O_y_PSM.js → layers.CcwJpgwT.js} +4 -4
- package/dist/{layers.D-dncXMv.js → layers.CfUup9qJ.js} +1 -1
- package/dist/{layers.vEoVIWoQ.js → layers.CgjZSo5b.js} +1 -1
- package/dist/{layers.BjDSCoZM.js → layers.ChRuHm3l.js} +1 -1
- package/dist/{layers.DxQF7DU5.js → layers.Chpc9546.js} +1 -1
- package/dist/{layers.DLiv2kEf.js → layers.Ciq1sahM.js} +1 -1
- package/dist/{layers.B5a2e-Mn.js → layers.CkpDbJMJ.js} +1 -1
- package/dist/{layers.DqCVQnl5.js → layers.ClDrIPRU.js} +1 -1
- package/dist/{layers.CHqw81xe.js → layers.CmupXZHN.js} +1 -1
- package/dist/{layers.C7E3l-g_.js → layers.Cn8CWsBB.js} +2 -2
- package/dist/{layers.BDmaTCfD.js → layers.Cr0gsM_j.js} +6 -6
- package/dist/{layers.BVrMVvbD.js → layers.CrRPE221.js} +1 -1
- package/dist/{layers.DKpytb6w.js → layers.CsN1TpE_.js} +1 -1
- package/dist/{layers.DzgpLhqO.js → layers.CvePRtuZ.js} +1 -1
- package/dist/{layers.km8iRn1X.js → layers.CwAI9EMJ.js} +95 -95
- package/dist/{layers.D2bgGfrE.js → layers.CwLijGjy.js} +5 -5
- package/dist/{layers.CiDAyBeD.js → layers.CxcPHDlk.js} +1 -1
- package/dist/layers.CyJLYOzo.js +1 -0
- package/dist/{layers.rkrNrIQd.js → layers.CyqBb3la.js} +1 -1
- package/dist/layers.CzQlolTW.js +1 -0
- package/dist/{layers.BEdP6w5G.js → layers.CzSHWBJE.js} +1 -1
- package/dist/{layers.BDSMUwmt.js → layers.CztSiz59.js} +1 -1
- package/dist/{layers.CT3XTF81.js → layers.D1ALzL8l.js} +1 -1
- package/dist/{layers.9chn1oBm.js → layers.D1q9XEqC.js} +1 -1
- package/dist/{layers.CwazPZdq.js → layers.D2P7q6AR.js} +2 -2
- package/dist/{layers.DFxl_E74.js → layers.D37qejd1.js} +4 -4
- package/dist/{layers.XAmXrnxl.js → layers.D53pVbAt.js} +1 -1
- package/dist/layers.D5gltjTL.js +1163 -0
- package/dist/{layers.Bf3CS2lb.js → layers.D8s5zGyA.js} +4 -4
- package/dist/{layers.C_M8g-oV.js → layers.DBQznnML.js} +1 -1
- package/dist/layers.DGptlsw9.js +8 -0
- package/dist/{layers.B68ca-eU.js → layers.DIDIuUgi.js} +1 -1
- package/dist/{layers.D53HW-OH.js → layers.DIk_oySe.js} +1 -1
- package/dist/layers.DLBYO9Pf.js +7 -0
- package/dist/{layers.BuPdI71w.js → layers.DLaija6u.js} +1 -1
- package/dist/{layers.t9b6t4Ii.js → layers.DLsrdKEz.js} +1 -1
- package/dist/{layers.DG26Vzsi.js → layers.DLyk5obs.js} +3 -3
- package/dist/{layers.CcfiG8Od.js → layers.DNSrh1pA.js} +1 -1
- package/dist/{layers.CABrQ2Zs.js → layers.DO1gXiNA.js} +1 -1
- package/dist/layers.DOK4tUdd.js +90 -0
- package/dist/{layers.a0ekgaAk.js → layers.DP7UYubA.js} +1 -1
- package/dist/{layers.C5spre2i.js → layers.DPlTEtvi.js} +1 -1
- package/dist/{layers.BWWFQbUs.js → layers.DQUdAZyr.js} +25 -25
- package/dist/{layers.CldflZpf.js → layers.DRN4BpGT.js} +1 -1
- package/dist/{layers.BadeIJgG.js → layers.DRoyt9-1.js} +4 -4
- package/dist/{layers.DoceYQaZ.js → layers.DUrkRJKo.js} +1 -1
- package/dist/{layers.D5naed4X.js → layers.DX9VTWiX.js} +1 -1
- package/dist/{layers.D1OY3B-n.js → layers.DY8_UsFK.js} +137 -137
- package/dist/{layers.Bex3-2F0.js → layers.DZ-JaYP3.js} +7 -7
- package/dist/{layers.QSp10MBY.js → layers.DZDZ3CuA.js} +1 -1
- package/dist/{layers.DRNjIrAp.js → layers.DZZUeo4N.js} +1 -1
- package/dist/{layers.C9bqqwGA.js → layers.DZqU-iL6.js} +40 -40
- package/dist/{layers.jcCRaKGd.js → layers.DaHHbgHM.js} +1 -1
- package/dist/{layers.DDTNqkEk.js → layers.DaLjgos9.js} +1 -1
- package/dist/{layers.ClSS_-JK.js → layers.DbcVW57C.js} +1 -1
- package/dist/{layers.DQbonqH1.js → layers.DbdtbmtQ.js} +1 -1
- package/dist/{layers.DheygGyD.js → layers.DcxJ1-U9.js} +1 -1
- package/dist/layers.DeT0xAwz.js +84 -0
- package/dist/{layers.P39es0O4.js → layers.Df3tBKAI.js} +1 -1
- package/dist/{layers.nXKHyTlo.js → layers.DhUwAghN.js} +1 -1
- package/dist/{layers.DXbA6oVt.js → layers.Dj860md7.js} +1 -1
- package/dist/{layers.Cg-zHhDe.js → layers.DkYYvaOJ.js} +2 -2
- package/dist/{layers.BJrL0_Rw.js → layers.Dn4qgJFc.js} +2 -2
- package/dist/{layers.B0sQe5D1.js → layers.Dodjwwv6.js} +3 -3
- package/dist/{layers.DvlQFVL_.js → layers.DohiIE20.js} +1 -1
- package/dist/{layers.Czx1TgLO.js → layers.DpKYGJRZ.js} +2 -2
- package/dist/{layers.BfHX9frV.js → layers.DsWcmm1l.js} +1 -1
- package/dist/{layers.CMB0mF82.js → layers.DvSTgxkV.js} +1 -1
- package/dist/{layers.B465LyPz.js → layers.Dvv8fKKk.js} +1 -1
- package/dist/{layers.CsgsF5Ft.js → layers.DwPIhine.js} +1 -1
- package/dist/{layers.ia3f0EYv.js → layers.DwS8V2Or.js} +1 -1
- package/dist/{layers.BVQVuKjJ.js → layers.DxABmn5O.js} +1 -1
- package/dist/layers.Dxr2o7ON.js +1 -0
- package/dist/{layers.C53wglsE.js → layers.DyciwgGK.js} +1 -1
- package/dist/{layers.Dvt-Szfl.js → layers.F57MyVA9.js} +1 -1
- package/dist/{layers.CEaPCwCe.js → layers.FzqiVsy_.js} +1 -1
- package/dist/{layers.Cg39QOHR.js → layers.HEL5QDoC.js} +1 -1
- package/dist/{layers.BunhC82l.js → layers.HhdqZtv5.js} +1 -1
- package/dist/{layers.Dt-Xolan.js → layers.IutlLti9.js} +1 -1
- package/dist/{layers.DnSDu3aj.js → layers.JZ7AxwMh.js} +1 -1
- package/dist/{layers.g-cZDg-J.js → layers.LGDbkgsv.js} +42 -42
- package/dist/{layers.DhROyrvJ.js → layers.LtQ1yaSI.js} +1 -1
- package/dist/{layers.DUD000-v.js → layers.SM9QTuDI.js} +16 -16
- package/dist/{layers.B5HuEtfE.js → layers.U7NY32uM.js} +1 -1
- package/dist/{layers.Ce54L6_R.js → layers.U8mTjpv_.js} +1 -1
- package/dist/{layers.DJTqJuKz.js → layers.WQRYkQdm.js} +15 -15
- package/dist/{layers.xMjrkzgP.js → layers.XCBehSH1.js} +1 -1
- package/dist/{layers.Cw289Pgg.js → layers.ZbGNGWJD.js} +12 -12
- package/dist/{layers.C2izS29k.js → layers.Zmw0un-f.js} +1 -1
- package/dist/{layers.C9O_XgoY.js → layers.aLsmNBld.js} +3 -3
- package/dist/{layers.vXZEDgHQ.js → layers.avpB9JpP.js} +1 -1
- package/dist/{layers.Cc98lCPt.js → layers.cnMJlmUn.js} +1 -1
- package/dist/{layers.oNZW8UBG.js → layers.dL8A7U4Q.js} +1 -1
- package/dist/{layers.DmmEgUMf.js → layers.eYOpCcnf.js} +1 -1
- package/dist/{layers.VNPeSDc5.js → layers.ehSnv8t3.js} +1 -1
- package/dist/{layers.DvfttTXQ.js → layers.fpcqoFdd.js} +1 -1
- package/dist/{layers.CJzs0OdD.js → layers.gG-4BCod.js} +1 -1
- package/dist/{layers.DIYV_Qgp.js → layers.iJv3YGd2.js} +1 -1
- package/dist/{layers.BpL4mYVq.js → layers.iT9k4umn.js} +1 -1
- package/dist/{layers.CIMF-Kx_.js → layers.iXNkI0ZC.js} +1 -1
- package/dist/{layers.C7LxBBYp.js → layers.mlObVGIf.js} +5 -5
- package/dist/{layers.D_LcSG5Y.js → layers.oaAarQby.js} +1 -1
- package/dist/{layers.Du37x8v3.js → layers.oeHgntpN.js} +1 -1
- package/dist/{layers.CFLly-Qe.js → layers.pRgndjxw.js} +1 -1
- package/dist/{layers.Cyy4XziO.js → layers.tZA_LmJa.js} +1 -1
- package/dist/{layers.DQNE7pSr.js → layers.teIuFApS.js} +1 -1
- package/dist/{layers.DWpAFgGF.js → layers.trRvrSLF.js} +1 -1
- package/dist/{layers.C4W6rbDZ.js → layers.visFusIB.js} +2982 -4133
- package/dist/{layers.VPQgHqCC.js → layers.wOUIpHWS.js} +1 -1
- package/dist/{layers.0KslT0iv.js → layers.xFbuP3DI.js} +1 -1
- package/dist/{layers.CCQQxd5s.js → layers.xI6XwkCk.js} +1 -1
- package/dist/{layers.C7y7h6VM.js → layers.xLIBX5yr.js} +1 -1
- package/dist/{layers.AL_UvFa5.js → layers.y9CU_epE.js} +1 -1
- package/dist/{layers.CM1BoU1E.js → layers.ywa822S7.js} +1 -1
- package/dist/layers.z2kEcNVH.js +5 -0
- package/package.json +2 -1
- package/dist/layers.BX2zMMPD.js +0 -6
- package/dist/layers.DXT1JSUZ.js +0 -5
- package/dist/layers.Dele1d2B.js +0 -1
- package/dist/layers.DfHZkVTD.js +0 -1
- package/dist/layers.DrZOHzCc.js +0 -84
- package/dist/layers.OYg34Rse.js +0 -1
- package/dist/layers.SIpDBTUg.js +0 -96
- package/dist/layers.nIE5wUh9.js +0 -1
- package/dist/layers.rE1cepGv.js +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./layers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./layers.DOK4tUdd.js"),Bt=require("./layers.iXNkI0ZC.js");require("./layers.Dxr2o7ON.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const Ot=require("./layers.CHZsXQcr.js"),Wt=require("./layers.B19hGmey.js"),ft=require("./layers.XCBehSH1.js"),pt=require("./layers.DyciwgGK.js");function zt(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function nt(){var e=Wt.ordinal().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,c,f=!1,d=0,R=0,k=.5;delete e.unknown;function A(){var m=t().length,D=n<s,S=D?n:s,L=D?s:n;o=(L-S)/Math.max(1,m-d+R*2),f&&(o=Math.floor(o)),S+=(L-S-o*(m-d))*k,c=o*(1-d),f&&(S=Math.round(S),c=Math.round(c));var p=zt(m).map(function(_){return S+o*_});return i(D?p.reverse():p)}return e.domain=function(m){return arguments.length?(t(m),A()):t()},e.range=function(m){return arguments.length?([s,n]=m,s=+s,n=+n,A()):[s,n]},e.rangeRound=function(m){return[s,n]=m,s=+s,n=+n,f=!0,A()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(m){return arguments.length?(f=!!m,A()):f},e.padding=function(m){return arguments.length?(d=Math.min(1,R=+m),A()):d},e.paddingInner=function(m){return arguments.length?(d=Math.min(1,m),A()):d},e.paddingOuter=function(m){return arguments.length?(R=+m,A()):R},e.align=function(m){return arguments.length?(k=Math.max(0,Math.min(1,m)),A()):k},e.copy=function(){return nt(t(),[s,n]).round(f).paddingInner(d).paddingOuter(R).align(k)},Ot.initRange.apply(A(),arguments)}var at=(function(){var e=function(B,r,l,u){for(l=l||{},u=B.length;u--;l[B[u]]=r);return l},t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],c=[1,7],f=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],R=[1,26],k=[1,28],A=[1,29],m=[1,30],D=[1,31],S=[1,32],L=[1,33],p=[1,34],_=[1,35],h=[1,36],v=[1,37],F=[1,43],lt=[1,42],ct=[1,47],U=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],K=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],ut=[1,64],Z={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:function(r,l,u,g,b,a,N){var x=a.length-1;switch(b){case 5:g.setOrientation(a[x]);break;case 9:g.setDiagramTitle(a[x].text.trim());break;case 12:g.setLineData({text:"",type:"text"},a[x]);break;case 13:g.setLineData(a[x-1],a[x]);break;case 14:g.setBarData({text:"",type:"text"},a[x]);break;case 15:g.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),g.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),g.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:g.setXAxisTitle(a[x]);break;case 23:g.setXAxisTitle(a[x-1]);break;case 24:g.setXAxisTitle({type:"text",text:""});break;case 25:g.setXAxisBand(a[x]);break;case 26:g.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:g.setYAxisTitle(a[x]);break;case 31:g.setYAxisTitle(a[x-1]);break;case 32:g.setYAxisTitle({type:"text",text:""});break;case 33:g.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(f,[2,34]),e(f,[2,35]),e(f,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:c}),{1:[2,3]},e(f,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:c}),{11:23,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},{11:39,13:38,24:F,27:lt,29:40,30:41,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},{11:45,15:44,27:ct,33:46,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},{11:49,17:48,24:U,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},{11:52,17:51,24:U,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(K,[2,37],{40:55,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v}),e(K,[2,38]),e(K,[2,39]),e(E,[2,40]),e(E,[2,42]),e(E,[2,43]),e(E,[2,44]),e(E,[2,45]),e(E,[2,46]),e(E,[2,47]),e(E,[2,48]),e(E,[2,49]),e(E,[2,50]),e(E,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:F,27:lt}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},e(w,[2,11]),e(w,[2,30],{33:60,27:ct}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:U},{25:63,27:ut},e(w,[2,14]),{17:65,24:U},e(w,[2,16]),e(w,[2,17]),e(E,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:d,39:R,40:27,41:k,42:A,43:m,44:D,45:S,46:L,47:p,48:_,49:h,50:v},e(w,[2,33]),e(w,[2,19]),{25:73,27:ut},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:function(r,l){if(l.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=l,u}},parse:function(r){var l=this,u=[0],g=[],b=[null],a=[],N=this.table,x="",q=0,gt=0,Et=2,xt=1,Mt=a.slice.call(arguments,1),T=Object.create(this.lexer),O={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(O.yy[tt]=this.yy[tt]);T.setInput(r,O.yy),O.yy.lexer=T,O.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var it=T.yylloc;a.push(it);var It=T.options&&T.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(){var V;return V=g.pop()||T.lex()||xt,typeof V!="number"&&(V instanceof Array&&(g=V,V=g.pop()),V=l.symbols_[V]||V),V}for(var P,W,M,et,z={},j,I,dt,G;;){if(W=u[u.length-1],this.defaultActions[W]?M=this.defaultActions[W]:((P===null||typeof P>"u")&&(P=Vt()),M=N[W]&&N[W][P]),typeof M>"u"||!M.length||!M[0]){var st="";G=[];for(j in N[W])this.terminals_[j]&&j>Et&&G.push("'"+this.terminals_[j]+"'");T.showPosition?st="Parse error on line "+(q+1)+`:
|
|
2
2
|
`+T.showPosition()+`
|
|
3
3
|
Expecting `+G.join(", ")+", got '"+(this.terminals_[P]||P)+"'":st="Parse error on line "+(q+1)+": Unexpected "+(P==xt?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(st,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:it,expected:G})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+P);switch(M[0]){case 1:u.push(P),b.push(T.yytext),a.push(T.yylloc),u.push(M[1]),P=null,gt=T.yyleng,x=T.yytext,q=T.yylineno,it=T.yylloc;break;case 2:if(I=this.productions_[M[1]][1],z.$=b[b.length-I],z._$={first_line:a[a.length-(I||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(I||1)].first_column,last_column:a[a.length-1].last_column},It&&(z._$.range=[a[a.length-(I||1)].range[0],a[a.length-1].range[1]]),et=this.performAction.apply(z,[x,gt,q,O.yy,M[1],b,a].concat(Mt)),typeof et<"u")return et;I&&(u=u.slice(0,-1*I*2),b=b.slice(0,-1*I),a=a.slice(0,-1*I)),u.push(this.productions_[M[1]][0]),b.push(z.$),a.push(z._$),dt=N[u[u.length-2]][u[u.length-1]],u.push(dt);break;case 3:return!0}}return!0}},vt=(function(){var B={EOF:1,parseError:function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},setInput:function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var l=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
5
|
`+l+"^"},test_match:function(r,l){var u,g,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),g=r[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],u=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var a in b)this[a]=b[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,u,g;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),a=0;a<b.length;a++)if(u=this._input.match(this.rules[b[a]]),u&&(!l||u[0].length>l[0].length)){if(l=u,g=a,this.options.backtrack_lexer){if(r=this.test_match(u,b[a]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,b[g]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return l||this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},pushState:function(l){this.begin(l)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(l,u,g,b){switch(g){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B})();Z.lexer=vt;function J(){this.yy={}}return J.prototype=Z,Z.Parser=J,new J})();at.parser=at;const Ft=at;function yt(e){return e.type==="bar"}function wt(e){return e.type==="band"}function X(e){return e.type==="linear"}class St{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,c)=>Math.max(c.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const c=Bt.computeDimensionOfText(n,1,o),f=c?c.width:o.length*i,d=c?c.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,d)}return n.remove(),s}}const mt=.7,bt=.2;class Ct{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){mt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(mt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=bt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=bt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}class Nt extends Ct{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=nt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=nt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),C.log$1.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)||this.getRange()[0]}}class Xt extends Ct{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=ft.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=ft.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}function At(e,t,i,s){const n=new St(s);return wt(e)?new Nt(t,i,e.categories,e.title,n):new Xt(t,i,[e.min,e.max],e.title,n)}class Yt{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}}function $t(e,t,i,s){const n=new St(s);return new Yt(n,e,t,i)}class Ht{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=pt.line().y(s=>s[0]).x(s=>s[1])(t):i=pt.line().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}class Ut{constructor(t,i,s,n,o,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=c}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}class qt{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Ht(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ut(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}}function jt(e,t,i){return new qt(e,t,i)}class Gt{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:jt(t,i,s),xAxis:At(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:At(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:c});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(c+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(d=>yt(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),d=this.componentStore.plot.calculateSpace({width:c,height:f});t-=d.width,i-=d.height,d=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=d.height,i-=d.height,this.componentStore.xAxis.setAxisPosition("left"),d=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=d.width,n=d.width,this.componentStore.yAxis.setAxisPosition("top"),d=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=d.height,o=s+d.height,t>0&&(c+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:c,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(R=>yt(R))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}}class Qt{static build(t,i,s,n){return new Gt(t,i,s,n).getDrawableElement()}}let Y=0,_t,$=Tt(),H=kt(),m=Rt(),ot=H.plotColorPalette.split(",").map(e=>e.trim()),Q=!1,rt=!1;function kt(){const e=C.getThemeVariables$2(),t=C.getConfig$1();return C.cleanAndMerge(e.xyChart,t.themeVariables.xyChart)}function Tt(){const e=C.getConfig$1();return C.cleanAndMerge(C.defaultConfig$2.xyChart,e.xyChart)}function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ht(e){const t=C.getConfig$1();return C.sanitizeText$2(e.trim(),t)}function Kt(e){_t=e}function Zt(e){e==="horizontal"?$.chartOrientation="horizontal":$.chartOrientation="vertical"}function Jt(e){m.xAxis.title=ht(e.text)}function Dt(e,t){m.xAxis={type:"linear",title:m.xAxis.title,min:e,max:t},Q=!0}function ti(e){m.xAxis={type:"band",title:m.xAxis.title,categories:e.map(t=>ht(t.text))},Q=!0}function ii(e){m.yAxis.title=ht(e.text)}function ei(e,t){m.yAxis={type:"linear",title:m.yAxis.title,min:e,max:t},rt=!0}function si(e){const t=Math.min(...e),i=Math.max(...e),s=X(m.yAxis)?m.yAxis.min:1/0,n=X(m.yAxis)?m.yAxis.max:-1/0;m.yAxis={type:"linear",title:m.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}function Pt(e){let t=[];if(e.length===0)return t;if(!Q){const i=X(m.xAxis)?m.xAxis.min:1/0,s=X(m.xAxis)?m.xAxis.max:-1/0;Dt(Math.min(i,1),Math.max(s,e.length))}if(rt||si(e),wt(m.xAxis)&&(t=m.xAxis.categories.map((i,s)=>[i,e[s]])),X(m.xAxis)){const i=m.xAxis.min,s=m.xAxis.max,n=(s-i+1)/e.length,o=[];for(let c=i;c<=s;c+=n)o.push(`${c}`);t=o.map((c,f)=>[c,e[f]])}return t}function Lt(e){return ot[e===0?0:e%ot.length]}function ni(e,t){const i=Pt(t);m.plots.push({type:"line",strokeFill:Lt(Y),strokeWidth:2,data:i}),Y++}function ai(e,t){const i=Pt(t);m.plots.push({type:"bar",fill:Lt(Y),data:i}),Y++}function oi(){if(m.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return m.title=C.getDiagramTitle(),Qt.build($,m,H,_t)}function ri(){return H}function hi(){return $}const li=function(){C.clear(),Y=0,$=Tt(),m=Rt(),H=kt(),ot=H.plotColorPalette.split(",").map(e=>e.trim()),Q=!1,rt=!1},ci={getDrawableElem:oi,clear:li,setAccTitle:C.setAccTitle,getAccTitle:C.getAccTitle,setDiagramTitle:C.setDiagramTitle,getDiagramTitle:C.getDiagramTitle,getAccDescription:C.getAccDescription,setAccDescription:C.setAccDescription,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Dt,setXAxisBand:ti,setYAxisTitle:ii,setYAxisRangeData:ei,setLineData:ni,setBarData:ai,setTmpSVGG:Kt,getChartThemeConfig:ri,getChartConfig:hi},ui=(e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),c=n.getChartConfig();function f(p){return p==="top"?"text-before-edge":"middle"}function d(p){return p==="left"?"start":p==="right"?"end":"middle"}function R(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}C.log$1.debug(`Rendering xychart chart
|
|
7
|
-
`+e);const k=C.selectSvgElement(t),A=k.append("g").attr("class","main"),
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return l||this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},pushState:function(l){this.begin(l)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(l,u,g,b){switch(g){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B})();Z.lexer=vt;function J(){this.yy={}}return J.prototype=Z,Z.Parser=J,new J})();at.parser=at;const Ft=at;function mt(e){return e.type==="bar"}function wt(e){return e.type==="band"}function X(e){return e.type==="linear"}class St{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,c)=>Math.max(c.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const c=Bt.computeDimensionOfText(n,1,o),f=c?c.width:o.length*i,d=c?c.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,d)}return n.remove(),s}}const yt=.7,bt=.2;class Ct{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){yt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(yt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=bt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=bt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}class Nt extends Ct{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=nt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=nt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),C.log$1.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)||this.getRange()[0]}}class Xt extends Ct{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=ft.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=ft.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}function At(e,t,i,s){const n=new St(s);return wt(e)?new Nt(t,i,e.categories,e.title,n):new Xt(t,i,[e.min,e.max],e.title,n)}class Yt{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}}function $t(e,t,i,s){const n=new St(s);return new Yt(n,e,t,i)}class Ht{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=pt.line().y(s=>s[0]).x(s=>s[1])(t):i=pt.line().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}class Ut{constructor(t,i,s,n,o,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=c}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}class qt{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Ht(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ut(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}}function jt(e,t,i){return new qt(e,t,i)}class Gt{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:jt(t,i,s),xAxis:At(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:At(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:c});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(c+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(d=>mt(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),d=this.componentStore.plot.calculateSpace({width:c,height:f});t-=d.width,i-=d.height,d=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=d.height,i-=d.height,this.componentStore.xAxis.setAxisPosition("left"),d=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=d.width,n=d.width,this.componentStore.yAxis.setAxisPosition("top"),d=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=d.height,o=s+d.height,t>0&&(c+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:c,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(R=>mt(R))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}}class Qt{static build(t,i,s,n){return new Gt(t,i,s,n).getDrawableElement()}}let Y=0,_t,$=Tt(),H=kt(),y=Rt(),ot=H.plotColorPalette.split(",").map(e=>e.trim()),Q=!1,rt=!1;function kt(){const e=C.getThemeVariables$2(),t=C.getConfig$1();return C.cleanAndMerge(e.xyChart,t.themeVariables.xyChart)}function Tt(){const e=C.getConfig$1();return C.cleanAndMerge(C.defaultConfig$2.xyChart,e.xyChart)}function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function ht(e){const t=C.getConfig$1();return C.sanitizeText$2(e.trim(),t)}function Kt(e){_t=e}function Zt(e){e==="horizontal"?$.chartOrientation="horizontal":$.chartOrientation="vertical"}function Jt(e){y.xAxis.title=ht(e.text)}function Dt(e,t){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:t},Q=!0}function ti(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map(t=>ht(t.text))},Q=!0}function ii(e){y.yAxis.title=ht(e.text)}function ei(e,t){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:t},rt=!0}function si(e){const t=Math.min(...e),i=Math.max(...e),s=X(y.yAxis)?y.yAxis.min:1/0,n=X(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}function Pt(e){let t=[];if(e.length===0)return t;if(!Q){const i=X(y.xAxis)?y.xAxis.min:1/0,s=X(y.xAxis)?y.xAxis.max:-1/0;Dt(Math.min(i,1),Math.max(s,e.length))}if(rt||si(e),wt(y.xAxis)&&(t=y.xAxis.categories.map((i,s)=>[i,e[s]])),X(y.xAxis)){const i=y.xAxis.min,s=y.xAxis.max,n=(s-i+1)/e.length,o=[];for(let c=i;c<=s;c+=n)o.push(`${c}`);t=o.map((c,f)=>[c,e[f]])}return t}function Lt(e){return ot[e===0?0:e%ot.length]}function ni(e,t){const i=Pt(t);y.plots.push({type:"line",strokeFill:Lt(Y),strokeWidth:2,data:i}),Y++}function ai(e,t){const i=Pt(t);y.plots.push({type:"bar",fill:Lt(Y),data:i}),Y++}function oi(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=C.getDiagramTitle(),Qt.build($,y,H,_t)}function ri(){return H}function hi(){return $}const li=function(){C.clear(),Y=0,$=Tt(),y=Rt(),H=kt(),ot=H.plotColorPalette.split(",").map(e=>e.trim()),Q=!1,rt=!1},ci={getDrawableElem:oi,clear:li,setAccTitle:C.setAccTitle,getAccTitle:C.getAccTitle,setDiagramTitle:C.setDiagramTitle,getDiagramTitle:C.getDiagramTitle,getAccDescription:C.getAccDescription,setAccDescription:C.setAccDescription,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Dt,setXAxisBand:ti,setYAxisTitle:ii,setYAxisRangeData:ei,setLineData:ni,setBarData:ai,setTmpSVGG:Kt,getChartThemeConfig:ri,getChartConfig:hi},ui=(e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),c=n.getChartConfig();function f(p){return p==="top"?"text-before-edge":"middle"}function d(p){return p==="left"?"start":p==="right"?"end":"middle"}function R(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}C.log$1.debug(`Rendering xychart chart
|
|
7
|
+
`+e);const k=C.selectSvgElement(t),A=k.append("g").attr("class","main"),m=A.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");C.configureSvgSize(k,c.height,c.width,!0),k.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",o.backgroundColor),n.setTmpSVGG(k.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),S={};function L(p){let _=A,h="";for(const[v]of p.entries()){let F=A;v>0&&S[h]&&(F=S[h]),h+=p[v],_=S[h],_||(_=S[h]=F.append("g").attr("class",p[v]))}return _}for(const p of D){if(p.data.length===0)continue;const _=L(p.groupTexts);switch(p.type){case"rect":_.selectAll("rect").data(p.data).enter().append("rect").attr("x",h=>h.x).attr("y",h=>h.y).attr("width",h=>h.width).attr("height",h=>h.height).attr("fill",h=>h.fill).attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth);break;case"text":_.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",h=>h.fill).attr("font-size",h=>h.fontSize).attr("dominant-baseline",h=>f(h.verticalPos)).attr("text-anchor",h=>d(h.horizontalPos)).attr("transform",h=>R(h)).text(h=>h.text);break;case"path":_.selectAll("path").data(p.data).enter().append("path").attr("d",h=>h.path).attr("fill",h=>h.fill?h.fill:"none").attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth);break}}},gi={draw:ui},xi={parser:Ft,db:ci,renderer:gi};exports.diagram=xi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),J=require("@lexical/react/LexicalComposerContext"),K=require("@lexical/react/useLexicalEditable"),P=require("@lexical/react/useLexicalNodeSelection"),Q=require("@lexical/utils"),y=require("lexical"),o=require("./layers.CjUQRZCf.js"),G=require("react-i18next"),g=require("@mantine/core"),Z=require("@mantine/hooks");require("@lexical/mark");require("@lexical/code");const ee=require("@layers-app/shared"),te=({isCloseModal:l,setCloseModalOpen:a,confirmClose:v})=>{const{t:E}=G.useTranslation();return t.jsx(g.Modal,{opened:l,onClose:()=>{a(!1)},centered:!0,withCloseButton:!1,closeOnClickOutside:!0,closeOnEscape:!0,size:440,radius:"lg",zIndex:999,children:t.jsxs(g.Stack,{gap:24,pt:"md",children:[t.jsxs(g.Stack,{gap:"xs",align:"center",children:[t.jsx(o.HugeiconsIcon,{icon:o.$o,size:20,color:"var(--mantine-color-dimmed)"}),t.jsxs(g.Stack,{gap:6,align:"center",children:[t.jsx(g.Text,{fw:700,size:"md",ta:"center",children:E("editor.unsavedChanges.title")}),t.jsx(g.Text,{c:"dimmed",size:"sm",ta:"center",children:E("editor.unsavedChanges.message")})]})]}),t.jsxs(g.Group,{gap:"xs",grow:!0,wrap:"nowrap",children:[t.jsx(g.Button,{variant:"default",radius:"md",onClick:()=>{a(!1)},children:E("editor.unsavedChanges.cancel")}),t.jsx(g.Button,{color:"indigo.8",radius:"md",onClick:v,children:E("editor.unsavedChanges.closeWithoutSaving")})]})]})})};function oe({imageContainerRef:l,editor:a,rootClassName:v=null,width:E="inherit",height:m="inherit",nodeKey:u,alignment:z,setModalOpen:R,previewSVG:i,isModalOpen:h}){const{disable:C,imperativeHandleRef:j}=r.useContext(o.Context),F=r.useMemo(()=>i??"",[i]),[D,b]=r.useState(!1),[W,{open:k,close:O}]=Z.useDisclosure(!1),{t:w}=G.useTranslation();r.useEffect(()=>{h&&b(!1)},[h]);const N=(e,p)=>{a.update(()=>{y.$setSelection(null);const c=y.$getNodeByKey(u);return o.$isExcalidrawNode(c)&&c.setWidthAndHeight(e,p),!0})},T=()=>{o.deleteNode(a,u)},I=()=>{O(),R(!0)},_=()=>{O(),o.deleteNode(a,u)};return t.jsxs(o.ResizableContainer,{editor:a,isIcon:!1,isEmbed:!0,width:o.parseContainerSize(E),height:o.parseContainerSize(m),onResizeEnd:N,alignment:z,disable:C,onRegisterDecoratorEnter:e=>{j!=null&&j.current&&(j.current.decoratorEnterAction=e)},onActivate:()=>a.dispatchCommand(o.ON_CHANGE_COMMAND,"show_menu"),children:[t.jsxs(g.Box,{className:"media-wrapper excaildraw",children:[t.jsx("div",{className:`media-actions${o.IS_TOUCH_DEVICE||!o.IS_HOVER_CAPABLE?" visible":""}`,children:o.IS_TOUCH_DEVICE?t.jsx(o.ActionIcon,{"aria-label":w("editor.toolbar.more"),label:w("editor.toolbar.more"),flexBorder:!0,onClick:k,icon:o.K1,iconColor:"var(--mantine-color-gray-text)"}):t.jsxs(t.Fragment,{children:[t.jsx(o.ActionIcon,{"aria-label":"Settings",label:w("editor.link.edit"),flexBorder:!0,onClick:()=>{R(!0)},icon:o.tf,iconColor:"var(--mantine-color-gray-text)"}),t.jsx(o.NodeAlignmentMenu,{opened:D,setOpened:b,t:w,editor:a,nodeKey:u,flexBorder:!0}),t.jsx(o.ActionIcon,{"aria-label":"Delete",label:w("editor.actions.delete"),flexBorder:!0,onClick:T,icon:o.lg,iconColor:"var(--mantine-color-red-outline)"})]})}),t.jsx(g.Box,{w:"100%",ref:e=>{e&&l&&(l.current=e)},className:v??"",dangerouslySetInnerHTML:{__html:F}})]}),o.IS_TOUCH_DEVICE&&t.jsx(o.MobileDrawer,{opened:W,onClose:O,title:w("editor.image.mobileActions"),children:t.jsxs(g.Stack,{gap:4,p:0,children:[t.jsx(g.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:I,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.tf,size:16,color:"var(--mantine-color-dimmed)"}),children:w("editor.link.edit")}),t.jsx(g.Button,{type:"button",variant:"subtle",color:"red",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:_,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.lg,size:16,color:"var(--mantine-color-red-6)"}),children:w("editor.actions.delete")})]})})]})}let $=null;const ne=r.lazy(async()=>{var a;const l=await Promise.resolve().then(()=>require("./layers.C9bqqwGA.js")).then(v=>v.index);return!$&&l&&($=l.exportToSvg||((a=l.default)==null?void 0:a.exportToSvg)||l.default),{default:l.Excalidraw}}),re=()=>{const[l,a]=r.useState(null),v=r.useCallback(E=>a(E),[]);return[l,v]};function se({onSave:l,initialElements:a,initialAppState:v,initialFiles:E,isShown:m=!1,onDelete:u,onClose:z,isEdited:R}){const[i,h]=re(),{i18n:C,t:j}=G.useTranslation(),{colorScheme:F}=g.useMantineColorScheme(),D=r.useRef(!1),[b,W]=r.useState(a),[k,O]=r.useState(E),[w,N]=r.useState(m);r.useEffect(()=>{m&&N(!0)},[m]),r.useEffect(()=>{!m||D.current||(D.current=!0,Promise.resolve().then(()=>require("./layers.Dyvby5gX.js")))},[m]),r.useEffect(()=>{m&&setTimeout(()=>{var e,p;(e=i==null?void 0:i.refresh)==null||e.call(i),(p=i==null?void 0:i.scrollToContent)==null||p.call(i)},500)},[m,i]),r.useEffect(()=>{if(!m)return;const e=(s,d)=>{const n=j(s);return n.startsWith("editor.menu")?d:n},p=e("editor.menu.excalidraw.tools.frameTool",C.language==="ru"?"Инструмент рамки":C.language==="es"?"Herramienta de marco":"Frame tool"),c=e("editor.menu.excalidraw.tools.webEmbed",C.language==="ru"?"Веб-встраивание":C.language==="es"?"Incrustación web":"Web Embed"),f=e("editor.menu.excalidraw.tools.generate",C.language==="ru"?"Генерировать":C.language==="es"?"Generar":"Generate"),L={"Frame tool":p,"Web Embed":c,"Web embeded":c,Generate:f},q=()=>{const s=document.querySelector(".App-toolbar__extra-tools-dropdown");if(!s)return;const d=document.createTreeWalker(s,NodeFilter.SHOW_TEXT,null);let n;for(;n=d.nextNode();)if(n.nodeType===Node.TEXT_NODE&&n.textContent){const x=n.textContent.trim();for(const[S,A]of Object.entries(L))if(x===S&&A&&!x.includes(A)){n.textContent=n.textContent.replace(S,A);break}}},B=()=>{setTimeout(()=>{q()},0)},M=setTimeout(()=>{const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.addEventListener("click",B)}},300);return()=>{clearTimeout(M);const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.removeEventListener("click",B)}}},[m,C.language,j]);const T=r.useCallback(async()=>{var q,B,M;let e=$;if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.C9bqqwGA.js")).then(d=>d.index);e=s.exportToSvg||((q=s.default)==null?void 0:q.exportToSvg)||s.default,e&&typeof e=="function"&&($=e)}if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.C9bqqwGA.js")).then(n=>n.index),d=s?Object.keys(s):[];throw console.error("Excalidraw module structure:",{keys:d,hasExportToSvg:s&&"exportToSvg"in s,hasDefault:s&&"default"in s,moduleType:typeof s,module:s}),new Error(`exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${d.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`)}const p=((B=i==null?void 0:i.getAppState)==null?void 0:B.call(i))??v,c=await e({appState:p,elements:b,files:k}),f=(M=c==null?void 0:c.firstElementChild)==null?void 0:M.firstElementChild,L=c.getAttribute("viewBox");if(L!=null){const s=L.split(" ");c.setAttribute("width",s[2]),c.setAttribute("height",s[3])}return f&&f.tagName==="style"&&f.remove(),c.setAttribute("width","100%"),c.setAttribute("height","100%"),c.setAttribute("display","block"),c.classList.add("excalidraw-svg"),c.outerHTML},[b,k,i,v]),I=()=>{if(b&&b.filter(e=>!e.isDeleted).length>0){const e=i==null?void 0:i.getAppState(),p={exportBackground:e==null?void 0:e.exportBackground,exportScale:e==null?void 0:e.exportScale,exportWithDarkMode:(e==null?void 0:e.theme)==="dark",isBindingEnabled:e==null?void 0:e.isBindingEnabled,isLoading:e==null?void 0:e.isLoading,name:e==null?void 0:e.name,theme:e==null?void 0:e.theme,viewBackgroundColor:e==null?void 0:e.viewBackgroundColor,viewModeEnabled:e==null?void 0:e.viewModeEnabled,zenModeEnabled:e==null?void 0:e.zenModeEnabled,zoom:e==null?void 0:e.zoom};(async()=>{const c=await T();l(b,p,k,c)})()}else u()},_=(e,p,c)=>{(e==null?void 0:e.length)!==(a==null?void 0:a.length)&&(R.current=!0),W(e),O(c)};return t.jsx(ee.BottomDrawerWithoutHeader,{opened:m,onClose:z,onSave:I,className:"excaildraw-modal",closeOnEscape:!1,children:w&&t.jsx(r.Suspense,{fallback:t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:"400px"},children:t.jsx(g.Loader,{size:"sm"})}),children:t.jsx(ne,{langCode:o.languageToLocaleMap[C.language],theme:F,onChange:_,excalidrawAPI:h,initialData:{appState:{...v||{isLoading:!1}},elements:a,files:E,scrollToContent:!0}})})})}function ie({nodeKey:l,data:a,width:v,height:E,alignment:m}){var d;const[u]=J.useLexicalComposerContext(),{fetchUploadMedia:z,fetchDeleteMedia:R}=r.useContext(o.Context),i=K.useLexicalEditable(),h=r.useMemo(()=>o.parseExcalidrawData(a),[a]),C=r.useRef(o.extractAttachmentIdsFromFiles(h.files??{})),j=r.useRef(Object.keys(h.files??{}));r.useEffect(()=>{const n=o.extractAttachmentIdsFromFiles(h.files??{});for(const x of Object.keys(n))C.current[x]=n[x]},[h.files]);const F=((d=h==null?void 0:h.elements)==null?void 0:d.length)===0&&!h.previewSVG,[D,b]=r.useState(F&&u.isEditable()),[W,k]=r.useState(!1),O=r.useRef(null),w=r.useRef(null),N=r.useRef(null),[T,I,_]=P.useLexicalNodeSelection(l),e=r.useCallback(n=>(T&&(n.preventDefault(),u.update(()=>{const x=y.$getNodeByKey(l);x&&x.remove()})),!1),[u,T,l]);r.useEffect(()=>{if(!i){T&&_();return}return Q.mergeRegister(u.registerCommand(y.CLICK_COMMAND,n=>{const x=w.current,S=n.target;return x!==null&&x.contains(S)?(n.shiftKey||_(),I(!T),n.detail>1&&b(!0),!0):!1},y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_DELETE_COMMAND,e,y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_BACKSPACE_COMMAND,e,y.COMMAND_PRIORITY_LOW))},[_,u,T,e,I,i]);const p=r.useCallback(()=>(b(!1),u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})),[u,l]),c=async(n,x,S,A)=>{const{files:H,urlByDataUrl:U,attachmentIdByFileId:Y}=await o.uploadInlineFiles(S,z,C.current);C.current=o.deleteRemovedAttachments(j.current,H,Y,R),j.current=Object.keys(H);const X=o.rewriteSvgDataUrls(A,U);u.update(()=>{const V=y.$getNodeByKey(l);o.$isExcalidrawNode(V)&&(n&&n.length>0||Object.keys(H).length>0?V.setData(JSON.stringify({appState:x,elements:n,files:H,previewSVG:X})):V.remove())})},{elements:f=[],files:L={},appState:q={},previewSVG:B}=h,M=r.useCallback(()=>{b(!1),k(!1),N.current=!1,(f==null?void 0:f.length)===0&&u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})},[u,l,f==null?void 0:f.length]),s=r.useCallback(()=>{N.current?k(!0):M()},[M]);return t.jsxs(t.Fragment,{children:[t.jsx(te,{isCloseModal:W,confirmClose:M,setCloseModalOpen:k}),t.jsx(se,{initialElements:f,isEdited:N,initialFiles:L,initialAppState:q,isShown:D,onDelete:p,onClose:s,onSave:async(n,x,S,A)=>{await c(n,x,S,A),b(!1)},closeOnClickOutside:!1}),(f==null?void 0:f.length)&&t.jsx("div",{style:{display:"flex",justifyContent:m},children:t.jsx(oe,{imageContainerRef:O,className:"image",width:v,height:E,editor:u,nodeKey:l,alignment:m,setModalOpen:b,previewSVG:B,isModalOpen:D})})]})}exports.default=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),J=require("@lexical/react/LexicalComposerContext"),K=require("@lexical/react/useLexicalEditable"),P=require("@lexical/react/useLexicalNodeSelection"),Q=require("@lexical/utils"),y=require("lexical"),o=require("./layers.3t60RULo.js"),G=require("react-i18next"),g=require("@mantine/core"),Z=require("@mantine/hooks");require("@lexical/mark");require("@lexical/code");const ee=require("@layers-app/shared"),te=({isCloseModal:l,setCloseModalOpen:a,confirmClose:v})=>{const{t:E}=G.useTranslation();return t.jsx(g.Modal,{opened:l,onClose:()=>{a(!1)},centered:!0,withCloseButton:!1,closeOnClickOutside:!0,closeOnEscape:!0,size:440,radius:"lg",zIndex:999,children:t.jsxs(g.Stack,{gap:24,pt:"md",children:[t.jsxs(g.Stack,{gap:"xs",align:"center",children:[t.jsx(o.HugeiconsIcon,{icon:o.$o,size:20,color:"var(--mantine-color-dimmed)"}),t.jsxs(g.Stack,{gap:6,align:"center",children:[t.jsx(g.Text,{fw:700,size:"md",ta:"center",children:E("editor.unsavedChanges.title")}),t.jsx(g.Text,{c:"dimmed",size:"sm",ta:"center",children:E("editor.unsavedChanges.message")})]})]}),t.jsxs(g.Group,{gap:"xs",grow:!0,wrap:"nowrap",children:[t.jsx(g.Button,{variant:"default",radius:"md",onClick:()=>{a(!1)},children:E("editor.unsavedChanges.cancel")}),t.jsx(g.Button,{color:"indigo.8",radius:"md",onClick:v,children:E("editor.unsavedChanges.closeWithoutSaving")})]})]})})};function oe({imageContainerRef:l,editor:a,rootClassName:v=null,width:E="inherit",height:m="inherit",nodeKey:u,alignment:z,setModalOpen:R,previewSVG:i,isModalOpen:h}){const{disable:C,imperativeHandleRef:j}=r.useContext(o.Context),F=r.useMemo(()=>i??"",[i]),[D,b]=r.useState(!1),[W,{open:k,close:O}]=Z.useDisclosure(!1),{t:w}=G.useTranslation();r.useEffect(()=>{h&&b(!1)},[h]);const N=(e,p)=>{a.update(()=>{y.$setSelection(null);const c=y.$getNodeByKey(u);return o.$isExcalidrawNode(c)&&c.setWidthAndHeight(e,p),!0})},T=()=>{o.deleteNode(a,u)},I=()=>{O(),R(!0)},_=()=>{O(),o.deleteNode(a,u)};return t.jsxs(o.ResizableContainer,{editor:a,isIcon:!1,isEmbed:!0,width:o.parseContainerSize(E),height:o.parseContainerSize(m),onResizeEnd:N,alignment:z,disable:C,onRegisterDecoratorEnter:e=>{j!=null&&j.current&&(j.current.decoratorEnterAction=e)},onActivate:()=>a.dispatchCommand(o.ON_CHANGE_COMMAND,"show_menu"),children:[t.jsxs(g.Box,{className:"media-wrapper excaildraw",children:[t.jsx("div",{className:`media-actions${o.IS_TOUCH_DEVICE||!o.IS_HOVER_CAPABLE?" visible":""}`,children:o.IS_TOUCH_DEVICE?t.jsx(o.ActionIcon,{"aria-label":w("editor.toolbar.more"),label:w("editor.toolbar.more"),flexBorder:!0,onClick:k,icon:o.K1,iconColor:"var(--mantine-color-gray-text)"}):t.jsxs(t.Fragment,{children:[t.jsx(o.ActionIcon,{"aria-label":"Settings",label:w("editor.link.edit"),flexBorder:!0,onClick:()=>{R(!0)},icon:o.tf,iconColor:"var(--mantine-color-gray-text)"}),t.jsx(o.NodeAlignmentMenu,{opened:D,setOpened:b,t:w,editor:a,nodeKey:u,flexBorder:!0}),t.jsx(o.ActionIcon,{"aria-label":"Delete",label:w("editor.actions.delete"),flexBorder:!0,onClick:T,icon:o.lg,iconColor:"var(--mantine-color-red-outline)"})]})}),t.jsx(g.Box,{w:"100%",ref:e=>{e&&l&&(l.current=e)},className:v??"",dangerouslySetInnerHTML:{__html:F}})]}),o.IS_TOUCH_DEVICE&&t.jsx(o.MobileDrawer,{opened:W,onClose:O,title:w("editor.image.mobileActions"),children:t.jsxs(g.Stack,{gap:4,p:0,children:[t.jsx(g.Button,{type:"button",variant:"subtle",color:"gray",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:I,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.tf,size:16,color:"var(--mantine-color-dimmed)"}),children:w("editor.link.edit")}),t.jsx(g.Button,{type:"button",variant:"subtle",color:"red",fullWidth:!0,justify:"flex-start",bg:"var(--editor-action-bg)",onClick:_,leftSection:t.jsx(o.HugeiconsIcon,{icon:o.lg,size:16,color:"var(--mantine-color-red-6)"}),children:w("editor.actions.delete")})]})})]})}let $=null;const ne=r.lazy(async()=>{var a;const l=await Promise.resolve().then(()=>require("./layers.DZqU-iL6.js")).then(v=>v.index);return!$&&l&&($=l.exportToSvg||((a=l.default)==null?void 0:a.exportToSvg)||l.default),{default:l.Excalidraw}}),re=()=>{const[l,a]=r.useState(null),v=r.useCallback(E=>a(E),[]);return[l,v]};function se({onSave:l,initialElements:a,initialAppState:v,initialFiles:E,isShown:m=!1,onDelete:u,onClose:z,isEdited:R}){const[i,h]=re(),{i18n:C,t:j}=G.useTranslation(),{colorScheme:F}=g.useMantineColorScheme(),D=r.useRef(!1),[b,W]=r.useState(a),[k,O]=r.useState(E),[w,N]=r.useState(m);r.useEffect(()=>{m&&N(!0)},[m]),r.useEffect(()=>{!m||D.current||(D.current=!0,Promise.resolve().then(()=>require("./layers.Dyvby5gX.js")))},[m]),r.useEffect(()=>{m&&setTimeout(()=>{var e,p;(e=i==null?void 0:i.refresh)==null||e.call(i),(p=i==null?void 0:i.scrollToContent)==null||p.call(i)},500)},[m,i]),r.useEffect(()=>{if(!m)return;const e=(s,d)=>{const n=j(s);return n.startsWith("editor.menu")?d:n},p=e("editor.menu.excalidraw.tools.frameTool",C.language==="ru"?"Инструмент рамки":C.language==="es"?"Herramienta de marco":"Frame tool"),c=e("editor.menu.excalidraw.tools.webEmbed",C.language==="ru"?"Веб-встраивание":C.language==="es"?"Incrustación web":"Web Embed"),f=e("editor.menu.excalidraw.tools.generate",C.language==="ru"?"Генерировать":C.language==="es"?"Generar":"Generate"),L={"Frame tool":p,"Web Embed":c,"Web embeded":c,Generate:f},q=()=>{const s=document.querySelector(".App-toolbar__extra-tools-dropdown");if(!s)return;const d=document.createTreeWalker(s,NodeFilter.SHOW_TEXT,null);let n;for(;n=d.nextNode();)if(n.nodeType===Node.TEXT_NODE&&n.textContent){const x=n.textContent.trim();for(const[S,A]of Object.entries(L))if(x===S&&A&&!x.includes(A)){n.textContent=n.textContent.replace(S,A);break}}},B=()=>{setTimeout(()=>{q()},0)},M=setTimeout(()=>{const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.addEventListener("click",B)}},300);return()=>{clearTimeout(M);const s=document.querySelector(".excalidraw-container");if(s){const d=s.querySelector(".App-toolbar__extra-tools-trigger");d&&d.removeEventListener("click",B)}}},[m,C.language,j]);const T=r.useCallback(async()=>{var q,B,M;let e=$;if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.DZqU-iL6.js")).then(d=>d.index);e=s.exportToSvg||((q=s.default)==null?void 0:q.exportToSvg)||s.default,e&&typeof e=="function"&&($=e)}if(!e||typeof e!="function"){const s=await Promise.resolve().then(()=>require("./layers.DZqU-iL6.js")).then(n=>n.index),d=s?Object.keys(s):[];throw console.error("Excalidraw module structure:",{keys:d,hasExportToSvg:s&&"exportToSvg"in s,hasDefault:s&&"default"in s,moduleType:typeof s,module:s}),new Error(`exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${d.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`)}const p=((B=i==null?void 0:i.getAppState)==null?void 0:B.call(i))??v,c=await e({appState:p,elements:b,files:k}),f=(M=c==null?void 0:c.firstElementChild)==null?void 0:M.firstElementChild,L=c.getAttribute("viewBox");if(L!=null){const s=L.split(" ");c.setAttribute("width",s[2]),c.setAttribute("height",s[3])}return f&&f.tagName==="style"&&f.remove(),c.setAttribute("width","100%"),c.setAttribute("height","100%"),c.setAttribute("display","block"),c.classList.add("excalidraw-svg"),c.outerHTML},[b,k,i,v]),I=()=>{if(b&&b.filter(e=>!e.isDeleted).length>0){const e=i==null?void 0:i.getAppState(),p={exportBackground:e==null?void 0:e.exportBackground,exportScale:e==null?void 0:e.exportScale,exportWithDarkMode:(e==null?void 0:e.theme)==="dark",isBindingEnabled:e==null?void 0:e.isBindingEnabled,isLoading:e==null?void 0:e.isLoading,name:e==null?void 0:e.name,theme:e==null?void 0:e.theme,viewBackgroundColor:e==null?void 0:e.viewBackgroundColor,viewModeEnabled:e==null?void 0:e.viewModeEnabled,zenModeEnabled:e==null?void 0:e.zenModeEnabled,zoom:e==null?void 0:e.zoom};(async()=>{const c=await T();l(b,p,k,c)})()}else u()},_=(e,p,c)=>{(e==null?void 0:e.length)!==(a==null?void 0:a.length)&&(R.current=!0),W(e),O(c)};return t.jsx(ee.BottomDrawerWithoutHeader,{opened:m,onClose:z,onSave:I,className:"excaildraw-modal",closeOnEscape:!1,children:w&&t.jsx(r.Suspense,{fallback:t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:"400px"},children:t.jsx(g.Loader,{size:"sm"})}),children:t.jsx(ne,{langCode:o.languageToLocaleMap[C.language],theme:F,onChange:_,excalidrawAPI:h,initialData:{appState:{...v||{isLoading:!1}},elements:a,files:E,scrollToContent:!0}})})})}function ie({nodeKey:l,data:a,width:v,height:E,alignment:m}){var d;const[u]=J.useLexicalComposerContext(),{fetchUploadMedia:z,fetchDeleteMedia:R}=r.useContext(o.Context),i=K.useLexicalEditable(),h=r.useMemo(()=>o.parseExcalidrawData(a),[a]),C=r.useRef(o.extractAttachmentIdsFromFiles(h.files??{})),j=r.useRef(Object.keys(h.files??{}));r.useEffect(()=>{const n=o.extractAttachmentIdsFromFiles(h.files??{});for(const x of Object.keys(n))C.current[x]=n[x]},[h.files]);const F=((d=h==null?void 0:h.elements)==null?void 0:d.length)===0&&!h.previewSVG,[D,b]=r.useState(F&&u.isEditable()),[W,k]=r.useState(!1),O=r.useRef(null),w=r.useRef(null),N=r.useRef(null),[T,I,_]=P.useLexicalNodeSelection(l),e=r.useCallback(n=>(T&&(n.preventDefault(),u.update(()=>{const x=y.$getNodeByKey(l);x&&x.remove()})),!1),[u,T,l]);r.useEffect(()=>{if(!i){T&&_();return}return Q.mergeRegister(u.registerCommand(y.CLICK_COMMAND,n=>{const x=w.current,S=n.target;return x!==null&&x.contains(S)?(n.shiftKey||_(),I(!T),n.detail>1&&b(!0),!0):!1},y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_DELETE_COMMAND,e,y.COMMAND_PRIORITY_LOW),u.registerCommand(y.KEY_BACKSPACE_COMMAND,e,y.COMMAND_PRIORITY_LOW))},[_,u,T,e,I,i]);const p=r.useCallback(()=>(b(!1),u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})),[u,l]),c=async(n,x,S,A)=>{const{files:H,urlByDataUrl:U,attachmentIdByFileId:Y}=await o.uploadInlineFiles(S,z,C.current);C.current=o.deleteRemovedAttachments(j.current,H,Y,R),j.current=Object.keys(H);const X=o.rewriteSvgDataUrls(A,U);u.update(()=>{const V=y.$getNodeByKey(l);o.$isExcalidrawNode(V)&&(n&&n.length>0||Object.keys(H).length>0?V.setData(JSON.stringify({appState:x,elements:n,files:H,previewSVG:X})):V.remove())})},{elements:f=[],files:L={},appState:q={},previewSVG:B}=h,M=r.useCallback(()=>{b(!1),k(!1),N.current=!1,(f==null?void 0:f.length)===0&&u.update(()=>{const n=y.$getNodeByKey(l);n&&n.remove()})},[u,l,f==null?void 0:f.length]),s=r.useCallback(()=>{N.current?k(!0):M()},[M]);return t.jsxs(t.Fragment,{children:[t.jsx(te,{isCloseModal:W,confirmClose:M,setCloseModalOpen:k}),t.jsx(se,{initialElements:f,isEdited:N,initialFiles:L,initialAppState:q,isShown:D,onDelete:p,onClose:s,onSave:async(n,x,S,A)=>{await c(n,x,S,A),b(!1)},closeOnClickOutside:!1}),(f==null?void 0:f.length)&&t.jsx("div",{style:{display:"flex",justifyContent:m},children:t.jsx(oe,{imageContainerRef:O,className:"image",width:v,height:E,editor:u,nodeKey:l,alignment:m,setModalOpen:b,previewSVG:B,isModalOpen:D})})]})}exports.default=ie;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./layers.
|
|
1
|
+
import { p as mt, o as kt, s as _t, a as xt, c as vt, b as bt, g as rt, M as wt, d as G, G as St, r as Lt, j as Et } from "./layers.visFusIB.js";
|
|
2
|
+
import "./layers.Bg7BQcmt.js";
|
|
3
3
|
import "lodash-es/memoize.js";
|
|
4
4
|
import "lodash-es/merge.js";
|
|
5
5
|
import "lodash-es/isEmpty.js";
|
|
@@ -56,18 +56,18 @@ function dt(t, n) {
|
|
|
56
56
|
function Ct(t) {
|
|
57
57
|
return t.targetLinks.length ? t.depth : t.sourceLinks.length ? yt(t.sourceLinks, Mt) - 1 : 0;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Y(t) {
|
|
60
60
|
return function() {
|
|
61
61
|
return t;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
function lt(t, n) {
|
|
65
|
-
return
|
|
65
|
+
return H(t.source, n.source) || t.index - n.index;
|
|
66
66
|
}
|
|
67
67
|
function at(t, n) {
|
|
68
|
-
return
|
|
68
|
+
return H(t.target, n.target) || t.index - n.index;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function H(t, n) {
|
|
71
71
|
return t.y0 - n.y0;
|
|
72
72
|
}
|
|
73
73
|
function J(t) {
|
|
@@ -105,9 +105,9 @@ function jt() {
|
|
|
105
105
|
x.update = function(e) {
|
|
106
106
|
return ut(e), e;
|
|
107
107
|
}, x.nodeId = function(e) {
|
|
108
|
-
return arguments.length ? (p = typeof e == "function" ? e :
|
|
108
|
+
return arguments.length ? (p = typeof e == "function" ? e : Y(e), x) : p;
|
|
109
109
|
}, x.nodeAlign = function(e) {
|
|
110
|
-
return arguments.length ? (i = typeof e == "function" ? e :
|
|
110
|
+
return arguments.length ? (i = typeof e == "function" ? e : Y(e), x) : i;
|
|
111
111
|
}, x.nodeSort = function(e) {
|
|
112
112
|
return arguments.length ? (o = e, x) : o;
|
|
113
113
|
}, x.nodeWidth = function(e) {
|
|
@@ -115,9 +115,9 @@ function jt() {
|
|
|
115
115
|
}, x.nodePadding = function(e) {
|
|
116
116
|
return arguments.length ? (_ = g = +e, x) : _;
|
|
117
117
|
}, x.nodes = function(e) {
|
|
118
|
-
return arguments.length ? (m = typeof e == "function" ? e :
|
|
118
|
+
return arguments.length ? (m = typeof e == "function" ? e : Y(e), x) : m;
|
|
119
119
|
}, x.links = function(e) {
|
|
120
|
-
return arguments.length ? (b = typeof e == "function" ? e :
|
|
120
|
+
return arguments.length ? (b = typeof e == "function" ? e : Y(e), x) : b;
|
|
121
121
|
}, x.linkSort = function(e) {
|
|
122
122
|
return arguments.length ? (c = e, x) : c;
|
|
123
123
|
}, x.size = function(e) {
|
|
@@ -218,7 +218,7 @@ function jt() {
|
|
|
218
218
|
let U = (R / z - v.y0) * f;
|
|
219
219
|
v.y0 += U, v.y1 += U, w(v);
|
|
220
220
|
}
|
|
221
|
-
o === void 0 && k.sort(
|
|
221
|
+
o === void 0 && k.sort(H), P(k, l);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
function O(e, f, l) {
|
|
@@ -234,7 +234,7 @@ function jt() {
|
|
|
234
234
|
let U = (R / z - v.y0) * f;
|
|
235
235
|
v.y0 += U, v.y1 += U, w(v);
|
|
236
236
|
}
|
|
237
|
-
o === void 0 && k.sort(
|
|
237
|
+
o === void 0 && k.sort(H), P(k, l);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function P(e, f) {
|
|
@@ -382,17 +382,17 @@ function Wt(t) {
|
|
|
382
382
|
function Ft(t, n, s, a, u) {
|
|
383
383
|
t.moveTo(n, s), t.bezierCurveTo(n = (n + a) / 2, s, n, u, a, u);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Gt() {
|
|
386
386
|
return Wt(Ft);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Yt(t) {
|
|
389
389
|
return [t.source.x1, t.y0];
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ht(t) {
|
|
392
392
|
return [t.target.x0, t.y1];
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function Xt() {
|
|
395
|
+
return Gt().source(Yt).target(Ht);
|
|
396
396
|
}
|
|
397
397
|
var it = (function() {
|
|
398
398
|
var t = function(p, i, o, c) {
|
|
@@ -697,10 +697,10 @@ Expecting ` + r.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : k = "
|
|
|
697
697
|
return g.prototype = u, u.Parser = g, new g();
|
|
698
698
|
})();
|
|
699
699
|
it.parser = it;
|
|
700
|
-
const
|
|
701
|
-
let
|
|
702
|
-
const
|
|
703
|
-
|
|
700
|
+
const X = it;
|
|
701
|
+
let q = [], Q = [], B = {};
|
|
702
|
+
const qt = () => {
|
|
703
|
+
q = [], Q = [], B = {}, Lt();
|
|
704
704
|
};
|
|
705
705
|
class Qt {
|
|
706
706
|
constructor(n, s, a = 0) {
|
|
@@ -708,16 +708,16 @@ class Qt {
|
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
const Kt = (t, n, s) => {
|
|
711
|
-
|
|
711
|
+
q.push(new Qt(t, n, s));
|
|
712
712
|
};
|
|
713
713
|
class Zt {
|
|
714
714
|
constructor(n) {
|
|
715
715
|
this.ID = n;
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
const Jt = (t) => (t = Et.sanitizeText(t, rt()), B[t] || (B[t] = new Zt(t), Q.push(B[t])), B[t]), te = () => Q, ee = () =>
|
|
718
|
+
const Jt = (t) => (t = Et.sanitizeText(t, rt()), B[t] || (B[t] = new Zt(t), Q.push(B[t])), B[t]), te = () => Q, ee = () => q, ne = () => ({
|
|
719
719
|
nodes: Q.map((t) => ({ id: t.ID })),
|
|
720
|
-
links:
|
|
720
|
+
links: q.map((t) => ({
|
|
721
721
|
source: t.source.ID,
|
|
722
722
|
target: t.target.ID,
|
|
723
723
|
value: t.value
|
|
@@ -736,7 +736,7 @@ const Jt = (t) => (t = Et.sanitizeText(t, rt()), B[t] || (B[t] = new Zt(t), Q.pu
|
|
|
736
736
|
setAccDescription: _t,
|
|
737
737
|
getDiagramTitle: kt,
|
|
738
738
|
setDiagramTitle: mt,
|
|
739
|
-
clear:
|
|
739
|
+
clear: qt
|
|
740
740
|
}, pt = class st {
|
|
741
741
|
static next(n) {
|
|
742
742
|
return new st(n + ++st.count);
|
|
@@ -758,8 +758,8 @@ const se = {
|
|
|
758
758
|
}, re = function(t, n, s, a) {
|
|
759
759
|
const { securityLevel: u, sankey: _ } = rt(), g = wt.sankey;
|
|
760
760
|
let p;
|
|
761
|
-
u === "sandbox" && (p =
|
|
762
|
-
const i = u === "sandbox" ?
|
|
761
|
+
u === "sandbox" && (p = G("#i" + n));
|
|
762
|
+
const i = u === "sandbox" ? G(p.nodes()[0].contentDocument.body) : G("body"), o = u === "sandbox" ? i.select(`[id="${n}"]`) : G(`[id="${n}"]`), c = (_ == null ? void 0 : _.width) ?? g.width, m = (_ == null ? void 0 : _.height) ?? g.width, b = (_ == null ? void 0 : _.useMaxWidth) ?? g.useMaxWidth, y = (_ == null ? void 0 : _.nodeAlignment) ?? g.nodeAlignment, x = (_ == null ? void 0 : _.prefix) ?? g.prefix, E = (_ == null ? void 0 : _.suffix) ?? g.suffix, L = (_ == null ? void 0 : _.showValues) ?? g.showValues, A = a.db.getGraph(), N = se[y];
|
|
763
763
|
jt().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (L ? 15 : 0)).nodeAlign(N).extent([
|
|
764
764
|
[0, 0],
|
|
765
765
|
[c, m]
|
|
@@ -790,14 +790,14 @@ ${x}${Math.round(w * 100) / 100}${E}` : d;
|
|
|
790
790
|
default:
|
|
791
791
|
C = P;
|
|
792
792
|
}
|
|
793
|
-
O.append("path").attr("d",
|
|
793
|
+
O.append("path").attr("d", Xt()).attr("stroke", C).attr("stroke-width", (d) => Math.max(1, d.width)), St(void 0, o, 0, b);
|
|
794
794
|
}, oe = {
|
|
795
795
|
draw: re
|
|
796
796
|
}, le = (t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
|
|
797
|
-
`).trim(), ae =
|
|
798
|
-
|
|
797
|
+
`).trim(), ae = X.parse.bind(X);
|
|
798
|
+
X.parse = (t) => ae(le(t));
|
|
799
799
|
const pe = {
|
|
800
|
-
parser:
|
|
800
|
+
parser: X,
|
|
801
801
|
db: ie,
|
|
802
802
|
renderer: oe
|
|
803
803
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./layers.
|
|
1
|
+
import "./layers.BQjo-s-b.js";
|
|
2
2
|
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?
|
|
3
3
|
|
|
4
4
|
(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.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./layers.
|
|
1
|
+
import { W as J, a as rt, s as at, b as lt, c as ot, o as ct, p as ht, l as et, g as it, a8 as ut, v as yt, B as ft, e as pt, i as gt, r as dt, x as mt } from "./layers.visFusIB.js";
|
|
2
|
+
import "./layers.Bg7BQcmt.js";
|
|
3
3
|
import "lodash-es/memoize.js";
|
|
4
4
|
import "lodash-es/merge.js";
|
|
5
5
|
import "lodash-es/isEmpty.js";
|
|
6
|
-
import { a as tt } from "./layers.
|
|
6
|
+
import { a as tt } from "./layers.DeT0xAwz.js";
|
|
7
7
|
import { o as _t } from "./layers.b0h5ZBmD.js";
|
|
8
8
|
import { a as xt } from "./layers.CqVTtuYm.js";
|
|
9
9
|
import { c as F } from "./layers.DLwuMfdd.js";
|
|
@@ -98,39 +98,39 @@ var K = (function() {
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
parse: function(t) {
|
|
101
|
-
var i = this, n = [0], r = [], o = [null], s = [], P = this.table, _ = "", f = 0, V = 0, R = 2, M = 1,
|
|
101
|
+
var i = this, n = [0], r = [], o = [null], s = [], P = this.table, _ = "", f = 0, V = 0, R = 2, M = 1, U = s.slice.call(arguments, 1), h = Object.create(this.lexer), N = { yy: {} };
|
|
102
102
|
for (var Y in this.yy)
|
|
103
103
|
Object.prototype.hasOwnProperty.call(this.yy, Y) && (N.yy[Y] = this.yy[Y]);
|
|
104
104
|
h.setInput(t, N.yy), N.yy.lexer = h, N.yy.parser = this, typeof h.yylloc > "u" && (h.yylloc = {});
|
|
105
|
-
var
|
|
106
|
-
s.push(
|
|
105
|
+
var Z = h.yylloc;
|
|
106
|
+
s.push(Z);
|
|
107
107
|
var nt = h.options && h.options.ranges;
|
|
108
108
|
typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
109
109
|
function st() {
|
|
110
110
|
var C;
|
|
111
111
|
return C = r.pop() || h.lex() || M, typeof C != "number" && (C instanceof Array && (r = C, C = r.pop()), C = i.symbols_[C] || C), C;
|
|
112
112
|
}
|
|
113
|
-
for (var x, L, S,
|
|
113
|
+
for (var x, L, S, q, z = {}, W, D, X, j; ; ) {
|
|
114
114
|
if (L = n[n.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((x === null || typeof x > "u") && (x = st()), S = P[L] && P[L][x]), typeof S > "u" || !S.length || !S[0]) {
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
for (
|
|
118
|
-
this.terminals_[
|
|
119
|
-
h.showPosition ?
|
|
115
|
+
var H = "";
|
|
116
|
+
j = [];
|
|
117
|
+
for (W in P[L])
|
|
118
|
+
this.terminals_[W] && W > R && j.push("'" + this.terminals_[W] + "'");
|
|
119
|
+
h.showPosition ? H = "Parse error on line " + (f + 1) + `:
|
|
120
120
|
` + h.showPosition() + `
|
|
121
|
-
Expecting ` +
|
|
121
|
+
Expecting ` + j.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : H = "Parse error on line " + (f + 1) + ": Unexpected " + (x == M ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(H, {
|
|
122
122
|
text: h.match,
|
|
123
123
|
token: this.terminals_[x] || x,
|
|
124
124
|
line: h.yylineno,
|
|
125
|
-
loc:
|
|
126
|
-
expected:
|
|
125
|
+
loc: Z,
|
|
126
|
+
expected: j
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
if (S[0] instanceof Array && S.length > 1)
|
|
130
130
|
throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + x);
|
|
131
131
|
switch (S[0]) {
|
|
132
132
|
case 1:
|
|
133
|
-
n.push(x), o.push(h.yytext), s.push(h.yylloc), n.push(S[1]), x = null, V = h.yyleng, _ = h.yytext, f = h.yylineno,
|
|
133
|
+
n.push(x), o.push(h.yytext), s.push(h.yylloc), n.push(S[1]), x = null, V = h.yyleng, _ = h.yytext, f = h.yylineno, Z = h.yylloc;
|
|
134
134
|
break;
|
|
135
135
|
case 2:
|
|
136
136
|
if (D = this.productions_[S[1]][1], z.$ = o[o.length - D], z._$ = {
|
|
@@ -141,7 +141,7 @@ Expecting ` + W.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : Z = "
|
|
|
141
141
|
}, nt && (z._$.range = [
|
|
142
142
|
s[s.length - (D || 1)].range[0],
|
|
143
143
|
s[s.length - 1].range[1]
|
|
144
|
-
]),
|
|
144
|
+
]), q = this.performAction.apply(z, [
|
|
145
145
|
_,
|
|
146
146
|
V,
|
|
147
147
|
f,
|
|
@@ -149,8 +149,8 @@ Expecting ` + W.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : Z = "
|
|
|
149
149
|
S[1],
|
|
150
150
|
o,
|
|
151
151
|
s
|
|
152
|
-
].concat(
|
|
153
|
-
return
|
|
152
|
+
].concat(U)), typeof q < "u")
|
|
153
|
+
return q;
|
|
154
154
|
D && (n = n.slice(0, -1 * D * 2), o = o.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[S[1]][0]), o.push(z.$), s.push(z._$), X = P[n[n.length - 2]][n[n.length - 1]], n.push(X);
|
|
155
155
|
break;
|
|
156
156
|
case 3:
|
|
@@ -395,12 +395,12 @@ const St = K, $t = mt.pie, G = {
|
|
|
395
395
|
sections: {},
|
|
396
396
|
showData: !1
|
|
397
397
|
};
|
|
398
|
-
let
|
|
398
|
+
let B = G.sections, Q = G.showData;
|
|
399
399
|
const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
|
|
400
|
-
|
|
400
|
+
B = structuredClone(G.sections), Q = G.showData, dt();
|
|
401
401
|
}, Tt = (e, u) => {
|
|
402
|
-
e = gt(e, it()),
|
|
403
|
-
}, It = () =>
|
|
402
|
+
e = gt(e, it()), B[e] === void 0 && (B[e] = u, et.debug(`added new section: ${e}, with value: ${u}`));
|
|
403
|
+
}, It = () => B, Dt = (e) => (e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim())), Ct = (e) => {
|
|
404
404
|
Q = e;
|
|
405
405
|
}, Ot = () => Q, Pt = {
|
|
406
406
|
getConfig: Et,
|
|
@@ -482,8 +482,8 @@ const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
|
|
|
482
482
|
o += v[f];
|
|
483
483
|
}), m.selectAll("mySlices").data(i).enter().append("text").text((f) => (f.data.value / o * 100).toFixed(0) + "%").attr("transform", (f) => "translate(" + t.centroid(f) + ")").style("text-anchor", "middle").attr("class", "slice"), m.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
484
484
|
const s = m.selectAll(".legend").data(r.domain()).enter().append("g").attr("class", "legend").attr("transform", (f, V) => {
|
|
485
|
-
const R = l + d, M = R * r.domain().length / 2,
|
|
486
|
-
return "translate(" +
|
|
485
|
+
const R = l + d, M = R * r.domain().length / 2, U = 12 * l, h = V * R - M;
|
|
486
|
+
return "translate(" + U + "," + h + ")";
|
|
487
487
|
});
|
|
488
488
|
s.append("rect").attr("width", l).attr("height", l).style("fill", r).style("stroke", r), s.data(i).append("text").attr("x", l + d).attr("y", l - d).text((f) => {
|
|
489
489
|
const { label: V, value: R } = f.data;
|
|
@@ -493,12 +493,12 @@ const At = structuredClone($t), Et = () => structuredClone(At), wt = () => {
|
|
|
493
493
|
...s.selectAll("text").nodes().map((f) => (f == null ? void 0 : f.getBoundingClientRect().width) ?? 0)
|
|
494
494
|
), _ = I + a + l + d + P;
|
|
495
495
|
T.attr("viewBox", `0 0 ${_} ${k}`), pt(T, k, _, y.useMaxWidth);
|
|
496
|
-
}, Rt = { draw: Ft },
|
|
496
|
+
}, Rt = { draw: Ft }, qt = {
|
|
497
497
|
parser: St,
|
|
498
498
|
db: Pt,
|
|
499
499
|
renderer: Rt,
|
|
500
500
|
styles: Nt
|
|
501
501
|
};
|
|
502
502
|
export {
|
|
503
|
-
|
|
503
|
+
qt as diagram
|
|
504
504
|
};
|