@layers-app/editor 0.7.69 → 0.7.71

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.
Files changed (226) hide show
  1. package/README.md +831 -831
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.d.ts +12 -4
  4. package/dist/index.js +7 -7
  5. package/dist/{layers.D264prLn.js → layers.0YBrDWzw.js} +1 -1
  6. package/dist/{layers.5QZeTM8q.js → layers.1vAsGoEJ.js} +1 -1
  7. package/dist/{layers.C9m_GsPX.js → layers.2UTFdUcH.js} +1 -1
  8. package/dist/{layers.JvCTDQpj.js → layers.4kkQ0LA1.js} +1 -1
  9. package/dist/{layers.BNtW40eC.js → layers.6ZOYWJ5G.js} +1 -1
  10. package/dist/{layers.BzvpI1hh.js → layers.8yI79xLV.js} +1 -1
  11. package/dist/{layers.BACuuEQj.js → layers.9-Dujbe_.js} +1 -1
  12. package/dist/{layers.qLig6Qrb.js → layers.B-3-gKTw.js} +4 -4
  13. package/dist/{layers.BVazfLwg.js → layers.B0Fy1fOg.js} +1 -1
  14. package/dist/{layers.BazZH6QQ.js → layers.B0OzXi4U.js} +3 -3
  15. package/dist/{layers.B5XR7a6d.js → layers.B0cEDlqL.js} +5 -5
  16. package/dist/{layers.BPxa1qKy.js → layers.B2OYSFxS.js} +6 -6
  17. package/dist/{layers.BTHfw6Y3.js → layers.B2jK2G-2.js} +1 -1
  18. package/dist/{layers.DSFm0uZ6.js → layers.B4McXjTf.js} +1 -1
  19. package/dist/{layers.Dt8WcpHM.js → layers.B5JTPx82.js} +1 -1
  20. package/dist/{layers.5p0-huXu.js → layers.B5iHV9A9.js} +2 -2
  21. package/dist/{layers.DJhZTayX.js → layers.B7BH57R7.js} +1 -1
  22. package/dist/{layers.CTlCeLwn.js → layers.B8YobFwe.js} +1 -1
  23. package/dist/{layers.Dbdv8-it.js → layers.B97rOTHj.js} +1 -1
  24. package/dist/{layers.CxG4X8gX.js → layers.B9r4d044.js} +1 -1
  25. package/dist/{layers.DZZsW6JV.js → layers.BCNzKdPg.js} +1 -1
  26. package/dist/{layers.BEzidhNG.js → layers.BEO9jbxS.js} +1 -1
  27. package/dist/{layers.DeG_vaHA.js → layers.BEqZo6Os.js} +1 -1
  28. package/dist/{layers.D7gubwRv.js → layers.BGOsKs_2.js} +1 -1
  29. package/dist/{layers.DD3xo4Q7.js → layers.BH2-HmeT.js} +1 -1
  30. package/dist/{layers.BsYppIUT.js → layers.BIOedFq8.js} +1 -1
  31. package/dist/{layers.BiFdoyLm.js → layers.BIqvjXSy.js} +1 -1
  32. package/dist/layers.BL2HDW3Q.js +129 -0
  33. package/dist/{layers.Bz-ApnNV.js → layers.BM3s5plV.js} +7 -7
  34. package/dist/{layers.ABwl_epL.js → layers.BNDNdJX8.js} +1 -1
  35. package/dist/{layers.P7yLojmH.js → layers.BNqStciE.js} +1 -1
  36. package/dist/{layers.C22aJlMR.js → layers.BRG0l8Fl.js} +1 -1
  37. package/dist/{layers.D0EoHDuH.js → layers.BRYyvscQ.js} +1 -1
  38. package/dist/layers.BReZr534.js +7 -0
  39. package/dist/{layers.fvWum4-u.js → layers.BTU5cA8n.js} +1 -1
  40. package/dist/{layers.Cg1xP3_y.js → layers.BToaBsBa.js} +1 -1
  41. package/dist/{layers.Ddbl4YKu.js → layers.BUt-DyPQ.js} +1 -1
  42. package/dist/{layers.CkkOx1Du.js → layers.BWPGj5YT.js} +1 -1
  43. package/dist/{layers.O9aENdhz.js → layers.BWo08IF8.js} +1 -1
  44. package/dist/{layers.BeUtJKi2.js → layers.BXOyl5zz.js} +3 -3
  45. package/dist/{layers.2oQP3Kd1.js → layers.BY5GlMch.js} +1 -1
  46. package/dist/{layers.qh_bhSwF.js → layers.BYYKkc6H.js} +4 -4
  47. package/dist/{layers.BVqcl0kN.js → layers.BaViCDAm.js} +1 -1
  48. package/dist/{layers.HKuQEi8d.js → layers.Bah9XzWL.js} +1 -1
  49. package/dist/{layers.yoJPKgxf.js → layers.BdEkfGD6.js} +1 -1
  50. package/dist/{layers.BT2p46yj.js → layers.BeSVrAvf.js} +1 -1
  51. package/dist/{layers.C6M4MqIv.js → layers.Bea1t2mR.js} +1 -1
  52. package/dist/{layers.DKf11IZ4.js → layers.BgLebJDO.js} +1 -1
  53. package/dist/{layers.CBJ0MOlf.js → layers.BgQJXAyk.js} +1 -1
  54. package/dist/{layers.yiF779cI.js → layers.Bhc7fo_t.js} +1 -1
  55. package/dist/{layers.BPwGq1IZ.js → layers.BjF53Cb3.js} +1 -1
  56. package/dist/{layers.BRlhY-vC.js → layers.BkW2oxVe.js} +1 -1
  57. package/dist/{layers.Apre-y7o.js → layers.BkfYYUMI.js} +418 -418
  58. package/dist/{layers.B9UDpqLV.js → layers.BmYBcchQ.js} +2 -2
  59. package/dist/{layers.DDCXCLxy.js → layers.Bm_atR4G.js} +1 -1
  60. package/dist/{layers.D33amGFS.js → layers.BmbHcSsT.js} +4 -4
  61. package/dist/{layers.Bikyk_e4.js → layers.BmiFa05d.js} +1 -1
  62. package/dist/{layers.CScSVAbT.js → layers.BnGNde87.js} +1 -1
  63. package/dist/{layers.0Xr9gi8k.js → layers.Bog0F1HW.js} +1 -1
  64. package/dist/{layers.NSb01dZ8.js → layers.Bq-T_tlX.js} +3 -3
  65. package/dist/{layers.Bl49cA_q.js → layers.Bq5Gyo9H.js} +3 -3
  66. package/dist/{layers.CgNnf8Hm.js → layers.BqJAKLvg.js} +1 -1
  67. package/dist/{layers.BKWjeNv0.js → layers.Bqx2kJAq.js} +1 -1
  68. package/dist/{layers.D9v06W3U.js → layers.BrSY9TN-.js} +5 -5
  69. package/dist/{layers.C4OQU4VG.js → layers.BwV3ChwK.js} +1 -1
  70. package/dist/{layers.CKe87-Ob.js → layers.Bx4Zqssi.js} +1 -1
  71. package/dist/{layers.C8i5OjeA.js → layers.Bx5Jclxg.js} +1 -1
  72. package/dist/{layers.BmFfrMCv.js → layers.ByQYCPxT.js} +1 -1
  73. package/dist/{layers.DT1WT-jl.js → layers.BzBGQ86V.js} +1 -1
  74. package/dist/{layers.nLwIMr0A.js → layers.C0JLGUIV.js} +1 -1
  75. package/dist/{layers.C65VXHX0.js → layers.C1GljpN-.js} +3 -3
  76. package/dist/{layers.hhScrOOB.js → layers.C35Q9E4b.js} +1 -1
  77. package/dist/{layers.DRqadjGU.js → layers.C3ugjyFb.js} +1 -1
  78. package/dist/{layers.Bdy9X7vh.js → layers.C7QEo5m5.js} +3 -3
  79. package/dist/{layers.1h-C3twR.js → layers.C8K76bX9.js} +1 -1
  80. package/dist/{layers.BFSFcjZf.js → layers.C8o6lYSj.js} +1 -1
  81. package/dist/{layers.0DBGZAux.js → layers.CCawCsum.js} +1 -1
  82. package/dist/{layers.CeAmhUfG.js → layers.CDT31cs0.js} +1 -1
  83. package/dist/{layers.DBVgoS4g.js → layers.CE8s4Sal.js} +1 -1
  84. package/dist/{layers.BlxHjIpu.js → layers.CEYgaHTm.js} +4 -4
  85. package/dist/{layers.DoCKPdqw.js → layers.CFBc17hB.js} +1 -1
  86. package/dist/{layers.ChgBnn_C.js → layers.CHMleWs_.js} +7 -7
  87. package/dist/{layers.D86KUGFj.js → layers.CHgIOVjY.js} +1 -1
  88. package/dist/{layers.pmVv821j.js → layers.CLpT2vCT.js} +1 -1
  89. package/dist/layers.CMO6k-Xm.js +32701 -0
  90. package/dist/{layers.OjmLtSP1.js → layers.CMRBjQl8.js} +1 -1
  91. package/dist/{layers.DCF5TSK6.js → layers.CNUfTnkK.js} +3 -3
  92. package/dist/{layers.DO14DAS1.js → layers.CPEFEBSK.js} +1 -1
  93. package/dist/{layers.D1ndSKTI.js → layers.CQWHVEXP.js} +1 -1
  94. package/dist/{layers.LpxZivxv.js → layers.CT5E6-h8.js} +1 -1
  95. package/dist/{layers.BXbpW1pa.js → layers.CTDZfwGH.js} +1 -1
  96. package/dist/{layers.Cqc8FCdp.js → layers.CTNuYiVv.js} +10 -10
  97. package/dist/{layers.C8Uasx1W.js → layers.CUrjNsFP.js} +1 -1
  98. package/dist/{layers.zQ4PGkmU.js → layers.CVAti8ij.js} +2 -2
  99. package/dist/{layers.BkOoEzpy.js → layers.CWOSVqtW.js} +1 -1
  100. package/dist/{layers.SXC1p29H.js → layers.CXT7nwLM.js} +1 -1
  101. package/dist/{layers.BpLCIHmB.js → layers.CYS6g246.js} +1 -1
  102. package/dist/{layers.DLlZvhVA.js → layers.CYbx7VYv.js} +1 -1
  103. package/dist/{layers.gaA-42fN.js → layers.CZ46rxbb.js} +1 -1
  104. package/dist/{layers.C_GOAIwQ.js → layers.CZpQ9_Qz.js} +4 -4
  105. package/dist/{layers.DyOnTO36.js → layers.Cb_mvZru.js} +1 -1
  106. package/dist/{layers.oDpU-Hra.js → layers.CcvxdGUg.js} +1 -1
  107. package/dist/{layers.BnRSfdCn.js → layers.Cg0NVKFo.js} +1 -1
  108. package/dist/{layers.BKFBrrT0.js → layers.CkMVMiaw.js} +1 -1
  109. package/dist/{layers.C_BVUEv9.js → layers.CkNZL8nW.js} +1 -1
  110. package/dist/{layers.CztaGcF0.js → layers.CkeTWFRP.js} +1 -1
  111. package/dist/{layers.DXcnRV7U.js → layers.ClSVgSs_.js} +1 -1
  112. package/dist/{layers.6u9nN9kL.js → layers.Cm4T0G6q.js} +1 -1
  113. package/dist/{layers.C4yu73C7.js → layers.CmKI90AW.js} +1 -1
  114. package/dist/layers.CmmYt3Ou.js +1 -0
  115. package/dist/{layers.JWOykHoL.js → layers.CoUM4KxR.js} +1 -1
  116. package/dist/{layers.d-J-pkkX.js → layers.CopV5cLA.js} +1 -1
  117. package/dist/{layers.BQPUKPC6.js → layers.CpOXj9-w.js} +1 -1
  118. package/dist/layers.CpdQVVAX.js +1 -0
  119. package/dist/{layers.v33R5NY5.js → layers.Cph5sHk8.js} +1 -1
  120. package/dist/{layers.CNP1oZdB.js → layers.Csfv-3tI.js} +1 -1
  121. package/dist/{layers.GBoQfNMn.js → layers.CuO0WDSI.js} +1 -1
  122. package/dist/{layers.DThNATm6.js → layers.CulWmh4P.js} +1 -1
  123. package/dist/layers.CxFS3y_3.js +1 -0
  124. package/dist/{layers.Cu4n_10K.js → layers.CyOmczYz.js} +1 -1
  125. package/dist/{layers.CB008f5M.js → layers.CzOzf5fN.js} +1 -1
  126. package/dist/{layers.DhtNmWhH.js → layers.CzgfY5tO.js} +1 -1
  127. package/dist/{layers.DOUMVPFI.js → layers.D0IrC8O9.js} +1 -1
  128. package/dist/{layers.DsrGvHCq.js → layers.D13B-Tw-.js} +1 -1
  129. package/dist/layers.D1wNC9yP.js +1 -0
  130. package/dist/{layers.Bo0IyTdD.js → layers.D3ESLEWI.js} +8 -8
  131. package/dist/{layers.DDcNIM5V.js → layers.D3JlwkA5.js} +1 -1
  132. package/dist/{layers.DGQ_Ip2d.js → layers.D4pbgwIK.js} +9 -9
  133. package/dist/{layers.27B-KQHO.js → layers.D67Iz9kD.js} +3 -3
  134. package/dist/{layers.OXr5r5tZ.js → layers.D7DKTltD.js} +1 -1
  135. package/dist/{layers.B8owvN6x.js → layers.D8nhIJ08.js} +1 -1
  136. package/dist/{layers.DtIUJOdD.js → layers.D9EGw-F8.js} +1 -1
  137. package/dist/{layers.DlLc2eVa.js → layers.D9isqhfn.js} +1 -1
  138. package/dist/layers.DBGSdaOf.js +8 -0
  139. package/dist/layers.DC-lyi-7.js +1 -0
  140. package/dist/layers.DEP2baj0.js +1 -0
  141. package/dist/{layers.BYdLVl8c.js → layers.DEZKn77u.js} +2 -2
  142. package/dist/{layers.DaDiP12K.js → layers.DEm-SOCx.js} +1 -1
  143. package/dist/{layers.gC3dy9DX.js → layers.DFOksAKg.js} +1 -1
  144. package/dist/{layers.MMnDRf0F.js → layers.DJWw_i98.js} +1 -1
  145. package/dist/layers.DMPKiY6n.js +17 -0
  146. package/dist/{layers.pcuXD239.js → layers.DM_uA5a6.js} +1 -1
  147. package/dist/{layers.Dps90Puu.js → layers.DOjJWqna.js} +1 -1
  148. package/dist/{layers.hLDK8NtM.js → layers.DQ2IoyCh.js} +1 -1
  149. package/dist/{layers.BRrmq6iF.js → layers.DRIWEVTg.js} +1 -1
  150. package/dist/{layers.B43YGj4m.js → layers.DRvJ_Eat.js} +1 -1
  151. package/dist/{layers.DOrpTa-Z.js → layers.DS0grkii.js} +1 -1
  152. package/dist/{layers.VG9nD_7m.js → layers.DSUVrmY0.js} +2 -2
  153. package/dist/{layers.CJXhO9Ve.js → layers.DSaHC0cP.js} +1 -1
  154. package/dist/{layers.D2Y8JbSm.js → layers.DTFZVn6k.js} +1 -1
  155. package/dist/{layers.nutPV8y6.js → layers.DTP321BL.js} +1 -1
  156. package/dist/{layers.DzoWhdzh.js → layers.DUyUCaTT.js} +1 -1
  157. package/dist/{layers.Bj5LxhQF.js → layers.DV7N1asa.js} +1 -1
  158. package/dist/{layers.D6Zb3uyB.js → layers.DWNIrIGZ.js} +1 -1
  159. package/dist/{layers.qJxUThUt.js → layers.DX5PLuRa.js} +1 -1
  160. package/dist/{layers.Bkg6bWRU.js → layers.DXK6ddI2.js} +1 -1
  161. package/dist/{layers.BVixMLzr.js → layers.D_Pki6-a.js} +2 -2
  162. package/dist/{layers.CU1Xj7Xw.js → layers.DbYkGyj-.js} +1 -1
  163. package/dist/{layers.OgHHJ7AJ.js → layers.DcOCp021.js} +1 -1
  164. package/dist/{layers.DJE4KoOw.js → layers.DdIpdKCP.js} +1 -1
  165. package/dist/{layers.CMhGAZ1F.js → layers.DeZYEnzF.js} +1 -1
  166. package/dist/{layers.C7ExfGAg.js → layers.Dh_FqLNw.js} +1 -1
  167. package/dist/{layers.CeSuEnek.js → layers.Dig4VCez.js} +1 -1
  168. package/dist/layers.DilA0qnM.js +54 -0
  169. package/dist/{layers.Yv4tqH51.js → layers.Djjnowlp.js} +1 -1
  170. package/dist/{layers.-Ruj4Zo5.js → layers.DkHo38DI.js} +7 -7
  171. package/dist/{layers.8mP8G0Aq.js → layers.DkPTn9O4.js} +1 -1
  172. package/dist/{layers.7Ceqy3dk.js → layers.DkPi1s2Z.js} +1 -1
  173. package/dist/{layers.PejndB2j.js → layers.Dly1Tq6W.js} +1 -1
  174. package/dist/{layers.Db05xOFS.js → layers.Dr4jcfM_.js} +3 -3
  175. package/dist/{layers.v8fikFVy.js → layers.DxwnE0eC.js} +6 -6
  176. package/dist/{layers.CCOUMNlV.js → layers.E3tmXQAP.js} +1 -1
  177. package/dist/{layers.C9aLQWLr.js → layers.EAyl146M.js} +1 -1
  178. package/dist/{layers.QcOQUP20.js → layers.ERXKMTcj.js} +1 -1
  179. package/dist/{layers.CFfrUgu3.js → layers.HksqvZtq.js} +10 -10
  180. package/dist/{layers.BkL_wx9c.js → layers.MnuEyVuQ.js} +1 -1
  181. package/dist/{layers.xj7IEpC3.js → layers.Mx4csk_q.js} +1 -1
  182. package/dist/{layers.CoaCRc82.js → layers.Pa9Iyp3r.js} +1 -1
  183. package/dist/{layers._rxomw_e.js → layers.Pd5WLkm7.js} +1 -1
  184. package/dist/layers.QglB_osH.js +6 -0
  185. package/dist/{layers.Cy4keqhB.js → layers.R9JO8bzv.js} +1 -1
  186. package/dist/{layers.BRMYvE9z.js → layers.RWmBLZWj.js} +1 -1
  187. package/dist/{layers.D8zgNYxg.js → layers.UU3JlTco.js} +1 -1
  188. package/dist/{layers.6-rJJApG.js → layers.VCm6xtc7.js} +24 -24
  189. package/dist/{layers.7JPTj9nT.js → layers.X4lsf17u.js} +1 -1
  190. package/dist/{layers.CMx7vO0L.js → layers.Z1m0v0q2.js} +1 -1
  191. package/dist/{layers.D85fT96W.js → layers.ZZOyug2n.js} +4 -4
  192. package/dist/{layers.29-kZlSC.js → layers.ahHfzAps.js} +1 -1
  193. package/dist/{layers.BOo-MVTB.js → layers.eeWj9MmF.js} +1 -1
  194. package/dist/{layers.BiTvj2e-.js → layers.gaNyPxz0.js} +1 -1
  195. package/dist/{layers.Bp002Gvn.js → layers.hgdiUzB4.js} +1 -1
  196. package/dist/{layers.CIJ4arAq.js → layers.icrDtXPY.js} +1 -1
  197. package/dist/layers.lpVKCqT2.js +448 -0
  198. package/dist/{layers.BQt-6gJJ.js → layers.mr6o1lwe.js} +1 -1
  199. package/dist/{layers.zBZCJFA4.js → layers.oKCpKA-w.js} +1 -1
  200. package/dist/{layers.CouvMYZ_.js → layers.r6t0SI6i.js} +1 -1
  201. package/dist/{layers.ocb-ckJB.js → layers.s9Tm6F1m.js} +1 -1
  202. package/dist/{layers.BEi-TBNF.js → layers.sC7nbc2y.js} +1 -1
  203. package/dist/{layers.BX73rpJr.js → layers.sK52pMMJ.js} +1 -1
  204. package/dist/layers.tbL95R__.js +296 -0
  205. package/dist/{layers.-rEnD-gW.js → layers.wgPAy3eN.js} +1 -1
  206. package/dist/{layers.BXxEMH4b.js → layers.xSI8rjyJ.js} +4 -4
  207. package/dist/{layers.CrfWp4fJ.js → layers.ytiriyPJ.js} +1 -1
  208. package/dist/{layers.BEBKNx1X.js → layers.zuXeZVAS.js} +1 -1
  209. package/package.json +46 -21
  210. package/dist/layers.B6oRmypa.js +0 -6
  211. package/dist/layers.BQn-BoQ1.js +0 -1
  212. package/dist/layers.BSQ3Xt_h.js +0 -1
  213. package/dist/layers.BUjjzt0_.js +0 -8
  214. package/dist/layers.Bf2vZuCE.js +0 -213
  215. package/dist/layers.BjB-nIkz.js +0 -1
  216. package/dist/layers.BlDLjKDo.js +0 -28602
  217. package/dist/layers.CEQVj5e3.js +0 -76
  218. package/dist/layers.CFdxfEoL.js +0 -6
  219. package/dist/layers.CQz5mJxl.js +0 -1
  220. package/dist/layers.CVOG1MPi.js +0 -1
  221. package/dist/layers.CgDGfwW5.js +0 -129
  222. package/dist/layers.CmP_wzmD.js +0 -296
  223. package/dist/layers.D4JTY0h0.js +0 -295
  224. package/dist/layers.D_dIsPyp.js +0 -271
  225. package/dist/layers.Df431v9O.js +0 -1
  226. package/dist/layers.nxzVbnZG.js +0 -1
@@ -0,0 +1,448 @@
1
+ import { jsx as c, jsxs as z, Fragment as P } from "react/jsx-runtime";
2
+ import { useMemo as Z, useState as y, useRef as j, useEffect as R, useCallback as _, Suspense as ee, lazy as te } from "react";
3
+ import { useLexicalComposerContext as oe } from "@lexical/react/LexicalComposerContext";
4
+ import { useLexicalEditable as ne } from "@lexical/react/useLexicalEditable";
5
+ import { useLexicalNodeSelection as re } from "@lexical/react/useLexicalNodeSelection";
6
+ import { mergeRegister as le } from "@lexical/utils";
7
+ import { $setSelection as ae, $getNodeByKey as W, CLICK_COMMAND as ie, COMMAND_PRIORITY_LOW as I, KEY_DELETE_COMMAND as se, KEY_BACKSPACE_COMMAND as ce } from "lexical";
8
+ import { R as de, A as X, t as ue, q as fe, r as me, p as J, h as K, s as ge } from "./layers.CMO6k-Xm.js";
9
+ import { l as he, p as xe } from "./layers.DilA0qnM.js";
10
+ import { useTranslation as V } from "react-i18next";
11
+ import { Modal as pe, Text as Ce, Flex as be, Button as Q, Box as U, useMantineColorScheme as ve, Loader as we } from "@mantine/core";
12
+ import { BottomDrawerWithoutHeader as Ee } from "@layers-app/shared";
13
+ const Te = ({
14
+ isCloseModal: o,
15
+ setCloseModalOpen: r,
16
+ confirmClose: g
17
+ }) => {
18
+ const { t: h } = V();
19
+ return /* @__PURE__ */ c(
20
+ pe,
21
+ {
22
+ opened: o,
23
+ onClose: () => {
24
+ r(!1);
25
+ },
26
+ centered: !0,
27
+ title: h("editor.unsavedChanges.title"),
28
+ closeOnClickOutside: !0,
29
+ closeOnEscape: !0,
30
+ size: "500",
31
+ zIndex: 999,
32
+ children: /* @__PURE__ */ z("div", { children: [
33
+ /* @__PURE__ */ c(Ce, { mb: "md", children: h("editor.unsavedChanges.message") }),
34
+ /* @__PURE__ */ z(be, { justify: "flex-end", gap: "sm", children: [
35
+ /* @__PURE__ */ c(
36
+ Q,
37
+ {
38
+ variant: "default",
39
+ onClick: () => {
40
+ r(!1);
41
+ },
42
+ fullWidth: !0,
43
+ children: h("editor.unsavedChanges.cancel")
44
+ }
45
+ ),
46
+ /* @__PURE__ */ c(Q, { color: "red", onClick: g, fullWidth: !0, children: h("editor.unsavedChanges.closeWithoutSaving") })
47
+ ] })
48
+ ] })
49
+ }
50
+ );
51
+ };
52
+ function Me({
53
+ imageContainerRef: o,
54
+ editor: r,
55
+ rootClassName: g = null,
56
+ width: h = "inherit",
57
+ height: u = "inherit",
58
+ nodeKey: i,
59
+ alignment: O,
60
+ setModalOpen: b,
61
+ previewSVG: l
62
+ }) {
63
+ const B = Z(() => l ?? "", [l]), [d, D] = y(!1), { t: v } = V(), N = (C, p) => {
64
+ r.update(() => {
65
+ ae(null);
66
+ const M = W(i);
67
+ return K(M) && M.setWidthAndHeight(C, p), !0;
68
+ });
69
+ }, w = () => {
70
+ ge(r, i);
71
+ };
72
+ return /* @__PURE__ */ c(
73
+ de,
74
+ {
75
+ editor: r,
76
+ isIcon: !1,
77
+ isEmbed: !0,
78
+ width: J(h),
79
+ height: J(u),
80
+ onResizeEnd: N,
81
+ alignment: O,
82
+ children: /* @__PURE__ */ z(U, { className: "media-wrapper excaildraw", children: [
83
+ /* @__PURE__ */ z("div", { className: "media-actions", children: [
84
+ /* @__PURE__ */ c(
85
+ X,
86
+ {
87
+ "aria-label": "Settings",
88
+ label: v("editor.link.edit"),
89
+ flexBorder: !0,
90
+ onClick: () => {
91
+ b(!0);
92
+ },
93
+ icon: ue,
94
+ iconColor: "var(--mantine-color-gray-text)"
95
+ }
96
+ ),
97
+ /* @__PURE__ */ c(
98
+ fe,
99
+ {
100
+ opened: d,
101
+ setOpened: D,
102
+ t: v,
103
+ editor: r,
104
+ nodeKey: i,
105
+ flexBorder: !0
106
+ }
107
+ ),
108
+ /* @__PURE__ */ c(
109
+ X,
110
+ {
111
+ "aria-label": "Delete",
112
+ label: v("editor.actions.delete"),
113
+ flexBorder: !0,
114
+ onClick: w,
115
+ icon: me,
116
+ iconColor: "var(--mantine-color-red-outline)"
117
+ }
118
+ )
119
+ ] }),
120
+ /* @__PURE__ */ c(
121
+ U,
122
+ {
123
+ w: "100%",
124
+ ref: (C) => {
125
+ C && o && (o.current = C);
126
+ },
127
+ className: g ?? "",
128
+ dangerouslySetInnerHTML: { __html: B }
129
+ }
130
+ )
131
+ ] })
132
+ }
133
+ );
134
+ }
135
+ let F = null;
136
+ const ke = /* @__PURE__ */ te(async () => {
137
+ var r;
138
+ const o = await import("./layers.D4pbgwIK.js").then((g) => g.M);
139
+ return !F && o && (F = o.exportToSvg || ((r = o.default) == null ? void 0 : r.exportToSvg) || o.default), { default: o.Excalidraw };
140
+ }), ye = () => {
141
+ const [o, r] = y(
142
+ null
143
+ ), g = _(
144
+ (h) => r(h),
145
+ []
146
+ );
147
+ return [o, g];
148
+ };
149
+ function Oe({
150
+ onSave: o,
151
+ initialElements: r,
152
+ initialAppState: g,
153
+ initialFiles: h,
154
+ isShown: u = !1,
155
+ onDelete: i,
156
+ onClose: O,
157
+ isEdited: b
158
+ }) {
159
+ const [l, B] = ye(), { i18n: d, t: D } = V(), { colorScheme: v } = ve(), N = j(!1), [w, C] = y(r), [p, M] = y(h), [S, A] = y(u);
160
+ R(() => {
161
+ u && A(!0);
162
+ }, [u]), R(() => {
163
+ !u || N.current || (N.current = !0, Promise.resolve({ }));
164
+ }, [u]), R(() => {
165
+ u && setTimeout(() => {
166
+ var e;
167
+ (e = l == null ? void 0 : l.refresh) == null || e.call(l);
168
+ }, 500);
169
+ }, [u, l]), R(() => {
170
+ if (!u)
171
+ return;
172
+ const e = (t, s) => {
173
+ const f = D(t);
174
+ return f.startsWith("editor.menu") ? s : f;
175
+ }, T = e(
176
+ "editor.menu.excalidraw.tools.frameTool",
177
+ d.language === "ru" ? "Инструмент рамки" : d.language === "es" ? "Herramienta de marco" : "Frame tool"
178
+ ), a = e(
179
+ "editor.menu.excalidraw.tools.webEmbed",
180
+ d.language === "ru" ? "Веб-встраивание" : d.language === "es" ? "Incrustación web" : "Web Embed"
181
+ ), E = e(
182
+ "editor.menu.excalidraw.tools.generate",
183
+ d.language === "ru" ? "Генерировать" : d.language === "es" ? "Generar" : "Generate"
184
+ ), L = {
185
+ "Frame tool": T,
186
+ "Web Embed": a,
187
+ "Web embeded": a,
188
+ Generate: E
189
+ }, k = () => {
190
+ const t = document.querySelector(".App-toolbar__extra-tools-dropdown");
191
+ if (!t)
192
+ return;
193
+ const s = document.createTreeWalker(
194
+ t,
195
+ NodeFilter.SHOW_TEXT,
196
+ null
197
+ );
198
+ let f;
199
+ for (; f = s.nextNode(); )
200
+ if (f.nodeType === Node.TEXT_NODE && f.textContent) {
201
+ const $ = f.textContent.trim();
202
+ for (const [Y, G] of Object.entries(L))
203
+ if ($ === Y && G && !$.includes(G)) {
204
+ f.textContent = f.textContent.replace(Y, G);
205
+ break;
206
+ }
207
+ }
208
+ }, n = () => {
209
+ setTimeout(() => {
210
+ k();
211
+ }, 0);
212
+ }, m = setTimeout(() => {
213
+ const t = document.querySelector(
214
+ ".excalidraw-container"
215
+ );
216
+ if (t) {
217
+ const s = t.querySelector(
218
+ ".App-toolbar__extra-tools-trigger"
219
+ );
220
+ s && s.addEventListener("click", n);
221
+ }
222
+ }, 300);
223
+ return () => {
224
+ clearTimeout(m);
225
+ const t = document.querySelector(
226
+ ".excalidraw-container"
227
+ );
228
+ if (t) {
229
+ const s = t.querySelector(
230
+ ".App-toolbar__extra-tools-trigger"
231
+ );
232
+ s && s.removeEventListener("click", n);
233
+ }
234
+ };
235
+ }, [u, d.language, D]);
236
+ const H = _(async () => {
237
+ var k, n, m;
238
+ let e = F;
239
+ if (!e || typeof e != "function") {
240
+ const t = await import("./layers.D4pbgwIK.js").then((s) => s.M);
241
+ e = t.exportToSvg || ((k = t.default) == null ? void 0 : k.exportToSvg) || t.default, e && typeof e == "function" && (F = e);
242
+ }
243
+ if (!e || typeof e != "function") {
244
+ const t = await import("./layers.D4pbgwIK.js").then((f) => f.M), s = t ? Object.keys(t) : [];
245
+ throw console.error("Excalidraw module structure:", {
246
+ keys: s,
247
+ hasExportToSvg: t && "exportToSvg" in t,
248
+ hasDefault: t && "default" in t,
249
+ moduleType: typeof t,
250
+ module: t
251
+ }), new Error(
252
+ `exportToSvg is not available from @excalidraw/excalidraw. Module keys: ${s.join(", ")}. Please ensure @excalidraw/excalidraw is properly installed.`
253
+ );
254
+ }
255
+ const T = ((n = l == null ? void 0 : l.getAppState) == null ? void 0 : n.call(l)) ?? g, a = await e({
256
+ appState: T,
257
+ elements: w,
258
+ files: p
259
+ }), E = (m = a == null ? void 0 : a.firstElementChild) == null ? void 0 : m.firstElementChild, L = a.getAttribute("viewBox");
260
+ if (L != null) {
261
+ const t = L.split(" ");
262
+ a.setAttribute("width", t[2]), a.setAttribute("height", t[3]);
263
+ }
264
+ return E && E.tagName === "style" && E.remove(), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("display", "block"), a.classList.add("excalidraw-svg"), a.outerHTML;
265
+ }, [w, p, l, g]), q = () => {
266
+ if (w && w.filter((e) => !e.isDeleted).length > 0) {
267
+ const e = l == null ? void 0 : l.getAppState(), T = {
268
+ exportBackground: e == null ? void 0 : e.exportBackground,
269
+ exportScale: e == null ? void 0 : e.exportScale,
270
+ exportWithDarkMode: (e == null ? void 0 : e.theme) === "dark",
271
+ isBindingEnabled: e == null ? void 0 : e.isBindingEnabled,
272
+ isLoading: e == null ? void 0 : e.isLoading,
273
+ name: e == null ? void 0 : e.name,
274
+ theme: e == null ? void 0 : e.theme,
275
+ viewBackgroundColor: e == null ? void 0 : e.viewBackgroundColor,
276
+ viewModeEnabled: e == null ? void 0 : e.viewModeEnabled,
277
+ zenModeEnabled: e == null ? void 0 : e.zenModeEnabled,
278
+ zoom: e == null ? void 0 : e.zoom
279
+ };
280
+ (async () => {
281
+ const a = await H();
282
+ o(w, T, p, a);
283
+ })();
284
+ } else
285
+ i();
286
+ }, x = (e, T, a) => {
287
+ (e == null ? void 0 : e.length) !== (r == null ? void 0 : r.length) && (b.current = !0), C(e), M(a);
288
+ };
289
+ return /* @__PURE__ */ c(
290
+ Ee,
291
+ {
292
+ opened: u,
293
+ onClose: O,
294
+ onSave: q,
295
+ className: "excaildraw-modal",
296
+ closeOnEscape: !1,
297
+ children: S && /* @__PURE__ */ c(
298
+ ee,
299
+ {
300
+ fallback: /* @__PURE__ */ c(
301
+ "div",
302
+ {
303
+ style: {
304
+ display: "flex",
305
+ justifyContent: "center",
306
+ alignItems: "center",
307
+ height: "100%",
308
+ minHeight: "400px"
309
+ },
310
+ children: /* @__PURE__ */ c(we, { size: "sm" })
311
+ }
312
+ ),
313
+ children: /* @__PURE__ */ c(
314
+ ke,
315
+ {
316
+ langCode: he[d.language],
317
+ theme: v,
318
+ onChange: x,
319
+ excalidrawAPI: B,
320
+ initialData: {
321
+ appState: { ...g || { isLoading: !1 } },
322
+ elements: r,
323
+ files: h
324
+ }
325
+ }
326
+ )
327
+ }
328
+ )
329
+ }
330
+ );
331
+ }
332
+ function He({
333
+ nodeKey: o,
334
+ data: r,
335
+ width: g,
336
+ height: h,
337
+ alignment: u
338
+ }) {
339
+ var k;
340
+ const [i] = oe(), O = ne(), b = Z(() => xe(r), [r]), l = ((k = b == null ? void 0 : b.elements) == null ? void 0 : k.length) === 0 && !b.previewSVG, [B, d] = y(
341
+ l && i.isEditable()
342
+ ), [D, v] = y(!1), N = j(null), w = j(null), C = j(null), [p, M, S] = re(o), A = _(
343
+ (n) => (p && (n.preventDefault(), i.update(() => {
344
+ const m = W(o);
345
+ m && m.remove();
346
+ })), !1),
347
+ [i, p, o]
348
+ );
349
+ R(() => {
350
+ if (!O) {
351
+ p && S();
352
+ return;
353
+ }
354
+ return le(
355
+ i.registerCommand(
356
+ ie,
357
+ (n) => {
358
+ const m = w.current, t = n.target;
359
+ return m !== null && m.contains(t) ? (n.shiftKey || S(), M(!p), n.detail > 1 && d(!0), !0) : !1;
360
+ },
361
+ I
362
+ ),
363
+ i.registerCommand(
364
+ se,
365
+ A,
366
+ I
367
+ ),
368
+ i.registerCommand(
369
+ ce,
370
+ A,
371
+ I
372
+ )
373
+ );
374
+ }, [S, i, p, A, M, O]);
375
+ const H = _(() => (d(!1), i.update(() => {
376
+ const n = W(o);
377
+ n && n.remove();
378
+ })), [i, o]), q = (n, m, t, s) => i.update(() => {
379
+ const f = W(o);
380
+ K(f) && (n && n.length > 0 || Object.keys(t).length > 0 ? f.setData(
381
+ JSON.stringify({
382
+ appState: m,
383
+ elements: n,
384
+ files: t,
385
+ previewSVG: s
386
+ })
387
+ ) : f.remove());
388
+ }), { elements: x = [], files: e = {}, appState: T = {}, previewSVG: a } = b, E = _(() => {
389
+ d(!1), v(!1), C.current = !1, (x == null ? void 0 : x.length) === 0 && i.update(() => {
390
+ const n = W(o);
391
+ n && n.remove();
392
+ });
393
+ }, [i, o, x == null ? void 0 : x.length]), L = _(() => {
394
+ C.current ? v(!0) : E();
395
+ }, [E]);
396
+ return /* @__PURE__ */ z(P, { children: [
397
+ /* @__PURE__ */ c(
398
+ Te,
399
+ {
400
+ isCloseModal: D,
401
+ confirmClose: E,
402
+ setCloseModalOpen: v
403
+ }
404
+ ),
405
+ /* @__PURE__ */ c(
406
+ Oe,
407
+ {
408
+ initialElements: x,
409
+ isEdited: C,
410
+ initialFiles: e,
411
+ initialAppState: T,
412
+ isShown: B,
413
+ onDelete: H,
414
+ onClose: L,
415
+ onSave: (n, m, t, s) => {
416
+ q(n, m, t, s), d(!1);
417
+ },
418
+ closeOnClickOutside: !1
419
+ }
420
+ ),
421
+ (x == null ? void 0 : x.length) && /* @__PURE__ */ c(
422
+ "div",
423
+ {
424
+ style: {
425
+ display: "flex",
426
+ justifyContent: u
427
+ },
428
+ children: /* @__PURE__ */ c(
429
+ Me,
430
+ {
431
+ imageContainerRef: N,
432
+ className: "image",
433
+ width: g,
434
+ height: h,
435
+ editor: i,
436
+ nodeKey: o,
437
+ alignment: u,
438
+ setModalOpen: d,
439
+ previewSVG: a
440
+ }
441
+ )
442
+ }
443
+ )
444
+ ] });
445
+ }
446
+ export {
447
+ He as default
448
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.6-rJJApG.js");require("./layers.-Ruj4Zo5.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.VCm6xtc7.js");require("./layers.DkHo38DI.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
2
2
  `+S.showPosition()+`
3
3
  Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),V=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof V<"u")return V;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=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),c.length-1&&(this.yylineno-=c.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:c?(c.length===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),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(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`