deepsky-core 2.3.9 → 2.3.12

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 (351) hide show
  1. package/package.json +2 -1
  2. package/dist/172d3529b26f8cedef6b.woff2 +0 -0
  3. package/dist/20f389c4120be058d80a.woff2 +0 -0
  4. package/dist/2960900c4f271311eb36.woff2 +0 -0
  5. package/dist/39890742bc957b368704.woff2 +0 -0
  6. package/dist/6d3d25f4820d0da8f01f.woff2 +0 -0
  7. package/dist/6eec866c69313624be60.woff2 +0 -0
  8. package/dist/73ea273a72f4aca30ca5.woff2 +0 -0
  9. package/dist/7d393d382f3e7fb1c637.woff2 +0 -0
  10. package/dist/931d67ea207ab37ee693.woff2 +0 -0
  11. package/dist/95591a929f0d32aa282a.woff2 +0 -0
  12. package/dist/a1abf90dfd72792a577a.woff2 +0 -0
  13. package/dist/c295e7f71970f03c0549.woff2 +0 -0
  14. package/dist/c81d1b2a4b75d3eded60.woff2 +0 -0
  15. package/dist/cd5e231e0cc53b2cb2c0.woff2 +0 -0
  16. package/dist/chunk/1037-fe8af1811d55a770e36b.js +0 -1
  17. package/dist/chunk/1066-fe8af1811d55a770e36b.js +0 -1
  18. package/dist/chunk/1216-fe8af1811d55a770e36b.js +0 -1
  19. package/dist/chunk/1230-fe8af1811d55a770e36b.js +0 -1
  20. package/dist/chunk/1425-fe8af1811d55a770e36b.js +0 -1
  21. package/dist/chunk/1432-fe8af1811d55a770e36b.js +0 -1
  22. package/dist/chunk/1476-fe8af1811d55a770e36b.js +0 -1
  23. package/dist/chunk/1545-fe8af1811d55a770e36b.js +0 -1
  24. package/dist/chunk/16-fe8af1811d55a770e36b.js +0 -1
  25. package/dist/chunk/1624-fe8af1811d55a770e36b.js +0 -1
  26. package/dist/chunk/1631-fe8af1811d55a770e36b.js +0 -1
  27. package/dist/chunk/1655-fe8af1811d55a770e36b.js +0 -1
  28. package/dist/chunk/1708-fe8af1811d55a770e36b.js +0 -1
  29. package/dist/chunk/172-fe8af1811d55a770e36b.js +0 -1
  30. package/dist/chunk/1729-fe8af1811d55a770e36b.js +0 -1
  31. package/dist/chunk/1757-fe8af1811d55a770e36b.js +0 -1
  32. package/dist/chunk/1803-fe8af1811d55a770e36b.js +0 -1
  33. package/dist/chunk/1839-fe8af1811d55a770e36b.js +0 -1
  34. package/dist/chunk/1857-fe8af1811d55a770e36b.js +0 -1
  35. package/dist/chunk/1931-fe8af1811d55a770e36b.js +0 -1
  36. package/dist/chunk/2062-fe8af1811d55a770e36b.js +0 -1
  37. package/dist/chunk/2068-fe8af1811d55a770e36b.js +0 -1
  38. package/dist/chunk/2071-fe8af1811d55a770e36b.js +0 -1
  39. package/dist/chunk/2108-fe8af1811d55a770e36b.js +0 -1
  40. package/dist/chunk/212-fe8af1811d55a770e36b.js +0 -1
  41. package/dist/chunk/2142-fe8af1811d55a770e36b.js +0 -1
  42. package/dist/chunk/2173-fe8af1811d55a770e36b.js +0 -1
  43. package/dist/chunk/2184-fe8af1811d55a770e36b.js +0 -1
  44. package/dist/chunk/2215-fe8af1811d55a770e36b.js +0 -1
  45. package/dist/chunk/224-fe8af1811d55a770e36b.js +0 -1
  46. package/dist/chunk/2266-fe8af1811d55a770e36b.js +0 -1
  47. package/dist/chunk/2354-fe8af1811d55a770e36b.js +0 -1
  48. package/dist/chunk/2419-fe8af1811d55a770e36b.js +0 -1
  49. package/dist/chunk/245-fe8af1811d55a770e36b.js +0 -1
  50. package/dist/chunk/2473-fe8af1811d55a770e36b.js +0 -1
  51. package/dist/chunk/2492-fe8af1811d55a770e36b.js +0 -1
  52. package/dist/chunk/2505-fe8af1811d55a770e36b.js +0 -1
  53. package/dist/chunk/2535-fe8af1811d55a770e36b.js +0 -1
  54. package/dist/chunk/2660-fe8af1811d55a770e36b.js +0 -1
  55. package/dist/chunk/2691-fe8af1811d55a770e36b.js +0 -1
  56. package/dist/chunk/2723-fe8af1811d55a770e36b.js +0 -1
  57. package/dist/chunk/284-fe8af1811d55a770e36b.js +0 -1
  58. package/dist/chunk/2860-fe8af1811d55a770e36b.js +0 -1
  59. package/dist/chunk/2861-fe8af1811d55a770e36b.js +0 -1
  60. package/dist/chunk/2934-fe8af1811d55a770e36b.js +0 -1
  61. package/dist/chunk/3032-fe8af1811d55a770e36b.js +0 -1
  62. package/dist/chunk/3043-fe8af1811d55a770e36b.js +0 -1
  63. package/dist/chunk/3052-fe8af1811d55a770e36b.js +0 -1
  64. package/dist/chunk/3124-fe8af1811d55a770e36b.js +0 -1
  65. package/dist/chunk/3170-fe8af1811d55a770e36b.js +0 -1
  66. package/dist/chunk/321-fe8af1811d55a770e36b.js +0 -1
  67. package/dist/chunk/3227-fe8af1811d55a770e36b.js +0 -1
  68. package/dist/chunk/3247-fe8af1811d55a770e36b.js +0 -1
  69. package/dist/chunk/327-fe8af1811d55a770e36b.js +0 -1
  70. package/dist/chunk/3279-fe8af1811d55a770e36b.js +0 -1
  71. package/dist/chunk/3330-fe8af1811d55a770e36b.js +0 -1
  72. package/dist/chunk/3403-fe8af1811d55a770e36b.js +0 -1
  73. package/dist/chunk/3454-fe8af1811d55a770e36b.js +0 -1
  74. package/dist/chunk/3492-fe8af1811d55a770e36b.js +0 -1
  75. package/dist/chunk/3516-fe8af1811d55a770e36b.js +0 -1
  76. package/dist/chunk/3593-fe8af1811d55a770e36b.js +0 -1
  77. package/dist/chunk/3646-fe8af1811d55a770e36b.js +0 -1
  78. package/dist/chunk/3702-fe8af1811d55a770e36b.js +0 -1
  79. package/dist/chunk/3720-fe8af1811d55a770e36b.js +0 -1
  80. package/dist/chunk/3837-fe8af1811d55a770e36b.js +0 -1
  81. package/dist/chunk/3874-fe8af1811d55a770e36b.js +0 -1
  82. package/dist/chunk/3894-fe8af1811d55a770e36b.js +0 -1
  83. package/dist/chunk/3906-fe8af1811d55a770e36b.js +0 -1
  84. package/dist/chunk/3941-fe8af1811d55a770e36b.js +0 -1
  85. package/dist/chunk/3947-fe8af1811d55a770e36b.js +0 -1
  86. package/dist/chunk/3949-fe8af1811d55a770e36b.js +0 -1
  87. package/dist/chunk/396-fe8af1811d55a770e36b.js +0 -1
  88. package/dist/chunk/3972-fe8af1811d55a770e36b.js +0 -1
  89. package/dist/chunk/4007-fe8af1811d55a770e36b.js +0 -1
  90. package/dist/chunk/4009-fe8af1811d55a770e36b.js +0 -1
  91. package/dist/chunk/402-fe8af1811d55a770e36b.js +0 -1
  92. package/dist/chunk/4081-fe8af1811d55a770e36b.js +0 -1
  93. package/dist/chunk/41-fe8af1811d55a770e36b.js +0 -1
  94. package/dist/chunk/4108-fe8af1811d55a770e36b.js +0 -1
  95. package/dist/chunk/4112-fe8af1811d55a770e36b.js +0 -1
  96. package/dist/chunk/415-fe8af1811d55a770e36b.js +0 -1
  97. package/dist/chunk/4199-fe8af1811d55a770e36b.js +0 -1
  98. package/dist/chunk/4214-fe8af1811d55a770e36b.js +0 -1
  99. package/dist/chunk/4236-fe8af1811d55a770e36b.js +0 -1
  100. package/dist/chunk/4283-fe8af1811d55a770e36b.js +0 -1
  101. package/dist/chunk/4292-fe8af1811d55a770e36b.js +0 -1
  102. package/dist/chunk/4311-fe8af1811d55a770e36b.js +0 -1
  103. package/dist/chunk/4354-fe8af1811d55a770e36b.js +0 -1
  104. package/dist/chunk/4385-fe8af1811d55a770e36b.js +0 -1
  105. package/dist/chunk/4408-fe8af1811d55a770e36b.js +0 -1
  106. package/dist/chunk/4445-fe8af1811d55a770e36b.js +0 -1
  107. package/dist/chunk/4451-fe8af1811d55a770e36b.js +0 -1
  108. package/dist/chunk/4452-fe8af1811d55a770e36b.js +0 -1
  109. package/dist/chunk/4465-fe8af1811d55a770e36b.js +0 -1
  110. package/dist/chunk/4520-fe8af1811d55a770e36b.js +0 -1
  111. package/dist/chunk/454-fe8af1811d55a770e36b.js +0 -1
  112. package/dist/chunk/4546-fe8af1811d55a770e36b.js +0 -1
  113. package/dist/chunk/4552-fe8af1811d55a770e36b.js +0 -1
  114. package/dist/chunk/4598-fe8af1811d55a770e36b.js +0 -1
  115. package/dist/chunk/4614-fe8af1811d55a770e36b.js +0 -1
  116. package/dist/chunk/4660-fe8af1811d55a770e36b.js +0 -1
  117. package/dist/chunk/4697-fe8af1811d55a770e36b.js +0 -1
  118. package/dist/chunk/4709-fe8af1811d55a770e36b.js +0 -1
  119. package/dist/chunk/4714-fe8af1811d55a770e36b.js +0 -1
  120. package/dist/chunk/4780-fe8af1811d55a770e36b.js +0 -1
  121. package/dist/chunk/4838-fe8af1811d55a770e36b.js +0 -1
  122. package/dist/chunk/4843-fe8af1811d55a770e36b.js +0 -1
  123. package/dist/chunk/4862-fe8af1811d55a770e36b.js +0 -1
  124. package/dist/chunk/4877-fe8af1811d55a770e36b.js +0 -1
  125. package/dist/chunk/4886-fe8af1811d55a770e36b.js +0 -1
  126. package/dist/chunk/489-fe8af1811d55a770e36b.js +0 -1
  127. package/dist/chunk/4914-fe8af1811d55a770e36b.js +0 -1
  128. package/dist/chunk/4940-fe8af1811d55a770e36b.js +0 -1
  129. package/dist/chunk/4962-fe8af1811d55a770e36b.js +0 -1
  130. package/dist/chunk/5026-fe8af1811d55a770e36b.js +0 -1
  131. package/dist/chunk/5034-fe8af1811d55a770e36b.js +0 -1
  132. package/dist/chunk/5050-fe8af1811d55a770e36b.js +0 -1
  133. package/dist/chunk/5099-fe8af1811d55a770e36b.js +0 -1
  134. package/dist/chunk/5119-fe8af1811d55a770e36b.js +0 -1
  135. package/dist/chunk/5141-fe8af1811d55a770e36b.js +0 -1
  136. package/dist/chunk/5143-fe8af1811d55a770e36b.js +0 -1
  137. package/dist/chunk/5177-fe8af1811d55a770e36b.js +0 -1
  138. package/dist/chunk/5203-fe8af1811d55a770e36b.js +0 -1
  139. package/dist/chunk/5283-fe8af1811d55a770e36b.js +0 -1
  140. package/dist/chunk/5314-fe8af1811d55a770e36b.js +0 -1
  141. package/dist/chunk/535-fe8af1811d55a770e36b.js +0 -1
  142. package/dist/chunk/5363-fe8af1811d55a770e36b.js +0 -1
  143. package/dist/chunk/542-fe8af1811d55a770e36b.js +0 -1
  144. package/dist/chunk/5424-fe8af1811d55a770e36b.js +0 -1
  145. package/dist/chunk/5443-fe8af1811d55a770e36b.js +0 -1
  146. package/dist/chunk/5521-fe8af1811d55a770e36b.js +0 -1
  147. package/dist/chunk/5536-fe8af1811d55a770e36b.js +0 -1
  148. package/dist/chunk/5542-fe8af1811d55a770e36b.js +0 -1
  149. package/dist/chunk/5585-fe8af1811d55a770e36b.js +0 -1
  150. package/dist/chunk/5589-fe8af1811d55a770e36b.js +0 -1
  151. package/dist/chunk/5601-fe8af1811d55a770e36b.js +0 -1
  152. package/dist/chunk/5611-fe8af1811d55a770e36b.js +0 -1
  153. package/dist/chunk/5628-fe8af1811d55a770e36b.js +0 -1
  154. package/dist/chunk/5638-fe8af1811d55a770e36b.js +0 -1
  155. package/dist/chunk/5647-fe8af1811d55a770e36b.js +0 -1
  156. package/dist/chunk/5709-fe8af1811d55a770e36b.js +0 -1
  157. package/dist/chunk/5728-fe8af1811d55a770e36b.js +0 -1
  158. package/dist/chunk/5731-fe8af1811d55a770e36b.js +0 -1
  159. package/dist/chunk/5744-fe8af1811d55a770e36b.js +0 -1
  160. package/dist/chunk/5814-fe8af1811d55a770e36b.js +0 -1
  161. package/dist/chunk/5827-fe8af1811d55a770e36b.js +0 -1
  162. package/dist/chunk/5884-fe8af1811d55a770e36b.js +0 -1
  163. package/dist/chunk/5891-fe8af1811d55a770e36b.js +0 -1
  164. package/dist/chunk/5936-fe8af1811d55a770e36b.js +0 -1
  165. package/dist/chunk/5954-fe8af1811d55a770e36b.js +0 -1
  166. package/dist/chunk/6010-fe8af1811d55a770e36b.js +0 -1
  167. package/dist/chunk/6045-fe8af1811d55a770e36b.js +0 -1
  168. package/dist/chunk/6083-fe8af1811d55a770e36b.js +0 -1
  169. package/dist/chunk/6124-fe8af1811d55a770e36b.js +0 -1
  170. package/dist/chunk/6173-fe8af1811d55a770e36b.js +0 -1
  171. package/dist/chunk/6239-fe8af1811d55a770e36b.js +0 -1
  172. package/dist/chunk/6262-fe8af1811d55a770e36b.js +0 -1
  173. package/dist/chunk/6283-fe8af1811d55a770e36b.js +0 -1
  174. package/dist/chunk/6297-fe8af1811d55a770e36b.js +0 -1
  175. package/dist/chunk/6324-fe8af1811d55a770e36b.js +0 -1
  176. package/dist/chunk/6343-fe8af1811d55a770e36b.js +0 -1
  177. package/dist/chunk/6356-fe8af1811d55a770e36b.js +0 -1
  178. package/dist/chunk/638-fe8af1811d55a770e36b.js +0 -1
  179. package/dist/chunk/6405-fe8af1811d55a770e36b.js +0 -1
  180. package/dist/chunk/6514-fe8af1811d55a770e36b.js +0 -1
  181. package/dist/chunk/6517-fe8af1811d55a770e36b.js +0 -1
  182. package/dist/chunk/6563-fe8af1811d55a770e36b.js +0 -1
  183. package/dist/chunk/6577-fe8af1811d55a770e36b.js +0 -1
  184. package/dist/chunk/6677-fe8af1811d55a770e36b.js +0 -1
  185. package/dist/chunk/6736-fe8af1811d55a770e36b.js +0 -1
  186. package/dist/chunk/6757-fe8af1811d55a770e36b.js +0 -1
  187. package/dist/chunk/6865-fe8af1811d55a770e36b.js +0 -1
  188. package/dist/chunk/6940-fe8af1811d55a770e36b.js +0 -1
  189. package/dist/chunk/6957-fe8af1811d55a770e36b.js +0 -1
  190. package/dist/chunk/6964-fe8af1811d55a770e36b.js +0 -1
  191. package/dist/chunk/6967-fe8af1811d55a770e36b.js +0 -1
  192. package/dist/chunk/697-fe8af1811d55a770e36b.js +0 -1
  193. package/dist/chunk/6980-fe8af1811d55a770e36b.js +0 -1
  194. package/dist/chunk/7095-fe8af1811d55a770e36b.js +0 -1
  195. package/dist/chunk/7141-fe8af1811d55a770e36b.js +0 -1
  196. package/dist/chunk/7145-fe8af1811d55a770e36b.js +0 -1
  197. package/dist/chunk/7148-fe8af1811d55a770e36b.js +0 -1
  198. package/dist/chunk/7217-fe8af1811d55a770e36b.js +0 -1
  199. package/dist/chunk/7258-fe8af1811d55a770e36b.js +0 -1
  200. package/dist/chunk/7328-fe8af1811d55a770e36b.js +0 -1
  201. package/dist/chunk/7374-fe8af1811d55a770e36b.js +0 -1
  202. package/dist/chunk/7434-fe8af1811d55a770e36b.js +0 -1
  203. package/dist/chunk/7470-fe8af1811d55a770e36b.js +0 -1
  204. package/dist/chunk/7504-fe8af1811d55a770e36b.js +0 -1
  205. package/dist/chunk/753-fe8af1811d55a770e36b.js +0 -1
  206. package/dist/chunk/7549-fe8af1811d55a770e36b.js +0 -1
  207. package/dist/chunk/7561-fe8af1811d55a770e36b.js +0 -1
  208. package/dist/chunk/7567-fe8af1811d55a770e36b.js +0 -1
  209. package/dist/chunk/7611-fe8af1811d55a770e36b.js +0 -1
  210. package/dist/chunk/7615-fe8af1811d55a770e36b.js +0 -1
  211. package/dist/chunk/7625-fe8af1811d55a770e36b.js +0 -1
  212. package/dist/chunk/7642-fe8af1811d55a770e36b.js +0 -1
  213. package/dist/chunk/7670-fe8af1811d55a770e36b.js +0 -1
  214. package/dist/chunk/7681-fe8af1811d55a770e36b.js +0 -1
  215. package/dist/chunk/7688-fe8af1811d55a770e36b.js +0 -1
  216. package/dist/chunk/7765-fe8af1811d55a770e36b.js +0 -1
  217. package/dist/chunk/7768-fe8af1811d55a770e36b.js +0 -1
  218. package/dist/chunk/7788-fe8af1811d55a770e36b.js +0 -1
  219. package/dist/chunk/7789-fe8af1811d55a770e36b.js +0 -1
  220. package/dist/chunk/780-fe8af1811d55a770e36b.js +0 -1
  221. package/dist/chunk/7817-fe8af1811d55a770e36b.js +0 -1
  222. package/dist/chunk/7824-fe8af1811d55a770e36b.js +0 -1
  223. package/dist/chunk/7831-fe8af1811d55a770e36b.js +0 -1
  224. package/dist/chunk/7900-fe8af1811d55a770e36b.js +0 -1
  225. package/dist/chunk/7922-fe8af1811d55a770e36b.js +0 -1
  226. package/dist/chunk/7927-fe8af1811d55a770e36b.js +0 -1
  227. package/dist/chunk/794-fe8af1811d55a770e36b.js +0 -1
  228. package/dist/chunk/7966-fe8af1811d55a770e36b.js +0 -1
  229. package/dist/chunk/8003-fe8af1811d55a770e36b.js +0 -1
  230. package/dist/chunk/8093-fe8af1811d55a770e36b.js +0 -1
  231. package/dist/chunk/8107-fe8af1811d55a770e36b.js +0 -1
  232. package/dist/chunk/8201-fe8af1811d55a770e36b.js +0 -1
  233. package/dist/chunk/8212-fe8af1811d55a770e36b.js +0 -1
  234. package/dist/chunk/8234-fe8af1811d55a770e36b.js +0 -1
  235. package/dist/chunk/8235-fe8af1811d55a770e36b.js +0 -1
  236. package/dist/chunk/8237-fe8af1811d55a770e36b.js +0 -1
  237. package/dist/chunk/8249-fe8af1811d55a770e36b.js +0 -1
  238. package/dist/chunk/8320-fe8af1811d55a770e36b.js +0 -1
  239. package/dist/chunk/8389-fe8af1811d55a770e36b.js +0 -1
  240. package/dist/chunk/8393-fe8af1811d55a770e36b.js +0 -1
  241. package/dist/chunk/8418-fe8af1811d55a770e36b.js +0 -1
  242. package/dist/chunk/8426-fe8af1811d55a770e36b.js +0 -1
  243. package/dist/chunk/8436-fe8af1811d55a770e36b.js +0 -1
  244. package/dist/chunk/845-fe8af1811d55a770e36b.js +0 -1
  245. package/dist/chunk/8485-fe8af1811d55a770e36b.js +0 -1
  246. package/dist/chunk/8499-fe8af1811d55a770e36b.js +0 -1
  247. package/dist/chunk/8553-fe8af1811d55a770e36b.js +0 -1
  248. package/dist/chunk/8617-fe8af1811d55a770e36b.js +0 -1
  249. package/dist/chunk/8684-fe8af1811d55a770e36b.js +0 -1
  250. package/dist/chunk/8700-fe8af1811d55a770e36b.js +0 -1
  251. package/dist/chunk/8709-fe8af1811d55a770e36b.js +0 -1
  252. package/dist/chunk/8711-fe8af1811d55a770e36b.js +0 -1
  253. package/dist/chunk/874-fe8af1811d55a770e36b.js +0 -1
  254. package/dist/chunk/8753-fe8af1811d55a770e36b.js +0 -1
  255. package/dist/chunk/8849-fe8af1811d55a770e36b.js +0 -1
  256. package/dist/chunk/8931-fe8af1811d55a770e36b.js +0 -1
  257. package/dist/chunk/9017-fe8af1811d55a770e36b.js +0 -1
  258. package/dist/chunk/9045-fe8af1811d55a770e36b.js +0 -1
  259. package/dist/chunk/9057-fe8af1811d55a770e36b.js +0 -1
  260. package/dist/chunk/9077-fe8af1811d55a770e36b.js +0 -1
  261. package/dist/chunk/9079-fe8af1811d55a770e36b.js +0 -1
  262. package/dist/chunk/9096-fe8af1811d55a770e36b.js +0 -1
  263. package/dist/chunk/9104-fe8af1811d55a770e36b.js +0 -1
  264. package/dist/chunk/914-fe8af1811d55a770e36b.js +0 -1
  265. package/dist/chunk/9175-fe8af1811d55a770e36b.js +0 -1
  266. package/dist/chunk/9179-fe8af1811d55a770e36b.js +0 -1
  267. package/dist/chunk/9198-fe8af1811d55a770e36b.js +0 -1
  268. package/dist/chunk/9206-fe8af1811d55a770e36b.js +0 -1
  269. package/dist/chunk/9225-fe8af1811d55a770e36b.js +0 -1
  270. package/dist/chunk/9270-fe8af1811d55a770e36b.js +0 -1
  271. package/dist/chunk/9281-fe8af1811d55a770e36b.js +0 -1
  272. package/dist/chunk/9294-fe8af1811d55a770e36b.js +0 -1
  273. package/dist/chunk/9478-fe8af1811d55a770e36b.js +0 -1
  274. package/dist/chunk/9524-fe8af1811d55a770e36b.js +0 -1
  275. package/dist/chunk/9526-fe8af1811d55a770e36b.js +0 -1
  276. package/dist/chunk/9556-fe8af1811d55a770e36b.js +0 -1
  277. package/dist/chunk/9641-fe8af1811d55a770e36b.js +0 -1
  278. package/dist/chunk/9661-fe8af1811d55a770e36b.js +0 -1
  279. package/dist/chunk/9681-fe8af1811d55a770e36b.js +0 -1
  280. package/dist/chunk/9689-fe8af1811d55a770e36b.js +0 -1
  281. package/dist/chunk/9692-fe8af1811d55a770e36b.js +0 -1
  282. package/dist/chunk/9728-fe8af1811d55a770e36b.js +0 -1
  283. package/dist/chunk/9730-fe8af1811d55a770e36b.js +0 -1
  284. package/dist/chunk/9780-fe8af1811d55a770e36b.js +0 -1
  285. package/dist/chunk/9788-fe8af1811d55a770e36b.js +0 -1
  286. package/dist/chunk/9806-fe8af1811d55a770e36b.js +0 -1
  287. package/dist/chunk/9809-fe8af1811d55a770e36b.js +0 -1
  288. package/dist/chunk/9819-fe8af1811d55a770e36b.js +0 -1
  289. package/dist/chunk/9831-fe8af1811d55a770e36b.js +0 -1
  290. package/dist/chunk/9845-fe8af1811d55a770e36b.js +0 -1
  291. package/dist/chunk/9876-fe8af1811d55a770e36b.js +0 -1
  292. package/dist/chunk/9904-fe8af1811d55a770e36b.js +0 -1
  293. package/dist/chunk/9910-fe8af1811d55a770e36b.js +0 -1
  294. package/dist/chunk/9965-fe8af1811d55a770e36b.js +0 -1
  295. package/dist/chunk/9976-fe8af1811d55a770e36b.js +0 -1
  296. package/dist/chunk/9982-fe8af1811d55a770e36b.js +0 -1
  297. package/dist/chunk/9983-fe8af1811d55a770e36b.js +0 -1
  298. package/dist/chunk/9984-fe8af1811d55a770e36b.js +0 -1
  299. package/dist/d6484fce1ef428d5bd94.woff2 +0 -0
  300. package/dist/dcbcbd93bac0470b462d.woff2 +0 -0
  301. package/dist/e1951519f6f0596f7356.woff2 +0 -0
  302. package/dist/e3b32fd51b23a8b71300.woff2 +0 -0
  303. package/dist/e418bf257af1052628d8.woff2 +0 -0
  304. package/dist/f650f111a3b890d116f1.woff2 +0 -0
  305. package/dist/fe2176f79edaa716e621.woff2 +0 -0
  306. package/dist/fonts/KaTeX_AMS-Regular-853be92419a6c3766b9a.ttf +0 -0
  307. package/dist/fonts/KaTeX_AMS-Regular-d562e886c52f12660a41.woff +0 -0
  308. package/dist/fonts/KaTeX_Caligraphic-Bold-7489a2fbfb9bfe704420.ttf +0 -0
  309. package/dist/fonts/KaTeX_Caligraphic-Bold-d757c535a2e5902f1325.woff +0 -0
  310. package/dist/fonts/KaTeX_Caligraphic-Regular-7e873d3833eb108a0758.ttf +0 -0
  311. package/dist/fonts/KaTeX_Caligraphic-Regular-db074fa22cf224af93d7.woff +0 -0
  312. package/dist/fonts/KaTeX_Fraktur-Bold-354501bac435c3264834.woff +0 -0
  313. package/dist/fonts/KaTeX_Fraktur-Bold-4c761b3711973ab04edf.ttf +0 -0
  314. package/dist/fonts/KaTeX_Fraktur-Regular-6fdf0ac577be0ba82a4c.woff +0 -0
  315. package/dist/fonts/KaTeX_Fraktur-Regular-ed305b5434865e06ffde.ttf +0 -0
  316. package/dist/fonts/KaTeX_Main-Bold-0c3b8929d377c0e9b2f3.woff +0 -0
  317. package/dist/fonts/KaTeX_Main-Bold-8169508bf58f8bd92ad8.ttf +0 -0
  318. package/dist/fonts/KaTeX_Main-BoldItalic-428978dc7837d46de091.woff +0 -0
  319. package/dist/fonts/KaTeX_Main-BoldItalic-828abcb200061cffbaae.ttf +0 -0
  320. package/dist/fonts/KaTeX_Main-Italic-fa675e5e4bec9eb250b6.ttf +0 -0
  321. package/dist/fonts/KaTeX_Main-Italic-fd947498bc16392e76c2.woff +0 -0
  322. package/dist/fonts/KaTeX_Main-Regular-4f35fbcc9ee8614c2bcc.woff +0 -0
  323. package/dist/fonts/KaTeX_Main-Regular-9eba1d77abcf2aa6e94e.ttf +0 -0
  324. package/dist/fonts/KaTeX_Math-BoldItalic-3f07ed67f06c720120ce.woff +0 -0
  325. package/dist/fonts/KaTeX_Math-BoldItalic-bf2d440b3a42ea78a998.ttf +0 -0
  326. package/dist/fonts/KaTeX_Math-Italic-8a5f936332e8028c7278.ttf +0 -0
  327. package/dist/fonts/KaTeX_Math-Italic-96759856b4e70f3a8338.woff +0 -0
  328. package/dist/fonts/KaTeX_SansSerif-Bold-5b49f4993ae22d7975b4.ttf +0 -0
  329. package/dist/fonts/KaTeX_SansSerif-Bold-b9cd458ac6d5889ff9c3.woff +0 -0
  330. package/dist/fonts/KaTeX_SansSerif-Italic-8d593cfaa96238d5e2f8.woff +0 -0
  331. package/dist/fonts/KaTeX_SansSerif-Italic-b257a18c016f37ee4543.ttf +0 -0
  332. package/dist/fonts/KaTeX_SansSerif-Regular-02271ec5cb9f5b4588ac.woff +0 -0
  333. package/dist/fonts/KaTeX_SansSerif-Regular-2f7bc363fc5424ebda59.ttf +0 -0
  334. package/dist/fonts/KaTeX_Script-Regular-073b3402d036714b4370.woff +0 -0
  335. package/dist/fonts/KaTeX_Script-Regular-fc9ba5249878cd8f8d88.ttf +0 -0
  336. package/dist/fonts/KaTeX_Size1-Regular-0108e89c9003e8c14ea3.woff +0 -0
  337. package/dist/fonts/KaTeX_Size1-Regular-6de7d4b539221a49e9e2.ttf +0 -0
  338. package/dist/fonts/KaTeX_Size2-Regular-3a99e70aee4076660d38.woff +0 -0
  339. package/dist/fonts/KaTeX_Size2-Regular-57f5c1837853986ea1db.ttf +0 -0
  340. package/dist/fonts/KaTeX_Size3-Regular-7947224e8a9914fa332b.woff +0 -0
  341. package/dist/fonts/KaTeX_Size3-Regular-8d6b6822586eea3d3b20.ttf +0 -0
  342. package/dist/fonts/KaTeX_Size4-Regular-4ad7c7e8bb8d10a34bb7.ttf +0 -0
  343. package/dist/fonts/KaTeX_Size4-Regular-aeffd8025cba3647f1a6.woff +0 -0
  344. package/dist/fonts/KaTeX_Typewriter-Regular-4c6b94fd1d07f8beff7c.woff +0 -0
  345. package/dist/fonts/KaTeX_Typewriter-Regular-c5c02d763c89380dcb4e.ttf +0 -0
  346. package/dist/fonts/iconfont-1f240a2f8a7ed2ba2d54.ttf +0 -0
  347. package/dist/fonts/iconfont-c0dd0830d105050efeab.woff +0 -0
  348. package/dist/index.css +0 -2839
  349. package/dist/index.d.ts +0 -4918
  350. package/dist/index.js +0 -2
  351. package/dist/index.js.LICENSE.txt +0 -11
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.deepsky=t():e.deepsky=t()}(globalThis,()=>(()=>{var e,t,n={1869:e=>{var t;self,t=()=>(()=>{"use strict";var e,t,n,r,o={d:(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},i={};o.r(i),o.d(i,{DateTime:()=>m,DomAnimation:()=>c,DragDiff:()=>u,DragList:()=>p,IMath:()=>e,Iteration:()=>a,List:()=>l,MathBase:()=>_,MathLine:()=>v,MathPoint:()=>b,MathPolygon:()=>x,MathRect:()=>g,Notice:()=>s}),function(e){var t;(t=e.RectPosition||(e.RectPosition={})).left_mid="left-mid",t.left_top="left-top",t.left_bottom="left-bottom",t.top_mid="top-mid",t.bottom_mid="bottom-mid",t.right_top="right-top",t.right_mid="right-mid",t.right_bottom="right_bottom",t.center="center"}(e||(e={}));class s{static rope(e,t){return(...n)=>{let r=Symbol();return this.scope[e]=r,t(()=>r===this.scope[e],...n)}}static throttle(e,t=100){let n;return function(...r){return new Promise(o=>{if(n)return o(!1);n=setTimeout(()=>{e(...r),n=void 0,o(!0)},t)})}}static debounce(e,t=100){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}}r={},(n="scope")in(t=s)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;class a{static*zip(...e){const t=Math.min(...e.map(e=>e.length));for(let n=0;n<t;n++)yield e.map(e=>e[n])}}class l{static swap(e,t,n){const r=e[t],o=e[n];e[t]=o,e[n]=r}}class c{static scroll_element(e,t,n="vertical"){let r=t;const o=()=>{if(Math.abs(r)>2){let t=r/10;r-=t,"vertical"===n?e.scrollTop+=t:e.scrollLeft+=t,requestAnimationFrame(o)}"vertical"===n?e.scrollTop+=r:e.scrollLeft+=r};o()}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class u{get el(){return this._el}init(){this._handler_down=e=>this._pointdown(e),this._handler_move=e=>this._pointmove(e),this._handler_up=e=>this._pointup(e),this._handler_cancel=e=>this._pointercancel(e),this.el.addEventListener("pointerdown",this._handler_down),document.documentElement.addEventListener("pointermove",this._handler_move),document.documentElement.addEventListener("pointerup",this._handler_up),document.documentElement.addEventListener("pointercancel",this._handler_cancel)}_pointdown(e){e.stopPropagation(),e.preventDefault();const t=e.target;this.el.contains(t)&&(this._is_down=!0,this._down_point={x:e.clientX,y:e.clientY},this._func_down&&this._func_down())}_pointmove(e){if(!this._is_down||!this._down_point||e.buttons<=0)return;e.stopPropagation(),e.preventDefault(),this._is_move=!0;const t=e.clientX-this._down_point.x,n=e.clientY-this._down_point.y;this._func_move&&this._func_move(t,n)}_pointup(e){if(e.preventDefault(),e.stopPropagation(),!this._is_down||!this._is_move)return;if(this._is_down=!1,this._is_move=!1,!this._down_point)return;const t=e.clientX-this._down_point.x,n=e.clientY-this._down_point.y;this._down_point=void 0,this._func_up&&this._func_up(t,n)}_pointercancel(e){this._is_down&&this._is_move&&(this._is_down=!1,this._is_move=!1,this._down_point=void 0,this._func_cancel&&this._func_cancel())}off(){this.el.removeEventListener("pointerdown",this._handler_down),document.documentElement.removeEventListener("pointermove",this._handler_move),document.documentElement.removeEventListener("pointerup",this._handler_up),document.documentElement.removeEventListener("pointercancel",this._handler_cancel)}register_down(e){this._func_down=e}register_move(e){this._func_move=e}register_up(e){this._func_up=e}register_cancel(e){this._func_cancel=e}constructor(e){d(this,"_el",void 0),d(this,"_handler_down",void 0),d(this,"_handler_move",void 0),d(this,"_handler_up",void 0),d(this,"_handler_cancel",void 0),d(this,"_func_down",void 0),d(this,"_func_move",void 0),d(this,"_func_up",void 0),d(this,"_func_cancel",void 0),d(this,"_is_down",!1),d(this,"_is_move",!1),d(this,"_down_point",void 0),this._el=e,this.init()}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p{init(){const e=this.order,t=new Set;this.order=[];for(let e=0;e<this.container.children.length;e++){const n=this.container.children[e],r=n.getAttribute(this.attr);r&&n instanceof HTMLElement&&(n.setAttribute("draggable","true"),n.style.position="absolute","horizental"===this.dir?n.style.left="0px":n.style.top="0px",this.order_origin.push(r),t.add(r),this.map.has(r)||this.register(n),this.map.set(r,n))}const n=this.init_container();this.container.addEventListener("dragenter",e=>{e.preventDefault()}),this.container.addEventListener("dragover",e=>{e.preventDefault()});for(let n of e)t.has(n)?(this.order.push(n),t.delete(n)):this.map.delete(n);for(let e of t)this.order.push(e);return this.sort(),n}sort(){for(let e=0;e<this.order.length;e++){const t=this.order[e],n=this.map.get(t);if(!n)continue;const r=this.sum_translate(this.order.slice(0,e));"horizental"===this.dir?n.style.transform=`translateX(${r}px)`:n.style.transform=`translateY(${r}px)`}for(let e of this.callback)e([...this.order])}init_container(){let e=0;for(const[t,n]of this.map)"horizental"===this.dir?e+=n.getBoundingClientRect().width/this.scale_h:e+=n.getBoundingClientRect().height/this.scale_v;return"horizental"===this.dir?this.container.style.width=e+"px":this.container.style.height=e+"px",e}sum_translate(e){let t=0;for(let n of e){const e=this.map.get(n);e&&("horizental"===this.dir?t+=e.getBoundingClientRect().width/this.scale_h:t+=e.getBoundingClientRect().height/this.scale_v)}return t}register(e){this._func_start=this.on_dragstart.bind(this),this._func_over=this.on_dragover.bind(this),this._func_enter=this.on_dragenter.bind(this),this._func_end=this.on_dragend.bind(this),e.addEventListener("dragstart",this._func_start,{capture:!0}),e.addEventListener("dragover",this._func_over,{capture:!0}),e.addEventListener("dragenter",this._func_enter,{capture:!0}),e.addEventListener("dragend",this._func_end,{capture:!0}),this.realtime||e.addEventListener("drop",this.on_drop.bind(this),{capture:!0})}on_dragstart(e){e.stopPropagation();const t=e.currentTarget;if(t instanceof HTMLElement&&(this.drag_id=t.getAttribute(this.attr),this.drag_id))for(let t of this.callback_start)t(e,this.drag_id);this.container.style.setProperty(this.css_var_point_events,"none")}on_dragenter(e){if(e.stopPropagation(),e.preventDefault(),!this.realtime)return;const t=e.currentTarget;if(e.target!==t)return;if(!(t instanceof HTMLElement))return;const n=t.getAttribute(this.attr),r=this.drag_id;if(!n||!r||n===r)return;const o=this.order.indexOf(n),i=this.order.indexOf(r);o<0||i<0||("swap"===this.effect?l.swap(this.order,o,i):(this.order.splice(i,1),this.order.splice(o,0,r)),this.init_container(),this.sort())}on_dragover(e){e.preventDefault(),e.stopPropagation()}on_drop(e){e.stopPropagation();const t=e.target;if(!(t instanceof HTMLElement))return;const n=t.getAttribute(this.attr),r=this.drag_id;if(!n||!r||n===r)return;const o=this.order.indexOf(n),i=this.order.indexOf(r);o<0||i<0||("swap"===this.effect?l.swap(this.order,o,i):(this.order.splice(i,1),this.order.splice(o,0,r)),this.sort())}on_dragend(e){this.container.style.setProperty(this.css_var_point_events,"auto");for(let t of this.callback_end)t(e)}register_start(e){this.callback_start.add(e)}register_dropend(e){this.callback_end.add(e)}register_callback(e){this.callback.add(e)}off_callback(e){this.callback.delete(e)}off_callback_start(e){this.callback_start.delete(e)}off_callback_drop(e){this.callback_end.delete(e)}constructor(e,t,n,r,o=!0){h(this,"container",void 0),h(this,"drag_id",void 0),h(this,"dir","vertical"),h(this,"effect",void 0),h(this,"attr",void 0),h(this,"realtime",!0),h(this,"order_origin",[]),h(this,"order",[]),h(this,"css_var_point_events","--drag-item-point-event"),h(this,"map",new Map),h(this,"callback",new Set),h(this,"callback_start",new Set),h(this,"callback_end",new Set),h(this,"scale_h",1),h(this,"scale_v",1),h(this,"_func_start",void 0),h(this,"_func_over",void 0),h(this,"_func_enter",void 0),h(this,"_func_end",void 0),h(this,"_callback_start",void 0),this.container=e,this.dir=t,this.attr=n,this.realtime=o,this.effect=r,e.style.position="relative"}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m{static get_month_name(e){let t;return t=e||new Date,this.month_names[t.getMonth()]}static get_week_name(e){let t;return t=e||new Date,this.weeks_names[t.getDay()]}static get_date_string(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}static get_week_string(e){let t;t=e||new Date;const n=t.getDate(),r=t.getDay(),o=new Date(t.getFullYear(),t.getMonth(),n-r),i=new Date(t.getFullYear(),t.getMonth(),n+(6-r));return`${this.get_date_string(o)}:${this.get_date_string(i)}`}static get_week_days(e){const t=[];let n;n=e||new Date;const r=n.getFullYear(),o=n.getMonth(),i=n.getDate(),s=n.getDay(),a=new Date(r,o,i-s),l=a.getFullYear(),c=a.getMonth(),d=a.getDate();t.push(a);for(let e=1;e<=6;e++)t.push(new Date(l,c,d+e));return t}}f(m,"month_names",["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),f(m,"weeks_names",["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);class _{static sum(e){let t=0;for(let n of e)t+=n;return t}}class g{static get_rect_point(t,n){const{x:r,y:o,width:i,height:s}=t,a=o+s,l=r+i,c=r+i/2,d=o+s/2;if(n===e.RectPosition.left_bottom)return{x:r,y:a};if(n===e.RectPosition.left_top)return{x:r,y:o};if(n===e.RectPosition.left_mid)return{x:r,y:d};if(n===e.RectPosition.right_top)return{x:l,y:o};if(n===e.RectPosition.right_mid)return{x:l,y:d};if(n===e.RectPosition.right_bottom)return{x:l,y:a};if(n===e.RectPosition.bottom_mid)return{x:c,y:a};if(n===e.RectPosition.top_mid)return{x:c,y:o};if(n===e.RectPosition.center)return{x:c,y:d};throw Error("MathRect: the position keyword is invalid")}static is_point_in_rect(e,t,n=!0){const r=e.x===t.x||e.x===t.x+t.width,o=e.y===t.y||e.y===t.y+t.height,i=e.x>t.x&&e.x<t.x+t.width,s=e.y>t.y&&e.y<t.y+t.height;return n?(i||r)&&(s||o):i&&s}static get_point_in_rects(e,t,n=!0){const r=[];for(let o of t)this.is_point_in_rect(e,o,n)&&r.push(o);return r}static get_point_center(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}static move_rect_to_other(e,t,n,r=5){const o={width:e.width,height:Math.abs(e.y-n.y)},i={width:e.width,height:Math.abs(e.height-(n.y+n.height))},s={width:Math.abs(n.x-e.x),height:e.height},a={width:Math.abs(e.width-(n.x+n.width)),height:e.height};if(g.can_include_size(i,t)){const o=t.width+n.x-e.width,i=n.y+n.height+r;return{x:o<0?n.x:n.x-o,y:i}}if(g.can_include_size(o,t)){const o=t.width+n.x-e.width,i=n.y-t.height-r;return{x:o<0?n.x:n.x-o,y:i}}if(g.can_include_size(s,t)){const o=n.y+t.height-e.height;return{x:n.x-t.width-r,y:o<0?n.y:n.y-o}}if(g.can_include_size(a,t)){const o=n.y+t.height-e.height;return{x:n.x+n.width+r,y:o<0?n.y:n.y-o}}if(g.can_include_size(e,t)){const r=e.y+e.height-t.height;let o=n.x;return a.width>=t.width?o=n.x+n.width:s.width>=t.width&&(o=n.x-t.width),{x:o,y:r}}return{x:n.x,y:0}}static move_rect_in_other(e,t){if(g.is_include(t,e))return{dx:0,dy:0};let n=0,r=0;return e.x<t.x?n=t.x-e.x:e.x+e.width>t.x+t.width&&(n=t.x+t.width-(e.x+e.width)),e.y<t.y?r=t.y-e.y:e.y+e.height>t.y+t.height&&(r=t.y+t.height-(e.y+e.height)),{dx:n,dy:r}}static can_include_size(e,t){return t.width<=e.width&&t.height<=e.height}static is_include(e,t){return!(!this.can_include_size(e,t)||t.x<e.x||t.x>e.x+e.width-t.width||t.y<e.y||t.y>e.y+e.height-t.height)}static check_intersection(e,t){const n=this.get_point_center(e),r=this.get_point_center(t),o=Math.abs(n.x-r.x),i=Math.abs(n.y-r.y);return o<=(e.width+t.width)/2&&i<=(e.height+t.height)/2}static limit_point_in_rect(e,t){const n=t.x,r=t.y,o=t.x+t.width,i=t.y+t.height;let s=e.x,a=e.y;return s<n&&(s=n),s>o&&(s=o),a<r&&(a=r),a>i&&(a=i),{x:s,y:a}}static point_distance_with_rect(e,t){if(this.is_point_in_rect(e,t,!0))return 0;const n=t.x+t.width/2,r=t.y+t.height/2,o=t.width/2,i=t.height/2,s=Math.abs(n-e.x),a=Math.abs(r-e.y);return s<=o&&a>i?a-i:a<=i&&s>o?s-o:Math.sqrt(Math.pow(s-o,2)+Math.pow(a-i,2))}static distance_with(e,t){const n=this.get_point_center(e),r=this.get_point_center(t),o=Math.abs(n.x-r.x),i=Math.abs(n.y-r.y),s=(e.width+t.width)/2,a=(e.height+t.height)/2;if(o<=s&&i<=a)return 0;if(o>s&&i<=a)return o-s;if(o<=s&&i>a)return i-a;{let e=Math.pow(o-s,2),t=Math.pow(i-a,2);return Math.sqrt(e+t)}}static get_nearest_rect(e,t){if(0===t.length)return;let n,r=Number.POSITIVE_INFINITY;for(let o of t){let t=this.point_distance_with_rect(e,o);t<r&&(r=t,n=o)}return n}static get_shadow_point_horizental(e,t){let n=t.x,r=t.y+t.height/2;return n=e.x<=t.x?t.x:e.x>=t.x+t.width?t.x+t.width:e.x,{x:n,y:r}}static merge(...e){const t=e[0];let n=t.x,r=t.x+t.width,o=t.y,i=t.y+t.height;for(let t of e.slice(1)){const{x:e,y:s,width:a,height:l}=t;e<n&&(n=e),e+a>r&&(r=e+a),s<o&&(o=s),s+l>i&&(i=s+l)}return{x:n,y:o,width:r-n,height:i-o}}}class b{static svg_path_sample(e,t=24){if(!e||t<2)return[];this.path.setAttribute("d",e);const n=[],r=this.path.getTotalLength()/t;for(let e=0;e<t;e++){const t=e*r,o=this.path.getPointAtLength(t);n.push({x:o.x,y:o.y})}return n}static get_line_k(e,t,n=100){const r=t.y-e.y,o=t.x-e.x;return 0===o?Number.POSITIVE_INFINITY:r/o}static distance(e,t){const n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}static find_closet_point(e,t){let n=1/0,r=e[0];const{x:o,y:i}=t;for(let t of e){let e=Math.pow(o-t.x,2)+Math.pow(i-t.y,2);e<n&&(n=e,r=t)}return r}static offset_points(e,t){const n=[],{x:r,y:o}=t;for(let t of e)n.push({x:t.x+r,y:t.y+o});return n}static find_closest_points(e,t){let n=1/0,r=e[0],o=t[0];for(let i=0;i<e.length;i++){const s=e[i];for(let e=0;e<t.length;e++){const i=t[e],a=s.x-i.x,l=s.y-i.y,c=a*a+l*l;c<n&&(n=c,r=s,o=i)}}return{from:r,to:o}}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(b,"path",document.createElementNS("http://www.w3.org/2000/svg","path"));class x{static polygon_center(e){let t=0,n=0,r=0;const o=e.length;for(let i=0;i<o;i++){const{x:s,y:a}=e[i],{x:l,y:c}=e[(i+1)%o],d=s*c-l*a;r+=d,t+=(s+l)*d,n+=(a+c)*d}return r*=.5,t/=6*r,n/=6*r,{x:t,y:n}}static get_polygon_area(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const{x:o,y:i}=e[r],{x:s,y:a}=e[(r+1)%n];t+=o*a-s*i}return t/2}}class v{static check_intersection(e,t){const{from:n,to:r}=e,{from:o,to:i}=t;let s,a;if(s=n.x===r.x?Number.POSITIVE_INFINITY:(r.y-n.y)/(r.x-n.x),a=o.x===i.x?Number.POSITIVE_INFINITY:(i.y-o.y)/(i.x-o.x),s===a)return!1;const l=Math.min(n.x,r.x),c=Math.max(n.x,r.x),d=Math.min(n.y,r.y),u=Math.max(n.y,r.y),h=Math.min(o.x,i.x),p=Math.max(o.x,i.x),f=Math.min(o.y,i.y),m=Math.max(o.y,i.y);if(s===Number.POSITIVE_INFINITY){const e=n.x,t=a*(e-o.x)+o.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}if(a===Number.POSITIVE_INFINITY){const e=o.x,t=(r.y-n.y)/(r.x-n.x)*(e-n.x)+n.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}{const e=(o.y-n.y+s*n.x-a*o.x)/(s-a),t=s*(e-n.x)+n.y;return e>=l&&e<=c&&e>=h&&e<=p&&t>=d&&t<=u&&t>=f&&t<=m}}}return i})(),e.exports=t()},6960:(e,t)=>{"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.m=n,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,n)=>(o.f[n](e,t),t),[])),o.u=e=>"chunk/"+e+"-"+o.h()+".js",o.miniCssF=e=>{},o.h=()=>"fe8af1811d55a770e36b",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="deepsky:",o.l=(n,r,i,s)=>{if(e[n])e[n].push(r);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+i){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",t+i),a.src=n),e[n]=[r];var h=(t,r)=>{a.onerror=a.onload=null,clearTimeout(p);var o=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={3057:0};o.f.j=(t,n)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=i);var s=o.p+o.u(t),a=new Error;o.l(s,n=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[s,a,l]=n,c=0;if(s.some(t=>0!==e[t])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)l(o)}for(t&&t(n);c<s.length;c++)i=s[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunkdeepsky=globalThis.webpackChunkdeepsky||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i={};return(()=>{"use strict";o.r(i),o.d(i,{CodeLanguageMap:()=>Ng,CommandApi:()=>ph,CommandBoxFolder:()=>Ou,CommandBoxRoot:()=>vu,CommandCode:()=>Uh,CommandCube:()=>zi,CommandCursor:()=>Ni,CommandDetailList:()=>gh,CommandFomula:()=>Lw,CommandLinker:()=>Eu,CommandListOrdered:()=>Bh,CommandMap:()=>es,CommandNode:()=>ts,CommandRt:()=>Ek,CommandTable:()=>jw,CommandText:()=>Xd,CommandTextLink:()=>jd,CommandTodo:()=>Sh,CubeAnnotation:()=>Ed,CubeApi:()=>hh,CubeBase:()=>Pi,CubeBox:()=>Mu,CubeBoxColumns:()=>Pk,CubeBoxFolder:()=>Pu,CubeBoxRoot:()=>xu,CubeChild:()=>rd,CubeCode:()=>Pg,CubeDetailList:()=>kh,CubeDoc:()=>cu,CubeFomula:()=>Bw,CubeHandler:()=>Ti,CubeImg:()=>bd,CubeLine:()=>hu,CubeLinker:()=>Bu,CubeList:()=>Dh,CubeListOrdered:()=>Vh,CubeLost:()=>Sd,CubeMap:()=>ih,CubeNode:()=>Zu,CubePostil:()=>Yd,CubeRoot:()=>Ts,CubeRt:()=>jk,CubeSubMap:()=>Mk,CubeTable:()=>tk,CubeText:()=>Qd,CubeTextLink:()=>Fd,CubeTip:()=>ak,CubeTodo:()=>Rh,EventCommand:()=>ad,IApiCommand:()=>r,ICodeCommand:()=>l,ICubeCommand:()=>_,ICursorCommand:()=>g,IFomula:()=>d,IFomulaCommand:()=>u,ILinker:()=>p,ILinkerCommand:()=>f,IListCommand:()=>s,IListOrderedCommand:()=>a,IMapCommand:()=>b,IMisc:()=>C,INodeCommand:()=>x,INote:()=>S,INoteEvent:()=>y,INoteHotkeys:()=>k,INoteStats:()=>w,IRtCommand:()=>m,ITableCommand:()=>h,ITextCommand:()=>e,ITextLinkCommand:()=>n,ITodoCommand:()=>c,LayoutChecker:()=>El,LinkerLine:()=>ju,LinkerPoint:()=>Hu,Map2D:()=>Yc,MapCanvas:()=>rh,MapChild:()=>Wc,MapInteraction:()=>ws,MapNodeBase:()=>Qc,MapNodeLayoutEnv:()=>Zc,MapTools:()=>Qi,Matrix2D:()=>Zi,NodeBase2D:()=>td,NodeLayout:()=>Jc,NodeLayoutInvert:()=>Xc,NodeLayoutMeter:()=>ed,NodeObserver:()=>qu,NodeShape:()=>Qu,Note:()=>Mi,NoteApi:()=>vi,NoteBase:()=>xi,NoteClipBoard:()=>Fi,NoteConfig:()=>$i,NoteCourier:()=>Ui,NoteCubes:()=>Ei,NoteCursor:()=>Vi,NoteEvent:()=>Hi,NoteHistory:()=>sd,NoteHotkeys:()=>Bi,NoteInteraction:()=>As,NoteListener:()=>Oi,NoteMeta:()=>Ci,NotePainter:()=>qi,NotePlayer:()=>id,NoteScope:()=>Xi,NoteStats:()=>ji,NoteTools:()=>od,Recorder:()=>ld,RootScopes:()=>Ji,StatusAnnotation:()=>Pd,StatusApi:()=>fh,StatusBox:()=>Su,StatusBoxFolder:()=>Tu,StatusBoxRoot:()=>gu,StatusCode:()=>Ag,StatusCube:()=>Rs,StatusCubeRoot:()=>Ps,StatusDetailList:()=>yh,StatusDoc:()=>lu,StatusFomula:()=>Iw,StatusImg:()=>gd,StatusLine:()=>du,StatusList:()=>Lh,StatusListOrdered:()=>$h,StatusLost:()=>kd,StatusMap:()=>nh,StatusNode:()=>Ju,StatusNodeBase:()=>nd,StatusPostil:()=>Kd,StatusRt:()=>Ok,StatusSubmap:()=>Sk,StatusTable:()=>Qw,StatusText:()=>Jd,StatusTextLink:()=>Hd,StatusTip:()=>ik,StatusTodo:()=>Ah,Waiter:()=>Ua,_MapGroup:()=>v,_PlayStatus:()=>M,cmd:()=>Ri,key:()=>Di,keymap:()=>Ii,node_observer:()=>Fu,waiter_map_svg:()=>Ka});var e,t={};o.r(t),o.d(t,{boolean:()=>Cf,booleanish:()=>Mf,commaOrSpaceSeparated:()=>Rf,commaSeparated:()=>Tf,number:()=>Nf,overloadedBoolean:()=>zf,spaceSeparated:()=>Af}),function(e){var t;(t=e.Names||(e.Names={})).reset="cube-text:text-reset",t.merge="cube-text:text-merge",t.break="cube-text:text-break"}(e||(e={}));var n,r,s,a,l,c,d,u,h,p,f,m,_,g,b,x,v=function(e){return e.outbox="outbox",e.markers="markers",e.nodes="nodes",e.linkers="linkers",e.placeholder="placeholder",e}({});!function(e){(e.Names||(e.Names={})).update="text-link:update"}(n||(n={})),function(e){(e.Names||(e.Names={})).reset="cube-api:reset"}(r||(r={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-list:add",t.remove="cube-list:remove",t.indent="cube-list:indent",t.reset="cube-list:reset",t.transform="cube-list:transform"}(s||(s={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-list-ordered:add",t.remove="cube-list-ordered:remove",t.indent="cube-list-ordered:indent",t.reset="cube-list-ordered:reset"}(a||(a={})),function(e){var t;(t=e.Names||(e.Names={})).change_lang="cube-code:change-lang",t.change_active="cube-code:change-active",t.change_theme="cube-code:change-theme",t.code_update="cube-code:update-code",t.code_add="cube-code:code-add",t.code_remove="cube-code:code-remove",t.code_rename="cube-code:code-rename"}(l||(l={})),function(e){var t;(t=e.Names||(e.Names={})).add="cube-todo:add",t.remove="cube-todo:remove",t.indent="cube-todo:indent",t.status="cube-todo:status",t.reset="cube-todo:reset"}(c||(c={})),function(e){var t;(t=e.Size||(e.Size={})).h1="\\Huge ",t.h2="\\huge ",t.h3="\\Large ",t.h4="\\normalsize ",t.h5="\\small ",t.h6="\\tiny "}(d||(d={})),function(e){(e.Names||(e.Names={})).update="cube-fomula:update"}(u||(u={})),function(e){var t;(t=e.Names||(e.Names={})).add_title="cube-table:add-title",t.remove_title="cube-table:remove-title",t.add_cell="cube-table:add-cell",t.remove_cell="cube-table:remove-cell",t.add_row="cube-table:add-row",t.remove_row="cube-table:remove-row",t.add_col="cube-table:add-col",t.remove_col="cube-table:remove-col",t.add_grid_col="cube-table:add-grid-col",t.remove_grid_col="cube-table:remove-grid-col",t.merge="cube-table:merge",t.moveto="cube-table:moveto",t.update_area="cube-table:update-area",t.reorder="cube-table:reorder",t.col_resize="cube-table:col-resize"}(h||(h={})),function(e){!function(e){e.arrow="marker-arrow",e.point="marker-point",e.square="marker-square",e.rhomb="marker-rhomb"}(e.Anchor||(e.Anchor={}))}(p||(p={})),function(e){(e.Names||(e.Names={})).update="linker:update"}(f||(f={})),function(e){(e.Names||(e.Names={})).reset="cube-rt:reset"}(m||(m={})),function(e){var t;(t=e.Names||(e.Names={})).cube_insert_child="cube-insert-child",t.cube_delete_child="cube-delete-child",t.cube_reset="cube-reset",t.cube_delete_adjacent="cube-delete-adjacent",t.cube_set_selection_css="cube-set-selection-css",t.cube_insert="cube-insert",t.cube_delete="cube-delete",t.cube_partition="cube-partition",t.cube_reorder="cube-reorder",t.cube_set_css="cube-set-css",t.cube_set_attr="cube-set-attr",t.cube_move="cube-move",t.cube_merge="cube-merge",t.cube_postil_add="cube-postil-add",t.cube_postil_remove="cube-postil-remove"}(_||(_={})),function(e){var t;(t=e.Names||(e.Names={})).cursor_in_head="cursor:in-head",t.cursor_in_tail="cursor:in-tail",t.loc="cursor:loc"}(g||(g={})),function(e){var t;(t=e.Names||(e.Names={})).node_add="node-add",t.node_remove="node-remove",t.linker_add="linker-add",t.linker_remove="linker-remove",t.update_attrs="update-attrs",t.node_drag="node-drag"}(b||(b={})),function(e){var t;(t=e.Names||(e.Names={})).layout_update="node:layout-update",t.append_child="node:append-child"}(x||(x={}));var y,w,k,S,C,M=function(e){return e.pending="pending",e.playing="playing",e.pause="pause",e.stop="stop",e}({});function z(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}!function(e){var t;(t=e.Names||(e.Names={}))["asset-save"]="note-event:asset-save",t["asset-download"]="note-event:asset-download",t["asset-copy"]="note-event:asset-copy",t.export="note-event:export",t["replace-id"]="note-event:replace-id",t["edit-before"]="note-event:edit-before",t["edit-after"]="note-event:edit-after",t["text-merge"]="note-event:text-merge",t.esc="note-event:esc",t["selection-change"]="note-event:selection-change",t["cursor-nav-before"]="note-event:cursor-nav-before",t["cursor-nav-after"]="note-event:cursor-nav-after",t["enter-before"]="note-event:enter-before",t["enter-after"]="note-event:enter-after",t["show-cube-editor"]="note-event:show-cube-editor",t["text-link-edit"]="note-event:text-link-edit",t["note-input-before"]="note-event:note-input-before",t["note-input-compositionend"]="note-event:note-input-compositionend",t["note-input-compositionend-before"]="note-event:note-input-compositionend-before",t["note-input-compositionupdate"]="note-event:note-input-compositionupdate",t["status-update"]="note-event:status-update",t["fig-click"]="note-event:fig-click"}(y||(y={})),function(e){var t;(t=e.NoteMode||(e.NoteMode={})).read="read",t.edit="edit",t.export="export"}(w||(w={})),function(e){var t,n;(t=e.HotKeys||(e.HotKeys={}))["break-line"]="换行",t["cursor-nav"]="光标导航",t["cursor-nav-extend"]="光标复选",t["format-brush-apply"]="应用格式刷",t["format-brush-copy"]="复制格式刷",t.undo="撤销",t.redo="重做",t["indent-line"]="缩进",t["unindent-line"]="反向缩进",t["clear-css"]="重置样式",t["scope-clear"]="清空块选区",t["scope-add"]="添加块选区",t["root-add-next"]="向后添加根级块",t["root-add-prev"]="向前添加根级块",t["break-root"]="分裂根级块",t["break-text"]="文本块换行",t["fold-block"]="折叠所在块",t["text-add-annotation"]="添加批注",t["text-italic"]="斜体",t["text-bold"]="加粗",t["text-underline"]="下划线",t["text-align-left"]="左对齐",t["text-align-center"]="居中对齐",t["text-align-right"]="右对齐",t["text-partition"]="分裂文本块",(n=e.Group||(e.Group={})).core="核心",n.common="通用",n.text="文本块",n.block="块",n.scope="块选区",n.dict="字典",n.bookmark="书签",n.search="搜索",n.css="样式",n.float="面板",n.other="其他"}(k||(k={})),function(e){var t;(t=e.Cores||(e.Cores={})).courier="courier",t.cursor="cursor",t.config="config",t.cubes="cubes",t.clipboard="clipboard",t.event="event",t.fomula="fomula",t.float="float",t.painter="painter",t.player="player",t.hotkeys="hotkeys",t.history="history",t.scope="scope",t.stats="stats",function(e){e.api="api",e.annotation="annotation",e.box="box",e.box_root="box-root",e.box_folder="box-folder",e.box_columns="box-columns",e.code="code",e.doc="doc",e.detail_list="detail-list",e.fomula="fomula",e.img="img",e.lost="lost",e.line="line",e.list="list",e.list_ordered="list-ordered",e.linker="linker",e.link="link",e.map="map",e.submap="submap",e.node="node",e.postil="postil",e.rt="rt",e.text="text",e.tip="tip",e.todo="todo",e.table="table"}(e.Cubes||(e.Cubes={}))}(S||(S={})),function(e){var t;(t=e.Keys||(e.Keys={})).enter="Enter",t.left="arrowleft",t.right="arrowright",t.up="arrowup",t.down="arrowdown",t.end="end",t.home="home"}(C||(C={}));const N={},A=[],T=()=>{},R=()=>!1,P=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),O=e=>e.startsWith("onUpdate:"),E=Object.assign,L=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},I=Object.prototype.hasOwnProperty,D=(e,t)=>I.call(e,t),B=Array.isArray,j=e=>"[object Map]"===K(e),H=e=>"[object Set]"===K(e),q=e=>"function"==typeof e,F=e=>"string"==typeof e,$=e=>"symbol"==typeof e,G=e=>null!==e&&"object"==typeof e,V=e=>(G(e)||q(e))&&q(e.then)&&q(e.catch),U=Object.prototype.toString,K=e=>U.call(e),W=e=>"[object Object]"===K(e),Y=e=>F(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,X=z(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),J=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Z=/-\w/g,Q=J(e=>e.replace(Z,e=>e.slice(1).toUpperCase())),ee=/\B([A-Z])/g,te=J(e=>e.replace(ee,"-$1").toLowerCase()),ne=J(e=>e.charAt(0).toUpperCase()+e.slice(1)),re=J(e=>e?`on${ne(e)}`:""),oe=(e,t)=>!Object.is(e,t),ie=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},se=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ae=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let le;const ce=()=>le||(le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==o.g?o.g:{});function de(e){if(B(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=F(r)?fe(r):de(r);if(o)for(const e in o)t[e]=o[e]}return t}if(F(e)||G(e))return e}const ue=/;(?![^(]*\))/g,he=/:([^]+)/,pe=/\/\*[^]*?\*\//g;function fe(e){const t={};return e.replace(pe,"").split(ue).forEach(e=>{if(e){const n=e.split(he);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function me(e){let t="";if(F(e))t=e;else if(B(e))for(let n=0;n<e.length;n++){const r=me(e[n]);r&&(t+=r+" ")}else if(G(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _e="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ge=z(_e);function be(e){return!!e||""===e}const xe=e=>!(!e||!0!==e.__v_isRef),ve=e=>F(e)?e:null==e?"":B(e)||G(e)&&(e.toString===U||!q(e.toString))?xe(e)?ve(e.value):JSON.stringify(e,ye,2):String(e),ye=(e,t)=>xe(t)?ye(e,t.value):j(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[we(t,r)+" =>"]=n,e),{})}:H(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>we(e))}:$(t)?we(t):!G(t)||B(t)||W(t)?t:String(t),we=(e,t="")=>{var n;return $(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ke,Se;class Ce{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ke,!e&&ke&&(this.index=(ke.scopes||(ke.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=ke;try{return ke=this,e()}finally{ke=t}}else 0}on(){1===++this._on&&(this.prevScope=ke,ke=this)}off(){this._on>0&&0===--this._on&&(ke=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}const Me=new WeakSet;class ze{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ke&&ke.active&&ke.effects.push(this)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,Me.has(this)&&(Me.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||Re(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,Ge(this),Ee(this);const e=Se,t=He;Se=this,He=!0;try{return this.fn()}finally{0,Le(this),Se=e,He=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)Be(e);this.deps=this.depsTail=void 0,Ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?Me.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ie(this)&&this.run()}get dirty(){return Ie(this)}}let Ne,Ae,Te=0;function Re(e,t=!1){if(e.flags|=8,t)return e.next=Ae,void(Ae=e);e.next=Ne,Ne=e}function Pe(){Te++}function Oe(){if(--Te>0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ne;){let t=Ne;for(Ne=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function Ee(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Le(e){let t,n=e.depsTail,r=n;for(;r;){const e=r.prevDep;-1===r.version?(r===n&&(n=e),Be(r),je(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(De(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function De(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Ve)return;if(e.globalVersion=Ve,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!Ie(e)))return;e.flags|=2;const t=e.dep,n=Se,r=He;Se=e,He=!0;try{Ee(e);const n=e.fn(e._value);(0===t.version||oe(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Se=n,He=r,Le(e),e.flags&=-3}}function Be(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Be(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function je(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let He=!0;const qe=[];function Fe(){qe.push(He),He=!1}function $e(){const e=qe.pop();He=void 0===e||e}function Ge(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=Se;Se=void 0;try{t()}finally{Se=e}}}let Ve=0;class Ue{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ke{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Se||!He||Se===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==Se)t=this.activeLink=new Ue(Se,this),Se.deps?(t.prevDep=Se.depsTail,Se.depsTail.nextDep=t,Se.depsTail=t):Se.deps=Se.depsTail=t,We(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Se.depsTail,t.nextDep=void 0,Se.depsTail.nextDep=t,Se.depsTail=t,Se.deps===t&&(Se.deps=e)}return t}trigger(e){this.version++,Ve++,this.notify(e)}notify(e){Pe();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Oe()}}}function We(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)We(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ye=new WeakMap,Xe=Symbol(""),Je=Symbol(""),Ze=Symbol("");function Qe(e,t,n){if(He&&Se){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ke),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,o,i){const s=Ye.get(e);if(!s)return void Ve++;const a=e=>{e&&e.trigger()};if(Pe(),"clear"===t)s.forEach(a);else{const o=B(e),i=o&&Y(n);if(o&&"length"===n){const e=Number(r);s.forEach((t,n)=>{("length"===n||n===Ze||!$(n)&&n>=e)&&a(t)})}else switch((void 0!==n||s.has(void 0))&&a(s.get(n)),i&&a(s.get(Ze)),t){case"add":o?i&&a(s.get("length")):(a(s.get(Xe)),j(e)&&a(s.get(Je)));break;case"delete":o||(a(s.get(Xe)),j(e)&&a(s.get(Je)));break;case"set":j(e)&&a(s.get(Xe))}}Oe()}function tt(e){const t=Ht(e);return t===e?t:(Qe(t,0,Ze),Bt(e)?t:t.map(Ft))}function nt(e){return Qe(e=Ht(e),0,Ze),e}const rt={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,Ft)},concat(...e){return tt(this).concat(...e.map(e=>B(e)?tt(e):e))},entries(){return ot(this,"entries",e=>(e[1]=Ft(e[1]),e))},every(e,t){return st(this,"every",e,t,void 0,arguments)},filter(e,t){return st(this,"filter",e,t,e=>e.map(Ft),arguments)},find(e,t){return st(this,"find",e,t,Ft,arguments)},findIndex(e,t){return st(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return st(this,"findLast",e,t,Ft,arguments)},findLastIndex(e,t){return st(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return st(this,"forEach",e,t,void 0,arguments)},includes(...e){return lt(this,"includes",e)},indexOf(...e){return lt(this,"indexOf",e)},join(e){return tt(this).join(e)},lastIndexOf(...e){return lt(this,"lastIndexOf",e)},map(e,t){return st(this,"map",e,t,void 0,arguments)},pop(){return ct(this,"pop")},push(...e){return ct(this,"push",e)},reduce(e,...t){return at(this,"reduce",e,t)},reduceRight(e,...t){return at(this,"reduceRight",e,t)},shift(){return ct(this,"shift")},some(e,t){return st(this,"some",e,t,void 0,arguments)},splice(...e){return ct(this,"splice",e)},toReversed(){return tt(this).toReversed()},toSorted(e){return tt(this).toSorted(e)},toSpliced(...e){return tt(this).toSpliced(...e)},unshift(...e){return ct(this,"unshift",e)},values(){return ot(this,"values",Ft)}};function ot(e,t,n){const r=nt(e),o=r[t]();return r===e||Bt(e)||(o._next=o.next,o.next=()=>{const e=o._next();return e.value&&(e.value=n(e.value)),e}),o}const it=Array.prototype;function st(e,t,n,r,o,i){const s=nt(e),a=s!==e&&!Bt(e),l=s[t];if(l!==it[t]){const t=l.apply(e,i);return a?Ft(t):t}let c=n;s!==e&&(a?c=function(t,r){return n.call(this,Ft(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));const d=l.call(s,c,r);return a&&o?o(d):d}function at(e,t,n,r){const o=nt(e);let i=n;return o!==e&&(Bt(e)?n.length>3&&(i=function(t,r,o){return n.call(this,t,r,o,e)}):i=function(t,r,o){return n.call(this,t,Ft(r),o,e)}),o[t](i,...r)}function lt(e,t,n){const r=Ht(e);Qe(r,0,Ze);const o=r[t](...n);return-1!==o&&!1!==o||!jt(n[0])?o:(n[0]=Ht(n[0]),r[t](...n))}function ct(e,t,n=[]){Fe(),Pe();const r=Ht(e)[t].apply(e,n);return Oe(),$e(),r}const dt=z("__proto__,__v_isRef,__isVue"),ut=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter($));function ht(e){$(e)||(e=String(e));const t=Ht(this);return Qe(t,0,e),t.hasOwnProperty(e)}class pt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const r=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(r?o?Tt:At:o?Nt:zt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=B(e);if(!r){let e;if(i&&(e=rt[t]))return e;if("hasOwnProperty"===t)return ht}const s=Reflect.get(e,t,Gt(e)?e:n);return($(t)?ut.has(t):dt(t))?s:(r||Qe(e,0,t),o?s:Gt(s)?i&&Y(t)?s:s.value:G(s)?r?Et(s):Pt(s):s)}}class ft extends pt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t];if(!this._isShallow){const t=Dt(o);if(Bt(n)||Dt(n)||(o=Ht(o),n=Ht(n)),!B(e)&&Gt(o)&&!Gt(n))return t||(o.value=n),!0}const i=B(e)&&Y(t)?Number(t)<e.length:D(e,t),s=Reflect.set(e,t,n,Gt(e)?e:r);return e===Ht(r)&&(i?oe(n,o)&&et(e,"set",t,n):et(e,"add",t,n)),s}deleteProperty(e,t){const n=D(e,t),r=(e[t],Reflect.deleteProperty(e,t));return r&&n&&et(e,"delete",t,void 0),r}has(e,t){const n=Reflect.has(e,t);return $(t)&&ut.has(t)||Qe(e,0,t),n}ownKeys(e){return Qe(e,0,B(e)?"length":Xe),Reflect.ownKeys(e)}}class mt extends pt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const _t=new ft,gt=new mt,bt=new ft(!0),xt=e=>e,vt=e=>Reflect.getPrototypeOf(e);function yt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function wt(e,t){const n={get(n){const r=this.__v_raw,o=Ht(r),i=Ht(n);e||(oe(n,i)&&Qe(o,0,n),Qe(o,0,i));const{has:s}=vt(o),a=t?xt:e?$t:Ft;return s.call(o,n)?a(r.get(n)):s.call(o,i)?a(r.get(i)):void(r!==o&&r.get(n))},get size(){const t=this.__v_raw;return!e&&Qe(Ht(t),0,Xe),t.size},has(t){const n=this.__v_raw,r=Ht(n),o=Ht(t);return e||(oe(t,o)&&Qe(r,0,t),Qe(r,0,o)),t===o?n.has(t):n.has(t)||n.has(o)},forEach(n,r){const o=this,i=o.__v_raw,s=Ht(i),a=t?xt:e?$t:Ft;return!e&&Qe(s,0,Xe),i.forEach((e,t)=>n.call(r,a(e),a(t),o))}};E(n,e?{add:yt("add"),set:yt("set"),delete:yt("delete"),clear:yt("clear")}:{add(e){t||Bt(e)||Dt(e)||(e=Ht(e));const n=Ht(this);return vt(n).has.call(n,e)||(n.add(e),et(n,"add",e,e)),this},set(e,n){t||Bt(n)||Dt(n)||(n=Ht(n));const r=Ht(this),{has:o,get:i}=vt(r);let s=o.call(r,e);s||(e=Ht(e),s=o.call(r,e));const a=i.call(r,e);return r.set(e,n),s?oe(n,a)&&et(r,"set",e,n):et(r,"add",e,n),this},delete(e){const t=Ht(this),{has:n,get:r}=vt(t);let o=n.call(t,e);o||(e=Ht(e),o=n.call(t,e));r&&r.call(t,e);const i=t.delete(e);return o&&et(t,"delete",e,void 0),i},clear(){const e=Ht(this),t=0!==e.size,n=e.clear();return t&&et(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(e,t,n){return function(...r){const o=this.__v_raw,i=Ht(o),s=j(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=o[e](...r),d=n?xt:t?$t:Ft;return!t&&Qe(i,0,l?Je:Xe),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}(r,e,t)}),n}function kt(e,t){const n=wt(e,t);return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(D(n,r)&&r in t?n:t,r,o)}const St={get:kt(!1,!1)},Ct={get:kt(!1,!0)},Mt={get:kt(!0,!1)};const zt=new WeakMap,Nt=new WeakMap,At=new WeakMap,Tt=new WeakMap;function Rt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>K(e).slice(8,-1))(e))}function Pt(e){return Dt(e)?e:Lt(e,!1,_t,St,zt)}function Ot(e){return Lt(e,!1,bt,Ct,Nt)}function Et(e){return Lt(e,!0,gt,Mt,At)}function Lt(e,t,n,r,o){if(!G(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=Rt(e);if(0===i)return e;const s=o.get(e);if(s)return s;const a=new Proxy(e,2===i?r:n);return o.set(e,a),a}function It(e){return Dt(e)?It(e.__v_raw):!(!e||!e.__v_isReactive)}function Dt(e){return!(!e||!e.__v_isReadonly)}function Bt(e){return!(!e||!e.__v_isShallow)}function jt(e){return!!e&&!!e.__v_raw}function Ht(e){const t=e&&e.__v_raw;return t?Ht(t):e}function qt(e){return!D(e,"__v_skip")&&Object.isExtensible(e)&&se(e,"__v_skip",!0),e}const Ft=e=>G(e)?Pt(e):e,$t=e=>G(e)?Et(e):e;function Gt(e){return!!e&&!0===e.__v_isRef}function Vt(e){return Kt(e,!1)}function Ut(e){return Kt(e,!0)}function Kt(e,t){return Gt(e)?e:new Wt(e,t)}class Wt{constructor(e,t){this.dep=new Ke,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ht(e),this._value=t?e:Ft(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Bt(e)||Dt(e);e=n?e:Ht(e),oe(e,t)&&(this._rawValue=e,this._value=n?e:Ft(e),this.dep.trigger())}}function Yt(e){return Gt(e)?e.value:e}const Xt={get:(e,t,n)=>"__v_raw"===t?e:Yt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Gt(o)&&!Gt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Jt(e){return It(e)?e:new Proxy(e,Xt)}class Zt{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ke(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ve-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||Se===this))return Re(this,!0),!0}get value(){const e=this.dep.track();return De(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const Qt={},en=new WeakMap;let tn;function nn(e,t,n=N){const{immediate:r,deep:o,once:i,scheduler:s,augmentJob:a,call:l}=n,c=e=>o?e:Bt(e)||!1===o||0===o?rn(e,1):rn(e);let d,u,h,p,f=!1,m=!1;if(Gt(e)?(u=()=>e.value,f=Bt(e)):It(e)?(u=()=>c(e),f=!0):B(e)?(m=!0,f=e.some(e=>It(e)||Bt(e)),u=()=>e.map(e=>Gt(e)?e.value:It(e)?c(e):q(e)?l?l(e,2):e():void 0)):u=q(e)?t?l?()=>l(e,2):e:()=>{if(h){Fe();try{h()}finally{$e()}}const t=tn;tn=d;try{return l?l(e,3,[p]):e(p)}finally{tn=t}}:T,t&&o){const e=u,t=!0===o?1/0:o;u=()=>rn(e(),t)}const _=ke,g=()=>{d.stop(),_&&_.active&&L(_.effects,d)};if(i&&t){const e=t;t=(...t)=>{e(...t),g()}}let b=m?new Array(e.length).fill(Qt):Qt;const x=e=>{if(1&d.flags&&(d.dirty||e))if(t){const e=d.run();if(o||f||(m?e.some((e,t)=>oe(e,b[t])):oe(e,b))){h&&h();const n=tn;tn=d;try{const n=[e,b===Qt?void 0:m&&b[0]===Qt?[]:b,p];b=e,l?l(t,3,n):t(...n)}finally{tn=n}}}else d.run()};return a&&a(x),d=new ze(u),d.scheduler=s?()=>s(x,!1):x,p=e=>function(e,t=!1,n=tn){if(n){let t=en.get(n);t||en.set(n,t=[]),t.push(e)}}(e,!1,d),h=d.onStop=()=>{const e=en.get(d);if(e){if(l)l(e,4);else for(const t of e)t();en.delete(d)}},t?r?x(!0):b=d.run():s?s(x.bind(null,!0),!0):d.run(),g.pause=d.pause.bind(d),g.resume=d.resume.bind(d),g.stop=g,g}function rn(e,t=1/0,n){if(t<=0||!G(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,Gt(e))rn(e.value,t,n);else if(B(e))for(let r=0;r<e.length;r++)rn(e[r],t,n);else if(H(e)||j(e))e.forEach(e=>{rn(e,t,n)});else if(W(e)){for(const r in e)rn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&rn(e[r],t,n)}return e}function on(e,t,n,r){try{return r?e(...r):e()}catch(e){an(e,t,n)}}function sn(e,t,n,r){if(q(e)){const o=on(e,t,n,r);return o&&V(o)&&o.catch(e=>{an(e,t,n)}),o}if(B(e)){const o=[];for(let i=0;i<e.length;i++)o.push(sn(e[i],t,n,r));return o}}function an(e,t,n,r=!0){t&&t.vnode;const{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||N;if(t){let r=t.parent;const i=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,i,s))return;r=r.parent}if(o)return Fe(),on(o,null,10,[e,i,s]),void $e()}!function(e,t,n,r=!0,o=!1){if(o)throw e;console.error(e)}(e,0,0,r,i)}const ln=[];let cn=-1;const dn=[];let un=null,hn=0;const pn=Promise.resolve();let fn=null;function mn(e){const t=fn||pn;return e?t.then(this?e.bind(this):e):t}function _n(e){if(!(1&e.flags)){const t=yn(e),n=ln[ln.length-1];!n||!(2&e.flags)&&t>=yn(n)?ln.push(e):ln.splice(function(e){let t=cn+1,n=ln.length;for(;t<n;){const r=t+n>>>1,o=ln[r],i=yn(o);i<e||i===e&&2&o.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,gn()}}function gn(){fn||(fn=pn.then(wn))}function bn(e){B(e)?dn.push(...e):un&&-1===e.id?un.splice(hn+1,0,e):1&e.flags||(dn.push(e),e.flags|=1),gn()}function xn(e,t,n=cn+1){for(0;n<ln.length;n++){const t=ln[n];if(t&&2&t.flags){if(e&&t.id!==e.uid)continue;0,ln.splice(n,1),n--,4&t.flags&&(t.flags&=-2),t(),4&t.flags||(t.flags&=-2)}}}function vn(e){if(dn.length){const e=[...new Set(dn)].sort((e,t)=>yn(e)-yn(t));if(dn.length=0,un)return void un.push(...e);for(un=e,hn=0;hn<un.length;hn++){const e=un[hn];0,4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}un=null,hn=0}}const yn=e=>null==e.id?2&e.flags?-1:1/0:e.id;function wn(e){try{for(cn=0;cn<ln.length;cn++){const e=ln[cn];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),on(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;cn<ln.length;cn++){const e=ln[cn];e&&(e.flags&=-2)}cn=-1,ln.length=0,vn(),fn=null,(ln.length||dn.length)&&wn(e)}}let kn=null,Sn=null;function Cn(e){const t=kn;return kn=e,Sn=e&&e.type.__scopeId||null,t}function Mn(e,t=kn,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&Ro(-1);const o=Cn(t);let i;try{i=e(...n)}finally{Cn(o),r._d&&Ro(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function zn(e,t){if(null===kn)return e;const n=fi(kn),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[o,i,s,a=N]=t[e];o&&(q(o)&&(o={mounted:o,updated:o}),o.deep&&rn(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:s,modifiers:a}))}return e}function Nn(e,t,n,r){const o=e.dirs,i=t&&t.dirs;for(let s=0;s<o.length;s++){const a=o[s];i&&(a.oldValue=i[s].value);let l=a.dir[r];l&&(Fe(),sn(l,n,8,[e.el,a,e,t]),$e())}}const An=Symbol("_vte"),Tn=e=>e.__isTeleport;const Rn=Symbol("_leaveCb");Symbol("_enterCb");const Pn=[Function,Array];Boolean,Boolean;function On(e,t){6&e.shapeFlag&&e.component?(e.transition=t,On(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function En(e,t){return q(e)?(()=>E({name:e.name},t,{setup:e}))():e}function Ln(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function In(e){const t=ei(),n=Ut(null);if(t){const r=t.refs===N?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}else 0;return n}const Dn=new WeakMap;function Bn(e,t,n,r,o=!1){if(B(e))return void e.forEach((e,i)=>Bn(e,t&&(B(t)?t[i]:t),n,r,o));if(Hn(r)&&!o)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&Bn(e,t,n,r.component.subTree));const i=4&r.shapeFlag?fi(r.component):r.el,s=o?null:i,{i:a,r:l}=e;const c=t&&t.r,d=a.refs===N?a.refs={}:a.refs,u=a.setupState,h=Ht(u),p=u===N?R:e=>D(h,e);if(null!=c&&c!==l)if(jn(t),F(c))d[c]=null,p(c)&&(u[c]=null);else if(Gt(c)){c.value=null;const e=t;e.k&&(d[e.k]=null)}if(q(l))on(l,a,12,[s,d]);else{const t=F(l),r=Gt(l);if(t||r){const a=()=>{if(e.f){const n=t?p(l)?u[l]:d[l]:l.value;if(o)B(n)&&L(n,i);else if(B(n))n.includes(i)||n.push(i);else if(t)d[l]=[i],p(l)&&(u[l]=d[l]);else{const t=[i];l.value=t,e.k&&(d[e.k]=t)}}else t?(d[l]=s,p(l)&&(u[l]=s)):r&&(l.value=s,e.k&&(d[e.k]=s))};if(s){const t=()=>{a(),Dn.delete(e)};t.id=-1,Dn.set(e,t),Yr(t,n)}else jn(e),a()}else 0}}function jn(e){const t=Dn.get(e);t&&(t.flags|=8,Dn.delete(e))}ce().requestIdleCallback,ce().cancelIdleCallback;const Hn=e=>!!e.type.__asyncLoader;const qn=e=>e.type.__isKeepAlive;RegExp,RegExp;function Fn(e,t){return B(e)?e.some(e=>Fn(e,t)):F(e)?e.split(",").includes(t):"[object RegExp]"===K(e)&&(e.lastIndex=0,e.test(t))}function $n(e,t){Vn(e,"a",t)}function Gn(e,t){Vn(e,"da",t)}function Vn(e,t,n=Qo){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Yn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)qn(e.parent.vnode)&&Un(r,t,n,e),e=e.parent}}function Un(e,t,n,r){const o=Yn(t,e,r,!0);nr(()=>{L(r[t],o)},n)}function Kn(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Wn(e){return 128&e.shapeFlag?e.ssContent:e}function Yn(e,t,n=Qo,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Fe();const o=ri(n),i=sn(t,n,e,r);return o(),$e(),i});return r?o.unshift(i):o.push(i),i}}const Xn=e=>(t,n=Qo)=>{li&&"sp"!==e||Yn(e,(...e)=>t(...e),n)},Jn=Xn("bm"),Zn=Xn("m"),Qn=Xn("bu"),er=Xn("u"),tr=Xn("bum"),nr=Xn("um"),rr=Xn("sp"),or=Xn("rtg"),ir=Xn("rtc");function sr(e,t=Qo){Yn("ec",e,t)}const ar="components";const lr=Symbol.for("v-ndc");function cr(e){return F(e)?dr(ar,e,!1)||e:e||lr}function dr(e,t,n=!0,r=!1){const o=kn||Qo;if(o){const n=o.type;if(e===ar){const e=mi(n,!1);if(e&&(e===t||e===Q(t)||e===ne(Q(t))))return n}const i=ur(o[e]||n[e],t)||ur(o.appContext[e],t);return!i&&r?n:i}}function ur(e,t){return e&&(e[t]||e[Q(t)]||e[ne(Q(t))])}function hr(e,t,n,r){let o;const i=n&&n[r],s=B(e);if(s||F(e)){let n=!1,r=!1;s&&It(e)&&(n=!Bt(e),r=Dt(e),e=nt(e)),o=new Array(e.length);for(let s=0,a=e.length;s<a;s++)o[s]=t(n?r?$t(Ft(e[s])):Ft(e[s]):e[s],s,void 0,i&&i[s])}else if("number"==typeof e){0,o=new Array(e);for(let n=0;n<e;n++)o[n]=t(n+1,n,void 0,i&&i[n])}else if(G(e))if(e[Symbol.iterator])o=Array.from(e,(e,n)=>t(e,n,void 0,i&&i[n]));else{const n=Object.keys(e);o=new Array(n.length);for(let r=0,s=n.length;r<s;r++){const s=n[r];o[r]=t(e[s],s,r,i&&i[r])}}else o=[];return n&&(n[r]=o),o}const pr=e=>e?ii(e)?fi(e):pr(e.parent):null,fr=E(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pr(e.parent),$root:e=>pr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wr(e),$forceUpdate:e=>e.f||(e.f=()=>{_n(e.update)}),$nextTick:e=>e.n||(e.n=mn.bind(e.proxy)),$watch:e=>ao.bind(e)}),mr=(e,t)=>e!==N&&!e.__isScriptSetup&&D(e,t),_r={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:l}=e;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(mr(r,t))return s[t]=1,r[t];if(o!==N&&D(o,t))return s[t]=2,o[t];if((c=e.propsOptions[0])&&D(c,t))return s[t]=3,i[t];if(n!==N&&D(n,t))return s[t]=4,n[t];br&&(s[t]=0)}}const d=fr[t];let u,h;return d?("$attrs"===t&&Qe(e.attrs,0,""),d(e)):(u=a.__cssModules)&&(u=u[t])?u:n!==N&&D(n,t)?(s[t]=4,n[t]):(h=l.config.globalProperties,D(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return mr(o,t)?(o[t]=n,!0):r!==N&&D(r,t)?(r[t]=n,!0):!D(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i,type:s}},a){let l,c;return!!(n[a]||e!==N&&"$"!==a[0]&&D(e,a)||mr(t,a)||(l=i[0])&&D(l,a)||D(r,a)||D(fr,a)||D(o.config.globalProperties,a)||(c=s.__cssModules)&&c[a])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:D(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function gr(e){return B(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}let br=!0;function xr(e){const t=wr(e),n=e.proxy,r=e.ctx;br=!1,t.beforeCreate&&vr(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:l,inject:c,created:d,beforeMount:u,mounted:h,beforeUpdate:p,updated:f,activated:m,deactivated:_,beforeDestroy:g,beforeUnmount:b,destroyed:x,unmounted:v,render:y,renderTracked:w,renderTriggered:k,errorCaptured:S,serverPrefetch:C,expose:M,inheritAttrs:z,components:N,directives:A,filters:R}=t;if(c&&function(e,t){B(e)&&(e=Mr(e));for(const n in e){const r=e[n];let o;o=G(r)?"default"in r?Er(r.from||n,r.default,!0):Er(r.from||n):Er(r),Gt(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(c,r,null),s)for(const e in s){const t=s[e];q(t)&&(r[e]=t.bind(n))}if(o){0;const t=o.call(n,n);0,G(t)&&(e.data=Pt(t))}if(br=!0,i)for(const e in i){const t=i[e],o=q(t)?t.bind(n,n):q(t.get)?t.get.bind(n,n):T;0;const s=!q(t)&&q(t.set)?t.set.bind(n):T,a=gi({get:o,set:s});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(a)for(const e in a)yr(a[e],r,n,e);if(l){const e=q(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{!function(e,t){if(Qo){let n=Qo.provides;const r=Qo.parent&&Qo.parent.provides;r===n&&(n=Qo.provides=Object.create(r)),n[e]=t}else 0}(t,e[t])})}function P(e,t){B(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(d&&vr(d,e,"c"),P(Jn,u),P(Zn,h),P(Qn,p),P(er,f),P($n,m),P(Gn,_),P(sr,S),P(ir,w),P(or,k),P(tr,b),P(nr,v),P(rr,C),B(M))if(M.length){const t=e.exposed||(e.exposed={});M.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});y&&e.render===T&&(e.render=y),null!=z&&(e.inheritAttrs=z),N&&(e.components=N),A&&(e.directives=A),C&&Ln(e)}function vr(e,t,n){sn(B(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function yr(e,t,n,r){let o=r.includes(".")?lo(n,r):()=>n[r];if(F(e)){const n=t[e];q(n)&&io(o,n)}else if(q(e))io(o,e.bind(n));else if(G(e))if(B(e))e.forEach(e=>yr(e,t,n,r));else{const r=q(e.handler)?e.handler.bind(n):t[e.handler];q(r)&&io(o,r,e)}else 0}function wr(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:o.length||n||r?(l={},o.length&&o.forEach(e=>kr(l,e,s,!0)),kr(l,t,s)):l=t,G(t)&&i.set(t,l),l}function kr(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&kr(e,i,n,!0),o&&o.forEach(t=>kr(e,t,n,!0));for(const o in t)if(r&&"expose"===o);else{const r=Sr[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const Sr={data:Cr,props:Ar,emits:Ar,methods:Nr,computed:Nr,beforeCreate:zr,created:zr,beforeMount:zr,mounted:zr,beforeUpdate:zr,updated:zr,beforeDestroy:zr,beforeUnmount:zr,destroyed:zr,unmounted:zr,activated:zr,deactivated:zr,errorCaptured:zr,serverPrefetch:zr,components:Nr,directives:Nr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=E(Object.create(null),e);for(const r in t)n[r]=zr(e[r],t[r]);return n},provide:Cr,inject:function(e,t){return Nr(Mr(e),Mr(t))}};function Cr(e,t){return t?e?function(){return E(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function Mr(e){if(B(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function zr(e,t){return e?[...new Set([].concat(e,t))]:t}function Nr(e,t){return e?E(Object.create(null),e,t):t}function Ar(e,t){return e?B(e)&&B(t)?[...new Set([...e,...t])]:E(Object.create(null),gr(e),gr(null!=t?t:{})):t}function Tr(){return{app:null,config:{isNativeTag:R,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Rr=0;function Pr(e,t){return function(n,r=null){q(n)||(n=E({},n)),null==r||G(r)||(r=null);const o=Tr(),i=new WeakSet,s=[];let a=!1;const l=o.app={_uid:Rr++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:bi,get config(){return o.config},set config(e){0},use:(e,...t)=>(i.has(e)||(e&&q(e.install)?(i.add(e),e.install(l,...t)):q(e)&&(i.add(e),e(l,...t))),l),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),l),component:(e,t)=>t?(o.components[e]=t,l):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,l):o.directives[e],mount(i,s,c){if(!a){0;const d=l._ceVNode||Ho(n,r);return d.appContext=o,!0===c?c="svg":!1===c&&(c=void 0),s&&t?t(d,i):e(d,i,c),a=!0,l._container=i,i.__vue_app__=l,fi(d.component)}},onUnmount(e){s.push(e)},unmount(){a&&(sn(s,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,l),runWithContext(e){const t=Or;Or=l;try{return e()}finally{Or=t}}};return l}}let Or=null;function Er(e,t,n=!1){const r=ei();if(r||Or){let o=Or?Or._context.provides:r?null==r.parent||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&q(t)?t.call(r&&r.proxy):t}else 0}const Lr={},Ir=()=>Object.create(Lr),Dr=e=>Object.getPrototypeOf(e)===Lr;function Br(e,t,n,r){const[o,i]=e.propsOptions;let s,a=!1;if(t)for(let l in t){if(X(l))continue;const c=t[l];let d;o&&D(o,d=Q(l))?i&&i.includes(d)?(s||(s={}))[d]=c:n[d]=c:fo(e.emitsOptions,l)||l in r&&c===r[l]||(r[l]=c,a=!0)}if(i){const t=Ht(n),r=s||N;for(let s=0;s<i.length;s++){const a=i[s];n[a]=jr(o,t,a,r[a],e,!D(r,a))}}return a}function jr(e,t,n,r,o,i){const s=e[n];if(null!=s){const e=D(s,"default");if(e&&void 0===r){const e=s.default;if(s.type!==Function&&!s.skipFactory&&q(e)){const{propsDefaults:i}=o;if(n in i)r=i[n];else{const s=ri(o);r=i[n]=e.call(null,t),s()}}else r=e;o.ce&&o.ce._setProp(n,r)}s[0]&&(i&&!e?r=!1:!s[1]||""!==r&&r!==te(n)||(r=!0))}return r}const Hr=new WeakMap;function qr(e,t,n=!1){const r=n?Hr:t.propsCache,o=r.get(e);if(o)return o;const i=e.props,s={},a=[];let l=!1;if(!q(e)){const r=e=>{l=!0;const[n,r]=qr(e,t,!0);E(s,n),r&&a.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!i&&!l)return G(e)&&r.set(e,A),A;if(B(i))for(let e=0;e<i.length;e++){0;const t=Q(i[e]);Fr(t)&&(s[t]=N)}else if(i){0;for(const e in i){const t=Q(e);if(Fr(t)){const n=i[e],r=s[t]=B(n)||q(n)?{type:n}:E({},n),o=r.type;let l=!1,c=!0;if(B(o))for(let e=0;e<o.length;++e){const t=o[e],n=q(t)&&t.name;if("Boolean"===n){l=!0;break}"String"===n&&(c=!1)}else l=q(o)&&"Boolean"===o.name;r[0]=l,r[1]=c,(l||D(r,"default"))&&a.push(t)}}}const c=[s,a];return G(e)&&r.set(e,c),c}function Fr(e){return"$"!==e[0]&&!X(e)}const $r=e=>"_"===e||"_ctx"===e||"$stable"===e,Gr=e=>B(e)?e.map(Uo):[Uo(e)],Vr=(e,t,n)=>{if(t._n)return t;const r=Mn((...e)=>Gr(t(...e)),n);return r._c=!1,r},Ur=(e,t,n)=>{const r=e._ctx;for(const n in e){if($r(n))continue;const o=e[n];if(q(o))t[n]=Vr(0,o,r);else if(null!=o){0;const e=Gr(o);t[n]=()=>e}}},Kr=(e,t)=>{const n=Gr(t);e.slots.default=()=>n},Wr=(e,t,n)=>{for(const r in t)!n&&$r(r)||(e[r]=t[r])};const Yr=yo;function Xr(e,t){ce().__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:s,createComment:a,setText:l,setElementText:c,parentNode:d,nextSibling:u,setScopeId:h=T,insertStaticContent:p}=e,f=(e,t,n,r=null,o=null,i=null,s=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Io(e,t)&&(r=V(e),H(e,o,i,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:d,shapeFlag:u}=t;switch(c){case ko:m(e,t,n,r);break;case So:_(e,t,n,r);break;case Co:null==e&&g(t,n,r,s);break;case wo:M(e,t,n,r,o,i,s,a,l);break;default:1&u?x(e,t,n,r,o,i,s,a,l):6&u?z(e,t,n,r,o,i,s,a,l):(64&u||128&u)&&c.process(e,t,n,r,o,i,s,a,l,W)}null!=d&&o?Bn(d,e&&e.ref,i,t||e,!t):null==d&&e&&null!=e.ref&&Bn(e.ref,null,i,e,!0)},m=(e,t,r,o)=>{if(null==e)n(t.el=s(t.children),r,o);else{const n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,r,o)=>{null==e?n(t.el=a(t.children||""),r,o):t.el=e.el},g=(e,t,n,r)=>{[e.el,e.anchor]=p(e.children,t,n,r,e.el,e.anchor)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=u(e),r(e),e=n;r(t)},x=(e,t,n,r,o,i,s,a,l)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?v(t,n,r,o,i,s,a,l):k(e,t,o,i,s,a,l)},v=(e,t,r,s,a,l,d,u)=>{let h,p;const{props:f,shapeFlag:m,transition:_,dirs:g}=e;if(h=e.el=i(e.type,l,f&&f.is,f),8&m?c(h,e.children):16&m&&w(e.children,h,null,s,a,Jr(e,l),d,u),g&&Nn(e,null,s,"created"),y(h,e,e.scopeId,d,s),f){for(const e in f)"value"===e||X(e)||o(h,e,null,f[e],l,s);"value"in f&&o(h,"value",null,f.value,l),(p=f.onVnodeBeforeMount)&&Yo(p,s,e)}g&&Nn(e,null,s,"beforeMount");const b=Qr(a,_);b&&_.beforeEnter(h),n(h,t,r),((p=f&&f.onVnodeMounted)||b||g)&&Yr(()=>{p&&Yo(p,s,e),b&&_.enter(h),g&&Nn(e,null,s,"mounted")},a)},y=(e,t,n,r,o)=>{if(n&&h(e,n),r)for(let t=0;t<r.length;t++)h(e,r[t]);if(o){let n=o.subTree;if(t===n||vo(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=o.vnode;y(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},w=(e,t,n,r,o,i,s,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?Ko(e[c]):Uo(e[c]);f(null,l,t,n,r,o,i,s,a)}},k=(e,t,n,r,i,s,a)=>{const l=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:h}=t;d|=16&e.patchFlag;const p=e.props||N,f=t.props||N;let m;if(n&&Zr(n,!1),(m=f.onVnodeBeforeUpdate)&&Yo(m,n,t,e),h&&Nn(t,e,n,"beforeUpdate"),n&&Zr(n,!0),(p.innerHTML&&null==f.innerHTML||p.textContent&&null==f.textContent)&&c(l,""),u?S(e.dynamicChildren,u,l,n,r,Jr(t,i),s):a||L(e,t,l,null,n,r,Jr(t,i),s,!1),d>0){if(16&d)C(l,p,f,n,i);else if(2&d&&p.class!==f.class&&o(l,"class",null,f.class,i),4&d&&o(l,"style",p.style,f.style,i),8&d){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const r=e[t],s=p[r],a=f[r];a===s&&"value"!==r||o(l,r,s,a,i,n)}}1&d&&e.children!==t.children&&c(l,t.children)}else a||null!=u||C(l,p,f,n,i);((m=f.onVnodeUpdated)||h)&&Yr(()=>{m&&Yo(m,n,t,e),h&&Nn(t,e,n,"updated")},r)},S=(e,t,n,r,o,i,s)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],u=l.el&&(l.type===wo||!Io(l,c)||198&l.shapeFlag)?d(l.el):n;f(l,c,u,null,r,o,i,s,!0)}},C=(e,t,n,r,i)=>{if(t!==n){if(t!==N)for(const s in t)X(s)||s in n||o(e,s,t[s],null,i,r);for(const s in n){if(X(s))continue;const a=n[s],l=t[s];a!==l&&"value"!==s&&o(e,s,l,a,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},M=(e,t,r,o,i,a,l,c,d)=>{const u=t.el=e?e.el:s(""),h=t.anchor=e?e.anchor:s("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(u,r,o),n(h,r,o),w(t.children||[],r,h,i,a,l,c,d)):p>0&&64&p&&f&&e.dynamicChildren?(S(e.dynamicChildren,f,r,i,a,l,c),(null!=t.key||i&&t===i.subTree)&&eo(e,t,!0)):L(e,t,r,h,i,a,l,c,d)},z=(e,t,n,r,o,i,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,s,l):R(t,n,r,o,i,s,l):P(e,t,l)},R=(e,t,n,r,o,i,s)=>{const a=e.component=Zo(e,r,o);if(qn(e)&&(a.ctx.renderer=W),ci(a,!1,s),a.asyncDep){if(o&&o.registerDep(a,O,s),!e.el){const r=a.subTree=Ho(So);_(null,r,t,n),e.placeholder=r.el}}else O(a,e,t,n,o,i,s)},P=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;0;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!o&&!a||a&&a.$stable)||r!==s&&(r?!s||bo(r,s,c):!!s);if(1024&l)return!0;if(16&l)return r?bo(r,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==r[n]&&!fo(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void E(r,t,n);r.next=t,r.update()}else t.el=e.el,r.vnode=t},O=(e,t,n,r,o,i,s)=>{const a=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:l,vnode:c}=e;{const n=to(e);if(n)return t&&(t.el=c.el,E(e,t,s)),void n.asyncDep.then(()=>{e.isUnmounted||a()})}let u,h=t;0,Zr(e,!1),t?(t.el=c.el,E(e,t,s)):t=c,n&&ie(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Yo(u,l,t,c),Zr(e,!0);const p=mo(e);0;const m=e.subTree;e.subTree=p,f(m,p,d(m.el),V(m),e,o,i),t.el=p.el,null===h&&xo(e,p.el),r&&Yr(r,o),(u=t.props&&t.props.onVnodeUpdated)&&Yr(()=>Yo(u,l,t,c),o)}else{let s;const{el:a,props:l}=t,{bm:c,m:d,parent:u,root:h,type:p}=e,m=Hn(t);if(Zr(e,!1),c&&ie(c),!m&&(s=l&&l.onVnodeBeforeMount)&&Yo(s,u,t),Zr(e,!0),a&&J){const t=()=>{e.subTree=mo(e),J(a,e.subTree,e,o,null)};m&&p.__asyncHydrate?p.__asyncHydrate(a,e,t):t()}else{h.ce&&!1!==h.ce._def.shadowRoot&&h.ce._injectChildStyle(p);const s=e.subTree=mo(e);0,f(null,s,n,r,e,o,i),t.el=s.el}if(d&&Yr(d,o),!m&&(s=l&&l.onVnodeMounted)){const e=t;Yr(()=>Yo(s,u,e),o)}(256&t.shapeFlag||u&&Hn(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&Yr(e.a,o),e.isMounted=!0,t=n=r=null}};e.scope.on();const l=e.effect=new ze(a);e.scope.off();const c=e.update=l.run.bind(l),u=e.job=l.runIfDirty.bind(l);u.i=e,u.id=e.uid,l.scheduler=()=>_n(u),Zr(e,!0),c()},E=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=Ht(o),[l]=e.propsOptions;let c=!1;if(!(r||s>0)||16&s){let r;Br(e,t,o,i)&&(c=!0);for(const i in a)t&&(D(t,i)||(r=te(i))!==i&&D(t,r))||(l?!n||void 0===n[i]&&void 0===n[r]||(o[i]=jr(l,a,i,void 0,e,!0)):delete o[i]);if(i!==a)for(const e in i)t&&D(t,e)||(delete i[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(fo(e.emitsOptions,s))continue;const d=t[s];if(l)if(D(i,s))d!==i[s]&&(i[s]=d,c=!0);else{const t=Q(s);o[t]=jr(l,a,t,d,e,!1)}else d!==i[s]&&(i[s]=d,c=!0)}}c&&et(e.attrs,"set","")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=N;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:Wr(o,t,n):(i=!t.$stable,Ur(t,o)),s=t}else t&&(Kr(e,t),s={default:1});if(i)for(const e in o)$r(e)||null!=s[e]||delete o[e]})(e,t.children,n),Fe(),xn(e),$e()},L=(e,t,n,r,o,i,s,a,l=!1)=>{const d=e&&e.children,u=e?e.shapeFlag:0,h=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void B(d,h,n,r,o,i,s,a,l);if(256&p)return void I(d,h,n,r,o,i,s,a,l)}8&f?(16&u&&G(d,o,i),h!==d&&c(n,h)):16&u?16&f?B(d,h,n,r,o,i,s,a,l):G(d,o,i,!0):(8&u&&c(n,""),16&f&&w(h,n,r,o,i,s,a,l))},I=(e,t,n,r,o,i,s,a,l)=>{t=t||A;const c=(e=e||A).length,d=t.length,u=Math.min(c,d);let h;for(h=0;h<u;h++){const r=t[h]=l?Ko(t[h]):Uo(t[h]);f(e[h],r,n,null,o,i,s,a,l)}c>d?G(e,o,i,!0,!1,u):w(t,n,r,o,i,s,a,l,u)},B=(e,t,n,r,o,i,s,a,l)=>{let c=0;const d=t.length;let u=e.length-1,h=d-1;for(;c<=u&&c<=h;){const r=e[c],d=t[c]=l?Ko(t[c]):Uo(t[c]);if(!Io(r,d))break;f(r,d,n,null,o,i,s,a,l),c++}for(;c<=u&&c<=h;){const r=e[u],c=t[h]=l?Ko(t[h]):Uo(t[h]);if(!Io(r,c))break;f(r,c,n,null,o,i,s,a,l),u--,h--}if(c>u){if(c<=h){const e=h+1,u=e<d?t[e].el:r;for(;c<=h;)f(null,t[c]=l?Ko(t[c]):Uo(t[c]),n,u,o,i,s,a,l),c++}}else if(c>h)for(;c<=u;)H(e[c],o,i,!0),c++;else{const p=c,m=c,_=new Map;for(c=m;c<=h;c++){const e=t[c]=l?Ko(t[c]):Uo(t[c]);null!=e.key&&_.set(e.key,c)}let g,b=0;const x=h-m+1;let v=!1,y=0;const w=new Array(x);for(c=0;c<x;c++)w[c]=0;for(c=p;c<=u;c++){const r=e[c];if(b>=x){H(r,o,i,!0);continue}let d;if(null!=r.key)d=_.get(r.key);else for(g=m;g<=h;g++)if(0===w[g-m]&&Io(r,t[g])){d=g;break}void 0===d?H(r,o,i,!0):(w[d-m]=c+1,d>=y?y=d:v=!0,f(r,t[d],n,null,o,i,s,a,l),b++)}const k=v?function(e){const t=e.slice(),n=[0];let r,o,i,s,a;const l=e.length;for(r=0;r<l;r++){const l=e[r];if(0!==l){if(o=n[n.length-1],e[o]<l){t[r]=o,n.push(r);continue}for(i=0,s=n.length-1;i<s;)a=i+s>>1,e[n[a]]<l?i=a+1:s=a;l<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(w):A;for(g=k.length-1,c=x-1;c>=0;c--){const e=m+c,u=t[e],h=t[e+1],p=e+1<d?h.el||h.placeholder:r;0===w[c]?f(null,u,n,p,o,i,s,a,l):v&&(g<0||c!==k[g]?j(u,n,p,2):g--)}}},j=(e,t,o,i,s=null)=>{const{el:a,type:l,transition:c,children:d,shapeFlag:h}=e;if(6&h)return void j(e.component.subTree,t,o,i);if(128&h)return void e.suspense.move(t,o,i);if(64&h)return void l.move(e,t,o,W);if(l===wo){n(a,t,o);for(let e=0;e<d.length;e++)j(d[e],t,o,i);return void n(e.anchor,t,o)}if(l===Co)return void(({el:e,anchor:t},r,o)=>{let i;for(;e&&e!==t;)i=u(e),n(e,r,o),e=i;n(t,r,o)})(e,t,o);if(2!==i&&1&h&&c)if(0===i)c.beforeEnter(a),n(a,t,o),Yr(()=>c.enter(a),s);else{const{leave:i,delayLeave:s,afterLeave:l}=c,d=()=>{e.ctx.isUnmounted?r(a):n(a,t,o)},u=()=>{a._isLeaving&&a[Rn](!0),i(a,()=>{d(),l&&l()})};s?s(a,d,u):u()}else n(a,t,o)},H=(e,t,n,r=!1,o=!1)=>{const{type:i,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:d,patchFlag:u,dirs:h,cacheIndex:p}=e;if(-2===u&&(o=!1),null!=a&&(Fe(),Bn(a,null,n,e,!0),$e()),null!=p&&(t.renderCache[p]=void 0),256&d)return void t.ctx.deactivate(e);const f=1&d&&h,m=!Hn(e);let _;if(m&&(_=s&&s.onVnodeBeforeUnmount)&&Yo(_,t,e),6&d)$(e.component,n,r);else{if(128&d)return void e.suspense.unmount(n,r);f&&Nn(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,W,r):c&&!c.hasOnce&&(i!==wo||u>0&&64&u)?G(c,t,n,!1,!0):(i===wo&&384&u||!o&&16&d)&&G(l,t,n),r&&q(e)}(m&&(_=s&&s.onVnodeUnmounted)||f)&&Yr(()=>{_&&Yo(_,t,e),f&&Nn(e,null,t,"unmounted")},n)},q=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===wo)return void F(n,o);if(t===Co)return void b(e);const s=()=>{r(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,o=()=>t(n,s);r?r(e.el,s,o):o()}else s()},F=(e,t)=>{let n;for(;e!==t;)n=u(e),r(e),e=n;r(t)},$=(e,t,n)=>{const{bum:r,scope:o,job:i,subTree:s,um:a,m:l,a:c}=e;no(l),no(c),r&&ie(r),o.stop(),i&&(i.flags|=8,H(s,e,t,n)),a&&Yr(a,t),Yr(()=>{e.isUnmounted=!0},t)},G=(e,t,n,r=!1,o=!1,i=0)=>{for(let s=i;s<e.length;s++)H(e[s],t,n,r,o)},V=e=>{if(6&e.shapeFlag)return V(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=u(e.anchor||e.el),n=t&&t[An];return n?u(n):t};let U=!1;const K=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),t._vnode=e,U||(U=!0,xn(),vn(),U=!1)},W={p:f,um:H,m:j,r:q,mt:R,mc:w,pc:L,pbc:S,n:V,o:e};let Y,J;return t&&([Y,J]=t(W)),{render:K,hydrate:Y,createApp:Pr(K,Y)}}function Jr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Zr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Qr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function eo(e,t,n=!1){const r=e.children,o=t.children;if(B(r)&&B(o))for(let e=0;e<r.length;e++){const t=r[e];let i=o[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=o[e]=Ko(o[e]),i.el=t.el),n||-2===i.patchFlag||eo(t,i)),i.type===ko&&-1!==i.patchFlag&&(i.el=t.el),i.type!==So||i.el||(i.el=t.el)}}function to(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:to(t)}function no(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const ro=Symbol.for("v-scx"),oo=()=>{{const e=Er(ro);return e}};function io(e,t,n){return so(e,t,n)}function so(e,t,n=N){const{immediate:r,deep:o,flush:i,once:s}=n;const a=E({},n);const l=t&&r||!t&&"post"!==i;let c;if(li)if("sync"===i){const e=oo();c=e.__watcherHandles||(e.__watcherHandles=[])}else if(!l){const e=()=>{};return e.stop=T,e.resume=T,e.pause=T,e}const d=Qo;a.call=(e,t,n)=>sn(e,d,t,n);let u=!1;"post"===i?a.scheduler=e=>{Yr(e,d&&d.suspense)}:"sync"!==i&&(u=!0,a.scheduler=(e,t)=>{t?e():_n(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,d&&(e.id=d.uid,e.i=d))};const h=nn(e,t,a);return li&&(c?c.push(h):l&&h()),h}function ao(e,t,n){const r=this.proxy,o=F(e)?e.includes(".")?lo(r,e):()=>r[e]:e.bind(r,r);let i;q(t)?i=t:(i=t.handler,n=t);const s=ri(this),a=so(o,i.bind(r),n);return s(),a}function lo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const co=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${Q(t)}Modifiers`]||e[`${te(t)}Modifiers`];function uo(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||N;let o=n;const i=t.startsWith("update:"),s=i&&co(r,t.slice(7));let a;s&&(s.trim&&(o=n.map(e=>F(e)?e.trim():e)),s.number&&(o=n.map(ae)));let l=r[a=re(t)]||r[a=re(Q(t))];!l&&i&&(l=r[a=re(te(t))]),l&&sn(l,e,6,o);const c=r[a+"Once"];if(c){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,sn(c,e,6,o)}}const ho=new WeakMap;function po(e,t,n=!1){const r=n?ho:t.emitsCache,o=r.get(e);if(void 0!==o)return o;const i=e.emits;let s={},a=!1;if(!q(e)){const r=e=>{const n=po(e,t,!0);n&&(a=!0,E(s,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return i||a?(B(i)?i.forEach(e=>s[e]=null):E(s,i),G(e)&&r.set(e,s),s):(G(e)&&r.set(e,null),null)}function fo(e,t){return!(!e||!P(t))&&(t=t.slice(2).replace(/Once$/,""),D(e,t[0].toLowerCase()+t.slice(1))||D(e,te(t))||D(e,t))}function mo(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:s,attrs:a,emit:l,render:c,renderCache:d,props:u,data:h,setupState:p,ctx:f,inheritAttrs:m}=e,_=Cn(e);let g,b;try{if(4&n.shapeFlag){const e=o||r,t=e;g=Uo(c.call(t,e,d,u,p,h,f)),b=a}else{const e=t;0,g=Uo(e.length>1?e(u,{attrs:a,slots:s,emit:l}):e(u,null)),b=t.props?a:_o(a)}}catch(t){Mo.length=0,an(t,e,1),g=Ho(So)}let x=g;if(b&&!1!==m){const e=Object.keys(b),{shapeFlag:t}=x;e.length&&7&t&&(i&&e.some(O)&&(b=go(b,i)),x=Fo(x,b,!1,!0))}return n.dirs&&(x=Fo(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&On(x,n.transition),g=x,Cn(_),g}const _o=e=>{let t;for(const n in e)("class"===n||"style"===n||P(n))&&((t||(t={}))[n]=e[n]);return t},go=(e,t)=>{const n={};for(const r in e)O(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function bo(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const i=r[o];if(t[i]!==e[i]&&!fo(n,i))return!0}return!1}function xo({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r!==e)break;(e=t.vnode).el=n,t=t.parent}}const vo=e=>e.__isSuspense;function yo(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):bn(e)}const wo=Symbol.for("v-fgt"),ko=Symbol.for("v-txt"),So=Symbol.for("v-cmt"),Co=Symbol.for("v-stc"),Mo=[];let zo=null;function No(e=!1){Mo.push(zo=e?null:[])}function Ao(){Mo.pop(),zo=Mo[Mo.length-1]||null}let To=1;function Ro(e,t=!1){To+=e,e<0&&zo&&t&&(zo.hasOnce=!0)}function Po(e){return e.dynamicChildren=To>0?zo||A:null,Ao(),To>0&&zo&&zo.push(e),e}function Oo(e,t,n,r,o,i){return Po(jo(e,t,n,r,o,i,!0))}function Eo(e,t,n,r,o){return Po(Ho(e,t,n,r,o,!0))}function Lo(e){return!!e&&!0===e.__v_isVNode}function Io(e,t){return e.type===t.type&&e.key===t.key}const Do=({key:e})=>null!=e?e:null,Bo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?F(e)||Gt(e)||q(e)?{i:kn,r:e,k:t,f:!!n}:e:null);function jo(e,t=null,n=null,r=0,o=null,i=(e===wo?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Do(t),ref:t&&Bo(t),scopeId:Sn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:kn};return a?(Wo(l,n),128&i&&e.normalize(l)):n&&(l.shapeFlag|=F(n)?8:16),To>0&&!s&&zo&&(l.patchFlag>0||6&i)&&32!==l.patchFlag&&zo.push(l),l}const Ho=qo;function qo(e,t=null,n=null,r=0,o=null,i=!1){if(e&&e!==lr||(e=So),Lo(e)){const r=Fo(e,t,!0);return n&&Wo(r,n),To>0&&!i&&zo&&(6&r.shapeFlag?zo[zo.indexOf(e)]=r:zo.push(r)),r.patchFlag=-2,r}if(_i(e)&&(e=e.__vccOpts),t){t=function(e){return e?jt(e)||Dr(e)?E({},e):e:null}(t);let{class:e,style:n}=t;e&&!F(e)&&(t.class=me(e)),G(n)&&(jt(n)&&!B(n)&&(n=E({},n)),t.style=de(n))}return jo(e,t,n,r,o,F(e)?1:vo(e)?128:Tn(e)?64:G(e)?4:q(e)?2:0,i,!0)}function Fo(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:s,children:a,transition:l}=e,c=t?function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=me([t.class,r.class]));else if("style"===e)t.style=de([t.style,r.style]);else if(P(e)){const n=t[e],o=r[e];!o||n===o||B(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=r[e])}return t}(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Do(c),ref:t&&t.ref?n&&i?B(i)?i.concat(Bo(t)):[i,Bo(t)]:Bo(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==wo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Fo(e.ssContent),ssFallback:e.ssFallback&&Fo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&On(d,l.clone(d)),d}function $o(e=" ",t=0){return Ho(ko,null,e,t)}function Go(e,t){const n=Ho(Co,null,e);return n.staticCount=t,n}function Vo(e="",t=!1){return t?(No(),Eo(So,null,e)):Ho(So,null,e)}function Uo(e){return null==e||"boolean"==typeof e?Ho(So):B(e)?Ho(wo,null,e.slice()):Lo(e)?Ko(e):Ho(ko,null,String(e))}function Ko(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Fo(e)}function Wo(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(B(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Wo(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||Dr(t)?3===r&&kn&&(1===kn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=kn}}else q(t)?(t={default:t,_ctx:kn},n=32):(t=String(t),64&r?(n=16,t=[$o(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yo(e,t,n,r=null){sn(e,t,7,[n,r])}const Xo=Tr();let Jo=0;function Zo(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Xo,i={uid:Jo++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ce(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:qr(r,o),emitsOptions:po(r,o),emit:null,emitted:null,propsDefaults:N,inheritAttrs:r.inheritAttrs,ctx:N,data:N,props:N,attrs:N,slots:N,refs:N,setupState:N,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=uo.bind(null,i),e.ce&&e.ce(i),i}let Qo=null;const ei=()=>Qo||kn;let ti,ni;{const e=ce(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ti=t("__VUE_INSTANCE_SETTERS__",e=>Qo=e),ni=t("__VUE_SSR_SETTERS__",e=>li=e)}const ri=e=>{const t=Qo;return ti(e),e.scope.on(),()=>{e.scope.off(),ti(t)}},oi=()=>{Qo&&Qo.scope.off(),ti(null)};function ii(e){return 4&e.vnode.shapeFlag}let si,ai,li=!1;function ci(e,t=!1,n=!1){t&&ni(t);const{props:r,children:o}=e.vnode,i=ii(e);!function(e,t,n,r=!1){const o={},i=Ir();e.propsDefaults=Object.create(null),Br(e,t,o,i);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:Ot(o):e.type.props?e.props=o:e.props=i,e.attrs=i}(e,r,i,t),((e,t,n)=>{const r=e.slots=Ir();if(32&e.vnode.shapeFlag){const e=t._;e?(Wr(r,t,n),n&&se(r,"_",e,!0)):Ur(t,r)}else t&&Kr(e,t)})(e,o,n||t);const s=i?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,_r),!1;const{setup:r}=n;if(r){Fe();const n=e.setupContext=r.length>1?pi(e):null,o=ri(e),i=on(r,e,0,[e.props,n]),s=V(i);if($e(),o(),!s&&!e.sp||Hn(e)||Ln(e),s){if(i.then(oi,oi),t)return i.then(n=>{di(e,n,t)}).catch(t=>{an(t,e,0)});e.asyncDep=i}else di(e,i,t)}else ui(e,t)}(e,t):void 0;return t&&ni(!1),s}function di(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:G(t)&&(e.setupState=Jt(t)),ui(e,n)}function ui(e,t,n){const r=e.type;if(!e.render){if(!t&&si&&!r.render){const t=r.template||wr(e).template;if(t){0;const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:i,compilerOptions:s}=r,a=E(E({isCustomElement:n,delimiters:i},o),s);r.render=si(t,a)}}e.render=r.render||T,ai&&ai(e)}{const t=ri(e);Fe();try{xr(e)}finally{$e(),t()}}}const hi={get:(e,t)=>(Qe(e,0,""),e[t])};function pi(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,hi),slots:e.slots,emit:e.emit,expose:t}}function fi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Jt(qt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in fr?fr[n](e):void 0,has:(e,t)=>t in e||t in fr})):e.proxy}function mi(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function _i(e){return q(e)&&"__vccOpts"in e}const gi=(e,t)=>{const n=function(e,t,n=!1){let r,o;return q(e)?r=e:(r=e.get,o=e.set),new Zt(r,o,n)}(e,0,li);return n};const bi="3.5.21";class xi{_root;get root(){return this._root}get doc(){const e=this.root;if(e instanceof cu)return e}get courier(){return this.root.courier}get history(){return this.root.history}get cursor(){return this.root.cursor}get event(){return this.root.event}get listener(){return this.root.listener}get clipboard(){return this.root.clipboard}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get config(){return this.root.config}get stats(){return this.root.stats}get hotkeys(){return this.root.hotkeys}constructor(e){this._root=e}}class vi{static _funcs=new Map;static get url(){return this._funcs.get("asset-url")}static get tips(){return this._funcs.get("tip")}static register_asset_url(e){this._funcs.set("asset-url",e)}static register_tip(e){this._funcs.set("tip",e)}}let yi=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const wi={default:{name:"默认",css:'\ufeff/* ————————————————— Default Theme · 深空笔记 ————————————————— */\r\n/* 主色:深空青 #0891b2 / 星光青 #22d3ee / 天际蓝 #0ea5e9 */\r\n/* 亮色:星雾白 #f2fbfd / 深海墨 #0c1e28 */\r\n/* 暗色:深空黑 #060e14 / 星雾蓝白 #c0e8f4 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\ncube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f2fbfd;\r\n --color: #0c1e28;\r\n\r\n --selection-bg: #0891b2;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #b0dcea;\r\n --ui-close-corner-bg: #0891b2;\r\n --cube-bg: #e8f6fa30;\r\n --cube-toolbar-bg: #ddf2f830;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #e8f6fa99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #0891b2cc, #22d3eecc);\r\n --float-node-layout-usable-color: #0c1e28;\r\n --float-node-layout-disable-color: #b0dceacc;\r\n --float-node-layout-shadow: 0px 2px 8px #0c1e280a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #0891b230;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #ddf4facc, #d0eefarcc);\r\n --menu-title-icon-color: #0891b2;\r\n --menu-item-color: #0c1e28;\r\n --menu-item-bg-hover: #e8f6fa;\r\n --menu-item-active-color: #0891b2;\r\n --menu-shortcut-color: #7ab8cc;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c0dce8;\r\n --menu-dialog-mask-bg: rgba(12, 30, 40, 0.18);\r\n --menu-dialog-input-border: 1px solid #c8e8f0;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #0c1e28;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e8f6facc;\r\n --submenu-node-line-header-color: #5aa8bccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0891b2;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #0c1e2812;\r\n --map-mini-bg: rgba(248, 252, 255, 0.95);\r\n --map-mini-border: #e2e8f0;\r\n --map-mini-title-color: #94a3b8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #0891b218;\r\n --placeholder-box-selector-stroke: #0891b2;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e8f6fa40;\r\n --submap-shadow: #22d3ee 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #e8f6fa70;\r\n --node-selected-stroke: #0891b2;\r\n --node-editable-bg: #f2fbfd40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #b0dce8;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #d0eefa80 0%, #d8f4fa80 50%, #c8f0f880 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 14px #0891b240;\r\n --scope-item-bg: linear-gradient(135deg, #ddf4facf 0%, #c8f0f8cf 50%, #d0eef8cf 100%);\r\n --scope-item-border: 1px solid #7ae0f0;\r\n --scope-item-color: #0c1e28;\r\n --scope-item-shadow: 0px 2px 10px #0891b220;\r\n --scope-icon-color: #0c1e28;\r\n --scope-icon-shadow: 0px 0px 8px #0891b250;\r\n --scope-icon-hover-color: #0891b2;\r\n --scope-icon-hover-shadow: 0px 0px 10px #0891b2;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #0c1e2814;\r\n --postil-text-color: #0891b2;\r\n --postil-text-box-bg: rgb(232 246 250 / 0.88);\r\n --postil-text-icon-close-bg: #b0dceaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0891b2;\r\n --table-cell-bg: #e8f6faa0;\r\n --table-cell-selection-bg: #0891b225;\r\n --table-cell-active-bg: #22d3ee40;\r\n --table-title-bg: #c8eef890;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0891b225;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #e8f6fac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #d0eefa5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ddf4facc;\r\n --box-columns-layout-item-hover-color: #0891b2;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddf2f870;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e8f6fa70;\r\n --code-tabbar-item-bg: #cce8f078;\r\n --code-tabbar-item-color: #7ab8c878;\r\n --code-tabbar-item-active-color: #0c1e28;\r\n --code-tabbar-item-active-bg: #c8e8f078;\r\n --code-tabbar-item-active-border: 1px solid #b0dce8;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #0891b2;\r\n --code-tooltip-bg: #0c1e28;\r\n --code-tooltip-color: #b0dce8cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #c8e8f0;\r\n --code-input-color: #0c1e28;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #0891b225;\r\n --list-item-bg: #e8f6fa70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e8f6faad;\r\n --todoitem-status-border: 1px solid #c8e8f0;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0891b2;\r\n --todoitem-done-color: #7ab8c8;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e8f6fa80;\r\n --img-load-failed-color: #b0dce880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #d0eefa7d;\r\n --tip-border: 1px solid #22d3ee80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e8f6fa70;\r\n --detail-even-bg: #ddf4fa70;\r\n --detail-adder-bg: #e8f6fa40;\r\n --detail-list-border: 1px solid #d0eefa;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddf4fa80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #eef8fb;\r\n --text-link-bg: #ddf4fa;\r\n --text-link-color: #0c1e28;\r\n --text-link-icon-hover-bg: #0891b2;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #22d3ee;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ddf4fa30;\r\n --line-hover-bg: #ddf4fa30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22d3ee;\r\n --box-bg: #ddf4fa40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0891b2cc, #22d3eec2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-fold-bg: #0c1e28;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d0eefa80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0891b2;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0891b240;\r\n\r\n --box-folder-tag-active-border: 2px solid #0891b2;\r\n --box-folder-tag-active-bg: #0891b2;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #0891b260;\r\n\r\n --box-folder-border: 2px dashed #22d3ee80;\r\n --box-folder-active-bg: #d0eefa80;\r\n --box-folder-active-border: 1px solid #0891b2;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #164e63cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #060e14;\r\n --color: #c0e8f4;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #0891b2;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #0e2a38;\r\n --ui-close-corner-bg: #22d3ee;\r\n --cube-bg: #0c1e2830;\r\n --cube-toolbar-bg: #0e243040;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #0c1e2899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #093848cc, #0e4a5ecc);\r\n --float-node-layout-usable-color: #c0e8f4;\r\n --float-node-layout-disable-color: #0e2a38;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #0891b240;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #08161ecc;\r\n --menu-title-bg: linear-gradient(120deg, #091e2acc, #0c2232cc);\r\n --menu-title-icon-color: #22d3ee;\r\n --menu-item-color: #c0e8f4;\r\n --menu-item-bg-hover: #0e243acc;\r\n --menu-item-active-color: #22d3ee;\r\n --menu-shortcut-color: #1e4858;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #0e2838;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.5);\r\n --menu-dialog-input-border: 1px solid #0e2a3888;\r\n --menu-dialog-bg: #08161ecc;\r\n --menu-dialog-color: #c0e8f4;\r\n\r\n --submenu-node-line-header-bg: #0c1e2833;\r\n --submenu-node-line-header-color: #22d3eecc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #22d3ee;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #082030b3 0%, #0a2840b3 50%, #082438b3 100%);\r\n --scope-border: 2px solid #0891b2;\r\n --scope-shadow: 0px 0px 14px #0891b260;\r\n --scope-item-bg: linear-gradient(135deg, #082030e6 0%, #0a2840e6 50%, #082438e6 100%);\r\n --scope-item-border: 1px solid #22d3eed9;\r\n --scope-item-color: #a8dced;\r\n --scope-item-shadow: 0px 2px 12px #0891b240;\r\n --scope-icon-color: #c0e8f4;\r\n --scope-icon-shadow: 0px 0px 10px #22d3ee;\r\n --scope-icon-hover-color: #22d3ee;\r\n --scope-icon-hover-shadow: 0px 0px 12px #22d3ee;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #060e14;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(6, 14, 20, 0.92);\r\n --map-mini-border: #1e3a5060;\r\n --map-mini-title-color: #38bdf870;\r\n\r\n --placeholder-box-selector-fill: #0891b218;\r\n --placeholder-box-selector-stroke: #22d3ee99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #060e1440;\r\n --submap-shadow: #0891b280 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #0c1e2840;\r\n --node-selected-stroke: #22d3eedd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #0e2a3c;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #22d3ee;\r\n --postil-text-box-bg: #0c1e2880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22d3ee;\r\n --table-cell-bg: #0c1e2870;\r\n --table-cell-selection-bg: #0891b23a;\r\n --table-cell-active-bg: #0d3848a0;\r\n --table-title-bg: #0e243090;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #0c1e28cc;\r\n --box-columns-layout-item-hover-color: #22d3ee;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #0c1e2870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0891b230;\r\n --annotation-bg: #0c1e28bf;\r\n --annotation-box-bg: #0e2438c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #09203055;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #0c1e28a8;\r\n --code-tabbar-item-bg: #0e243a80;\r\n --code-tabbar-item-color: #22d3ee;\r\n --code-tabbar-item-active-color: #7ae8f8;\r\n --code-tabbar-item-active-bg: #0e243a78;\r\n --code-tabbar-item-active-border: 1px solid #174858;\r\n --code-toolbar-bg: #0c1e2847;\r\n --code-toolbar-item-hover-color: #22d3ee;\r\n --code-tooltip-bg: rgb(8 145 178 / 50%);\r\n --code-tooltip-color: #a8dcedcc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #0e2a3888;\r\n --code-input-color: #c0e8f4;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #0c1e2870;\r\n --list-ordered-symbol-hover-bg: #0891b240;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #0c1e28ad;\r\n --todoitem-status-border: 1px solid #0e2a3888;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0891b2;\r\n --todoitem-done-color: #1e4858;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #0c1e2880;\r\n --img-load-failed-color: #0e2a3880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0820307d;\r\n --tip-border: 1px solid #0891b280;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #0c1e2870;\r\n --detail-even-bg: #0e243a70;\r\n --detail-adder-bg: #0c1e2840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0e243a50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #08161ead;\r\n --text-link-box-bg: #0c1e28c9;\r\n --text-link-bg: #0e243acc;\r\n --text-link-color: #c0e8f4e8;\r\n --text-link-icon-hover-bg: #0891b260;\r\n --text-link-icon-hover-color: #22d3eee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0891b2b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #0c1e2830;\r\n --line-hover-bg: #0c1e2830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0891b2;\r\n --box-bg: #0c1e2840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0891b2cc, #22d3eec2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #c0e8f4;\r\n --box-root-drag-enter-bg: #0e2a3880;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0891b2;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #0891b260;\r\n\r\n --box-folder-tag-active-border: 2px solid #0891b2;\r\n --box-folder-tag-active-bg: #0891b2;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #22d3ee;\r\n\r\n --box-folder-border: 2px dashed #0891b280;\r\n --box-folder-active-bg: #0e2a3880;\r\n --box-folder-active-border: 1px solid #22d3ee;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fde68a11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fde68a;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #a5f3fc11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22d3ee;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},teal:{name:"青绿",css:'\ufeff/* ————————————————— Teal Light Theme ————————————————— */\r\n/* 淡色系青绿主题,主色调为青绿色,搭配薄荷绿、天蓝、淡紫等淡色系配色 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0fdf8;\r\n --color: #134e4a;\r\n\r\n --selection-bg: #5eead4;\r\n --selection-color: #134e4a;\r\n --ui-scrollbar-thumb-bg: #99d6cc;\r\n --ui-close-corner-bg: #0d9488;\r\n --cube-bg: #e0f7f440;\r\n --cube-toolbar-bg: #ccf2ee40;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #cef5ef99;\r\n --float-node-layout-item-bg-hover: #5eead4cc;\r\n --float-node-layout-usable-color: #134e4a;\r\n --float-node-layout-disable-color: #a7d8d3cc;\r\n --float-node-layout-shadow: 0px 0px 4px #b2eae499;\r\n --float-node-layout-shadow-hover: 0px 0px 4px #5eead4cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f0fdfbcc;\r\n --menu-title-bg: linear-gradient(45deg, #a7f3d0cc, #bae6fdcc);\r\n --menu-title-icon-color: #0d9488;\r\n --menu-item-color: #1e4040;\r\n --menu-item-bg-hover: #d1faf5;\r\n --menu-item-active-color: #0891b2;\r\n --menu-shortcut-color: #7fb8b5;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #b2d8d8;\r\n --menu-dialog-mask-bg: rgba(13, 148, 136, 0.12);\r\n --menu-dialog-input-border: 1px solid #99d8d4;\r\n --menu-dialog-bg: #f0fdfb;\r\n --menu-dialog-color: #134e4a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #d1faf5cc;\r\n --submenu-node-line-header-color: #2d7a74cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0891b2;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f0fdfb;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 6px #b2eaedcc;\r\n --map-mini-bg: rgba(240, 253, 251, 0.95);\r\n --map-mini-border: #99f6e4;\r\n --map-mini-title-color: #2dd4bf;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #a5f3fc33;\r\n --placeholder-box-selector-stroke: #0891b2;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0f7f440;\r\n --submap-shadow: #5eead4 0px 0px 6px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #d1faf580;\r\n --node-selected-stroke: #0d9488;\r\n --node-editable-bg: #fefce840;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #99d6d3;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #a5f3fc80 0%, #6ee7b780 50%, #bae6fd80 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 12px #22d3ee80;\r\n --scope-item-bg: linear-gradient(135deg, #cffafecf 0%, #a7f3d0cf 50%, #bae6fdcf 100%);\r\n --scope-item-border: 1px solid #2dd4bf;\r\n --scope-item-color: #134e4a;\r\n --scope-item-shadow: 0px 0px 8px #0d948855;\r\n --scope-icon-color: #0c4a6e;\r\n --scope-icon-shadow: 0px 0px 10px #0c4a6e;\r\n --scope-icon-hover-color: #dc2626;\r\n --scope-icon-hover-shadow: 0px 0px 10px #b45309;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #b2eaeacc;\r\n --postil-text-color: #0d9488;\r\n --postil-text-box-bg: rgb(209 250 245 / 0.85);\r\n --postil-text-icon-close-bg: #b2eaeaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0891b2;\r\n --table-cell-bg: #e0f7f4b0;\r\n --table-cell-selection-bg: #a5f3fc8a;\r\n --table-cell-active-bg: #5eead482;\r\n --table-title-bg: #99d6d390;\r\n --table-dragger-bg: #f0fdfb75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #5eead48c;\r\n --annotation-bg: #f0fdfb85;\r\n --annotation-box-bg: #d1faf5c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a5f3fc5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #d1faf5cc;\r\n --box-columns-layout-item-hover-color: #0891b2;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #cef5ef70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e0f7f470;\r\n --code-tabbar-item-bg: #b2eaea78;\r\n --code-tabbar-item-color: #5f9ea078;\r\n --code-tabbar-item-active-color: #134e4a;\r\n --code-tabbar-item-active-bg: #b2eaea78;\r\n --code-tabbar-item-active-border: 1px dashed #0891b2;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #0d9488;\r\n --code-tooltip-bg: #0c4a6e;\r\n --code-tooltip-color: #cffafecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0d9488;\r\n --code-input-color: #134e4a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #5eead491;\r\n --list-item-bg: #e0f7f470;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #d1faf5ad;\r\n --todoitem-status-border: 1px dashed #2d7a74;\r\n --todoitem-status-active-color: #f0fdfb;\r\n --todoitem-status-active-bg: #0d9488;\r\n --todoitem-done-color: #7bc8c3;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #d1faf580;\r\n --img-load-failed-color: #7bc8c380;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bae6fd7d;\r\n --tip-border: 1px solid #38bdf880;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e0f7f470;\r\n --detail-even-bg: #e0f2fe70;\r\n --detail-adder-bg: #d1faf540;\r\n --detail-list-border: 1px dashed #99d6d3;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #a5f3fc80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f0fdfb;\r\n --text-link-box-bg: #e0f7f4;\r\n --text-link-bg: #b2eaea;\r\n --text-link-color: #134e4a;\r\n --text-link-icon-hover-bg: #5eead4;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #99f6e4;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #d1faf530;\r\n --line-hover-bg: #d1faf530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #2dd4bf;\r\n --box-bg: #a5f3fc40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #5eead4cc, #38bdf8c2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-fold-bg: #134e4a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #a7f3d080;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0d9488;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-tag-active-border: 2px solid #0d9488;\r\n --box-folder-tag-active-bg: #0d9488;\r\n --box-folder-tag-active-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-border: 2px dashed #0d9488a8;\r\n --box-folder-active-bg: #a5f3fc80;\r\n --box-folder-active-border: 1px solid #0d9488;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fed7aa69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #0d1f1e;\r\n --color: #cbfaf4;\r\n\r\n --selection-bg: #0d9488;\r\n --selection-color: #f0fdfb;\r\n --ui-scrollbar-thumb-bg: #2d7a74;\r\n --ui-close-corner-bg: #5eead4;\r\n --cube-bg: #1a3533;\r\n --cube-toolbar-bg: #1f3e3b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1a373599;\r\n --float-node-layout-item-bg-hover: #0d9488cc;\r\n --float-node-layout-usable-color: #cbfaf4;\r\n --float-node-layout-disable-color: #2d5553;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 4px #0d9488cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #122120cc;\r\n --menu-title-bg: linear-gradient(45deg, #134e4acc, #0c4a6ecc);\r\n --menu-title-icon-color: #2dd4bf;\r\n --menu-item-color: #cbfaf4;\r\n --menu-item-bg-hover: #1e3b39cc;\r\n --menu-item-active-color: #22d3ee;\r\n --menu-shortcut-color: #2d7a74;\r\n --menu-item-disable-color: #234040;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.35);\r\n --menu-dialog-input-border: 1px solid #1e5c58cc;\r\n --menu-dialog-bg: #122120cc;\r\n --menu-dialog-color: #cbfaf4;\r\n\r\n --submenu-node-line-header-bg: #1a373533;\r\n --submenu-node-line-header-color: #a5f3f0cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #22d3ee;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0f1e1d;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 6px #0d948866;\r\n --map-mini-bg: rgba(15, 30, 29, 0.92);\r\n --map-mini-border: #134e4a50;\r\n --map-mini-title-color: #2dd4bf80;\r\n\r\n --placeholder-box-selector-fill: #0d948833;\r\n --placeholder-box-selector-stroke: #22d3ee99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0d1f1e40;\r\n --submap-shadow: #0d9488a1 0px 0px 6px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #22d3ee;\r\n --node-bg: #1a373540;\r\n --node-selected-stroke: #2dd4bfde;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #1e5c58;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #0e4f5ab3 0%, #0d4a2db3 50%, #164e636cb3 100%);\r\n --scope-border: 2px solid #22d3ee;\r\n --scope-shadow: 0px 0px 12px #22d3eea6;\r\n --scope-item-bg: linear-gradient(135deg, #134e5ae6 0%, #14503ce6 50%, #0c4a6ee6 100%);\r\n --scope-item-border: 1px solid #2dd4bfd9;\r\n --scope-item-color: #e0fdfb;\r\n --scope-item-shadow: 0px 0px 10px #22d3ee66;\r\n --scope-icon-color: #cffafe;\r\n --scope-icon-shadow: 0px 0px 10px #22d3ee;\r\n --scope-icon-hover-color: #fb7185;\r\n --scope-icon-hover-shadow: 0px 0px 10px #f43f5e;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 24px #0a2424cc;\r\n --postil-text-color: #2dd4bf;\r\n --postil-text-box-bg: #1a373580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22d3ee;\r\n --table-cell-bg: #1a373570;\r\n --table-cell-selection-bg: #0d94888a;\r\n --table-cell-active-bg: #134e4a82;\r\n --table-title-bg: #1e5c5890;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1a3735cc;\r\n --box-columns-layout-item-hover-color: #22d3ee;\r\n --box-columns-block-bg: #1a373570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0d94888c;\r\n --annotation-bg: #1a3735bf;\r\n --annotation-box-bg: #1e4441c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #0d948878;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1a3735a8;\r\n --code-tabbar-item-bg: #1e444140;\r\n --code-tabbar-item-color: #5eead4;\r\n --code-tabbar-item-active-color: #2dd4bf;\r\n --code-tabbar-item-active-bg: #1e444178;\r\n --code-tabbar-item-active-border: 1px dashed #22d3ee;\r\n --code-toolbar-bg: #1a373747;\r\n --code-toolbar-item-hover-color: #2dd4bf;\r\n --code-tooltip-bg: rgb(13 148 136 / 60%);\r\n --code-tooltip-color: #f0fdfbcc;\r\n --code-input-border: 1px dashed #2dd4bf;\r\n --code-input-color: #cbfaf4;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1a373570;\r\n --list-ordered-symbol-hover-bg: #0d948891;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1a3735ad;\r\n --todoitem-status-border: 1px dashed #2d7a74;\r\n --todoitem-status-active-color: #f0fdfb;\r\n --todoitem-status-active-bg: #0d9488;\r\n --todoitem-done-color: #2d7a74;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1a373580;\r\n --img-load-failed-color: #2d7a7480;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0c4a6e7d;\r\n --tip-border: 1px solid #0891b280;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1a373570;\r\n --detail-even-bg: #0c2a3970;\r\n --detail-adder-bg: #1a373540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0d94884a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #122120ad;\r\n --text-link-box-bg: #1a3735c9;\r\n --text-link-bg: #1e4441cc;\r\n --text-link-color: #a5f3f0e8;\r\n --text-link-icon-hover-bg: #0d948880;\r\n --text-link-icon-hover-color: #5eead4e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0d9488b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1a373530;\r\n --line-hover-bg: #1a373530;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #2dd4bf;\r\n --box-bg: #1a373540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0d9488cc, #0891b2c2);\r\n --box-root-dragger-bg: #22d3ee;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #cbfaf4;\r\n --box-root-drag-enter-bg: #134e4a80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0d9488;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-tag-active-border: 2px solid #0d9488;\r\n --box-folder-tag-active-bg: #0d9488;\r\n --box-folder-tag-active-shadow: 0px 0px 6px #0d9488;\r\n\r\n --box-folder-border: 2px dashed #0d9488a8;\r\n --box-folder-active-bg: #134e4a80;\r\n --box-folder-active-border: 1px solid #0d9488;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #2dd4bf11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #2dd4bf;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #22d3ee11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22d3ee;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},aurora:{name:"极光",css:'\ufeff/* ————————————————— Aurora Theme ————————————————— */\r\n/* 极光主题:淡色模式以星云薰衣草+极光绿为主色,暗色模式还原深夜极光的震撼感 */\r\n/* 绿 #34d399 / 紫 #a78bfa / 青 #67e8f9 / 深空蓝 #1e1b4b */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f5f3ff;\r\n --color: #1e1b4b;\r\n\r\n --selection-bg: #a78bfa;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #c4b5fd;\r\n --ui-close-corner-bg: #7c3aed;\r\n --cube-bg: #ede9fe30;\r\n --cube-toolbar-bg: #ddd6fe30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #ede9fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #a78bfacc, #34d399cc);\r\n --float-node-layout-usable-color: #1e1b4b;\r\n --float-node-layout-disable-color: #c4b5fdcc;\r\n --float-node-layout-shadow: 0px 0px 6px #c4b5fd88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #a78bfacc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #faf5ffcc;\r\n --menu-title-bg: linear-gradient(45deg, #ddd6fecc, #a7f3d0cc);\r\n --menu-title-icon-color: #7c3aed;\r\n --menu-item-color: #2e1065;\r\n --menu-item-bg-hover: #ede9fe;\r\n --menu-item-active-color: #7c3aed;\r\n --menu-shortcut-color: #a78bfa;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #d8b4fe;\r\n --menu-dialog-mask-bg: rgba(124, 58, 237, 0.12);\r\n --menu-dialog-input-border: 1px solid #c4b5fd;\r\n --menu-dialog-bg: #faf5ff;\r\n --menu-dialog-color: #1e1b4b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #ede9fecc;\r\n --submenu-node-line-header-color: #5b21b6cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #7c3aed;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-transition-duration: 0.2s;\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n\r\n --map-status-tools-bg: #faf5ff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #c4b5fdcc;\r\n --map-mini-bg: rgba(250, 245, 255, 0.95);\r\n --map-mini-border: #e9d5ff;\r\n --map-mini-title-color: #a78bfa;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #a78bfa33;\r\n --placeholder-box-selector-stroke: #7c3aed;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #ede9fe30;\r\n --submap-shadow: #a78bfa 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #ede9fe50;\r\n --node-selected-stroke: #7c3aed;\r\n --node-editable-bg: #f0fdf440;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #c4b5fd;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #ddd6fe80 0%, #a7f3d080 50%, #cffafe80 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 14px #a78bfa99;\r\n --scope-item-bg: linear-gradient(135deg, #ede9fecf 0%, #d1fae5cf 50%, #e0f2fecf 100%);\r\n --scope-item-border: 1px solid #6ee7b7;\r\n --scope-item-color: #1e1b4b;\r\n --scope-item-shadow: 0px 0px 8px #a78bfa55;\r\n --scope-icon-color: #1e1b4b;\r\n --scope-icon-shadow: 0px 0px 10px #7c3aed;\r\n --scope-icon-hover-color: #10b981;\r\n --scope-icon-hover-shadow: 0px 0px 10px #34d399;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #c4b5fdcc;\r\n --postil-text-color: #7c3aed;\r\n --postil-text-box-bg: rgb(237 233 254 / 0.85);\r\n --postil-text-icon-close-bg: #c4b5fda3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #7c3aed;\r\n --table-cell-bg: #ede9fe80;\r\n --table-cell-selection-bg: #a78bfa3a;\r\n --table-cell-active-bg: #34d39940;\r\n --table-title-bg: #c4b5fd80;\r\n --table-dragger-bg: #faf5ff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #a78bfa8c;\r\n --annotation-bg: #faf5ff85;\r\n --annotation-box-bg: #ede9fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a7f3fc5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ede9fecc;\r\n --box-columns-layout-item-hover-color: #7c3aed;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddd6fe70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #ede9fe70;\r\n --code-tabbar-item-bg: #c4b5fd68;\r\n --code-tabbar-item-color: #a78bfa78;\r\n --code-tabbar-item-active-color: #1e1b4b;\r\n --code-tabbar-item-active-bg: #c4b5fd78;\r\n --code-tabbar-item-active-border: 1px dashed #7c3aed;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #10b981;\r\n --code-tooltip-bg: #2e1065;\r\n --code-tooltip-color: #c4b5fdcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #7c3aed;\r\n --code-input-color: #1e1b4b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #a78bfa91;\r\n --list-item-bg: #ede9fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #ede9fead;\r\n --todoitem-status-border: 1px dashed #7c3aed;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #a78bfa;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #ede9fe80;\r\n --img-load-failed-color: #c4b5fd80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #ddd6fe7d;\r\n --tip-border: 1px solid #a78bfa80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #ede9fe70;\r\n --detail-even-bg: #d1fae570;\r\n --detail-adder-bg: #ede9fe40;\r\n --detail-list-border: 1px dashed #c4b5fd;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddd6fe80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #faf5ff;\r\n --text-link-box-bg: #ede9fe;\r\n --text-link-bg: #ddd6fe;\r\n --text-link-color: #1e1b4b;\r\n --text-link-icon-hover-bg: #a78bfa;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #c4b5fd;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ede9fe30;\r\n --line-hover-bg: #ede9fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #ddd6fe40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #a78bfacc, #34d399c2);\r\n --box-root-dragger-bg: #67e8f9;\r\n --box-root-fold-bg: #1e1b4b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #7c3aed;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aeda8;\r\n --box-folder-active-bg: #ddd6fe80;\r\n --box-folder-active-border: 1px solid #7c3aed;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fde68a;\r\n --api-functions-color-light: #fde68a66;\r\n --api-functions-type-bg: #fde68a;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #0c0a1a;\r\n --color: #e9d5ff;\r\n\r\n --selection-bg: #6d28d9;\r\n --selection-color: #f5f3ff;\r\n --ui-scrollbar-thumb-bg: #4c1d95;\r\n --ui-close-corner-bg: #a78bfa;\r\n --cube-bg: #1e1b4b30;\r\n --cube-toolbar-bg: #2e1b5440;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1e1b4b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4c1d95cc, #065f46cc);\r\n --float-node-layout-usable-color: #e9d5ff;\r\n --float-node-layout-disable-color: #4c1d95;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #a78bfacc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #13103acc;\r\n --menu-title-bg: linear-gradient(45deg, #2e1065cc, #064e3bcc);\r\n --menu-title-icon-color: #a78bfa;\r\n --menu-item-color: #e9d5ff;\r\n --menu-item-bg-hover: #1e1b4bcc;\r\n --menu-item-active-color: #a78bfa;\r\n --menu-shortcut-color: #6d28d9;\r\n --menu-item-disable-color: #3b2367;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.45);\r\n --menu-dialog-input-border: 1px solid #4c1d95cc;\r\n --menu-dialog-bg: #13103acc;\r\n --menu-dialog-color: #e9d5ff;\r\n\r\n --submenu-node-line-header-bg: #1e1b4b33;\r\n --submenu-node-line-header-color: #c4b5fdcc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #a78bfa;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0c0a1a;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #6d28d966;\r\n --map-mini-bg: rgba(12, 10, 26, 0.92);\r\n --map-mini-border: #4c1d9550;\r\n --map-mini-title-color: #a78bfa80;\r\n\r\n --placeholder-box-selector-fill: #a78bfa22;\r\n --placeholder-box-selector-stroke: #a78bfa99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0c0a1a40;\r\n --submap-shadow: #a78bfaa1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #1e1b4b40;\r\n --node-selected-stroke: #a78bfade;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #4c1d95;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #2e1065b3 0%, #064e3bb3 50%, #0c4a6eb3 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 16px #a78bfaaa;\r\n --scope-item-bg: linear-gradient(135deg, #3b0764e6 0%, #065f46e6 50%, #164e63e6 100%);\r\n --scope-item-border: 1px solid #34d399d9;\r\n --scope-item-color: #f0fdf4;\r\n --scope-item-shadow: 0px 0px 10px #a78bfa66;\r\n --scope-icon-color: #e9d5ff;\r\n --scope-icon-shadow: 0px 0px 12px #a78bfa;\r\n --scope-icon-hover-color: #34d399;\r\n --scope-icon-hover-shadow: 0px 0px 12px #34d399;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1e1b4bcc;\r\n --postil-text-color: #a78bfa;\r\n --postil-text-box-bg: #1e1b4b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #a78bfa;\r\n --table-cell-bg: #1e1b4b70;\r\n --table-cell-selection-bg: #6d28d98a;\r\n --table-cell-active-bg: #065f4682;\r\n --table-title-bg: #2e1065d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1e1b4bcc;\r\n --box-columns-layout-item-hover-color: #a78bfa;\r\n --box-columns-block-bg: #1e1b4b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #a78bfa8c;\r\n --annotation-bg: #1e1b4bbf;\r\n --annotation-box-bg: #2e1065c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #6d28d978;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1e1b4ba8;\r\n --code-tabbar-item-bg: #2e1065a0;\r\n --code-tabbar-item-color: #c4b5fd;\r\n --code-tabbar-item-active-color: #a78bfa;\r\n --code-tabbar-item-active-bg: #2e106578;\r\n --code-tabbar-item-active-border: 1px dashed #a78bfa;\r\n --code-toolbar-bg: #1e1b4b47;\r\n --code-toolbar-item-hover-color: #34d399;\r\n --code-tooltip-bg: rgb(109 40 217 / 60%);\r\n --code-tooltip-color: #e9d5ffcc;\r\n --code-input-border: 1px dashed #a78bfa;\r\n --code-input-color: #e9d5ff;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1e1b4b70;\r\n --list-ordered-symbol-hover-bg: #6d28d991;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1e1b4bad;\r\n --todoitem-status-border: 1px dashed #4c1d95;\r\n --todoitem-status-active-color: #f5f3ff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #4c1d95;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1e1b4b80;\r\n --img-load-failed-color: #4c1d9580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #2e10657d;\r\n --tip-border: 1px solid #7c3aed80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1e1b4b70;\r\n --detail-even-bg: #0c4a6e70;\r\n --detail-adder-bg: #1e1b4b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #6d28d94a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #13103aad;\r\n --text-link-box-bg: #1e1b4bc9;\r\n --text-link-bg: #2e1065cc;\r\n --text-link-color: #e9d5ffe8;\r\n --text-link-icon-hover-bg: #6d28d980;\r\n --text-link-icon-hover-color: #a78bfae0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #7c3aedb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1e1b4b30;\r\n --line-hover-bg: #1e1b4b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #1e1b4b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #34d399c2);\r\n --box-root-dragger-bg: #67e8f9;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #e9d5ff;\r\n --box-root-drag-enter-bg: #065f4680;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #a78bfa;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aeda8;\r\n --box-folder-active-bg: #2e106580;\r\n --box-folder-active-border: 1px solid #a78bfa;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #a78bfa11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #a78bfa;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #34d39911;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #34d399;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},ember:{name:"琥珀",css:'\ufeff/* ————————————————— Ember Theme ————————————————— */\r\n/* 琥珀主题:淡色模式以奶油琥珀+暖橙为主色,暗色模式呈现熔岩深夜的火焰质感 */\r\n/* 橙 #f97316 / 金 #fbbf24 / 棕 #92400e / 深夜 #1c0a00 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fffbf0;\r\n --color: #1c1005;\r\n\r\n --selection-bg: #f97316;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fcd34d;\r\n --ui-close-corner-bg: #d97706;\r\n --cube-bg: #fef3c730;\r\n --cube-toolbar-bg: #fde68a30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fef9ec99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #f97316cc, #fbbf24cc);\r\n --float-node-layout-usable-color: #1c1005;\r\n --float-node-layout-disable-color: #fcd34dcc;\r\n --float-node-layout-shadow: 0px 0px 6px #fcd34d88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f97316cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fffbf2cc;\r\n --menu-title-bg: linear-gradient(45deg, #fde68acc, #fed7aacc);\r\n --menu-title-icon-color: #d97706;\r\n --menu-item-color: #431407;\r\n --menu-item-bg-hover: #fef3c7;\r\n --menu-item-active-color: #d97706;\r\n --menu-shortcut-color: #fbbf24;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fde68a;\r\n --menu-dialog-mask-bg: rgba(217, 119, 6, 0.12);\r\n --menu-dialog-input-border: 1px solid #fcd34d;\r\n --menu-dialog-bg: #fffbf2;\r\n --menu-dialog-color: #1c1005;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fef3c7cc;\r\n --submenu-node-line-header-color: #92400ecc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #d97706;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fffbf2;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fcd34dcc;\r\n --map-mini-bg: rgba(255, 251, 242, 0.95);\r\n --map-mini-border: #fde68a;\r\n --map-mini-title-color: #d97706;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #f9731633;\r\n --placeholder-box-selector-stroke: #d97706;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fef3c730;\r\n --submap-shadow: #fbbf24 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #fbbf24;\r\n --node-bg: #fef3c750;\r\n --node-selected-stroke: #d97706;\r\n --node-editable-bg: #fffbeb40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fcd34d;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fde68a80 0%, #fed7aa80 50%, #fef08a80 100%);\r\n --scope-border: 2px solid #f97316;\r\n --scope-shadow: 0px 0px 14px #f9731699;\r\n --scope-item-bg: linear-gradient(135deg, #fef3c7cf 0%, #fde68acf 50%, #fed7aacf 100%);\r\n --scope-item-border: 1px solid #fbbf24;\r\n --scope-item-color: #1c1005;\r\n --scope-item-shadow: 0px 0px 8px #f9731655;\r\n --scope-icon-color: #1c1005;\r\n --scope-icon-shadow: 0px 0px 10px #d97706;\r\n --scope-icon-hover-color: #ef4444;\r\n --scope-icon-hover-shadow: 0px 0px 10px #ef4444;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fcd34dcc;\r\n --postil-text-color: #d97706;\r\n --postil-text-box-bg: rgb(254 243 199 / 0.85);\r\n --postil-text-icon-close-bg: #fcd34da3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f97316;\r\n --table-cell-bg: #fef3c780;\r\n --table-cell-selection-bg: #f973163a;\r\n --table-cell-active-bg: #fbbf2440;\r\n --table-title-bg: #fcd34d80;\r\n --table-dragger-bg: #fffbf275;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f973168c;\r\n --annotation-bg: #fffbf285;\r\n --annotation-box-bg: #fef3c7c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fde68a5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fef3c7cc;\r\n --box-columns-layout-item-hover-color: #d97706;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fde68a70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fef3c770;\r\n --code-tabbar-item-bg: #fcd34d68;\r\n --code-tabbar-item-color: #fbbf2478;\r\n --code-tabbar-item-active-color: #1c1005;\r\n --code-tabbar-item-active-bg: #fcd34d78;\r\n --code-tabbar-item-active-border: 1px dashed #d97706;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #f97316;\r\n --code-tooltip-bg: #431407;\r\n --code-tooltip-color: #fde68acc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #d97706;\r\n --code-input-color: #1c1005;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #f9731691;\r\n --list-item-bg: #fef3c770;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fef3c7ad;\r\n --todoitem-status-border: 1px dashed #d97706;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #f97316;\r\n --todoitem-done-color: #fbbf24;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fef3c780;\r\n --img-load-failed-color: #fcd34d80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fde68a7d;\r\n --tip-border: 1px solid #f9731680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fef3c770;\r\n --detail-even-bg: #fff7ed70;\r\n --detail-adder-bg: #fef3c740;\r\n --detail-list-border: 1px dashed #fcd34d;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fde68a80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fffbf2;\r\n --text-link-box-bg: #fef3c7;\r\n --text-link-bg: #fde68a;\r\n --text-link-color: #1c1005;\r\n --text-link-icon-hover-bg: #f97316;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #fbbf24;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fef3c730;\r\n --line-hover-bg: #fef3c730;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f97316;\r\n --box-bg: #fde68a40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #f97316cc, #fbbf24c2);\r\n --box-root-dragger-bg: #fbbf24;\r\n --box-root-fold-bg: #1c1005;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #d97706;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #d97706;\r\n\r\n --box-folder-tag-active-border: 2px solid #d97706;\r\n --box-folder-tag-active-bg: #d97706;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #f97316;\r\n\r\n --box-folder-border: 2px dashed #d97706a8;\r\n --box-folder-active-bg: #fde68a80;\r\n --box-folder-active-border: 1px solid #d97706;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef9c3;\r\n --api-functions-color-light: #fef9c366;\r\n --api-functions-type-bg: #fef9c3;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #fed7aa;\r\n --api-arguments-color-light: #fed7aa66;\r\n --api-arguments-type-bg: #fed7aa;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fde68a69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #120800;\r\n --color: #fef3c7;\r\n\r\n --selection-bg: #b45309;\r\n --selection-color: #fffbf0;\r\n --ui-scrollbar-thumb-bg: #78350f;\r\n --ui-close-corner-bg: #fbbf24;\r\n --cube-bg: #1c0e0030;\r\n --cube-toolbar-bg: #2d160040;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1c0e0099;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #92400ecc, #b45309cc);\r\n --float-node-layout-usable-color: #fef3c7;\r\n --float-node-layout-disable-color: #78350f;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f97316cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0b00cc;\r\n --menu-title-bg: linear-gradient(45deg, #78350fcc, #92400ecc);\r\n --menu-title-icon-color: #fbbf24;\r\n --menu-item-color: #fef3c7;\r\n --menu-item-bg-hover: #2d160fcc;\r\n --menu-item-active-color: #fbbf24;\r\n --menu-shortcut-color: #b45309;\r\n --menu-item-disable-color: #432007;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.5);\r\n --menu-dialog-input-border: 1px solid #78350fcc;\r\n --menu-dialog-bg: #1a0b00cc;\r\n --menu-dialog-color: #fef3c7;\r\n\r\n --submenu-node-line-header-bg: #1c0e0033;\r\n --submenu-node-line-header-color: #fde68acc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fbbf24;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #120800;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #b4530966;\r\n --map-mini-bg: rgba(18, 8, 0, 0.92);\r\n --map-mini-border: #78350f50;\r\n --map-mini-title-color: #b4530970;\r\n\r\n --placeholder-box-selector-fill: #f9731622;\r\n --placeholder-box-selector-stroke: #fbbf2499;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #12080040;\r\n --submap-shadow: #f97316a1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #fbbf24;\r\n --node-bg: #1c0e0040;\r\n --node-selected-stroke: #f97316de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #78350f;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #7c2d12b3 0%, #92400eb3 50%, #78350fb3 100%);\r\n --scope-border: 2px solid #f97316;\r\n --scope-shadow: 0px 0px 18px #f97316aa;\r\n --scope-item-bg: linear-gradient(135deg, #7c2d12e6 0%, #92400ee6 50%, #78350fe6 100%);\r\n --scope-item-border: 1px solid #fbbf24d9;\r\n --scope-item-color: #fef9ee;\r\n --scope-item-shadow: 0px 0px 10px #f9731666;\r\n --scope-icon-color: #fef3c7;\r\n --scope-icon-shadow: 0px 0px 12px #fbbf24;\r\n --scope-icon-hover-color: #f87171;\r\n --scope-icon-hover-shadow: 0px 0px 12px #ef4444;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1c0e00cc;\r\n --postil-text-color: #fbbf24;\r\n --postil-text-box-bg: #1c0e0080;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fbbf24;\r\n --table-cell-bg: #1c0e0070;\r\n --table-cell-selection-bg: #b453098a;\r\n --table-cell-active-bg: #92400e82;\r\n --table-title-bg: #78350fd0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1c0e00cc;\r\n --box-columns-layout-item-hover-color: #fbbf24;\r\n --box-columns-block-bg: #1c0e0070;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f973168c;\r\n --annotation-bg: #1c0e00bf;\r\n --annotation-box-bg: #2d1600c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #b4530978;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1c0e00a8;\r\n --code-tabbar-item-bg: #2d1600a0;\r\n --code-tabbar-item-color: #fcd34d;\r\n --code-tabbar-item-active-color: #fbbf24;\r\n --code-tabbar-item-active-bg: #2d160078;\r\n --code-tabbar-item-active-border: 1px dashed #fbbf24;\r\n --code-toolbar-bg: #1c0e0047;\r\n --code-toolbar-item-hover-color: #f97316;\r\n --code-tooltip-bg: rgb(180 83 9 / 60%);\r\n --code-tooltip-color: #fef3c7cc;\r\n --code-input-border: 1px dashed #fbbf24;\r\n --code-input-color: #fef3c7;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1c0e0070;\r\n --list-ordered-symbol-hover-bg: #b4530991;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1c0e00ad;\r\n --todoitem-status-border: 1px dashed #78350f;\r\n --todoitem-status-active-color: #fffbf0;\r\n --todoitem-status-active-bg: #d97706;\r\n --todoitem-done-color: #78350f;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1c0e0080;\r\n --img-load-failed-color: #78350f80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #7c2d127d;\r\n --tip-border: 1px solid #f9731680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1c0e0070;\r\n --detail-even-bg: #2d160070;\r\n --detail-adder-bg: #1c0e0040;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #b453094a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0b00ad;\r\n --text-link-box-bg: #1c0e00c9;\r\n --text-link-bg: #2d1600cc;\r\n --text-link-color: #fef3c7e8;\r\n --text-link-icon-hover-bg: #b4530980;\r\n --text-link-icon-hover-color: #fbbf24e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #d97706b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1c0e0030;\r\n --line-hover-bg: #1c0e0030;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f97316;\r\n --box-bg: #1c0e0040;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #b45309cc, #d97706c2);\r\n --box-root-dragger-bg: #fbbf24;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fef3c7;\r\n --box-root-drag-enter-bg: #92400e80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #d97706;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #f97316;\r\n\r\n --box-folder-tag-active-border: 2px solid #d97706;\r\n --box-folder-tag-active-bg: #d97706;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #f97316;\r\n\r\n --box-folder-border: 2px dashed #d97706a8;\r\n --box-folder-active-bg: #78350f80;\r\n --box-folder-active-border: 1px solid #f97316;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f9731611;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f97316;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},sakura:{name:"樱雪",css:'\ufeff/* ————————————————— Sakura Theme ————————————————— */\r\n/* 樱雪主题:淡色模式以樱花粉+薄雪白为主色,暗色模式呈现夜樱的深沉浪漫感 */\r\n/* 樱粉 #f472b6 / 玫瑰 #e11d48 / 雪白 #fdf2f8 / 深夜 #1a0010 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fdf4f8;\r\n --color: #500724;\r\n\r\n --selection-bg: #f472b6;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fbcfe8;\r\n --ui-close-corner-bg: #be185d;\r\n --cube-bg: #fce7f330;\r\n --cube-toolbar-bg: #fbcfe830;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fdf2f899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #f472b6cc, #fb7185cc);\r\n --float-node-layout-usable-color: #500724;\r\n --float-node-layout-disable-color: #fbcfe8cc;\r\n --float-node-layout-shadow: 0px 0px 6px #fbcfe888;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f472b6cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fdf5f9cc;\r\n --menu-title-bg: linear-gradient(45deg, #fbcfe8cc, #fce7f3cc);\r\n --menu-title-icon-color: #be185d;\r\n --menu-item-color: #500724;\r\n --menu-item-bg-hover: #fce7f3;\r\n --menu-item-active-color: #be185d;\r\n --menu-shortcut-color: #f472b6;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fbcfe8;\r\n --menu-dialog-mask-bg: rgba(190, 24, 93, 0.10);\r\n --menu-dialog-input-border: 1px solid #fbcfe8;\r\n --menu-dialog-bg: #fdf5f9;\r\n --menu-dialog-color: #500724;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fce7f3cc;\r\n --submenu-node-line-header-color: #9d174dcc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #be185d;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fdf5f9;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fbcfe8cc;\r\n --map-mini-bg: rgba(253, 245, 249, 0.95);\r\n --map-mini-border: #fbcfe8;\r\n --map-mini-title-color: #f472b6;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #f472b633;\r\n --placeholder-box-selector-stroke: #be185d;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fce7f330;\r\n --submap-shadow: #f9a8d4 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #f9a8d4;\r\n --node-bg: #fce7f350;\r\n --node-selected-stroke: #be185d;\r\n --node-editable-bg: #fff0f540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fbcfe8;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fce7f380 0%, #fbcfe880 50%, #ffe4e680 100%);\r\n --scope-border: 2px solid #f472b6;\r\n --scope-shadow: 0px 0px 14px #f472b699;\r\n --scope-item-bg: linear-gradient(135deg, #fdf2f8cf 0%, #fce7f3cf 50%, #ffe4e6cf 100%);\r\n --scope-item-border: 1px solid #f9a8d4;\r\n --scope-item-color: #500724;\r\n --scope-item-shadow: 0px 0px 8px #f472b655;\r\n --scope-icon-color: #500724;\r\n --scope-icon-shadow: 0px 0px 10px #be185d;\r\n --scope-icon-hover-color: #7c3aed;\r\n --scope-icon-hover-shadow: 0px 0px 10px #7c3aed;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fbcfe8cc;\r\n --postil-text-color: #be185d;\r\n --postil-text-box-bg: rgb(252 231 243 / 0.85);\r\n --postil-text-icon-close-bg: #fbcfe8a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f472b6;\r\n --table-cell-bg: #fce7f380;\r\n --table-cell-selection-bg: #f472b63a;\r\n --table-cell-active-bg: #f9a8d440;\r\n --table-title-bg: #fbcfe880;\r\n --table-dragger-bg: #fdf5f975;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f472b68c;\r\n --annotation-bg: #fdf5f985;\r\n --annotation-box-bg: #fce7f3c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fbcfe85c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fce7f3cc;\r\n --box-columns-layout-item-hover-color: #be185d;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fbcfe870;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fce7f370;\r\n --code-tabbar-item-bg: #fbcfe868;\r\n --code-tabbar-item-color: #f9a8d478;\r\n --code-tabbar-item-active-color: #500724;\r\n --code-tabbar-item-active-bg: #fbcfe878;\r\n --code-tabbar-item-active-border: 1px dashed #be185d;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #be185d;\r\n --code-tooltip-bg: #500724;\r\n --code-tooltip-color: #fbcfe8cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #be185d;\r\n --code-input-color: #500724;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #f472b691;\r\n --list-item-bg: #fce7f370;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fce7f3ad;\r\n --todoitem-status-border: 1px dashed #be185d;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #f472b6;\r\n --todoitem-done-color: #f9a8d4;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fce7f380;\r\n --img-load-failed-color: #fbcfe880;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fbcfe87d;\r\n --tip-border: 1px solid #f472b680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fce7f370;\r\n --detail-even-bg: #ffe4e670;\r\n --detail-adder-bg: #fce7f340;\r\n --detail-list-border: 1px dashed #fbcfe8;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fbcfe880;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fdf5f9;\r\n --text-link-box-bg: #fce7f3;\r\n --text-link-bg: #fbcfe8;\r\n --text-link-color: #500724;\r\n --text-link-icon-hover-bg: #f472b6;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #f9a8d4;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fce7f330;\r\n --line-hover-bg: #fce7f330;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f472b6;\r\n --box-bg: #fbcfe840;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #f472b6cc, #fb7185c2);\r\n --box-root-dragger-bg: #f9a8d4;\r\n --box-root-fold-bg: #500724;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #fce7f380;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #be185d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #be185d;\r\n\r\n --box-folder-tag-active-border: 2px solid #be185d;\r\n --box-folder-tag-active-bg: #be185d;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #f472b6;\r\n\r\n --box-folder-border: 2px dashed #be185da8;\r\n --box-folder-active-bg: #fbcfe880;\r\n --box-folder-active-border: 1px solid #be185d;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fbcfe8;\r\n --api-functions-color-light: #fbcfe866;\r\n --api-functions-type-bg: #fbcfe8;\r\n --api-functions-type-color: #9f1239cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #ffe4e6;\r\n --api-arguments-color-light: #ffe4e666;\r\n --api-arguments-type-bg: #ffe4e6;\r\n --api-arguments-type-color: #9f1239cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbcfe869;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #150010;\r\n --color: #fce7f3;\r\n\r\n --selection-bg: #9d174d;\r\n --selection-color: #fdf2f8;\r\n --ui-scrollbar-thumb-bg: #831843;\r\n --ui-close-corner-bg: #f9a8d4;\r\n --cube-bg: #1f0118;\r\n --cube-toolbar-bg: #2e0028;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1f011899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #9d174dcc, #831843cc);\r\n --float-node-layout-usable-color: #fce7f3;\r\n --float-node-layout-disable-color: #831843;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #f472b6cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0015cc;\r\n --menu-title-bg: linear-gradient(45deg, #831843cc, #9d174dcc);\r\n --menu-title-icon-color: #f9a8d4;\r\n --menu-item-color: #fce7f3;\r\n --menu-item-bg-hover: #2e0028cc;\r\n --menu-item-active-color: #f9a8d4;\r\n --menu-shortcut-color: #9d174d;\r\n --menu-item-disable-color: #4a0030;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.50);\r\n --menu-dialog-input-border: 1px solid #831843cc;\r\n --menu-dialog-bg: #1a0015cc;\r\n --menu-dialog-color: #fce7f3;\r\n\r\n --submenu-node-line-header-bg: #1f011833;\r\n --submenu-node-line-header-color: #fbcfe8cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #f9a8d4;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #150010;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #9d174d66;\r\n --map-mini-bg: rgba(21, 0, 16, 0.92);\r\n --map-mini-border: #83184350;\r\n --map-mini-title-color: #ec489980;\r\n\r\n --placeholder-box-selector-fill: #f472b622;\r\n --placeholder-box-selector-stroke: #f9a8d499;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #15001040;\r\n --submap-shadow: #f472b6a1 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #f9a8d4;\r\n --node-bg: #1f011840;\r\n --node-selected-stroke: #f472b6de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #831843;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #831843b3 0%, #9d174db3 50%, #7c1539b3 100%);\r\n --scope-border: 2px solid #f472b6;\r\n --scope-shadow: 0px 0px 18px #f472b6aa;\r\n --scope-item-bg: linear-gradient(135deg, #831843e6 0%, #9d174de6 50%, #7e1140e6 100%);\r\n --scope-item-border: 1px solid #f9a8d4d9;\r\n --scope-item-color: #fdf2f8;\r\n --scope-item-shadow: 0px 0px 10px #f472b666;\r\n --scope-icon-color: #fce7f3;\r\n --scope-icon-shadow: 0px 0px 12px #f9a8d4;\r\n --scope-icon-hover-color: #a78bfa;\r\n --scope-icon-hover-shadow: 0px 0px 12px #a78bfa;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #1f0118cc;\r\n --postil-text-color: #f9a8d4;\r\n --postil-text-box-bg: #1f011880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #f9a8d4;\r\n --table-cell-bg: #1f011870;\r\n --table-cell-selection-bg: #9d174d8a;\r\n --table-cell-active-bg: #83184382;\r\n --table-title-bg: #7e1140d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1f0118cc;\r\n --box-columns-layout-item-hover-color: #f9a8d4;\r\n --box-columns-block-bg: #1f011870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #f472b68c;\r\n --annotation-bg: #1f0118bf;\r\n --annotation-box-bg: #2e0028c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #9d174d78;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1f0118a8;\r\n --code-tabbar-item-bg: #2e0028a0;\r\n --code-tabbar-item-color: #f9a8d4;\r\n --code-tabbar-item-active-color: #fbcfe8;\r\n --code-tabbar-item-active-bg: #2e002878;\r\n --code-tabbar-item-active-border: 1px dashed #f9a8d4;\r\n --code-toolbar-bg: #1f011847;\r\n --code-toolbar-item-hover-color: #f472b6;\r\n --code-tooltip-bg: rgb(157 23 77 / 60%);\r\n --code-tooltip-color: #fce7f3cc;\r\n --code-input-border: 1px dashed #f9a8d4;\r\n --code-input-color: #fce7f3;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1f011870;\r\n --list-ordered-symbol-hover-bg: #9d174d91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1f0118ad;\r\n --todoitem-status-border: 1px dashed #831843;\r\n --todoitem-status-active-color: #fdf2f8;\r\n --todoitem-status-active-bg: #be185d;\r\n --todoitem-done-color: #831843;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1f011880;\r\n --img-load-failed-color: #83184380;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #9d174d7d;\r\n --tip-border: 1px solid #f472b680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1f011870;\r\n --detail-even-bg: #2e002870;\r\n --detail-adder-bg: #1f011840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #9d174d4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0015ad;\r\n --text-link-box-bg: #1f0118c9;\r\n --text-link-bg: #2e0028cc;\r\n --text-link-color: #fce7f3e8;\r\n --text-link-icon-hover-bg: #9d174d80;\r\n --text-link-icon-hover-color: #f9a8d4e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #be185db5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1f011830;\r\n --line-hover-bg: #1f011830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f472b6;\r\n --box-bg: #1f011840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #be185dcc, #9d174dc2);\r\n --box-root-dragger-bg: #f9a8d4;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fce7f3;\r\n --box-root-drag-enter-bg: #83184380;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #be185d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #f472b6;\r\n\r\n --box-folder-tag-active-border: 2px solid #be185d;\r\n --box-folder-tag-active-bg: #be185d;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #f472b6;\r\n\r\n --box-folder-border: 2px dashed #be185da8;\r\n --box-folder-active-bg: #9d174d80;\r\n --box-folder-active-border: 1px solid #f472b6;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #f9a8d411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #f9a8d4;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f472b611;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f472b6;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},ocean:{name:"深海",css:'\ufeff/* ————————————————— Ocean Theme ————————————————— */\r\n/* 深海主题:亮色以晴空蓝+泡沫白为基调,暗色深入午夜大洋的深邃感 */\r\n/* 天蓝 #0ea5e9 / 青碧 #06b6d4 / 珊瑚 #fb923c / 深海 #0c2340 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0f9ff;\r\n --color: #0c2340;\r\n\r\n --selection-bg: #0ea5e9;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #7dd3fc;\r\n --ui-close-corner-bg: #0369a1;\r\n --cube-bg: #e0f2fe30;\r\n --cube-toolbar-bg: #bae6fd30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #e0f2fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #0ea5e9cc, #06b6d4cc);\r\n --float-node-layout-usable-color: #0c2340;\r\n --float-node-layout-disable-color: #7dd3fccc;\r\n --float-node-layout-shadow: 0px 0px 6px #7dd3fc88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #0ea5e9cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f0faffcc;\r\n --menu-title-bg: linear-gradient(45deg, #bae6fdcc, #a5f3fccc);\r\n --menu-title-icon-color: #0369a1;\r\n --menu-item-color: #0c2340;\r\n --menu-item-bg-hover: #e0f2fe;\r\n --menu-item-active-color: #0369a1;\r\n --menu-shortcut-color: #38bdf8;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #bae6fd;\r\n --menu-dialog-mask-bg: rgba(3, 105, 161, 0.12);\r\n --menu-dialog-input-border: 1px solid #7dd3fc;\r\n --menu-dialog-bg: #f0faff;\r\n --menu-dialog-color: #0c2340;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e0f2fecc;\r\n --submenu-node-line-header-color: #075985cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0369a1;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f0faff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #7dd3fccc;\r\n --map-mini-bg: rgba(240, 250, 255, 0.95);\r\n --map-mini-border: #bae6fd;\r\n --map-mini-title-color: #38bdf8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #0ea5e933;\r\n --placeholder-box-selector-stroke: #0369a1;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0f2fe30;\r\n --submap-shadow: #38bdf8 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #06b6d4;\r\n --node-bg: #e0f2fe50;\r\n --node-selected-stroke: #0369a1;\r\n --node-editable-bg: #f0f9ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #7dd3fc;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #bae6fd80 0%, #a5f3fc80 50%, #cffafe80 100%);\r\n --scope-border: 2px solid #0ea5e9;\r\n --scope-shadow: 0px 0px 14px #0ea5e999;\r\n --scope-item-bg: linear-gradient(135deg, #e0f2fecf 0%, #cffafecf 50%, #ecfeff cf 100%);\r\n --scope-item-border: 1px solid #38bdf8;\r\n --scope-item-color: #0c2340;\r\n --scope-item-shadow: 0px 0px 8px #0ea5e955;\r\n --scope-icon-color: #0c2340;\r\n --scope-icon-shadow: 0px 0px 10px #0369a1;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 10px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #bae6fdcc;\r\n --postil-text-color: #0369a1;\r\n --postil-text-box-bg: rgb(224 242 254 / 0.85);\r\n --postil-text-icon-close-bg: #7dd3fca3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #0ea5e9;\r\n --table-cell-bg: #e0f2fe80;\r\n --table-cell-selection-bg: #0ea5e93a;\r\n --table-cell-active-bg: #06b6d440;\r\n --table-title-bg: #7dd3fc80;\r\n --table-dragger-bg: #f0faff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0ea5e98c;\r\n --annotation-bg: #f0faff85;\r\n --annotation-box-bg: #e0f2fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #bae6fd5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e0f2fecc;\r\n --box-columns-layout-item-hover-color: #0369a1;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #bae6fd70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e0f2fe70;\r\n --code-tabbar-item-bg: #7dd3fc68;\r\n --code-tabbar-item-color: #38bdf878;\r\n --code-tabbar-item-active-color: #0c2340;\r\n --code-tabbar-item-active-bg: #7dd3fc78;\r\n --code-tabbar-item-active-border: 1px dashed #0369a1;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #fb923c;\r\n --code-tooltip-bg: #0c2340;\r\n --code-tooltip-color: #bae6fdcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0369a1;\r\n --code-input-color: #0c2340;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #0ea5e991;\r\n --list-item-bg: #e0f2fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e0f2fead;\r\n --todoitem-status-border: 1px dashed #0369a1;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #0ea5e9;\r\n --todoitem-done-color: #7dd3fc;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e0f2fe80;\r\n --img-load-failed-color: #7dd3fc80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bae6fd7d;\r\n --tip-border: 1px solid #0ea5e980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e0f2fe70;\r\n --detail-even-bg: #ecfeff70;\r\n --detail-adder-bg: #e0f2fe40;\r\n --detail-list-border: 1px dashed #7dd3fc;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #bae6fd80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f0faff;\r\n --text-link-box-bg: #e0f2fe;\r\n --text-link-bg: #bae6fd;\r\n --text-link-color: #0c2340;\r\n --text-link-icon-hover-bg: #0ea5e9;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #38bdf8;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e0f2fe30;\r\n --line-hover-bg: #e0f2fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0ea5e9;\r\n --box-bg: #bae6fd40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0ea5e9cc, #06b6d4c2);\r\n --box-root-dragger-bg: #38bdf8;\r\n --box-root-fold-bg: #0c2340;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #a5f3fc80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0369a1;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0369a1;\r\n\r\n --box-folder-tag-active-border: 2px solid #0369a1;\r\n --box-folder-tag-active-bg: #0369a1;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #0ea5e9;\r\n\r\n --box-folder-border: 2px dashed #0369a1a8;\r\n --box-folder-active-bg: #bae6fd80;\r\n --box-folder-active-border: 1px solid #0369a1;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef9c3;\r\n --api-functions-color-light: #fef9c366;\r\n --api-functions-type-bg: #fef9c3;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #a5f3fc;\r\n --api-arguments-color-light: #a5f3fc66;\r\n --api-arguments-type-bg: #a5f3fc;\r\n --api-arguments-type-color: #78716ccc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fb923c69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #020d1a;\r\n --color: #bae6fd;\r\n\r\n --selection-bg: #0369a1;\r\n --selection-color: #f0f9ff;\r\n --ui-scrollbar-thumb-bg: #075985;\r\n --ui-close-corner-bg: #38bdf8;\r\n --cube-bg: #051525;\r\n --cube-toolbar-bg: #071e30;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #05152599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #075985cc, #0c4a6ecc);\r\n --float-node-layout-usable-color: #bae6fd;\r\n --float-node-layout-disable-color: #075985;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #0ea5e9cc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #031220cc;\r\n --menu-title-bg: linear-gradient(45deg, #0c4a6ecc, #164e63cc);\r\n --menu-title-icon-color: #38bdf8;\r\n --menu-item-color: #bae6fd;\r\n --menu-item-bg-hover: #071e30cc;\r\n --menu-item-active-color: #38bdf8;\r\n --menu-shortcut-color: #075985;\r\n --menu-item-disable-color: #0a3050;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #075985cc;\r\n --menu-dialog-bg: #031220cc;\r\n --menu-dialog-color: #bae6fd;\r\n\r\n --submenu-node-line-header-bg: #05152533;\r\n --submenu-node-line-header-color: #7dd3fccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #38bdf8;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #020d1a;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 10px #0369a166;\r\n --map-mini-bg: rgba(2, 13, 26, 0.92);\r\n --map-mini-border: #0c4a6e50;\r\n --map-mini-title-color: #38bdf880;\r\n\r\n --placeholder-box-selector-fill: #0ea5e922;\r\n --placeholder-box-selector-stroke: #38bdf899;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #020d1a40;\r\n --submap-shadow: #0ea5e9a1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #06b6d4;\r\n --node-bg: #05152540;\r\n --node-selected-stroke: #38bdf8de;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #075985;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #0c4a6eb3 0%, #164e63b3 50%, #0c2a3fb3 100%);\r\n --scope-border: 2px solid #0ea5e9;\r\n --scope-shadow: 0px 0px 18px #0ea5e9aa;\r\n --scope-item-bg: linear-gradient(135deg, #0c4a6ee6 0%, #164e63e6 50%, #07315ae6 100%);\r\n --scope-item-border: 1px solid #38bdf8d9;\r\n --scope-item-color: #e0f2fe;\r\n --scope-item-shadow: 0px 0px 10px #0ea5e966;\r\n --scope-icon-color: #bae6fd;\r\n --scope-icon-shadow: 0px 0px 12px #38bdf8;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #051525cc;\r\n --postil-text-color: #38bdf8;\r\n --postil-text-box-bg: #05152580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #38bdf8;\r\n --table-cell-bg: #05152570;\r\n --table-cell-selection-bg: #0369a18a;\r\n --table-cell-active-bg: #075985a0;\r\n --table-title-bg: #0c4a6ed0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #051525cc;\r\n --box-columns-layout-item-hover-color: #38bdf8;\r\n --box-columns-block-bg: #05152570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #0ea5e98c;\r\n --annotation-bg: #051525bf;\r\n --annotation-box-bg: #071e30c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #0369a178;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #051525a8;\r\n --code-tabbar-item-bg: #071e30a0;\r\n --code-tabbar-item-color: #38bdf8;\r\n --code-tabbar-item-active-color: #7dd3fc;\r\n --code-tabbar-item-active-bg: #071e3078;\r\n --code-tabbar-item-active-border: 1px dashed #38bdf8;\r\n --code-toolbar-bg: #05152547;\r\n --code-toolbar-item-hover-color: #06b6d4;\r\n --code-tooltip-bg: rgb(3 105 161 / 60%);\r\n --code-tooltip-color: #bae6fdcc;\r\n --code-input-border: 1px dashed #38bdf8;\r\n --code-input-color: #bae6fd;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #05152570;\r\n --list-ordered-symbol-hover-bg: #0369a191;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #051525ad;\r\n --todoitem-status-border: 1px dashed #075985;\r\n --todoitem-status-active-color: #f0f9ff;\r\n --todoitem-status-active-bg: #0369a1;\r\n --todoitem-done-color: #075985;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #05152580;\r\n --img-load-failed-color: #07598580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0c4a6e7d;\r\n --tip-border: 1px solid #0ea5e980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #05152570;\r\n --detail-even-bg: #071e3070;\r\n --detail-adder-bg: #05152540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #0369a14a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #031220ad;\r\n --text-link-box-bg: #051525c9;\r\n --text-link-bg: #071e30cc;\r\n --text-link-color: #bae6fde8;\r\n --text-link-icon-hover-bg: #0369a180;\r\n --text-link-icon-hover-color: #38bdf8e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #0369a1b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #05152530;\r\n --line-hover-bg: #05152530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #0ea5e9;\r\n --box-bg: #05152540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #0369a1cc, #0891b2c2);\r\n --box-root-dragger-bg: #38bdf8;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #bae6fd;\r\n --box-root-drag-enter-bg: #07598580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0369a1;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #0ea5e9;\r\n\r\n --box-folder-tag-active-border: 2px solid #0369a1;\r\n --box-folder-tag-active-bg: #0369a1;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #0ea5e9;\r\n\r\n --box-folder-border: 2px dashed #0369a1a8;\r\n --box-folder-active-bg: #07598580;\r\n --box-folder-active-border: 1px solid #0ea5e9;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #38bdf811;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #38bdf8;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #06b6d411;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #06b6d4;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},neon:{name:"霓虹",css:'\ufeff/* ————————————————— Neon Theme ————————————————— */\r\n/* 霓虹主题:亮色以清冷白底衬托荧光配色,暗色完全释放赛博朋克气质 */\r\n/* 电青 #00e5ff / 洋红 #ff00aa / 荧光绿 #39ff14 / 深夜 #07000f */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n \r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f5f0ff;\r\n --color: #0d001f;\r\n\r\n --selection-bg: #00c8e6;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #b3e0ff;\r\n --ui-close-corner-bg: #0099bb;\r\n --cube-bg: #e8f0ff30;\r\n --cube-toolbar-bg: #d0e8ff30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #eef4ff99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #00c8e6cc, #cc00aacc);\r\n --float-node-layout-usable-color: #0d001f;\r\n --float-node-layout-disable-color: #b3e0ffcc;\r\n --float-node-layout-shadow: 0px 0px 6px #b3e0ff88;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #00c8e6bb;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f8f0ffcc;\r\n --menu-title-bg: linear-gradient(45deg, #c0e8ffcc, #ffc0f0cc);\r\n --menu-title-icon-color: #0099bb;\r\n --menu-item-color: #0d001f;\r\n --menu-item-bg-hover: #e8f0ff;\r\n --menu-item-active-color: #0099bb;\r\n --menu-shortcut-color: #00c8e6;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c0e8ff;\r\n --menu-dialog-mask-bg: rgba(0, 153, 187, 0.12);\r\n --menu-dialog-input-border: 1px solid #b3e0ff;\r\n --menu-dialog-bg: #f8f0ff;\r\n --menu-dialog-color: #0d001f;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #e8f0ffcc;\r\n --submenu-node-line-header-color: #006680cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #0099bb;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f8f0ff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #b3e0ffcc;\r\n --map-mini-bg: rgba(248, 240, 255, 0.95);\r\n --map-mini-border: #a5f3fc;\r\n --map-mini-title-color: #06b6d4;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #00c8e633;\r\n --placeholder-box-selector-stroke: #0099bb;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e8f0ff30;\r\n --submap-shadow: #00c8e6 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #00c8e6;\r\n --node-bg: #e8f0ff50;\r\n --node-selected-stroke: #0099bb;\r\n --node-editable-bg: #f5f0ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.18));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #b3e0ff;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #c0e8ff80 0%, #ffc0f080 50%, #c0ffd880 100%);\r\n --scope-border: 2px solid #00c8e6;\r\n --scope-shadow: 0px 0px 16px #00c8e699;\r\n --scope-item-bg: linear-gradient(135deg, #e0f4ffcf 0%, #ffe0f8cf 50%, #e0ffeccf 100%);\r\n --scope-item-border: 1px solid #00c8e6;\r\n --scope-item-color: #0d001f;\r\n --scope-item-shadow: 0px 0px 8px #00c8e655;\r\n --scope-icon-color: #0d001f;\r\n --scope-icon-shadow: 0px 0px 10px #0099bb;\r\n --scope-icon-hover-color: #cc00aa;\r\n --scope-icon-hover-shadow: 0px 0px 10px #cc00aa;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #c0e8ffcc;\r\n --postil-text-color: #0099bb;\r\n --postil-text-box-bg: rgb(232 240 255 / 0.85);\r\n --postil-text-icon-close-bg: #b3e0ffa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #00c8e6;\r\n --table-cell-bg: #e8f0fe80;\r\n --table-cell-selection-bg: #00c8e63a;\r\n --table-cell-active-bg: #cc00aa20;\r\n --table-title-bg: #b3e0ff80;\r\n --table-dragger-bg: #f8f0ff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #00c8e68c;\r\n --annotation-bg: #f8f0ff85;\r\n --annotation-box-bg: #e8f0ffc2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #c0e8ff5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e8f0ffcc;\r\n --box-columns-layout-item-hover-color: #0099bb;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #c0e8ff70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #e8f0ff70;\r\n --code-tabbar-item-bg: #b3e0ff68;\r\n --code-tabbar-item-color: #00c8e678;\r\n --code-tabbar-item-active-color: #0d001f;\r\n --code-tabbar-item-active-bg: #b3e0ff78;\r\n --code-tabbar-item-active-border: 1px dashed #0099bb;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #cc00aa;\r\n --code-tooltip-bg: #0d001f;\r\n --code-tooltip-color: #c0e8ffcc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #0099bb;\r\n --code-input-color: #0d001f;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #00c8e691;\r\n --list-item-bg: #e8f0fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #e8f0fead;\r\n --todoitem-status-border: 1px dashed #0099bb;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #00c8e6;\r\n --todoitem-done-color: #b3e0ff;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #e8f0fe80;\r\n --img-load-failed-color: #b3e0ff80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #c0e8ff7d;\r\n --tip-border: 1px solid #00c8e680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #e8f0fe70;\r\n --detail-even-bg: #ffe8fc70;\r\n --detail-adder-bg: #e8f0fe40;\r\n --detail-list-border: 1px dashed #b3e0ff;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #c0e8ff80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f8f0ff;\r\n --text-link-box-bg: #e8f0ff;\r\n --text-link-bg: #c0e8ff;\r\n --text-link-color: #0d001f;\r\n --text-link-icon-hover-bg: #00c8e6;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #80ddf0;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e8f0fe30;\r\n --line-hover-bg: #e8f0fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #00c8e6;\r\n --box-bg: #c0e8ff40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #00c8e6cc, #cc00aacc);\r\n --box-root-dragger-bg: #00c8e6;\r\n --box-root-fold-bg: #0d001f;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #c0ffd880;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #0099bb;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #0099bb;\r\n\r\n --box-folder-tag-active-border: 2px solid #0099bb;\r\n --box-folder-tag-active-bg: #0099bb;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #00c8e6;\r\n\r\n --box-folder-border: 2px dashed #0099bba8;\r\n --box-folder-active-bg: #c0e8ff80;\r\n --box-folder-active-border: 1px solid #0099bb;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #c0ffd8;\r\n --api-functions-color-light: #c0ffd866;\r\n --api-functions-type-bg: #c0ffd8;\r\n --api-functions-type-color: #065f46cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #c0e8ff;\r\n --api-arguments-color-light: #c0e8ff66;\r\n --api-arguments-type-bg: #c0e8ff;\r\n --api-arguments-type-color: #075985cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #ffc0f0;\r\n --api-exceptions-color-light: #ffc0f066;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #07000f;\r\n --color: #00e5ff;\r\n\r\n --selection-bg: #00aacc;\r\n --selection-color: #07000f;\r\n --ui-scrollbar-thumb-bg: #003344;\r\n --ui-close-corner-bg: #00e5ff;\r\n --cube-bg: #0d001f;\r\n --cube-toolbar-bg: #12003055;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #0d001f99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #00aacc cc, #aa0088cc);\r\n --float-node-layout-usable-color: #00e5ff;\r\n --float-node-layout-disable-color: #003344;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 12px #00e5ffaa;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #09001acc;\r\n --menu-title-bg: linear-gradient(45deg, #003344cc, #330033cc);\r\n --menu-title-icon-color: #00e5ff;\r\n --menu-item-color: #00e5ff;\r\n --menu-item-bg-hover: #110022cc;\r\n --menu-item-active-color: #00e5ff;\r\n --menu-shortcut-color: #004455;\r\n --menu-item-disable-color: #110033;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.65);\r\n --menu-dialog-input-border: 1px solid #00445566;\r\n --menu-dialog-bg: #09001acc;\r\n --menu-dialog-color: #00e5ff;\r\n\r\n --submenu-node-line-header-bg: #0d001f33;\r\n --submenu-node-line-header-color: #00c8e6cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #00e5ff;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #07000f;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #00e5ff55;\r\n --map-mini-bg: rgba(7, 0, 15, 0.92);\r\n --map-mini-border: #164e6350;\r\n --map-mini-title-color: #00e5ff70;\r\n\r\n --placeholder-box-selector-fill: #00e5ff18;\r\n --placeholder-box-selector-stroke: #00e5ff88;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #07000f40;\r\n --submap-shadow: #00e5ff 0px 0px 14px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #00e5ff;\r\n --node-bg: #0d001f40;\r\n --node-selected-stroke: #00e5ffdd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #003344;\r\n --linker-filter: drop-shadow(0px 0px 2px #00e5ff66);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #003344b3 0%, #330033b3 50%, #003322b3 100%);\r\n --scope-border: 2px solid #00e5ff;\r\n --scope-shadow: 0px 0px 20px #00e5ffaa;\r\n --scope-item-bg: linear-gradient(135deg, #003344e6 0%, #330033e6 50%, #003322e6 100%);\r\n --scope-item-border: 1px solid #00e5ffd9;\r\n --scope-item-color: #ccffff;\r\n --scope-item-shadow: 0px 0px 12px #00e5ff66;\r\n --scope-icon-color: #00e5ff;\r\n --scope-icon-shadow: 0px 0px 14px #00e5ff;\r\n --scope-icon-hover-color: #ff00aa;\r\n --scope-icon-hover-shadow: 0px 0px 14px #ff00aa;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 30px #0d001fcc;\r\n --postil-text-color: #00e5ff;\r\n --postil-text-box-bg: #0d001f80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #00e5ff;\r\n --table-cell-bg: #0d001f70;\r\n --table-cell-selection-bg: #00aacc8a;\r\n --table-cell-active-bg: #aa008855;\r\n --table-title-bg: #003344d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #0d001fcc;\r\n --box-columns-layout-item-hover-color: #00e5ff;\r\n --box-columns-block-bg: #0d001f70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #00e5ff55;\r\n --annotation-bg: #0d001fbf;\r\n --annotation-box-bg: #110022c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #00aacc55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #0d001fa8;\r\n --code-tabbar-item-bg: #110022a0;\r\n --code-tabbar-item-color: #00c8e6;\r\n --code-tabbar-item-active-color: #00e5ff;\r\n --code-tabbar-item-active-bg: #11002278;\r\n --code-tabbar-item-active-border: 1px dashed #00e5ff;\r\n --code-toolbar-bg: #0d001f47;\r\n --code-toolbar-item-hover-color: #ff00aa;\r\n --code-tooltip-bg: rgb(0 170 204 / 40%);\r\n --code-tooltip-color: #ccffffcc;\r\n --code-input-border: 1px dashed #00e5ff;\r\n --code-input-color: #00e5ff;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #0d001f70;\r\n --list-ordered-symbol-hover-bg: #00aacc91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #0d001fad;\r\n --todoitem-status-border: 1px dashed #003344;\r\n --todoitem-status-active-color: #07000f;\r\n --todoitem-status-active-bg: #00e5ff;\r\n --todoitem-done-color: #003344;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #0d001f80;\r\n --img-load-failed-color: #00334480;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #0033447d;\r\n --tip-border: 1px solid #00e5ff80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #0d001f70;\r\n --detail-even-bg: #11002270;\r\n --detail-adder-bg: #0d001f40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #00aacc3a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #09001aad;\r\n --text-link-box-bg: #0d001fc9;\r\n --text-link-bg: #110022cc;\r\n --text-link-color: #00e5ffe8;\r\n --text-link-icon-hover-bg: #00aacc55;\r\n --text-link-icon-hover-color: #00e5ffe0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #00aaccb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #0d001f30;\r\n --line-hover-bg: #0d001f30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #00e5ff;\r\n --box-bg: #0d001f40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #00aacc cc, #aa0088cc);\r\n --box-root-dragger-bg: #00e5ff;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #00e5ff;\r\n --box-root-drag-enter-bg: #003322a0;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #00e5ff;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 10px #00e5ff;\r\n\r\n --box-folder-tag-active-border: 2px solid #00aacc;\r\n --box-folder-tag-active-bg: #00aacc;\r\n --box-folder-tag-active-shadow: 0px 0px 14px #00e5ff;\r\n\r\n --box-folder-border: 2px dashed #00e5ffa8;\r\n --box-folder-active-bg: #003344a0;\r\n --box-folder-active-border: 1px solid #00e5ff;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #39ff1411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #39ff14;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #00e5ff11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #00e5ff;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #ff00aa11;\r\n --api-exceptions-border: 4px solid #ff00aa;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},forest:{name:"森林",css:'\ufeff/* ————————————————— Forest Theme ————————————————— */\r\n/* 森林主题:亮色以苔藓白+草地绿为基调,暗色深入林间深夜的幽静感 */\r\n/* 翠绿 #22c55e / 新芽 #84cc16 / 棕 #78350f / 苔藓白 #f7fee7 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f7fee7;\r\n --color: #14290a;\r\n\r\n --selection-bg: #22c55e;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #86efac;\r\n --ui-close-corner-bg: #15803d;\r\n --cube-bg: #dcfce730;\r\n --cube-toolbar-bg: #bbf7d030;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #f0fdf499;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #22c55ecc, #84cc16cc);\r\n --float-node-layout-usable-color: #14290a;\r\n --float-node-layout-disable-color: #86efaccc;\r\n --float-node-layout-shadow: 0px 0px 6px #86efac88;\r\n --float-node-layout-shadow-hover: 0px 0px 8px #22c55ecc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #f7fef0cc;\r\n --menu-title-bg: linear-gradient(45deg, #bbf7d0cc, #d9f99dcc);\r\n --menu-title-icon-color: #15803d;\r\n --menu-item-color: #14290a;\r\n --menu-item-bg-hover: #dcfce7;\r\n --menu-item-active-color: #15803d;\r\n --menu-shortcut-color: #4ade80;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #bbf7d0;\r\n --menu-dialog-mask-bg: rgba(21, 128, 61, 0.1);\r\n --menu-dialog-input-border: 1px solid #86efac;\r\n --menu-dialog-bg: #f7fef0;\r\n --menu-dialog-color: #14290a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #dcfce7cc;\r\n --submenu-node-line-header-color: #166534cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #15803d;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #f7fef0;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #86efaccc;\r\n --map-mini-bg: rgba(247, 254, 240, 0.95);\r\n --map-mini-border: #bbf7d0;\r\n --map-mini-title-color: #4ade80;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #22c55e33;\r\n --placeholder-box-selector-stroke: #15803d;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #dcfce730;\r\n --submap-shadow: #4ade80 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #4ade80;\r\n --node-bg: #dcfce750;\r\n --node-selected-stroke: #15803d;\r\n --node-editable-bg: #f0fdf440;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #86efac;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #bbf7d080 0%, #d9f99d80 50%, #dcfce780 100%);\r\n --scope-border: 2px solid #22c55e;\r\n --scope-shadow: 0px 0px 14px #22c55e99;\r\n --scope-item-bg: linear-gradient(135deg, #dcfce7cf 0%, #ecfccbcf 50%, #f0fdf4cf 100%);\r\n --scope-item-border: 1px solid #4ade80;\r\n --scope-item-color: #14290a;\r\n --scope-item-shadow: 0px 0px 8px #22c55e55;\r\n --scope-icon-color: #14290a;\r\n --scope-icon-shadow: 0px 0px 10px #15803d;\r\n --scope-icon-hover-color: #78350f;\r\n --scope-icon-hover-shadow: 0px 0px 10px #a16207;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #bbf7d0cc;\r\n --postil-text-color: #15803d;\r\n --postil-text-box-bg: rgb(220 252 231 / 0.85);\r\n --postil-text-icon-close-bg: #86efaca3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #22c55e;\r\n --table-cell-bg: #dcfce780;\r\n --table-cell-selection-bg: #22c55e3a;\r\n --table-cell-active-bg: #84cc1640;\r\n --table-title-bg: #86efac80;\r\n --table-dragger-bg: #f7fef075;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #22c55e8c;\r\n --annotation-bg: #f7fef085;\r\n --annotation-box-bg: #dcfce7c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #bbf7d05c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #dcfce7cc;\r\n --box-columns-layout-item-hover-color: #15803d;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #bbf7d070;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #dcfce770;\r\n --code-tabbar-item-bg: #86efac68;\r\n --code-tabbar-item-color: #4ade8078;\r\n --code-tabbar-item-active-color: #14290a;\r\n --code-tabbar-item-active-bg: #86efac78;\r\n --code-tabbar-item-active-border: 1px dashed #15803d;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #78350f;\r\n --code-tooltip-bg: #14290a;\r\n --code-tooltip-color: #bbf7d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #15803d;\r\n --code-input-color: #14290a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #22c55e91;\r\n --list-item-bg: #dcfce770;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #dcfce7ad;\r\n --todoitem-status-border: 1px dashed #15803d;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #22c55e;\r\n --todoitem-done-color: #86efac;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #dcfce780;\r\n --img-load-failed-color: #86efac80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #bbf7d07d;\r\n --tip-border: 1px solid #22c55e80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #dcfce770;\r\n --detail-even-bg: #ecfccb70;\r\n --detail-adder-bg: #dcfce740;\r\n --detail-list-border: 1px dashed #86efac;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #bbf7d080;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #f7fef0;\r\n --text-link-box-bg: #dcfce7;\r\n --text-link-bg: #bbf7d0;\r\n --text-link-color: #14290a;\r\n --text-link-icon-hover-bg: #22c55e;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #4ade80;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #dcfce730;\r\n --line-hover-bg: #dcfce730;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22c55e;\r\n --box-bg: #bbf7d040;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #22c55ecc, #84cc16c2);\r\n --box-root-dragger-bg: #4ade80;\r\n --box-root-fold-bg: #14290a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d9f99d80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #15803d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #15803d;\r\n\r\n --box-folder-tag-active-border: 2px solid #15803d;\r\n --box-folder-tag-active-bg: #15803d;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #22c55e;\r\n\r\n --box-folder-border: 2px dashed #15803da8;\r\n --box-folder-active-bg: #bbf7d080;\r\n --box-folder-active-border: 1px solid #15803d;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fef08a;\r\n --api-functions-color-light: #fef08a66;\r\n --api-functions-type-bg: #fef08a;\r\n --api-functions-type-color: #713f12cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #bbf7d0;\r\n --api-arguments-color-light: #bbf7d066;\r\n --api-arguments-type-bg: #bbf7d0;\r\n --api-arguments-type-color: #14532dcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #d9f99d69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #040e06;\r\n --color: #bbf7d0;\r\n\r\n --selection-bg: #15803d;\r\n --selection-color: #f0fdf4;\r\n --ui-scrollbar-thumb-bg: #14532d;\r\n --ui-close-corner-bg: #4ade80;\r\n --cube-bg: #071a0a;\r\n --cube-toolbar-bg: #0b2410;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #071a0a99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #14532dcc, #3a5c0acc);\r\n --float-node-layout-usable-color: #bbf7d0;\r\n --float-node-layout-disable-color: #14532d;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #22c55ecc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #040e06cc;\r\n --menu-title-bg: linear-gradient(45deg, #14532dcc, #3a5c0acc);\r\n --menu-title-icon-color: #4ade80;\r\n --menu-item-color: #bbf7d0;\r\n --menu-item-bg-hover: #0b2410cc;\r\n --menu-item-active-color: #4ade80;\r\n --menu-shortcut-color: #14532d;\r\n --menu-item-disable-color: #0d2e12;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #14532dcc;\r\n --menu-dialog-bg: #040e06cc;\r\n --menu-dialog-color: #bbf7d0;\r\n\r\n --submenu-node-line-header-bg: #071a0a33;\r\n --submenu-node-line-header-color: #86efaccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #4ade80;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #040e06;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #15803d66;\r\n --map-mini-bg: rgba(4, 14, 6, 0.92);\r\n --map-mini-border: #14532d50;\r\n --map-mini-title-color: #4ade8070;\r\n\r\n --placeholder-box-selector-fill: #22c55e18;\r\n --placeholder-box-selector-stroke: #4ade8099;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #040e0640;\r\n --submap-shadow: #22c55ea1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #4ade80;\r\n --node-bg: #071a0a40;\r\n --node-selected-stroke: #22c55ede;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #14532d;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #14532db3 0%, #3a5c0ab3 50%, #1a4d20b3 100%);\r\n --scope-border: 2px solid #22c55e;\r\n --scope-shadow: 0px 0px 18px #22c55eaa;\r\n --scope-item-bg: linear-gradient(135deg, #14532de6 0%, #3a5c0ae6 50%, #15451be6 100%);\r\n --scope-item-border: 1px solid #4ade80d9;\r\n --scope-item-color: #ecfccb;\r\n --scope-item-shadow: 0px 0px 10px #22c55e66;\r\n --scope-icon-color: #bbf7d0;\r\n --scope-icon-shadow: 0px 0px 12px #4ade80;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 28px #071a0acc;\r\n --postil-text-color: #4ade80;\r\n --postil-text-box-bg: #071a0a80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #4ade80;\r\n --table-cell-bg: #071a0a70;\r\n --table-cell-selection-bg: #15803d8a;\r\n --table-cell-active-bg: #3a5c0a82;\r\n --table-title-bg: #14532dd0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #071a0acc;\r\n --box-columns-layout-item-hover-color: #4ade80;\r\n --box-columns-block-bg: #071a0a70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #22c55e8c;\r\n --annotation-bg: #071a0abf;\r\n --annotation-box-bg: #0b2410c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #15803d78;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #071a0aa8;\r\n --code-tabbar-item-bg: #0b2410a0;\r\n --code-tabbar-item-color: #4ade80;\r\n --code-tabbar-item-active-color: #86efac;\r\n --code-tabbar-item-active-bg: #0b241078;\r\n --code-tabbar-item-active-border: 1px dashed #4ade80;\r\n --code-toolbar-bg: #071a0a47;\r\n --code-toolbar-item-hover-color: #84cc16;\r\n --code-tooltip-bg: rgb(21 128 61 / 50%);\r\n --code-tooltip-color: #dcfce7cc;\r\n --code-input-border: 1px dashed #4ade80;\r\n --code-input-color: #bbf7d0;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #071a0a70;\r\n --list-ordered-symbol-hover-bg: #15803d91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #071a0aad;\r\n --todoitem-status-border: 1px dashed #14532d;\r\n --todoitem-status-active-color: #f0fdf4;\r\n --todoitem-status-active-bg: #15803d;\r\n --todoitem-done-color: #14532d;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #071a0a80;\r\n --img-load-failed-color: #14532d80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #14532d7d;\r\n --tip-border: 1px solid #22c55e80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #071a0a70;\r\n --detail-even-bg: #0b240f70;\r\n --detail-adder-bg: #071a0a40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #15803d4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #040e06ad;\r\n --text-link-box-bg: #071a0ac9;\r\n --text-link-bg: #0b2410cc;\r\n --text-link-color: #bbf7d0e8;\r\n --text-link-icon-hover-bg: #15803d80;\r\n --text-link-icon-hover-color: #4ade80e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #15803db5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #071a0a30;\r\n --line-hover-bg: #071a0a30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #22c55e;\r\n --box-bg: #071a0a40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #15803dcc, #3a5c0ac2);\r\n --box-root-dragger-bg: #4ade80;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #bbf7d0;\r\n --box-root-drag-enter-bg: #14532d80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #15803d;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #22c55e;\r\n\r\n --box-folder-tag-active-border: 2px solid #15803d;\r\n --box-folder-tag-active-bg: #15803d;\r\n --box-folder-tag-active-shadow: 0px 0px 10px #4ade80;\r\n\r\n --box-folder-border: 2px dashed #15803da8;\r\n --box-folder-active-bg: #14532d80;\r\n --box-folder-active-border: 1px solid #22c55e;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #84cc1611;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #84cc16;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #22c55e11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #22c55e;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},dusk:{name:"暮色",css:'\ufeff/* ————————————————— Dusk Theme ————————————————— */\r\n/* 暮色主题:亮色以暖橙→薰衣草渐变为基色,暗色呈现云霞与深夜交接的绮丽时刻 */\r\n/* 晚霞橙 #fb923c / 薰衣草 #c084fc / 玫红 #f43f5e / 深紫暮 #1a0030 */\r\n\r\n:root{\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fff8f0;\r\n --color: #2d0040;\r\n\r\n --selection-bg: #fb923c;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fdc8a0;\r\n --ui-close-corner-bg: #ea580c;\r\n --cube-bg: #fff1e630;\r\n --cube-toolbar-bg: #ffe4cc30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fff8f099;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #fb923ccc, #c084fccc);\r\n --float-node-layout-usable-color: #2d0040;\r\n --float-node-layout-disable-color: #fdc8a0cc;\r\n --float-node-layout-shadow: 0px 0px 6px #fdc8a088;\r\n --float-node-layout-shadow-hover: 0px 0px 10px #fb923ccc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #fff8f2cc;\r\n --menu-title-bg: linear-gradient(45deg, #fed7aacc, #e9d5ffcc);\r\n --menu-title-icon-color: #c2410c;\r\n --menu-item-color: #2d0040;\r\n --menu-item-bg-hover: #fff1e6;\r\n --menu-item-active-color: #c2410c;\r\n --menu-shortcut-color: #fb923c;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fde8d5;\r\n --menu-dialog-mask-bg: rgba(194, 65, 12, 0.10);\r\n --menu-dialog-input-border: 1px solid #fdc8a0;\r\n --menu-dialog-bg: #fff8f2;\r\n --menu-dialog-color: #2d0040;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fff1e6cc;\r\n --submenu-node-line-header-color: #9a3412cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #c2410c;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #fff8f2;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 8px #fdc8a0cc;\r\n --map-mini-bg: rgba(255, 248, 242, 0.95);\r\n --map-mini-border: #fed7aa;\r\n --map-mini-title-color: #f97316;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #fb923c33;\r\n --placeholder-box-selector-stroke: #c2410c;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fff1e630;\r\n --submap-shadow: #fb923c 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #c084fc;\r\n --node-bg: #fff1e650;\r\n --node-selected-stroke: #c2410c;\r\n --node-editable-bg: #fff8f040;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fdc8a0;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fed7aa80 0%, #e9d5ff80 50%, #fecdd380 100%);\r\n --scope-border: 2px solid #fb923c;\r\n --scope-shadow: 0px 0px 14px #fb923c99;\r\n --scope-item-bg: linear-gradient(135deg, #fff1e6cf 0%, #f3e8ffcf 50%, #ffe4e6cf 100%);\r\n --scope-item-border: 1px solid #c084fc;\r\n --scope-item-color: #2d0040;\r\n --scope-item-shadow: 0px 0px 8px #fb923c55;\r\n --scope-icon-color: #2d0040;\r\n --scope-icon-shadow: 0px 0px 10px #c2410c;\r\n --scope-icon-hover-color: #7c3aed;\r\n --scope-icon-hover-shadow: 0px 0px 10px #7c3aed;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 0px 24px #fdc8a0cc;\r\n --postil-text-color: #c2410c;\r\n --postil-text-box-bg: rgb(255 241 230 / 0.85);\r\n --postil-text-icon-close-bg: #fdc8a0a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fb923c;\r\n --table-cell-bg: #fff1e680;\r\n --table-cell-selection-bg: #fb923c3a;\r\n --table-cell-active-bg: #c084fc30;\r\n --table-title-bg: #fdc8a080;\r\n --table-dragger-bg: #fff8f275;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #fb923c8c;\r\n --annotation-bg: #fff8f285;\r\n --annotation-box-bg: #fff1e6c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fed7aa5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fff1e6cc;\r\n --box-columns-layout-item-hover-color: #c2410c;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fed7aa70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fff1e670;\r\n --code-tabbar-item-bg: #fdc8a068;\r\n --code-tabbar-item-color: #fb923c78;\r\n --code-tabbar-item-active-color: #2d0040;\r\n --code-tabbar-item-active-bg: #fdc8a078;\r\n --code-tabbar-item-active-border: 1px dashed #c2410c;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #c084fc;\r\n --code-tooltip-bg: #2d0040;\r\n --code-tooltip-color: #fed7aacc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px dashed #c2410c;\r\n --code-input-color: #2d0040;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #fb923c91;\r\n --list-item-bg: #fff1e670;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fff1e6ad;\r\n --todoitem-status-border: 1px dashed #c2410c;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #fb923c;\r\n --todoitem-done-color: #fdc8a0;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fff1e680;\r\n --img-load-failed-color: #fdc8a080;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fed7aa7d;\r\n --tip-border: 1px solid #fb923c80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fff1e670;\r\n --detail-even-bg: #f3e8ff70;\r\n --detail-adder-bg: #fff1e640;\r\n --detail-list-border: 1px dashed #fdc8a0;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fed7aa80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #fff8f2;\r\n --text-link-box-bg: #fff1e6;\r\n --text-link-bg: #fed7aa;\r\n --text-link-color: #2d0040;\r\n --text-link-icon-hover-bg: #fb923c;\r\n --text-link-icon-hover-color: none;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #fdba74;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fff1e630;\r\n --line-hover-bg: #fff1e630;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #fb923c;\r\n --box-bg: #fed7aa40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #fb923ccc, #c084fcc2);\r\n --box-root-dragger-bg: #fb923c;\r\n --box-root-fold-bg: #2d0040;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #e9d5ff80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #c2410c;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #c2410c;\r\n\r\n --box-folder-tag-active-border: 2px solid #c2410c;\r\n --box-folder-tag-active-bg: #c2410c;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #fb923c;\r\n\r\n --box-folder-border: 2px dashed #c2410ca8;\r\n --box-folder-active-bg: #fed7aa80;\r\n --box-folder-active-border: 1px solid #c2410c;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #fed7aa;\r\n --api-functions-color-light: #fed7aa66;\r\n --api-functions-type-bg: #fed7aa;\r\n --api-functions-type-color: #7c2d12cc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #e9d5ff;\r\n --api-arguments-color-light: #e9d5ff66;\r\n --api-arguments-type-bg: #e9d5ff;\r\n --api-arguments-type-color: #4c1d95cc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fecdd3;\r\n --api-exceptions-color-light: #fecdd366;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fda4af69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #100018;\r\n --color: #fde8d5;\r\n\r\n --selection-bg: #c2410c;\r\n --selection-color: #fff8f0;\r\n --ui-scrollbar-thumb-bg: #7c2d12;\r\n --ui-close-corner-bg: #fb923c;\r\n --cube-bg: #1a0028;\r\n --cube-toolbar-bg: #260035;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1a002899;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #9a3412cc, #6b21a8cc);\r\n --float-node-layout-usable-color: #fde8d5;\r\n --float-node-layout-disable-color: #7c2d12;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 0px 12px #fb923ccc;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #150020cc;\r\n --menu-title-bg: linear-gradient(45deg, #7c2d12cc, #4c1d95cc);\r\n --menu-title-icon-color: #fb923c;\r\n --menu-item-color: #fde8d5;\r\n --menu-item-bg-hover: #260035cc;\r\n --menu-item-active-color: #fb923c;\r\n --menu-shortcut-color: #7c2d12;\r\n --menu-item-disable-color: #300040;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.55);\r\n --menu-dialog-input-border: 1px solid #7c2d12cc;\r\n --menu-dialog-bg: #150020cc;\r\n --menu-dialog-color: #fde8d5;\r\n\r\n --submenu-node-line-header-bg: #1a002833;\r\n --submenu-node-line-header-color: #fdc8a0cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fb923c;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #100018;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 0px 12px #c2410c66;\r\n --map-mini-bg: rgba(16, 0, 24, 0.92);\r\n --map-mini-border: #78350f50;\r\n --map-mini-title-color: #c2410c80;\r\n\r\n --placeholder-box-selector-fill: #fb923c18;\r\n --placeholder-box-selector-stroke: #fb923c99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #10001840;\r\n --submap-shadow: #fb923ca1 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #c084fc;\r\n --node-bg: #1a002840;\r\n --node-selected-stroke: #fb923cde;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #7c2d12;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #7c2d12b3 0%, #4c1d95b3 50%, #9a1642b3 100%);\r\n --scope-border: 2px solid #fb923c;\r\n --scope-shadow: 0px 0px 20px #fb923caa;\r\n --scope-item-bg: linear-gradient(135deg, #7c2d12e6 0%, #4c1d95e6 50%, #881337e6 100%);\r\n --scope-item-border: 1px solid #c084fcd9;\r\n --scope-item-color: #fff1e6;\r\n --scope-item-shadow: 0px 0px 12px #fb923c66;\r\n --scope-icon-color: #fde8d5;\r\n --scope-icon-shadow: 0px 0px 14px #fb923c;\r\n --scope-icon-hover-color: #c084fc;\r\n --scope-icon-hover-shadow: 0px 0px 14px #c084fc;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 0px 30px #1a0028cc;\r\n --postil-text-color: #fb923c;\r\n --postil-text-box-bg: #1a002880;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fb923c;\r\n --table-cell-bg: #1a002870;\r\n --table-cell-selection-bg: #c2410c8a;\r\n --table-cell-active-bg: #4c1d9555;\r\n --table-title-bg: #7c2d12d0;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-layout-bg: #1a0028cc;\r\n --box-columns-layout-item-hover-color: #fb923c;\r\n --box-columns-block-bg: #1a002870;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #fb923c55;\r\n --annotation-bg: #1a0028bf;\r\n --annotation-box-bg: #260035c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #c2410c55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1a0028a8;\r\n --code-tabbar-item-bg: #260035a0;\r\n --code-tabbar-item-color: #fb923c;\r\n --code-tabbar-item-active-color: #fdc8a0;\r\n --code-tabbar-item-active-bg: #26003578;\r\n --code-tabbar-item-active-border: 1px dashed #fb923c;\r\n --code-toolbar-bg: #1a002847;\r\n --code-toolbar-item-hover-color: #c084fc;\r\n --code-tooltip-bg: rgb(194 65 12 / 50%);\r\n --code-tooltip-color: #fde8d5cc;\r\n --code-input-border: 1px dashed #fb923c;\r\n --code-input-color: #fde8d5;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1a002870;\r\n --list-ordered-symbol-hover-bg: #c2410c91;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1a0028ad;\r\n --todoitem-status-border: 1px dashed #7c2d12;\r\n --todoitem-status-active-color: #fff8f0;\r\n --todoitem-status-active-bg: #c2410c;\r\n --todoitem-done-color: #7c2d12;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1a002880;\r\n --img-load-failed-color: #7c2d1280;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #7c2d127d;\r\n --tip-border: 1px solid #fb923c80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1a002870;\r\n --detail-even-bg: #26003570;\r\n --detail-adder-bg: #1a002840;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #c2410c4a;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #150020ad;\r\n --text-link-box-bg: #1a0028c9;\r\n --text-link-bg: #260035cc;\r\n --text-link-color: #fde8d5e8;\r\n --text-link-icon-hover-bg: #c2410c70;\r\n --text-link-icon-hover-color: #fb923ce0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #c2410cb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1a002830;\r\n --line-hover-bg: #1a002830;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #fb923c;\r\n --box-bg: #1a002840;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #c2410ccc, #7c3aedc2);\r\n --box-root-dragger-bg: #fb923c;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fde8d5;\r\n --box-root-drag-enter-bg: #4c1d9580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #c2410c;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #fb923c;\r\n\r\n --box-folder-tag-active-border: 2px solid #c2410c;\r\n --box-folder-tag-active-bg: #c2410c;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #fb923c;\r\n\r\n --box-folder-border: 2px dashed #c2410ca8;\r\n --box-folder-active-bg: #7c2d1280;\r\n --box-folder-active-border: 1px solid #fb923c;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fb923c11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fb923c;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #c084fc11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #c084fc;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #f8717111;\r\n --api-exceptions-border: 4px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffa50069;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},midnight:{name:"暗夜",css:'\ufeff/* ————————————————— Midnight Theme · 暗夜 ————————————————— */\r\n/* 奢华靛紫 + 烁金点缀,亮色如羊皮纸,暗色如深渊夜宫 */\r\n/* 主色:宫廷靛 #3730a3 / 金箔 #d97706 / 暗夜 #08050f */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #faf8f2;\r\n --color: #1e1b4b;\r\n\r\n --selection-bg: #4338ca;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #c7d2fe;\r\n --ui-close-corner-bg: #4338ca;\r\n --cube-bg: #eeecff30;\r\n --cube-toolbar-bg: #e0dcff30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #eeecff99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4338cacc, #d97706cc);\r\n --float-node-layout-usable-color: #1e1b4b;\r\n --float-node-layout-disable-color: #c7d2fecc;\r\n --float-node-layout-shadow: 0px 2px 8px #1e1b4b0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #4338ca30;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #e0e7ffcc, #fef3c7cc);\r\n --menu-title-icon-color: #4338ca;\r\n --menu-item-color: #1e1b4b;\r\n --menu-item-bg-hover: #eeecff;\r\n --menu-item-active-color: #4338ca;\r\n --menu-shortcut-color: #a5b4fc;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #c7d2fe;\r\n --menu-dialog-mask-bg: rgba(30, 27, 75, 0.18);\r\n --menu-dialog-input-border: 1px solid #c7d2fe;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #1e1b4b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #eeecffcc;\r\n --submenu-node-line-header-color: #6366f1cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #4338ca;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #1e1b4b12;\r\n --map-mini-bg: rgba(248, 248, 255, 0.95);\r\n --map-mini-border: #e0e7ff;\r\n --map-mini-title-color: #818cf8;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #4338ca18;\r\n --placeholder-box-selector-stroke: #4338ca;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #e0e7ff40;\r\n --submap-shadow: #818cf8 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #818cf8;\r\n --node-bg: #eeecff70;\r\n --node-selected-stroke: #4338ca;\r\n --node-editable-bg: #faf8f240;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #c7d2fe;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #e0e7ff80 0%, #fef3c780 50%, #ede9fe80 100%);\r\n --scope-border: 2px solid #818cf8;\r\n --scope-shadow: 0px 0px 14px #4338ca40;\r\n --scope-item-bg: linear-gradient(135deg, #e8ecffcf 0%, #fdf6d8cf 50%, #ede9fecf 100%);\r\n --scope-item-border: 1px solid #818cf8;\r\n --scope-item-color: #1e1b4b;\r\n --scope-item-shadow: 0px 2px 10px #4338ca20;\r\n --scope-icon-color: #1e1b4b;\r\n --scope-icon-shadow: 0px 0px 8px #4338ca50;\r\n --scope-icon-hover-color: #d97706;\r\n --scope-icon-hover-shadow: 0px 0px 10px #d97706;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #1e1b4b14;\r\n --postil-text-color: #4338ca;\r\n --postil-text-box-bg: rgb(238 236 255 / 0.88);\r\n --postil-text-icon-close-bg: #c7d2fea3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #4338ca;\r\n --table-cell-bg: #eeecff80;\r\n --table-cell-selection-bg: #4338ca25;\r\n --table-cell-active-bg: #d9770620;\r\n --table-title-bg: #c7d2fe80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #4338ca25;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #eeecffc2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #e0e7ff5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #e8ecffcc;\r\n --box-columns-layout-item-hover-color: #4338ca;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #e0e7ff70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #eeecff70;\r\n --code-tabbar-item-bg: #c7d2fe78;\r\n --code-tabbar-item-color: #6366f178;\r\n --code-tabbar-item-active-color: #1e1b4b;\r\n --code-tabbar-item-active-bg: #c7d2fe78;\r\n --code-tabbar-item-active-border: 1px solid #818cf8;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #d97706;\r\n --code-tooltip-bg: #1e1b4b;\r\n --code-tooltip-color: #c7d2fecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #c7d2fe;\r\n --code-input-color: #1e1b4b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #4338ca25;\r\n --list-item-bg: #eeecff70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #eeecffad;\r\n --todoitem-status-border: 1px solid #c7d2fe;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #4338ca;\r\n --todoitem-done-color: #a5b4fc;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #eeecff80;\r\n --img-load-failed-color: #c7d2fe80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #e0e7ff7d;\r\n --tip-border: 1px solid #818cf880;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #eeecff70;\r\n --detail-even-bg: #fef3c770;\r\n --detail-adder-bg: #eeecff40;\r\n --detail-list-border: 1px solid #c7d2fe;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #e0e7ff80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #eef0ff;\r\n --text-link-bg: #e0e7ff;\r\n --text-link-color: #1e1b4b;\r\n --text-link-icon-hover-bg: #4338ca;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #818cf8;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #e0e7ff30;\r\n --line-hover-bg: #e0e7ff30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #818cf8;\r\n --box-bg: #eeecff40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #4338cacc, #d97706c2);\r\n --box-root-dragger-bg: #818cf8;\r\n --box-root-fold-bg: #1e1b4b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #e0e7ff80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #4338ca;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #4338ca40;\r\n\r\n --box-folder-tag-active-border: 2px solid #4338ca;\r\n --box-folder-tag-active-bg: #4338ca;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #4338ca60;\r\n\r\n --box-folder-border: 2px dashed #818cf880;\r\n --box-folder-active-bg: #e0e7ff80;\r\n --box-folder-active-border: 1px solid #4338ca;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #d97706;\r\n --api-functions-color-light: #d9770666;\r\n --api-functions-type-bg: #d97706;\r\n --api-functions-type-color: #78716ccc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #818cf8;\r\n --api-arguments-color-light: #818cf866;\r\n --api-arguments-type-bg: #818cf8;\r\n --api-arguments-type-color: #1e1b4bcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fef3c769;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #08050f;\r\n --color: #e0e7ff;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #4338ca;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #1e1b4b;\r\n --ui-close-corner-bg: #818cf8;\r\n --cube-bg: #1e1b4b30;\r\n --cube-toolbar-bg: #1e1b4b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #1e1b4b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #312e81cc, #78350fcc);\r\n --float-node-layout-usable-color: #e0e7ff;\r\n --float-node-layout-disable-color: #1e1b4b;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #818cf840;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #0f0c1ecc;\r\n --menu-title-bg: linear-gradient(120deg, #1e1b4bcc, #2d1f0ecc);\r\n --menu-title-icon-color: #818cf8;\r\n --menu-item-color: #e0e7ff;\r\n --menu-item-bg-hover: #1e1b4bcc;\r\n --menu-item-active-color: #a5b4fc;\r\n --menu-shortcut-color: #312e81;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #1a1838;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #1e1b4b88;\r\n --menu-dialog-bg: #0f0c1ecc;\r\n --menu-dialog-color: #e0e7ff;\r\n\r\n --submenu-node-line-header-bg: #1e1b4b33;\r\n --submenu-node-line-header-color: #818cf8cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #a5b4fc;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #1e1b4bb3 0%, #2d1f0eb3 50%, #1a1838b3 100%);\r\n --scope-border: 2px solid #4338ca;\r\n --scope-shadow: 0px 0px 16px #4338ca80;\r\n --scope-item-bg: linear-gradient(135deg, #1e1b4be6 0%, #2d1f0ee6 50%, #1a1838e6 100%);\r\n --scope-item-border: 1px solid #818cf8d9;\r\n --scope-item-color: #c7d2fe;\r\n --scope-item-shadow: 0px 2px 12px #4338ca40;\r\n --scope-icon-color: #e0e7ff;\r\n --scope-icon-shadow: 0px 0px 10px #818cf8;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #08050f;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(8, 5, 15, 0.92);\r\n --map-mini-border: #1e1b4b50;\r\n --map-mini-title-color: #818cf880;\r\n --placeholder-box-selector-fill: #4338ca18;\r\n --placeholder-box-selector-stroke: #818cf899;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #08050f40;\r\n --submap-shadow: #4338ca80 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #818cf8;\r\n --node-bg: #1e1b4b40;\r\n --node-selected-stroke: #a5b4fcdd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #1e1b4b;\r\n --linker-filter: drop-shadow(0px 0px 2px #818cf855);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #818cf8;\r\n --postil-text-box-bg: #1e1b4b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #a5b4fc;\r\n --table-cell-bg: #1e1b4b70;\r\n --table-cell-selection-bg: #4338ca3a;\r\n --table-cell-active-bg: #78350fa0;\r\n --table-title-bg: #1e1b4b90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #1e1b4bcc;\r\n --box-columns-layout-item-hover-color: #a5b4fc;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #1e1b4b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #4338ca30;\r\n --annotation-bg: #1e1b4bbf;\r\n --annotation-box-bg: #12103ac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #1e1b4b55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #1e1b4ba8;\r\n --code-tabbar-item-bg: #12103a80;\r\n --code-tabbar-item-color: #818cf8;\r\n --code-tabbar-item-active-color: #c7d2fe;\r\n --code-tabbar-item-active-bg: #12103a78;\r\n --code-tabbar-item-active-border: 1px solid #252058;\r\n --code-toolbar-bg: #1e1b4b47;\r\n --code-toolbar-item-hover-color: #fbbf24;\r\n --code-tooltip-bg: rgb(67 56 202 / 50%);\r\n --code-tooltip-color: #a5b4fccc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #1e1b4b88;\r\n --code-input-color: #c7d2fe;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #1e1b4b70;\r\n --list-ordered-symbol-hover-bg: #4338ca40;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #1e1b4bad;\r\n --todoitem-status-border: 1px solid #1e1b4b88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #4338ca;\r\n --todoitem-done-color: #312e81;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #1e1b4b80;\r\n --img-load-failed-color: #1e1b4b80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #1e1b4b7d;\r\n --tip-border: 1px solid #4338ca80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #1e1b4b70;\r\n --detail-even-bg: #12103a70;\r\n --detail-adder-bg: #1e1b4b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #1e1b4b50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #0f0c1ead;\r\n --text-link-box-bg: #1e1b4bc9;\r\n --text-link-bg: #1e1b4bcc;\r\n --text-link-color: #e0e7ffe8;\r\n --text-link-icon-hover-bg: #4338ca60;\r\n --text-link-icon-hover-color: #c7d2fee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #4338cab5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #1e1b4b30;\r\n --line-hover-bg: #1e1b4b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #4338ca;\r\n --box-bg: #1e1b4b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #4338cacc, #fbbf24c2);\r\n --box-root-dragger-bg: #818cf8;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #e0e7ff;\r\n --box-root-drag-enter-bg: #1e1b4b80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #4338ca;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #4338ca60;\r\n\r\n --box-folder-tag-active-border: 2px solid #4338ca;\r\n --box-folder-tag-active-bg: #4338ca;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #818cf8;\r\n\r\n --box-folder-border: 2px dashed #4338ca80;\r\n --box-folder-active-bg: #1e1b4b80;\r\n --box-folder-active-border: 1px solid #818cf8;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #818cf811;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #818cf8;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbbf2469;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},crimson:{name:"赤焰",css:'\ufeff/* ————————————————— Crimson Theme · 赤焰 ————————————————— */\r\n/* 烈焰赤红 + 烬橙点缀,亮色如炙热晨纸,暗色如深渊熔岩熄灭后的余烬 */\r\n/* 主色:赤红 #dc2626 / 烬橙 #ea580c / 暗夜 #0c0202 */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #fdf5f5;\r\n --color: #450a0a;\r\n\r\n --selection-bg: #dc2626;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #fecaca;\r\n --ui-close-corner-bg: #dc2626;\r\n --cube-bg: #fee2e230;\r\n --cube-toolbar-bg: #fecaca30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #fee2e299;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #dc2626cc, #ea580ccc);\r\n --float-node-layout-usable-color: #450a0a;\r\n --float-node-layout-disable-color: #fecacacc;\r\n --float-node-layout-shadow: 0px 2px 8px #450a0a0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #dc262630;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #fee2e2cc, #ffedd5cc);\r\n --menu-title-icon-color: #dc2626;\r\n --menu-item-color: #450a0a;\r\n --menu-item-bg-hover: #fee2e2;\r\n --menu-item-active-color: #dc2626;\r\n --menu-shortcut-color: #f87171;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #fecaca;\r\n --menu-dialog-mask-bg: rgba(69, 10, 10, 0.18);\r\n --menu-dialog-input-border: 1px solid #fecaca;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #450a0a;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #fee2e2cc;\r\n --submenu-node-line-header-color: #b91c1ccc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #dc2626;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #450a0a12;\r\n --map-mini-bg: rgba(255, 250, 250, 0.95);\r\n --map-mini-border: #fecaca;\r\n --map-mini-title-color: #f87171;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #dc262618;\r\n --placeholder-box-selector-stroke: #dc2626;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #fee2e240;\r\n --submap-shadow: #f87171 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #f87171;\r\n --node-bg: #fee2e270;\r\n --node-selected-stroke: #dc2626;\r\n --node-editable-bg: #fdf5f540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #fecaca;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #fee2e280 0%, #ffedd580 50%, #fecdd380 100%);\r\n --scope-border: 2px solid #f87171;\r\n --scope-shadow: 0px 0px 14px #dc262640;\r\n --scope-item-bg: linear-gradient(135deg, #fee2e2cf 0%, #ffedd5cf 50%, #fecdd3cf 100%);\r\n --scope-item-border: 1px solid #f87171;\r\n --scope-item-color: #450a0a;\r\n --scope-item-shadow: 0px 2px 10px #dc262620;\r\n --scope-icon-color: #450a0a;\r\n --scope-icon-shadow: 0px 0px 8px #dc262650;\r\n --scope-icon-hover-color: #ea580c;\r\n --scope-icon-hover-shadow: 0px 0px 10px #ea580c;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #450a0a14;\r\n --postil-text-color: #dc2626;\r\n --postil-text-box-bg: rgb(254 226 226 / 0.88);\r\n --postil-text-icon-close-bg: #fecacaa3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #dc2626;\r\n --table-cell-bg: #fee2e280;\r\n --table-cell-selection-bg: #dc262625;\r\n --table-cell-active-bg: #ea580c20;\r\n --table-title-bg: #fecaca80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #dc262625;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #fee2e2c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #fecaca5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #fee2e2cc;\r\n --box-columns-layout-item-hover-color: #dc2626;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #fecaca70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #fee2e270;\r\n --code-tabbar-item-bg: #fecaca78;\r\n --code-tabbar-item-color: #f8717178;\r\n --code-tabbar-item-active-color: #450a0a;\r\n --code-tabbar-item-active-bg: #fecaca78;\r\n --code-tabbar-item-active-border: 1px solid #f87171;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #ea580c;\r\n --code-tooltip-bg: #450a0a;\r\n --code-tooltip-color: #fecacacc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #fecaca;\r\n --code-input-color: #450a0a;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #dc262625;\r\n --list-item-bg: #fee2e270;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #fee2e2ad;\r\n --todoitem-status-border: 1px solid #fecaca;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #dc2626;\r\n --todoitem-done-color: #f87171;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #fee2e280;\r\n --img-load-failed-color: #fecaca80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #fecaca7d;\r\n --tip-border: 1px solid #f8717180;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #fee2e270;\r\n --detail-even-bg: #ffedd570;\r\n --detail-adder-bg: #fee2e240;\r\n --detail-list-border: 1px solid #fecaca;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #fecaca80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #fff1f1;\r\n --text-link-bg: #fee2e2;\r\n --text-link-color: #450a0a;\r\n --text-link-icon-hover-bg: #dc2626;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #f87171;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #fee2e230;\r\n --line-hover-bg: #fee2e230;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #f87171;\r\n --box-bg: #fee2e240;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #dc2626cc, #ea580cc2);\r\n --box-root-dragger-bg: #f87171;\r\n --box-root-fold-bg: #450a0a;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #fee2e280;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #dc2626;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #dc262640;\r\n\r\n --box-folder-tag-active-border: 2px solid #dc2626;\r\n --box-folder-tag-active-bg: #dc2626;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #dc262660;\r\n\r\n --box-folder-border: 2px dashed #f8717180;\r\n --box-folder-active-bg: #fee2e280;\r\n --box-folder-active-border: 1px solid #dc2626;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #ea580c;\r\n --api-functions-color-light: #ea580c66;\r\n --api-functions-type-bg: #ea580c;\r\n --api-functions-type-color: #78350fcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #dc2626;\r\n --api-arguments-color-light: #dc262666;\r\n --api-arguments-type-bg: #dc2626;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #ffedd569;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #0c0202;\r\n --color: #fee2e2;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #dc2626;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #450a0a;\r\n --ui-close-corner-bg: #f87171;\r\n --cube-bg: #450a0a30;\r\n --cube-toolbar-bg: #450a0a40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #450a0a99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #991b1bcc, #7c2d12cc);\r\n --float-node-layout-usable-color: #fee2e2;\r\n --float-node-layout-disable-color: #450a0a;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #f8717140;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #1a0505cc;\r\n --menu-title-bg: linear-gradient(120deg, #450a0acc, #431407cc);\r\n --menu-title-icon-color: #f87171;\r\n --menu-item-color: #fee2e2;\r\n --menu-item-bg-hover: #450a0acc;\r\n --menu-item-active-color: #fca5a5;\r\n --menu-shortcut-color: #7f1d1d;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #2c0808;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #450a0a88;\r\n --menu-dialog-bg: #1a0505cc;\r\n --menu-dialog-color: #fee2e2;\r\n\r\n --submenu-node-line-header-bg: #450a0a33;\r\n --submenu-node-line-header-color: #f87171cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #fca5a5;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #450a0ab3 0%, #431407b3 50%, #3d1500b3 100%);\r\n --scope-border: 2px solid #dc2626;\r\n --scope-shadow: 0px 0px 18px #dc262680;\r\n --scope-item-bg: linear-gradient(135deg, #450a0ae6 0%, #431407e6 50%, #3d1500e6 100%);\r\n --scope-item-border: 1px solid #f87171d9;\r\n --scope-item-color: #fecaca;\r\n --scope-item-shadow: 0px 2px 12px #dc262640;\r\n --scope-icon-color: #fee2e2;\r\n --scope-icon-shadow: 0px 0px 10px #f87171;\r\n --scope-icon-hover-color: #fb923c;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fb923c;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #0c0202;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(12, 2, 2, 0.92);\r\n --map-mini-border: #7f1d1d50;\r\n --map-mini-title-color: #f8717170;\r\n\r\n --placeholder-box-selector-fill: #dc262618;\r\n --placeholder-box-selector-stroke: #f8717199;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #0c020240;\r\n --submap-shadow: #dc262680 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #f87171;\r\n --node-bg: #450a0a40;\r\n --node-selected-stroke: #fca5a5dd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #450a0a;\r\n --linker-filter: drop-shadow(0px 0px 2px #f8717155);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #f87171;\r\n --postil-text-box-bg: #450a0a80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #fca5a5;\r\n --table-cell-bg: #450a0a70;\r\n --table-cell-selection-bg: #dc26263a;\r\n --table-cell-active-bg: #7c2d12a0;\r\n --table-title-bg: #450a0a90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #450a0acc;\r\n --box-columns-layout-item-hover-color: #fca5a5;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #450a0a70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #dc262630;\r\n --annotation-bg: #450a0abf;\r\n --annotation-box-bg: #2c0808c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #991b1b55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #450a0aa8;\r\n --code-tabbar-item-bg: #2c080880;\r\n --code-tabbar-item-color: #f87171;\r\n --code-tabbar-item-active-color: #fecaca;\r\n --code-tabbar-item-active-bg: #2c080878;\r\n --code-tabbar-item-active-border: 1px solid #5c1010;\r\n --code-toolbar-bg: #450a0a47;\r\n --code-toolbar-item-hover-color: #fb923c;\r\n --code-tooltip-bg: rgb(220 38 38 / 50%);\r\n --code-tooltip-color: #fecacacc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #450a0a88;\r\n --code-input-color: #fecaca;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #450a0a70;\r\n --list-ordered-symbol-hover-bg: #dc262640;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #450a0aad;\r\n --todoitem-status-border: 1px solid #450a0a88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #dc2626;\r\n --todoitem-done-color: #7f1d1d;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #450a0a80;\r\n --img-load-failed-color: #450a0a80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #450a0a7d;\r\n --tip-border: 1px solid #dc262680;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #450a0a70;\r\n --detail-even-bg: #2c080870;\r\n --detail-adder-bg: #450a0a40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #450a0a50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #1a0505ad;\r\n --text-link-box-bg: #450a0ac9;\r\n --text-link-bg: #450a0acc;\r\n --text-link-color: #fee2e2e8;\r\n --text-link-icon-hover-bg: #dc262660;\r\n --text-link-icon-hover-color: #fecacae0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #dc2626b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #450a0a30;\r\n --line-hover-bg: #450a0a30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #dc2626;\r\n --box-bg: #450a0a40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #dc2626cc, #ea580cc2);\r\n --box-root-dragger-bg: #f87171;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #fee2e2;\r\n --box-root-drag-enter-bg: #450a0a80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #dc2626;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #dc262660;\r\n\r\n --box-folder-tag-active-border: 2px solid #dc2626;\r\n --box-folder-tag-active-bg: #dc2626;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #f87171;\r\n\r\n --box-folder-border: 2px dashed #dc262680;\r\n --box-folder-active-bg: #450a0a80;\r\n --box-folder-active-border: 1px solid #f87171;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fb923c11;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fb923c;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #f8717111;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #f87171;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fb923c69;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},jade:{name:"翡翠",css:'\ufeff/* ————————————————— Jade Theme · 翡翠 ————————————————— */\r\n/* 东方翡翠深绿 + 烁金点缀,亮色如玉白纸,暗色如深渊墨玉 */\r\n/* 主色:翡翠深 #065f46 / 翠玉 #10b981 / 金缕 #d97706 */\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f0faf5;\r\n --color: #064e3b;\r\n\r\n --selection-bg: #059669;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #a7f3d0;\r\n --ui-close-corner-bg: #059669;\r\n --cube-bg: #d1fae530;\r\n --cube-toolbar-bg: #a7f3d030;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #d1fae599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #059669cc, #d97706cc);\r\n --float-node-layout-usable-color: #064e3b;\r\n --float-node-layout-disable-color: #a7f3d0cc;\r\n --float-node-layout-shadow: 0px 2px 8px #064e3b0a;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #05966930;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #d1fae5cc, #fef3c7cc);\r\n --menu-title-icon-color: #059669;\r\n --menu-item-color: #064e3b;\r\n --menu-item-bg-hover: #d1fae5;\r\n --menu-item-active-color: #059669;\r\n --menu-shortcut-color: #6ee7b7;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #a7f3d0;\r\n --menu-dialog-mask-bg: rgba(6, 78, 59, 0.18);\r\n --menu-dialog-input-border: 1px solid #a7f3d0;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #064e3b;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #d1fae5cc;\r\n --submenu-node-line-header-color: #047857cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #059669;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #064e3b12;\r\n --map-mini-bg: rgba(248, 255, 252, 0.95);\r\n --map-mini-border: #d1fae5;\r\n --map-mini-title-color: #6ee7b7;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #05966918;\r\n --placeholder-box-selector-stroke: #059669;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #d1fae540;\r\n --submap-shadow: #34d399 0px 0px 8px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #d1fae570;\r\n --node-selected-stroke: #059669;\r\n --node-editable-bg: #f0faf540;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #a7f3d0;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #d1fae580 0%, #fef3c780 50%, #a7f3d080 100%);\r\n --scope-border: 2px solid #34d399;\r\n --scope-shadow: 0px 0px 14px #05966940;\r\n --scope-item-bg: linear-gradient(135deg, #d1fae5cf 0%, #fef3c7cf 50%, #a7f3d0cf 100%);\r\n --scope-item-border: 1px solid #34d399;\r\n --scope-item-color: #064e3b;\r\n --scope-item-shadow: 0px 2px 10px #05966920;\r\n --scope-icon-color: #064e3b;\r\n --scope-icon-shadow: 0px 0px 8px #05966950;\r\n --scope-icon-hover-color: #d97706;\r\n --scope-icon-hover-shadow: 0px 0px 10px #d97706;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #064e3b14;\r\n --postil-text-color: #059669;\r\n --postil-text-box-bg: rgb(209 250 229 / 0.88);\r\n --postil-text-icon-close-bg: #a7f3d0a3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #059669;\r\n --table-cell-bg: #d1fae580;\r\n --table-cell-selection-bg: #05966925;\r\n --table-cell-active-bg: #d9770620;\r\n --table-title-bg: #a7f3d080;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #05966925;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #d1fae5c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #a7f3d05c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #d1fae5cc;\r\n --box-columns-layout-item-hover-color: #059669;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #a7f3d070;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #d1fae570;\r\n --code-tabbar-item-bg: #a7f3d078;\r\n --code-tabbar-item-color: #34d39978;\r\n --code-tabbar-item-active-color: #064e3b;\r\n --code-tabbar-item-active-bg: #a7f3d078;\r\n --code-tabbar-item-active-border: 1px solid #34d399;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #d97706;\r\n --code-tooltip-bg: #064e3b;\r\n --code-tooltip-color: #a7f3d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #a7f3d0;\r\n --code-input-color: #064e3b;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #05966925;\r\n --list-item-bg: #d1fae570;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #d1fae5ad;\r\n --todoitem-status-border: 1px solid #a7f3d0;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #059669;\r\n --todoitem-done-color: #6ee7b7;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #d1fae580;\r\n --img-load-failed-color: #a7f3d080;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #a7f3d07d;\r\n --tip-border: 1px solid #34d39980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #d1fae570;\r\n --detail-even-bg: #fef3c770;\r\n --detail-adder-bg: #d1fae540;\r\n --detail-list-border: 1px solid #a7f3d0;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #a7f3d080;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #ecfdf5;\r\n --text-link-bg: #d1fae5;\r\n --text-link-color: #064e3b;\r\n --text-link-icon-hover-bg: #059669;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #34d399;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #d1fae530;\r\n --line-hover-bg: #d1fae530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #34d399;\r\n --box-bg: #d1fae540;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #059669cc, #d97706c2);\r\n --box-root-dragger-bg: #34d399;\r\n --box-root-fold-bg: #064e3b;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #d1fae580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #059669;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #05966940;\r\n\r\n --box-folder-tag-active-border: 2px solid #059669;\r\n --box-folder-tag-active-bg: #059669;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #05966960;\r\n\r\n --box-folder-border: 2px dashed #34d39980;\r\n --box-folder-active-bg: #d1fae580;\r\n --box-folder-active-border: 1px solid #059669;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #d97706;\r\n --api-functions-color-light: #d9770666;\r\n --api-functions-type-bg: #d97706;\r\n --api-functions-type-color: #78350fcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #059669;\r\n --api-arguments-color-light: #05966966;\r\n --api-arguments-type-bg: #059669;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fef3c769;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #030e07;\r\n --color: #d1fae5;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #059669;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #064e3b;\r\n --ui-close-corner-bg: #34d399;\r\n --cube-bg: #064e3b30;\r\n --cube-toolbar-bg: #064e3b40;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #064e3b99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #065f46cc, #78350fcc);\r\n --float-node-layout-usable-color: #d1fae5;\r\n --float-node-layout-disable-color: #064e3b;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 16px #34d39940;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #06150acc;\r\n --menu-title-bg: linear-gradient(120deg, #064e3bcc, #2d1f0ecc);\r\n --menu-title-icon-color: #34d399;\r\n --menu-item-color: #d1fae5;\r\n --menu-item-bg-hover: #064e3bcc;\r\n --menu-item-active-color: #6ee7b7;\r\n --menu-shortcut-color: #065f46;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #032208;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.6);\r\n --menu-dialog-input-border: 1px solid #064e3b88;\r\n --menu-dialog-bg: #06150acc;\r\n --menu-dialog-color: #d1fae5;\r\n\r\n --submenu-node-line-header-bg: #064e3b33;\r\n --submenu-node-line-header-color: #34d399cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #6ee7b7;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #064e3bb3 0%, #2d1f0eb3 50%, #022808b3 100%);\r\n --scope-border: 2px solid #059669;\r\n --scope-shadow: 0px 0px 18px #05966980;\r\n --scope-item-bg: linear-gradient(135deg, #064e3be6 0%, #2d1f0ee6 50%, #022808e6 100%);\r\n --scope-item-border: 1px solid #34d399d9;\r\n --scope-item-color: #a7f3d0;\r\n --scope-item-shadow: 0px 2px 12px #05966940;\r\n --scope-icon-color: #d1fae5;\r\n --scope-icon-shadow: 0px 0px 10px #34d399;\r\n --scope-icon-hover-color: #fbbf24;\r\n --scope-icon-hover-shadow: 0px 0px 12px #fbbf24;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #030e07;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #00000060;\r\n --map-mini-bg: rgba(3, 14, 7, 0.92);\r\n --map-mini-border: #064e3b50;\r\n --map-mini-title-color: #34d39980;\r\n\r\n --placeholder-box-selector-fill: #05966918;\r\n --placeholder-box-selector-stroke: #34d39999;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #030e0740;\r\n --submap-shadow: #05966980 0px 0px 12px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #34d399;\r\n --node-bg: #064e3b40;\r\n --node-selected-stroke: #6ee7b7dd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #064e3b;\r\n --linker-filter: drop-shadow(0px 0px 2px #34d39955);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 28px #00000060;\r\n --postil-text-color: #34d399;\r\n --postil-text-box-bg: #064e3b80;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #6ee7b7;\r\n --table-cell-bg: #064e3b70;\r\n --table-cell-selection-bg: #0596693a;\r\n --table-cell-active-bg: #78350fa0;\r\n --table-title-bg: #064e3b90;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #064e3bcc;\r\n --box-columns-layout-item-hover-color: #6ee7b7;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #064e3b70;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #05966930;\r\n --annotation-bg: #064e3bbf;\r\n --annotation-box-bg: #042f1ac2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #06503c55;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #064e3ba8;\r\n --code-tabbar-item-bg: #04301680;\r\n --code-tabbar-item-color: #34d399;\r\n --code-tabbar-item-active-color: #a7f3d0;\r\n --code-tabbar-item-active-bg: #04301678;\r\n --code-tabbar-item-active-border: 1px solid #0b5e34;\r\n --code-toolbar-bg: #064e3b47;\r\n --code-toolbar-item-hover-color: #fbbf24;\r\n --code-tooltip-bg: rgb(5 150 105 / 50%);\r\n --code-tooltip-color: #a7f3d0cc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #064e3b88;\r\n --code-input-color: #a7f3d0;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #064e3b70;\r\n --list-ordered-symbol-hover-bg: #05966940;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #064e3bad;\r\n --todoitem-status-border: 1px solid #064e3b88;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #059669;\r\n --todoitem-done-color: #065f46;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #064e3b80;\r\n --img-load-failed-color: #064e3b80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #064e3b7d;\r\n --tip-border: 1px solid #05966980;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #064e3b70;\r\n --detail-even-bg: #04301670;\r\n --detail-adder-bg: #064e3b40;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #064e3b50;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #06150aad;\r\n --text-link-box-bg: #064e3bc9;\r\n --text-link-bg: #064e3bcc;\r\n --text-link-color: #d1fae5e8;\r\n --text-link-icon-hover-bg: #05966960;\r\n --text-link-icon-hover-color: #a7f3d0e0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #059669b5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #064e3b30;\r\n --line-hover-bg: #064e3b30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #059669;\r\n --box-bg: #064e3b40;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #059669cc, #fbbf24c2);\r\n --box-root-dragger-bg: #34d399;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #d1fae5;\r\n --box-root-drag-enter-bg: #064e3b80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #059669;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 8px #05966960;\r\n\r\n --box-folder-tag-active-border: 2px solid #059669;\r\n --box-folder-tag-active-bg: #059669;\r\n --box-folder-tag-active-shadow: 0px 0px 12px #34d399;\r\n\r\n --box-folder-border: 2px dashed #05966980;\r\n --box-folder-active-bg: #064e3b80;\r\n --box-folder-active-border: 1px solid #34d399;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #fbbf2411;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #fbbf24;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #34d39911;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #34d399;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fbbf2469;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'},stardust:{name:"星尘",css:'\ufeff/* ————————————————— Stardust Theme · 星尘 ————————————————— */\r\n/* 宇宙星云:薰衣紫 + 星云粉,亮色如银河薄雾,暗色如虚空绽放的星云 */\r\n/* 主色:深紫 #6d28d9 / 星云粉 #db2777 / 虚空 #04000e */\r\n\r\n:root {\r\n background: var(--page-bg);\r\n color: var(--color);\r\n}\r\n\r\n:root,\r\n.cube-map {\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --page-bg: #f8f5ff;\r\n --color: #2e1065;\r\n\r\n --selection-bg: #7c3aed;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #ddd6fe;\r\n --ui-close-corner-bg: #7c3aed;\r\n --cube-bg: #ede9fe30;\r\n --cube-toolbar-bg: #ddd6fe30;\r\n --cube-dragger-margin: 10px;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-width: 180px;\r\n --float-node-layout-height: 180px;\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #ede9fe99;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #7c3aedcc, #db2777cc);\r\n --float-node-layout-usable-color: #2e1065;\r\n --float-node-layout-disable-color: #ddd6fecc;\r\n --float-node-layout-shadow: 0px 2px 8px #2e10650a;\r\n --float-node-layout-shadow-hover: 0px 4px 20px #7c3aed40;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #ffffffee;\r\n --menu-title-bg: linear-gradient(120deg, #ede9fecc, #fce7f3cc);\r\n --menu-title-icon-color: #7c3aed;\r\n --menu-item-color: #2e1065;\r\n --menu-item-bg-hover: #ede9fe;\r\n --menu-item-active-color: #7c3aed;\r\n --menu-shortcut-color: #c4b5fd;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #ddd6fe;\r\n --menu-dialog-mask-bg: rgba(46, 16, 101, 0.18);\r\n --menu-dialog-input-border: 1px solid #ddd6fe;\r\n --menu-dialog-bg: #ffffff;\r\n --menu-dialog-color: #2e1065;\r\n\r\n --menu-submenu-width: 250px;\r\n --menu-submenu-height: 250px;\r\n\r\n --submenu-node-line-header-bg: #ede9fecc;\r\n --submenu-node-line-header-color: #6d28d9cc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #7c3aed;\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n --map-linker-transition-duration: 0.3s;\r\n --map-node--transition-duration: 0.3s;\r\n --map-transition-duration: 0.2s;\r\n\r\n --map-status-tools-bg: #ffffff;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 12px #2e106514;\r\n --map-mini-bg: rgba(252, 248, 255, 0.95);\r\n --map-mini-border: #ddd6fe;\r\n --map-mini-title-color: #a78bfa;\r\n\r\n --placeholder-linker-stroke: var(--linker-stroke-color);\r\n --placeholder-box-selector-fill: #7c3aed18;\r\n --placeholder-box-selector-stroke: #7c3aed;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #ede9fe40;\r\n --submap-shadow: #a78bfa 0px 0px 10px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-selected-stroke-width: 2px;\r\n --node-hover-stroke: #a78bfa;\r\n --node-bg: #ede9fe70;\r\n --node-selected-stroke: #7c3aed;\r\n --node-editable-bg: #f8f5ff40;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n --node-cbox-min-width: 140px;\r\n --node-border-dash-array: 12 8;\r\n --node-dragging-stroke: var(--selection-bg);\r\n --node-dragging-stroke-width: 2px;\r\n --node-dragging-opacity: 0.65;\r\n --node-dragging-filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.14));\r\n\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #ddd6fe;\r\n --linker-filter: none;\r\n --linker-delete-selected-fill: #fca5a580;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #ede9fe80 0%, #fce7f380 50%, #ddd6fe80 100%);\r\n --scope-border: 2px solid #a78bfa;\r\n --scope-shadow: 0px 0px 16px #7c3aed50;\r\n --scope-item-bg: linear-gradient(135deg, #ede9fecf 0%, #fce7f3cf 50%, #ddd6fecf 100%);\r\n --scope-item-border: 1px solid #a78bfa;\r\n --scope-item-color: #2e1065;\r\n --scope-item-shadow: 0px 2px 12px #7c3aed25;\r\n --scope-icon-color: #2e1065;\r\n --scope-icon-shadow: 0px 0px 10px #7c3aed60;\r\n --scope-icon-hover-color: #db2777;\r\n --scope-icon-hover-shadow: 0px 0px 10px #db2777;\r\n --scope-freeze-bg: linear-gradient(135deg, #fecacaa6 0%, #fda4afa6 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 12px #ef4444b3;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #fee2e2e6 0%, #fecdd3e6 100%);\r\n --scope-freeze-item-border: 1px solid #f43f5e;\r\n --scope-freeze-item-color: #7f1d1d;\r\n --scope-freeze-item-shadow: 0px 0px 10px #ef444477;\r\n\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-min-width: 200px;\r\n --postil-max-width: 50vw;\r\n --postil-max-height: 80vh;\r\n --postil-shadow: 0px 4px 24px #2e106516;\r\n --postil-text-color: #7c3aed;\r\n --postil-text-box-bg: rgb(237 233 254 / 0.88);\r\n --postil-text-icon-close-bg: #ddd6fea3;\r\n --postil-text-icon-delete-bg: #fb7185ad;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-min-width: 500px;\r\n --table-toolbar-height: 36px;\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #7c3aed;\r\n --table-cell-bg: #ede9fe80;\r\n --table-cell-selection-bg: #7c3aed25;\r\n --table-cell-active-bg: #db277720;\r\n --table-title-bg: #ddd6fe80;\r\n --table-dragger-bg: #ffffff75;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #7c3aed25;\r\n --annotation-bg: #ffffff88;\r\n --annotation-box-bg: #ede9fec2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #ddd6fe5c;\r\n --fomula-hover-color: auto;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #ede9fecc;\r\n --box-columns-layout-item-hover-color: #7c3aed;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #ddd6fe70;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #ede9fe70;\r\n --code-tabbar-item-bg: #ddd6fe78;\r\n --code-tabbar-item-color: #a78bfa78;\r\n --code-tabbar-item-active-color: #2e1065;\r\n --code-tabbar-item-active-bg: #ddd6fe78;\r\n --code-tabbar-item-active-border: 1px solid #a78bfa;\r\n --code-toolbar-bg: var(--cube-toolbar-bg);\r\n --code-toolbar-item-hover-color: #db2777;\r\n --code-tooltip-bg: #2e1065;\r\n --code-tooltip-color: #ddd6fecc;\r\n --code-tabbar-height: 36px;\r\n --code-toolbar-height: 36px;\r\n --code-min-width: 400px;\r\n --code-min-height: 120px;\r\n --code-input-border: 1px solid #ddd6fe;\r\n --code-input-color: #2e1065;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-ordered-symbol-hover-bg: #7c3aed25;\r\n --list-item-bg: #ede9fe70;\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #ede9fead;\r\n --todoitem-status-border: 1px solid #ddd6fe;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #c4b5fd;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #ede9fe80;\r\n --img-load-failed-color: #ddd6fe80;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-min-width: 200px;\r\n --tip-bg: #ddd6fe7d;\r\n --tip-border: 1px solid #a78bfa80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-list-min-width: 200px;\r\n --detail-odd-bg: #ede9fe70;\r\n --detail-even-bg: #fce7f370;\r\n --detail-adder-bg: #ede9fe40;\r\n --detail-list-border: 1px solid #ddd6fe;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-family: "Comic Sans MS";\r\n --text-fontsize: 16px;\r\n --text-transition: 0.5s;\r\n --text-letter-spacing: 1px;\r\n --text-hover-bg: #ddd6fe80;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #ffffff;\r\n --text-link-box-bg: #f5f3ff;\r\n --text-link-bg: #ede9fe;\r\n --text-link-color: #2e1065;\r\n --text-link-icon-hover-bg: #7c3aed;\r\n --text-link-icon-hover-color: #ffffff;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #a78bfa;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #ede9fe30;\r\n --line-hover-bg: #ede9fe30;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #a78bfa;\r\n --box-bg: #ede9fe40;\r\n /* ------------------------------------------------cube-box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #db2777c2);\r\n --box-root-dragger-bg: #a78bfa;\r\n --box-root-fold-bg: #2e1065;\r\n --box-root-content-bg: unset;\r\n --box-root-drag-enter-bg: #ede9fe80;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 6px #7c3aed40;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 8px #7c3aed60;\r\n\r\n --box-folder-border: 2px dashed #a78bfa80;\r\n --box-folder-active-bg: #ede9fe80;\r\n --box-folder-active-border: 1px solid #7c3aed;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #db2777;\r\n --api-functions-color-light: #db277766;\r\n --api-functions-type-bg: #db2777;\r\n --api-functions-type-color: #ffffffcc;\r\n --api-functions-border: 2px solid var(--api-functions-color);\r\n\r\n --api-arguments-color: #7c3aed;\r\n --api-arguments-color-light: #7c3aed66;\r\n --api-arguments-type-bg: #7c3aed;\r\n --api-arguments-type-color: #ffffffcc;\r\n --api-arguments-border: 2px solid var(--api-arguments-color);\r\n\r\n --api-exceptions-color: #fca5a5;\r\n --api-exceptions-color-light: #fca5a566;\r\n --api-exceptions-border: 2px solid var(--api-exceptions-color);\r\n\r\n --api-min-width: 250px;\r\n --api-gap: 20px;\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #fce7f369;\r\n --cube-lost-info-bg: #fca5a59e;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root,\r\n .cube-map {\r\n --page-bg: #04000e;\r\n --color: #ede9fe;\r\n /* ------------------------------------------------global--------------------------------------------------- */\r\n --selection-bg: #7c3aed;\r\n --selection-color: #ffffff;\r\n --ui-scrollbar-thumb-bg: #2e1065;\r\n --ui-close-corner-bg: #a78bfa;\r\n --cube-bg: #2e106530;\r\n --cube-toolbar-bg: #2e106540;\r\n /* ------------------------------------------------float--------------------------------------------------- */\r\n --float-node-layout-bg: var(--menu-bg);\r\n --float-node-layout-item-bg: #2e106599;\r\n --float-node-layout-item-bg-hover: linear-gradient(135deg, #4c1d95cc, #831843cc);\r\n --float-node-layout-usable-color: #ede9fe;\r\n --float-node-layout-disable-color: #2e1065;\r\n --float-node-layout-shadow: none;\r\n --float-node-layout-shadow-hover: 0px 4px 20px #a78bfa50;\r\n\r\n /* ------------------------------------------------menu--------------------------------------------------- */\r\n --menu-bg: #0c0520cc;\r\n --menu-title-bg: linear-gradient(120deg, #2e1065cc, #500724cc);\r\n --menu-title-icon-color: #a78bfa;\r\n --menu-item-color: #ede9fe;\r\n --menu-item-bg-hover: #2e1065cc;\r\n --menu-item-active-color: #c4b5fd;\r\n --menu-shortcut-color: #3b0764;\r\n --menu-max-height: 500px;\r\n --menu-item-disable-color: #1a0840;\r\n --menu-dialog-mask-bg: rgba(0, 0, 0, 0.65);\r\n --menu-dialog-input-border: 1px solid #2e106588;\r\n --menu-dialog-bg: #0c0520cc;\r\n --menu-dialog-color: #ede9fe;\r\n\r\n --submenu-node-line-header-bg: #2e106533;\r\n --submenu-node-line-header-color: #a78bfacc;\r\n --submenu-node-line-active-bg: none;\r\n --submenu-node-line-active-color: #c4b5fd;\r\n /* ------------------------------------------------doc-scope--------------------------------------------------- */\r\n --scope-bg: linear-gradient(135deg, #2e1065b3 0%, #500724b3 50%, #1a0840b3 100%);\r\n --scope-border: 2px solid #7c3aed;\r\n --scope-shadow: 0px 0px 20px #7c3aed90;\r\n --scope-item-bg: linear-gradient(135deg, #2e1065e6 0%, #500724e6 50%, #1a0840e6 100%);\r\n --scope-item-border: 1px solid #a78bfad9;\r\n --scope-item-color: #ddd6fe;\r\n --scope-item-shadow: 0px 2px 14px #7c3aed50;\r\n --scope-icon-color: #ede9fe;\r\n --scope-icon-shadow: 0px 0px 12px #a78bfa;\r\n --scope-icon-hover-color: #f472b6;\r\n --scope-icon-hover-shadow: 0px 0px 14px #f472b6;\r\n --scope-freeze-bg: linear-gradient(135deg, #991b1bbf 0%, #be123cbf 100%);\r\n --scope-freeze-border: 2px solid #f87171;\r\n --scope-freeze-shadow: 0px 0px 14px #ef4444bf;\r\n --scope-freeze-item-bg: linear-gradient(135deg, #881337e8 0%, #be123ce8 100%);\r\n --scope-freeze-item-border: 1px solid #fb7185e6;\r\n --scope-freeze-item-color: #ffe4e6;\r\n --scope-freeze-item-shadow: 0px 0px 12px #f43f5e73;\r\n\r\n /* ------------------------------------------------cube-map--------------------------------------------------- */\r\n --map-bg: transparent;\r\n\r\n --map-status-tools-bg: #04000e;\r\n --map-status-tools-color: auto;\r\n --map-status-tools-shadow: 0px 2px 14px #7c3aed30;\r\n --map-mini-bg: rgba(4, 0, 14, 0.92);\r\n --map-mini-border: #3b076450;\r\n --map-mini-title-color: #7c3aed80;\r\n\r\n --placeholder-box-selector-fill: #7c3aed18;\r\n --placeholder-box-selector-stroke: #a78bfa99;\r\n\r\n /* ------------------------------------------------cube-submap--------------------------------------------------- */\r\n --submap-bg: #04000e40;\r\n --submap-shadow: #7c3aed90 0px 0px 14px;\r\n /* ------------------------------------------------cube-node--------------------------------------------------- */\r\n --node-hover-stroke: #a78bfa;\r\n --node-bg: #2e106540;\r\n --node-selected-stroke: #c4b5fddd;\r\n --node-editable-bg: transparent;\r\n --node-status-bg: none;\r\n --node-status-border: unset;\r\n /* ------------------------------------------------linker--------------------------------------------------- */\r\n --linker-stroke-color: #2e1065;\r\n --linker-filter: drop-shadow(0px 0px 3px #a78bfa66);\r\n --linker-delete-selected-fill: #f8717180;\r\n --linker-delete-selected-filter: drop-shadow(0px 0px 4px #f87171);\r\n /* ------------------------------------------------postil-text--------------------------------------------------- */\r\n --postil-shadow: 0px 4px 30px #00000060;\r\n --postil-text-color: #a78bfa;\r\n --postil-text-box-bg: #2e106580;\r\n /* ------------------------------------------------table--------------------------------------------------- */\r\n --table-toolbar-bg: var(--cube-toolbar-bg);\r\n --table-toolbar-icon-hover-color: #c4b5fd;\r\n --table-cell-bg: #2e106570;\r\n --table-cell-selection-bg: #7c3aed3a;\r\n --table-cell-active-bg: #831843a0;\r\n --table-title-bg: #2e106590;\r\n\r\n /* ------------------------------------------------cube-box-columns--------------------------------------------------- */\r\n --box-columns-bg: transparent;\r\n --box-columns-toolbar-height: 36px;\r\n --box-columns-toolbar-bg: var(--cube-toolbar-bg);\r\n --box-columns-gap: 4px;\r\n --box-columns-layout-bg: #2e1065cc;\r\n --box-columns-layout-item-hover-color: #c4b5fd;\r\n --box-columns-min-width: 200px;\r\n\r\n --box-columns-block-bg: #2e106570;\r\n /* ------------------------------------------------cube-annotation--------------------------------------------------- */\r\n --annotation-icon-hover-bg: #7c3aed35;\r\n --annotation-bg: #2e1065bf;\r\n --annotation-box-bg: #1a0840c2;\r\n /* ------------------------------------------------fomula--------------------------------------------------- */\r\n --fomula-hover-bg: #2e106555;\r\n /* ------------------------------------------------code--------------------------------------------------- */\r\n --code-bg: #2e1065a8;\r\n --code-tabbar-item-bg: #1a084080;\r\n --code-tabbar-item-color: #a78bfa;\r\n --code-tabbar-item-active-color: #ddd6fe;\r\n --code-tabbar-item-active-bg: #1a084078;\r\n --code-tabbar-item-active-border: 1px solid #3b0764;\r\n --code-toolbar-bg: #2e106547;\r\n --code-toolbar-item-hover-color: #f472b6;\r\n --code-tooltip-bg: rgb(124 58 237 / 50%);\r\n --code-tooltip-color: #ddd6fecc;\r\n --code-tabbar-height: 36px;\r\n --code-input-border: 1px solid #2e106588;\r\n --code-input-color: #ddd6fe;\r\n /* ------------------------------------------------cube-list--------------------------------------------------- */\r\n --list-item-bg: #2e106570;\r\n --list-ordered-symbol-hover-bg: #7c3aed40;\r\n\r\n /* ------------------------------------------------cube-todo--------------------------------------------------- */\r\n --todoitem-status-bg: #2e1065ad;\r\n --todoitem-status-border: 1px solid #2e106588;\r\n --todoitem-status-active-color: #ffffff;\r\n --todoitem-status-active-bg: #7c3aed;\r\n --todoitem-done-color: #3b0764;\r\n /* ------------------------------------------------img--------------------------------------------------- */\r\n --img-load-failed-bg: #2e106580;\r\n --img-load-failed-color: #2e106580;\r\n /* ------------------------------------------------tip--------------------------------------------------- */\r\n --tip-bg: #2e10657d;\r\n --tip-border: 1px solid #7c3aed80;\r\n /* ------------------------------------------------detail-list--------------------------------------------------- */\r\n --detail-odd-bg: #2e106570;\r\n --detail-even-bg: #1a084070;\r\n --detail-adder-bg: #2e106540;\r\n --detail-list-border: unset;\r\n /* ------------------------------------------------text--------------------------------------------------- */\r\n --text-hover-bg: #2e106550;\r\n /* ------------------------------------------------text-link--------------------------------------------------- */\r\n --text-link-ask-bg: #0c0520ad;\r\n --text-link-box-bg: #2e1065c9;\r\n --text-link-bg: #2e1065cc;\r\n --text-link-color: #ede9fee8;\r\n --text-link-icon-hover-bg: #7c3aed60;\r\n --text-link-icon-hover-color: #ddd6fee0;\r\n --text-link-ask-border: none;\r\n --text-link-ask-confirm-bg: #7c3aedb5;\r\n\r\n /* ------------------------------------------------line--------------------------------------------------- */\r\n --line-focus-bg: #2e106530;\r\n --line-hover-bg: #2e106530;\r\n --line-padding: 2px;\r\n --line-margin: 2px;\r\n /* ------------------------------------------------cube-box--------------------------------------------------- */\r\n --box-border: 1px solid #7c3aed;\r\n --box-bg: #2e106540;\r\n /* ------------------------------------------------box-root--------------------------------------------------- */\r\n --box-root-anchor-bg: linear-gradient(45deg, #7c3aedcc, #f472b6c2);\r\n --box-root-dragger-bg: #a78bfa;\r\n --box-root-content-bg: unset;\r\n --box-root-fold-bg: #ede9fe;\r\n --box-root-drag-enter-bg: #2e106580;\r\n /* ------------------------------------------------cube-box-folder--------------------------------------------------- */\r\n --box-folder-tag-border: 2px solid #7c3aed;\r\n --box-folder-tag-bg: unset;\r\n --box-folder-tag-shadow: 0px 0px 10px #7c3aed60;\r\n\r\n --box-folder-tag-active-border: 2px solid #7c3aed;\r\n --box-folder-tag-active-bg: #7c3aed;\r\n --box-folder-tag-active-shadow: 0px 0px 14px #a78bfa;\r\n\r\n --box-folder-border: 2px dashed #7c3aed80;\r\n --box-folder-active-bg: #2e106580;\r\n --box-folder-active-border: 1px solid #a78bfa;\r\n\r\n /* ------------------------------------------------cube-api--------------------------------------------------- */\r\n --api-functions-color: #000000;\r\n --api-functions-color-light: #f472b611;\r\n --api-functions-type-bg: #00000066;\r\n --api-functions-type-color: #a1a1aacc;\r\n --api-functions-border: 4px solid #f472b6;\r\n\r\n --api-arguments-color: black;\r\n --api-arguments-color-light: #a78bfa11;\r\n --api-arguments-type-bg: #00000066;\r\n --api-arguments-type-color: #a1a1aacc;\r\n --api-arguments-border: 4px solid #a78bfa;\r\n\r\n --api-exceptions-color: black;\r\n --api-exceptions-color-light: #fca5a511;\r\n --api-exceptions-border: 4px solid #fca5a5;\r\n\r\n /* ------------------------------------------------cube-lost--------------------------------------------------- */\r\n --cube-lost-bg: #f472b669;\r\n --cube-lost-info-bg: #fca5a59e;\r\n }\r\n}\r\n\r\n*:fullscreen {\r\n background: var(--page-bg) !important;\r\n}\r\n'}},ki=new Map;function Si(e){ki.set(e.meta.type,e)}class Ci{_cubes=ki;_versions={};_note;_note_theme="default";_cube_versions=this.export_versions();get note(){return this._note}get clipboard(){return this._note?.clipboard}get courier(){return this._note?.courier}get history(){return this._note?.history}get cursor(){return this._note?.cursor}get event(){return this._note?.event}get listener(){return this._note?.listener}get painter(){return this._note?.painter}get cubes(){return this._note?.cubes}get config(){return this._note?.config}get stats(){return this._note?.stats}get hotkeys(){return this._note?.hotkeys}get versions_cube(){return{...this._cube_versions}}get versions(){const e=this.clipboard?.pasted_from?.versions;return e||this._versions}get metas(){const e=new Map;for(let[t,n]of this._cubes)e.set(t,n.meta);return e}get note_theme(){return this._note_theme}set note_theme(e){this._note_theme=e}get themes(){return Object.entries(wi).map(([e,{name:t,css:n}])=>({key:e,name:t,css:n}))}create(e){const t=structuredClone(e.versions||{});return this._versions=Object.freeze(t),e.type===S.Cubes.doc?this._note=new cu(e):e.type===S.Cubes.map?this._note=new ih(e):console.error(`NoteMeta: unrecognized note type ${e}`),this.note_theme=e.attrs.theme||"default",this.use_theme(this._note_theme),this._note}register_cube(e){const t=e.meta;t||console.error(`NoteMeta: can't find member meta in ${e}`),this._cubes.set(t.type,e)}find_cube(e){return this._cubes.get(e)}export_versions(){const e={};for(const[t,n]of this._cubes)e[t]=n.meta.version;return e}get_sdk_meta(){return{version:"2.3.9",time_publish:1774760568983}}use_theme(e){const t=wi[e];if(!t)return console.error(`NoteMeta: unknown theme "${e}"`);this.note_theme=e;const n="deepsky-theme";let r=document.getElementById(n);r||(r=document.createElement("style"),r.setAttribute("data-theme",e),r.id=n,document.head.appendChild(r)),r.textContent=t.css,r.setAttribute("data-theme",e),window.dispatchEvent(new CustomEvent("deepsky:note-theme-change",{detail:{name:e,css:t.css}}))}}const Mi=new Ci;class zi{static insert_child(e,t,n){return{id:e,name:_.Names.cube_insert_child,data:t,pos:n}}static delete_child(e,t,n,r=!1){return{id:e,name:_.Names.cube_delete_child,dir:t,range:n,reserve:r}}static insert(e,t,n,r,o,i){return{id:e,name:_.Names.cube_insert,data:t,start_id:n,end_id:r,offset_end:i,offset_start:o}}static delete(e,t,n,r,o,i,s=!1){return{id:e,name:_.Names.cube_delete,dir:t,start_id:n,end_id:r,offset_start:o,offset_end:i,reserve:s}}static delete_adjacent(e,t,n,r){return{id:e,name:_.Names.cube_delete_adjacent,from:t,offset:r,from_id:n}}static set_selection_css(e,t,n,r,o,i,s=!1,a=!1){return{id:e,name:_.Names.cube_set_selection_css,css:t,start_id:n,end_id:r,offset_start:o,offset_end:i,toggle:s,replace:a}}static set_css(e,t,n=!1,r=!1){return{id:e,name:_.Names.cube_set_css,css:t,toggle:n,replace:r}}static partition(e,t,n,r,o){return{name:_.Names.cube_partition,id:e,start_id:t,end_id:n,offset_start:r,offset_end:o}}static reorder(e,t,n){return{id:e,name:_.Names.cube_reorder,cubeid:t,index:n}}static reset(e,t){return{id:e,name:_.Names.cube_reset,data:t}}static merge(e,t,n,r){return{id:e,name:_.Names.cube_merge,method:t,cubeid:n,offset:r}}static postil_add(e,t=[]){return{name:_.Names.cube_postil_add,id:e,data:t}}static postil_remove(e,t){return{name:_.Names.cube_postil_remove,id:e,range:t}}static set_attr(e,t){return{id:e,name:_.Names.cube_set_attr,attr:t}}static resize(e,t,n=-1){return n>0?this.set_attr(e,{width:t,height:n}):this.set_attr(e,{width:t})}static fold(e,t){return this.set_attr(e,{fold:t})}}class Ni{static loc(e,t,n,r){return{name:g.Names.loc,id:e,from:n,from_offset:r,offset:t}}static in_head(e){return{id:e,name:g.Names.cursor_in_head}}static in_tail(e){return{id:e,name:g.Names.cursor_in_tail}}}const Ai=new Map;class Ti{static get_cmd_handler(e,t){const n=Ai.get(e);return n?.get(t)}static set_cmd_handler(e,t,n){let r=Ai.get(e);r?r.set(t,n):(r=new Map,r.set(t,n),Ai.set(e,r))}static init_cmd_handler(e){const t=e.meta,n=Ai.get(t.type);if(n)for(let[t,r]of n)e.set_cmd_handler_vip(t,r.bind(e))}}function Ri(e){return(t,n)=>{const r=t[n];if(!r)return;const o=t.meta;Ti.set_cmd_handler(o.type,e,r)}}class Pi{handler=new Map;handler_vip=new Map;constructor(){}on(e){const t=this.get_cmd_handler_vip(e.name)||this.get_cmd_handler(e.name);if(t)return t(e)}get_cmd_handler(e){return this.handler.get(e)}get_cmd_handler_vip(e){return this.handler_vip.get(e)}set_cmd_handler(e,t){this.handler.set(e,t)}set_cmd_handler_vip(e,t){this.handler_vip.set(e,t)}event_capture(e){return"pass"}event_bubble(e){return"pass"}static get_default(...e){throw Error("sub-cube have't implement get_default method")}static get meta(){throw Error("sub-cube have't implement attribution meta")}}class Oi extends xi{timer_float_check=!1;constructor(e){super(e),this.listen()}listen(){this.listen_esc()}listen_esc(){this.event.on_esc(()=>{const e=this.root.cubes.postils;for(let[t,n]of e)n.show&&(n.show=!1);this.root instanceof ih&&this.root.clear_node_editing();const t=this.root.cubes.get_types_cube(S.Cubes.submap);for(let[e,n]of t)n.clear_node_editing()})}check_float(){const{stats:e,cubes:t}=this.root;this.timer_float_check||requestAnimationFrame(()=>{let e=!0;for(let t of this.root.scopes.scopes)e=!1,t.update_area();for(let[n,r]of t.postils)r.show&&(e=!1,r.update_pos());e||this.check_float()})}}class Ei extends xi{_map={};_types=new Map;_count={};constructor(e){super(e)}get postils(){return this._types.get(S.Cubes.postil)||new Map}get meta(){return Ei.meta}get_types_cube(e){return this._types.get(e)||new Map}add_cube(e){const t=e.id,n=e.meta.type;void 0===this._count[t]?this._count[t]=1:this._count[t]++,this._map[t]=e;const r=this._types.get(n);r?r.set(t,e):this._types.set(n,Ot(new Map([[t,e]]))),e instanceof Yd&&e.show&&this.root.status.add_postil(e)}remove_cube(e){const t=e.id,n=e.meta.type;0===--this._count[t]&&(delete this._map[t],this._types.get(n)?.delete(t))}find_cube(e){return this._map[e]}find_postil(e){for(let t of Object.values(this.postils)){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}clear_all_map_selected(){const e=this.get_types_cube(S.Cubes.submap);if(e)for(let[t,n]of e)n.clear_node_selected();this.root instanceof ih&&this.root.clear_node_selected()}static get meta(){return{type:S.Cores.cubes,version:1}}}function Li(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const Ii=new Map;function Di(e){return(t,n)=>{let r=t[n];Ii.set(e,r)}}class Bi extends xi{handlers=Pt(new Map);data;get meta(){return Bi.meta}constructor(e){super(e),this.data=Pt(Bi.default_hotkeys)}listen(e){this.listen_cursor_hotkey(e),this.listen_uncursor_hotkey(e),this.listen_cvx(e)}listen_cursor_hotkey(e){const t=this;e.addEventListener("keydown",e=>{const n=t.stats.mode,r=e.key.toLowerCase(),o=document.activeElement;let i=!1;if(n===w.NoteMode.edit&&o!==document.body){for(let[n,r]of Ii){let o=t.data[n];o.cursor&&(t.validate(e,o)&&(console.log("🟪命中快捷键",o.name),i=!0,r.bind(t)(e)))}for(let[n,r]of t.handlers){let o=t.data[n];o.cursor&&(t.validate(e,o)&&(console.log("🟪命中快捷键",o.name),i=!0,r(e)))}if(!i&&"tab"===r){i=!0;const{cursor:t,courier:n,history:r}=this,{cube_end:o,cube_start:s,offset_start:a,offset_end:l,has_selection:c,cube_selection:d}=t,u=n.get_recorder();if(!d||!o||!s)return;e.preventDefault(),c&&u.tell(d,zi.delete(d.id,"backward",s.id,o.id,a,l,!0));const h=s.text,p=h.slice(0,a)+"\t"+h.slice(a),f=Xd.reset(s.id,p),m=Ni.loc(s.id,a+1,s.id,l);u.tell(s,f,m),r.record(u)}}})}listen_uncursor_hotkey(e){const t=this;document.documentElement.addEventListener("keydown",e=>{const n=document.activeElement;let r=!1;if(this.cursor.cube_end||n===document.body){for(let[n,o]of Ii){let i=t.data[n];i.cursor||t.validate(e,i)&&(r=!0,console.log("🟪命中快捷键",i.name),o.bind(t)(e))}for(let[n,o]of t.handlers){let i=t.data[n];i.cursor||t.validate(e,i)&&(r=!0,console.log("🟪命中快捷键",i.name),o(e))}r&&(e.preventDefault(),e.stopImmediatePropagation())}})}listen_cvx(e){let t=e;this.root instanceof ih&&(t=document.documentElement),t.addEventListener("paste",async e=>{const t=e.clipboardData,{cursor:n}=this,{cube_end:r}=n;if(r instanceof Qd&&t){e.preventDefault();const n=await this.clipboard.paste(t);this.history.record(n)}}),t.addEventListener("copy",e=>{const t=e.clipboardData,{doc:n,hotkeys:r,cursor:o}=this;t&&(this.root.scopes.scope_count_normal>0||o.has_selection||o.cube_end instanceof Qd)&&(e.preventDefault(),this.clipboard.copy(t))}),t.addEventListener("cut",e=>{const t=e.clipboardData,{root:n,cursor:r}=this;t&&(n.scopes.scope_count_normal>0||r.cube_end instanceof Qd)&&(e.preventDefault(),this.clipboard.cut(t))})}register(e,t){this.data[t.name]=t,this.handlers.set(t.name,e)}reset(e){Object.assign(this.data,e)}reset_handler(e,t){this.handlers.set(e,t)}export(){return structuredClone(Ht(this.data))}update_data(...e){return{}}validate(e,t){const n=t.meta===e.metaKey,r=t.alt===e.altKey,o=t.shift===e.shiftKey,i=t.ctrl===e.ctrlKey,s=0===t.key.length||t.key.includes(e.key.toLocaleLowerCase());return n&&r&&o&&i&&s}which(e){for(let t of Object.values(this.data))if(this.validate(e,t))return t}validate_hotkeys(e,t="all"){for(let[n,r]of Ii){let r=this.data[n];if("all"===t)return this.validate(e,r);if("cursor"===t&&r.cursor)return this.validate(e,r);if("uncursor"===t&&!r.cursor)return this.validate(e,r)}for(let n of Object.values(this.data)){if("all"===t)return this.validate(e,n);if("cursor"===t&&n.cursor)return this.validate(e,n);if("uncursor"===t&&!n.cursor)return this.validate(e,n)}return!1}get_hotkey_str(e){const t=this.data[e];if(!t)return"";let n="";return t.meta&&(n+="meta + "),t.ctrl&&(n+="ctrl + "),t.alt&&(n+="alt + "),t.shift&&(n+="shift + "),n+=t.key,n}clear_scope(e){e.preventDefault(),this.root.scopes.clear_scope(!1)}clear_css(e){e.preventDefault();const{cursor:t}=this;this.root.painter.clear()}bold(e){e.preventDefault(),this.root.painter.paint({"font-weight":"700"},!0)}unindent_line(e){e.preventDefault(),this.root.painter.unindent()}indent_line(e){e.preventDefault(),this.root.painter.indent()}undo(e){e.preventDefault(),this.root.history.undo()}redo(e){e.preventDefault(),this.root.history.redo()}cursor_navigation(e){const t=this.cursor.get_focus_line(),n=this.root.cursor;if(!t)return;if(!n.range)return;e.preventDefault();const r=[C.Keys.down,C.Keys.end,C.Keys.home,C.Keys.left,C.Keys.right,C.Keys.up],o=e.key.toLocaleLowerCase();if(r.includes(o)){if(this.event.emit_cursor_nav_before(e).some(e=>!1===e))return}o===C.Keys.left?n.move_left():o===C.Keys.right?n.move_right():o===C.Keys.up?n.move_up():o===C.Keys.down?n.move_down():o===C.Keys.home?n.move_home():o===C.Keys.end&&n.move_end(),this.event.emit_cursor_nav_after(e)}cursor_extend_navigation(e){const t=this.cursor.get_focus_line(),n=this.root.cursor;t&&n.cube_end instanceof Qd&&(e.preventDefault(),e.key.toLocaleLowerCase()===C.Keys.left?n.extend_left():e.key.toLocaleLowerCase()===C.Keys.right?n.extend_right():e.key.toLocaleLowerCase()===C.Keys.up?n.extend_up():e.key.toLocaleLowerCase()===C.Keys.down?n.extend_down():e.key.toLocaleLowerCase()===C.Keys.home?n.extend_home():e.key.toLocaleLowerCase()===C.Keys.end&&n.extend_end())}text_break(e){const{courier:t,cursor:n,history:r,doc:o}=this;if(n.has_selection)return;e.preventDefault();const i=new ld(t),{cube_end:s,cube_start:a,cube_selection:l,offset_end:c,offset_start:d}=n;if(s){if(s instanceof Qd){const e=s.text.slice(0,c)+"\n​"+s.text.slice(c),t=s.id,n=Xd.reset(t,e),r=Ni.loc(t,c+2,t,c);i.tell(s,n,r)}r.record(i)}}break(e){if(this.event.emit_enter_before(e).some(e=>"stop"===e))return;if(!this.cursor.get_focus_line())return;e.preventDefault();const{courier:t,history:n,cursor:r,doc:o}=this,{cube_end:i,cube_start:s,cube_selection:a,offset_end:l,offset_start:c}=r;if(!a||!i||!s)return;const d=new ld(t),u=s.id,h=i.id;r.has_selection&&d.tell(a,zi.delete(a.id,"backward",u,h,c,l,!0)),d.tell(s,Xd.break(s.id,c)),n.record(d),this.event.emit_enter_after(e)}async break_root(e){const{cursor:t,courier:n,history:r}=this,{cube_end:o,offset_end:i}=t;if(!o)return;const s=o.find_upstream_target(e=>e instanceof xu);if(!s)return;const a=o.find_upstream_untill(s);if(!a)return;const l=[],c=a.index,d=s.children.slice(c);for(let e of d)l.push(e.export());const u=xu.get_default(l),h=n.get_recorder(),p=s.pcube;h.tell(p,zi.insert_child(p.id,[u],s.index+1)),h.tell(s,zi.delete_child(s.id,"backward",[c,s.child_count])),o instanceof Qd&&(await mn(),o.set_cursor_in_head(i)),r.record(h)}text_partition(e){const{cursor:t,history:n,courier:r}=this,o=vi.tips,{cube_selection:i,offset_end:s,offset_start:a}=t;if(!(i instanceof Qd))return o?.tip_warning("选区必须在一个文本块内");const l=r.get_recorder(),c=i.id;l.tell(i,zi.partition(c,c,c,a,s)),n.record(l)}add_scope(e){this.root.scopes.add_scope()}underline(e){const{cursor:t,courier:n,history:r}=this,{cube_selection:o,cube_end:i,cube_start:s,offset_start:a,offset_end:l}=t,c=new ld(n);if(!o||!s||!i)return;c.tell(o,zi.set_selection_css(o.id,{"text-decoration-line":"underline"},s.id,i.id,a,l,!0)),r.record(c)}copy_format(e){const{root:t}=this;e.preventDefault(),t.painter.copy_format()}apply_format(e){const{root:t}=this;e.preventDefault(),t.painter.apply_format_brush()}italic(e){e.preventDefault(),this.painter.paint({"font-style":"italic"},!0)}align_left(e){e.preventDefault(),this.painter.paint({"text-align":"left"},!0)}align_center(e){e.preventDefault(),this.painter.paint({"text-align":"center"},!0)}align_right(e){e.preventDefault(),this.painter.paint({"text-align":"right"},!0)}next_root(e){e.preventDefault();const{cursor:t,history:n}=this,{cube_end:r}=t;if(!r)return;const o=r.find_upstream_target(e=>e instanceof xu);if(!o)return;const i=o.pcube,s=new ld(this.courier),a=xu.get_default();s.tell(i,zi.insert_child(i.id,[a],o.index+1)),n.record(s)}prev_root(e){e.preventDefault();const{cursor:t,history:n}=this,{cube_end:r}=t;if(!r)return;const o=r.find_upstream_target(e=>e instanceof xu);if(!o)return;const i=o.pcube,s=new ld(this.courier),a=xu.get_default();s.tell(i,zi.insert_child(i.id,[a],o.index)),n.record(s)}add_annotation(e){e.preventDefault();const t=vi.tips,{cursor:n,courier:r,history:o}=this,{cube_selection:i,cube_start:s,cube_end:a,offset_end:l,offset_start:c}=n,d=new ld(r);if(!i||!s||!a)return t?.tip_warning("未发现光标或选区");const u=s.id,h=a.id,p=Ed.get_default();if(n.has_selection)if(i instanceof Qd)if(d.tell(i,zi.partition(i.id,u,h,c,l)),0===c){if(i.postil?.has_annotation)return t?.tip_warning("已添加批注"),d;d.tell(i,zi.postil_add(i.id,[p])),d.tell(i,Ni.loc(i.id,l,i.id,l))}else{const e=i.next_cube;if(e instanceof Qd){if(e.postil?.has_annotation)return t?.tip_warning("已添加批注"),d;d.tell(e,zi.postil_add(e.id,[p])),d.tell(e,Ni.loc(e.id,e.len,e.id,e.len))}}else t?.tip_warning("选区跨越多个文本块");else a instanceof Qd&&(d.merge(a.add_annotation()),d.tell(a,Ni.loc(a.id,l,a.id,l)));o.record(d)}fold_block(e){e.preventDefault();const{cursor:t}=this,{cube_end:n,offset_end:r}=t;if(!n)return;let o,i=n;for(;!o;){let e=i.pcube;if(e instanceof Pu||e instanceof xu)o=e;else if(e instanceof Ts)return;i=e}if(o){const e=o.child_first,t=n.find_upstream_untill(o)===e,i=this.courier.get_recorder(),s=!o.attrs.fold,a=zi.set_attr(o.id,{fold:s});i.tell(o,a),t?i.tell(n,Ni.loc(n.id,r,n.id,r)):s&&e&&i.tell(e,Ni.in_tail(e.id)),this.history.record(i)}}static get meta(){return{type:S.Cores.hotkeys,version:1}}static get default_hotkeys(){return{[k.HotKeys["fold-block"]]:{name:k.HotKeys["fold-block"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["z"],cursor:!0,group:k.Group.block},[k.HotKeys["text-partition"]]:{name:k.HotKeys["text-partition"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["x"],cursor:!0,group:k.Group.text},[k.HotKeys["text-add-annotation"]]:{name:k.HotKeys["text-add-annotation"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["a"],cursor:!0,group:k.Group.text},[k.HotKeys["scope-clear"]]:{name:k.HotKeys["scope-clear"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["c"],group:k.Group.scope},[k.HotKeys["clear-css"]]:{name:k.HotKeys["clear-css"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["r"],cursor:!0,group:k.Group.css},[k.HotKeys["root-add-prev"]]:{name:k.HotKeys["root-add-prev"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["enter"],cursor:!0,group:k.Group.block},[k.HotKeys["root-add-next"]]:{name:k.HotKeys["root-add-next"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["enter"],cursor:!0,group:k.Group.block},[k.HotKeys["text-align-left"]]:{name:k.HotKeys["text-align-left"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["l"],cursor:!0,group:k.Group.common},[k.HotKeys["text-align-center"]]:{name:k.HotKeys["text-align-center"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["e"],cursor:!0,group:k.Group.common},[k.HotKeys["text-align-right"]]:{name:k.HotKeys["text-align-right"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["r"],cursor:!0,group:k.Group.common},[k.HotKeys["break-text"]]:{name:k.HotKeys["break-text"],show:!1,meta:!1,shift:!0,alt:!1,ctrl:!1,key:["enter"],cursor:!0,group:k.Group.text},[k.HotKeys["break-line"]]:{name:k.HotKeys["break-line"],show:!1,meta:!1,shift:!1,alt:!1,ctrl:!1,key:["enter"],cursor:!0,group:k.Group.core},[k.HotKeys["break-root"]]:{name:k.HotKeys["break-root"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["enter"],cursor:!0,group:k.Group.block},[k.HotKeys["cursor-nav"]]:{name:k.HotKeys["cursor-nav"],show:!1,meta:!1,shift:!1,alt:!1,ctrl:!1,cursor:!0,key:[C.Keys.down,C.Keys.left,C.Keys.right,C.Keys.up,C.Keys.home,C.Keys.end],group:k.Group.core},[k.HotKeys["cursor-nav-extend"]]:{name:k.HotKeys["cursor-nav-extend"],show:!1,meta:!1,shift:!0,alt:!1,ctrl:!1,cursor:!0,key:[C.Keys.down,C.Keys.left,C.Keys.right,C.Keys.up,C.Keys.home,C.Keys.end],group:k.Group.core},[k.HotKeys.undo]:{name:k.HotKeys.undo,show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["z"],cursor:!1,group:k.Group.common},[k.HotKeys.redo]:{name:k.HotKeys.redo,show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["y"],cursor:!1,group:k.Group.common},[k.HotKeys["indent-line"]]:{name:k.HotKeys["indent-line"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["m"],cursor:!0,group:k.Group.common},[k.HotKeys["unindent-line"]]:{name:k.HotKeys["unindent-line"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["m"],cursor:!0,group:k.Group.common},[k.HotKeys["text-bold"]]:{name:k.HotKeys["text-bold"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["b"],cursor:!0,group:k.Group.text},[k.HotKeys["scope-add"]]:{name:k.HotKeys["scope-add"],show:!0,meta:!1,shift:!1,alt:!0,ctrl:!1,key:["s"],cursor:!1,group:k.Group.scope},[k.HotKeys["text-underline"]]:{name:k.HotKeys["text-underline"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["u"],cursor:!0,group:k.Group.text},[k.HotKeys["text-italic"]]:{name:k.HotKeys["text-italic"],show:!0,meta:!1,shift:!1,alt:!1,ctrl:!0,key:["i"],cursor:!0,group:k.Group.text},[k.HotKeys["format-brush-copy"]]:{name:k.HotKeys["format-brush-copy"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["c"],cursor:!0,group:k.Group.common},[k.HotKeys["format-brush-apply"]]:{name:k.HotKeys["format-brush-apply"],show:!0,meta:!1,shift:!0,alt:!1,ctrl:!0,key:["v"],cursor:!0,group:k.Group.common}}}}Li([Di(k.HotKeys["scope-clear"])],Bi.prototype,"clear_scope",null),Li([Di(k.HotKeys["clear-css"])],Bi.prototype,"clear_css",null),Li([Di(k.HotKeys["text-bold"])],Bi.prototype,"bold",null),Li([Di(k.HotKeys["unindent-line"])],Bi.prototype,"unindent_line",null),Li([Di(k.HotKeys["indent-line"])],Bi.prototype,"indent_line",null),Li([Di(k.HotKeys.undo)],Bi.prototype,"undo",null),Li([Di(k.HotKeys.redo)],Bi.prototype,"redo",null),Li([Di(k.HotKeys["cursor-nav"])],Bi.prototype,"cursor_navigation",null),Li([Di(k.HotKeys["cursor-nav-extend"])],Bi.prototype,"cursor_extend_navigation",null),Li([Di(k.HotKeys["break-text"])],Bi.prototype,"text_break",null),Li([Di(k.HotKeys["break-line"])],Bi.prototype,"break",null),Li([Di(k.HotKeys["break-root"])],Bi.prototype,"break_root",null),Li([Di(k.HotKeys["text-partition"])],Bi.prototype,"text_partition",null),Li([Di(k.HotKeys["scope-add"])],Bi.prototype,"add_scope",null),Li([Di(k.HotKeys["text-underline"])],Bi.prototype,"underline",null),Li([Di(k.HotKeys["format-brush-copy"])],Bi.prototype,"copy_format",null),Li([Di(k.HotKeys["format-brush-apply"])],Bi.prototype,"apply_format",null),Li([Di(k.HotKeys["text-italic"])],Bi.prototype,"italic",null),Li([Di(k.HotKeys["text-align-left"])],Bi.prototype,"align_left",null),Li([Di(k.HotKeys["text-align-center"])],Bi.prototype,"align_center",null),Li([Di(k.HotKeys["text-align-right"])],Bi.prototype,"align_right",null),Li([Di(k.HotKeys["root-add-next"])],Bi.prototype,"next_root",null),Li([Di(k.HotKeys["root-add-prev"])],Bi.prototype,"prev_root",null),Li([Di(k.HotKeys["text-add-annotation"])],Bi.prototype,"add_annotation",null),Li([Di(k.HotKeys["fold-block"])],Bi.prototype,"fold_block",null);class ji extends xi{_count_word=Vt(0);_active_root_index=Vt(0);_anchor_root_id=Vt("");_mode=Vt(w.NoteMode.read);_view=Vt("doc");_in_composition_mode=Vt(!1);_in_recording=Vt(!1);_showing=Vt(!1);view_point=Pt({x:0,y:0});get view(){return this._view.value}set view(e){this._view.value=e}get is_doc_view(){return"doc"===this.view}get is_map_view(){return"map"===this.view}get mode_name(){return{[w.NoteMode.edit]:"编辑模式",[w.NoteMode.read]:"阅读模式",[w.NoteMode.export]:"导出模式"}[this.mode]}get showing(){return this._showing.value}set showing(e){this._showing.value=e,this.event.emit_status_update()}get is_recording(){return this._in_recording.value}set is_recording(e){this._in_recording.value=e,this.event.emit_status_update()}get len_undo(){return this.history.len_undo}get len_redo(){return this.history.len_redo}get is_read_mode(){return this._mode.value===w.NoteMode.read}get is_edit_mode(){return this._mode.value===w.NoteMode.edit}get in_composition_mode(){return this._in_composition_mode.value}set in_composition_mode(e){this._in_composition_mode.value=e,this.event.emit_status_update()}get mode(){return this._mode.value}set mode(e){const t=this.mode;this._mode.value=e,t!==e&&this.event.emit_status_update()}get anchor_root_id(){return this._anchor_root_id.value}set anchor_root_id(e){this._anchor_root_id.value=e,this.event.emit_status_update()}get anchor_root(){return this.root instanceof cu?this.root.children.find(e=>e.id===this.anchor_root_id):this.root.find_cube(this.anchor_root_id)}get count_root(){return this.root.child_count}get count_word(){return this._count_word.value}get active_root(){return this.root.children[this.active_root_index-1]}get active_root_index(){return this._active_root_index.value}set active_root_index(e){this._active_root_index.value=e,this.event.emit_status_update()}get count_scope(){return this.root.scopes.scopes.size}get count_scope_freeze(){return this.root.scopes.scope_count_freeze}get count_scope_normal(){return this.root.scopes.scope_count_normal}get meta(){return ji.meta}constructor(e){super(e)}update_count_word(e){this._count_word.value+=e,this.event.emit_status_update()}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.stats,version:1}}}class Hi extends xi{_listener=new Map;_updating_status=!1;get meta(){return Hi.meta}constructor(e){super(e),this._listen()}_listen(){document.documentElement.addEventListener("keyup",e=>{"Escape"===e.key&&this.emit_esc()}),document.addEventListener("selectionchange",e=>{this.emit_selection_change(e)})}on(e,t){const n=this._listener.get(e);n?n.add(t):this._listener.set(e,new Set([t]))}emit(e,...t){const n=this._listener.get(e);if(!n)return[];const r=[];for(let e of n)r.push(e(...t));return r}off(e){for(let[t,n]of this._listener)for(let t of n)e===t&&n.delete(t)}on_asset_save(e){const t=vi.tips,n=this._listener.get(y.Names["asset-save"]);n?(n.clear(),t?.tip_info("唯一事件-资源保存:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-save"],new Set([e]))}async emit_asset_save(e,t,n){const r=vi.tips,o=this._listener.get(y.Names["asset-save"]);if(!o)return r?.tip_warning("未注册保存函数"),!1;const i=[...o][0];return!!i&&await i(e,t,n)}on_asset_download(e){const t=vi.tips,n=this._listener.get(y.Names["asset-download"]);n?(n.clear(),t?.tip_info("唯一事件-资源下载:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-download"],new Set([e]))}async emit_asset_download(e,t){const n=vi.tips,r=this._listener.get(y.Names["asset-download"]);if(!r)return n?.tip_warning("未注册保存函数"),!1;const o=[...r][0];return!!o&&await o(e,t)}on_asset_copy(e){const t=vi.tips,n=this._listener.get(y.Names["asset-copy"]);n?(n.clear(),t?.tip_info("唯一事件-资源复制:回调已覆盖"),n.add(e)):this._listener.set(y.Names["asset-copy"],new Set([e]))}async emit_asset_copy(e,t,n){const r=vi.tips,o=this._listener.get(y.Names["asset-copy"]);if(!o)return r?.tip_warning("未注册保存函数"),!1;const i=[...o][0];return!!i&&await i(e,t,n)}emit_replace_id(e,t){const n=this._listener.get(y.Names["replace-id"]);if(!n)return!1;for(let r of n)r(e,t)}on_replace_id(e){const t=this._listener.get(y.Names["replace-id"]);t?t.add(e):this._listener.set(y.Names["replace-id"],new Set([e]))}emit_edit_before(e,t){const n=this._listener.get(y.Names["edit-before"]);if(!n)return!1;for(let r of n)r(e,t)}on_edit_before(e){const t=this._listener.get(y.Names["edit-before"]);t?t.add(e):this._listener.set(y.Names["edit-before"],new Set([e]))}emit_edit_after(e,t){const n=this._listener.get(y.Names["edit-after"]);if(!n)return!1;for(let r of n)r(e,t)}on_edit_after(e){const t=this._listener.get(y.Names["edit-after"]);t?t.add(e):this._listener.set(y.Names["edit-after"],new Set([e]))}emit_text_merge(e,t){const n=this._listener.get(y.Names["text-merge"]);if(!n)return!1;for(let r of n)r(e,t)}on_text_merge(e){const t=this._listener.get(y.Names["text-merge"]);t?t.add(e):this._listener.set(y.Names["text-merge"],new Set([e]))}on_esc(e){const t=this._listener.get(y.Names.esc);t?t.add(e):this._listener.set(y.Names.esc,new Set([e]))}emit_esc(){const e=this._listener.get(y.Names.esc);if(!e)return!1;for(let t of e)t()}on_selection_change(e){this.on(y.Names["selection-change"],e)}emit_selection_change(e){this.emit(y.Names["selection-change"],e)}emit_cursor_nav_before(e){return this.emit(y.Names["cursor-nav-before"],e)}on_cursor_nav_before(e){this.on(y.Names["cursor-nav-before"],e)}emit_cursor_nav_after(e){return this.emit(y.Names["cursor-nav-after"],e)}on_cursor_nav_after(e){this.on(y.Names["cursor-nav-after"],e)}on_enter_before(e){this.on(y.Names["enter-before"],e)}emit_enter_before(e){return this.emit(y.Names["enter-before"],e)}on_enter_after(e){this.on(y.Names["enter-after"],e)}emit_enter_after(e){return this.emit(y.Names["enter-after"],e)}on_show_cube_editor(e){this.on(y.Names["show-cube-editor"],e)}emit_show_cube_editor(e){return this.emit(y.Names["show-cube-editor"],e)}on_text_link_edit(e){this.on(y.Names["text-link-edit"],e)}emit_text_link_edit(e){return this.emit(y.Names["text-link-edit"],e)}on_note_input_before(e){return this.on(y.Names["note-input-before"],e)}emit_note_input_before(e){return this.emit(y.Names["note-input-before"],e)}on_note_compositionend_before(e){return this.on(y.Names["note-input-compositionend-before"],e)}emit_note_compositionend_before(e){return this.emit(y.Names["note-input-compositionend-before"],e)}on_note_compositionend(e){return this.on(y.Names["note-input-compositionend"],e)}emit_note_compositionend(e){return this.emit(y.Names["note-input-compositionend"],e)}on_note_compositionupdate(e){return this.on(y.Names["note-input-compositionupdate"],e)}emit_note_compositionupdate(e){return this.emit(y.Names["note-input-compositionupdate"],e)}on_status_update(e){return this.on(y.Names["status-update"],e)}emit_status_update(){this._updating_status||(this._updating_status=!0,Promise.resolve().then(()=>{const{root:e}=this,t=e,n={mode:this.stats.mode,count_word:this.stats.count_word,count_scope_normal:this.stats.count_scope_normal,count_scope_all:this.root.scopes.scope_size,count_stack_redo:this.history.len_redo,count_stack_undo:this.history.len_undo,count_root:this.stats.count_root,active_root_index:this.stats.active_root_index,anchor_root_id:this.stats.anchor_root_id,note_recording:this.stats.is_recording,note_composition_input:this.stats.in_composition_mode,note_showing:this.stats.showing,map_matrix:{...t.matrix2d}};this.emit(y.Names["status-update"],n),this._updating_status=!1}))}on_fig_click(e){return this.on(y.Names["fig-click"],e)}emit_fig_click(e){return this.emit(y.Names["fig-click"],e)}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.event,version:1}}}class qi extends xi{_format_brush=null;get meta(){return qi.meta}get format_brush(){const e={};return this._format_brush&&Object.assign(e,this._format_brush),e}constructor(e){super(e)}paint(e,t=!1){const{root:n,cursor:r,history:o,courier:i}=this,s=new ld(i);if(!e)return;const a=structuredClone(Ht(e));if(a["text-align"]){const t=e["text-align"];s.merge(this.text_align(t)),delete a["text-align"]}if(n.scopes.scope_count_normal>0){const e=n.scopes.get_scope_cubes();for(let n of e){const e=n.cube;for(let r of e.children.slice(...n.range))s.tell(r,zi.set_css(r.id,structuredClone(a),t))}}else{const{cube_selection:e,cube_start:n,cube_end:o,offset_start:i,offset_end:l}=r;if(!e||!n||!o)return;const c=zi.set_selection_css(e.id,a,n.id,o.id,i,l,t);s.tell(e,c)}o.record(s)}clear(){const{root:e,cursor:t,history:n,courier:r}=this,o=new ld(r),i={};if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube;for(let n of t.children.slice(...e.range))o.tell(n,zi.set_css(n.id,structuredClone(i),!1,!0))}}else{const{cube_selection:e,cube_start:n,cube_end:r,offset_start:s,offset_end:a}=t;if(!e||!n||!r)return;const l=zi.set_selection_css(e.id,i,n.id,r.id,s,a,!1,!0);o.tell(e,l)}n.record(o)}text_align(e){const{root:t,cursor:n,history:r,courier:o}=this,i=new ld(o),s={"text-align":e};if(t.scopes.scope_count_normal>0){const e=t.scopes.get_scope_cubes();for(let t of e){const e=t.cube;for(let n of e.children.slice(...t.range))i.tell(n,zi.set_css(n.id,structuredClone(s)))}}else{const e=t.cursor.find_selection_lines();for(let t of e){const e=zi.set_css(t.id,structuredClone(s));i.tell(t,e)}}return i}indent(){const{root:e,cursor:t,history:n,courier:r,config:o}=this,i=new ld(r);if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube;for(let n of t.children.slice(...e.range)){const e=n.attrs.indent>0?n.attrs.indent+1:1;i.tell(n,zi.set_attr(n.id,{indent:e}))}}}else{const e=t.find_selection_lines();for(let t of e){const e=t.attrs.indent||0,n=e>0?e+1:1;i.tell(t,zi.set_attr(t.id,{indent:n}))}}n.record(i)}unindent(){const{root:e,cursor:t,history:n,courier:r}=this,o=new ld(r);if(e.scopes.scope_count_normal>0){const t=e.scopes.get_scope_cubes();for(let e of t){const t=e.cube.children.slice(...e.range);for(let e of t){let t=e.attrs.indent;t>0&&o.tell(e,zi.set_attr(e.id,{indent:t-1}))}}}else{const e=t.find_selection_lines();for(let t of e){const e=t.attrs.indent||0;e>0&&o.tell(t,zi.set_attr(t.id,{indent:e-1}))}}n.record(o)}copy_format(){const{root:e,cursor:t}=this;if(e.scopes.scope_count_normal>0){const t=[...e.scopes.scope_normal][0].focus_cube;this._format_brush=structuredClone(Ht(t.css))}else{const{cube_focus:e}=t;if(!e)return;this._format_brush=structuredClone(Ht(e.css))}}apply_format_brush(){const e=this._format_brush;if(!e)return;const{root:t,courier:n,history:r}=this,o=new ld(n);if(t.scopes.scope_count_normal>0){const n=t.scopes.get_scope_cubes();for(let t of n)for(let n of t.cube.children.slice(...t.range)){const t=zi.set_css(n.id,e,!1,!0);o.tell(n,t)}}else{const{cube_selection:e,cube_end:t,cube_start:n,offset_start:r,offset_end:i}=this.cursor;if(!e||!t||!n)return;const s=zi.set_selection_css(e.id,this.format_brush,n.id,t.id,r,i,!1,!0);o.tell(e,s)}r.record(o)}static get meta(){return{type:S.Cores.painter,version:1}}}class Fi extends xi{_copy_data=[];_img_mime=["image/png","image/jpeg","image/gif"];_paste_stack=[];get pasted_from(){return this._paste_stack[this._paste_stack.length-1]}get is_pasting(){return this._paste_stack.length>0}get copy_data(){return[...this._copy_data]}get pasting(){return this._paste_stack.length>0}get meta(){return Fi.meta}constructor(e){super(e)}async copy(e){const{root:t,cursor:n}=this;return t.scopes.scope_count_normal>0?this.copy_scope(e):this.copy_selection(e)}async copy_selection(e){const{root:t,cursor:n}=this;if(n.has_selection){this._copy_data=n.find_inline_data();let r=n.get_selection_text();const o={noteid:t.id,versions:Mi.export_versions(),cubedata:this._copy_data},i=JSON.stringify(o);return e.setData("application/json",i),e.setData("text/plain",r),!0}{const{cube_end:r}=n;if(!r)return!1;const o=[r.export()];this._copy_data=o;let i="";for(let e of this._copy_data)e.type===S.Cubes.text&&(i+=e.info);const s={noteid:t.id,versions:Mi.export_versions(),cubedata:o},a=JSON.stringify(s);return e.setData("application/json",a),e.setData("text/plain",i),!0}}async copy_scope(e){const t=vi.tips;if(0===this.root.scopes.scope_size)return t?.tip_info("无块选区,未复制内容"),!1;if(0===this.root.scopes.scope_count_normal)return t?.tip_info("无正常块选区,未复制内容"),!1;const n=this.root.scopes.get_scope_cubes();this.root.scopes.clear_scope();const r=[];let o="";for(let e of n){for(let t of e.cube.children.slice(...e.range))o+=t.text;r.push(...e.cube.copy(...e.range))}this._copy_data=r;const i={noteid:this.root.id,versions:Mi.export_versions(),cubedata:this._copy_data},s=JSON.stringify(i);return e.setData("application/json",s),e.setData("text/plain",o),!0}set_clipboard_cubedata(e,t){const n={noteid:this.root.id,versions:Mi.export_versions(),cubedata:t},r=JSON.stringify(n),o=(new TextEncoder).encode(r),i=JSON.stringify([...o]),s=new Blob([e],{type:"text/plain"}),a=new Blob([i],{type:"text/html"}),l=new ClipboardItem({[s.type]:s,[a.type]:a});return this.set_clipboard_data(l)}async paste(e){const{cursor:t,courier:n}=this,r=e.items,o=n.get_recorder();let i=[];o.merge(this.delete()),await mn();for(let e=0;e<r.length;e++){const t=r[e];if(t.type.startsWith("image")){const e=t.getAsFile();e&&i.push(e)}}if(i.length>0){for(let e of i){const t=await this.paste_img(e);o.merge(t)}return o}const s=e.getData("application/json");if(s){let e=!1;try{const t=JSON.parse(s);if(t&&t.cubedata&&t.noteid)return this._paste_stack.push(t),e=!0,o.merge(this.paste_cubes(t.cubedata,t.versions)),o}catch(e){}finally{e&&this._paste_stack.pop()}}const a=e.getData("text/html");if(a)try{const e=new DOMParser,t=e.parseFromString(a,"text/html").body.textContent.trim(),n=JSON.parse(t),r=new Uint8Array(n),i=(new TextDecoder).decode(r),s=JSON.parse(i);let l=!1;try{if(s&&s.cubedata&&s.noteid)return this._paste_stack.push(s),l=!0,o.merge(this.paste_cubes(s.cubedata,s.versions)),o}catch(e){}finally{l&&this._paste_stack.pop()}}catch(e){console.error("🟥paste",e)}const l=e.getData("text/plain");if(l){const e=this.get_cubedata_from_text(l);return o.merge(this.paste_cubes(e,Mi.versions)),o}return o}get_cubedata_from_text(e){const t=e.replace("\r","").split("\n"),n=[];if(1===t.length){const e=Qd.get_default(t[0]);n.push(e)}else for(let e of t){if(!e.trim())continue;const t=hu.get_default_by_string(e);n.push(t)}return n}paste_cubes(e,t){const n=t||Mi.export_versions();if(0===e.length)return;const{courier:r,history:o,cursor:i}=this,s=new ld(r),{cube_selection:a,cube_end:l,cube_start:c,offset_start:d,offset_end:u}=i;if(!a||!l||!c)return;i.has_selection&&s.tell(a,zi.delete(a.id,"backward",c.id,l.id,d,u,!0));const h=od.replace_id(this.root,n,e);return s.tell(c,zi.insert(c.id,h,c.id,c.id,d,d)),s}async paste_img(e){const{courier:t,history:n,cursor:r}=this,o=new ld(t),{cube_selection:i,cube_end:s,cube_start:a,offset_start:l,offset_end:c}=r;if(!i||!s||!a)return;const d=bd.get_default();if(this.root.isdev)d.info=URL.createObjectURL(e),o.tell(s,zi.insert(s.id,[d],a.id,s.id,l,c));else{const t=d.id+".png",n=t;if(!await this.event.emit_asset_save("image",t,e))return;d.info=n,o.tell(s,zi.insert(s.id,[d],a.id,s.id,l,c))}return o}delete(){const{root:e,courier:t,cursor:n}=this;return e.scopes.scope_count_normal>0?this.delete_scope():n.has_selection?this.delete_selection():void 0}delete_selection(){const{courier:e,cursor:t,history:n}=this,r=new ld(e),{cube_end:o,cube_start:i,cube_selection:s,offset_start:a,offset_end:l}=t;if(!s||!o||!i)return;const c=i.id,d=o.id,u=s.id,h=zi.delete(u,"backward",c,d,a,l);return r.tell(s,h),r}delete_scope(){const e=vi.tips,{root:t,courier:n,history:r,cursor:o}=this;if(0===t.scopes.scope_size)return void e?.tip_info("无块选区");if(0===t.scopes.scope_count_normal)return void e?.tip_info("无常规块选区");const i=new ld(n),s=this._root.scopes.get_scope_cubes(),a=new Map;for(let e of s){let t=a.get(e.cube);t?t.push(e.range):a.set(e.cube,[e.range])}for(let[e,t]of a){const n=new Set,r=e.children;for(let e of t){const t=r.slice(e[0],e[1]);for(let e of t)n.add(e)}for(let e of n)i.merge(e.remove_self())}return this.root.scopes.clear_scope(),i}cut(e){const{root:t,courier:n,cursor:r}=this;t.scopes.scope_count_normal>0?this.cut_scope(e):this.cut_selection(e)}cut_scope(e){const{root:t,courier:n,history:r,cursor:o}=this,i=vi.tips;if(0===t.scopes.scope_size)return i?.tip_info("无块选区"),!1;if(0===t.scopes.scope_count_normal)return i?.tip_info("无常规块选区"),!1;const s=new ld(n),a=this._root.scopes.get_scope_cubes(),l=new Map;for(let e of a){let t=l.get(e.cube);t?t.push(e.range):l.set(e.cube,[e.range])}const c=[];for(let[e,t]of l){const n=new Set,r=e.children;for(let o of t){const t=r.slice(o[0],o[1]);for(let e of t)n.add(e);c.push(...e.copy(...o))}for(let e of n)s.merge(e.remove_self())}this._copy_data=c;let d="";for(let e of this._copy_data)e.type===S.Cubes.text&&(d+=e.info);const u={noteid:this.root.id,versions:Mi.export_versions(),cubedata:c},h=JSON.stringify(u);e.setData("text/plain",d),e.setData("application/json",h),this.root.scopes.clear_scope(),r.record(s)}cut_selection(e){const{courier:t,cursor:n,history:r}=this,o=new ld(t),{cube_end:i,cube_start:s,cube_selection:a,offset_start:l,offset_end:c}=n;if(a&&i&&s)if(n.has_selection){this._copy_data=n.find_inline_data();let t="";for(let e of this._copy_data)e.type===S.Cubes.text&&(t+=e.info);const d={noteid:this.root.id,versions:Mi.export_versions(),cubedata:this._copy_data},u=JSON.stringify(d);e.setData("text/plain",t),e.setData("application/json",u);const h=s.id,p=i.id,f=a.id,m=zi.delete(f,"backward",h,p,l,c);o.tell(a,m),r.record(o)}else{const t=i.export();this._copy_data=[t];let n="";for(let e of this._copy_data)e.type===S.Cubes.text&&(n+=e.info);const s={noteid:this.root.id,versions:Mi.export_versions(),cubedata:this._copy_data},a=JSON.stringify(s);e.setData("text/plain",n),e.setData("application/json",a);const l=i.pcube,c=i.index,d=zi.delete_child(l.id,"backward",[c,c+1]);o.tell(l,d),r.record(o)}}set_clipboard_data(e){return new Promise((t,n)=>{navigator.clipboard?navigator.clipboard.write([e]).then(e=>t(!0)).catch(e=>{t(!1),console.error("写入粘贴板数据失败",e)}):t(!1)})}read_clipboard(){return new Promise(e=>{navigator.clipboard?navigator.clipboard.read().then(async t=>{const n=new Map;for(let e of t)if(e instanceof ClipboardItem){const t=e.types;for(let r of t)await e.getType(r).then(async e=>n.set(e.type,e))}e(n)}):e(new Map)})}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.clipboard,version:1}}}class $i extends xi{cp=$i.default_config;_data_raw=$i.default_config;data=Pt(this._data_raw);constructor(e){super(e)}get data_raw(){return{...this._data_raw}}get meta(){return $i.meta}get css_vars(){const e=this.data;return{"--text-transition":""+(e.text_transition?"0.5s":"none"),"--text-family":`${e.text_family}`,"--text-fontsize":`${e.text_fontsize||16}px`,"--map-transition-duration":""+(e.map_transition?"0.2s":"none")}}init(e){Object.assign(this._data_raw,e)}cover(e){Object.assign(this.data,e)}export(){return structuredClone(Ht(this.data))}static get meta(){return{type:S.Cores.config,version:4}}static get default_config(){return{text_transition:!0,text_family:'"Comic Sans MS"',text_fontsize:16,code_theme:"dracula",line_indent:40,history_length:1/0,player_speed:150,revert_scope:!1,map_transition:!0,map_node_gap_x:40,map_node_gap_y:40,map_node_padding:8,map_node_max_width:800,map_node_exit_by_esc:!0,map_node_default_width:140,map_lod_scale:.5,map_scale_max:5,map_scale_min:.1,map_scale_step:.1,scroll_distance:20,map_linker_type:"bezier2",map_linker_width:2,map_linker_anchor_in:p.Anchor.arrow,map_linker_anchor_out:p.Anchor.point}}}var Gi=o(1869);class Vi extends xi{selection;cursor_step=20;scroll_distance=50;safa_distance=20;get meta(){return Vi.meta}get has_selection(){return!this.selection.isCollapsed}get client_rect(){return this.range?.getBoundingClientRect()}get client_rects(){return this.range?.getClientRects()}get range(){if(0!==this.selection?.rangeCount)return this.selection?.getRangeAt(0)}get ranges(){const e=[];for(let t=0;t<this.selection.rangeCount;t++)e.push(this.selection.getRangeAt(0));return e}get offset_start(){return this.range?this.range?.startOffset:-1}get offset_end(){return this.range?this.range?.endOffset:-1}get node_start(){return this.range?.startContainer}get node_end(){return this.range?.endContainer}get node_focus(){return this.selection.focusNode}get node_anchor(){return this.selection.anchorNode}get top_edge(){return this.safa_distance}get bottom_edge(){return document.documentElement.clientHeight-this.safa_distance}get cube_selection(){if(!this.range)return;const e=this.range.commonAncestorContainer,t=this.stats.active_root;if(t){return this.get_node_cube(e,t)||this.get_node_cube(e,this.root)}return this.get_node_cube(e,this.root)}get cube_start(){const e=this.range,t=this.cube_selection;if(!e||!t)return;const n=e.startContainer,r=this.get_node_cube(n,t);return r instanceof Qd?r:void 0}get cube_end(){const e=this.range,t=this.cube_selection;if(!e||!t)return;const n=e.endContainer,r=this.get_node_cube(n,t);return r instanceof Qd?r:void 0}get cube_focus(){const e=this.cube_selection,t=this.node_focus;if(!e||!t)return;const n=this.get_node_cube(t,e);return n instanceof rd?n:void 0}get cube_anchor(){const e=this.cube_selection,t=this.node_anchor;if(!e||!t)return;const n=this.get_node_cube(t,e);return n instanceof rd?n:void 0}constructor(e){super(e);let t=window.getSelection();if(!t)throw Error("NoteCursor : can't find Selection API");this.selection=t}move_up_by_coor(){}locate_next_line(e,t,n){let r="up"===e?t.prev_line:t.next_line;const o=t.clientRect;let i=r?.clientRect;for(;r&&i&&o&&(i.left>=o.right||i.right<=o.left);){let t="up"===e?r.prev_line:r.next_line;if(!t)break;r=t,i=t.clientRect}if(!r)return;const s=[],a=new Map;for(let e of r.children)if(e instanceof Qd){let t=e.clientRects;if(!t)continue;for(let n=0;n<t.length;n++)s.push(t[n]),a.set(t[n],e)}const l=Gi.IMath.RectPosition,c="up"===e?Gi.MathRect.get_rect_point(n.left,l.left_mid):Gi.MathRect.get_rect_point(n.left,l.right_mid),d=Gi.MathRect.get_nearest_rect(c,s);if(!d)return;const u=Gi.MathRect.get_shadow_point_horizental(c,d),h=document.caretPositionFromPoint(u.x,u.y);if(h&&h.offsetNode instanceof Text)this.set_cursor(h.offsetNode,h.offset);else if(h&&!(h.offsetNode instanceof Text)){const e=a.get(d);if(!e)return;e.set_cursor_in_tail()}}locate_current_line(e,t,n){const r=[],o=[],i=new Map;for(let e of t.children)if(e instanceof Qd){let t=e.clientRects;if(!t)continue;for(let n=0;n<t.length;n++){const o=t[n];r.push(o),i.set(o,e)}}if(1===r.length)return!1;if("up"===e){const e=n.left.top;for(let t of r)t.bottom<=e&&o.push(t)}else if("down"===e){const e=n.right.bottom;for(let t of r)t.y>=e&&o.push(t)}if(o.length>0){const t="down"===e?{x:n.right.x,y:n.right.y}:{x:n.left.x,y:n.left.y},r=Gi.MathRect.get_nearest_rect(t,o);if(!r)return!1;const s=Gi.MathRect.get_shadow_point_horizental(t,r),a=document.caretPositionFromPoint(s.x,s.y);if(a&&a.offsetNode instanceof Text)return this.set_cursor(a.offsetNode,a.offset),!0;{const e=i.get(r);if(!e)return!1;e.set_cursor_in_tail()}}return!1}move_vertical(e){const{cube_start:t,cube_end:n}=this;if(!(t instanceof Qd&&n instanceof Qd))return;const r="up"===e?t.line:n.line,o=this.get_selection_edge_position();if(!r||!o)return;this.locate_current_line(e,r,o)||this.locate_next_line(e,r,o)}move_left(){if(!this.range)return;const{cube_start:e,offset_start:t,offset_end:n,node_end:r}=this,{doc:o,courier:i}=this,s=new ld(i);if(!(e instanceof Qd))return;if(this.has_selection)return this.set_cursor(this.range.startContainer,this.range.startOffset);if(e.drop_zero_width_space(t).pos>0)if(e.is_empty){let t=e.prev_cube_deep;t&&s.tell(t,Ni.in_tail(t.id))}else{const n=e.find_text_nav_pos(t,"left");r&&this.set_cursor(r,n)}else{const t=e.prev_cube_deep;t&&(t instanceof Qd?s.tell(t,Ni.loc(t.id,t.len-1,e.id,0)):s.tell(t,Ni.in_tail(t.id)))}}move_right(){if(!this.range)return;const{cube_end:e,offset_start:t,offset_end:n,node_end:r}=this,{doc:o,courier:i}=this,s=new ld(i);if(e instanceof Qd){if(this.has_selection)return this.set_cursor(this.range.endContainer,this.range.endOffset);if(n<e.drop_zero_width_space(n).len)if(e.is_empty){let t=e.next_cube_deep;t&&s.tell(t,Ni.in_head(t.id))}else{const t=e.find_text_nav_pos(n,"right");r&&this.set_cursor(r,t)}else{const t=e.next_cube_deep;t&&(t instanceof Qd?s.tell(t,Ni.loc(t.id,1,e.id,e.len)):s.tell(t,Ni.in_head(t.id)))}}}move_up(){this.move_vertical("up")}move_down(){return this.move_vertical("down")}move_end(){if(!this.range)return;const{cube_end:e}=this,{startContainer:t,endContainer:n,startOffset:r,endOffset:o}=this.range;if(!e)return;this.set_cursor(this.range.endContainer,this.range.endOffset);const i=this.range.getClientRects();if(0===i.length)return;const s=Gi.IMath.RectPosition,a=Gi.MathRect.get_rect_point(i[i.length-1],s.center);let l=od.get_client_rects(e.id);if(!l)return;let c=l.length,d=l[0],u=l[l.length-1],h=u;if(c>1){for(let e=0;e<c;e++){const t=l[e];if(Gi.MathRect.is_point_in_rect(a,t)){h=t;break}}if(h!==u)return this.locate_cursor_on_rect(h,s.right_mid)}let p=e.next_cube;if(!p)return this.locate_cursor_on_rect(h,s.right_mid);for(l=od.get_client_rects(p.id);l;){if(c=l.length,d=l[0],d.x<h.right)return this.locate_cursor_on_rect(h,s.right_mid);if(c>1)return this.locate_cursor_on_rect(d,s.right_mid);if(p=p?.next_cube,!p)return this.locate_cursor_on_rect(d,s.right_mid);l=od.get_client_rects(p.id)}}move_home(){if(!this.range)return;const{cube_end:e}=this,{startContainer:t,endContainer:n,startOffset:r,endOffset:o}=this.range;if(this.set_cursor(this.range.startContainer,this.range.startOffset),!e)return;const i=this.range.getClientRects();if(0===i.length)return;const s=Gi.IMath.RectPosition,a=Gi.MathRect.get_rect_point(i[i.length-1],s.center);let l=od.get_client_rects(e.id);if(!l)return;let c=l.length,d=l[0],u=l[l.length-1],h=d;if(c>1){for(let e=0;e<c;e++){const t=l[e];if(Gi.MathRect.is_point_in_rect(a,t)){h=t;break}}if(h!==d)return this.locate_cursor_on_rect(h,s.left_mid)}let p=e.prev_cube;if(!p)return this.locate_cursor_on_rect(h,s.left_mid);for(l=od.get_client_rects(p.id);l;){if(c=l.length,u=l[l.length-1],u.right>h.left)return this.locate_cursor_on_rect(h,s.left_mid);if(c>1)return this.locate_cursor_on_rect(u,s.left_mid);if(p=p?.prev_cube,!p)return this.locate_cursor_on_rect(u,s.left_mid);l=od.get_client_rects(p.id)}}extend_left(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_left(),mn(()=>{const e=this.range?.endContainer,t=this.range?.endOffset;e&&"number"==typeof t&&this.set_selection_between(l,c,e,t)})}extend_right(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_right(),mn(()=>{const e=this.range?.endContainer,t=this.range?.endOffset;e&&"number"==typeof t&&this.set_selection_between(l,c,e,t)})}extend_up(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_up();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_down(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_down();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_home(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_home();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}extend_end(){if(!this.range)return;const{startContainer:e,startOffset:t,endContainer:n,endOffset:r}=this.range,{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:a}=this.selection,l=o||e,c="number"==typeof i?i:t,d=s||n,u="number"==typeof a?a:r;this.set_cursor(d,u),this.move_end();const h=this.range.endContainer,p=this.range.endOffset;this.set_selection_between(l,c,h,p)}is_contains_selection(e){const t=[];for(let e of this.ranges)t.push(e.commonAncestorContainer);for(let n of t){if(!this.get_node_cube(n,e))return!1}return!0}get_node_cube(e,t){let n=e instanceof Element?e:e.parentElement;const r=[];for(;n;){if(n.id){let e;if(r.push(n.id),e=(this.root,t.find_cube(n.id)),e)return e}n=n.parentElement}}get_focus_line(){const{cube_end:e}=this;if(e)return e instanceof Qd?e.line:void 0}set_cursor(e,t){let n;if(e instanceof Text)n=e;else{if(!(e instanceof HTMLElement&&e.dataset.type===S.Cubes.text&&e.dataset.id&&e.firstChild instanceof Text))return console.error("NoteCursor : curosr only be set in TextNode",e,t);n=e.firstChild}let r=Math.min(n.length,t);this.selection?.setPosition(n,r),e.parentElement&&e.parentElement.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}locate_cursor_on_rect(e,t){let n=Gi.MathRect.get_rect_point(e,t);const r=document.caretPositionFromPoint(n.x,n.y),o=window.getSelection();if(r&&o&&r.offsetNode instanceof Text)return o.setPosition(r.offsetNode,r.offset)}locate_cursor_by_coor(e,t){const{courier:n,history:r,root:o}=this,i=document.caretPositionFromPoint(e,t),s=i?.offsetNode,a=new ld(n);if(s){if(s instanceof Text)i.offsetNode instanceof Text&&(s.parentElement?.parentElement?.focus(),this.set_cursor(i.offsetNode,i.offset));else{const e=o.cursor.get_node_cube(s,o);if(e?.in_postil)return;const t=e?.pcube;if(!e||!t)return;const n=e.meta;e.next_cube;n.block||a.tell(e,Ni.in_head(e.id))}r.record(a)}}set_cursor_by_coor(e,t){if(t<=this.top_edge){let e=document.documentElement.scrollTop,n=e>this.scroll_distance?this.scroll_distance:e;Gi.DomAnimation.scroll_element(document.documentElement,-this.scroll_distance,"vertical"),t+=n}else if(t>=this.bottom_edge){let e=document.documentElement.scrollHeight-document.documentElement.clientHeight-document.documentElement.scrollTop,n=e>this.scroll_distance?this.scroll_distance:e;Gi.DomAnimation.scroll_element(document.documentElement,this.scroll_distance,"vertical"),t-=n}const n=document.caretPositionFromPoint(e,t);if(n&&n.offsetNode instanceof Text){n.offsetNode.parentElement?.parentElement?.focus(),this.set_cursor(n.offsetNode,n.offset);let e=this.get_selection_edge_position()?.right;if(!e)return;return e.y<=this.top_edge?window.scrollBy({top:-this.scroll_distance,behavior:"smooth"}):e.y>=this.bottom_edge&&window.scrollBy({top:this.scroll_distance,behavior:"smooth"}),n}}get_selection_edge_position(){if(!this.range)return;const e=this.range.getClientRects();if(0===e.length)return;const t=e[0],n=e[e.length-1];return{left:new DOMRect(t.x,t.y,0,t.height),right:new DOMRect(n.x,n.y,0,n.height)}}set_selection_between(e,t,n,r){this.selection.setBaseAndExtent(e,t,n,r)}get_selection_text(e=!0){const{cube_end:t,cube_start:n,offset_start:r,offset_end:o}=this;let i="";if(e&&!this.has_selection&&n instanceof Qd)return n.text;if(this.cube_selection instanceof Qd)return this.cube_selection.text.slice(r,o);{let e=!1,s=!1;const a=this.find_inline_cube();for(let l of a){for(let a of l){if(s)break;e||a!==n||(e=!0,a instanceof Qd&&(i+=a.text.slice(r))),s||a!==t||(s=!0,a instanceof Qd&&(i+=a.text.slice(0,o))),e&&!s&&a instanceof Qd&&a!==n&&a!==t&&(i+=a.text)}i+="\n"}}return i}find_cube_by_coor(e){const{x:t,y:n}=e,r=document.elementFromPoint(t,n);if(r)return this.get_node_cube(r,this.root)}find_selection_lines(){const e=[],{cube_selection:t,cube_start:n,cube_end:r}=this;if(t instanceof Qd){let e=t.line;if(e)return[e]}else{if(t instanceof hu)return[t];if(n instanceof Qd&&r instanceof Qd){const t=n.line,o=r.line;if(t&&o){let n=t;for(;n&&(e.push(n),n!==o);)n=n.next_line}}}return e}find_inline_cube(){const e=[],{cube_start:t,cube_end:n,offset_start:r,offset_end:o}=this;if(!t||!n)return e;if(!(t instanceof Qd&&n instanceof Qd))return e;const i=this.find_selection_lines();if(0===i.length)return[];const s=i[0],a=i[i.length-1],l=t.index,c=n.index;if(1===i.length){const t=[];for(let e of s.children.slice(l,c+1))t.push(e);e.push(t)}else{let t=[];for(let e of s.children.slice(l))t.push(e);e.push(t),t=[];for(let n of i.slice(1,-1)){for(let e of n.children)t.push(e);e.push(t),t=[]}for(let e of a.children.slice(0,c+1))t.push(e);e.push(t)}return e}find_inline_data(){const e=[],t=this.find_inline_cube();if(0===t.length)return e;const n=t[0],r=t[t.length-1],o=n[0],i=r[r.length-1],{cube_start:s,cube_end:a,offset_start:l,offset_end:c}=this;if(!s||!a)return e;if(s===a){const t=s.export();t.info=t.info.slice(l,c),e.push(t)}else if(n===r){if(s instanceof Qd&&s===o){const t=s.export();t.info=t.info.slice(l),e.push(t)}for(let t of n.slice(1,-1))e.push(t.export());if(a instanceof Qd&&a===i){const t=a.export();t.info=t.info.slice(0,c),e.push(t)}}else{if(s instanceof Qd&&s===o){const t=s.export();t.info=t.info.slice(l),e.push(t)}e.push(...n.slice(1).map(e=>e.export()));for(let n of t.slice(1,-1)){const t=hu.get_default(n.map(e=>e.export()));e.push(t)}const d=hu.get_default(r.slice(0,-1).map(e=>e.export()));if(a instanceof Qd&&a===i){const e=a.export();e.info=e.info.slice(0,c),d.info.push(e)}e.push(d)}return e}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.cursor,version:1}}}class Ui extends xi{command_group_do=[];command_group_undo=[];get meta(){return Ui.meta}execute_command_group(e){if(this.stats.mode===w.NoteMode.read)return;const t=(e,n,r)=>{n<r.length&&mn(()=>{this.pass(e),t(r[n+1],n+1,r)})};t(e[0],0,e)}constructor(e){super(e)}get_recorder(){return new ld(this)}pass(e){if(this.stats.mode===w.NoteMode.read)return;const t=e,n=e.id,r=this.root.find_cube(n);if(!r)return console.error("未发现cube:",n);console.log("🟡",r,e);const o=new ld(this);let i=r.on(t);return i instanceof ld&&o.merge(i),o}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.courier,version:1}}}class Ki{_float;_visible=Vt(!1);_css=Pt({position:"fixed"});_cube=Vt(null);constructor(e){this._float=e}get visible(){return this._visible.value}get float(){return this._float}get cube(){return this._cube.value}get css(){return this._css}async show(e,t){this._visible.value=!0;const n=e.currentTarget;await mn();const r={x:0,y:0,width:window.innerWidth,height:window.innerHeight},o=n.getBoundingClientRect(),i={x:e.clientX,y:e.clientY,width:1,height:1},s=Gi.MathRect.move_rect_to_other(r,o,i,12);this._css.left=`${s.x}px`,this._css.top=`${s.y}px`,this._cube.value=qt(t)}close(){this._visible.value=!1,this._cube.value=null}}class Wi extends Ki{_css=Pt({});_cube=Vt(null);constructor(e){super(e),this._listen()}_listen(){const e=this.float.event;e.on_esc(this.close.bind(this)),e.on_fig_click(this.close.bind(this))}get cube(){return this._cube.value}}class Yi extends xi{_float_node_layout=new Wi(this);constructor(e){super(e)}get float_node_layout(){return this._float_node_layout}get meta(){return Yi.meta}static get meta(){return{type:S.Cores.float,version:1}}}class Xi extends xi{_id=yi();scroll_offset=100;_freeze=Vt(!1);selection_line=Ot([]);_boxes=Pt([]);pos=Pt({x:0,y:0,width:0,height:0});css=Pt({});get boxes(){return this._boxes}get meta(){return Xi.meta}get id(){return this._id}get freeze(){return this._freeze.value}set freeze(e){this._freeze.value=e}_direction=null;get focus_cube(){return this.selection_line[this.selection_line.length-1]}get second_cube(){return this.selection_line.length<=1?void 0:this.selection_line[this.selection_line.length-2]}get len(){return this.selection_line.length}constructor(e,t){super(e),this.selection_line.push(t),this.listener.check_float()}expand(e){if(!(this.focus_cube instanceof Yd&&this._direction===e))if("up"===e){if("down"===this._direction&&this.len>1)return this.selection_line.pop(),void this.update_area();const e=this.focus_cube.prev_cube||this.focus_cube.pcube;if(!e||e instanceof Ts)return;if(e instanceof Wc)return;e===this.second_cube?(this.selection_line.pop(),this.update_area()):(null!==this._direction&&1!==this.len||(this._direction="up"),this.selection_line.push(e),this.update_area())}else{if("up"===this._direction&&this.len>1)return this.selection_line.pop(),void this.update_area();const e=this.focus_cube.next_cube||this.focus_cube.pcube;if(!e||e instanceof Ts)return;if(e instanceof Wc)return;e===this.second_cube?(this.selection_line.pop(),this.update_area()):(null!==this._direction&&1!==this.len||(this._direction="down"),this.selection_line.push(e),this.update_area())}}shrink(){1!==this.selection_line.length&&(this.selection_line.pop(),this.update_area())}update_area(e=!0){if(e){if(0===this.selection_line.length)return this.remove();const e=this.selection_line[this.selection_line.length-1].level;this._boxes.length=0;const t=[],n=1;for(let r of this.selection_line){if(r.level!==e)continue;const o=r.clientRect;if(!o)continue;const i={x:o.x+n,y:o.y+n,width:o.width-2*n,height:o.height-2*n};this._boxes.push({rect:i,cube:r}),t.push(o)}if(0===t.length)return this.remove();const r=Gi.MathRect.merge(...t);this.css.width=`${r.width}px`,this.css.height=`${r.height}px`,this.css.left=r.x+"px",this.css.top=r.y+"px",this.pos.x=r.x+document.documentElement.scrollLeft,this.pos.y=r.y+document.documentElement.scrollTop,this.pos.width=r.width,this.pos.height=r.height}else{const e=this.pos.x-document.documentElement.scrollLeft,t=this.pos.y-document.documentElement.scrollTop;this.css.left=e+"px",this.css.top=t+"px"}}find_line_next(e){if(this.selection_line.indexOf(e)<this.selection_line.length)return this.selection_line[this.selection_line.length-1]}find_line_prev(e){const t=this.selection_line.indexOf(e);if(t>0)return this.selection_line[t-1]}get_scope_info(){let e=this.focus_cube.level;const t=this.focus_cube.pcube,n=[],r=[];for(let t of this.selection_line){const o=t.level,i=t.index;o===e&&(n.push(t),r.push(i))}return{cube:t,range:[Math.min(...r),Math.max(...r)+1],from:this.id}}remove(){this.root.scopes.remove_scope(this.id),this.event.emit_status_update()}find_scope_lines(){const e=this.root.scopes.get_scope_cubes(),t=[],n=[];for(let n of e)t.push(...od.get_flat_cube(n.cube));for(let e of t)e instanceof hu&&n.push(e);return n}find_inline_data(){const e=[],t=this.find_scope_lines();for(let n of t)e.push(...n.children);return e}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.scope,version:1}}}class Ji extends xi{_scopes=new Set;constructor(e){super(e)}get status(){return this.root.status}get scope_size(){return this._scopes.size}get scope_first(){return this._scopes.values().next().value}get scope_last(){let e;for(let t of this._scopes)e=t;return e}get scopes(){return new Set(this._scopes)}get scope_count_freeze(){let e=0;for(let t of this.scopes)t.freeze&&e++;return e}get scope_count_normal(){return this.scopes.size-this.scope_count_freeze}get scope_normal(){const e=new Set;for(let t of this.scopes)t.freeze||e.add(t);return e}get scope_freeze(){const e=new Set;for(let t of this.scopes)t.freeze&&e.add(t);return e}clear_scopes(){this._scopes.clear()}add_scope_by_cube(e){const t=new Xi(this.root,e);this._scopes.add(t),this.status.add_scope(t),this.event.emit_status_update()}add_scope(e=!1){if(e){const e=this.cursor.cube_end;if(!e||e instanceof Ts)return vi.tips?.tip_warning("光标未在有效块内");this.add_scope_by_cube(e)}else{const e=this.stats.view_point,t=this.cursor.find_cube_by_coor(e);if(!(t&&t instanceof rd))return vi.tips?.tip_warning("光标未在有效块内");this.add_scope_by_cube(t)}}remove_scope(e){if(e instanceof Xi)this._scopes.delete(e),this.status.remove_scope(e);else for(let t of this._scopes)if(t.id===e){this._scopes.delete(t),this.status.remove_scope(t);break}}clear_scope(e=!0){for(let t of this._scopes)e&&t.freeze||this.remove_scope(t)}freeze_scopes(){for(let e of this._scopes)e.freeze=!0}sort_scope(){const e=[...this._scopes];return e.sort((e,t)=>e.pos.y-t.pos.y),e}get_scope_cubes(e=!1,t=!0){if(0===this._scopes.size)return[];const n=[],r=e?this.sort_scope():this._scopes;for(let e of r)t&&e.freeze||n.push(e.get_scope_info());return n}get_scope_cubes_data(){const e=this.get_scope_cubes(),t=[];for(let n of e)t.push(...n.cube.copy(n.range[0],n.range[1]));return t}}class Zi{static get_default(){return{a:1,b:0,c:0,d:1,e:0,f:0}}static to_array(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static is_default(e){return 1===e.a&&0===e.b&&0===e.c&&1===e.d&&0===e.e&&0===e.f}static get_matrix(e,t,n,r,o,i){return{a:e,b:t,c:n,d:r,e:o,f:i}}static get_matrix_translate(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}static get_matrix_scale(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}static get_matrix_reflection_horizental(){return{a:1,b:0,c:0,d:-1,e:0,f:0}}static get_matrix_reflection_vertical(){return{a:-1,b:0,c:0,d:1,e:0,f:0}}static multiply(e,t){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}static translate(e,t,n){const r=this.get_matrix_translate(t,n);return this.multiply(e,r)}static get_dom_string(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=e;return`matrix(${t.toFixed(1)},${n},${r},${o.toFixed(1)},${i.toFixed(1)},${s.toFixed(1)})`}static map_point_to_view(e,t){return{x:e.x+t.x,y:e.y+t.y}}static view_point_to_map(e,t){return{x:e.x-t.x,y:e.y-t.y}}}class Qi{static path=document.createElementNS("http://www.w3.org/2000/svg","path");static svg_path_sample(e,t=24){if(!e||t<2)return[];this.path.setAttribute("d",e);const n=[],r=this.path.getTotalLength()/t;for(let e=0;e<=t;e++){const t=e*r,o=this.path.getPointAtLength(t);n.push({x:o.x,y:o.y})}return n}static get_line_k(e,t){const n=t.y-e.y,r=t.x-e.x;if(0===r)return Number.POSITIVE_INFINITY;return n/r}static find_closest_point(e,t){let n=1/0,r=e[0];const{x:o,y:i}=t;for(let t of e){let e=(o-t.x)**2+(i-t.y)**2;e<n&&(n=e,r=t)}return r}static offset_points(e,t){const n=[],{x:r,y:o}=t;for(let t of e)n.push({x:t.x+r,y:t.y+o});return n}static find_closest_points(e,t){let n=1/0,r=e[0],o=t[0];for(let i=0;i<e.length;i++){const s=e[i];for(let e=0;e<t.length;e++){const i=t[e],a=s.x-i.x,l=s.y-i.y,c=a*a+l*l;c<n&&(n=c,r=s,o=i)}}return{from:r,to:o}}static polygonCentroid(e){let t=0,n=0,r=0;const o=e.length;for(let i=0;i<o;i++){const{x:s,y:a}=e[i],{x:l,y:c}=e[(i+1)%o],d=s*c-l*a;r+=d,t+=(s+l)*d,n+=(a+c)*d}return r*=.5,t/=6*r,n/=6*r,{x:t,y:n}}static get_polygon_area(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const{x:o,y:i}=e[r],{x:s,y:a}=e[(r+1)%n];t+=o*a-s*i}return t/2}static find_line_to_layout_root(e,t=new Set){if(e.is_layout_root)return{has_root:!0,line:[e]};{t.add(e.id);const n=e.pcube.get_node_from(e.id)||[];for(let r of n){if(t.has(r))continue;const n=e.pcube.get_node(r);if(n){if(n.is_layout_root)return{has_root:!0,line:[e,n]};{const r=this.find_line_to_layout_root(n,t);if(r.has_root)return r.line.unshift(e),r}}}return{has_root:!1,line:[]}}}static get_direct_layout_parent(e,t=new Set){if(e.is_layout_root)return;t.add(e.id);const n=e.pcube.get_node_from(e.id)||[];for(let r of n){if(t.has(r))continue;const n=e.pcube.get_node(r);if(n){if(n.is_layout_root)return n;if(null!=this.get_direct_layout_parent(n,t))return n}}return null}static get_linker_id(e,t){return e+"-"+t}static wait_nodes_render(e){const t=[];for(let n of e)t.push(n.wait_layout_self());return Promise.all(t)}static create_linker_info(e,t,n){const r=e.get_node(t),o=e.get_node(n),i=r?.to.size||0,s=o?.from.size||0;return{linker:Bu.get_default(t,n),index_from:s,index_to:i}}static get_rect_area(e,t,n=4){const r=t.x-e.x,o=t.y-e.y,i=Math.sign(r)*n,s=Math.sign(o)*n,a=e,l=a.x+r,c=a.y,d=t,u=a.x,h=a.y+o;return`M${a.x+i} ${a.y}H${l-i}Q${l} ${c} ${l} ${c+s}V${d.y-s}Q${d.x} ${d.y} ${d.x-i} ${d.y}H ${u+i}Q${u} ${h} ${u} ${h-s}V${a.y+s}Q${a.x} ${a.y} ${a.x+i} ${a.y}Z`}}class es{static node_add(e,t){return{id:e,name:b.Names.node_add,data:t}}static node_remove(e,t){return{id:e,name:b.Names.node_remove,data:t}}static linker_add(e,t,n=!0){return{id:e,name:b.Names.linker_add,data:t,to_root:n}}static linker_remove(e,t,n=!0){return{id:e,name:b.Names.linker_remove,data:t,to_root:n}}static node_drag(e,t){return{id:e,name:b.Names.node_drag,data:t}}}class ts{static layout_change(e,t){return{id:e,name:x.Names.layout_update,attrs:t}}static append_child(e,t,n){return{id:e,name:x.Names.append_child,nodes:t,previd:n}}}class ns extends xi{_interaction;_flow=!1;down_node;down_pos;down_pos_view;matrix=new Map;captive_nodes=new Set;hidden_downstream=new Set;matrix_translate=Zi.get_matrix_translate(0,0);scope_down;recover_select=!1;has_down=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-drag"}get map_interaction(){return this.map.map_interaction}get intention(){return this.map_interaction.node_intention}get min_distance(){return 5}set_node_linkers_visible(e,t){for(let n of e.to){const r=this.map.get_linker(this.map.get_linker_id(e.id,n));r&&(this.map.set_linker_visible(r,t),this.map.status.set_linker_visible(r,t))}for(let n of e.from){const r=this.map.get_linker(this.map.get_linker_id(n,e.id));r&&(this.map.set_linker_visible(r,t),this.map.status.set_linker_visible(r,t))}}get_excluded_intention_nodes(){const e=new Set;for(let t of this.matrix.keys())e.add(t);for(let t of this.captive_nodes)e.add(t);for(let t of this.hidden_downstream)e.add(t);return e}reset_free_nodes_to_origin(){for(let[e,t]of this.matrix)t&&(e.reset_matrix(t),e.map2d.update_sample(),e.map2d.sync_rect(),e.map2d.update_linkers("all"))}activate_drag_flow(){if(!this.flow){this.flow=!0,this.intention.preview_node=this.down_node;for(let e of this.matrix.keys())this.map.set_node_dragging(e,!0);for(let e of this.captive_nodes){this.map.set_node_dragging(e,!0);for(let t of e.env.downstream_nodes)this.matrix.has(t)||this.captive_nodes.has(t)||(this.hidden_downstream.add(t),this.map.set_node_visible(t,!1),this.map.status.set_node_visible(t,!1),this.set_node_linkers_visible(t,!1))}}}reset_status(){const e=this.hidden_downstream.size>0;this.hidden_downstream.clear(),this.captive_nodes.clear(),this.map.clear_node_dragging(),this.recover_select=!1,this.matrix.clear(),this.flow=!1,this.has_down=!1,this.intention.clear_drag_state(),e&&this.map.check_show()}down(e,t){this.scope_down=t;const{selector:n,pos:r,selected_nodes:o,view_cubes:i}=t;if("node"!==n.type||!this.map.map_interaction.check_mouse_key(e,"left")||n.res.editable)return;e.stopPropagation(),e.preventDefault(),this.reset_status(),this.has_down=!0,this.down_node=n.res,this.down_pos=this.map.view_point_to_real(r),this.down_pos_view=r;const s=o.has(this.down_node)?o:new Set([this.down_node]);for(let e of s)e.env.is_captive?this.captive_nodes.add(e):this.matrix.set(e,{...e.matrix2d})}move(e){const t=this.matrix.size>0,n=this.captive_nodes.size>0;if(!this.has_down||!this.map_interaction.check_mouse_key(e,"left")||!this.down_pos)return;if(!t&&!n)return;const r=Math.sqrt((e.clientX-this.down_pos_view.x)**2+(e.clientY-this.down_pos_view.y)**2);if(!this.flow&&r<this.min_distance)return;this.activate_drag_flow(),e.preventDefault();const o=this.map.view_point_to_real({x:e.clientX,y:e.clientY});if(this.intention.drag_count=this.matrix.size+this.captive_nodes.size,this.intention.update_intention(o,this.get_excluded_intention_nodes()),t){const e=o.x-this.down_pos.x,t=o.y-this.down_pos.y;if(!this.recover_select){this.map.clear_node_selected();for(let[e]of this.matrix)this.map.set_node_selected(e,!0);this.recover_select=!0}this.matrix_translate=Zi.get_matrix_translate(e,t);for(let[e,t]of this.matrix){if(!t)continue;const n=Zi.multiply(t,this.matrix_translate);e.reset_matrix(n),e.map2d.update_sample(),e.map2d.sync_rect(),e.map2d.update_linkers("all")}}}up(e){if(!this.flow)return this.reset_status();e.stopPropagation(),e.preventDefault();const{courier:t,history:n}=this,r=t.get_recorder(),o=this.intention.active_intention;if(o){this.reset_free_nodes_to_origin();const e=[],t=[...this.captive_nodes,...this.matrix.keys()];for(let n of t){const t="child"===o.type?o.node:o.node.env.upstream;t&&(t!==n&&(n.env.downstream_nodes.has(t)||e.push({node_id:n.id,intention:{type:o.type,target_id:o.node.id}})))}e.length>0&&r.tell(this.map,es.node_drag(this.map.id,e))}else{const e=new Set,t=new Set;for(let[n,r]of this.matrix)if(r&&(n.reset_matrix(r),t.add(n),n.is_layout_root&&(e.add(n),!n.env.layout_type)))for(let e of n.env.downstream_nodes)t.add(e);for(let e of t){const t=e.matrix2d,n=Zi.multiply(t,this.matrix_translate),o=ts.layout_change(e.id,{matrix2d:n});r.tell(e,o)}for(let t of e)t.layout_throttle();t.size>0&&this.map.grider.update_nodes([...t])}n.record(r),this.reset_status()}cancel(e){this.flow&&(this.reset_free_nodes_to_origin(),this.reset_status())}leave(){}wheel(e){}dblclick(e){}contextmenu(e){}}class rs{get edge_size(){return 40}get hnode_size(){return{width:50,height:10}}get vnode_size(){return{width:10,height:50}}make_rect_path(e){return`M${e.x},${e.y}h${e.width}v${e.height}h${-e.width}Z`}get_hit_area(e,t){return e.find(e=>Gi.MathRect.is_point_in_rect(t,e.area))}get_env_info(e){const t=e.map2d.rect,n=e.env.prev_node,r=e.env.next_node,o=n?.map2d.rect,i=r?.map2d.rect;return{rect:t,prev:n,next:r,prect:o,nrect:i,urect:e.env.upstream?.map2d.rect}}get_pnode(e,t,n,r){const{width:o,height:i}=r,s=Gi.IMath.RectPosition;return n===s.left_top?{x:e,y:t,width:o,height:i}:n===s.left_mid?{x:e,y:t-i/2,width:o,height:i}:n===s.left_bottom?{x:e,y:t-i,width:o,height:i}:n===s.right_top?{x:e-o,y:t,width:o,height:i}:n===s.right_mid?{x:e-o,y:t-i/2,width:o,height:i}:n===s.right_bottom?{x:e-o,y:t-i,width:o,height:i}:n===s.top_mid?{x:e-o/2,y:t,width:o,height:i}:n===s.bottom_mid?{x:e-o/2,y:t-i,width:o,height:i}:{x:e,y:t,width:o,height:i}}get_svg(e,t,n,r,o){const i=Gi.MathRect.get_rect_point;return{rect:this.make_rect_path(n),linker:ju.get_line(i(e,t),i(n,r),o)}}}const os=new class extends rs{constructor(){super()}get_intention(e,t){if("right"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i,nrect:s,urect:a}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const l=i?(o.y-(i.y+i.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y-l,width:o.width,height:l};r.push({type:"prev",node:t,area:e})}const c=s?(s.y-(o.y+o.height))/2:this.edge_size;if(c>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:c};r.push({type:"next",node:t,area:e})}const d=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(d)}}left(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i,child_last:s}=o.env,{rect:a,node_line_type:l}=o.map2d,{node_gap_x:c,node_gap_y:d}=n.map2d,u=(Gi.MathRect.get_rect_point,Gi.IMath.RectPosition);if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x,t.y+t.height+this.edge_size,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}{const e=this.get_pnode(a.x+a.width+c,a.y+a.height/2,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,u.right_top),n=this.get_pnode(e.x,e.y,u.right_mid,this.hnode_size);return this.get_svg(a,u.left_mid,n,u.right_mid,l)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,u.left_bottom),n=this.get_pnode(e.x,e.y,u.bottom_mid,this.vnode_size);return this.get_svg(a,u.top_mid,n,u.bottom_mid,l)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,u.left_top),n=this.get_pnode(e.x,e.y,u.top_mid,this.vnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,u.left_mid),n=this.get_pnode(e.x,e.y,u.left_mid,this.vnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,u.top_mid),n=this.get_pnode(e.x,e.y,u.top_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,u.left_top),n=this.get_pnode(e.x,e.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.left_mid,l)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,u.left_mid,this.hnode_size);return this.get_svg(a,u.right_mid,e,u.left_mid,l)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.right_mid,this.hnode_size);return this.get_svg(a,u.left_mid,n,u.right_mid,l)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.bottom_mid,this.vnode_size);return this.get_svg(a,u.top_mid,n,u.bottom_mid,l)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,u.right_bottom),n=this.get_pnode(e.x,e.y,u.top_mid,this.vnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,u.right_mid),n=this.get_pnode(e.x,e.y,u.left_mid,this.vnode_size);return this.get_svg(a,u.right_mid,n,u.left_mid,l)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,u.bottom_mid),n=this.get_pnode(e.x,e.y,u.top_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.top_mid,l)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,u.left_bottom),n=this.get_pnode(e.x,e.y,u.left_mid,this.hnode_size);return this.get_svg(a,u.bottom_mid,n,u.left_mid,l)}}}};const is=new class extends rs{constructor(){super()}get_intention(e,t){if("left"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){return this.left(e,t,n)}left(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}up(e,t,n){const r=[],{rect:o,nrect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(i.x-o.x-o.width)/2:this.edge_size;if(s>0){const e={x:o.x+o.width,y:o.y,width:s,height:o.height};r.push({type:"next",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){return this.up(e,t,n)}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width,t.y+t.height+this.edge_size,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}{const e=this.get_pnode(s.x-l,s.y+s.height/2,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,e,d.right_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const ss=new class extends rs{constructor(){super()}get_intention(e,t){if("up"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,nrect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(i.y-(o.y+o.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:s};r.push({type:"next",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){return this.right(e,t,n)}file_tree(e,t,n){return this.right(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y+t.height,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y-c/2,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,e,d.bottom_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const as=new class extends rs{constructor(){super()}get_intention(e,t){if("down"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y+s.height+c,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,e,d.top_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};const ls=new class extends rs{constructor(){super()}get_intention(e,t){if("time-right"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.y-(i.y+i.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y-a,width:o.width,height:a};r.push({type:"prev",node:t,area:e})}const l=s?(s.y-(o.y+o.height))/2:this.edge_size;if(l>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:l};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.x-i.x-i.width)/2:this.edge_size;if(s>0){const e={x:o.x-s,y:o.y,width:s,height:o.height};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_down(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const a=s?(s.y-(o.y+o.height))/2:this.edge_size;if(a>0){const e={x:o.x,y:o.y+o.height,width:o.width,height:a};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}file_tree(e,t,n){return this.time_down(e,t,n)}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l}=n.map2d,c=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width+this.edge_size,t.y+t.height/2,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}{const e=this.get_pnode(s.x+s.width+l,s.y+s.height/2,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,c.right_top),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,c.left_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,c.top_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,c.right_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,c.bottom_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}}};const cs=new class extends rs{constructor(){super()}get_intention(e,t){if("time-down"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.x-i.x-i.width)/2:this.edge_size;if(s>0){const e={x:o.x-s,y:o.y,width:s,height:o.height};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_y:l}=n.map2d,c=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width/2,t.y+t.height+this.edge_size,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}{const e=this.get_pnode(s.x+s.width/2,s.y+s.height+l,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,e,c.top_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,c.right_top),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,c.left_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,c.top_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,c.left_top),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,c.left_mid,this.hnode_size);return this.get_svg(s,c.right_mid,e,c.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.right_mid,this.hnode_size);return this.get_svg(s,c.left_mid,n,c.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.bottom_mid,this.vnode_size);return this.get_svg(s,c.top_mid,n,c.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,c.right_bottom),n=this.get_pnode(e.x,e.y,c.top_mid,this.vnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,c.right_mid),n=this.get_pnode(e.x,e.y,c.left_mid,this.vnode_size);return this.get_svg(s,c.right_mid,n,c.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,c.bottom_mid),n=this.get_pnode(e.x,e.y,c.top_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,c.left_bottom),n=this.get_pnode(e.x,e.y,c.left_mid,this.hnode_size);return this.get_svg(s,c.bottom_mid,n,c.left_mid,a)}}}};const ds=new class extends rs{constructor(){super()}get_intention(e,t){if("file-tree"!==e.env.layout_type)return{intention:[]};const n=e.env.upstream,r=n?.env.layout_type;return e.is_layout_root||!n?this.root(t,e):"right"===r?this.right(t,e,n):"left"===r?this.left(t,e,n):"up"===r?this.up(t,e,n):"down"===r?this.down(t,e,n):"time-right"===r?this.time_right(t,e,n):"time-down"===r?this.time_down(t,e,n):"file-tree"===r?this.file_tree(t,e,n):{intention:[]}}root(e,t){const n=[],{rect:r}=this.get_env_info(t);n.push({type:"child",node:t,area:r});const o=this.get_hit_area(n,e);return{intention:n,placeholder:this.get_placeholder(o)}}right(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const s=i?(o.y-(i.y+i.height))/2:this.edge_size;if(s>0){const e={x:o.x,y:o.y-s,width:o.width,height:s};r.push({type:"prev",node:t,area:e})}const a=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(a)}}left(e,t,n){return this.right(e,t,n)}up(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);r.push({type:"child",node:t,area:o});const a=i?(o.x-i.x-i.width)/2:this.edge_size;if(a>0){const e={x:o.x-a,y:o.y,width:a,height:o.height};r.push({type:"prev",node:t,area:e})}const l=s?(s.x-o.x-o.width)/2:this.edge_size;if(l>0){const e={x:o.x+o.width,y:o.y,width:l,height:o.height};r.push({type:"next",node:t,area:e})}const c=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(c)}}down(e,t,n){return this.up(e,t,n)}time_right(e,t,n){const r=[],{rect:o,prect:i,nrect:s}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:(o.x+i.x+i.width)/2,y:o.y,width:(o.x-i.x-i.width)/2,height:o.height};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:(o.x+e.x+e.width)/2,y:o.y,width:(o.x-e.x-e.width)/2,height:o.height};r.push({type:"prev",node:t,area:i})}const a=s?(s.x-o.x-o.width)/2:this.edge_size;if(a>0){const e={x:o.x+o.width,y:o.y,width:a,height:o.height};r.push({type:"next",node:t,area:e})}const l=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(l)}}time_down(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}file_tree(e,t,n){const r=[],{rect:o,prect:i}=this.get_env_info(t);if(r.push({type:"child",node:t,area:o}),i){const e={x:o.x,y:(o.y+i.y+i.height)/2,width:o.width,height:(o.y-i.y-i.height)/2};r.push({type:"prev",node:t,area:e})}else if(0===t.env.index){const e=n.map2d.rect,i={x:o.x,y:(o.y+e.y+e.height)/2,width:o.width,height:(o.y-e.y-e.height)/2};r.push({type:"prev",node:t,area:i})}const s=this.get_hit_area(r,e);return{intention:r,placeholder:this.get_placeholder(s)}}get_placeholder(e){if(!e)return;const{area:t,node:n,type:r}=e,o="child"===r?n:n.env.upstream;if(!o)return;const{layout_type:i}=o.env,{rect:s,node_line_type:a}=o.map2d,{node_gap_x:l,node_gap_y:c}=n.map2d,d=Gi.IMath.RectPosition;if("child"===r){const e=n.env.child_last;if(e){const t=e.map2d.rect,n=this.get_pnode(t.x+t.width/2+this.edge_size,t.y+t.height+this.edge_size,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}{const e=this.get_pnode(s.x+s.width/2+l/2,s.y+s.height+c/2,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,e,d.left_mid,a)}}if("prev"===r){if("right"===i){const e=this.get_pnode(t.x,t.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_top),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.left_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.top_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_top),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}else if("next"===r){if("right"===i){const e=this.get_pnode(t.x,t.y+t.height,d.left_mid,this.hnode_size);return this.get_svg(s,d.right_mid,e,d.left_mid,a)}if("left"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.right_mid,this.hnode_size);return this.get_svg(s,d.left_mid,n,d.right_mid,a)}if("up"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.bottom_mid,this.vnode_size);return this.get_svg(s,d.top_mid,n,d.bottom_mid,a)}if("down"===i){const e=Gi.MathRect.get_rect_point(t,d.right_bottom),n=this.get_pnode(e.x,e.y,d.top_mid,this.vnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("time-right"===i){const e=Gi.MathRect.get_rect_point(t,d.right_mid),n=this.get_pnode(e.x,e.y,d.left_mid,this.vnode_size);return this.get_svg(s,d.right_mid,n,d.left_mid,a)}if("time-down"===i){const e=Gi.MathRect.get_rect_point(t,d.bottom_mid),n=this.get_pnode(e.x,e.y,d.top_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.top_mid,a)}if("file-tree"===i){const e=Gi.MathRect.get_rect_point(t,d.left_bottom),n=this.get_pnode(e.x,e.y,d.left_mid,this.hnode_size);return this.get_svg(s,d.bottom_mid,n,d.left_mid,a)}}}};class us extends xi{_map;_intention_list=Pt([]);_placeholder_linker=Vt("");_placeholder_path=Vt("");_node_rect={x:0,y:0,width:0,height:0};_cursor_pos=Vt(null);_drag_count=Vt(0);_preview_node;constructor(e){super(e.root),this._map=e}get map(){return this._map}get intention_list(){return this._intention_list}get placeholder_linker(){return this._placeholder_linker.value}set placeholder_linker(e){this._placeholder_linker.value=e}get placeholder_path(){return this._placeholder_path.value}set placeholder_path(e){this._placeholder_path.value=e}get node_rect(){return this._node_rect}set node_rect(e){this._node_rect=e}get cursor_pos(){return this._cursor_pos.value}set cursor_pos(e){this._cursor_pos.value=e}get drag_count(){return this._drag_count.value}set drag_count(e){this._drag_count.value=e}get preview_node(){return this._preview_node}set preview_node(e){this._preview_node=e}get active_intention(){if(!this._cursor_pos.value)return;const e=this._cursor_pos.value;return this._intention_list.find(t=>Gi.MathRect.is_point_in_rect(e,t.area))}clear_drag_state(){this._cursor_pos.value=null,this._drag_count.value=0,this._intention_list.length=0,this._preview_node=void 0,this.placeholder_path="",this.placeholder_linker=""}update_intention(e,t=new Set){this._cursor_pos.value=e;const n=this.get_nearest_node(e,t);if(this._intention_list.length=0,!n)return!1;const{intention:r,placeholder:o}=this.get_intention(n,e);this._intention_list.push(...r),o&&(this.placeholder_linker=o.linker,this.placeholder_path=o.rect)}get_nearest_node(e,t=new Set){const n=this.map.get_view_rect(),r=this.map.grider.get_intersection_nodes(n,!1);let o,i=1/0;for(let n of r){if(t.has(n))continue;const r=Gi.MathRect.point_distance_with_rect(e,n.map2d.rect);r<i&&(i=r,o=n)}return o}get_intention(e,t){const n=e.env.layout_type;return n?"right"===n?os.get_intention(e,t):"left"===n?is.get_intention(e,t):"up"===n?ss.get_intention(e,t):"down"===n?as.get_intention(e,t):"file-tree"===n?ds.get_intention(e,t):"time-right"===n?ls.get_intention(e,t):"time-down"===n?cs.get_intention(e,t):{intention:[],placeholder:void 0}:{intention:[],placeholder:void 0}}make_rect_path(e){return`M${e.x},${e.y}h${e.width}v${e.height}h${-e.width}Z`}}class hs extends xi{_interaction;_flow=!1;scope_down=null;fig_matrix_origin;pos_down_real;m;count=0;rate=3;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-drag"}reset_status(){this._flow=!1,this.scope_down=null}get map_interaction(){return this.map.map_interaction}down(e,t){this.scope_down=t;const{selector:n}=t;"fig"===n.type&&this.map_interaction.check_mouse_key(e,"right")&&!e.ctrlKey&&(e.stopPropagation(),e.preventDefault(),this.pos_down_real=this.map.view_point_to_real(t.pos),this._flow=!0,this.fig_matrix_origin={...this.map.matrix2d})}move(e){if(!this._flow||!this.scope_down||e.ctrlKey||!this._interaction.check_mouse_key(e,"right"))return;if(this.count++,this.count%this.rate===0)return;this.count=1,e.stopPropagation(),e.preventDefault();const{map_sum_scale:t}=this.scope_down,n=e.clientX,r=e.clientY,o=(n-this.scope_down.pos.x)/t.sx,i=(r-this.scope_down.pos.y)/t.sy;this.m=Zi.multiply(this.fig_matrix_origin,Zi.get_matrix_translate(o,i)),this.map.reset_matrix(this.m)}up(e){if(!this._flow||!this.m)return this.reset_status();e.stopPropagation(),e.preventDefault(),this.reset_status(),this.map.check_show()}cancel(e){this._flow&&(this.reset_status(),this.map.check_show())}leave(e){this._flow&&(this.reset_status(),this.map.check_show())}wheel(e){}dblclick(e){}contextmenu(e){}}class ps extends xi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-scale"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}cancel(e){}leave(){}wheel(e){if(!e.ctrlKey)return;e.stopPropagation(),e.preventDefault();const{map_scale_step:t}=this.config.data,n=e.deltaY,r=-Math.sign(n),o={x:e.clientX,y:e.clientY},i=r*t;this.map.scale_by_point(o,i,i),this.map.check_show_throttle()}dblclick(e){}contextmenu(e){}}class fs extends xi{_interaction;_flow=!1;count=0;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:fig-wheel"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}cancel(e){}leave(){}wheel(e){e.stopPropagation(),e.preventDefault(),this.count++;const t=-Math.sign(e.deltaY)*this.config.data.scroll_distance;if(!e.ctrlKey){if(e.shiftKey){const e=Zi.multiply(this.map.matrix2d,Zi.get_matrix_translate(t,0));this.map.reset_matrix(e)}else{const e=Zi.multiply(this.map.matrix2d,Zi.get_matrix_translate(0,t));this.map.reset_matrix(e)}this.map.check_show_throttle()}}dblclick(e){}contextmenu(e){}}class ms extends xi{_interaction;down_point;view_cubes=[];flow=!1;count=0;rate=4;constructor(e){super(e.root),this._interaction=e}get map(){return this._interaction.map}get name(){return"pointer:line-delete"}get map_interaction(){return this.map.map_interaction}reset(){this.flow=!1,this.map.status.update_placeholder_line_delete(""),this.view_cubes=[]}down(e,t){const{selector:n,pos:r,view_cubes:o}=t;this.stats.is_read_mode||"fig"===n.type&&this.map_interaction.check_mouse_key(e,"right")&&e.ctrlKey&&(e.stopPropagation(),e.preventDefault(),this.flow=!0,this.down_point=this.map.view_point_to_real(r),this.view_cubes=o)}move(e){if(!this.flow)return;e.stopPropagation(),e.preventDefault(),this.count++;const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t),r=ju.line(this.down_point,n);if(this.map.status.update_placeholder_line_delete(r),this.count%this.rate!==0)return;this.count=1;const o={from:this.down_point,to:n};this.map.clear_line_deleted();for(let e of this.view_cubes)if(e instanceof Qc){let t=e.map2d.shape_sample[0];for(let n of e.map2d.shape_sample.slice(1)){const r={from:t,to:n};if(Gi.MathLine.check_intersection(r,o)){this.map.set_line_deleted(e,!0);break}t=n}}else if(e instanceof Bu){let t=e.map2d.sample[0];for(let n of e.map2d.sample.slice(1)){const r={from:t,to:n};if(Gi.MathLine.check_intersection(r,o)){this.map.set_line_deleted(e,!0);break}t=n}}}up(e){if(!this.flow)return;e.stopPropagation(),e.preventDefault();const{courier:t,history:n}=this.root,r=t.get_recorder(),o=this.map.id,i=[],s=[],a=this.map.line_deleted;for(let e of a)e instanceof Qc?i.push(e.id):e instanceof Bu&&s.push(e.id);const l=es.node_remove(o,i),c=es.linker_remove(o,s);r.tell(this.map,l,c),n.record(r),this.reset()}cancel(e){this.reset()}leave(){}wheel(e){}dblclick(e){}contextmenu(e){}}class _s extends xi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-add"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){this.flow&&(this.flow=!1)}cancel(e){this.flow}wheel(e){}leave(){}dblclick(e,t){const{selector:n,pos:r}=t;if("fig"!==n.type)return;e.stopPropagation(),e.preventDefault();const{courier:o,history:i}=this,s=Qc.get_default_node_pos(r,this.map),a=[Zu.get_default(s)],l=es.node_add(this.map.id,a),c=o.get_recorder();c.tell(this.map,l),i.record(c)}contextmenu(e){}}class gs extends xi{_interaction;_flow=!1;_rect;point_down;count=0;rate=5;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-box-select"}get map_interaction(){return this.map.map_interaction}reset(){this.flow=!1,this.map.status.update_placeholder_box_selector("")}down(e,t){const{pos:n,selector:r}=t,{type:o,res:i}=r;"fig"===o&&this.map_interaction.check_mouse_key(e,"left")&&(e.preventDefault(),this.flow=!0,this.point_down=this.map.view_point_to_real(n))}move(e){if(!this.flow)return;this.count++,e.preventDefault();const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t),r=Qi.get_rect_area(this.point_down,n);if(this.map.status.update_placeholder_box_selector(r),this.count%this.rate!==0)return;this.count=1;const o={x:Math.min(this.point_down.x,n.x),y:Math.min(this.point_down.y,n.y),width:Math.abs(n.x-this.point_down.x),height:Math.abs(n.y-this.point_down.y)};this._rect=o;const i=this.map.get_nodes_intersection(o);this.map.clear_node_selected();for(let e of i)this.map.set_node_selected(e,!0)}up(e){this.flow&&(e.stopPropagation(),e.preventDefault(),this.reset())}cancel(e){this.flow&&this.reset()}wheel(e){}leave(){}dblclick(e,t){}contextmenu(e){}check_intersection(e,t){const n=e.x+e.width/2,r=e.y+e.height/2,o=t.x+t.width/2,i=t.y+t.height/2,s=Math.abs(n-o),a=Math.abs(r-i);return s<=(e.width+t.width)/2&&a<=(e.height+t.height)/2}}class bs extends xi{_interaction;flow=!1;constructor(e){super(e.root),this._interaction=e}get map(){return this._interaction.map}get name(){return"pointer:node-click-select"}get map_interaction(){return this.map.map_interaction}down(e,t){const{selector:n,pos:r}=t,{type:o,res:i}=n;if("node"!==o||n.res.editable)return;if(e.stopPropagation(),e.preventDefault(),this._interaction.check_mouse_key(e,"right"))return;e.ctrlKey||this.map.clear_node_selected();const s=this.map.status.is_node_selected(i);i.pcube.set_node_selected(i,!s)}move(e){this.flow}up(e){this.flow}leave(e){}cancel(e){}wheel(e){}dblclick(e){}contextmenu(e){}}class xs extends xi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-edit-exit"}get map_interaction(){return this.map.map_interaction}down(e,t){const{selector:n}=t,{type:r,res:o}=n;"fig"!==r&&"empty"!==r||(e.stopPropagation(),e.preventDefault(),this.cubes.clear_all_map_selected(),this.map.clear_node_editing())}move(e){}up(e){}leave(){}cancel(e){}wheel(e){}dblclick(e,t){}contextmenu(e){}}class vs extends xi{_interaction;_flow=!1;constructor(e){super(e.root),this._interaction=e}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-edit"}get map_interaction(){return this.map.map_interaction}down(e,t){}move(e){}up(e){}leave(){}cancel(e){}wheel(e){}dblclick(e,t){if(this.stats.mode===w.NoteMode.read)return;const{selector:n,pos:r}=t,o=this.cursor;"node"===n.type&&(e.stopPropagation(),e.preventDefault(),n.res.editable=!0,mn(()=>{o.set_cursor_by_coor(r.x,r.y)}))}contextmenu(e){}}class ys extends xi{_interaction;_flow=!1;down_node;selected_nodes=new Set;recorver_selected=!1;has_down=!1;down_pos={x:0,y:0};constructor(e){super(e.root),this._interaction=e}get min_distance(){return 5}get flow(){return this._flow}set flow(e){this._flow=e}get map(){return this._interaction.map}get name(){return"pointer:node-line"}get map_interaction(){return this.map.map_interaction}reset_status(){this.flow=!1,this.has_down=!1,this.selected_nodes.clear(),this.map.status.update_placeholder_linkers([]),this.recorver_selected=!1}down(e,t){const{selector:n,pos:r,selected_nodes:o}=t;if("node"===n.type&&this._interaction.check_mouse_key(e,"right"))if(this.reset_status(),this.has_down=!0,e.preventDefault(),e.stopPropagation(),this.down_pos=r,this.down_node=n.res,o.has(this.down_node))for(let e of o)this.selected_nodes.add(e);else this.selected_nodes.add(this.down_node)}move(e){if(!this.has_down)return;if(!this._interaction.check_mouse_key(e,"right")||!this.has_down)return;if(Math.sqrt((e.clientX-this.down_pos.x)**2+(e.clientY-this.down_pos.y)**2)<this.min_distance)return;this.flow=!0,e.stopPropagation(),e.preventDefault();const t=this._interaction.get_map_selector(e),{res:n,type:r}=t,o=this.map.status;if(o.update_placeholder_linkers([]),!this.recorver_selected){this.recorver_selected=!0,this.map.clear_node_selected();for(let e of this.selected_nodes)this.map.set_node_selected(e,!0)}if("node"===r)for(let e of this.selected_nodes){const{from:t,to:r}=Qi.find_closest_points(e.map2d.shape_sample,n.map2d.shape_sample),i=e.map2d.node_line_type;o.add_placeholder_linker({path:ju.get_line(t,r,i),stroke:e.map2d.node_fill,width:e.map2d.node_line_width,anchor_start:e.map2d.node_line_anchor_out,anchor_end:p.Anchor.arrow})}else{const t={x:e.clientX,y:e.clientY},n=this.map.view_point_to_real(t);for(let e of this.selected_nodes){const t=Qi.find_closest_point(e.map2d.shape_sample,n),r=e.map2d.node_line_type;o.add_placeholder_linker({path:ju.get_line(t,n,r),stroke:e.map2d.node_fill,width:e.map2d.node_line_width,anchor_start:e.map2d.node_line_anchor_out,anchor_end:p.Anchor.arrow})}}}async up(e){if(!this.flow)return this.reset_status();e.preventDefault(),e.stopPropagation(),await od.sleep(1);const{courier:t,history:n}=this,r=this._interaction.get_map_selector(e),{res:o,type:i}=r;if("node"===i){if(o===this.down_node)return;const e=t.get_recorder();for(let t of this.selected_nodes){const n=Qi.get_linker_id(t.id,o.id);if(this.map.get_linker(n))vi.tips?.tip_warning("已存在连接线");else{const n=Qi.create_linker_info(this.map,t.id,o.id),r=es.linker_add(this.map.id,[n]);e.tell(this.map,r)}}n.record(e)}else if("fig"===i){const{courier:t,history:n}=this,r=t.get_recorder(),o=Qc.get_default_node_pos({x:e.clientX,y:e.clientY},this.map),i=Zu.get_default(o);this.selected_nodes.size>1&&(i.attrs.root=!0);const s=es.node_add(this.map.id,[i]);r.tell(this.map,s);for(let e of this.selected_nodes){const t=this.map.get_linker_id(e.id,i.id);if(this.map.get_linker(t)){vi.tips?.tip_warning("已存在连接线");continue}const n=Qi.create_linker_info(this.map,e.id,i.id),o=es.linker_add(this.map.id,[n]);r.tell(this.map,o)}n.record(r)}this.reset_status()}leave(){}cancel(e){this.reset_status()}wheel(e){}dblclick(e,t){}contextmenu(e){e.preventDefault()}}class ws extends xi{_map;_node_intention;_op_pointer=new Map;_op_keyboard=new Map;constructor(e){super(e.root),this._map=e,this._node_intention=new us(e),this.add_operation_pointer(new hs(this)),this.add_operation_pointer(new ps(this)),this.add_operation_pointer(new vs(this)),this.add_operation_pointer(new xs(this)),this.add_operation_pointer(new _s(this)),this.add_operation_pointer(new ys(this)),this.add_operation_pointer(new ns(this)),this.add_operation_pointer(new gs(this)),this.add_operation_pointer(new ms(this)),this.add_operation_pointer(new bs(this)),this.map instanceof Ts&&this.add_operation_pointer(new fs(this))}get node_intention(){return this._node_intention}get flowing(){return this.interactions_pointer.some(e=>e.flow)}get interactions_pointer(){return Array.from(this._op_pointer.values())}get interactions_keyboard(){return Array.from(this._op_keyboard.values())}get map(){return this._map}add_operation_pointer(e){this._op_pointer.set(e.name,e)}add_operation_keyboard(e){this._op_keyboard.set(e.name,e)}register(e){e.addEventListener("pointerdown",this.pointerdown.bind(this)),e.addEventListener("pointermove",this.pointermove.bind(this)),e.addEventListener("pointerup",this.pointerup.bind(this)),e.addEventListener("pointercancel",this.pointercancel.bind(this)),e.addEventListener("pointerleave",this.pointerleave.bind(this)),e.addEventListener("wheel",this.wheel.bind(this)),e.addEventListener("dblclick",this.dblclick.bind(this)),e.addEventListener("contextmenu",this.contextmenu.bind(this))}check_mouse_key(e,t){return od.check_mouse_key(e,t)}get_map_selector(e){let t=e.target;for(;t&&t!==document.body;){const e=t.dataset.type,n=t.id;if(n&&e){if(e===S.Cubes.postil)return{type:"empty",res:void 0};if(e===S.Cubes.node){const e=this.map.get_node(n);if(e)return{type:"node",res:e}}else if(e===S.Cubes.linker){const e=this.map.get_linker(n);if(e)return{type:"linker",res:e}}else if(e===S.Cubes.map||e===S.Cubes.submap)return{type:"fig",res:this.map};t=t.parentElement}else t=t.parentElement}return{type:"empty",res:void 0}}pointerdown(e){const t={selector:this.get_map_selector(e),pos:{x:e.clientX,y:e.clientY},selected_nodes:this.map.nodes_selected,view_cubes:this.map.get_view_cube(!1),map_sum_scale:this.map.get_upstream_sum_scale()},{selector:n}=t,{res:r,type:o}=n;if("node"===o&&this.root.isdev){console.log("------------------------------------节点信息");const{map2d:e,env:t}=r;console.log("id",r.id),console.log("matrix:",{...e.matrix2d}),console.log("pos_tree:",e.pos_tree),console.log("rect:",e.rect),console.log("size_tree:",e.size_tree),console.log("layout_type:",t.layout_type),console.log("💦",r)}for(let n of this.interactions_pointer)n.down(e,t);"fig"===t.selector.type&&this.event.emit_fig_click(e)}pointermove(e){for(let t of this.interactions_pointer)t.move(e)}pointerup(e){for(let t of this.interactions_pointer)t.up(e)}pointercancel(e){for(let t of this.interactions_pointer)t.cancel(e)}pointerleave(e){for(let t of this.interactions_pointer)t.leave(e)}dblclick(e){const t={selector:this.get_map_selector(e),pos:{x:e.clientX,y:e.clientY},selected_nodes:this.map.nodes_selected,view_cubes:this.map.get_view_cube(!1),map_sum_scale:this.map.get_upstream_sum_scale()};for(let n of this.interactions_pointer)n.dblclick(e,t)}wheel(e){for(let t of this.interactions_pointer)t.wheel(e)}contextmenu(e){for(let t of this.interactions_pointer)t.contextmenu(e)}}class ks extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-nav-select"}check_allow(e,t){const{key:n}=t;return!![C.Keys.down,C.Keys.left,C.Keys.right,C.Keys.up].includes(n)}keydown(e,t){const n=t.key;if(!this.check_allow(e,t))return;const r=[C.Keys.down,C.Keys.left,C.Keys.right,C.Keys.up],o=this.root,i=this.cubes.get_types_cube(S.Cubes.submap);if(o instanceof ih&&o.nodes_selected.size>0)r.includes(n)&&o.move_select(n);else for(let[e,t]of i)t.move_select(n)}keyup(e){}}class Ss extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-add-child"}check_allow(e,t){const{key:n}=t;return"tab"===n}keydown(e,t){if(!this.check_allow(e,t))return;e.preventDefault();const{courier:n,history:r}=this,o=n.get_recorder();if(this.root instanceof ih){const e=this.root.nodes_selected,t=new Set;for(let n of e){const e=n.map2d,r=n.node_last.map2d.rect,i=Zu.get_default({x:r.x,y:r.y+r.height+e.node_gap_y}),s=ts.append_child(n.id,[i]);o.tell(n,s),t.add(i.id)}this.root.clear_node_selected();for(let e of t)this.root.set_node_selected(e,!0)}const i=this.cubes.get_types_cube(S.Cubes.submap);for(let[e,t]of i){const e=t.get_nodes_selected(),n=new Set;for(let t of e){const e=t.map2d,r=t.node_last.map2d.rect,i=Zu.get_default({x:r.x,y:r.y+r.height+e.node_gap_y}),s=ts.append_child(t.id,[i]);o.tell(t,s),n.add(i.id)}t.clear_node_selected();for(let e of n)t.set_node_selected(e,!0)}r.record(o)}keyup(e){}}class Cs extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-add-siblings"}check_allow(e,t){return"enter"===t.key}keydown(e,t){if(!this.check_allow(e,t))return;const{courier:n,history:r}=this,o=n.get_recorder();let i=!1;if(this.root instanceof ih){const t=this.root.nodes_selected,n=new Set;for(let r of t){const t=r.env.upstream;if(!t){i=!0;continue}let s=r.id;e.shiftKey&&(s=r.env.prev_node?.id||null);const a=t.map2d,l=r.map2d.rect,c=Zu.get_default({x:l.x,y:l.y+l.height+a.node_gap_y}),d=ts.append_child(t.id,[c],s);o.tell(t,d),n.add(c.id)}this.root.clear_node_selected();for(let e of n)this.root.set_node_selected(e,!0)}const s=this.cubes.get_types_cube(S.Cubes.submap);for(let[t,n]of s){const t=n.get_nodes_selected(),r=new Set;for(let n of t){const t=n.env.upstream;if(!t){i=!0;continue}let s=n.id;e.shiftKey&&(s=n.env.prev_node?.id||null);const a=t.map2d,l=n.map2d.rect,c=Zu.get_default({x:l.x,y:l.y+l.height+a.node_gap_y}),d=ts.append_child(t.id,[c],s);o.tell(t,d),r.add(c.id)}n.clear_node_selected();for(let e of r)n.set_node_selected(e,!0)}i&&vi.tips?.tip_warning("无法在没有布局上游的节点添加同级"),r.record(o)}keyup(e){}}class Ms extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-delete"}check_allow(e,t){const n="delete"===t.key||"backspace"===t.key,r=0===this.root.scopes.scope_count_normal,o=0===t.scopes;return n&&r&&o}keydown(e,t){if(!this.check_allow(e,t))return;const{courier:n,history:r}=this,o=n.get_recorder();if(this.root instanceof ih){const e=[...this.root.nodes_selected].map(e=>e.id);o.tell(this.root,es.node_remove(this.root.id,e))}const i=this.cubes.get_types_cube(S.Cubes.submap);for(let[e,t]of i){const e=[...t.nodes_selected].map(e=>e.id);o.tell(t,es.node_remove(t.id,e))}r.record(o)}keyup(e){}}class zs extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"keyboard:node-edit"}check_allow(e,t){return" "===t.key}keydown(e,t){if(!this.check_allow(e,t))return;const n=this.root;let r;if(e.preventDefault(),n instanceof ih){const e=n.nodes_selected;for(let t of e)t.editable=!0,r=t}const o=n.cubes.get_types_cube(S.Cubes.submap);for(let[e,t]of o){const e=t.get_nodes_selected();for(let t of e)t.editable=!0,r=t}if(r){const e=this.courier.get_recorder(),t=Ni.in_tail(r.id);e.tell(r,t),this.history.record(e)}}keyup(e){}}class Ns extends xi{_interaction;constructor(e){super(e.root),this._interaction=e}get name(){return"note:scope-delete"}check_allow(e,t){const{key:n}=t;return this.root.scopes.scope_count_normal>0&&("backspace"===n||"delete"===n)}keydown(e,t){if(e.preventDefault(),e.stopImmediatePropagation(),!this.check_allow(e,t))return;e.preventDefault();const n=this.clipboard.delete_scope();n&&this.history.record(n)}keyup(e){}}class As extends xi{_keydown_handler=this.keydown.bind(this);_keyup_handler=this.keyup.bind(this);_useable_interaction_keyboard=!0;_map_interaction_keyboard=new Map;_note_interaction_keyboard=new Map;constructor(e){super(e),this.add_map_interaction_keyboard(new ks(this)),this.add_map_interaction_keyboard(new Ss(this)),this.add_map_interaction_keyboard(new Cs(this)),this.add_map_interaction_keyboard(new Ms(this)),this.add_map_interaction_keyboard(new zs(this)),this.add_note_interaction_keyboard(new Ns(this)),this.register()}get useable_keyboard(){return this._useable_interaction_keyboard}get map_interactions_keyboard(){return Array.from(this._map_interaction_keyboard.values())}get note_interactions_keyboard(){return Array.from(this._note_interaction_keyboard.values())}add_note_interaction_keyboard(e){this._note_interaction_keyboard.set(e.name,e)}add_map_interaction_keyboard(e){this._map_interaction_keyboard.set(e.name,e)}set_useable_keyboard(e){this._useable_interaction_keyboard=e}register(){window.removeEventListener("keydown",this._keydown_handler),window.removeEventListener("keyup",this._keyup_handler),window.addEventListener("keydown",this._keydown_handler),window.addEventListener("keyup",this._keyup_handler)}keydown(e){if(!this.useable_keyboard)return;const t=document.activeElement,n={key:e.key.toLocaleLowerCase(),note_mode:this.stats.mode,scopes:this.root.scopes.scope_count_normal};for(let t of this.note_interactions_keyboard)t.check_allow(e,n)&&t.keydown(e,n);const r=t===document.body,o=this.stats.mode===w.NoteMode.edit;if(r&&o&&!this.hotkeys.validate_hotkeys(e,"uncursor"))for(let t of this.map_interactions_keyboard)t.keydown(e,n)}keyup(e){if(!this.useable_keyboard)return;const t=document.activeElement===document.body,n=this.stats.mode===w.NoteMode.edit;if(!(t&&n)||this.hotkeys.validate_hotkeys(e,"uncursor"))return;const r={key:e.key.toLocaleLowerCase(),note_mode:this.stats.mode,scopes:this.root.scopes.scope_count_normal};for(let t of this.map_interactions_keyboard)t.keyup(e,r)}}class Ts extends Pi{_dom;_children=[];_cubes=new Ei(this);_hotkeys=new Bi(this);_config=new $i(this);_history=new sd(this);_cursor=new Vi(this);_courier=new Ui(this);_clipboard=new Fi(this);_painter=new qi(this);_event=new Hi(this);_stats=new ji(this);_listener=new Oi(this);_float=new Yi(this);_interaction=new As(this);_scopes=new Ji(this);_isdev=!1;data;constructor(e){super();const t=structuredClone(e),n=this.update_data(Mi.versions,t);if(!n.data||!n.usable)throw Error(`CubeRoot setup data failed, data unusable after update${n}`);this.data=n.data,this._cubes.add_cube(this),this.set_cmd_handler(_.Names.cube_reset,this.on_reset.bind(this)),this.set_cmd_handler(_.Names.cube_reorder,this.on_cube_reorder.bind(this)),this.set_cmd_handler(_.Names.cube_insert_child,this.on_insert_cube.bind(this)),this.set_cmd_handler(_.Names.cube_delete_child,this.on_delete_cube.bind(this)),this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_cube_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ti.init_cmd_handler(this)}get children(){return[...this._children]}get scopes(){return this._scopes}get editable(){return!0}get interaction(){return this._interaction}get config(){return this._config}get hotkeys(){return this._hotkeys}get stats(){return this._stats}get cubes(){return this._cubes}get cursor(){return this._cursor}get listener(){return this._listener}get float(){return this._float}get courier(){return this._courier}get history(){return this._history}get clipboard(){return this._clipboard}get painter(){return this._painter}get event(){return this._event}get root(){return this}get isdev(){return this._isdev}get dom(){return document.getElementById(this.id)}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get pid(){}get index(){return 0}get css(){return{...this.data.css}}get attrs(){return structuredClone(this.data.attrs)}get info(){return this.data.info}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_last(){return this.children[this.children.length-1]}get id(){return this.data.id}get pcube(){}get type(){return this.data.type}get versions(){return structuredClone(this.data.versions)}get level(){return 0}get in_postil(){return!1}get host_postil(){return null}get next_cube_deep(){}get prev_cube_deep(){}get root_dom(){return this._dom}get is_empty(){const e=1===this.child_count,t=this.child_first.is_empty;return e&&t}get prev_cube(){}get next_cube(){}set_dev(e=!0){this._isdev=e,window.root=this}setup(){this.build_child(this.data)}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}is_contains_cube(e){return!!e&&e.root===this}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}find_cube(e){return this.cubes.find_cube(e)}filter(e){const t=[];for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_upstream_untill(){}delete_edge(e,t){const{courier:n}=this,r=new ld(n);if("backward"===t){const t=e.find_upstream_untill(this);if(t&&t.is_empty)return t.remove_self();const n=e.prev_cube_deep;if(n&&n.is_empty)return n.remove_self();const o=n?.next_cube;if(o&&n.type===o.type)return o.merge("left");if(n)return r.tell(n,Ni.in_tail(n.id))}else{const t=e.find_upstream_untill(this);if(t&&t.is_empty)return t.remove_self();const n=e.next_cube_deep;if(n&&n.is_empty)return n.remove_self();const o=n?.prev_cube;if(o&&n.type===o.type)return n.merge("left");if(n)return r.tell(n,Ni.in_tail(n.id))}}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}get_sdk_version(){return Mi.get_sdk_meta()}on_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=this.export().info,i=od.build_cubes(n,this);return this.splice(0,this.child_count,...i),r.add_recover(zi.reset(this.id,o)),r}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ld(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(zi.reorder(this.id,s.id,c)),a}on_insert_cube(e){const{courier:t}=this,n=t.get_recorder();n.add_cmd(e);const{pos:r,data:o}=e;if(0===o.length)return n;const i=od.pick(o,!0),s=[],{head:a,body:l,tail:c}=i;if(a.length+l.length+c.length>0){const e=[];if(a.length>0&&e.push(hu.get_default(i.head)),l.length>0&&e.push(...i.body),c.length>0&&e.push(hu.get_default(i.tail)),e.length>0){const t=xu.get_default(e);s.push(new xu(t,this))}}for(let e of i.roots)s.push(new xu(e,this));let d=this.get_valid_index(r);this.splice(d,0,...s);const u=s[s.length-1];return u&&n.tell(u,Ni.in_tail(u.id)),n.add_recover(zi.delete_child(this.id,"backward",[d,d+s.length])),n}on_delete_cube(e){const{courier:t,pcube:n,pid:r}=this,{dir:o,range:i}=e,[s,a]=i;if(!this.is_valid_range(i))return;const l=t.get_recorder();l.add_cmd(e);const c=this.children[s-1],d=this.children[a],u=a-s;if(s!==a){if(s<=0&&a>=this.child_count){const e=this.child_first;return this.child_count>1&&l.tell(this,zi.delete_child(this.id,o,[1,this.child_count])),e.is_empty||l.tell(e,zi.reset(e.id,[])),l}{let e=this.splice(s,u);c&&"backward"===o||!d?l.tell(c,Ni.in_tail(c.id)):(d&&"forward"===o||!c)&&l.tell(d,Ni.in_head(d.id));const t=e.data;l.add_recover(zi.insert_child(this.id,t,s))}return l}}on_cube_set_selection_css(e){const{cursor:t,courier:n,pcube:r,pid:o}=this,{css:i,start_id:s,end_id:a,offset_end:l,offset_start:c}=e,d=new ld(n);if(s!==a||l!==c){if(a&&!s){const e=this.find_cube(a),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,zi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(t,zi.set_selection_css(t.id,i,null,a,"head",l)),d}if(s&&!a){const e=this.find_cube(s),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,zi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(t,zi.set_selection_css(t.id,i,s,null,c,"tail")),d}if("tail"===l&&"head"===c){for(let e of this.children)d.tell(e,zi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d}if(a&&s){const e=this.find_cube(s),t=this.find_cube(a),n=e?.find_upstream_untill(this),r=t?.find_upstream_untill(this);if(!n||!r)return;const o=this.children.slice(n.index+1,r.index);for(let e of o)d.tell(e,zi.set_selection_css(e.id,i,e.id,e.id,"head","tail"));return d.tell(n,zi.set_selection_css(n.id,i,s,null,c,"tail")),d.tell(r,zi.set_selection_css(r.id,i,null,a,"head",l)),d}}}on_cube_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r,pcube:o}=this,i=new ld(t),{data:s,end_id:a,start_id:l,offset_end:c,offset_start:d}=e,u=this.find_cube(l),h=this.find_cube(a),p=u?.find_upstream_untill(this),f=h?.find_upstream_untill(this);if(!p||!f)return i;if(h!==u||d!==c)if(p&&p===f)i.tell(p,zi.delete(p.id,"backward",l,a,d,c)),i.tell(p,zi.insert(p.id,s,l,a,d,c));else{i.tell(f,zi.delete(f.id,"backward",null,a,"head",c)),i.tell(this,zi.delete_child(this.id,"backward",[p.index+1,f.index])),i.tell(this,zi.insert_child(this.id,e.data,p.index+1)),i.tell(p,zi.delete(p.id,"backward",l,null,d,"tail"));let t=e.data[e.data.length-1];if(t){const e=this.find_child_cube(t.id);e&&i.tell(e,Ni.in_tail(t.id))}}else i.tell(h,zi.insert(a,s,l,a,d,c));return i}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ld(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[0,t.index])),c.tell(t,zi.delete(t.id,r,o,i,"head",s)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[t.index+1,this.child_count])),c.tell(t,zi.delete(t.id,r,o,i,a,s)),c}if("head"===a&&"tail"===s)return c.tell(this,zi.reset(this.id,[])),c;if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!(e instanceof Qd&&t instanceof Qd))return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,zi.delete(n.id,r,o,i,a,s,!0));else{c.tell(l,zi.delete(l.id,r,null,i,"head",s)),c.tell(this,zi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,zi.delete(n.id,r,o,null,a,"tail",!0));let t=0;if("number"==typeof a&&(t=a),c.tell(n,zi.merge(n.id,"right",o,t)),n.is_empty)c.tell(this,zi.delete_child(this.id,"backward",[n.index,n.index+1]));else if(e instanceof Qd){const n=e.pcube;c.tell(n,zi.merge(n.id,"right",o,t))}}return c}}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(Ht(this.attrs[e]))||null,null===t?delete this.attrs[e]:this.attrs[e]=t}return this.status.update_attrs(this.attrs),o.add_recover(zi.set_attr(this.id,i)),o}on_cursor_in_tail(e){const{courier:t}=this,n=this.child_last,r=new ld(t);if(n)return r.tell(n,Ni.in_tail(n.id)),r}is_valid_range(e,t=!1){const[n,r]=e;return!(n<0||r>this.child_count)&&(!t||n!==r)}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class Rs{__children=[];_cube;_data;_children=Ot(this.__children);_has_postil=Vt(!1);constructor(e){this._cube=e}get root(){return this.cube.root}get cube(){return this._cube}get info(){return this._data.info}get attrs(){return{...this._data.attrs}}get fold(){return this._data.attrs.fold}get css(){const e=this._data.attrs,t=this.cube.config,n=(e.indent||0)*t.data.line_indent+"px";return{...this._data.css,"margin-left":n}}get children(){return[...this._children]}get has_postil(){return this._has_postil.value}get child_first(){return this._children[0]}get child_last(){return this._children[this._children.length-1]}get child_count(){return this._children.length}init(){this._data=Pt(structuredClone(this.cube.data)),this.__children.splice(0,this.__children.length,...this.cube.children)}update_has_postil(e){this._has_postil.value=e}update_info(){this._data.info=this.cube.info}update_children(e){const t=e||this.cube.children;this._children.splice(0,this._children.length,...t)}update_attrs(e,t=!0){const n=e||this.cube.attrs;if(t){for(let e in this._data.attrs)e in n||delete this._data.attrs[e];this.cover(this._data.attrs,n)}else this.cover(this._data.attrs,n)}update_css(e,t=!0){const n=e||this.cube.css;if(t){for(let e in this._data.css)e in n||delete this._data.css[e];this.cover(this._data.css,n)}else this.cover(this._data.css,n)}cover(e,t){for(let n in t)"object"==typeof t[n]&&"object"==typeof e[n]?this.cover(e[n],t[n]):e[n]=t[n]}}class Ps extends Rs{_scopes=Ot(new Set);_postils=Ot(new Map);constructor(e){super(e)}get scopes(){return new Set(this._scopes)}get css(){const e=this.cube.config.css_vars;return{...super.css,...e}}get postils(){return new Map(this._postils)}get scopes_count(){return this._scopes.size}get scope_count_normal(){let e=0;for(let t of this._scopes)t.freeze||e++;return e}get scope_count_freeze(){return this.scopes_count-this.scope_count_normal}get scope_normal(){const e=new Set;for(let t of this._scopes)t.freeze||e.add(t);return e}get scope_freeze(){const e=new Set;for(let t of this._scopes)t.freeze&&e.add(t);return e}init(){this._data=Pt(structuredClone({...this.cube.data,info:[]})),this.update_children()}add_scope(e){this._scopes.add(qt(e))}remove_scope(e){this._scopes.delete(e)}clear_scopes(){this._scopes.clear()}add_postil(e){this._postils.set(e.id,e)}remove_postil(e){this._postils.delete(e.id)}reset_postils(e){this._postils.clear();for(let t of e)this.add_postil(t)}}const Os=En({__name:"cube-view",props:{cube:{}},setup:e=>(e,t)=>e.cube?(No(),Eo(cr(e.cube.component),{key:0,cube:qt(e.cube)},null,8,["cube"])):Vo("v-if",!0)});function Es(e,t){if(t.freeze)return;e.preventDefault(),e.stopPropagation();const{doc:n,stats:r}=t,{deltaY:o,currentTarget:i}=e,s=t.config.data.revert_scope;o>0&&!s?t.expand("down"):t.expand("up")}const Ls=En({__name:"note-scope",props:{selection:{}},setup(e){gi(()=>{if(!e.selection.pos)return;const t=Math.min(e.selection.pos.width,e.selection.pos.height);if(0===t)return;return{"font-size":Math.min(Math.max(Math.floor(t/3),18),64)+"px"}}),gi(()=>{if(!e.selection.pos)return;const t=Math.min(e.selection.pos.width,e.selection.pos.height);if(0===t)return;return{"font-size":Math.min(Math.max(Math.floor(t/3),18),64)+"px",display:e.selection.pos.width<30?"none":"unset"}});function t(){e.selection.freeze=!e.selection.freeze}function n(t){t.preventDefault(),t.stopPropagation(),e.selection.remove()}return(e,r)=>(No(),Oo("div",{class:me(["note-scope",{freeze:e.selection.freeze}]),style:de(e.selection.css),onWheel:r[0]||(r[0]=t=>Yt(Es)(t,e.selection)),onClick:t,onContextmenu:n},[(No(!0),Oo(wo,null,hr(e.selection.boxes,e=>{return No(),Oo(wo,{key:e.cube.id},[e.rect?(No(),Oo("div",{key:0,class:"scope-item",style:de((t=e.rect,{left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}))},ve(e.cube.meta.cubename),5)):Vo("v-if",!0)],64);var t}),128))],38))}});var Is=o(6960);const Ds=(0,Is.A)(Ls,[["__scopeId","data-v-42df742a"]]),Bs=["d","id","data-type","marker-start","marker-end"],js=En({__name:"cube-linker",props:{cube:{}},setup(e){const{status:t,pcube:n}=e.cube;return(r,o)=>(No(),Oo("path",{d:Yt(t).path,id:r.cube.id,class:me(["cube-linker",{"line-delete-selected":n.status.is_line_deleted(e.cube)}]),style:de(Yt(t).css),"data-type":r.cube.type,"marker-start":`url(#${Yt(t).anchor_left})`,"marker-end":`url(#${Yt(t).anchor_right})`},null,14,Bs))}}),Hs=(0,Is.A)(js,[["__scopeId","data-v-f5ddd6b8"]]),qs={key:0},Fs=["d"],$s=["d"],Gs=["d"],Vs=["transform"],Us={class:"drag-counter-text","dominant-baseline":"central","text-anchor":"middle"},Ks=En({__name:"op-node-drag",props:{cube:{}},setup(e){const t=e.cube.map_interaction.node_intention;return(e,n)=>Yt(t).drag_count>0?(No(),Oo("g",qs,[Vo(" 意图区域高亮 "),(No(!0),Oo(wo,null,hr(Yt(t).intention_list,(e,n)=>(No(),Oo("path",{key:n,d:Yt(t).make_rect_path(e.area),class:me(["intention-area",`intention-area-${e.type}`])},null,10,Fs))),128)),Vo(" 占位连线 "),Yt(t).placeholder_linker?(No(),Oo("path",{key:0,class:"placeholder-intention-linker",d:Yt(t).placeholder_linker},null,8,$s)):Vo("v-if",!0),Vo(" 占位节点 "),Yt(t).placeholder_path?(No(),Oo("path",{key:1,class:"placeholder-intention-node",d:Yt(t).placeholder_path},null,8,Gs)):Vo("v-if",!0),Vo(" 拖拽计数器:跟随鼠标,显示拖拽节点数量 "),Yt(t).cursor_pos?(No(),Oo("g",{key:2,transform:`translate(${Yt(t).cursor_pos.x+14}, ${Yt(t).cursor_pos.y-14})`,class:"drag-counter"},[n[0]||(n[0]=jo("circle",{r:"11",class:"drag-counter-circle"},null,-1)),jo("text",Us,ve(Yt(t).drag_count),1)],8,Vs)):Vo("v-if",!0)])):Vo("v-if",!0)}}),Ws=(0,Is.A)(Ks,[["__scopeId","data-v-33fe1bba"]]);let Ys;const Xs="undefined"!=typeof window&&window.trustedTypes;if(Xs)try{Ys=Xs.createPolicy("vue",{createHTML:e=>e})}catch(e){}const Js=Ys?e=>Ys.createHTML(e):e=>e,Zs="undefined"!=typeof document?document:null,Qs=Zs&&Zs.createElement("template"),ea={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o="svg"===t?Zs.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Zs.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Zs.createElement(e,{is:n}):Zs.createElement(e);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>Zs.createTextNode(e),createComment:e=>Zs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==i&&(o=o.nextSibling););else{Qs.innerHTML=Js("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);const o=Qs.content;if("svg"===r||"mathml"===r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ta=Symbol("_vtc");Boolean;const na=Symbol("_vod"),ra=Symbol("_vsh"),oa={name:"show",beforeMount(e,{value:t},{transition:n}){e[na]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ia(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ia(e,!0),r.enter(e)):r.leave(e,()=>{ia(e,!1)}):ia(e,t))},beforeUnmount(e,{value:t}){ia(e,t)}};function ia(e,t){e.style.display=t?e[na]:"none",e[ra]=!t}const sa=Symbol("");const aa=/(?:^|;)\s*display\s*:/;const la=/\s*!important$/;function ca(e,t,n){if(B(n))n.forEach(n=>ca(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=ua[t];if(n)return n;let r=Q(t);if("filter"!==r&&r in e)return ua[t]=r;r=ne(r);for(let n=0;n<da.length;n++){const o=da[n]+r;if(o in e)return ua[t]=o}return t}(e,t);la.test(n)?e.setProperty(te(r),n.replace(la,""),"important"):e[r]=n}}const da=["Webkit","Moz","ms"],ua={};const ha="http://www.w3.org/1999/xlink";function pa(e,t,n,r,o,i=ge(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(ha,t.slice(6,t.length)):e.setAttributeNS(ha,t,n):null==n||i&&!be(n)?e.removeAttribute(t):e.setAttribute(t,i?"":$(n)?String(n):n)}function fa(e,t,n,r,o){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Js(n):n));const i=e.tagName;if("value"===t&&"PROGRESS"!==i&&!i.includes("-")){const r="OPTION"===i?e.getAttribute("value")||"":e.value,o=null==n?"checkbox"===e.type?"on":"":String(n);return r===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let s=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=be(n):null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){0}s&&e.removeAttribute(o||t)}function ma(e,t,n,r){e.addEventListener(t,n,r)}const _a=Symbol("_vei");function ga(e,t,n,r,o=null){const i=e[_a]||(e[_a]={}),s=i[t];if(r&&s)s.value=r;else{const[n,a]=function(e){let t;if(ba.test(e)){let n;for(t={};n=e.match(ba);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):te(e.slice(2));return[n,t]}(t);if(r){const s=i[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();sn(function(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=ya(),n}(r,o);ma(e,n,s,a)}else s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,a),i[t]=void 0)}}const ba=/(?:Once|Passive|Capture)$/;let xa=0;const va=Promise.resolve(),ya=()=>xa||(va.then(()=>xa=0),xa=Date.now());const wa=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;"undefined"!=typeof HTMLElement&&HTMLElement;Symbol("_moveCb"),Symbol("_enterCb");const ka=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?e=>ie(t,e):t};function Sa(e){e.target.composing=!0}function Ca(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ma=Symbol("_assign"),za={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[Ma]=ka(o);const i=r||o.props&&"number"===o.props.type;ma(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),i&&(r=ae(r)),e[Ma](r)}),n&&ma(e,"change",()=>{e.value=e.value.trim()}),t||(ma(e,"compositionstart",Sa),ma(e,"compositionend",Ca),ma(e,"change",Ca))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},s){if(e[Ma]=ka(s),e.composing)return;const a=null==t?"":t;if((!i&&"number"!==e.type||/^0\d/.test(e.value)?e.value:ae(e.value))!==a){if(document.activeElement===e&&"range"!==e.type){if(r&&t===n)return;if(o&&e.value.trim()===a)return}e.value=a}}};const Na=E({patchProp:(e,t,n,r,o,i)=>{const s="svg"===o;"class"===t?function(e,t,n){const r=e[ta];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){const r=e.style,o=F(n);let i=!1;if(n&&!o){if(t)if(F(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ca(r,t,"")}else for(const e in t)null==n[e]&&ca(r,e,"");for(const e in n)"display"===e&&(i=!0),ca(r,e,n[e])}else if(o){if(t!==n){const e=r[sa];e&&(n+=";"+e),r.cssText=n,i=aa.test(n)}}else t&&e.removeAttribute("style");na in e&&(e[na]=i?r.display:"",e[ra]&&(r.display="none"))}(e,n,r):P(t)?O(t)||ga(e,t,0,r,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&wa(t)&&q(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(wa(t)&&F(n))return!1;return t in e}(e,t,r,s))?(fa(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||pa(e,t,r,s,0,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&F(r)?("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),pa(e,t,r,s)):fa(e,Q(t),r,0,t)}},ea);let Aa;function Ta(){return Aa||(Aa=Xr(Na))}const Ra=(...e)=>{const t=Ta().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=Oa(e);if(!r)return;const o=t._component;q(o)||o.render||o.template||(o.template=r.innerHTML),1===r.nodeType&&(r.textContent="");const i=n(r,!1,Pa(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t};function Pa(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Oa(e){if(F(e)){return document.querySelector(e)}return e}const Ea={class:"map-mini"},La={class:"map-mini-title"},Ia={class:"scale-btns"},Da=["onClick"],Ba=["width","height"],ja=En({__name:"map-mini",props:{canvas:{}},setup(e){const t=Vt(),n=[{label:"0.5×",value:.5},{label:"1×",value:1},{label:"2×",value:2},{label:"3×",value:3}];let r=!1,o=0,i=0;function s(e){0===e.button&&(r=!0,o=e.clientX,i=e.clientY,e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault())}function a(t){if(!r)return;const n=t.clientX-o,s=t.clientY-i;o=t.clientX,i=t.clientY,e.canvas.translate_delta(n,s),t.preventDefault()}function l(t){const n=t.currentTarget;n?.hasPointerCapture(t.pointerId)&&n.releasePointerCapture(t.pointerId),r=!1,e.canvas.map.check_show()}return Zn(()=>{const n=t.value;n&&(e.canvas.init(n),mn(()=>e.canvas.refresh()))}),io(()=>[e.canvas.ui_scale,e.canvas.ui_visible],async()=>{await mn(),e.canvas.refresh()}),(e,r)=>zn((No(),Oo("div",Ea,[jo("div",La,[r[0]||(r[0]=jo("span",{class:"map-mini-label"},"小地图",-1)),jo("div",Ia,[(No(),Oo(wo,null,hr(n,t=>jo("button",{key:t.value,class:me({active:e.canvas.ui_scale===t.value}),onClick:n=>e.canvas.ui_scale=t.value},ve(t.label),11,Da)),64))])]),jo("canvas",{ref_key:"fig",ref:t,width:e.canvas.ui_width,height:e.canvas.ui_height,style:de({width:e.canvas.ui_width+"px",height:e.canvas.ui_height+"px"}),onPointerdown:s,onPointermove:a,onPointerup:l,onPointercancel:l},null,44,Ba)],512)),[[oa,e.canvas.ui_visible]])}}),Ha=(0,Is.A)(ja,[["__scopeId","data-v-6a36cb14"]]),qa={class:"map-status"},Fa={class:"tool-item map-scale"},$a={class:"tool-item map-nodes"},Ga=En({__name:"map-status",props:{cube:{}},setup(e){const{status:t}=e.cube;gi(()=>e.cube.cubes.get_types_cube(S.Cubes.node));function n(t){const n=e.cube.dom_rect,r={x:n.x+n.width/2,y:n.y+n.height/2};e.cube.scale_by_point(r,t,t)}return(e,r)=>(No(),Oo(wo,null,[jo("div",qa,[jo("div",Fa,[jo("span",{class:"iconfont icon-icon_window_small_new-copy-copy",onClick:r[0]||(r[0]=e=>n(-.1))}),jo("span",null,ve((100*t.matrix2d.a).toFixed(0)+"%"),1),jo("span",{class:"iconfont icon-add",onClick:r[1]||(r[1]=e=>n(.1))})]),jo("div",$a,[jo("span",null,"节点 :"+ve(`${Yt(t).nodes_view_count}✦${Yt(t).nodes_count}`),1)]),jo("div",{class:me(["tool-item map-canvas",{active:e.cube.canvas.ui_visible}]),onClick:r[2]||(r[2]=t=>e.cube.canvas.toggle_visible())},[...r[3]||(r[3]=[jo("span",{class:"iconfont icon-map2"},"地图",-1)])],2)]),Ho(Ha,{canvas:qt(e.cube.canvas)},null,8,["canvas"])],64))}}),Va=(0,Is.A)(Ga,[["__scopeId","data-v-09a4750a"]]);class Ua{ps;resolve;reject;constructor(){this.ps=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Ka=new Ua,Wa=Pt({point:{x:0,y:0},css:{},cube:void 0,menu:void 0,stack_pos:[],stack_menus:[],stack_rect:[]}),Ya=Pt({open:!1,data:{},submit(){}});function Xa(e,t){Ya.open=!0,Ya.submit=t,Ya.data=e}function Ja(e,t){const{courier:n,history:r}=e,o=n.get_recorder(),i=e.pcube;if("A"===t)if(e instanceof xu){const t=xu.get_default();o.tell(i,zi.insert_child(i.id,[t],e.index+1))}else{const t=hu.get_default(),n=zi.insert_child(i.id,[t],e.index+1);o.tell(i,n)}else if("B"===t&&e)if(e instanceof xu){const t=xu.get_default();o.tell(i,zi.insert_child(i.id,[t],e.index))}else{const t=hu.get_default(),n=zi.insert_child(i.id,[t],e.index);o.tell(i,n)}r.record(o)}function Za(e,t=!1){const n=[{usable:!0,title:"向前插入行",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){Ja(e,"B")}},{usable:!0,title:"向后插入行",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){Ja(e,"A")}}],r={usable:!0,title:"全屏",icon:["iconfont","icon-square"],has_submenu:!1,mouseenter(e){},click(t){e.dom?.requestFullscreen()}};return t&&n.push(r),n}function Qa(e,t){return{...t,cube:qt(e)}}function el(e){const t=[...Za(e,!0),{usable:!0,title:"语言",icon:["iconfont","icon-square"],has_submenu:!0,mouseenter:t=>function(e){const t={cube:e,title:"选择语言",layout:"grid",is_cube_menu:!1,active:[e.active_tab?.lang||""],menus:e.langs.map(t=>({title:t,usable:!0,icon:["iconfont","icon-square"],mouseenter(e){},click(n){const{courier:r,history:o,id:i,active_tab:s}=e;if(!s)return;const a=r.get_recorder();a.tell(e,Uh.change_lang(i,s.id,t)),o.record(a)}}))};return t}(e),click(e){}},{usable:!0,title:"主题",icon:["iconfont","icon-square"],has_submenu:!0,mouseenter:t=>function(e){const t={cube:e,title:"选择主题",layout:"grid",is_cube_menu:!1,active:[e.active_tab?.theme||""],menus:e.themes.map(t=>({title:t,usable:!0,icon:["iconfont","icon-square"],mouseenter(e){},click(n){const{courier:r,history:o,id:i,active_tab:s}=e;if(!s)return;const a=r.get_recorder();a.tell(e,Uh.change_theme(i,s.id,t)),o.record(a)}}))};return t}(e),click(e){}},{usable:!0,title:"添加代码块",icon:["iconfont","icon-add"],click(t){Xa({文件名:""},t=>{const n=t["文件名"],r=n.lastIndexOf(".");let o="typescript";if(r>=0){const e=n.slice(r);o=Ng[e]||o}const{code_theme:i}=e.config.data,s=e.create_tab(o,n,i),a=e.courier.get_recorder();a.tell(e,Uh.add(e.id,s)),e.history.record(a)})},mouseenter(e){}},{usable:!0,title:"重命名",icon:["iconfont","icon-rename"],click(t){Xa({文件名:e.active_tab?.name||""},t=>{const n=e.active_tab;if(!n)return;const r=t["文件名"],o=e.courier.get_recorder();o.tell(e,Uh.rename(e.id,n.id,r)),e.history.record(o)})},mouseenter(e){}},{usable:!0,title:"复制代码",icon:["iconfont","icon-copy"],click(t){e.copy_code()},mouseenter(e){}},{usable:!0,title:"清空代码",icon:["iconfont","icon-eraser"],click(t){const n=e.active_tab;if(!n)return;const r=e.courier.get_recorder();r.tell(e,Uh.update(e.id,n.id,"")),e.history.record(r)},mouseenter(e){}},{usable:!0,title:"删除代码",icon:["iconfont","icon-close"],click(t){const n=e.active_tab;if(!n)return;const r=e.courier.get_recorder();r.tell(e,Uh.remove(e.id,n.id)),e.history.record(r)},mouseenter(e){}}];return{cube:e,title:e.meta.cubename,layout:"grid",is_cube_menu:!0,active:[],menus:t}}function tl(e){const t=e.get_active_cell(),n=[...Za(e),{usable:!0,title:e.title?"移除标题":"添加标题",icon:["iconfont","icon-a-Addheader2x"],has_submenu:!1,mouseenter(e){},click(t){const{history:n,courier:r,id:o}=e,i=r.get_recorder();if(e.title){const t=jw.remove_title(o);i.tell(e,t)}else{const t=Mu.get_default(),n=jw.add_title(o,t);i.tell(e,n)}n.record(i)}},{usable:e.selection_cells.length>0,title:"复制子表",icon:["iconfont","icon-grid"],has_submenu:!1,mouseenter(e){},click(t){const{clipboard:n}=e,r=vi.tips,o=e.copy_selection_table();if(!o)return vi.tips?.tip_error("复制子表失败");const i=e.get_selection_text();n.set_clipboard_cubedata(i,[o]),r?.tip_success("复制子表成功")}},{usable:e.selection_cells.length>0,title:"合并单元格",icon:["iconfont","icon-hebingdanyuange"],has_submenu:!1,mouseenter(e){},click(t){!function(e){const{courier:t,id:n,history:r}=e,o=vi.tips,i=t.get_recorder(),s=e.get_selection_area();if(!s)return o?.tip_info("无选中单元格");i.tell(e,jw.merge(n,s)),r.record(i)}(e)}},{usable:!!t,title:"扩大当前列宽",icon:["iconfont","icon-expand-horizontal-1--expand-resize-bigger-horizont"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){sl(e,1)}},{usable:!!t,title:"缩小当前列宽",icon:["iconfont","icon-shrink-horizontal-1--resize-shrink-bigger-horizont"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){sl(e,-1)}},{usable:!!t,title:"向左插入列",icon:["iconfont","icon-cc-arrow-left-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇠",mouseenter(e){},click(t){nl(e)}},{usable:!!t,title:"向右插入列",icon:["iconfont","icon-cc-arrow-right-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇢",mouseenter(e){},click(t){rl(e)}},{usable:!!t,title:"向上插入行",icon:["iconfont","icon-cc-arrow-up-square"],has_submenu:!1,shortcut:"ctrl + shift + ↑",mouseenter(e){},click(t){ol(e)}},{usable:!!t,title:"向下插入行",icon:["iconfont","icon-cc-arrow-down-square"],has_submenu:!1,shortcut:"ctrl + shift + ⇣",mouseenter(e){},click(t){il(e)}},{usable:!!t,title:"向左插入单元格",icon:["iconfont","icon-cc-arrow-left-square"],has_submenu:!1,shortcut:"ctrl + ⇠",mouseenter(e){},click(t){nl(e,!0)}},{usable:!!t,title:"向右插入单元格",icon:["iconfont","icon-cc-arrow-right-square"],has_submenu:!1,shortcut:"ctrl + ⇢",mouseenter(e){},click(t){rl(e,!0)}},{usable:!!t,title:"向上插入单元格",icon:["iconfont","icon-cc-arrow-up-square"],has_submenu:!1,shortcut:"ctrl + ↑",mouseenter(e){},click(t){ol(e,!0)}},{usable:!!t,title:"向下插入单元格",icon:["iconfont","icon-cc-arrow-down-square"],has_submenu:!1,shortcut:"ctrl + ⇣",mouseenter(e){},click(t){il(e,!0)}},{usable:!!t,title:"删除当前行",icon:["iconfont","icon-shanchuhang"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=vi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=e.check_orderly_row(l.row);if(!c)return s?.tip_info("当前行不整齐");{const t=n.get_recorder();t.tell(e,jw.remove_row(i,l.row)),o.record(t)}}(e)}},{usable:!!t,title:"删除当前列",icon:["iconfont","icon-shanchulie"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=vi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=e.check_orderly_col(l.col);if(!c)return s?.tip_info("当前列不整齐");{const t=n.get_recorder();t.tell(e,jw.remove_col(i,l.col)),o.record(t)}}(e)}},{usable:!!t,title:"删除当前单元格",icon:["iconfont","icon-list-delete-cell"],has_submenu:!1,shortcut:"",mouseenter(e){},click(t){!function(e){const{cursor:t,courier:n,stats:r,history:o,id:i}=e,s=vi.tips,{cube_end:a}=t,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");const c=n.get_recorder();c.tell(e,jw.remove_cell(i,l.box.id)),o.record(c)}(e)}}];return{cube:e,title:e.meta.cubename,layout:"grid",is_cube_menu:!0,active:[],menus:n}}function nl(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=vi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row,l.col-1))return s?.tip_info("左侧已存在单元格");if(l.col-1<0)return s?.tip_info("左侧已达边界");{const t=r.get_recorder(),n={row:l.row,col:l.col-1,rowspan:1,colspan:1,data:Mu.get_default()};t.tell(e,jw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_col_left(t.left))return s?.tip_info("左侧不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[0];t++)o.push(Mu.get_default());n.tell(e,jw.add_col(e.id,l.col,o)),i.record(n)}}function rl(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=vi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row,l.col+1))return s?.tip_info("右侧已存在单元格");if(l.col+1>=e.size[1])return s?.tip_info("右侧已达边界");{const t=r.get_recorder(),n={row:l.row,col:l.col+1,rowspan:1,colspan:1,data:Mu.get_default()};t.tell(e,jw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_col_right(t.right))return s?.tip_info("右侧不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[0];t++)o.push(Mu.get_default());n.tell(e,jw.add_col(e.id,l.col+l.colspan,o)),i.record(n)}}function ol(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=vi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row-1,l.col))return s?.tip_info("上方已存在单元格");if(l.row-1<0)return s?.tip_info("上方已达边界");{const t=r.get_recorder(),n={row:l.row-1,col:l.col,rowspan:1,colspan:1,data:Mu.get_default()};t.tell(e,jw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_row_top(t.top))return s?.tip_info("上方不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[1];t++)o.push(Mu.get_default());n.tell(e,jw.add_row(e.id,l.row,o)),i.record(n)}}function il(e,t=!1){const{cursor:n,courier:r,stats:o,history:i}=e,s=vi.tips,{cube_end:a}=n,l=e.get_active_cell();if(!l)return s?.tip_info("未发现激活单元格");if(t){if(e.get_cell(l.row+1,l.col))return s?.tip_info("下方已存在单元格");if(l.row+1>=e.size[0])return s?.tip_info("下方已达边界");{const t=r.get_recorder(),n={row:l.row+1,col:l.col,rowspan:1,colspan:1,data:Mu.get_default()};t.tell(e,jw.add_cell(e.id,n)),i.record(t)}}else{const t=e.get_cell_area(l);if(!e.check_orderly_row_bottom(t.bottom))return s?.tip_info("下方不整齐");const n=r.get_recorder(),o=[];for(let t=0;t<e.size[1];t++)o.push(Mu.get_default());n.tell(e,jw.add_row(e.id,l.row+l.rowspan,o)),i.record(n)}}function sl(e,t){const{cursor:n,courier:r,stats:o,history:i,id:s}=e,a=vi.tips,{cube_end:l}=n,c=e.get_active_cell();if(!c)return a?.tip_info("未发现激活单元格");const d=r.get_recorder(),u=e.get_cell_area(c);d.tell(e,jw.col_resize(s,[u.left,u.right],t)),i.record(d)}let al,ll,cl=!1,dl=null,ul=null;function hl(e){const{courier:t,history:n,id:r,cubes:o}=e,i=t.get_recorder();i.tell(e,zi.fold(r,!e.attrs.fold)),n.record(i);for(let t of Object.values(o.postils))t.pcube?.top===e&&t.visible(!1);const s=e.child_first.id;if(!s)return;const a=document.getElementById(s);a?.scrollIntoView({block:"nearest",behavior:"smooth"})}function pl(e,t){hl(t)}function fl(e,t){e.preventDefault();const{root:n,stats:r}=t;r.anchor_root_id===t.id?r.anchor_root_id="":n.stats.anchor_root_id=t.id}function ml(e){const t=[...Za(e),{usable:!0,title:"添加块",shortcut:"",has_submenu:!1,icon:["iconfont","icon-add"],mouseenter(){},click(){!function(e){const{courier:t,history:n}=e,r=t.get_recorder(),o=[Mu.get_default()];r.tell(e,zi.insert_child(e.id,o,e.child_count)),n.record(r)}(e)}},{usable:!0,title:"布局•限定列宽",shortcut:"",has_submenu:!0,icon:["iconfont","icon-circle"],mouseenter:()=>function(e){const t=[{usable:!0,title:120,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){gl(e,120)}},{usable:!0,title:140,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){gl(e,140)}},{usable:!0,title:160,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){gl(e,160)}},{usable:!0,title:180,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){gl(e,180)}},{usable:!0,title:200,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){gl(e,200)}}],n={cube:qt(e),title:"限定列宽",layout:"list",is_cube_menu:!1,active:[e.attrs.column_width],menus:t};return n}(e),click(){}},{usable:!0,title:"布局•限定列数",shortcut:"",has_submenu:!0,icon:["iconfont","icon-circle"],mouseenter:()=>function(e){const t=[{usable:!0,title:2,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,2)}},{usable:!0,title:3,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,3)}},{usable:!0,title:4,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,4)}},{usable:!0,title:5,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,5)}},{usable:!0,title:6,shortcut:"",has_submenu:!1,icon:["iconfont","icon-circle"],mouseenter(){},click(){_l(e,6)}}],n={cube:qt(e),title:"限定列数",layout:"list",is_cube_menu:!1,active:[e.attrs.column_count],menus:t};return n}(e),click(){}}];return{cube:qt(e),title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}function _l(e,t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,zi.set_attr(e.id,{column_count:t,column_width:null})),r.record(o)}function gl(e,t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,zi.set_attr(e.id,{column_width:t,column_count:null})),r.record(o)}class bl{static reset(e,t){return{id:e,name:s.Names.reset,data:t}}static add(e,t,n){return{id:e,name:s.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:s.Names.remove,range:t}}static indent(e,t){return{id:e,name:s.Names.indent,items:t}}}function xl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,bl.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,bl.indent(n.id,o)),i.record(l)}}function vl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,Bh.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,Bh.indent(n.id,o)),i.record(l)}}function yl(e,t=!1){const n=e,{cursor:r,courier:o,history:i}=e,{cube_start:s,cube_end:a}=r;if(!s||!a)return;const l=o.get_recorder();if(t){const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!1});l.tell(n,Sh.indent(n.id,o)),i.record(l)}else{const e=s.find_upstream_untill(n),t=a.find_upstream_untill(n);if(!e||!t)return;const r=n.items.slice(e.index,t.index+1),o=[];for(let e of r)o.push({id:e.data.id,indent:!0});l.tell(n,Sh.indent(n.id,o)),i.record(l)}}function wl(e,t="tail"){const{courier:n,history:r}=e,o=new ld(n),i=[Mu.get_default(),Mu.get_default()],s=gh.insert_row(e.id,t,[i]);o.tell(e,s),r.record(o)}const kl=Pt({alpha:8,bg:"#ffffff"}),Sl=window.matchMedia("(prefers-color-scheme: dark)");Sl.addEventListener("change",e=>{e.matches?(kl.bg="#000000",console.log("切换到深色模式")):(kl.bg="#ffffff",console.log("切换到浅色模式"))});function Cl(e,t,n="#FFFFFF"){return function(e,t,n="#FFFFFF"){const r=/^#([0-9A-F]{3}){1,2}$/i;if(!r.test(e)||!r.test(n))throw new Error("Invalid hex color format");const o=e=>{let t=e.replace("#","");return 3===t.length&&(t=t.split("").map(e=>e+e).join("")),t},i=o(e),s=o(n),a={r:parseInt(i.substring(0,2),16),g:parseInt(i.substring(2,4),16),b:parseInt(i.substring(4,6),16)},l={r:parseInt(s.substring(0,2),16),g:parseInt(s.substring(2,4),16),b:parseInt(s.substring(4,6),16)},c=[];for(let e=0;e<t;e++){const n=e/(t-1||1),r=Math.round(a.r+(l.r-a.r)*n),o=Math.round(a.g+(l.g-a.g)*n),i=Math.round(a.b+(l.b-a.b)*n),s="#"+((1<<24)+(r<<16)+(o<<8)+i).toString(16).slice(1).toUpperCase(),d=Ml(r,o,i,150);c.push({fill:s,color:d})}return c}(e,t,n)}function Ml(e,t,n,r=158){return(299*e+587*t+114*n)/1e3>r?"#000000":"#FFFFFF"}function zl(e){if("transparent"===e)return{r:255,g:255,b:255,a:0};if(!/^#([0-9A-F]{3,4}){1,2}$/i.test(e))throw new Error(`Invalid hex color format: ${e}`);let t=e.replace("#","").toUpperCase();return 3!==t.length&&4!==t.length||(t=t.split("").map(e=>e+e).join("")),6===t.length&&(t+="FF"),{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:parseInt(t.substring(6,8),16)/255}}Sl.matches?(kl.bg="#000000",console.log("当前是深色模式")):(kl.bg="#ffffff",console.log("当前是浅色模式(或无偏好)"));const Nl={class:"menu-node-fill"},Al={class:"box-items"},Tl=["onClick"],Rl=["onClick"],Pl=En({__name:"menu-node-fill",props:{cube:{},hide:{type:Function}},setup(e){const t=[...Cl("#000000",13).slice(0,-1),...Cl("#ff006e",13).slice(0,-1),...Cl("#fb5607",13).slice(0,-1),...Cl("#f0f600",13).slice(0,-1),...Cl("#affc41",13).slice(0,-1),...Cl("#06d6a0",13).slice(0,-1),...Cl("#00b4d8",13).slice(0,-1),...Cl("#5c7aff",13).slice(0,-1),...Cl("#7400b8",13).slice(0,-1)],n=gi(()=>{const e=[{name:"清空",value:{fill:null,color:null},css:{background:"transparent"}},{name:"透明",value:{fill:"transparent"},css:{background:"transparent"}}],n=function(e){if(e<1||e>10)throw new Error("透明度等级必须在1-10之间");if(!Number.isInteger(e))throw new Error("透明度等级必须是整数");const t=(e-1)/9;return Math.round(255*t).toString(16).toUpperCase().padStart(2,"0")}(kl.alpha);for(let r of t){let t=r.fill+n;e.push({name:"",value:{fill:t},css:{background:t}})}return e});return(t,r)=>(No(),Oo("div",Nl,[r[0]||(r[0]=jo("div",{class:"menu-title"},[jo("span",{class:"title iconfont icon-sp"},"节点填充色")],-1)),jo("div",Al,[(No(),Oo(wo,null,hr(10,e=>jo("div",{class:me(["alpha-item",{active:Yt(kl).alpha===e}]),onClick:t=>{return n=e,void(kl.alpha=n);var n}},ve(e),11,Tl)),64)),(No(!0),Oo(wo,null,hr(n.value,t=>(No(),Oo("div",{class:"background-item",style:de(t.css),onClick:n=>function(t){const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=e.cube.map,s=new Set([...i.nodes_selected,e.cube]);for(let e of s){const n=ts.layout_change(e.id,t.value);o.tell(e,n)}r.record(o)}(t)},ve(t.name),13,Rl))),256))])]))}}),Ol=(0,Is.A)(Pl,[["__scopeId","data-v-ab778236"]]);class El{static check_allow(e,t,n=!0){if(e?.is_layout_root&&!e.attrs.root||!e?.env.layout_root||n&&!t)return!0;const r=e.env.layout_type;return"right"===r?this.right.includes(t):"left"===r?this.left.includes(t):"up"===r?this.up.includes(t):"down"===r?this.down.includes(t):"time-right"===r?this.time_right.includes(t):"time-down"===r?this.time_down.includes(t):"file-tree"!==r||this.file_tree.includes(t)}static get left(){return["left","right","up","down","time-down","time-right","file-tree"]}static get right(){return["right","left","up","down","time-down","time-right","file-tree"]}static get up(){return["left","right","up","down","time-right","time-down","file-tree"]}static get down(){return["left","right","up","down","time-right","time-down","file-tree"]}static get time_right(){return["left","right","down","up","time-down","file-tree"]}static get time_down(){return["left","right","up","down","time-right","file-tree"]}static get file_tree(){return["left","right","up","down","time-right","time-down","file-tree"]}static get_layout_icons(e){if(!e)return[];return{right:["iconfont","icon-right"],left:["iconfont","icon-left"],up:["iconfont","icon-up"],down:["iconfont","icon-down"],"time-down":["iconfont","icon-time-down"],"time-right":["iconfont","icon-time-right"],"file-tree":["iconfont","icon-file-tree"]}[e]||[]}static get_layout_detail(e){return[{type:null,name:"无布局",icon:["iconfont","icon-close"],usable:this.check_allow(e,null)},{type:"right",name:"向右逻辑图",icon:["iconfont","icon-right"],usable:this.check_allow(e,"right")},{type:"left",name:"向左逻辑图",icon:["iconfont","icon-left"],usable:this.check_allow(e,"left")},{type:"up",name:"向上逻辑图",icon:["iconfont","icon-up"],usable:this.check_allow(e,"up")},{type:"down",name:"向下逻辑图",icon:["iconfont","icon-down"],usable:this.check_allow(e,"down")},{type:"time-right",name:"时间向右逻辑图",icon:["iconfont","icon-time-right"],usable:this.check_allow(e,"time-right")},{type:"time-down",name:"时间向下逻辑图",icon:["iconfont","icon-time-down"],usable:this.check_allow(e,"time-down")},{type:"file-tree",name:"文件树",icon:["iconfont","icon-file-tree"],usable:this.check_allow(e,"file-tree")}]}}const Ll={class:"menu-node-layout"},Il=["onClick"],Dl=En({__name:"menu-node-layout",props:{cube:{},hide:{type:Function}},setup(e){const t=e.cube,n=gi(()=>El.get_layout_detail(t?.env.upstream));return(r,o)=>(No(),Oo("div",Ll,[(No(!0),Oo(wo,null,hr(n.value,n=>(No(),Oo("div",{class:me(["layout-item",{usable:n.usable}]),onClick:r=>function(t,n){if(!t||!n.usable)return e.hide();const{courier:r,history:o}=t,i=t.map,s=new Set([...i.nodes_selected,t]),a=r.get_recorder();for(let e of s){const t=ts.layout_change(e.id,{layout:n.type});a.tell(e,t)}o.record(a),e.hide()}(Yt(t),n)},[jo("div",{class:me(n.icon)},null,2)],10,Il))),256))]))}}),Bl=(0,Is.A)(Dl,[["__scopeId","data-v-7d066162"]]),jl={class:"menu-node-linker"},Hl={class:"box-items"},ql=En({__name:"menu-node-linker",props:{cube:{},hide:{type:Function}},setup(e){function t(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=ts.layout_change(e.id,{anchor_out:t});i.tell(e,n)}r.record(i)}function n(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=ts.layout_change(e.id,{anchor_in:t});s.tell(e,n)}r.record(s)}function r(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=ts.layout_change(e.id,{line_type:t});s.tell(e,n)}r.record(s)}function o(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=new Set([...o.nodes_selected,e.cube]),s=n.get_recorder();for(let e of i){const n=ts.layout_change(e.id,{line_width:t});s.tell(e,n)}r.record(s)}function i(t){return{active:t===e.cube.status.node_anchor_out}}function s(t){return{active:t===e.cube.status.node_anchor_in}}function a(t){return{active:t===e.cube.status.node_line_type}}function l(t){return{active:t===e.cube.status.node_line_width}}return(e,c)=>(No(),Oo("div",jl,[c[28]||(c[28]=jo("div",{class:"menu-title"},[jo("span",{class:"title iconfont icon-sp"},"节点连线")],-1)),jo("div",Hl,[c[22]||(c[22]=jo("div",{class:"item header"},"出点",-1)),jo("div",{class:me(["item iconfont icon-a-Arrow-Right",i(Yt(p).Anchor.arrow)]),onClick:c[0]||(c[0]=e=>t(Yt(p).Anchor.arrow))},null,2),jo("div",{class:me(["item iconfont icon-circle",i(Yt(p).Anchor.point)]),onClick:c[1]||(c[1]=e=>t(Yt(p).Anchor.point))},null,2),jo("div",{class:me(["item iconfont icon-square",i(Yt(p).Anchor.square)]),onClick:c[2]||(c[2]=e=>t(Yt(p).Anchor.square))},null,2),jo("div",{class:me(["item iconfont icon-cube",i(Yt(p).Anchor.rhomb)]),onClick:c[3]||(c[3]=e=>t(Yt(p).Anchor.rhomb))},null,2),c[23]||(c[23]=Go('<div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item header" data-v-0894defd>线型</div>',5)),jo("div",{class:me(["item iconfont icon-zhixian",a("line")]),onClick:c[4]||(c[4]=e=>r("line"))},null,2),jo("div",{class:me(["item iconfont icon-line-type",a("bezier2")]),onClick:c[5]||(c[5]=e=>r("bezier2"))},null,2),jo("div",{class:me(["item iconfont icon-zhexian1",a("polyline")]),onClick:c[6]||(c[6]=e=>r("polyline"))},null,2),jo("div",{class:me(["item iconfont icon-zhexian2",a("polyline2")]),onClick:c[7]||(c[7]=e=>r("polyline2"))},null,2),jo("div",{class:me(["item iconfont icon-zhexian3",a("polyline3")]),onClick:c[8]||(c[8]=e=>r("polyline3"))},null,2),jo("div",{class:me(["item iconfont icon-bolangxian",a("wave")]),onClick:c[9]||(c[9]=e=>r("wave"))},null,2),jo("div",{class:me(["item iconfont icon-fold-line-1",a("fold1")]),onClick:c[10]||(c[10]=e=>r("fold1"))},null,2),jo("div",{class:me(["item iconfont icon-fold-line-2",a("fold2")]),onClick:c[11]||(c[11]=e=>r("fold2"))},null,2),c[24]||(c[24]=jo("div",{class:"item header"},"入点",-1)),jo("div",{class:me(["item iconfont icon-a-Arrow-Right",s(Yt(p).Anchor.arrow)]),onClick:c[12]||(c[12]=e=>n(Yt(p).Anchor.arrow))},null,2),jo("div",{class:me(["item iconfont icon-circle",s(Yt(p).Anchor.point)]),onClick:c[13]||(c[13]=e=>n(Yt(p).Anchor.point))},null,2),jo("div",{class:me(["item iconfont icon-square",s(Yt(p).Anchor.square)]),onClick:c[14]||(c[14]=e=>n(Yt(p).Anchor.square))},null,2),jo("div",{class:me(["item iconfont icon-cube",s(Yt(p).Anchor.rhomb)]),onClick:c[15]||(c[15]=e=>n(Yt(p).Anchor.rhomb))},null,2),c[25]||(c[25]=Go('<div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item" data-v-0894defd></div><div class="item header" data-v-0894defd>线宽</div>',5)),jo("div",{class:me(["item line-1",l(1)]),onClick:c[16]||(c[16]=e=>o(1))},null,2),jo("div",{class:me(["item line-2",l(2)]),onClick:c[17]||(c[17]=e=>o(2))},null,2),jo("div",{class:me(["item line-3",l(3)]),onClick:c[18]||(c[18]=e=>o(3))},null,2),jo("div",{class:me(["item line-4",l(4)]),onClick:c[19]||(c[19]=e=>o(4))},null,2),jo("div",{class:me(["item line-5",l(5)]),onClick:c[20]||(c[20]=e=>o(5))},null,2),jo("div",{class:me(["item line-6",l(6)]),onClick:c[21]||(c[21]=e=>o(6))},null,2),c[26]||(c[26]=jo("div",{class:"item"},null,-1)),c[27]||(c[27]=jo("div",{class:"item"},null,-1))])]))}}),Fl=(0,Is.A)(ql,[["__scopeId","data-v-0894defd"]]),$l={class:"menu-node-gap"},Gl={class:"box-items"},Vl=En({__name:"menu-node-gap",props:{cube:{},hide:{type:Function}},setup(e){function t(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=ts.layout_change(e.id,{gap_x:t});i.tell(e,n)}r.record(i)}function n(t){const{courier:n,history:r}=e.cube,o=e.cube.map,i=n.get_recorder(),s=new Set([...o.nodes_selected,e.cube]);for(let e of s){const n=ts.layout_change(e.id,{gap_y:t});i.tell(e,n)}r.record(i)}function r(t){return{active:t===e.cube.status.node_gap_x}}function o(t){return{active:t===e.cube.status.node_gap_y}}return(e,i)=>(No(),Oo("div",$l,[i[18]||(i[18]=jo("div",{class:"menu-title"},[jo("span",{class:"title iconfont icon-sp"},"节点间隔")],-1)),jo("div",Gl,[i[16]||(i[16]=jo("div",{class:"item header"},"水平间隔",-1)),jo("div",{class:me(["item gap-h",r(10)]),onClick:i[0]||(i[0]=e=>t(10))},"10",2),jo("div",{class:me(["item gap-h",r(20)]),onClick:i[1]||(i[1]=e=>t(20))},"20",2),jo("div",{class:me(["item gap-h",r(30)]),onClick:i[2]||(i[2]=e=>t(30))},"30",2),jo("div",{class:me(["item gap-h",r(40)]),onClick:i[3]||(i[3]=e=>t(40))},"40",2),jo("div",{class:me(["item gap-h",r(50)]),onClick:i[4]||(i[4]=e=>t(50))},"50",2),jo("div",{class:me(["item gap-h",r(60)]),onClick:i[5]||(i[5]=e=>t(60))},"60",2),jo("div",{class:me(["item gap-h",r(70)]),onClick:i[6]||(i[6]=e=>t(70))},"70",2),jo("div",{class:me(["item gap-h",r(80)]),onClick:i[7]||(i[7]=e=>t(80))},"80",2),i[17]||(i[17]=jo("div",{class:"item header"},"垂直间隔",-1)),jo("div",{class:me(["item gap-v",o(10)]),onClick:i[8]||(i[8]=e=>n(10))},"10",2),jo("div",{class:me(["item gap-v",o(20)]),onClick:i[9]||(i[9]=e=>n(20))},"20",2),jo("div",{class:me(["item gap-v",o(30)]),onClick:i[10]||(i[10]=e=>n(30))},"30",2),jo("div",{class:me(["item gap-v",o(40)]),onClick:i[11]||(i[11]=e=>n(40))},"40",2),jo("div",{class:me(["item gap-v",o(50)]),onClick:i[12]||(i[12]=e=>n(50))},"50",2),jo("div",{class:me(["item gap-v",o(60)]),onClick:i[13]||(i[13]=e=>n(60))},"60",2),jo("div",{class:me(["item gap-v",o(70)]),onClick:i[14]||(i[14]=e=>n(70))},"70",2),jo("div",{class:me(["item gap-v",o(80)]),onClick:i[15]||(i[15]=e=>n(80))},"80",2)])]))}}),Ul=(0,Is.A)(Vl,[["__scopeId","data-v-b248a780"]]),Kl={class:"slider-root"},Wl=En({__name:"slider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,r=t,o=Vt(),i=gi(()=>{const e=n.max-n.min;return 0===e?0:(n.modelValue-n.min)/e*100});function s(e){const t=Math.round((e-n.min)/n.step)*n.step+n.min;return function(e){return Math.min(n.max,Math.max(n.min,e))}(parseFloat(t.toFixed(10)))}function a(e){const t=o.value;if(!t)return n.modelValue;const r=t.getBoundingClientRect(),i=(e-r.left)/r.width;return s(n.min+i*(n.max-n.min))}function l(e){const t=a(e.clientX);r("update:modelValue",t),r("change",t)}function c(e){e.preventDefault();const t=e.currentTarget;function n(e){const t=a(e.clientX);r("update:modelValue",t)}t.setPointerCapture(e.pointerId),t.addEventListener("pointermove",n),t.addEventListener("pointerup",function e(o){t.releasePointerCapture(o.pointerId);const i=a(o.clientX);r("update:modelValue",i),r("change",i),t.removeEventListener("pointermove",n),t.removeEventListener("pointerup",e)})}return(e,t)=>(No(),Oo("div",Kl,[jo("div",{class:"slider-track",ref_key:"track",ref:o,onClick:l},[jo("div",{class:"slider-fill",style:de({width:i.value+"%"})},null,4),jo("div",{class:"slider-thumb",style:de({left:i.value+"%"}),onPointerdown:c},null,36)],512)]))}}),Yl=(0,Is.A)(Wl,[["__scopeId","data-v-6bdc1f6b"]]),Xl={class:"menu-node-max-width"},Jl={class:"body"},Zl={class:"display-val"},Ql=300,ec=En({__name:"menu-node-max-width",props:{cube:{},hide:{type:Function}},setup(e){const t=Vt(e.cube.status.node_max_width||Ql);io(()=>e.cube.status.node_max_width,e=>{t.value=e||Ql});const n=Vt(t.value);function r(e){n.value=e}function o(r){const{courier:o,history:i}=e.cube,s=e.cube.map,a=new Set([...s.nodes_selected,e.cube]),l=o.get_recorder();for(let e of a){const t=ts.layout_change(e.id,{max_width:r});l.tell(e,t)}i.record(l),t.value=r,n.value=r}function i(){const{courier:r,history:o}=e.cube,i=e.cube.map,s=new Set([...i.nodes_selected,e.cube]),a=r.get_recorder();for(let e of s){const t=ts.layout_change(e.id,{max_width:0});a.tell(e,t)}o.record(a),t.value=Ql,n.value=Ql}return(e,s)=>(No(),Oo("div",Xl,[s[1]||(s[1]=jo("div",{class:"menu-title"},[jo("span",{class:"title iconfont icon-sp"},"节点最大宽度")],-1)),jo("div",Jl,[Ho(Yl,{modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=e=>t.value=e),r],min:Ql,max:2400,step:10,onChange:o},null,8,["modelValue"]),jo("div",Zl,ve(n.value)+"px",1)]),jo("div",{class:"reset-row"},[jo("div",{class:"reset-btn",onClick:i},"重置")])]))}}),tc=(0,Is.A)(ec,[["__scopeId","data-v-0fa64e8e"]]);function nc(e){const t=[{usable:!!e.env.upstream,title:"新建同级-之后",icon:["iconfont","icon-circle"],shortcut:"enter",has_submenu:!1,mouseenter(){},click(t){rc(e)}},{usable:!!e.env.upstream,title:"新建同级-之前",icon:["iconfont","icon-circle"],shortcut:"shift+enter",has_submenu:!1,mouseenter(){},click(t){rc(e,!0)}},{usable:!!e.env.layout_type,title:"新建子级",icon:["iconfont","icon-circle"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){!function(e){const{courier:t,history:n,root:r}=e,o=t.get_recorder(),i=e.map2d,s=e.node_last.map2d.rect,a=Zu.get_default({x:s.x,y:s.y+s.height+i.node_gap_y}),l=ts.append_child(e.id,[a]);o.tell(e,l),n.record(o)}(e)}},{usable:!0,title:"切换布局根",icon:["iconfont","icon-system-mind-map-filled"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.map,r=e.courier.get_recorder(),o=new Set([...n.nodes_selected,e]);for(let e of o){const t=ts.layout_change(e.id,{root:!e.attrs.root});r.tell(e,t)}e.history.record(r)}},{usable:!0,title:"切换折叠",icon:["iconfont","icon-minus"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.map,r=e.courier.get_recorder(),o=new Set([...n.nodes_selected,e]);for(let e of o){const t=ts.layout_change(e.id,{fold:!e.attrs.fold});r.tell(e,t)}e.history.record(r)}},{usable:!0,title:"切换布局",icon:["iconfont","icon-layout-2-fill"],shortcut:"",has_submenu:!0,mouseenter:()=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:qt(Bl)}}(e),click(e){}},{usable:!0,title:"填充色",icon:["iconfont","icon-background"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:qt(Ol)}}(e),click(e){}},{usable:!0,title:"连线",icon:["iconfont","icon-background"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:qt(Fl)}}(e),click(e){}},{usable:!0,title:"布局间隔",icon:["iconfont","icon-bimgis_suanliang"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:qt(Ul)}}(e),click(e){}},{usable:!0,title:"最大宽度",icon:["iconfont","icon-bimgis_suanliang"],shortcut:"",has_submenu:!0,mouseenter:t=>function(e){return{type:"component",cube:e,is_cube_menu:!1,component:qt(tc)}}(e),click(e){}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}function rc(e,t=!1){const{courier:n,history:r,root:o}=e,i=n.get_recorder(),s=e.env.upstream;if(!s)return vi.tips?.tip_warning("无法在没有布局上游的节点添加同级");let a=e.id;t&&(a=e.env.prev_node?.id||null);const l=s.map2d,c=e.map2d.rect,d=Zu.get_default({x:c.x,y:c.y+c.height+l.node_gap_y}),u=ts.append_child(s.id,[d],a);return i.tell(s,u),r.record(i)}async function oc(e,t){if(!od.check_mouse_key(e,"right"))return;t.root;e.preventDefault(),e.stopPropagation(),Wa.cube=t,Wa.point={x:e.clientX,y:e.clientY},Wa.stack_pos.length=0,Wa.stack_rect.length=0,Wa.stack_menus.length=0;const n=ic(t);n&&(Wa.menu=n)}function ic(e){let t;return e instanceof hh?t=function(e){const t=[...Za(e),{usable:!e.exceptions,title:"添加异常块",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){e.add_exceptions()}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Pk?t=ml(e):e instanceof xu?t=function(e){const t=[...Za(e),{usable:!e.attrs.fold,title:"折叠",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){hl(e)}},{usable:!!e.attrs.fold,title:"展开",icon:["iconfont","icon-circle"],has_submenu:!1,mouseenter(e){},click(t){hl(e)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Pg?t=el(e):e instanceof kh?t=function(e){const t=[...Za(e,!1),{usable:!0,title:"向下插入行",shortcut:"ctrl + enter",icon:["iconfont","icon-cc-arrow-down-square"],mouseenter(){},click(){const{cursor:t}=e,{cube_end:n}=t;if(!n)return;const r=n.find_upstream_untill(e);r instanceof Mu&&wl(e,Math.floor(r.index/2)+1)}},{usable:!0,title:"向上插入行",shortcut:"ctrl + shift + enter",icon:["iconfont","icon-cc-arrow-up-square"],mouseenter(){},click(){const{cursor:t}=e,{cube_end:n}=t;if(!n)return;const r=n.find_upstream_untill(e);r instanceof Mu&&wl(e,Math.floor(r.index/2))}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Dh?t=function(e){const t=[{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){xl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){xl(e,!0)}},{get usable(){return!(e.pcube instanceof hh)},title:"转换为有序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.list_ordered;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{get usable(){return!(e.pcube instanceof hh)},title:"转换为待办列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.todo;for(let e of o.info)e.done=e.done||!1;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return e.pcube instanceof hh||t.unshift(...Za(e)),{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Vh?t=function(e){const t=[...Za(e),{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){vl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){vl(e,!0)}},{usable:!0,title:"转换为无序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.list;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{usable:!0,title:"转换为待办列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.todo;for(let e of o.info)e.done=e.done||!1;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Rh?t=function(e){const t=[...Za(e),{usable:!0,title:"缩进",icon:["iconfont","icon-square"],shortcut:"tab",has_submenu:!1,mouseenter(){},click(t){yl(e)}},{usable:!0,title:"反向缩进",icon:["iconfont","icon-square"],shortcut:"shift + tab",has_submenu:!1,mouseenter(){},click(t){yl(e,!0)}},{usable:!0,title:"转换为无序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.list;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}},{usable:!0,title:"转换为有序列表",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=structuredClone(e.export());o.id=od.get_id(),o.type=S.Cubes.list_ordered;const i=e.pcube,s=e.index,a=n.get_recorder(),l=zi.delete_child(i.id,"backward",[s,s+1],!0),c=zi.insert_child(i.id,[o],s);a.tell(i,l,c),r.record(a)}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Zu?t=nc(e):e instanceof Mk?t=function(e){const t=[...Za(e),{usable:!0,title:"重置视图",icon:["iconfont","icon-circle"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){e.reset_matrix(Zi.get_default())}}];return Qa(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof tk?t=tl(e):e instanceof bd?t=function(e){const t=[{usable:!0,title:"下载",icon:["iconfont","icon-download"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){e.event.emit_asset_download("image",e.info)}},{usable:!0,title:"复制到粘贴板",icon:["iconfont","icon-copy"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const n=e.dom?.querySelector("img");if(!n)return vi.tips?.tip_error("复制失败");fetch(n.src).then(e=>e.blob()).then(async t=>{const n=new ClipboardItem({"image/png":t});await e.clipboard.set_clipboard_data(n)&&vi.tips?.tip_success("复制成功🍊")})}},{usable:!0,title:"文字环绕",icon:["iconfont","icon-square"],shortcut:"",has_submenu:!0,mouseenter:()=>function(e){const t=[{usable:!0,title:"无环绕",icon:["iconfont","icon-close"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.clear_float())}},{usable:!0,title:"左环绕",icon:["iconfont","icon-floatleft"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.float_image("L"))}},{usable:!0,title:"右环绕",icon:["iconfont","icon-floatright"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{history:n}=e;n.record(e.float_image("R"))}}];return{cube:e,title:"文字环绕",layout:"list",is_cube_menu:!1,active:[],menus:t}}(e),click(e){}}];return{cube:e,title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t}}(e):e instanceof Mu?t=function(e){const t=[...Za(e)];return Qa(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof Pu?t=function(e){const t=[...Za(e),{usable:!e.attrs.fold,title:"折叠",icon:["iconfont","icon-minussquare"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,zi.fold(e.id,!0)),r.record(o)}},{usable:!!e.attrs.fold,title:"展开",icon:["iconfont","icon-add1"],shortcut:"",has_submenu:!1,mouseenter(){},click(t){const{courier:n,history:r}=e,o=n.get_recorder();o.tell(e,zi.fold(e.id,!1)),r.record(o)}}];return Qa(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e):e instanceof ak&&(t=function(e){const t=[...Za(e)];return Qa(e,{title:e.meta.cubename,layout:"list",is_cube_menu:!0,active:[],menus:t})}(e)),t&&t.cube&&(t.cube=qt(t.cube)),t}function sc(e,t,n,r=5){e.width,Math.abs(e.y-n.y),e.width,Math.abs(e.height-(n.y+n.height)),Math.abs(n.x-e.x),e.height;const o={width:Math.abs(e.width-(n.x+n.width)),height:e.height};if(Gi.MathRect.can_include_size(o,t)){const o=n.y+t.height-e.height;return{x:n.x+n.width+r,y:o<0?n.y:n.y-o}}{const o=n.y+t.height-e.height;return{x:n.x-t.width-r,y:o<0?n.y:n.y-o}}}const ac={class:"dialog-form"},lc={class:"form-grid"},cc={class:"label"},dc=["onUpdate:modelValue"],uc=En({__name:"menu-dialog",setup(e){const t=Vt();function n(){const e=t.value;e&&(Ya.open=!1,e.close())}function r(){n(),Ya.submit(Ya.data)}return io(()=>Ya.open,()=>{const e=t.value;e&&(Ya.open?e.showModal():e.close())}),(e,o)=>(No(),Oo("dialog",{class:"menu-dialog",ref_key:"root",ref:t,onClose:n},[jo("div",ac,[jo("div",{class:"close-corner",onClick:n}),jo("div",lc,[(No(!0),Oo(wo,null,hr(Object.keys(Yt(Ya).data),e=>(No(),Oo(wo,{key:e},[jo("div",cc,ve(e),1),zn(jo("input",{type:"text",autofocus:"","onUpdate:modelValue":t=>Yt(Ya).data[e]=t},null,8,dc),[[za,Yt(Ya).data[e]]])],64))),128))]),jo("div",{class:"dialog-submit",onClick:r},"确认")])],544))}}),hc=(0,Is.A)(uc,[["__scopeId","data-v-13d4fd0e"]]),pc={class:"title iconfont icon-sp"},fc={key:0,class:"iconfont icon-arrow-right"},mc=["onPointerdown","onMouseenter"],_c={class:"item-shortcut"},gc={key:0,class:"iconfont icon-arrow-right"},bc=["onMouseenter"],xc={class:"title iconfont icon-sp"},vc={key:0,class:"iconfont icon-arrow-right"},yc=["onPointerdown","onMouseenter"],wc={class:"item-shortcut"},kc={key:0,class:"iconfont icon-arrow-right"},Sc=En({__name:"note-menu",props:{root:{}},setup(e){const t=Vt(),n=Vt([]);io(()=>Wa.point,async()=>{const e=t.value;if(!e)return;await mn(),Wa.stack_pos.length=0;const n={x:0,y:0,width:window.innerWidth,height:window.innerHeight},r=e.getBoundingClientRect(),o={x:Wa.point.x,y:Wa.point.y,width:0,height:0},i=Gi.MathRect.move_rect_to_other(n,r,o);Wa.css={left:i.x+"px",top:i.y+"px"}}),io(Wa.stack_menus,async()=>{await mn();const e=n.value;if(!e)return;Wa.stack_pos.length=0;const t={x:0,y:0,width:window.innerWidth,height:window.innerHeight};for(let n=0;n<Wa.stack_menus.length;n++){const r=Wa.stack_rect[n],o=sc(t,e[n].getBoundingClientRect(),r);Wa.stack_pos.push({left:o.x+"px",top:o.y+"px"})}});const r=gi(()=>Wa.menu);function o(){Wa.stack_menus.length=Math.max(0,Wa.stack_menus.length-1),Wa.stack_rect.length=Math.max(0,Wa.stack_rect.length-1)}function i(e,t=!1){t?(Wa.stack_menus.length=e,Wa.stack_rect.length=e,Wa.menu=void 0):(Wa.stack_menus.length=e,Wa.stack_rect.length=e)}function s(e,t){if(!t.is_cube_menu)return;const n=t?.cube?.pcube;if(!n||n instanceof Ts)return;const r=ic(n);if(!r)return;i(Wa.stack_menus.findLastIndex(e=>e.is_cube_menu)+1);const o=e.currentTarget;Wa.stack_rect.push(o.getBoundingClientRect()),Wa.stack_menus.push(r)}function a(e,t,n){if(i(t),!n.has_submenu)return;const r=e.currentTarget;Wa.stack_rect.push(r.getBoundingClientRect());const o=n.mouseenter(e);o&&(o.cube&&(o.cube=qt(o.cube)),Wa.stack_menus.push(o))}function l(e,t){t.usable&&(o(),t.click(e))}function c(e){const t=e.usable;return{cursor:t?"pointer":"not-allowed",color:t?"unset":"var(--menu-item-disable-color)"}}function d(e){e.stopPropagation()}function u(e){return{"layout-list":!e.layout||"list"===e.layout,"layout-grid":"grid"===e.layout}}function h(e){return e.is_cube_menu&&function(e){if(!e)return!1;const t=[Zu,Pg,tk,xu,Pk,Dh,Vh,Rh,bd,kh,hh,Mk,Mu,Pu,ak],n=e.pcube;if(!n)return!1;for(const e of t)if(n instanceof e)return!0;return!1}(e.cube)}return Zn(()=>{document.documentElement.addEventListener("pointerdown",e=>{const n=t.value;if(!n)return;const r=e.target;r&&!n.contains(r)&&(Wa.menu=void 0,Wa.stack_menus.length=0,Wa.stack_pos.length=0,Wa.stack_rect.length=0)},{capture:!0})}),(e,i)=>(No(),Oo("div",{class:"note-menus",style:de(Yt(Wa).css),ref_key:"dom",ref:t,onWheel:d},[Vo(" 弹窗 "),Ho(hc),Vo(" 主菜单列表 "),r.value?(No(),Oo("div",{key:0,class:"menu menu-list",ref_key:"ms",ref:n},[jo("div",{class:"menu-title",onMouseenter:i[0]||(i[0]=e=>s(e,r.value))},[jo("span",pc,ve(r.value.title),1),h(r.value)?(No(),Oo("div",fc)):Vo("v-if",!0)],32),jo("div",{class:me(["box-menu-items",u(r.value)])},[(No(!0),Oo(wo,null,hr(r.value.menus,e=>(No(),Oo("div",{class:me(["menu-item",{"active-item":r.value.active.includes(e.title)}]),style:de(c(e)),key:e.title,onPointerdown:t=>l(t,e),onMouseenter:t=>a(t,0,e)},[jo("div",{class:me(["item-title",e.icon])},ve(e.title),3),jo("div",_c,ve(e.shortcut),1),e.has_submenu?(No(),Oo("div",gc)):Vo("v-if",!0)],46,mc))),128))],2)],512)):Vo("v-if",!0),Vo(" 子菜单组 "),(No(!0),Oo(wo,null,hr(Yt(Wa).stack_menus,(e,t)=>(No(),Oo("div",{class:"menu submenu-list",ref_for:!0,ref_key:"ms",ref:n,style:de(Yt(Wa).stack_pos[t])},["component"===e.type?(No(),Eo(cr(e.component),{key:0,cube:qt(e.cube),hide:qt(o)},null,8,["cube","hide"])):(No(),Oo(wo,{key:1},[jo("div",{class:"menu-title",onMouseenter:t=>s(t,e)},[jo("span",xc,ve(e.title),1),h(e)?(No(),Oo("div",vc)):Vo("v-if",!0)],40,bc),jo("div",{class:me(["box-menu-items",u(e)])},[(No(!0),Oo(wo,null,hr(e.menus,n=>(No(),Oo("div",{class:me(["menu-item",{"active-item":e.active.includes(n.title)}]),style:de(c(n)),key:n.title,onPointerdown:e=>l(e,n),onMouseenter:e=>a(e,t+1,n)},[jo("div",{class:me(["item-title",n.icon])},ve(n.title),3),jo("div",wc,ve(n.shortcut),1),n.has_submenu?(No(),Oo("div",kc)):Vo("v-if",!0)],46,yc))),128))],2)],64))],4))),256))],36))}}),Cc=(0,Is.A)(Sc,[["__scopeId","data-v-7499f3ca"]]),Mc=["onClick"],zc=En({__name:"float-node-layout",props:{float:{}},setup(e){const t=e.float.float_node_layout,n=gi(()=>{const e=El.get_layout_detail(t.cube?.env.upstream);return console.log("layouts:",e),e});return(e,r)=>Yt(t).visible?(No(),Oo("div",{key:0,class:"float-node-layout",style:de(Yt(t).css)},[(No(!0),Oo(wo,null,hr(n.value,e=>(No(),Oo("div",{class:me(["layout-item",{usable:e.usable}]),onClick:n=>function(e,n){if(!e||!n.usable)return t.close();const{courier:r,history:o}=e,i=r.get_recorder(),s=ts.layout_change(e.id,{layout:n.type});i.tell(e,s),o.record(i),t.close()}(Yt(t).cube,e)},[jo("div",{class:me(e.icon)},null,2)],10,Mc))),256))],4)):Vo("v-if",!0)}}),Nc=(0,Is.A)(zc,[["__scopeId","data-v-1ee82010"]]),Ac={class:"note-float"},Tc=En({__name:"note-float",props:{root:{}},setup(e){const t=e.root.float;return(e,n)=>(No(),Oo("div",Ac,[Ho(Nc,{float:Yt(t)},null,8,["float"])]))}}),Rc=(0,Is.A)(Tc,[["__scopeId","data-v-a9c1c4fe"]]);class Pc extends xi{has_down=!1;down_caret=void 0;constructor(e){super(e)}get root(){return this._root}pointerdown(e){if(this.root.stats.is_read_mode)return e.preventDefault();e.preventDefault(),this.has_down=!0,this.down_caret=document.caretPositionFromPoint(e.clientX,e.clientY),this.click_selection_text(e),this.cursor.locate_cursor_by_coor(e.clientX,e.clientY)}pointermove(e){this.stats.view_point={x:e.clientX,y:e.clientY},this.drag_selection_text(e)}pointercancel(e){this.has_down=!1,this.down_caret=null}pointerup(e){e.preventDefault(),this.has_down=!1,this.down_caret=null}beforeinput(e){if(this.stats.in_composition_mode)return;if(this.event.emit_note_input_before(e).some(e=>"stop"===e))return;e.preventDefault();const{courier:t,cursor:n,history:r}=this,o=e.data,{cube_end:i,cube_start:s,cube_selection:a,offset_start:l,offset_end:c}=n;if(!a||!i||!s)return;const d=s.id,u=i.id,h=a.id;if("insertText"===e.inputType){if(!(a instanceof Qd&&o)){const e=t.get_recorder(),n=Qd.get_default(o||"​"),i=zi.insert(h,[n],d,u,l,c);return e.tell(a,i),r.record(e)}{const e=t.get_recorder();this.ins(e,this.root,o,a,l,c),r.record(e)}}else if("deleteContentBackward"===e.inputType||"deleteContentForward"===e.inputType){const n=t.get_recorder();if(this.root.scopes.scope_count_normal)return;{let t="deleteContentBackward"===e.inputType?"backward":"forward";const o=zi.delete(h,t,d,u,l,c);return n.tell(a,o),r.record(n)}}}compositionstart(e){this.stats.in_composition_mode=!0,this.clear_selection_text()}compositionupdate(e){this.event.emit_note_compositionupdate(e).some(e=>"stop"===e)}compositionend(e){if(this.event.emit_note_compositionend_before(e).some(e=>"stop"===e))return;const{courier:t,cursor:n,history:r,stats:o,event:i}=this.root;if(n.has_selection)return;if(!o.in_composition_mode)return;const{cube_end:s,cube_start:a,cube_selection:l,offset_start:c,offset_end:d}=n,u=e.data,h=new ld(t);if(l&&s&&a){if(l instanceof Qd){const e=l.text,t=d-u.length,n=`${e.slice(0,t)}${u}${e.slice(t)}`,r=Xd.reset(l.id,n,d,t);h.tell(l,r)}else console.error("编辑目标无法在内存结构中找到,此问题多由于未将子cube计算到children属性");o.in_composition_mode=!1,r.record(h),i.emit_note_compositionend(e)}}async save_image(e,t){const n=bd.get_default(),r=n.id+"."+t.type.split("/")[1];if(await this.event.emit_asset_save(e,r,t))return n.info=r,n}clear_selection_text(){const{cursor:e,courier:t,history:n}=this;if(!e.has_selection)return;const{cube_end:r,cube_start:o,cube_selection:i,offset_start:s,offset_end:a}=e;if(!i||!r||!o)return;const l=new ld(t);l.tell(i,zi.delete(i.id,"backward",o.id,r.id,s,a)),n.record(l)}ins(e,t,n,r,o,i){const{courier:s,history:a}=t,l=r.text,c=l.slice(0,o)+n+l.slice(i),d=o+n.length,u=Xd.reset(r.id,c,d,o);e.tell(r,u);const h=zi.merge(r.id,"both",r.id,d);return e.tell(r,h),e}click_selection_text(e){if(!this.down_caret||!e.shiftKey)return;const{offset_end:t,node_end:n}=this.cursor,{offset:r,offsetNode:o}=this.down_caret;n instanceof Text&&o instanceof Text&&Promise.resolve().then(()=>{this.cursor.set_selection_between(n,t,o,r)})}drag_selection_text(e){if(!this.has_down||!this.down_caret||!od.check_mouse_key(e,"left"))return;const t=document.caretPositionFromPoint(e.clientX,e.clientY);t&&this.down_caret.offsetNode instanceof Text&&t.offsetNode instanceof Text&&this.cursor.set_selection_between(this.down_caret.offsetNode,this.down_caret.offset,t.offsetNode,t.offset)}}class Oc extends Pc{get map(){return this.root}pointerdown(e){const t=this.map.map_interaction.get_map_selector(e);("node"!==t.type||t.res.editable)&&"linker"!==t.type&&"fig"!==t.type&&super.pointerdown(e)}dragenter(e){e.preventDefault()}dragover(e){e.preventDefault()}dragleave(e){e.preventDefault()}async drop(e){e.preventDefault();const{cursor:t,courier:n,clipboard:r,history:o}=this.root,{cube_end:i,offset_end:s}=t,a=e.dataTransfer;if(!a)return;const l={x:e.clientX,y:e.clientY},c=this.map.view_point_to_real(l),d=n.get_recorder(),u=(new DOMParser,a.getData("text/plain")),h=a.getData("text/html"),p=a.files;if(console.log("🍊",{files:p,html:h,text:u}),p.length>0){const{cube_end:e,cube_start:t,offset_end:n,offset_start:r}=this.cursor,o=[];if(this.map.nodes_editing.size>0&&e instanceof Qd){for(let e of Array.from(p))if(e.type.startsWith("image/"))if(this.map.isdev){const t=bd.get_default();t.info=URL.createObjectURL(e),o.push(t)}else{const t=await this.save_image("image",e);t&&o.push(t)}const t=e.id,i=zi.insert(t,o,t,t,r,n);d.tell(e,i)}else{for(let e of Array.from(p))if(e.type.startsWith("image/"))if(this.map.isdev){const t=bd.get_default();t.info=URL.createObjectURL(e),o.push(t)}else{const t=await this.save_image("image",e);t&&o.push(t)}const e=hu.get_default(o),t=xu.get_default([e]),n=Zu.get_default(c,[t]),r=es.node_add(this.map.id,[n]);d.tell(this.map,r)}}else if(u){const{offset_end:e,offset_start:t,cube_selection:n}=this.cursor;if(!(n instanceof Qd))return;this.ins(d,this._root,u,n,t,e)}o.record(d)}}const Ec=["id","data-type"],Lc=["transform"],Ic=["data-group"],Dc=["data-group"],Bc=["d"],jc=["data-group"],Hc=["data-group"],qc=["data-group"],Fc=["d"],$c=["d","marker-start","marker-end"],Gc=["d"],Vc={class:"doc-postils"},Uc=En({__name:"cube-map",props:{cube:{}},setup(e){const{status:t}=e.cube,n=new Oc(e.cube),r=Vt(),o=new ResizeObserver(t=>{e.cube.get_view_rect(),Ka.resolve()});Zn(()=>{const t=r.value;t&&o.observe(t),window.addEventListener("resize",t=>{e.cube.check_show_throttle()})});const i=e=>n.pointerdown(e),s=e=>n.pointermove(e),a=e=>n.pointerup(e),l=e=>n.pointercancel(e),c=e=>n.compositionstart(e),d=e=>n.compositionupdate(e),u=e=>n.compositionend(e),h=e=>n.beforeinput(e),p=e=>n.dragover(e),f=e=>n.dragenter(e),m=e=>n.dragleave(e),_=e=>n.drop(e);return Zn(()=>{document.documentElement.addEventListener("pointerup",a),document.documentElement.addEventListener("pointermove",s),document.documentElement.addEventListener("pointercancel",l)}),(e,n)=>(No(),Oo("div",{class:"cube-map",id:e.cube.id,"data-type":e.cube.type},[jo("div",{class:"note",onPointerdown:i,onCompositionstart:c,onCompositionupdate:d,onCompositionend:u,onBeforeinput:h},[(No(),Oo("svg",{ref_key:"svg",ref:r,style:de(Yt(t).css),onDragover:p,onDragenter:f,onDragleave:m,onDrop:_},[jo("g",{transform:Yt(t).matrix2d_dom_string},[jo("g",{"data-group":Yt(v).markers,class:"group-defs"},[...n[0]||(n[0]=[Go('<defs data-v-6cc57278>\x3c!-- 箭头 --\x3e<marker id="marker-arrow" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><path d="M 0 0 L 6 3 L 0 6 z" data-v-6cc57278></path></marker>\x3c!-- 圆 --\x3e<marker id="marker-point" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><circle cx="3" cy="3" r="3" data-v-6cc57278></circle></marker>\x3c!-- 方块 --\x3e<marker id="marker-square" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-6cc57278><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-6cc57278></rect></marker>\x3c!-- 菱形 --\x3e<marker id="marker-rhomb" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="45" fill="context-stroke" data-v-6cc57278><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-6cc57278></rect></marker></defs>',1)])],8,Ic),jo("g",{"data-group":Yt(v).outbox,class:"group-outbox"},[(No(!0),Oo(wo,null,hr(Yt(t).nodes_outbox,e=>(No(),Oo("path",{key:e.id,class:"node-outbox",d:e.status.outbox},null,8,Bc))),128))],8,Dc),jo("g",{"data-group":Yt(v).linkers,class:"group-linkers"},[(No(!0),Oo(wo,null,hr(Yt(t).linkers_view,e=>(No(),Eo(Hs,{key:e.id,cube:e},null,8,["cube"]))),128))],8,jc),jo("g",{"data-group":Yt(v).nodes,class:"group-nodes"},[(No(!0),Oo(wo,null,hr(Yt(t).nodes_view,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],8,Hc),jo("g",{"data-group":Yt(v).placeholder,class:"group-placeholder"},[Yt(t).placeholder_box_selector?(No(),Oo("path",{key:0,class:"placeholder-box-selector",d:Yt(t).placeholder_box_selector},null,8,Fc)):Vo("v-if",!0),(No(!0),Oo(wo,null,hr(Yt(t).placeholder_linkers,e=>(No(),Oo(wo,{key:e.path},[e?(No(),Oo("path",{key:0,class:"placeholder-linker",d:e.path,style:de({stroke:e.stroke,"stroke-width":e.width}),"marker-start":`url(#${e.anchor_start})`,"marker-end":`url(#${e.anchor_end})`},null,12,$c)):Vo("v-if",!0)],64))),128)),Yt(t).placeholder_line_delete?(No(),Oo("path",{key:1,class:"placeholder-line-delete",d:Yt(t).placeholder_line_delete,stroke:"#ff7f7f","marker-start":"url(#marker-point)","marker-end":"url(#marker-arrow)"},null,8,Gc)):Vo("v-if",!0),Ho(Ws,{cube:e.cube},null,8,["cube"]),Vo(' <rect :x="cube.view_rect.x" :y="cube.view_rect.y" :width="cube.view_rect.width" :height="cube.view_rect.height" stroke="#0891b2" fill="none" stroke-width="2"></rect> ')],8,qc)],8,Lc)],36)),Vo(" doc-cubes "),jo("div",Vc,[(No(!0),Oo(wo,null,hr(Yt(t).postils.values(),e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))])],32),Vo(" scope selection "),(No(!0),Oo(wo,null,hr(Yt(t).scopes,e=>(No(),Eo(Ds,{key:e.id,selection:qt(e)},null,8,["selection"]))),128)),Vo(" map status "),Ho(Va,{cube:e.cube},null,8,["cube"]),Vo(" menus "),Ho(Cc,{root:e.cube},null,8,["root"]),Ho(Rc,{root:e.cube},null,8,["root"])],8,Ec))}}),Kc=(0,Is.A)(Uc,[["__scopeId","data-v-6cc57278"]]);class Wc extends Pi{_pcube;_children=[];_has_postil=Vt(!1);postil=null;data;constructor(e,t){super(),this._pcube=t;const n=structuredClone(e),r=Mi.versions,o=this.update_data(r,n);this.data=o.data,this._setup(),this.cubes.add_cube(this)}get pcube(){return this._pcube}get has_postil(){return this._has_postil.value}set has_postil(e){this._has_postil.value=e,this.status.update_has_postil(e)}get root(){return this.pcube.root}get courier(){return this.root.courier}get config(){return this.root.config}get history(){return this.root.history}get hotkeys(){return this.root.hotkeys}get cursor(){return this.root.cursor}get event(){return this.root.event}get clipboard(){return this.root.clipboard}get float(){return this.root.float}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get stats(){return this.root.stats}get versions(){return this.root.versions}get text(){let e="";for(let t of this.children)e+=t.text,t instanceof hu&&(e+="\n");return this instanceof hu&&(e+="\n"),e}get top(){let e=this;for(;e;){if(e.pcube instanceof Ts)return e;e=e.pcube}return e}get is_empty(){const e=this.children;return 0===e.length||1===e.length&&this.child_first.is_empty}get children(){return[...this._children]}get dom(){return document.getElementById(this.id)}get level(){return this.pcube.level+1}get host_postil(){return this instanceof Yd?this:this.pcube.host_postil}get in_postil(){return this instanceof Yd||this.pcube.in_postil}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_first_line(){for(let e of this._children)if(e instanceof hu)return e}get child_last(){return this.children[this.children.length-1]}get pid(){return this.pcube.id}get id(){return this.data.id}get css(){return{...this.data.css,"margin-left":this.attrs.indent>0?this.attrs.indent*this.root.config.data.line_indent+"px":"0px"}}get attrs(){return this.data.attrs||(this.data.attrs={}),this.data.attrs}get info(){return this.data.info}get type(){return this.data.type}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get prev_cube(){return this.pcube.find_prev_cube(this.id)}get next_cube(){return this.pcube.find_next_cube(this.id)}get prev_cube_deep(){let e=this;for(;e;){let t=e.prev_cube;if(t instanceof rd)return t;e=e.pcube}}get next_cube_deep(){let e=this;for(;e;){let t=e.next_cube;if(t instanceof rd)return t;e=e.pcube}}get index(){return this.pcube?this.pcube.find_child_index(this.id):0}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}_setup(){this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_css,this.on_cube_set_css.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(_.Names.cube_delete_adjacent,this.on_cube_delete_adjacent.bind(this)),this.set_cmd_handler(_.Names.cube_postil_add,this.on_postil_add.bind(this)),this.set_cmd_handler(_.Names.cube_postil_remove,this.on_postil_remove.bind(this)),this.set_cmd_handler(g.Names.cursor_in_head,this.on_cursor_in_head.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ti.init_cmd_handler(this)}setup(){this.build_child(this.data)}create_child_block(e){const t=od.pick(e);return od.build_cubes(t.list,this)}gc(){this.base_gc()}base_gc(){this.cubes.remove_cube(this);for(let e of this.children)e.gc()}base_export(){const e=structuredClone(this.data);return this.postil&&(e.attrs.postil=this.postil.export()),e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Mk||t instanceof Kc)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}remove_self(e="backward"){const{pcube:t,courier:n,index:r}=this,o=new ld(n);return o.tell(t,zi.delete_child(t.id,e,[r,r+1])),o}merge(e){const{pcube:t,cursor:n,courier:r}=this,{cube_end:o,offset_end:i}=n;if(!o)return;const s=new ld(r);return s.tell(this,zi.merge(this.id,e,o.id,i)),s}find_cube(e){if(e===this.id)return this;for(let t of this.children){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];e(this)&&t.push(this);for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}is_contains_cube(e){if(e===this)return!0;let t=e;for(;t;){if(t.pcube===this)return!0;t=t.pcube}return!1}find_upstream_untill(e){if(!e.is_contains_cube(this))return;let t=this;for(;t;){if(t instanceof rd&&t.pcube===e)return t;t=t.pcube}}find_upstream_target(e){let t=this;for(;t instanceof rd;)if(t=t.pcube,e(t))return t}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}on_cube_set_selection_css(e){const{cursor:t,courier:n}=this,{css:r,start_id:o,end_id:i,offset_end:s,offset_start:a,toggle:l,replace:c}=e,d=new ld(n);if(o!==i||s!==a){if(i&&!o){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,zi.set_selection_css(t.id,r,null,i,"head",s,l,c)),d}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,zi.set_selection_css(t.id,r,o,null,a,"tail",l,c)),d}if("tail"===s&&"head"===a){for(let e of this.children)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d}if(i&&o){const e=this.find_cube(o),t=this.find_cube(i),n=e?.find_upstream_untill(this),u=t?.find_upstream_untill(this);if(!n||!u)return;const h=this.children.slice(n.index+1,u.index);for(let e of h)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(n,zi.set_selection_css(n.id,r,o,null,a,"tail",l,c)),n!==u&&d.tell(u,zi.set_selection_css(u.id,r,null,i,"head",s,l,c)),d}}}on_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r}=this,o=new ld(t),{data:i,end_id:s,start_id:a,offset_end:l,offset_start:c}=e,d=this.find_cube(a),u=this.find_cube(s),h=d?.find_upstream_untill(this),p=u?.find_upstream_untill(this);if(!h||!p)return o;if(u!==d||c!==l)if(h&&h===p)o.tell(h,zi.delete(h.id,"backward",a,s,c,l)),o.tell(h,zi.insert(h.id,i,a,s,c,l));else{o.tell(p,zi.delete(p.id,"backward",null,s,"head",l)),o.tell(this,zi.delete_child(this.id,"backward",[h.index+1,p.index])),o.tell(this,zi.insert_child(this.id,i,h.index+1)),o.tell(h,zi.delete(h.id,"backward",a,null,c,"tail"));let e=i[i.length-1];const t=this.top.find_cube(e.id);t&&o.tell(t,Ni.in_tail(e.id))}else o.tell(u,zi.insert(s,i,a,s,c,l));return o}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ld(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[0,t.index],l)),c.tell(t,zi.delete(t.id,r,o,i,"head",s,l)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[t.index+1,this.child_count],l)),c.tell(t,zi.delete(t.id,r,o,i,a,s,l)),c}if("head"===a&&"tail"===s){if(l){if(this.is_empty)return;c.tell(this,zi.delete_child(this.id,r,[1,this.child_count]));const e=this.child_first;e.meta.block?c.tell(e,zi.delete_child(e.id,r,[0,e.child_count],l)):e instanceof Qd?c.tell(e,Xd.reset(e.id,"​",1,1)):c.tell(e,zi.reset(e.id,[]))}else c.tell(this.pcube,zi.delete_child(this.pid,"backward",[this.index,this.index+1]));return c}if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!e||!t)return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,zi.delete(n.id,r,o,i,a,s,!0));else if(c.tell(l,zi.delete(l.id,r,null,i,"head",s)),c.tell(this,zi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,zi.delete(n.id,r,o,null,a,"tail",!0)),e instanceof Qd){const t=e.get_valid_index(a);e.set_cursor_in_head(t)}return c}}on_cube_set_css(e){const{courier:t,cursor:n}=this,{css:r,toggle:o,replace:i}=e,s=t.get_recorder();if(s.add_cmd(e),i){const e=structuredClone(this.css);return this.data.css=r,s.add_recover(zi.set_css(this.id,e,!1,!0)),s}if(0===Object.keys(r).length)return;let a=!0;const l=structuredClone(this.css),c=structuredClone(this.css);for(let e in r){const t=r[e],n=this.css[e]||null;l[e]=n,null===t||o&&t===n?(a=!1,delete c[e]):t!==n&&(a=!1,c[e]=t)}return this.data.css=c,a?void 0:(this.status.update_css(),s.add_recover(zi.set_css(this.id,l)),s)}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(this.attrs[e])||null,null===t?delete this.data.attrs[e]:this.data.attrs[e]=t}return this.status.update_attrs(),o.add_recover(zi.set_attr(this.id,i)),o}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r,index:o}=this,{from:i,from_id:s,offset:a}=e,l=new ld(t);if(this.meta.block){const e=this.child_first,t=this.child_last;this.is_empty&&l.tell(n,zi.delete_child(r,"backward",[this.index,this.index+1])),"left"===i?l.tell(e,Ni.in_head(e.id)):l.tell(t,Ni.in_tail(t.id))}else l.tell(n,zi.delete_child(r,"backward",[this.index,this.index+1]));return l}on_postil_add(e){const{courier:t}=this,{data:n}=e;if(this.postil){const e=new ld(t),r=this.postil;return e.tell(r,zi.insert_child(r.id,n,r.child_count)),this.has_postil=!0,this.postil.show=!0,e}{const r=t.get_recorder();r.add_cmd(e);const o=Yd.get_default(n),i=new Yd(o,this);return this.postil=i,r.add_recover(zi.postil_remove(this.id,[0,i.child_count])),this.postil.show=!0,this.has_postil=!0,r}}on_postil_remove(e){const{courier:t}=this,{range:n}=e,[r,o]=n,i=this.postil;if(!i)return;let s=r<0?0:r,a=o>i.child_count?i.child_count:o;if(s<=0&&a>=i.child_count){const n=t.get_recorder();n.add_cmd(e);const r=i.export();return n.add_recover(zi.postil_add(this.id,r.info)),this.postil=null,this.has_postil=!1,i.gc(),n}{const e=new ld(t);return e.tell(i,zi.delete_child(i.id,"backward",[s,a])),e}}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t);if(this.meta.block){const e=this.child_first;if(!e)return i;i.tell(e,Ni.in_head(e.id))}else if(this instanceof Qd)this.prev_cube instanceof Qd&&this.len>=1?this.set_cursor_in_head(1):this.set_cursor_in_head(0);else if(o&&o instanceof Qd)o.set_cursor_in_head();else{const e=Qd.get_default();i.tell(r,zi.insert_child(r.id,[e],this.index+1))}return i}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t);if(this.meta.block){const e=this.child_last;if(!e)return i;i.tell(e,Ni.in_tail(e.id))}else if(this instanceof Qd)this.next_cube instanceof Qd&&this.len>=1?this.set_cursor_in_tail(1):this.set_cursor_in_tail(0);else if(n&&n instanceof Qd)n.set_cursor_in_tail();else{const e=Qd.get_default();i.tell(r,zi.insert_child(r.id,[e],this.index))}return i}is_valid_range(e,t=!1){const[n,r]=e;return!(n<0||r>this.child_count)&&(!t||n!==r)}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class Yc{_cube;constructor(e){this._cube=e}get cube(){return this._cube}get pcube(){return this.cube.pcube}}class Xc{static layout_tree(e){const t=e.env.layout_type;if(t)return"right"===t?this.right(e):"left"===t?this.left(e):"down"===t?this.down(e):"up"===t?this.up(e):"time-down"===t?this.time_down(e):"time-right"===t?this.time_right(e):"file-tree"===t?this.file_tree(e):void 0}static right(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x,y:n.y+n.height/2-r.height/2}}static left(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width-r.width,y:n.y+n.height/2-r.height/2}}static down(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width/2-r.width/2,y:n.y}}static up(e){const t=e.map2d,n=t.rect_raw,r=t.size_tree_raw;return{x:n.x+n.width/2-r.width/2,y:n.y+n.height-r.height}}static time_down(e){const t=e.map2d.rect_raw;let n=t.width;const r=e.env.downstream_visible;for(let e of r){const t=e.map2d.rect_raw.width;t>n&&(n=t)}return{x:t.x+t.width/2-n/2,y:t.y}}static file_tree(e){const t=e.map2d.rect_raw;return{x:t.x,y:t.y}}static time_right(e){const t=e.map2d.rect_raw;let n=t.height;const r=e.env.downstream_visible;for(let e of r){const t=e.map2d.rect_raw.height;t>n&&(n=t)}return{x:t.x,y:t.y+t.height/2-n/2}}}class Jc{static layout_tree(e,t,n){const r=e.env.layout_type,o=e.env.downstream_visible;return 0===o.length||("right"===r?this.right(e,o,t,n):"left"===r?this.left(e,o,t,n):"down"===r?this.down(e,o,t,n):"up"===r?this.up(e,o,t,n):"time-down"===r?this.time_down(e,o,t,n):"time-right"===r?this.time_right(e,o,t,n):"file-tree"===r?this.file_tree(e,o,t,n):this.none(e,o)),o}static none(e,t){for(let e=0;e<t.length;e++){const n=t[e],r=Xc.layout_tree(n);r&&n.map2d.update_pos_tree(r.x,r.y,!1)}}static right(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x+n+s.width,c=i.y,d=0,u=0;if(a.height<=s.height){let e=0;for(let n of t)e+=n.map2d.rect_raw.height;e+=(t.length-1)*r,u=(s.height-e)/2}for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(l,c+d+e*r+u),d+=n.size_tree_raw.height}}static left(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x+a.width-s.width-n,c=i.y,d=0,u=0;if(a.height<=s.height){let e=0;for(let n of t)e+=n.map2d.rect_raw.height;e+=(t.length-1)*r,u=(s.height-e)/2}for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(l-n.size_tree_raw.width,c+d+e*r+u),d+=n.size_tree_raw.height}}static down(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw;let a=i.x,l=i.y+r+s.height,c=0;for(let e=0;e<t.length;e++){const r=t[e].map2d;r.update_pos_tree(a+c+e*n,l),c+=r.size_tree_raw.width}}static up(e,t,n,r){const o=e.map2d,i=o.pos_tree_raw,s=o.rect_raw,a=o.size_tree_raw;let l=i.x,c=i.y+a.height-s.height-r,d=0;for(let e=0;e<t.length;e++){const r=t[e].map2d;r.update_pos_tree(l+d+e*n,c-r.size_tree_raw.height),d+=r.size_tree_raw.width}}static time_right(e,t,n,r){const o=e.map2d.rect_raw;let i=o.x+o.width+n,s=o.y+o.height/2,a=0;for(let e=0;e<t.length;e++){const r=t[e],o=r.map2d,l=o.rect_raw,c=o.size_tree_raw,d=r.attrs.layout;"right"===d||"left"===d?o.update_pos_tree(i+a+e*n,s-c.height/2):"up"===d?o.update_pos_tree(i+a+e*n,s-(c.height-l.height/2)):o.update_pos_tree(i+a+e*n,s-l.height/2),a+=c.width}}static file_tree(e,t,n,r){const o=e.map2d.rect_raw,i=o.x+o.width/2+n,s=o.y+o.height+r;let a=0;for(let e=0;e<t.length;e++){const n=t[e].map2d;n.update_pos_tree(i,s+a+e*r),a+=n.size_tree_raw.height}}static time_down(e,t,n,r){const o=e.map2d.rect_raw;let i=o.x+o.width/2,s=o.y+o.height+r,a=0;for(let e=0;e<t.length;e++){const n=t[e],o=n.map2d,l=n.env.layout_type,c=o.rect_raw,d=o.size_tree_raw;"left"===l?o.update_pos_tree(i-(d.width-c.width/2),s+a+e*r):"down"===l||"up"===l?o.update_pos_tree(i-d.width/2,s+a+e*r):o.update_pos_tree(i-c.width/2,s+a+e*r),a+=d.height}}}class Zc{_node;_map;_upenv;_env={root:void 0,upstream:void 0,downstream:[],layout:null,prev:void 0,next:void 0,index:0};constructor(e){this._node=e,this._map=e.pcube}get env(){return{...this._env}}get root(){return this._env.root}get status(){return this.node.status}get map2d(){return this.node.map2d}get map(){return this._map}get to(){return this.node.to}get from(){return this.node.from}get attrs(){return this._node.attrs}get upenv(){return this._upenv}get nodes_to(){return this.node.nodes_to}get nodes_from(){return this.node.nodes_from}get node(){return this._node}get index(){return this.upstream?this.upstream.env.downstream.indexOf(this.node):0}get prev_node(){if(!this.upstream)return;const e=this.index;return this.upstream.env.downstream[e-1]}get next_node(){if(!this.upstream)return;const e=this.index;return this.upstream.env.downstream[e+1]}get child_last(){const e=this._env.downstream;return e[e.length-1]}get child_first(){return this._env.downstream[0]}get level(){return this.is_captive?this.layout_line.length-1:0}get layout_type(){return this._env.layout||this.node.attrs.layout||null}get upstream(){return this._env.upstream}get downstream_visible(){return this.folded_self?[]:this.downstream}get downstream(){return this._env.downstream}get downstream_nodes(){const e=new Set,t=n=>{for(const r of n)e.add(r),t(r.env.downstream)};return t(this._env.downstream),e}get is_captive(){return!this.is_layout_root&&(this.layout_root&&this.upstream?.env.layout_type)}get is_under_root(){const e=this.layout_root,t=this.layout_root!==this.node;return e&&t}get has_layout_ability(){return!!this.layout_root}get is_under_free_root(){const e=this.layout_root;return!!e&&!e.env.layout_type}get layout_line(){if(this.is_layout_root)return[this.node];if(!this.upstream)return[];const e=[];let t=this.node;for(;t;){if(e.unshift(t),t.is_layout_root)return e;t=t.env.upstream}return[]}get is_layout_root(){return this.node.is_layout_root||!1}get layout_root(){return this.is_layout_root?this.node:this._env.root}get folded_upstream(){return!this.is_layout_root&&(this.upenv?.folded_self||this.upenv?.folded_upstream)}get folded_self(){return this.node.attrs.fold}get folded(){return this.folded_self||this.folded_upstream}get raw_layout_type(){return this._env.layout||this.attrs.layout||null}check_env(e=!0){const t=Qi.find_line_to_layout_root(this.node);return!t.has_root&&e&&this.clear(),{...t,root:t.line[t.line.length-1]}}free_root(){if(this.check_env(!1).has_root)return;const e=this.node.courier.get_recorder();if(this.folded_self){const t=ts.layout_change(this.node.id,{fold:!1});e.tell(this.node,t)}const t=this.downstream_nodes;this.clear();const n=new Map;for(let e of t){e.env.clear();const t=e.env.check_env();t.has_root&&n.set(e,t)}const r=new Map;for(let[e,t]of n)for(let e of t.line.slice(1)){const n=t.line[t.line.length-1];if(n&&(e.env.is_captive||e.is_layout_root)){const t=r.get(n);(!t||t.env.level>e.env.level)&&r.set(n,e);break}}for(let[e,t]of r)t.env.flow("downstream"),t.map2d.flow("downstream"),t.map2d.flow("upstream"),t.env.root?.layout_throttle();return e}clear(){this._upenv=void 0,this._env.upstream=void 0,this._env.downstream.length=0,this._env.layout=null,this._env.root=this.node.is_layout_root?this.node:void 0,this.map2d.update_pos(),this.status.update_layout_type(this.layout_type),this.status.update_has_layout_ability(this.has_layout_ability),this.status.update_upstream(this._env.upstream)}update(e,t){if(e===this)return console.error("🟠Error: Layout Env loop");this._upenv=e,this._env.upstream=e.node,this._env.root=e.layout_root,this._env.layout=e.get_downstream_layout_type(this.node),this._env.index=t,this._env.prev=e.env.downstream[t-1],this._env.next=e.env.downstream[t+1],this.status.update_upstream(e.node),this.status.update_layout_type(this.layout_type),this.status.update_has_layout_ability(this.has_layout_ability)}flow(e="downstream",t=!0){if(this._node.is_layout_root&&this.clear(),this._env.downstream.length=0,t){if(!this.check_env().has_root)return this._env}const n=new Set,r=this._map.get_node_to(this._node.id)||[];for(let e of r){const t=this._map.get_node(e);if(!t)continue;n.clear();const r=Qi.get_direct_layout_parent(t,n);null!==r?r===this.node&&this._env.downstream.push(t):t.env.clear()}const o="downstream"===e;for(let e=0;e<this._env.downstream.length;e++){const t=this._env.downstream[e];t.env.update(this,e),o&&t.env.flow("downstream",!1)}return this.status.update_downstream(this._env.downstream),this._env}get_downstream_layout_type(e){const t=this.layout_type;if(!t)return null;if(e===this.node)return t;const n=e.attrs.layout||null;return El.check_allow(this._node,n,!1)?n:"right"===t?"right":"left"===t?"left":"up"===t?"up":"down"===t?"down":"time-right"===t?"time-down":"time-down"===t?"right":t}}class Qc extends Wc{_editable=!1;_waiter=new Set;_layouted=!1;_env=new Zc(this);constructor(e,t){super(e,t),this._init_handler()}get layouted(){return this._layouted}set layouted(e){this._layouted=e,this.status.update_layouted(e)}get is_selected(){return this.pcube.is_node_selected(this)}get env(){return this._env}get mis(){return 2}get map(){return this.pcube}get matrix2d(){return this.attrs.matrix2d}get show(){return this.pcube.is_node_visible(this)}get attrs(){return this.data.attrs}get editable(){return this._editable}set editable(e){this.pcube.set_node_editing(this,e),this._editable=e,this.status.update_editable(e)}get is_folded(){return this.attrs.fold||!1}get is_layout_root(){return this.data.attrs.root||!1}get from(){const e=this.pcube.get_node_from(this.id);return new Set(e||[])}get to(){const e=this.pcube.get_node_to(this.id);return new Set(e||[])}get linkers_from(){const e=[];for(let t of this.from){const n=Qi.get_linker_id(t,this.id),r=this.pcube.get_linker(n);r&&e.push(r)}return e}get linkers_to(){const e=[];for(let t of this.to){const n=Qi.get_linker_id(this.id,t),r=this.pcube.get_linker(n);r&&e.push(r)}return e}get node_last(){const e=this.pcube.get_node_to(this.id),t=e?e[e.length-1]:this.id;return this.pcube.get_node(t)||this}get count_from(){return this.from.size}get count_to(){return this.to.size}get nodes_to(){const e=[];for(let t of this.to){const n=this.pcube.get_node(t);n&&e.push(n)}return e}get nodes_from(){const e=[];for(let t of this.from){const n=this.pcube.get_node(t);n&&e.push(n)}return e}get matrix2d_real(){const{a:e,b:t,c:n,d:r,e:o,f:i}=this.matrix2d;if(this.is_layout_root||!this.env.upstream)return{...this.matrix2d};{const o=this.map2d.pos;return{a:e,b:t,c:n,d:r,e:o.x,f:o.y}}}_init_handler(){this.set_cmd_handler(_.Names.cube_reset,this.on_reset.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_cube_insert.bind(this)),this.set_cmd_handler(_.Names.cube_reorder,this.on_cube_reorder.bind(this)),this.set_cmd_handler(_.Names.cube_delete_child,this.on_delete_child.bind(this)),this.set_cmd_handler(_.Names.cube_insert_child,this.on_insert_child.bind(this)),this.set_cmd_handler(x.Names.append_child,this.on_append_child.bind(this)),this.set_cmd_handler(x.Names.layout_update,this.on_layout_update.bind(this))}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Mk||t instanceof ih)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}move_to_center(){const e=this.pcube.get_view_center(),t=this.pcube.transform_point(e),n=this.map2d.pos_center,r=this.pcube.real_point_to_fig(n),o=t.x-r.x,i=t.y-r.y,s=Zi.multiply(this.pcube.matrix2d,Zi.get_matrix_translate(o,i));this.pcube.reset_matrix(s)}move_in_fig_view(){if(this.check_in_fig_view(!0))return;const e=this.pcube,t=e.view_rect,{dx:n,dy:r}=Gi.MathRect.move_rect_in_other(this.map2d.rect,t),o=Zi.multiply(e.matrix2d,Zi.get_matrix_translate(n,r));e.reset_matrix(o),this.map.check_show()}check_in_fig_view(e=!1){const t=this.pcube.view_rect;return e?Gi.MathRect.is_include(t,this.map2d.rect):Gi.MathRect.check_intersection(t,this.map2d.rect)}check_show_downstream(){return this.env.folded}layout(e=0,t=0){let n=Date.now(),r=this.is_layout_root;r&&this.map2d.update_pos_tree_root();const o=this.attrs.gap_x||e||this.config.data_raw.map_node_gap_x,i=this.attrs.gap_y||t||this.config.data_raw.map_node_gap_y;if(this.env.has_layout_ability){const e=Jc.layout_tree(this,o,i);for(let t of e)t.layout(o,i);r&&console.log("⚫布局根布局",this.id,Date.now()-n)}r&&this.map.check_show_throttle()}layout_throttle=Gi.Notice.throttle(this.layout.bind(this),10);layout_self(e){const t=e.borderBoxSize[0];if(!t)return;const{blockSize:n,inlineSize:r}=t,o=this.map2d.rect_cbox;if(this.layouted&&Math.abs(o.width-r)<this.mis&&Math.abs(o.height-n)<this.mis)return;const i={width:Math.ceil(r),height:Math.ceil(n)};this.map2d.update_size(i.width,i.height);for(let e of this._waiter)e();this.layouted=!0}wait_layout_self(){return new Promise(e=>{this.layouted?e(!0):this._waiter.add(e)})}restore_layout_from_cache(){for(let e of this._waiter)e();this._waiter.clear(),this.layouted=!0}check_show_line(){const e=this.id;for(let t of this.to){const n=Qi.get_linker_id(e,t),r=this.pcube.get_linker(n);r&&(this.attrs.fold?this.pcube.set_linker_visible(r,!1):r.to_node?.show||this.show?this.pcube.set_linker_visible(r,!0):this.pcube.set_linker_visible(r,!1))}for(let t of this.from){const n=Qi.get_linker_id(t,e),r=this.pcube.get_linker(n);if(!r)continue;let o=r.from_node;const i=!o?.attrs.fold,s=this.show||o?.show;i&&s?this.pcube.set_linker_visible(r,!0):this.pcube.set_linker_visible(r,!1)}}gc(){this.base_gc(),this.map?.grider.remove_node(this)}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(),{children:r,data:o}}reset_matrix(e){Object.assign(this.attrs.matrix2d,e),this.map2d.update_pos()}get_node(e){if(e)return this.pcube.get_node(e)}get_layout_index(e){return e.indexOf(this)}translate(e,t){const n=Zi.translate(this.matrix2d,e,t);this.reset_matrix(n)}break_link_node(e){this.from.delete(e),this.to.delete(e)}remove_self(){for(let e of this.from){const t=this.pcube.find_child_cube(e);t&&t instanceof Qc&&t.break_link_node(this.id)}for(let e of this.to){const t=this.pcube.find_child_cube(e);t&&t instanceof Qc&&t.break_link_node(this.id)}return super.remove_self()}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}on_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=this.export().info,i=od.build_cubes(n,this);return this.splice(0,this.child_count,...i),r.add_recover(zi.reset(this.id,o)),r}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ld(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(zi.reorder(this.id,s.id,c)),a}on_insert_child(e){const{courier:t}=this,n=t.get_recorder();n.add_cmd(e);const{pos:r,data:o}=e;if(0===o.length)return n;const i=[];for(let e of o)e.type===S.Cubes.box_root&&i.push(new xu(e,this));let s=this.get_valid_index(r);this.splice(s,0,...i);const a=i[i.length-1];return a&&n.tell(a,Ni.in_tail(a.id)),n.add_recover(zi.delete_child(this.id,"backward",[s,s+i.length])),n}on_delete_child(e){const{courier:t,pcube:n,pid:r}=this,{dir:o,range:i}=e;if(!this.is_valid_range(i))return;const[s,a]=i,l=t.get_recorder();l.add_cmd(e);const c=this.children[s-1],d=this.children[a],u=a-s;if(s<=0&&a>=this.child_count){l.tell(this,zi.reset(this.id,[]));const e=zi.insert_child(this.id,[xu.get_default()],0);return l.tell(this,e),l}{let e=this.splice(s,u);c&&"backward"===o||!d?l.tell(c,Ni.in_tail(c.id)):(d&&"forward"===o||!c)&&l.tell(d,Ni.in_head(d.id));const t=e.data;l.add_recover(zi.insert_child(this.id,t,s))}return l}on_cube_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r,pcube:o}=this,i=new ld(t),{data:s,end_id:a,start_id:l,offset_end:c,offset_start:d}=e,u=this.find_cube(l),h=this.find_cube(a),p=u?.find_upstream_untill(this),f=h?.find_upstream_untill(this);if(!p||!f)return i;if(h!==u||d!==c)if(p&&p===f)i.tell(p,zi.delete(p.id,"backward",l,a,d,c)),i.tell(p,zi.insert(p.id,s,l,a,d,c));else{i.tell(f,zi.delete(f.id,"backward",null,a,"head",c)),i.tell(this,zi.delete_child(this.id,"backward",[p.index+1,f.index])),i.tell(this,zi.insert_child(this.id,e.data,p.index+1)),i.tell(p,zi.delete(p.id,"backward",l,null,d,"tail"));let t=e.data[e.data.length-1];if(t){const e=this.find_child_cube(t.id);e&&i.tell(e,Ni.in_tail(t.id))}}else i.tell(h,zi.insert(a,s,l,a,d,c));return i}on_layout_update(e){const{courier:t,history:n}=this,r={...e.attrs},o=t.get_recorder(),i=structuredClone(Ht(this.data.attrs));o.add_cmd(e);const s={fold:i.fold,is_under_root:this.env.is_under_root,upstream:this.env.upstream,is_root:this.is_layout_root,outbox:i.outbox};"layout"in r&&r.layout&&(this.env.is_under_root||"root"in r||i.root||(r.root=!0),"file-tree"!==r.layout||this.attrs.line_type||r.line_type||(r.line_type="fold1"));for(let e in r){const t=r[e];t!==this.attrs[e]&&(this.attrs[e]=t)}let a=!1,l=!1,c=!1;const d="layout"in r&&i.layout!==r.layout,u="fold"in r&&s.fold!==r.fold,h="gap_x"in r&&i.gap_x!==r.gap_x,p="gap_y"in r&&i.gap_y!==r.gap_y,f="root"in r&&i.root!==r.root,m="matrix2d"in r&&r.matrix2d,_="outbox"in r&&i.outbox!==r.outbox,g="line_type"in r&&i.line_type!==r.line_type,b="line_width"in r&&i.line_width!==r.line_width,x="fill"in r&&i.fill!==r.fill;if(m&&!this.env.is_captive&&(this.map2d.update_pos(),this.env.has_layout_ability)){if(this.env.is_under_free_root){const e=Xc.layout_tree(this);e&&this.map2d.update_pos_tree(e.x,e.y,!1)}this.layout_throttle(),this.is_layout_root&&(c=!0)}if(f)if(!s.is_root&&r.root)s.upstream?.env.flow("self"),s.upstream?.map2d.flow("self"),s.upstream?.map2d.flow("upstream"),s.upstream?.env.layout_root?.layout_throttle(),this.env.flow("downstream"),this.map2d.flow("downstream"),this.layout_throttle(),l=!0,a=!0,c=!0;else if(s.is_root&&!this.is_layout_root){const e=Qi.find_line_to_layout_root(this);if(e.has_root){const t=e.line[1];t?.env.flow("downstream"),t?.map2d.flow("self"),t?.map2d.flow("upstream"),t?.env.layout_root?.layout_throttle()}else o.merge(this.env.free_root()),this.map.check_show_throttle()}if(l||d&&(this.is_layout_root?this.env.flow("downstream"):this.env.upstream?.env.flow("downstream"),this.env.layout_root?.layout_throttle(),l=!0,c=!0),a||(d||u||h||p)&&(this.map2d.flow("downstream"),this.map2d.flow("upstream"),this.env.layout_root?.layout_throttle(),a=!0),c||(d||u||h||p)&&this.env.layout_root?.layout_throttle(),g||b||x){const e=new Set;for(let t of this.linkers_to)e.add(t);for(let t of this.env.downstream_nodes){if(g&&!t.attrs.line_type||b&&!t.attrs.line_width||x&&!t.attrs.fill)for(let n of t.linkers_to)e.add(n)}for(let t of e)t.map2d.update_path()}_&&this.pcube.set_node_outbox(this,this.attrs.outbox||!1),this.status.update_attrs();const v=ts.layout_change(this.id,i);return o.add_recover(v),o}on_append_child(e){const{courier:t,history:n,pcube:r}=this,{previd:o,nodes:i}=e,s=(this.map2d.node_gap_x,t.get_recorder()),a=i.map(e=>e.id),l=r.get_node_to(this.id);if(l)if(null===o)l.unshift(...a);else if(o){const e=l.indexOf(o);l.splice(e+1,0,...a)}const c=es.node_add(r.id,i);s.tell(r,c);const d=[];for(let e of i){const t=Qi.create_linker_info(this.pcube,this.id,e.id);d.push(t)}const u=es.linker_add(r.id,d);return s.tell(r,u),this.env.flow("self"),s}static get_default_node_size(e=0){return{width:$i.default_config.map_node_default_width+2*e,height:52+2*e}}static get_default_node_pos(e,t){const{map_node_padding:n}=t.config.data_raw,r=t.view_point_to_real(e),o=Qc.get_default_node_size(n);return{x:r.x-o.width/2,y:r.y-o.height/2}}}class ed{_map2d;constructor(e){this._map2d=e}get map2d(){return this._map2d}get env(){return this.map2d.env}get_pos(){const e=this.env.layout_type;return"right"===e?this.pos_right():"left"===e?this.pos_left():"down"===e?this.pos_down():"up"===e?this.pos_up():"time-right"===e?this.pos_time_right():"time-down"===e?this.pos_time_down():"file-tree"===e?this.pos_file_tree():void 0}get_size_tree(){const e=this.map2d.node,t=e.env.downstream_visible,n=e.env.layout_type,r=this.map2d.rect_raw;return 0===t.length?{width:r.width,height:r.height}:"left"===n?this.size_tree_left(t):"right"===n?this.size_tree_right(t):"down"===n?this.size_tree_down(t):"up"===n?this.size_tree_up(t):"time-right"===n?this.size_tree_time_right(t):"time-down"===n?this.size_tree_time_down(t):"file-tree"===n?this.size_tree_file_tree(t):void 0}get_root_pos_tree(){return Xc.layout_tree(this.map2d.node)}pos_left(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width-r.width,t.y=n.y+o.height/2-r.height/2,t}pos_right(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x,t.y=n.y-r.height/2+o.height/2,t}pos_up(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width/2-r.width/2,t.y=n.y+o.height-r.height,t}pos_down(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw,r=e.rect_raw,o=e.size_tree_raw;return t.x=n.x+o.width/2-r.width/2,t.y=n.y,t}pos_time_right(){const e=this.map2d,t={x:0,y:0},n=e.pos_tree_raw;t.x=n.x;const r=e.node.env.downstream_visible;if(0===r.length)return{x:n.x,y:n.y};const o=e.rect_raw.height/2;let i=o;for(let e of r){let t=e.map2d.size_tree_raw,n=e.map2d.rect_raw.height/2;if("up"===e.env.layout_type){let e=t.height-n;e>i&&(i=e)}else{n>i&&(i=n)}}return t.y=n.y+i-o,t}pos_file_tree(){const e=this.map2d.pos_tree_raw;return{x:e.x,y:e.y}}pos_time_down(){const e=this.map2d,t=e.pos_tree_raw,n=e.node.env.downstream_visible;if(0===n.length)return{x:t.x,y:t.y};const r={x:0,y:0};r.y=t.y;const o=e.rect_raw.width/2;let i=o;for(let e of n){let t=e.map2d.size_tree_raw,n=e.map2d.rect_raw.width/2;if("left"===e.env.layout_type){let e=t.width-n;e>i&&(i=e)}else{n>i&&(i=n)}}return r.x=t.x+i-o,r}size_tree_left(e){const t=this.map2d,n={width:0,height:0},r=this.map2d.node_gap_x,o=this.map2d.node_gap_y,i=t.rect_raw;let s=0,a=0;for(let t of e){let e=t.map2d.size_tree_raw;a+=e.height,e.width>s&&(s=e.width)}return n.width=i.width+r+s,n.height=Math.max(i.height,a+(e.length-1)*o),n}size_tree_right(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.height,e.width>i&&(i=e.width)}return t.width=o.width+n+i,t.height=Math.max(o.height,s+(e.length-1)*r),t}size_tree_down(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.width,e.height>i&&(i=e.height)}return t.width=Math.max(o.width,s+(e.length-1)*n),t.height=o.height+r+i,t}size_tree_up(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){let e=t.map2d.size_tree_raw;s+=e.width,e.height>i&&(i=e.height)}return t.width=Math.max(o.width,s+(e.length-1)*n),t.height=o.height+r+i,t}size_tree_file_tree(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=this.map2d.node_gap_y,o=this.map2d.rect_raw;let i=0,s=0;for(let t of e){const e=t.map2d.size_tree_raw;s+=e.height,e.width>i&&(i=e.width)}return t.width=Math.max(o.width,o.width/2+n+i),t.height=o.height+r+s+(e.length-1)*r,t}size_tree_time_right(e){const t={width:0,height:0},n=this.map2d.node_gap_x,r=(this.map2d.node_gap_y,this.map2d.rect_raw);let o=r.height/2,i=0,s=o,a=o;for(let t of e){let e=t.map2d.size_tree_raw,n=t.map2d.rect_raw.height/2,r=t.env.layout_type;if(i+=e.width,n>s&&(s=n),n>a&&(a=n),"up"===r){let t=e.height-n;t>s&&(s=t)}else{let t=e.height-n;t>a&&(a=t)}}return t.width=r.width+i+e.length*n,t.height=s+a,t}size_tree_time_down(e){const t={width:0,height:0},n=(this.map2d.node_gap_x,this.map2d.node_gap_y),r=this.map2d.rect_raw;let o=r.width/2,i=0,s=o,a=o;for(let t of e){let e=t.map2d.size_tree_raw,n=t.map2d.rect_raw.width/2,r=t.env.layout_type;if(i+=e.height,n>s&&(s=n),n>a&&(a=n),"left"===r){let t=e.width-n;t>s&&(s=t)}else{let t=e.width-n;t>a&&(a=t)}}return t.width=s+a,t.height=r.height+i+e.length*n,t}}class td extends Yc{_meter=new ed(this);_shape_type="rect";_shape_path="";_shape_sample=[];_size_tree=Qc.get_default_node_size();_rect_cbox={x:$i.default_config.map_node_padding,y:$i.default_config.map_node_padding,...Qc.get_default_node_size()};_rect={x:0,y:0,...Qc.get_default_node_size()};_pos_tree={x:0,y:0};_synced_rect=!1;constructor(e){super(e);const t=e.data.attrs,n=t.matrix2d,r=n.e,o=n.f;this.shape_type=t.shape||"rect",this.pos_tree={x:r,y:o},this.rect={x:r,y:o},t.size&&(this.update_size(t.size.width,t.size.height),e.restore_layout_from_cache())}get cube(){return this._cube}get node(){return this._cube}get map(){return this.cube.map}get meter(){return this._meter}get config(){return this.cube.config}get env(){return this.cube.env}get status(){return this.cube.status}get matrix2d(){return{...this.node.matrix2d}}get attrs(){return this.cube.attrs}get rect(){return{...this._rect}}get rect_raw(){return this._rect}set rect(e){Object.assign(this._rect,e),this.sync_rect()}get rect_cbox(){return{...this._rect_cbox}}set rect_cbox(e){Object.assign(this._rect_cbox,e),this.status.update_rect_cbox(this._rect_cbox)}get sample_count(){return 8}get shape_type(){return this._shape_type}set shape_type(e){this._shape_type=e,this.status.update_shape_type(e)}get shape_path(){return this._shape_path}set shape_path(e){this._shape_path=e,this.status.update_shape_path(e)}get shape_sample(){return[...this._shape_sample]}set shape_sample(e){this._shape_sample.length=0,this._shape_sample.push(...e),this.status.update_shape_sample(e)}get size_tree(){return{...this._size_tree}}get size_tree_raw(){return this._size_tree}set size_tree(e){Object.assign(this._size_tree,e)}get pos(){return{x:this._rect.x,y:this._rect.y}}get pos_center(){return{x:this._rect.x+this._rect.width/2,y:this._rect.y+this._rect.height/2}}get pos_tree(){return{...this._pos_tree}}get rect_tree(){return{...this._pos_tree,...this._size_tree}}set pos_tree(e){Object.assign(this._pos_tree,e)}get pos_tree_raw(){return this._pos_tree}get is_layout_root(){return this.cube.is_layout_root}get up2d(){return this.env.upstream?.map2d}get node_fill(){return this.is_layout_root?this.attrs.fill:this.attrs.fill||this.up2d?.node_fill}get node_line_type(){return this.is_layout_root?this.attrs.line_type||this.node.config.data_raw.map_linker_type:this.attrs.line_type||this.up2d?.node_line_type||this.node.config.data_raw.map_linker_type}get node_line_width(){return this.is_layout_root?this.attrs.line_width||this.node.config.data_raw.map_linker_width:this.attrs.line_width||this.up2d?.node_line_width||this.node.config.data_raw.map_linker_width}get node_line_anchor_in(){return this.is_layout_root?this.attrs.anchor_in||this.node.config.data_raw.map_linker_anchor_in:this.attrs.anchor_in||this.up2d?.node_line_anchor_in||this.node.config.data_raw.map_linker_anchor_in}get node_line_anchor_out(){return this.is_layout_root?this.attrs.anchor_out||this.node.config.data_raw.map_linker_anchor_out:this.attrs.anchor_out||this.up2d?.node_line_anchor_out||this.node.config.data_raw.map_linker_anchor_out}get node_gap_x(){return this.is_layout_root?this.attrs.gap_x||this.node.config.data_raw.map_node_gap_x:this.attrs.gap_x||this.up2d?.node_gap_x||this.node.config.data_raw.map_node_gap_x}get node_gap_y(){return this.is_layout_root?this.attrs.gap_y||this.node.config.data_raw.map_node_gap_y:this.attrs.gap_y||this.up2d?.node_gap_y||this.node.config.data_raw.map_node_gap_y}update_pos_cbox(){const e=this.node.attrs.shape,{width:t,height:n}=this.rect,{map_node_padding:r}=this.node.config.data,o=t/2,i=n/2;"circle"===e?(this.rect_cbox={x:o-this._rect_cbox.width/2,y:i-this._rect_cbox.height/2},this._rect_cbox.x=o-this._rect_cbox.width/2,this._rect_cbox.y=i-this._rect_cbox.height/2):(this._rect_cbox.x=r,this._rect_cbox.y=r)}update_pos(){if(this.env.has_layout_ability&&!this.node.is_layout_root){const e=this.meter.get_pos();e&&(Object.assign(this._rect,e),this._synced_rect=!1)}else if(this.env.is_captive)this.env.folded_self&&(Object.assign(this._rect,this.pos_tree),this._synced_rect=!1);else{const e=this.matrix2d,t=e.e,n=e.f;Object.assign(this._rect,{x:t,y:n}),this._synced_rect=!1}this.map.grider.update_node(this.node)}get_pos_center(){const e=this.rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}update_pos_tree_root(){if(!this.node.is_layout_root)return;const e=this.node.env.layout_type,t=this.matrix2d.e,n=this.matrix2d.f;if(!e||this.node.attrs.fold)this._pos_tree.x=t,this._pos_tree.y=n;else{const e=this.meter.get_root_pos_tree();e&&Object.assign(this._pos_tree,e)}this.cube.attrs.outbox&&this.status.update_outbox(this.rect_tree)}update_pos_tree(e,t,n=!0){this._pos_tree.x=e,this._pos_tree.y=t,n&&this.update_pos()}update_size(e,t){this.rect_cbox={width:e,height:t},this.update_rect(),this.update_pos_cbox(),this.pcube.has_layout&&Promise.resolve().then(async()=>{if(this.flow("upstream"),this.pcube.has_layout&&!this.node.clipboard.pasting){const e=this.node.env.layout_root;e&&e.layout_throttle()}})}update_rect(){const{map_node_padding:e}=this.node.config.data,t=this._rect_cbox.width+2*e,n=this._rect_cbox.height+2*e;this.rect={width:t,height:n},this.update_path(),this.update_sample()}update_size_tree(){const e=this.meter.get_size_tree();Object.assign(this._size_tree,e),this.cube.attrs.outbox&&this.status.update_outbox(this.rect_tree)}flow(e="downstream"){const t=this.env.downstream_visible;if(0===t.length&&Object.assign(this._size_tree,this._rect),"downstream"===e){for(let e of t)e.map2d.flow();this.update_size_tree()}else if("upstream"===e){this.update_size_tree();const t=this.env.upstream;t?.is_layout_root?t.map2d.flow("self"):t?.map2d.flow(e)}else"self"===e&&this.update_size_tree()}get_bound_rect_point(e){const t=this.rect;return Gi.MathRect.get_rect_point(t,e)}update_path(){this.shape_path=Qu.get_shaple(this,this.node.config.data_raw.map_node_padding)}update_sample(){if("rect"===this.shape_type){const e=this.rect,t=Gi.MathRect.get_rect_point,n=Gi.IMath.RectPosition;this.shape_sample=[t(e,n.left_top),t(e,n.top_mid),t(e,n.right_top),t(e,n.right_mid),t(e,n.right_bottom),t(e,n.bottom_mid),t(e,n.left_bottom),t(e,n.left_mid),t(e,n.left_top)]}else this.shape_sample=Qi.svg_path_sample(this.shape_path,this.sample_count)}sync_rect(){this._synced_rect||(this.status.update_rect(this._rect),this.update_sample(),this._synced_rect=!0)}update_linkers(e){if("to"===e||"all"===e)for(let e of this.node.linkers_to)e.map2d.update_path();if("from"===e||"all"===e)for(let e of this.node.linkers_from)e.map2d.update_path()}}class nd extends Rs{_rect_cbox=Pt({x:0,y:0,...Qc.get_default_node_size()});_rect=Pt({x:10,y:10,...Qc.get_default_node_size()});_editable=Vt(!1);_shape_type=Vt("rect");_shape_path=Vt("");_shape_sample=Ot([]);_layout_type=Vt(null);_has_layout_ability=Vt(!0);__downstream=new Set;_downstream=Ot(this.__downstream);_layouted=Vt(!1);_upstream=Ut(void 0);_outbox=Vt("");constructor(e){super(e)}_downstream_nodes=gi(()=>{const e=[];let t=[...this._downstream];for(let n of t)e.push(n),t.push(...n.status.downstream);return e});_css=gi(()=>({...super.css,fill:this.node_fill,"--node-max-width":this.node_max_width+"px"}));get layouted(){return this._layouted.value}get cube(){return this._cube}get config(){return this.cube.config}get env(){return this.cube.env}get attrs(){return this._data.attrs}get upstream(){return this._upstream.value}get map2d(){return this.cube.map2d}get outbox(){return this._outbox.value}get layout_type(){return this._layout_type.value}get has_layout_ability(){return this._has_layout_ability.value}get downstream_nodes_count(){return this._downstream_nodes.value.length}get downstream_nodes(){return this._downstream_nodes.value}get downstream(){return[...this._downstream]}get css(){return this._css.value}get rect(){return{...this._rect}}get rect_cbox(){return{...this._rect_cbox}}get matrix2d(){return{...this.attrs.matrix2d}}get is_layout_root(){return this.attrs.root||!1}get upstatus(){return this.upstream?.status}get node_fill(){return this.is_layout_root?this.attrs.fill:this.attrs.fill||this.upstream?.status.node_fill}get node_line_type(){return this.is_layout_root?this.attrs.line_type||this.cube.config.data.map_linker_type:this.attrs.line_type||this.upstatus?.node_line_type||this.cube.config.data.map_linker_type}get node_line_width(){return this.is_layout_root?this.attrs.line_width||this.cube.config.data.map_linker_width:this.attrs.line_width||this.upstatus?.node_line_width||this.cube.config.data.map_linker_width}get node_anchor_in(){return this.is_layout_root?this.attrs.anchor_in||this.cube.config.data.map_linker_anchor_in:this.attrs.anchor_in||this.upstatus?.node_anchor_in||this.cube.config.data.map_linker_anchor_in}get node_anchor_out(){return this.is_layout_root?this.attrs.anchor_out||this.cube.config.data.map_linker_anchor_out:this.attrs.anchor_out||this.upstatus?.node_anchor_out||this.cube.config.data.map_linker_anchor_out}get node_gap_x(){return this.is_layout_root?this.attrs.gap_x||this.cube.config.data.map_node_gap_x:this.attrs.gap_x||this.upstatus?.node_gap_x||this.cube.config.data.map_node_gap_x}get node_gap_y(){return this.is_layout_root?this.attrs.gap_y||this.cube.config.data.map_node_gap_y:this.attrs.gap_y||this.upstatus?.node_gap_y||this.cube.config.data.map_node_gap_y}get node_max_width(){return this.is_layout_root?this.attrs.max_width||this.config.data.map_node_max_width:this.attrs.max_width||this.upstatus?.node_max_width||this.config.data.map_node_max_width}get matrix2d_dom_string(){const{a:e,b:t,c:n,d:r,e:o,f:i}=this.cube.matrix2d,s=this.rect;return`matrix(${e.toFixed(1)},${t},${n},${r.toFixed(1)},${s.x.toFixed(1)},${s.y.toFixed(1)})`}get editable(){return this._editable.value}get shape_type(){return this._shape_type.value}get shape_path(){return this._shape_path.value}get shape_sample(){return[...this._shape_sample]}update_layouted(e){this._layouted.value=e}update_upstream(e){this._upstream.value=e}update_has_layout_ability(e){this._has_layout_ability.value=e}update_downstream(e){this._downstream.clear();for(let t of e)this._downstream.add(t)}update_layout_type(e){this._layout_type.value=e}update_rect(e){Object.assign(this._rect,e)}update_rect_cbox(e){Object.assign(this._rect_cbox,e)}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.cube.matrix2d)}update_editable(e){this._editable.value=e}update_shape_type(e){this._shape_type.value=e}update_shape_path(e){this._shape_path.value=e}update_shape_sample(e){this._shape_sample.splice(0,this._shape_sample.length,...e)}update_outbox(e,t=8){const n={x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t},r={x:n.x,y:n.y},o={x:n.x+n.width,y:n.y+n.height};this._outbox.value=Qi.get_rect_area(r,o,8)}update_attrs(e){super.update_attrs(e),this.update_matrix2d(this.cube.matrix2d),this.update_outbox(this.cube.map2d.rect_tree)}}class rd extends Pi{_pcube;_children=[];_has_postil=!1;data;postil=null;constructor(e,t){super(),this._pcube=t;const n=structuredClone(e),r=Mi.versions,o=this.update_data(r,n);this.data=o.data,this._setup(),this.cubes.add_cube(this)}get pcube(){return this._pcube}get root(){return this.pcube.root}get courier(){return this.root.courier}get config(){return this.root.config}get history(){return this.root.history}get hotkeys(){return this.root.hotkeys}get cursor(){return this.root.cursor}get event(){return this.root.event}get clipboard(){return this.root.clipboard}get float(){return this.root.float}get painter(){return this.root.painter}get cubes(){return this.root.cubes}get stats(){return this.root.stats}get versions(){return this.root.versions}get text(){let e="";for(let t of this.children)e+=t.text,t instanceof hu&&(e+="\n");return this instanceof hu&&(e+="\n"),e}get boxroot(){let e=this;for(;e;){if(e instanceof xu)return e;e=e.pcube}return e}get is_empty(){const e=this.children;return 0===e.length||1===e.length&&this.child_first.is_empty}get children(){return[...this._children]}get has_postil(){return this._has_postil}set has_postil(e){this._has_postil=e,this.status.update_has_postil(e)}get dom(){return document.getElementById(this.id)}get level(){return this.pcube.level+1}get host_postil(){return this instanceof Yd?this:this.pcube.host_postil}get host_node(){let e=this.pcube;for(;e;){if(e instanceof Qc)return e;e=e.pcube}}get in_postil(){return this instanceof Yd||this.pcube.in_postil}get child_count(){return this.children.length}get child_first(){return this.children[0]}get child_first_line(){for(let e of this._children)if(e instanceof hu)return e}get child_last(){return this.children[this.children.length-1]}get pid(){return this.pcube.id}get id(){return this.data.id}get css(){return this.data.css||(this.data.css={}),{...this.data.css,"margin-left":this.attrs.indent>0?this.attrs.indent*this.root.config.data.line_indent+"px":"0px"}}get attrs(){return this.data.attrs||(this.data.attrs={}),this.data.attrs}get info(){return this.data.info}get type(){return this.data.type}get clientRect(){return this.dom?.getBoundingClientRect()}get clientRects(){return this.dom?.getClientRects()}get prev_cube(){return this.pcube.find_prev_cube(this.id)}get next_cube(){return this.pcube.find_next_cube(this.id)}get prev_cube_deep(){let e=this;for(;e;){let t=e.prev_cube;if(t instanceof rd)return t;e=e.pcube}}get next_cube_deep(){let e=this;for(;e;){let t=e.next_cube;if(t instanceof rd)return t;e=e.pcube}}get index(){return this.pcube?this.pcube.find_child_index(this.id):0}_setup(){this.set_cmd_handler(_.Names.cube_set_selection_css,this.on_cube_set_selection_css.bind(this)),this.set_cmd_handler(_.Names.cube_insert,this.on_insert.bind(this)),this.set_cmd_handler(_.Names.cube_delete,this.on_cube_delete.bind(this)),this.set_cmd_handler(_.Names.cube_set_css,this.on_cube_set_css.bind(this)),this.set_cmd_handler(_.Names.cube_set_attr,this.on_cube_set_attr.bind(this)),this.set_cmd_handler(_.Names.cube_delete_adjacent,this.on_cube_delete_adjacent.bind(this)),this.set_cmd_handler(_.Names.cube_postil_add,this.on_postil_add.bind(this)),this.set_cmd_handler(_.Names.cube_postil_remove,this.on_postil_remove.bind(this)),this.set_cmd_handler(g.Names.cursor_in_head,this.on_cursor_in_head.bind(this)),this.set_cmd_handler(g.Names.cursor_in_tail,this.on_cursor_in_tail.bind(this)),Ti.init_cmd_handler(this)}setup(){this.build_child(this.data)}splice(e,t,...n){const r=this._children.splice(e,t,...n);for(let e of r)e.gc();const o=[];for(let e of r)o.push(e.export());return this.status.update_children(this._children),{children:r,data:o}}get_children_cubedata(){const e=[];for(let t of this.children)e.push(t.export());return e}create_child_block(e){const t=od.pick(e);return od.build_cubes(t.list,this)}gc(){this.base_gc()}base_gc(){this.cubes.remove_cube(this);for(let e of this.children)e.gc()}base_export(){const e=structuredClone(Ht(this.data));return e.attrs.postil=void 0,this.postil&&(e.attrs.postil=this.postil.export()),e}copy(e,t){const n=this.children.slice(e,t),r=[];for(let e of n){let t=e.export();r.push(t)}return r}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Mk||t instanceof ih)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}remove_self(e="backward"){const{pcube:t,courier:n,index:r}=this;if(r<0)return;const o=new ld(n);return o.tell(t,zi.delete_child(t.id,e,[r,r+1])),o}merge(e){const{pcube:t,cursor:n,courier:r}=this,{cube_end:o,offset_end:i}=n;if(!o)return;const s=r.get_recorder();return s.tell(this,zi.merge(this.id,e,o.id,i)),s}find_cube(e){if(e===this.id)return this;for(let t of this.children){if(t.id===e)return t;const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];e(this)&&t.push(this);for(let n of this.children)e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this.children)e(t),t.each(e)}find_dom_cube(e){let t=e instanceof Element?e:e.parentElement;const n=[];for(;t;){if(t.id){let e;if(n.push(t.id),e=this.find_cube(t.id),e)return e}t=t.parentElement}}is_contains_cube(e){if(e===this)return!0;let t=e;for(;t;){if(t.pcube===this)return!0;t=t.pcube}return!1}find_upstream_untill(e){if(!e.is_contains_cube(this))return;let t=this;for(;t;){if(t.pcube===e)return t;t=t.pcube}}find_upstream_target(e){let t=this;for(;t;)if(t=t.pcube,e(t))return t}find_child_cube(e){return this.children.find(t=>t.id===e)}find_child_index(e){return this.children.findIndex(t=>t.id===e)}find_next_cube(e){const t=this.find_child_index(e);return this.children[t+1]}find_prev_cube(e){const t=this.find_child_index(e);return this.children[t-1]}on_cube_set_selection_css(e){const{cursor:t,courier:n}=this,{css:r,start_id:o,end_id:i,offset_end:s,offset_start:a,toggle:l,replace:c}=e,d=new ld(n);if(o!==i||s!==a){if(i&&!o){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(0,t.index);for(let e of n)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,zi.set_selection_css(t.id,r,null,i,"head",s,l,c)),d}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t)return;const n=this.children.slice(t.index+1);for(let e of n)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(t,zi.set_selection_css(t.id,r,o,null,a,"tail",l,c)),d}if("tail"===s&&"head"===a){for(let e of this.children)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d}if(i&&o){const e=this.find_cube(o),t=this.find_cube(i),n=e?.find_upstream_untill(this),u=t?.find_upstream_untill(this);if(!n||!u)return;const h=this.children.slice(n.index+1,u.index);for(let e of h)d.tell(e,zi.set_selection_css(e.id,r,e.id,e.id,"head","tail",l,c));return d.tell(n,zi.set_selection_css(n.id,r,o,null,a,"tail",l,c)),n!==u&&d.tell(u,zi.set_selection_css(u.id,r,null,i,"head",s,l,c)),d}}}on_insert(e){if(0===e.data.length)return;const{courier:t,cursor:n,pid:r}=this,o=new ld(t),{data:i,end_id:s,start_id:a,offset_end:l,offset_start:c}=e,d=this.find_cube(a),u=this.find_cube(s),h=d?.find_upstream_untill(this),p=u?.find_upstream_untill(this);if(!h||!p)return o;if(u!==d||c!==l)if(h&&h===p)o.tell(h,zi.delete(h.id,"backward",a,s,c,l)),o.tell(h,zi.insert(h.id,i,a,s,c,l));else{o.tell(p,zi.delete(p.id,"backward",null,s,"head",l)),o.tell(this,zi.delete_child(this.id,"backward",[h.index+1,p.index])),o.tell(this,zi.insert_child(this.id,i,h.index+1)),o.tell(h,zi.delete(h.id,"backward",a,null,c,"tail"));let e=i[i.length-1];const t=this.boxroot.find_cube(e.id);t&&o.tell(t,Ni.in_tail(e.id))}else o.tell(u,zi.insert(s,i,a,s,c,l));return o}on_cube_delete(e){const{courier:t,cursor:n}=this,{dir:r,start_id:o,end_id:i,offset_end:s,offset_start:a,reserve:l}=e,c=new ld(t);if(!o&&i){const e=this.find_cube(i),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[0,t.index],l)),c.tell(t,zi.delete(t.id,r,o,i,"head",s,l)),c}if(o&&!i){const e=this.find_cube(o),t=e?.find_upstream_untill(this);if(!t||!e)return;return c.tell(this,zi.delete_child(this.id,r,[t.index+1,this.child_count],l)),c.tell(t,zi.delete(t.id,r,o,i,a,s,l)),c}if("head"===a&&"tail"===s){if(l){if(this.is_empty)return;c.tell(this,zi.delete_child(this.id,r,[1,this.child_count]));const e=this.child_first;e.meta.block?c.tell(e,zi.delete_child(e.id,r,[0,e.child_count],l)):e instanceof Qd?c.tell(e,Xd.reset(e.id,"​",1,1)):c.tell(e,zi.reset(e.id,[]))}else c.tell(this.pcube,zi.delete_child(this.pid,"backward",[this.index,this.index+1]));return c}if(o&&i){const e=this.find_cube(o),t=this.find_cube(i);if(!e||!t)return;const n=e.find_upstream_untill(this),l=t.find_upstream_untill(this);if(!n||!l)return c;const d=n.index,u=l.index;if(o!==i||a!==s)if(n===l)c.tell(n,zi.delete(n.id,r,o,i,a,s,!0));else if(c.tell(l,zi.delete(l.id,r,null,i,"head",s)),c.tell(this,zi.delete_child(this.id,"backward",[d+1,u])),c.tell(n,zi.delete(n.id,r,o,null,a,"tail",!0)),e instanceof Qd){const t=e.get_valid_index(a);e.set_cursor_in_head(t)}return c}}on_cube_set_css(e){const{courier:t,cursor:n}=this,{css:r,toggle:o,replace:i}=e,s=t.get_recorder();if(s.add_cmd(e),i){const e=structuredClone(Ht(this.css));return this.data.css=r,this.status.update_css(this.css),s.add_recover(zi.set_css(this.id,e,!1,!0)),s}if(0===Object.keys(r).length)return;let a=!0;const l=structuredClone(Ht(this.data.css)),c=structuredClone(Ht(this.data.css));for(let e in r){const t=r[e],n=this.css[e]||null;l[e]=n,null===t||o&&t===n?(a=!1,delete c[e]):t!==n&&(a=!1,c[e]=t)}return this.data.css=c,a?void 0:(this.status.update_css(this.css),s.add_recover(zi.set_css(this.id,l)),s)}on_cube_set_attr(e){const{courier:t,cursor:n}=this,{attr:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===Object.keys(r).length)return;const i={};for(let e in r){const t=r[e];i[e]=structuredClone(Ht(this.attrs[e]))||null,null===t?delete this.data.attrs[e]:this.data.attrs[e]=t}return this.status.update_attrs(this.attrs),o.add_recover(zi.set_attr(this.id,i)),o}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r,index:o}=this,{from:i,from_id:s,offset:a}=e,l=new ld(t);if(this.meta.block){const e=this.child_first,t=this.child_last;this.is_empty&&l.tell(n,zi.delete_child(r,"backward",[this.index,this.index+1])),"left"===i?l.tell(e,Ni.in_head(e.id)):l.tell(t,Ni.in_tail(t.id))}else l.tell(n,zi.delete_child(r,"backward",[this.index,this.index+1]));return l}on_postil_add(e){const{courier:t}=this,{data:n}=e;if(this.postil){const e=new ld(t);return e.tell(this.postil,zi.insert_child(this.postil.id,n,this.postil.child_count)),this.has_postil=!0,this.postil.show=!0,e}{const r=t.get_recorder();r.add_cmd(e);const o=Yd.get_default(n),i=new Yd(o,this);return this.postil=i,r.add_recover(zi.postil_remove(this.id,[0,i.child_count])),this.postil.show=!0,this.has_postil=!0,r}}on_postil_remove(e){const{courier:t}=this,{range:n}=e,[r,o]=n,i=this.postil;if(!i)return;let s=r<0?0:r,a=o>i.child_count?i.child_count:o;if(s<=0&&a>=i.child_count){const n=t.get_recorder();n.add_cmd(e);const r=i.export();return n.add_recover(zi.postil_add(this.id,r.info)),this.postil&&(this.postil.show=!1),this.postil=null,this.has_postil=!1,i.gc(),n}{const e=new ld(t);return e.tell(i,zi.delete_child(i.id,"backward",[s,a])),e}}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t);if(this.meta.block){const e=this.child_first;if(!e)return i;i.tell(e,Ni.in_head(e.id))}else if(this instanceof Qd)this.set_cursor_in_head(0);else if(o&&o instanceof Qd)o.set_cursor_in_head();else{const e=Qd.get_default();i.tell(r,zi.insert_child(r.id,[e],this.index+1))}return i}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t);if(this.meta.block){const e=this.child_last;if(!e)return i;i.tell(e,Ni.in_tail(e.id))}else if(this instanceof Qd)this.set_cursor_in_tail(0);else if(n&&n instanceof Qd)n.set_cursor_in_tail();else{const e=Qd.get_default();i.tell(r,zi.insert_child(r.id,[e],this.index))}return i}is_valid_range(e,t=!0){const[n,r]=e;return!(n<0||r>this.child_count||n>r)&&(!t||n!==r)}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}get_valid_range(e){let[t,n]=e;return t<0&&(t=0),n>this.child_count&&(n=this.child_count),[t,n]}}class od{static get_id(){return yi()}static get_char_zws(){return"​"}static async sleep(e=100){return new Promise(t=>{setTimeout(t,e)})}static is_same_style(e,t){let n=new Set(Object.keys(e)),r=new Set(Object.keys(t)),o=new Set([...n,...r]);if(n.size!==o.size||n.size!==r.size)return!1;for(let r of n){if(e[r]!==t[r])return!1}return!0}static is_same_attrs(e,t){let n=new Set(Object.keys(e)),r=new Set(Object.keys(t)),o=new Set([...n,...r]);if(n.size!==o.size||n.size!==r.size)return!1;for(let r of n){if(e[r]!==t[r])return!1}return!0}async locate(e,t,n=!0){const{courier:r,history:o}=e,i=e.find_cube(t),s=vi.tips;if(i instanceof rd&&i.boxroot){const e=i.boxroot;if(i.find_upstream_untill(e)!==e.child_first){const t=r.get_recorder();t.tell(e,zi.fold(e.id,!1)),o.record(t)}}const a=document.getElementById(t);if(!a)return s?.tip_error("未发现书签锚点");let l=a.style.backgroundColor;a.style.backgroundColor="var(--locate-anchor-bg)",setTimeout(()=>{"var(--locate-anchor-bg)"===a.style.backgroundColor&&(a.style.backgroundColor=l)},3e3),n&&a.scrollIntoView({block:"center",behavior:"instant"})}static exports(e){const t=[];for(let n of e)t.push(n.export());return t}static build_cubes(e,t,n=[]){for(let r of e){if(!r)continue;let e=Mi.find_cube(r.type);if(e)n.push(new e(r,t));else{const e=new Sd(r,t,"未注册cube");n.push(e)}}return n}static get_client_rects(e){const t=document.getElementById(e);if(t)return t.getClientRects()}static pick(e,t=!1){const n=Mi.metas;let r=[],o=[],i=[],s=[],a=null,l=e,c=[];for(let t=0;t<e.length;t++){const n=e[t];if(n.type===S.Cubes.box_root){l=e.slice(0,t),c=e.slice(t+1),a=n,s.push(a);break}}let d=-1,u=-1;for(let e=0;e<l.length;e++){const t=l[e];n.get(t.type)?.block&&(d<0?d=e:u=e)}if(d>=0&&u>=0){const e=l.slice(0,d),s=l.slice(u+1),a=[];let c=hu.get_default();c.info=[];for(let e of l.slice(d,u+1))n.get(e.type)?.block?(e.type===S.Cubes.box&&t?a.push(...e.info):a.push(e),c.info.length>0&&(a.push(c),c=hu.get_default(),c.info=[])):c.info.push(e);r=e,o=a,i=s}else if(d>=0&&u<0){r=l.slice(0,d),i=l.slice(d+1);const e=l.slice(d,d+1);if(t)for(let t of e)t.type===S.Cubes.box?o.push(...t.info):o.push(t);else o=e}else r=l,o=[],i=[];if(a){let e=hu.get_default();e.info=[];for(let t of c)t.type===S.Cubes.box_root?(a=t,s.push(t)):n.get(t.type)?.block?(t.type===S.Cubes.box?a.info.push(...t.info):a.info.push(t),e.info.length>0&&a&&(a.info.push(e),e=hu.get_default())):e.info.push(t);e.info.length>0&&a&&a.info.push(e)}const h=[];if(r.length>0&&h.push(hu.get_default(r)),o.length>0&&h.push(...o),i.length>0&&h.push(hu.get_default(i)),s.length>0)for(let e of s)h.push(...e.info);return{head:r,body:o,tail:i,roots:s,list:h}}static find_line(e,t="first"){if(e instanceof hu)return e;const n=Mi.metas.get(e.type);if(!n||!n.block)return;const r="first"===t?e.children:e.children.reverse();for(let e of r){let n=this.find_line(e,t);if(n)return n}}static filter_out_empty(e){return e.filter(e=>!Qd.is_empty_text(e))}static get_flat_cube(e,t=!0){const n=e.children,r=[];if(t)for(let e of n)r.push(e),r.push(...this.get_flat_cube(e));else{r.push(...n);for(let e of r)r.push(...e.children)}return r}static replace_id(e,t,n,r={}){const o=[];for(let i of n){const n=Mi.find_cube(i.type);if(!n||!n.replace_id)continue;const s=n.update_data(t,i);o.push(n.replace_id(e,t,s.data,r))}return o}static check_mouse_key(e,t){let n={left:{pointermove:{button:-1,buttons:1},pointerdown:{button:0,buttons:1},pointerup:{button:0,buttons:0},contextmenu:{button:0,buttons:1}},right:{pointermove:{button:-1,buttons:2},pointerdown:{button:2,buttons:2},pointerup:{button:2,buttons:0},contextmenu:{button:2,buttons:0}},mid:{pointermove:{button:-1,buttons:4},pointerdown:{button:1,buttons:4},pointerup:{button:1,buttons:0}}}[t][e.type];return!(!n||e.button!=n.button||e.buttons!=n.buttons)}}class id extends xi{_record;_resolve;_status=M.pending;_p=Promise.resolve();_prev_tip_remove;get meta(){return id.meta}get status(){return this._status}constructor(e,t){const n=vi.tips;super(e),this._record=t,this._prev_tip_remove=n?.tip_info("播放器已就绪,点我播放",1/0,this.play.bind(this))}waiting(){return new Promise(e=>{this._resolve=e;[M.pending,M.playing].includes(this.status)&&e()})}clear_message(){this._prev_tip_remove&&this._prev_tip_remove()}async play(){const e=vi.tips;this.clear_message(),this.status!==M.stop&&(this._status=M.playing,this._prev_tip_remove=e?.tip_info("正在演示,点此暂停",1/0,this.pause.bind(this)));for(let e of this._record.stack){const t=this.courier.get_recorder();for(let n of e.do){await od.sleep(this.config.data.player_speed),await mn(),this.stats.showing=!0;let e=this.root.find_cube(n.id);e?(e.dom?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"}),t.tell(e,n)):console.warn(`未发现演示cube:${n}`)}await mn(),this.history.record(t),await this.waiting()}this._status=M.stop,this.clear_message(),this.stats.showing=!1,e?.tip_success("演示完毕",9e3)}pause(){const e=vi.tips;this.clear_message(),this._status!==M.stop&&(this._status=M.pause,this.stats.showing=!1,this._prev_tip_remove=e?.tip_info("暂停演示,点此恢复",1/0,this.continue.bind(this)))}continue(){const e=vi.tips;this.clear_message(),this._status!==M.stop&&(this._resolve&&this._resolve(),this._status=M.playing,this._prev_tip_remove=e?.tip_info("正在演示,点此暂停",1/0,this.pause.bind(this)))}load(){}export(){return{}}update_data(...e){return{}}static get meta(){return{type:S.Cores.player,version:1}}}class sd extends xi{stack_undo=Ot([]);stack_redo=Ot([]);get meta(){return sd.meta}get len_undo(){return this.stack_undo.length}get len_redo(){return this.stack_redo.length}constructor(e){super(e)}execute_command_group(e){let t=Promise.resolve();for(let n of e)t=t.then(()=>mn(()=>this.courier.pass(n)))}undo(){const e=vi.tips;if(this.stats.is_read_mode)return e?.tip_info("阅读模式不可操作");if(!this.courier)return;const t=this.stack_undo.pop();if(!t)return e?.tip_info("已无更多记录");this.stack_redo.push(t);const n=t.stack_undo;this.execute_command_group(n),this.event.emit_status_update()}redo(){const e=vi.tips;if(this.stats.is_read_mode)return e?.tip_info("阅读模式不可操作");if(!this.courier)return;const t=this.stack_redo.pop();if(!t)return e?.tip_info("已无更多记录");this.stack_undo.push(t);const n=t.stack_do;this.execute_command_group(n),this.event.emit_status_update()}record(e){if(!this.stats.is_read_mode&&0!==e.stack_undo.length){if(this.config.data.history_length>0&&this.config.data.history_length<Number.POSITIVE_INFINITY){const e=this.stack_undo.length-this.config.data.history_length;e>0&&this.stack_undo.splice(0,e)}this.stack_undo.push(e),this.event.emit_status_update()}}play(e){return new id(this.root,e)}export(e=0){const t=this.stack_undo.slice(e),n={version:this.meta.version,stack:[],docid:this.root.id};for(let e of t)n.stack.push({do:e.stack_do,undo:e.stack_undo});return n}download(e="record.json"){const t=this.export(),n=document.createElement("a");n.download="filename";const r=new Blob([JSON.stringify(t)],{type:"text/plain"});n.href=URL.createObjectURL(r),n.click()}update_data(...e){return{}}clear_stack(){this.stack_undo.length=0,this.stack_redo.length=0,this.event.emit_status_update()}static get meta(){return{type:S.Cores.history,version:1}}}class ad{_recorder;_cube;_cmds;_line=[];_status_action="pass";_status_event="capture";constructor(e,t,n){this._recorder=e,this._cube=t,this._cmds=n,this._line=this.get_cube_upstreams(!1)}get cube(){return this._cube}get cmds(){return this._cmds}get pcube(){return this.cube.pcube}get recorder(){return this._recorder}get line_bubble(){return[...this._line]}get line_capture(){return this._line.toReversed()}get status(){return this._status_action}reset_status(){this._status_action="pass"}stop(){this._status_action="stop"}stop_immediate(){this._status_action="stop-immediate"}check_in_line(e){return this._line.includes(e)}get_cube_upstreams(e=!0){let t=[],n=e?this.cube:this.pcube;for(;n;)t.push(n),n=n.pcube;return t}}class ld{do=[];undo=[];courier;get len_do(){return this.do.length}get len_undo(){return this.undo.length}get stack_do(){const e=[];return e.push(...this.do),e}get stack_undo(){const e=[];return e.push(...this.undo),e}constructor(e){this.courier=e}add_cmd(e){this.do.push(structuredClone(Ht(e)))}add_recover(e){e&&this.undo.unshift(e)}pass(e){let t=this.courier.pass(e);t instanceof ld&&this.merge(t)}tick(e,t){mn(()=>{t?this.tell(t,e):this.courier.pass(e)})}tell(e,...t){const n=vi.tips;if(!e)return this;if(this.courier.stats.is_read_mode)return n?.tip_info("只读模式不可操作"),this;const r=Object.freeze(t),o=new ad(this,e,r);for(let e of o.line_capture)if(e.event_capture(o),"stop-immediate"===o.status)return this;if("stop"===o.status)return this;for(let n of t)console.log("🟩",e,e.type,n),this.courier.event.emit_edit_before(e,n),this.merge(e.on(n)),this.courier.event.emit_edit_after(e,n);for(let e of o.line_bubble)if(e.event_bubble(o),"stop-immediate"===o.status)return this;return this}exe(e,...t){const n=vi.tips;if(!e)return this;if(this.courier.stats.is_read_mode)return n?.tip_info("只读模式不可操作"),this;for(let n of t){if(!e||e.id!==n.id)continue;console.log("🟨",e,e.type,n),this.courier.event.emit_edit_before(e,n);let t=e.on(n);this.merge(t),this.courier.event.emit_edit_after(e,n)}return this}merge(e){return e instanceof ld?(this.do.push(...structuredClone(Ht(e.stack_do))),this.undo.unshift(...structuredClone(Ht(e.stack_undo))),this):this}}function cd(e,t){return t.status.attrs.width?Number.parseInt(t.css.width.trim().slice(0,-2)):e.getBoundingClientRect().width}function dd(e,t,n,r){e.stopPropagation(),e.preventDefault(),r.isdown=!0,r.dir=n,r.dom=t.dom;const o=e.currentTarget,i=o.parentElement?.parentElement;if(!i)return;r.x=e.clientX,r.width_origin=t.css.width;const s=cd(i,t);r.width=s,r.width_result=s}const ud=["id","data-type"],hd={class:"tools-left"},pd={class:"tools-right"},fd=["src","loading"],md=En({__name:"cube-img",props:{cube:{}},setup(e){const{root:t,stats:n,status:r}=e.cube,o={isdown:!1,ismove:!1,x:0,width:-1,dir:"left",width_origin:500},i=Pt({resize_origin_width:-1,resize_result:-1,resize_scroll:!1}),s=t.id,a=vi.url,l=t=>dd(t,e.cube,"left",o),c=t=>dd(t,e.cube,"right",o),d=t=>function(e,t,n){if(!n.isdown||!n.dom||!od.check_mouse_key(e,"left"))return;n.ismove=!0,e.preventDefault();const r="left"===n.dir?1:-1,o=e.clientX-n.x,i=Math.abs(n.width-o*r);t.status.update_css({width:i+"px"},!1),n.width_result=i}(t,e.cube,o),u=t=>function(e,t,n){if(n.width===n.width_result||!n.isdown||!n.ismove)return;n.isdown=!1,n.ismove=!1,t.data.css.width=n.width_origin;const{courier:r,history:o}=t.root,i=new ld(r);i.tell(t,zi.set_css(t.id,{width:n.width_result+"px"})),o.record(i)}(0,e.cube,o),h=t=>function(e,t,n){if(n.width===n.width_result||!n.isdown||!n.ismove)return;n.isdown=!1,n.ismove=!1,t.data.css.width=n.width_origin;const{courier:r,history:o}=t.root,i=new ld(r);i.tell(t,zi.set_css(t.id,{width:n.width_result+"px"})),o.record(i)}(0,e.cube,o);function p(t){const n=t.currentTarget.parentElement;Object.assign(n.style,e.cube.css),n.classList.add("cube-img-load-failed")}function f(t){if(!i.resize_scroll)return;const{deltaY:n}=t,o=t.currentTarget;if(!o)return;t.preventDefault(),t.stopPropagation();let s=cd(o,e.cube)+10*Math.sign(n);r.update_css({width:s+"px"},!1),i.resize_result=s}return Zn(()=>{document.documentElement.addEventListener("pointermove",d),document.documentElement.addEventListener("pointerup",u),document.documentElement.addEventListener("pointercancel",h)}),nr(()=>{document.documentElement.removeEventListener("pointermove",d),document.documentElement.removeEventListener("pointerup",u),document.documentElement.removeEventListener("pointercancel",h)}),(o,d)=>(No(),Oo("div",{class:me(["cube-img",{"resize-scroll":i.resize_scroll}]),id:o.cube.id,"data-type":o.cube.type,onContextmenu:d[1]||(d[1]=e=>Yt(oc)(e,o.cube)),onWheel:f},[jo("div",hd,[jo("div",{class:"dragger",onPointerdown:l},null,32)]),jo("div",pd,[jo("div",{class:"dragger",onPointerdown:c},null,32)]),jo("img",{style:de(Yt(r).css),src:t.isdev?e.cube.info:a?a(s,"image",e.cube.info):void 0,alt:"",onErrorOnce:p,onClick:d[0]||(d[0]=t=>function(t){const n=t.currentTarget;if(i.resize_scroll=!i.resize_scroll)i.resize_origin_width=cd(n,e.cube);else{if(i.resize_origin_width<0||i.resize_result<0)return;const{courier:t,history:n}=e.cube.root;e.cube.status.update_css({width:i.resize_origin_width+"px"});const r=t.get_recorder();r.tell(e.cube,zi.set_css(e.cube.id,{width:i.resize_result+"px"})),n.record(r)}}(t)),loading:Yt(n).mode===Yt(w).NoteMode.export?"eager":"lazy"},null,44,fd)],42,ud))}}),_d=(0,Is.A)(md,[["__scopeId","data-v-65f0fb69"]]);class gd extends Rs{constructor(e){super(e)}}class bd extends rd{_status=new gd(this);constructor(e,t){super(e,t);const n=Mi.clipboard?.pasted_from;n&&this.event.emit_asset_copy(n.noteid,"image",e.info),this.setup(),this.status.init()}get status(){return this._status}get is_empty(){return 0===this.data.info.trim().length}get meta(){return bd.meta}get component(){return _d}build_child(){}update_data(e,t){return bd.update_data(e,t)}float_image(e){const{courier:t}=this.root,n={float:"L"===e?"inline-start":"inline-end"},r=t.get_recorder(),o=zi.set_css(this.id,n,!0);return r.tell(this,o),r}clear_float(){const{courier:e}=this.root,t=e.get_recorder(),n=zi.set_css(this.id,{float:null},!0);return t.tell(this,n),t}gc(){super.base_gc()}export(){return this.base_export()}replace_id(e,t,n={}){return bd.replace_id(this.root,e,t,n)}static get meta(){return{type:S.Cubes.img,cubename:"图片",block:!1,version:2,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n}static get_default(e="",t={},n={}){return{id:od.get_id(),type:S.Cubes.img,info:e,css:t,attrs:n}}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(1===n&&t.info.startsWith("image://")&&(t.info=t.info.slice(8)),{data:t,usable:!0})}}bd=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([Si],bd);const xd=["id","data-type"],vd={class:"lost-info"},yd=En({__name:"cube-lost",props:{cube:{}},setup:e=>(e,t)=>(No(),Oo("div",{class:"cube-lost",id:e.cube.id,"data-type":e.cube.type,style:de(e.cube.css)},[t[2]||(t[2]=jo("div",{class:"lost-title"},"异常方块",-1)),jo("div",vd,[t[0]||(t[0]=jo("div",null,"方块类型:",-1)),jo("div",null,ve(e.cube.cube_name),1),t[1]||(t[1]=jo("div",null,"异常原因:",-1)),jo("div",null,ve(e.cube.msg),1)])],12,xd))}),wd=(0,Is.A)(yd,[["__scopeId","data-v-2be8d488"]]);class kd extends Rs{constructor(e){super(e)}}class Sd extends rd{_status=new kd(this);_msg=Vt("");constructor(e,t,n){super(e,t),this.msg=n,this.status.init()}get status(){return this._status}get msg(){return this._msg.value}set msg(e){this._msg.value=e}get component(){return wd}get meta(){return Sd.meta}get cube_name(){return this.data.type}get is_empty(){return!1}get children(){return[]}build_child(){}update_data(e,t){return Sd.update_data(e,t)}gc(){}replace_id(e,t,n={}){return Sd.replace_id(this.root,e,t,n)}export(){const e=this.base_export();return e.attrs.postil&&(e.info.attrs.postil=e.attrs.postil),e}on_cursor_in_head(e){const{courier:t,next_cube:n}=this,r=new ld(t);return n&&r.tell(n,Ni.in_head(n.id)),r}on_cursor_in_tail(e){const{courier:t,prev_cube:n}=this,r=new ld(t);return n&&r.tell(n,Ni.in_head(n.id)),r}static get_default(e){return{id:yi(),type:S.Cubes.lost,info:e,css:{},attrs:{}}}static get meta(){return{cubename:"异常方块",type:S.Cubes.lost,block:!1,version:1,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Sd=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([Si],Sd);const Cd=["id","data-type"],Md=En({__name:"cube-text",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(){const t=e.cube.postil;t&&t.visible(!t.show)}return(e,r)=>(No(),Oo("span",{class:me(["cube-text",{"text-mark":Yt(t).has_postil}]),style:de(Yt(t).css),onClick:n,id:e.cube.id,"data-type":e.cube.type},ve(Yt(t).text),15,Cd))}}),zd=(0,Is.A)(Md,[["__scopeId","data-v-a618a1ba"]]),Nd=["id","data-type"],Ad={class:"iconbox"},Td=En({__name:"cube-annotation",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Pt({fold:!1});function r(){const{courier:t,history:n}=e.cube.root,r=e.cube.pcube,o=e.cube.index,i=new ld(t);i.tell(r,zi.delete_child(r.id,"backward",[o,o+1])),n.record(i)}function o(){n.fold=!n.fold}return(e,i)=>(No(),Oo("div",{class:"cube-annotation",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type},[jo("div",Ad,[jo("div",{class:me(["iconfont","icon-fold",n.fold?"annotation-icon-active":""]),onClick:o,title:"折叠批注块"},null,2),jo("div",{class:"iconfont icon-Delete",onClick:r,title:"删除批注块"})]),n.fold?Vo("v-if",!0):(No(),Oo("div",{key:0,class:me(["annotation-contents",{"annotation-fold":n.fold}])},[(No(!0),Oo(wo,null,hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:e,class:"annotation-box"},null,8,["cube"]))),128))],2))],12,Nd))}}),Rd=(0,Is.A)(Td,[["__scopeId","data-v-c5d949a8"]]);class Pd extends Rs{constructor(e){super(e)}}function Od(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Ed extends rd{_status=new Pd(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Rd}get meta(){return Ed.meta}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this._children)e.info.push(t.export());return e}build_child(e){od.build_cubes(e.info,this,this._children)}update_data(e,t){return Ed.update_data(e,t)}replace_id(e,t,n={}){return Ed.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(zi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,Ni.in_head(a.id)):o.tell(this.child_last,Ni.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e,[l,c]=a;if(!this.is_valid_range(a))return;let d=l,u=c;if(d>=u)return;if(d<=0&&u>=this.child_count)return this.is_empty?i.tell(o,zi.delete_child(n,s,[r,r+1])):i.tell(this,zi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(zi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,Ni.in_tail(h.id)):p&&i.tell(p,Ni.in_head(p.id)):"forward"===s&&(p?i.tell(p,Ni.in_head(p.id)):h&&i.tell(h,Ni.in_tail(h.id))),i}on_reset(e){const{courier:t,history:n}=this,{data:r}=e,o=new ld(t),i=[];for(let e of this.children)i.push(e.export());const s=od.build_cubes(r,this);this.splice(0,this.child_count,...s);return o.add_recover(zi.reset(this.id,i)),o}static get meta(){return{cubename:"批注",type:S.Cubes.annotation,block:!0,version:1,show:!1}}static get_default(e={},t={}){const n={id:yi(),type:S.Cubes.text,info:"​",attrs:{},css:{}},r={id:yi(),type:S.Cubes.line,info:[n],attrs:{},css:{}},o={id:yi(),type:S.Cubes.box,info:[r],attrs:{},css:{}};return{id:yi(),type:S.Cubes.annotation,info:[o],css:e,attrs:t}}static replace_id(e,t,n,r={}){t[this.meta.type];const o=n.id,i=od.get_id();r[o]=i,n.id=i;let s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Od([Ri(_.Names.cube_insert_child)],Ed.prototype,"on_insert_child",null),Od([Ri(_.Names.cube_delete_child)],Ed.prototype,"on_delete_child",null),Od([Ri(_.Names.cube_reset)],Ed.prototype,"on_reset",null),Ed=Od([Si],Ed);const Ld=["id","data-type"],Id={class:"title"},Dd=En({__name:"cube-text-link",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(){const t=document.createElement("a");t.href=e.cube.data.info.url,t.target="_blank",t.click()}function r(){e.cube.event.emit_text_link_edit(e.cube)}function o(){const{courier:t,history:n}=e.cube.root,{pcube:r,index:o}=e.cube,i=new ld(t);i.tell(r,zi.delete_child(r.id,"backward",[o,o+1])),n.record(i)}return(e,i)=>(No(),Oo("div",{class:"cube-link",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type},[jo("div",Id,ve(Yt(t).info.title),1),jo("div",{class:"link",onClick:n},ve(Yt(t).info.url),1),jo("div",{class:"iconbox"},[jo("div",{class:"iconfont icon-rename",onClick:r}),jo("div",{class:"iconfont icon-Delete",onClick:o})])],12,Ld))}}),Bd=(0,Is.A)(Dd,[["__scopeId","data-v-5c081d26"]]);class jd{static update(e,t,r){return{id:e,name:n.Names.update,title:t,url:r}}}class Hd extends Rs{constructor(e){super(e)}}function qd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Fd extends rd{_status=new Hd(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get info(){return this.data.info}get component(){return Bd}get meta(){return Fd.meta}get url(){return this.data.info.url}get title(){return this.data.info.title}build_child(e){}gc(){}export(){return this.base_export()}replace_id(e,t,n={}){return Fd.replace_id(this.root,e,t,n)}update_data(e,t){return Fd.update_data(e,t)}on_update_info(e){const{courier:t,cursor:n}=this,{url:r,title:o}=e,i=t.get_recorder();i.add_cmd(e);const s=this.info.title,a=this.info.url;return this.info.url=r,this.info.title=o,this.status.update_info(),i.add_recover(jd.update(this.id,s,a)),i}static get meta(){return{cubename:"文本链接",type:S.Cubes.link,block:!0,show:!1,version:1}}static get_default(e,t,n={},r={}){return{id:yi(),type:S.Cubes.link,info:{url:e,title:t},css:n,attrs:r}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}qd([Ri(n.Names.update)],Fd.prototype,"on_update_info",null),Fd=qd([Si],Fd);const $d=["id","data-type"],Gd={class:"iconbox"},Vd=En({__name:"cube-postil",props:{cube:{}},setup(e){const{status:t}=e.cube,n=gi(()=>t.children.filter(e=>e instanceof Fd)),r=gi(()=>t.children.filter(e=>!(e instanceof Fd)));function o(){e.cube.visible(!1)}function i(){const{courier:t,history:n}=e.cube.root,r=e.cube.pcube,o=new ld(t);o.tell(r,zi.postil_remove(r.id,[0,e.cube.child_count])),n.record(o)}function s(e){e.preventDefault(),e.stopPropagation();const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const{deltaY:n}=e;n>0?Gi.DomAnimation.scroll_element(t,20,"vertical"):Gi.DomAnimation.scroll_element(t,-20,"vertical")}return(e,a)=>Yt(t).show?(No(),Oo("div",{key:0,class:"cube-postil",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type},[jo("div",Gd,[jo("div",{class:"iconfont icon-a-Arrow-Right pointer",style:de({transform:`rotate(${Yt(t).pointer_angle}deg)`}),title:"批注目标位置"},null,4),a[0]||(a[0]=jo("div",{style:{flex:"1"}},null,-1)),jo("div",{class:"iconfont icon-Delete delete",title:"清空",onClick:i}),jo("div",{class:"iconfont icon-close close",title:"关闭",onClick:o})]),jo("div",{class:"mark-contents",onWheel:s},[(No(!0),Oo(wo,null,hr(n.value,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128)),(No(!0),Oo(wo,null,hr(r.value,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],32)],12,$d)):Vo("v-if",!0)}}),Ud=(0,Is.A)(Vd,[["__scopeId","data-v-3b33c2d4"]]);class Kd extends Rs{_show=Vt(!1);_pointer_angle=Vt(0);constructor(e){super(e)}get show(){return this._show.value}get pointer_angle(){return this._pointer_angle.value}update_pointer_angle(e){this._pointer_angle.value=e}get cube(){return this._cube}update_show(e){this._show.value=e,e?(this.root.listener.check_float(),this.root.status.add_postil(this.cube)):this.root.status.remove_postil(this.cube)}}function Wd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Yd extends rd{_status=new Kd(this);_handler_update_pos;_handler_corrent;_timer_corrent;_show=!1;constructor(e,t){super(e,t),this.setup(),this.status.init(),t.has_postil=!0}get status(){return this._status}get default_size(){return{x:0,y:0,width:180,height:130}}get show(){return this._show}set show(e){this._show=e,this.status.update_show(e)}get has_annotation(){for(let e of this.children)if(e instanceof Ed)return!0;return!1}get meta(){return Yd.meta}get component(){return Ud}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}build_child(e){od.build_cubes(e.info,this,this._children)}update_data(e,t){return Yd.update_data(e,t)}export(){const e=this.base_export();e.info=[];for(let t of this.children)e.info.push(t.export());return e}gc(){super.base_gc(),this.root.cubes.remove_cube(this),this._handler_update_pos&&(this.root.event.off(this._handler_update_pos),this._handler_update_pos=null)}replace_id(e,t,n={}){return Yd.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(zi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,Ni.in_head(a.id)):o.tell(this.child_last,Ni.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e;if(!this.is_valid_range(a))return;const[l,c]=a;let d=l,u=c;if(d<=0&&u>=this.child_count)return i.tell(this,zi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(zi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,Ni.in_tail(h.id)):p&&i.tell(p,Ni.in_head(p.id)):"forward"===s&&(p?i.tell(p,Ni.in_head(p.id)):h&&i.tell(h,Ni.in_tail(h.id))),i}on_reset(e){const{courier:t,history:n}=this,{data:r}=e,o=new ld(t),i=[];for(let e of this.children)i.push(e.export());const s=od.build_cubes(r,this);this.splice(0,this.child_count,...s);return o.add_recover(zi.reset(this.id,i)),o}visible(e){if(e){const{courier:e,child_last:t}=this;this.update_pos(),this.show=!0,mn(()=>{const n=e.get_recorder();n.tell(t,Ni.in_tail(t.id)),this.history.record(n)})}else this.show=!1}update_pos(e=!0){mn(()=>{const e=this.pcube.clientRect,t=this.clientRect||this.default_size;if(!e)return void(this.show=!1);const n={x:0,y:0,width:window.innerWidth,height:window.innerHeight},r=Gi.MathRect.move_rect_to_other(n,t,e,5);this.status.update_css({left:`${r.x}px`,top:`${r.y}px`}),this.update_pointer()})}update_pointer(){const e=document.getElementById(this.id),t=this.pcube.dom;if(!e||!t)return;const n=Array.from(t.getClientRects());let r,o;if(n.length>0){let e=0,t=0;for(const r of n)e+=r.x+r.width/2,t+=r.y+r.height/2;r=e/n.length,o=t/n.length}else{const e=t.getBoundingClientRect();r=e.x+e.width/2,o=e.y+e.height/2}const i=e.getBoundingClientRect(),s=r-(i.left+i.width/2),a=o-(i.top+i.height/2);this.status.update_pointer_angle(180*Math.atan2(a,s)/Math.PI)}static get_default(e=[],t={}){return{id:yi(),type:S.Cubes.postil,info:e,attrs:{},css:t}}static get meta(){return{cubename:"标注内容",type:S.Cubes.postil,show:!1,version:1,block:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Wd([Ri(_.Names.cube_insert_child)],Yd.prototype,"on_insert_child",null),Wd([Ri(_.Names.cube_delete_child)],Yd.prototype,"on_delete_child",null),Wd([Ri(_.Names.cube_reset)],Yd.prototype,"on_reset",null),Yd=Wd([Si],Yd);class Xd{static reset(t,n,r=NaN,o=NaN){return{id:t,name:e.Names.reset,info:n,pos:r,pos_before:o}}static break(t,n){return{id:t,name:e.Names.break,offset:n}}}class Jd extends Rs{constructor(e){super(e)}get cube(){return this._cube}get text(){return this._data.info}update_text(){this._data.info=this.cube.text}}function Zd(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Qd extends rd{_status=new Jd(this);constructor(e,t){super(e,t),this.setup(),this.status.init(),this.init()}get status(){return this._status}get attrs(){return this.data.attrs}get component(){return zd}get meta(){return Qd.meta}get is_empty(){return Qd.is_empty_text(this.data)}get len(){return this.text.length}get text(){return this.data.info}get text_node(){const e=this.dom?.firstChild;if(e instanceof Text)return e}get children(){return[]}get line(){let e=this.pcube;for(;e;){if(e instanceof hu)return e;e=e.pcube}}init(){this.root.stats.update_count_word(this.len)}build_child(e){const t=e.attrs?.postil;t&&(this.postil=new Yd(t,this))}gc(){super.base_gc(),this.root.stats.update_count_word(-this.len)}replace_id(e,t,n={}){return Qd.replace_id(this.root,e,t,n)}find_child_cube(e){}export(){return this.base_export()}update_data(e,t){return Qd.update_data(e,t)}merge_text(e){const{courier:t}=this,n=t.get_recorder(),r=this.prev_cube,o=this.next_cube,i=r instanceof Qd,s=o instanceof Qd;if(i&&s){const t=zi.merge(this.id,"both",this.id,e);n.tell(this,t)}else if(i){const t=zi.merge(this.id,"left",this.id,e);n.tell(this,t)}else if(s){const t=zi.merge(this.id,"right",this.id,e);n.tell(this,t)}return n}on_text_reset(e){const{courier:t,pid:n,index:r,pcube:o,len:i}=this,{info:s,pos:a,pos_before:l}=e,c=t.get_recorder();c.add_cmd(e);let d=this.text;const u=Qd.drop_zero_intelligence(s,a);return this.data.info=u.text,this.status.update_text(),Mi.stats?.update_count_word(u.len-i),c.add_recover(Xd.reset(this.id,d,l,a)),Number.isNaN(a)||this.set_cursor_in_head(u.pos),c}on_cursor_loc(e){const{from:t,from_offset:n,offset:r}=e,{courier:o}=this,i=o.get_recorder();return i.add_cmd(e),this.set_cursor_in_head(r),i.add_recover(Ni.loc(t,n,this.id,r)),i}on_partition(e){const{courier:t,cursor:n,pcube:r}=this,{start_id:o,end_id:i,offset_end:s,offset_start:a}=e,l=this.get_valid_index(a),c=this.get_valid_index(s),d=new ld(t),u=this.text.slice(0,l),h=this.text.slice(l,c),p=this.text.slice(c);if(h){const e=Qd.get_default(h,structuredClone(Ht(this.css)));if(u){if(u){const t=u.length,n=Xd.reset(this.id,u,t,t);if(d.tell(this,n),p){const e=Qd.get_default(p,structuredClone(Ht(this.css)));d.tell(r,zi.insert_child(r.id,[e],this.index+1))}d.tell(r,zi.insert_child(r.id,[e],this.index+1))}}else{const e=h.length,t=Xd.reset(this.id,h,e,e);if(d.tell(this,t),p){const e=Qd.get_default(p,structuredClone(Ht(this.css)));d.tell(r,zi.insert_child(r.id,[e],this.index+1))}}return d}if(0===l){const e=Qd.get_default();d.tell(r,zi.insert_child(r.id,[e],this.index))}else if(l===this.len){const e=Qd.get_default();d.tell(r,zi.insert_child(r.id,[e],this.index+1))}else if(l>0&&l<this.len){const e=Qd.get_default(p,structuredClone(Ht(this.css))),t=zi.insert_child(r.id,[e],this.index+1),n=u.length,o=Xd.reset(this.id,u,n,n);return d.tell(r,t),d.tell(this,o),d}return d}on_cube_merge(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o,pid:i,index:s}=this,{method:a,offset:l,cubeid:c}=e;let d=this.get_valid_index(l);const u=new ld(t);if("left"===a&&n instanceof Qd&&this.can_merge_with(n)){const e=n.id,t=zi.delete_child(i,"forward",[s-1,s]),o=Xd.reset(this.id,n.text+this.text,d+n.len,d);u.tell(r,t),u.tell(this,o),this.event.emit_text_merge(e,this.id)}else if("right"===a&&o instanceof Qd&&this.can_merge_with(o)){const e=o.id,t=zi.delete_child(i,"backward",[s+1,s+2]),n=Xd.reset(this.id,this.text+o.text,d,d);u.tell(r,t),u.tell(this,n),this.event.emit_text_merge(e,this.id)}else if("both"===a)if(n instanceof Qd&&o instanceof Qd&&this.can_merge_with(n)&&this.can_merge_with(o)){const e=n.len+d,t=n.id,i=o.id;u.tell(r,zi.delete_child(this.pid,"backward",[this.index-1,this.index])),u.tell(r,zi.delete_child(this.pid,"backward",[this.index+1,this.index+2])),u.tell(this,Xd.reset(this.id,n.text+this.text+o.text,e,d)),this.event.emit_text_merge(t,this.id),this.event.emit_text_merge(i,this.id)}else if(n instanceof Qd&&this.can_merge_with(n)){const e=n.id;u.tell(r,zi.delete_child(i,"forward",[s-1,s])),u.tell(this,Xd.reset(this.id,n.text+this.text,d+n.len,d)),this.event.emit_text_merge(e,this.id)}else if(o instanceof Qd&&this.can_merge_with(o)){const e=o.id;u.tell(r,zi.delete_child(i,"backward",[s+1,s+2])),u.tell(this,Xd.reset(this.id,this.text+o.text,d,d)),this.event.emit_text_merge(e,this.id)}return u}on_cube_insert(e){const{data:t,start_id:n,end_id:r,offset_end:o,offset_start:i}=e,{courier:s,pid:a,pcube:l}=this,c=new ld(s);this.cursor.has_selection;let d=i,u=o;if(d<0&&(d=0),u>this.text.length&&(u=this.text.length),o!==i){const e=zi.delete(this.id,"backward",this.id,this.id,i,o,!0);c.tell(this,e)}const h=od.pick(t),p=this.text.slice(0,d),f=this.text.slice(u);if(h.head.length>0)if(p)if(p&&f){const e=Xd.reset(this.id,p,p.length,p.length);c.tell(this,e);const t=Qd.get_default(f,structuredClone(Ht(this.css)),structuredClone(Ht(this.attrs)));c.tell(l,zi.insert_child(a,[t],this.index+1)),c.tell(l,zi.insert_child(a,h.head,this.index+1))}else f||c.tell(l,zi.insert_child(a,h.head,this.index+1));else c.tell(l,zi.insert_child(a,h.head,this.index));const m=[...h.body];if(h.tail.length>0&&m.push(hu.get_default(h.tail)),h.roots.length>0)for(let e of h.roots)m.push(...e.info);if(m.length>0){if(0===h.head.length&&o>0&&o<this.len){const e=Xd.reset(this.id,p,p.length,p.length);c.tell(this,e);const t=Qd.get_default(f,structuredClone(Ht(this.css)),structuredClone(Ht(this.attrs)));c.tell(l,zi.insert_child(a,[t],this.index+1))}0===o?c.tell(l,zi.insert_child(this.pid,m,this.index)):c.tell(l,zi.insert_child(this.pid,m,this.index+h.head.length+1))}return c}on_cube_delete(e){const{courier:t,index:n,pcube:r,pid:o}=this,{dir:i,start_id:s,end_id:a,offset_start:l,offset_end:c,reserve:d}=e,u=new ld(t),h=this.get_valid_index(l),p=this.get_valid_index(c),f=h!==p||"head"===l||"tail"===c;if(0===h&&p===this.len){if(d){const e=Xd.reset(this.id,"​",1,this.len);u.tell(this,e)}else u.tell(r,zi.delete_child(o,"backward",[n,n+1]));return u}const m=this.text.slice(0,h),_=this.text.slice(p);if(f){const e=Xd.reset(this.id,m+_,h,p);u.tell(this,e)}else{const e=h;if("backward"===i)if(0===e||0===Qd.drop_zero_width_space(this.text,h).pos){const e=this.prev_cube;e&&!e.meta.block?u.tell(e,zi.delete_adjacent(e.id,"right",this.id,0)):u.merge(this._delete_edge(i))}else if(this.is_empty)u.tell(r,zi.delete_child(o,"backward",[n,n+1]));else{const e=this.find_text_deleted(h,"left"),t=Xd.reset(this.id,e.text,e.pos,m.length);u.tell(this,t),e.text&&u.tell(this,zi.merge(this.id,"both",this.id,m.length-1))}else if("forward"===i)if(e===this.len||e===Qd.drop_zero_width_space(this.text,h).len){const e=this.next_cube;e&&!e.meta.block?u.tell(e,zi.delete_adjacent(e.id,"left",this.id,this.len)):u.merge(this._delete_edge(i))}else if(this.is_empty)u.tell(r,zi.delete_child(o,"forward",[n,n+1]));else{const t=this.find_text_deleted(e,"right"),n=Xd.reset(this.id,t.text,m.length,m.length),r=zi.merge(this.id,"both",this.id,m.length);u.tell(this,n),u.tell(this,r)}}return u}on_cube_set_selection_css(e){const{courier:t,pid:n,pcube:r}=this,{css:o,start_id:i,end_id:s,offset_start:a,offset_end:l,toggle:c,replace:d}=e;if(0===Object.keys(o).length&&!d)return;const u=new ld(t),h=this.get_valid_index(a),p=this.get_valid_index(l),f=Qd.drop_zero_width_space(this.text.slice(0,h),0).text,m=Qd.drop_zero_width_space(this.text.slice(h,p),0).text,_=Qd.drop_zero_width_space(this.text.slice(p),0).text;if(0===h&&p===this.len||h===p&&i===s)u.tell(this,zi.set_css(this.id,o,c,d)),u.tell(this,zi.merge(this.id,"both",this.id,p));else if(0===h&&m){const e=structuredClone(Ht(this.css)),t=Xd.reset(this.id,m,m.length,this.len);if(u.tell(this,t),u.tell(this,zi.set_css(this.id,o,c,d)),_){const t=Qd.get_default(_,e);u.tell(r,zi.insert_child(n,[t],this.index+1));const o=r.find_cube(t.id);o&&u.tell(o,zi.merge(t.id,"both",t.id,0))}u.tell(this,Ni.in_tail(this.id)),u.tell(this,zi.merge(this.id,"left",this.id,this.len))}else if(h>0){if(f){const e=Xd.reset(this.id,f,h,h),t=zi.merge(this.id,"left",this.id,p);u.tell(this,e,t)}if(_){const e=Qd.get_default(_,structuredClone(Ht(this.css))),t=[e];u.tell(r,zi.insert_child(n,t,this.index+1));const o=r.find_cube(e.id);o&&u.tell(o,zi.merge(o.id,"right",o.id,0))}if(m){const e=Qd.get_default(m,structuredClone(Ht(this.css)));u.tell(r,zi.insert_child(n,[e],this.index+1));const t=r.find_cube(e.id);t&&(u.tell(t,zi.set_css(e.id,o,c,d)),u.tell(t,zi.merge(e.id,"both",e.id,f.length+h)))}}return u}on_cube_break(e){const{courier:t,cursor:n,pcube:r,pid:o,index:i}=this,s=r.pcube;if(!s)return;const{offset:a}=e;let l=i+1;const c=new ld(t),d=this.text[a-1],u=this.text[a];let h=a,p=!1;if(d){const e=d.charCodeAt(0);55296<=e&&e<=56319&&(p=!0)}if(u&&!p){const e=u.charCodeAt(0);56320<=e&&e<=57343&&(p=!0)}p&&(h+=1),c.tell(this,zi.partition(this.id,this.id,this.id,h,h));const f=[];for(let e of r.children.slice(l))f.push(e.export());c.tell(r,zi.delete_child(r.id,"backward",[l,r.child_count]));const m=hu.get_default(f),_=this.line;_&&_.inherit_line([m]),c.tell(s,zi.insert_child(s.id,[m],r.index+1));const g=r.next_cube;return g?.id===m.id&&c.tell(g,Ni.in_head(g.id)),c}on_cube_delete_adjacent(e){const{courier:t,pcube:n}=this,{from:r,from_id:o,offset:i}=e,s=new ld(t);if("left"===r)if(this.is_empty)s.merge(this.remove_self());else{const e=this.prev_cube_deep;e?.meta.block?s.tell(this,Ni.in_head(this.id)):s.tell(this,zi.delete(this.id,"forward",this.id,this.id,0,0))}else if(this.is_empty)s.merge(this.remove_self());else{const e=this.next_cube_deep;e?.meta.block?s.tell(this,Ni.in_tail(this.id)):s.tell(this,zi.delete(this.id,"backward",this.id,this.id,this.len,this.len))}return s}add_link(e,t){const{cursor:n,courier:r}=this,o=r.get_recorder(),i=Fd.get_default(t,e);return o.tell(this,zi.postil_add(this.id,[i])),o}add_annotation(e){const t=this.courier.get_recorder(),n=e||Ed.get_default();return t.tell(this,zi.postil_add(this.id,[n])),t}get_valid_index(e){return"head"===e?0:"tail"===e?this.text.length:e<0?0:e>this.text.length?this.text.length:e}set_cursor_in_head(e=0){const t=this.get_valid_index(e);mn(()=>{this.line?.dom?.focus();const e=this.text_node;e&&this.cursor.set_cursor(e,t<0?0:t)})}set_cursor_in_tail(e=0){let t=this.len-this.get_valid_index(e);mn(()=>{this.line?.dom?.focus();const e=this.text_node;e&&this.cursor.set_cursor(e,t<0?0:t)})}find_text_nav_pos(e,t){const n=this.text;let r=e;if(e<0&&(r=0),e>n.length&&(r=n.length),"left"===t){let e=r-1,t=n[e];for(;"​"===t&&e>=0;)e-=1,t=n[e];if(t){const n=t.charCodeAt(0);56320<=n&&n<=57343&&(e-=1)}return e<0?0:e}{let e=r+1,t=n[e];for(;"​"===t&&e<n.length;)e+=1,t=n[e];if(t){const n=t.charCodeAt(0);55296<=n&&n<=56319&&(e+=1)}return e>n.length?n.length:e}}find_text_deleted(e,t){if(e<0)return{text:this.text,pos:0};if(e>this.len)return{text:this.text,pos:this.len};if("left"===t){let n=this.find_text_nav_pos(e,t),r=this.text.slice(0,n),o=this.text.slice(e),i=r[r.length-1];if(i){const t=i.charCodeAt(0);55296<=t&&t<=56319&&(r=r.slice(0,-1),e-=1)}return{text:r+o,pos:n}}{let n=this.find_text_nav_pos(e,t),r=this.text.slice(0,e),o=this.text.slice(n),i=o[0];if(i){const e=i.charCodeAt(0);56320<=e&&e<=57343&&(o=o.slice(1))}return{text:r+o,pos:e}}}is_text_remain(e,t){if(0===this.len)return!1;const[n,r]=t;if(n===r){if("backward"===e){return 0!==this.find_text_nav_pos(n,"left")||this.find_text_nav_pos(r-1,"right")!==this.len}return this.find_text_nav_pos(n,"right")!==this.len||0!==this.find_text_nav_pos(n,"left")}{if(0===n&&r===this.len)return!1;const e=this.find_text_nav_pos(n+1,"left"),t=this.find_text_nav_pos(r-1,"right");return e>0||t<this.len}}drop_zero_width_space(e){return Qd.drop_zero_width_space(this.text,e)}can_merge_with(e){const t=od.is_same_style(this.css,e.css)||0===Object.keys(e.css).length,n=od.is_same_attrs(this.attrs,e.attrs),r=!this.postil&&!e.postil;return t&&n&&r}is_valid_pos(e){return!(e<0||e>this.text.length)}_delete_edge(e){const{courier:t}=this,n=this.pcube;if("backward"===e){const e=this.prev_cube_deep,r=e?.next_cube;if(!e){const e=this.boxroot;if(!e)return;const t=this.find_upstream_untill(e);if(t?.meta.block&&!(t instanceof hu)&&t instanceof rd){const n=this.courier.get_recorder(),r=t.get_children_cubedata(),o=zi.insert_child(e.id,r,t.index);return n.tell(e,o),n.merge(t.remove_self()),n}}if(!(r instanceof rd))return;if(this.in_postil&&!e?.in_postil)return;if(r&&e.type===r.type){const e=r.merge("left");if(e&&e.len_undo>0)return e}if(r&&1===r.child_count&&r.child_first.meta.block){const e=this.courier.get_recorder(),t=r.pcube,n=r.index,o=r.child_first.export(),i=od.pick([o],!0),s=zi.insert_child(t.id,i.list,n);if(e.tell(t,s),e.len_undo>0)return e.merge(r.remove_self()),e}if(n&&n.is_empty&&n instanceof rd){const e=this.courier.get_recorder();if(e.merge(n.remove_self()),e.len_undo>0)return e}if(e&&e.is_empty){const n=new ld(t);return n.merge(e.remove_self()),r&&n.tell(r,Ni.in_head(r.id)),n}if(e){return new ld(t).tell(e,Ni.in_tail(e.id))}}else{const e=this.next_cube_deep,t=e?.prev_cube;if(!e){const e=this.boxroot;if(!e)return;const t=this.find_upstream_untill(e);if(t?.meta.block&&!(t instanceof hu)&&t instanceof rd){const n=this.courier.get_recorder(),r=t.get_children_cubedata(),o=zi.insert_child(e.id,r,t.index);return n.tell(e,o),n.merge(t.remove_self()),n}}if(!(t instanceof rd))return;if(this.in_postil&&!e?.in_postil)return;if(t&&e?.type===t?.type){const e=t.merge("right");if(e&&e.len_undo>0)return e}if(t&&1===t.child_count&&t.child_first.meta.block){const e=this.courier.get_recorder(),n=t.pcube,r=t.index,o=t.child_first.export(),i=od.pick([o],!0),s=zi.insert_child(n.id,i.list,r);if(e.tell(n,s),e.len_undo>0)return e.merge(t.remove_self()),e}if(n&&n.is_empty&&n instanceof rd){const e=this.courier.get_recorder();if(e.merge(n.remove_self()),e.len_undo>0)return e}if(e&&e.is_empty){const n=this.courier.get_recorder();return n.merge(e.remove_self()),t&&n.tell(t,Ni.in_tail(t.id)),n}if(e){return this.courier.get_recorder().tell(e,Ni.in_tail(e.id))}}}static drop_zero_width_space(e,t){let n="",r=t;r<0&&(r=0),r>e.length&&(r=e.length);const o=e.slice(0,r),i=e.slice(r);if(o){for(let e of o)"​"!==e&&(n+=e);r=n.length}if(i)for(let e of i)"​"!==e&&(n+=e);return{text:n,pos:r,get len(){return this.text.length}}}static drop_zero_intelligence(e,t){let n="",r=t;r<0&&(r=0),r>e.length&&(r=e.length);const o=e.slice(0,r),i=e.slice(r);if(o){for(let e=0;e<o.length;e++){let t=o[e],r=o[e-1];"​"===t&&"\n"!==r||(n+=t)}r=n.length}if(i)for(let e=0;e<i.length;e++){let t=i[e],r=i[e-1];"​"===t&&"\n"!==r||(n+=t)}return n||(n="​",r=1),{text:n,pos:r,get len(){return this.text.length}}}static is_empty_text(e){if(e.type!==S.Cubes.text)return!1;let t="";for(let n of e.info)if("​"!==n&&(t+=n),t.length>0)return!1;return 0===t.length}static get meta(){return{version:1,type:S.Cubes.text,cubename:"文本",block:!1,show:!1}}static get_default(e="",t={},n={}){const r=e||"​";return{id:yi(),type:S.Cubes.text,info:r,css:structuredClone(Ht(t)),attrs:structuredClone(Ht(n))}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,e.event.emit_replace_id(o,i),n}static update_data(e,t){const n=e[this.meta.type]||1;return t.info=t.info.replace("\r",""),t.info||(t.info="​"),n>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Zd([Ri(e.Names.reset)],Qd.prototype,"on_text_reset",null),Zd([Ri(g.Names.loc)],Qd.prototype,"on_cursor_loc",null),Zd([Ri(_.Names.cube_partition)],Qd.prototype,"on_partition",null),Zd([Ri(_.Names.cube_merge)],Qd.prototype,"on_cube_merge",null),Zd([Ri(_.Names.cube_insert)],Qd.prototype,"on_cube_insert",null),Zd([Ri(_.Names.cube_delete)],Qd.prototype,"on_cube_delete",null),Zd([Ri(_.Names.cube_set_selection_css)],Qd.prototype,"on_cube_set_selection_css",null),Zd([Ri(e.Names.break)],Qd.prototype,"on_cube_break",null),Zd([Ri(_.Names.cube_delete_adjacent)],Qd.prototype,"on_cube_delete_adjacent",null),Qd=Zd([Si],Qd);const eu=["id","data-type","contenteditable"],tu=En({__name:"cube-line",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(No(),Oo("div",{class:me(["cube-line",{"line-first-letter-lower":Yt(t).attrs.first_letter_lower}]),id:e.cube.id,"data-type":e.cube.type,style:de(Yt(t).css),contenteditable:e.cube.editable,spellcheck:"false"},[(No(!0),Oo(wo,null,hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],14,eu))}}),nu=(0,Is.A)(tu,[["__scopeId","data-v-5d19e8f7"]]);class ru extends Pc{dragenter(e){e.preventDefault()}dragover(e){e.preventDefault()}dragleave(e){e.preventDefault()}async drop(e){e.preventDefault();const{cursor:t,courier:n,clipboard:r,history:o}=this.root,{cube_end:i,offset_end:s}=t,a=e.dataTransfer;if(!a)return;const l=n.get_recorder(),c=(new DOMParser,a.getData("text/plain")),d=a.getData("text/html"),u=a.files;if(console.log("🍊",{files:u,html:d,text:c}),console.log("❤",(new DOMParser).parseFromString(d,"text/html")),u.length>0){for(let e of Array.from(u))if(e.type.startsWith("image/")){const t=await r.paste_img(e);l.merge(t)}}else if(c){const{offset_end:e,offset_start:t,cube_selection:n}=this.cursor;if(!(n instanceof Qd))return;this.ins(l,this._root,c,n,t,e)}o.record(l)}handler_click_foot(e){e.preventDefault();const{courier:t,cursor:n,history:r}=this.root,o=this.root.child_last;if(o&&o.is_empty){let e=o;for(;e;){if(e instanceof Qd){e.line?.dom?.focus(),e.set_cursor_in_tail();break}e=e.child_last}}else{const e=new ld(t),n=xu.get_default();e.tell(this.root,zi.insert_child(this.root.id,[n],this.root.child_count)),r.record(e)}}}const ou=["id","data-type"],iu={class:"doc-postils"},su=En({__name:"cube-doc",props:{cube:{}},setup(e){const{status:t}=e.cube,n=new ru(e.cube),r=e=>n.pointerdown(e),o=e=>n.pointermove(e),i=e=>n.pointerup(e),s=e=>n.pointercancel(e),a=e=>n.handler_click_foot(e),l=e=>n.compositionstart(e),c=e=>n.compositionupdate(e),d=e=>n.compositionend(e),u=e=>n.beforeinput(e),h=e=>n.dragover(e),p=e=>n.dragenter(e),f=e=>n.dragleave(e),m=e=>n.drop(e);return Zn(()=>{document.documentElement.addEventListener("pointerup",i),document.documentElement.addEventListener("pointermove",o),document.documentElement.addEventListener("pointercancel",s)}),(e,n)=>(No(),Oo("div",{class:"cube-doc",id:e.cube.id,"data-type":e.cube.type,style:de(Yt(t).css),onDragover:h,onDragenter:p,onDragleave:f,onDrop:m},[jo("div",{class:"note",onPointerdown:r,onCompositionstart:l,onCompositionupdate:c,onCompositionend:d,onBeforeinput:u},[(No(!0),Oo(wo,null,hr(Yt(t).children,e=>(No(),Eo(cr(e.component),{key:e.id,cube:e,id:e.id},null,8,["cube","id"]))),128)),Vo(" footer "),jo("div",{class:"cube-doc-footer",onPointerdown:a},null,32),Vo(" doc-cubes "),jo("div",iu,[(No(!0),Oo(wo,null,hr(Yt(t).postils,([e,t])=>(No(),Eo(Os,{key:t.id,cube:t},null,8,["cube"]))),128))])],32),Vo(" scope selection "),(No(!0),Oo(wo,null,hr(Yt(t).scopes,e=>(No(),Eo(Ds,{key:e.id,selection:qt(e)},null,8,["selection"]))),128)),Vo(" menus "),Ho(Cc,{root:e.cube},null,8,["root"]),Ho(Rc,{root:e.cube},null,8,["root"])],44,ou))}}),au=(0,Is.A)(su,[["__scopeId","data-v-4d14938e"]]);class lu extends Ps{constructor(e){super(e)}}class cu extends Ts{_status=new lu(this);_app;constructor(e){super(e),this.setup(),this.status.init(),this._app=Ra(au,{cube:this})}get status(){return this._status}get app(){return this._app}get component(){return au}get meta(){return cu.meta}get doc(){return this}build_child(e){od.build_cubes(e.info,this,this._children)}gc(){}export(){const e=structuredClone({...this.data,info:[]});e.attrs.theme=Mi.note_theme,e.versions=Mi.export_versions();for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return cu.update_data(e,t)}replace_id(e,t,n={}){return cu.replace_id(this.root,e,t,n)}render(e){this._dom=e,this.hotkeys.listen(e),this.app.mount(e),this.event.emit_status_update()}static get meta(){return{type:S.Cubes.doc,cubename:"文档",version:1,block:!0,show:!1}}static get_default(){return{id:yi(),type:S.Cubes.doc,versions:Mi.export_versions(),info:[],css:{},attrs:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}cu=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([Si],cu);class du extends Rs{constructor(e){super(e)}}function uu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class hu extends rd{_status=new du(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return nu}get editable(){if(this.stats.is_read_mode)return!1;const e=this.host_postil,t=this.host_node;return!e&&t?t.status.editable:!(!e||t)||(!e||!t||(e.level>t.level||t.status.editable))}get meta(){return hu.meta}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}get attrs(){return this.data.attrs}get child_first_text(){for(let e of this._children)if(e instanceof Qd)return e}get child_last_text(){for(let e of[...this._children].reverse())if(e instanceof Qd)return e}get next_line(){let e=this.next_cube_deep;for(;e;){if(e instanceof cu)return;let t=od.find_line(e,"first");if(t)return t;e=e.next_cube_deep}}get prev_line(){let e=this.prev_cube_deep;for(;e;){if(e instanceof cu)return;let t=od.find_line(e,"last");if(t)return t;e=e.prev_cube_deep}}build_child(e){od.build_cubes(e.info,this,this._children)}export(){const e=this.base_export();e.info=[];for(let t of this.children)e.info.push(t.export());return e}update_data(e,t){return hu.update_data(e,t)}gc(){super.base_gc()}replace_id(e,t,n={}){return hu.replace_id(this.root,e,t,n)}inherit_line(e){const t=Math.min(...e.map(e=>e.attrs.indent||0));for(let n of e){const e=this.attrs.indent;if(e){const r=n.attrs.indent||0;n.attrs.indent=e+r-t}this.css["text-indent"]&&n.type===this.type&&(n.css["text-indent"]=this.css["text-indent"])}}on_cube_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i,pcube:s}=this,{method:a,cubeid:l,offset:c}=e,d=new ld(t);if("left"===a&&n instanceof hu){const e=od.exports(this.children),t=od.filter_out_empty(e);d.tell(n,zi.insert_child(n.id,t,"tail")),d.merge(this.remove_self("backward"));const r=n.find_child_cube(l);if(r){const e=Ni.loc(l,c,l,c);d.tell(r,e)}}else if("right"===a&&r instanceof hu){const e=r.export().info,t=od.filter_out_empty(e);d.tell(this,zi.insert_child(this.id,t,"tail")),d.tell(s,zi.delete_child(i,"backward",[o+1,o+2]));const n=this.find_child_cube(l);n&&d.tell(n,Ni.loc(l,c,l,c))}else if("both"===a)if(n instanceof hu&&r instanceof hu){const e=od.filter_out_empty(this.export().info),t=od.filter_out_empty(r.export().info);d.tell(n,zi.insert_child(n.id,e.concat(t),"tail")),d.tell(s,zi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_child_cube(l);o&&d.tell(o,Ni.loc(l,c,l,c))}else if(n instanceof hu&&!(r instanceof hu)){const e=od.filter_out_empty(this.export().info);d.tell(n,zi.insert_child(n.id,e,"tail")),d.tell(s,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_child_cube(l);t&&d.tell(t,Ni.loc(l,c,l,c))}else if(!(n instanceof hu)&&r instanceof hu){const e=od.filter_out_empty(r.export().info);d.tell(this,zi.insert_child(this.id,e,"tail")),d.tell(s,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_child_cube(l);t&&d.tell(t,Ni.loc(l,c,l,c))}return d}on_cube_reset(e){const{courier:t}=this,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=od.filter_out_empty(n);if(0===o.length){if(this.is_empty)return;const e=this.export().info,t=new Qd(Qd.get_default(),this);this.splice(0,this.child_count,t),r.add_recover(zi.reset(this.id,e)),r.tell(t,Ni.in_tail(t.id))}else{const e=this.export().info,t=od.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(zi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t,pid:n,pcube:r}=this,{pos:o,data:i}=e,s=new ld(t);if(0===i.length)return s;let a=this.get_valid_index(o);const l=od.pick(i);if(l.head.length>0){s.add_cmd(e);const t=od.build_cubes(i,this),n=t[t.length-1];this.splice(a,0,...t),s.add_recover(zi.delete_child(this.id,"backward",[a,a+t.length])),n&&s.tell(n,Ni.in_tail(n.id))}const c=[...l.body];if(l.tail.length>0&&c.push(hu.get_default(l.tail)),l.roots.length>0)for(let e of l.roots)c.push(...e.info);if(c.length>0)if(this.inherit_line(c),this.is_empty)s.tell(r,zi.insert_child(n,c,this.index)),s.tell(r,zi.delete_child(n,"backward",[this.index,this.index+1]));else{const e=this.get_valid_index(a+l.head.length);if(0===e)s.tell(r,zi.insert_child(n,c,this.index));else if(e<this.child_count){const t=this._children.slice(e);if(t.length>0){const o=t.map(e=>e.export()),i=hu.get_default(o);this.inherit_line([i]),s.tell(this,zi.delete_child(this.id,"backward",[e,this.child_count])),s.tell(r,zi.insert_child(n,[i],this.index+1))}s.tell(r,zi.insert_child(n,c,this.index+1))}else e===this.child_count&&s.tell(r,zi.insert_child(n,c,this.index+1))}return s}on_delete_child(e){const{dir:t,range:n,reserve:r}=e;if(!this.is_valid_range(n))return;const{courier:o,pid:i,index:s,pcube:a}=this,l=o.get_recorder();l.add_cmd(e);const[c,d]=n;let u=c,h=d;if(u<=0&&h>=this.child_count)if(r){if(this.is_empty)return;const e=this.child_first;e instanceof Qd?(l.tell(this,zi.delete_child(this.id,t,[1,this.child_count])),l.tell(e,Xd.reset(e.id,"​",1,1))):l.tell(this,zi.reset(this.id,[]))}else this.is_empty?l.tell(a,zi.delete_child(i,t,[s,s+1])):l.tell(this,zi.reset(this.id,[]));else{const e=this.children[u-1],n=this.children[h],r=h-u;if(u>=this.child_count||r<=0)return;let o=this.splice(u,r);l.add_recover(zi.insert_child(this.id,o.data,c)),"backward"===t?e?l.tell(e,Ni.in_tail(e.id)):n&&l.tell(n,Ni.in_head(n.id)):"forward"===t&&(n?l.tell(n,Ni.in_head(n.id)):e&&l.tell(e,Ni.in_tail(e.id)))}return l}on_cube_delete_adjacent(e){const{courier:t,pid:n,prev_cube:r,next_cube:o,pcube:i}=this,{from:s,from_id:a,offset:l}=e,c=new ld(t);if("left"===s){this.prev_cube_deep instanceof hu?c.tell(this,zi.merge(this.id,"left",a,l)):c.tell(this,Ni.in_head(this.id))}else if("right"===s){this.next_cube_deep instanceof hu?c.tell(this,zi.merge(this.id,"right",a,l)):c.tell(this,Ni.in_tail(this.id))}return c}static filter_out_empty(e){return e.filter(e=>!Qd.is_empty_text(e))}static get meta(){return{version:1,type:S.Cubes.line,cubename:"行",block:!0,show:!1}}static get_default(e=[],t={},n={}){const r=0===e.length?[Qd.get_default()]:e;return{id:yi(),type:S.Cubes.line,info:r,css:t,attrs:n}}static get_default_by_string(e="​",t={},n={}){const r=[Qd.get_default(e||"​")];return{id:yi(),type:S.Cubes.line,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n.info=od.replace_id(e,t,n.info),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}uu([Ri(_.Names.cube_merge)],hu.prototype,"on_cube_merge",null),uu([Ri(_.Names.cube_reset)],hu.prototype,"on_cube_reset",null),uu([Ri(_.Names.cube_insert_child)],hu.prototype,"on_insert_child",null),uu([Ri(_.Names.cube_delete_child)],hu.prototype,"on_delete_child",null),uu([Ri(_.Names.cube_delete_adjacent)],hu.prototype,"on_cube_delete_adjacent",null),hu=uu([Si],hu);const pu=["id","data-type"],fu={class:"cube-box-root-content"},mu=En({__name:"cube-box-root",props:{cube:{}},setup(e){const{status:t}=e.cube,n=e.cube,r=gi(()=>({opacity:(e.cube.child_count+10)/60})),o=e=>function(e,t){if(e.stopPropagation(),!cl)return void e.preventDefault();const n=e.currentTarget;n instanceof HTMLElement&&(dl=n,al=t,document.body.style.setProperty("--box-root-pointer-events","none"))}(e,n),i=e=>function(e,t){if(!cl||!al)return;e.stopPropagation();const n=e.currentTarget;n instanceof HTMLElement&&t!==al&&(n!==ul&&ul?.classList.remove("drag-enter"),ul=n,ll=t,ul.classList.add("drag-enter"))}(e,n),s=e=>function(e,t){cl&&(e.preventDefault(),e.stopPropagation(),al&&ll&&dl&&ul&&al!==ll&&(dl.style["view-transition-name"]=al.id,document.startViewTransition(()=>{if(!(al&&ll&&dl&&ul))return;const{courier:e,history:n}=t,r=new ld(e),o=dl.getBoundingClientRect(),i=ll.index,s=al.export(),a=ll.pcube;al.pcube===a?r.tell(al.pcube,zi.reorder(al.pid,al.id,ll.index)):(r.merge(al.remove_self()),r.tell(a,zi.insert_child(a.id,[s],i))),n.record(r);const l=ul.getBoundingClientRect(),c=l.x-o.x,d=l.y-o.y;document.body.style.setProperty("--x",c+"px"),document.body.style.setProperty("--y",d+"px")}),cl=!1))}(e,n),a=e=>(ul&&ul.classList.remove("drag-enter"),dl&&dl.classList.remove("drag-enter"),void(cl=!1)),l=e=>function(e){e.preventDefault(),e.stopPropagation(),ul&&ul.classList.add("drag-enter")}(e),c=e=>function(e){e.stopPropagation(),ul&&ul.classList.remove("drag-enter")}(e),d=e=>function(e){const t=e.target;t instanceof HTMLElement&&"cube-box-root-dragger"===t.dataset.tag&&(cl=!0,e.stopPropagation())}(e),u=e=>function(e,t){const{stats:n}=t.root,r=t.index+1;n.active_root_index=r}(0,n);function h(e){const{stats:n}=e;return{"anchor-root":n.anchor_root_id===e.id,"fold-root":t.attrs.fold}}return(e,n)=>(No(),Oo("div",{class:"cube-box-root",style:de(Yt(t).css),draggable:"true",id:e.cube.id,"data-type":e.cube.type,onContextmenu:n[2]||(n[2]=t=>Yt(oc)(t,e.cube)),onFocusin:u,onDragstart:o,onDragenter:i,onDrop:s,onDragend:a,onDragover:l,onDragleave:c,onPointerdown:d},[jo("div",{class:me(["cube-dragger",h(e.cube)]),style:de(r.value),onClick:n[0]||(n[0]=t=>Yt(pl)(t,e.cube)),onContextmenu:n[1]||(n[1]=t=>Yt(fl)(t,e.cube)),"data-tag":"cube-box-root-dragger"},null,38),jo("div",fu,[Yt(t).attrs.fold?(No(),Eo(Os,{key:0,cube:Yt(t).child_first},null,8,["cube"])):(No(!0),Oo(wo,{key:1},hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:qt(e)},null,8,["cube"]))),128))])],44,pu))}}),_u=(0,Is.A)(mu,[["__scopeId","data-v-851b6342"]]);class gu extends Rs{constructor(e){super(e)}}function bu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class xu extends rd{_status=new gu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return _u}get meta(){return xu.meta}get is_empty(){return 1===this.child_count&&this.child_first instanceof hu&&this.child_first.is_empty}get attrs(){return this.data.attrs}build_child(e){od.build_cubes(e.info,this,this._children)}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return xu.update_data(e,t)}replace_id(e,t,n={}){return xu.replace_id(this.root,e,t,n)}on_cube_delete_adjacent(e){const{courier:t}=this,{from:n,offset:r,from_id:o}=e,i=new ld(t);if("left"===n){this.prev_cube_deep instanceof xu?i.tell(this,zi.merge(this.id,"left",o,r)):i.tell(this,Ni.in_head(this.id))}else if("right"===n){this.next_cube_deep instanceof xu?i.merge(this.on(zi.merge(this.id,"right",o,r))):i.tell(this,Ni.in_tail(this.id))}return i}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ld(t);if("left"===s&&n instanceof xu){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof xu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof xu&&r instanceof xu){const e=this.export().info,t=r.export().info;c.tell(n,zi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=Ni.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof xu&&!(r instanceof xu)){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof xu)&&r instanceof xu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}return c}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ld(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(zi.reorder(this.id,s.id,c)),a}on_cube_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=od.filter_out_empty(n);if(0===o.length){const e=this.children[0];if(1===this.child_count&&e instanceof Qd&&e.is_empty)return;const t=this.export().info,n=new hu(hu.get_default(),this);this.splice(0,this.child_count,n),r.add_recover(zi.reset(this.id,t)),r.tell(n,Ni.in_tail(n.id))}else{const e=this.export().info,t=od.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(zi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;let i=this.get_valid_index(n);const s=od.pick(r),a=od.build_cubes(s.list,this);this.splice(i,0,...a),o.add_recover(zi.delete_child(this.id,"backward",[i,i+a.length]));const l=a[a.length-1],c=this.children[i+1];return l?o.tell(l,Ni.in_tail(l.id)):o.tell(c,Ni.in_head(c.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const l=t.get_recorder();l.add_cmd(e);const[c,d]=s;let u=c,h=d;if(!(u>=h)){if(u<=0&&h>=this.child_count&&!a){if(a){if(this.is_empty)return;l.tell(this,zi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&l.tell(e,zi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?l.tell(o,zi.delete_child(n,i,[r,r+1])):l.tell(this,zi.reset(this.id,[]));return l}{const e=this.children[u-1],t=this.children[h],n=h-u;let r=this.splice(c,n);l.add_recover(zi.insert_child(this.id,r.data,c)),"backward"===i?e?l.tell(e,Ni.in_tail(e.id)):t&&l.tell(t,Ni.in_head(t.id)):"forward"===i&&(t?l.tell(t,Ni.in_head(t.id)):e&&l.tell(e,Ni.in_tail(e.id)))}return l}}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static filter_out_empty(e){return e.filter(e=>!Qd.is_empty_text(e))}static get meta(){return{type:S.Cubes.box_root,cubename:"根块",version:1,block:!0,show:!1}}static get_default(e=[],t={},n={fold:!1}){const r=0===e.length?[hu.get_default()]:e;return{id:od.get_id(),type:S.Cubes.box_root,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}bu([Ri(_.Names.cube_delete_adjacent)],xu.prototype,"on_cube_delete_adjacent",null),bu([Ri(_.Names.cube_merge)],xu.prototype,"on_merge",null),bu([Ri(_.Names.cube_reorder)],xu.prototype,"on_cube_reorder",null),bu([Ri(_.Names.cube_reset)],xu.prototype,"on_cube_reset",null),bu([Ri(_.Names.cube_insert_child)],xu.prototype,"on_insert_child",null),bu([Ri(_.Names.cube_delete_child)],xu.prototype,"on_delete_child",null),xu=bu([Si],xu);class vu{}const yu=["id","data-type"],wu=En({__name:"cube-box",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(t){if(t.target===t.currentTarget){t.stopPropagation();const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=Ni.in_tail(e.cube.id);o.tell(e.cube,i),r.record(o)}}return(e,r)=>(No(),Oo("div",{class:"cube-box",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type,onPointerup:n,onContextmenu:r[0]||(r[0]=t=>Yt(oc)(t,e.cube))},[(No(!0),Oo(wo,null,hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],44,yu))}}),ku=(0,Is.A)(wu,[["__scopeId","data-v-09ad6fa4"]]);class Su extends Rs{constructor(e){super(e)}}function Cu(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Mu extends rd{_status=new Su(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return ku}get attrs(){return this.data.attrs}get meta(){return Mu.meta}get is_empty(){return 1===this.child_count&&this.child_first.is_empty}build_child(e){od.build_cubes(e.info,this,this._children)}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return Mu.update_data(e,t)}gc(){super.base_gc()}replace_id(e,t,n={}){return Mu.replace_id(this.root,e,t,n)}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ld(t);if("left"===s&&n instanceof Mu){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_child_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof Mu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof Mu&&r instanceof Mu){const e=this.export().info,t=r.export().info;c.tell(n,zi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=Ni.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof Mu&&!(r instanceof Mu)){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof Mu)&&r instanceof Mu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}return c}on_box_order(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ld(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(zi.reorder(this.id,s.id,c)),a}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(zi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,Ni.in_head(a.id)):o.tell(this.child_last,Ni.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const[l,c]=s,d=t.get_recorder();d.add_cmd(e);let u=l<0?0:l,h=c>this.child_count?this.child_count:c;if(!(u>=h)){if(u<=0&&h>=this.child_count)if(a){if(this.is_empty)return;d.tell(this,zi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&d.tell(e,zi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?d.tell(o,zi.delete_child(n,i,[r,r+1])):d.tell(this,zi.reset(this.id,[]));else{const e=this.children[u-1],t=this.children[h],n=h-u;if(u>=this.child_count||n<=0)return;let r=this.splice(u,n);d.add_recover(zi.insert_child(this.id,r.data,l)),"backward"===i?e?d.tell(e,Ni.in_tail(e.id)):t&&d.tell(t,Ni.in_head(t.id)):"forward"===i&&(t?d.tell(t,Ni.in_head(t.id)):e&&d.tell(e,Ni.in_tail(e.id)))}return d}}on_box_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=od.filter_out_empty(n);if(0===o.length){if(this.is_empty)return;const e=this.export().info,t=new hu(hu.get_default(),this);this.splice(0,this.child_count,t),r.add_recover(zi.reset(this.id,e)),r.tell(t,Ni.in_tail(t.id))}else{const e=this.export().info,t=od.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(zi.reset(this.id,e))}return r}on_cube_delete_adjacent(e){const{courier:t,pcube:n,pid:r}=this,{from:o,from_id:i,offset:s}=e,a=new ld(t);if("left"===o){if(this.prev_cube_deep instanceof Mu)a.tell(this,zi.merge(this.id,"left",i,s));else{const e=this.export().info,t=this.child_first.id;a.tell(n,zi.insert_child(r,e,this.index)),a.merge(this.remove_self());const l=n.find_cube(t);l&&a.tell(l,zi.delete_adjacent(t,o,i,s))}}else if("right"===o){if(this.next_cube_deep instanceof Mu)a.merge(this.on(zi.merge(this.id,"right",i,s)));else{const e=this.export().info,t=this.child_first.id;a.tell(n,zi.insert_child(r,e,this.index)),a.merge(this.remove_self());const l=n.find_cube(t);l&&a.tell(l,zi.delete_adjacent(t,o,i,s))}}return a}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static get meta(){return{type:S.Cubes.box,cubename:"块",version:1,block:!0,show:!0}}static get_default(e=[],t={},n={}){const r=[];return 0===e.length?r.push(hu.get_default()):r.push(...od.pick(e).list),{id:od.get_id(),type:S.Cubes.box,info:r,css:t,attrs:n}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Cu([Ri(_.Names.cube_merge)],Mu.prototype,"on_merge",null),Cu([Ri(_.Names.cube_reorder)],Mu.prototype,"on_box_order",null),Cu([Ri(_.Names.cube_insert_child)],Mu.prototype,"on_insert_child",null),Cu([Ri(_.Names.cube_delete_child)],Mu.prototype,"on_delete_child",null),Cu([Ri(_.Names.cube_reset)],Mu.prototype,"on_box_reset",null),Cu([Ri(_.Names.cube_delete_adjacent)],Mu.prototype,"on_cube_delete_adjacent",null),Mu=Cu([Si],Mu);const zu=["id","data-type"],Nu=En({__name:"cube-box-folder",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(No(),Oo("div",{class:me(["cube-box-folder",{"cube-box-folder-active":Yt(t).attrs.fold}]),id:e.cube.id,style:de(Yt(t).css),"data-type":e.cube.type,onContextmenu:n[1]||(n[1]=t=>Yt(oc)(t,e.cube))},[Yt(t).attrs.fold?(No(),Eo(Os,{key:0,cube:Yt(t).child_first},null,8,["cube"])):(No(!0),Oo(wo,{key:1},hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:qt(e)},null,8,["cube"]))),128)),jo("div",{class:me(["folder-tag",{"folder-tag-active":Yt(t).attrs.fold}]),onClick:n[0]||(n[0]=t=>function(e,t){const{courier:n,history:r,cubes:o,id:i,pcube:s}=t,a=n.get_recorder();a.tell(t,zi.fold(i,!t.attrs.fold)),r.record(a);for(let e of Object.values(o.postils))e.find_upstream_untill(s)===t&&e.visible(!1);const l=t.child_first.id;if(!l)return;const c=document.getElementById(l);c?.scrollIntoView({block:"nearest",behavior:"smooth"})}(0,e.cube))},null,2)],46,zu))}}),Au=(0,Is.A)(Nu,[["__scopeId","data-v-a35cb97c"]]);class Tu extends Rs{constructor(e){super(e)}}function Ru(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Pu extends rd{_status=new Tu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get children(){const e=[];for(let t of this._children)e.push(t);return e}get component(){return Au}get meta(){return Pu.meta}get is_empty(){return 1===this.child_count&&this.child_first instanceof hu&&this.child_first.is_empty}get attrs(){return this.data.attrs}build_child(e){od.build_cubes(e.info,this,this._children)}gc(){super.base_gc()}export(){const e=this.base_export();e.info=[];for(let t of this.children){let n=t.export();e.info.push(n)}return e}update_data(e,t){return Pu.update_data(e,t)}replace_id(e,t,n){return Pu.replace_id(this.root,e,t,n)}on_cube_delete_adjacent(e){const{courier:t}=this,{from:n,offset:r,from_id:o}=e,i=new ld(t);if("left"===n){this.prev_cube_deep instanceof Pu?i.tell(this,zi.merge(this.id,"left",o,r)):i.tell(this,Ni.in_head(this.id))}else if("right"===n){this.next_cube_deep instanceof Pu?i.merge(this.on(zi.merge(this.id,"right",o,r))):i.tell(this,Ni.in_tail(this.id))}return i}on_merge(e){const{courier:t,prev_cube:n,next_cube:r,index:o,pid:i}=this,{method:s,cubeid:a,offset:l}=e,c=new ld(t);if("left"===s&&n instanceof Pu){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("right"===s&&r instanceof Pu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if("both"===s)if(n instanceof Pu&&r instanceof Pu){const e=this.export().info,t=r.export().info;c.tell(n,zi.insert_child(n.id,e.concat(t),"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"backward",[this.index,this.index+2]));const o=n.find_cube(a);if(o){const e=Ni.loc(a,l,a,l);c.tell(o,e)}}else if(n instanceof Pu&&!(r instanceof Pu)){const e=this.export().info;c.tell(n,zi.insert_child(n.id,e,"tail")),c.tell(this.pcube,zi.delete_child(this.pid,"forward",[o,o+1]));const t=n.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}else if(!(n instanceof Pu)&&r instanceof Pu){const e=r.export().info;c.tell(this,zi.insert_child(this.id,e,"tail")),c.tell(this.pcube,zi.delete_child(i,"backward",[o+1,o+2]));const t=this.find_cube(a);if(t){const e=Ni.loc(a,l,a,l);c.tell(t,e)}}return c}on_cube_reorder(e){const{courier:t,history:n,cursor:r}=this,{cubeid:o,index:i}=e,s=this.find_child_cube(o);if(!s||s.index===i)return;const a=new ld(t);let l=0,c=s.index;return"tail"===i?l=this.child_count:"number"==typeof i&&(l=i),this.splice(c,1),this.splice(l,0,s),a.add_recover(zi.reorder(this.id,s.id,c)),a}on_cube_reset(e){const t=this.courier,{data:n}=e,r=t.get_recorder();r.add_cmd(e);const o=od.filter_out_empty(n);if(0===o.length){const e=this.children[0];if(1===this.child_count&&e instanceof Qd&&e.is_empty)return;const t=this.export().info,n=new hu(hu.get_default(),this);this.splice(0,this.child_count,n),r.add_recover(zi.reset(this.id,t)),r.tell(n,Ni.in_tail(n.id))}else{const e=this.export().info,t=od.build_cubes(o,this);this.splice(0,this.child_count,...t),r.add_recover(zi.reset(this.id,e))}return r}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(zi.delete_child(this.id,"backward",[i,i+s.length]));const a=s[s.length-1],l=this.children[i+1];return a?o.tell(a,Ni.in_tail(a.id)):o.tell(l,Ni.in_head(l.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const l=t.get_recorder();l.add_cmd(e);const[c,d]=s;let u=c,h=d;if(u>=h)return;if(u<=0&&h>=this.child_count){if(a){if(this.is_empty)return;l.tell(this,zi.delete_child(this.id,i,[1,this.child_count]));const e=this.child_first;e&&l.tell(e,zi.delete_child(e.id,i,[0,e.child_count],a))}else this.is_empty?l.tell(o,zi.delete_child(n,i,[r,r+1])):l.tell(this,zi.reset(this.id,[]));return l}const p=this.children[u-1],f=this.children[h],m=h-u;let _=this.splice(c,m);return l.add_recover(zi.insert_child(this.id,_.data,c)),"backward"===i?p?l.tell(p,Ni.in_tail(p.id)):f&&l.tell(f,Ni.in_head(f.id)):"forward"===i&&(f?l.tell(f,Ni.in_head(f.id)):p&&l.tell(p,Ni.in_tail(p.id))),l}get_valid_index(e){return"head"===e?0:"tail"===e?this.child_count:e<0?0:e>this.child_count?this.child_count:e}static filter_out_empty(e){return e.filter(e=>!Qd.is_empty_text(e))}static get meta(){return{type:S.Cubes.box_folder,cubename:"折叠块",version:1,block:!0,show:!0}}static get_default(e=[],t={},n={fold:!1}){const r=0===e.length?[hu.get_default()]:e;return{id:od.get_id(),type:S.Cubes.box_folder,info:r,css:t,attrs:n}}static replace_id(e,t,n,r){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info){const n=Mi.find_cube(o.type);n&&n.replace_id&&s.push(n.replace_id(e,t,o,r))}return n.info=s,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Ru([Ri(_.Names.cube_delete_adjacent)],Pu.prototype,"on_cube_delete_adjacent",null),Ru([Ri(_.Names.cube_merge)],Pu.prototype,"on_merge",null),Ru([Ri(_.Names.cube_reorder)],Pu.prototype,"on_cube_reorder",null),Ru([Ri(_.Names.cube_reset)],Pu.prototype,"on_cube_reset",null),Ru([Ri(_.Names.cube_insert_child)],Pu.prototype,"on_insert_child",null),Ru([Ri(_.Names.cube_delete_child)],Pu.prototype,"on_delete_child",null),Pu=Ru([Si],Pu);class Ou{}class Eu{static update(e,t){return{id:e,name:f.Names.update,attrs:t}}}class Lu extends Yc{_linker;_point_from={x:0,y:0};_point_to={x:0,y:0};_path="";_sample=[];_from_node;_to_node;_prev_layout_type=null;_prev_line_type="bezier2";_prev_line_width=2;_prev_line_stroke=void 0;_prev_from_rect={x:0,y:0,width:0,height:0};_prev_to_rect={x:0,y:0,width:0,height:0};constructor(e){super(e),this._linker=e,this._from_node=this.pcube.get_node(this.linker.from_id),this._to_node=this.pcube.get_node(this.linker.to_id)}get linker(){return this._linker}get status(){return this.linker.status}get path(){return this._path}get attrs(){return this.cube.attrs}get sample(){return[...this._sample]}get from_node(){return this.linker.from_node}get to_node(){return this.linker.to_node}get line_type(){return this.attrs.type||this.from_node?.map2d.node_line_type||"bezier2"}get anchor_left(){return this.from_node?.attrs.anchor_out||p.Anchor.point}get anchor_right(){return this.to_node?.attrs.anchor_in||p.Anchor.arrow}get line_stroke(){return this.attrs.stroke||this.from_node?.map2d.node_fill}get line_width(){return this.attrs.stroke_width||this.from_node?.map2d.node_line_width||2}get rect(){return{x:Math.min(this._point_from.x,this._point_to.x),y:Math.min(this._point_from.y,this._point_to.y),width:Math.abs(this._point_from.x-this._point_to.x),height:Math.abs(this._point_from.y-this._point_to.y)}}clone_rect(e){return{x:e.x,y:e.y,width:e.width,height:e.height}}update_path(){const e=this.linker,t=e.from_node,n=e.to_node;if(!t||!n)return"";const r=t.env.layout_type,o=t.map2d.rect,i=n.map2d.rect;let s,a=!1;for(s in o)if(o[s]!==this._prev_from_rect[s]){a=!0;break}if(!a)for(s in i)if(i[s]!==this._prev_to_rect[s]){a=!0;break}a||r===this._prev_layout_type||(a=!0);const l=this.line_type;a||l===this._prev_line_type||(a=!0);const c=this.line_width;a||c===this._prev_line_width||(a=!0);const d=this.line_stroke;if(a||d===this._prev_line_stroke||(a=!0),!a)return;this._prev_layout_type=r,this._prev_line_type=l,this._prev_line_width=c,this._prev_line_stroke=d,this._prev_from_rect=this.clone_rect(o),this._prev_to_rect=this.clone_rect(i);const u=Hu.find(t,n);if(u){this._point_from=u.from,this._point_to=u.to;const e=ju.draw({type:l,...u});this._path=e,this._sample=Qi.svg_path_sample(e,8),this.status.update_path(e),this.status.update_sample(this._sample),this.status.update_line_type(l),this.status.update_line_stroke(d),this.status.update_line_width(c)}}get_upstream_sum_scale(){const e=[];let t=this.pcube;for(;t&&((t instanceof Mk||t instanceof ih)&&e.push(t),t.pcube);)t=t.pcube;let n=1,r=1;for(let t of e){const{a:e,d:o}=t.matrix2d;n*=e,r*=o}return{sx:n,sy:r}}}class Iu extends Rs{_path=Vt("");_sample=Pt([]);_point_from=Pt({x:0,y:0});_point_to=Pt({x:0,y:0});_line_type=Vt("bezier2");_line_width=Vt(2);_line_stroke=Vt(void 0);constructor(e){super(e)}init(){super.init(),this._line_type.value=this._data.attrs.type||this.from_node?.status.node_line_type||"bezier2",this._line_stroke.value=this._data.attrs.stroke||this.from_node?.status.node_fill,this._line_width.value=this._data.attrs.stroke_width||this.from_node?.status.node_line_width||2}get map2d(){return this.cube.map2d}get cube(){return this._cube}get path(){return this._path.value}get point_from(){return this._point_from}get point_to(){return this._point_to}set point_from(e){Object.assign(this._point_from,e)}set point_to(e){Object.assign(this._point_to,e)}get map(){return this.cube.pcube}get from_node(){return this.cube.from_node}get to_node(){return this.cube.to_node}get sample(){return[...this._sample]}get anchor_left(){return this.from_node?.status.node_anchor_out||p.Anchor.point}get anchor_right(){return this.to_node?.status.node_anchor_in||p.Anchor.arrow}get line_type(){return this._line_type.value}get line_stroke(){return this._line_stroke.value}get line_width(){return this._line_width.value}get css(){return{...super.css,stroke:this.line_stroke,"stroke-width":this.line_width}}update_path(e){this._path.value=e}update_line_type(e){this._line_type.value=e}update_line_stroke(e){this._line_stroke.value=e}update_line_width(e){this._line_width.value=e}update_sample(e){this._sample.splice(0,this._sample.length,...e)}fresh_sample(){return Qi.svg_path_sample(this.path,8)}}function Du(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Bu extends Wc{_status=new Iu(this);_map2d=new Lu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get map2d(){return this._map2d}get status(){return this._status}get show(){return this.pcube.is_linker_visible(this)}get info(){return this.data.info}get rect(){return this.map2d.rect}get component(){return Hs}get from_id(){return this.attrs.from}get to_id(){return this.attrs.to}get from_node(){return this.pcube.get_node(this.from_id)}get to_node(){return this.pcube.get_node(this.to_id)}get meta(){return Bu.meta}get id(){return Qi.get_linker_id(this.from_id,this.to_id)}export(){const e=this.base_export();return e.attrs.from=this.from_id,e.attrs.to=this.to_id,e}build_child(e){}update_data(e,t){return Bu.update_data(e,t)}replace_id(e,t,n={}){return Bu.replace_id(this.root,e,t,n)}get_linker_info(){const e=this.from_node,t=this.to_node;if(!e||!t)return;const n=this.pcube.get_node_to(e.id),r=this.pcube.get_node_from(t.id),o=n?.indexOf(t.id)||-1,i=r?.indexOf(e.id)||-1;return{linker:this.export(),index_from:i,index_to:o}}on_linker_update(e){const{courier:t,history:n}=this,{attrs:r}=e,o=t.get_recorder();o.add_cmd(e);const i=structuredClone(Ht(this.data.attrs));Object.assign(this.attrs,r),this.status.update_attrs(r);const s=Eu.update(this.id,i);return o.add_recover(s),o}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n.attrs.from=r[n.attrs.from]||n.attrs.from,n.attrs.to=r[n.attrs.to]||n.attrs.to,n}static get meta(){return{cubename:"连接线",type:S.Cubes.linker,block:!1,version:2,show:!1}}static get_default(e,t,n){return{id:Qi.get_linker_id(e,t),type:S.Cubes.linker,info:{},attrs:{from:e,to:t},css:{}}}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(delete t.attrs.stroke,delete t.attrs.stroke_width,delete t.attrs.type),{usable:!0,data:t})}}Du([Ri(f.Names.update)],Bu.prototype,"on_linker_update",null),Bu=Du([Si],Bu);class ju{static draw(e){const{type:t,from:n,to:r}=e;return"line"===t?this.line(n,r):"bezier2"===t?this.bezier2(n,r):"polyline"===t?this.polyline(n,r):"polyline2"===t?this.polyline2(n,r):"polyline3"===t?this.polyline3(n,r):"wave"===t?this.wave(n,r):"fold1"===t?this.fold1(n,r):"fold2"===t?this.fold2(n,r):this.bezier2(n,r)}static get_line(e,t,n){return"line"===n?this.line(e,t):"bezier2"===n?this.bezier2(e,t):"polyline"===n?this.polyline(e,t):"polyline2"===n?this.polyline2(e,t):"polyline3"===n?this.polyline3(e,t):"wave"===n?this.wave(e,t):"fold1"===n?this.fold1(e,t):"fold2"===n?this.fold2(e,t):this.bezier2(e,t)}static line(e,t){return`M${e.x.toFixed(1)} ${e.y.toFixed(1)}L${t.x.toFixed(1)} ${t.y.toFixed(1)}`}static bezier2(e,t){const n=(e.x+t.x)/2,r=n,o=e.y,i=n,s=t.y;return`M${e.x.toFixed(1)} ${e.y.toFixed(1)} C${r} ${o} ${i} ${s} ${t.x.toFixed(1)} ${t.y.toFixed(1)}`}static polyline(e,t,n=4){const r=(e.x+t.x)/2,o=e,i=t,s=r,a=o.y,l=r,c=i.y,d=Math.sign(e.x-t.x),u=Math.sign(t.y-e.y),h=Math.sign(e.y-t.y),p=Math.sign(t.x-e.x);return`M${o.x} ${o.y} H ${s+d*n} Q ${s} ${a} ${s} ${a+u*n} V ${c+h*n} Q${l} ${c} ${l+p*n} ${c} H ${i.x}`}static polyline2(e,t,n=4){const r=e,o=t,i=(e.x+t.x)/2,s=r.y;return`M${r.x} ${r.y} L${i} ${s} L ${o.x} ${o.y}`}static polyline3(e,t,n=4){const r=(e.x+t.x)/2,o=e,i=t,s=(o.y,r),a=i.y;return`M${o.x} ${o.y} L${s} ${a} L ${i.x} ${i.y}`}static fold1(e,t,n=4){const r=Math.sign(t.y-e.y),o=Math.sign(t.x-e.x),i=Math.min(n,Math.abs(t.y-e.y)/2,Math.abs(t.x-e.x)/2);return`M${e.x} ${e.y} V${t.y-r*i} Q${e.x} ${t.y} ${e.x+o*i} ${t.y} H${t.x}`}static fold2(e,t,n=4){const r=Math.sign(t.x-e.x),o=Math.sign(t.y-e.y),i=Math.min(n,Math.abs(t.x-e.x)/2,Math.abs(t.y-e.y)/2);return`M${e.x} ${e.y} H${t.x-r*i} Q${t.x} ${e.y} ${t.x} ${e.y+o*i} V${t.y}`}static wave(e,t,n=2,r=8){const o=t.x-e.x,i=t.y-e.y,s=Math.sqrt(o*o+i*i),a=Math.atan2(i,o),l=r??s/10;let c=`M ${e.x} ${e.y}`;const d=20*n;for(let t=0;t<=d;t++){const r=t/d,s=e.x+o*r,u=e.y+i*r,h=l*Math.sin(r*n*Math.PI*2),p=s+-Math.sin(a)*h,f=u+Math.cos(a)*h;if(0===t)c+=` M ${p} ${f}`;else{const r=(t-1)/d,s=l*Math.sin(r*n*Math.PI*2),u=-Math.sin(a)*s,h=Math.cos(a)*s,m=e.x+o*r+u,_=e.y+i*r+h;c+=` C ${m+(p-m)/3} ${_+(f-_)/3}, ${p-(p-m)/3} ${f-(f-_)/3}, ${p} ${f}`}}return c}}class Hu{static map={right:this.right.bind(this),left:this.left.bind(this),down:this.down.bind(this),up:this.up.bind(this),"time-right":this.time_right.bind(this),"time-down":this.time_down.bind(this),"file-tree":this.file_tree.bind(this)};static find(e,t){const n=e.env.layout_type;if(t.env.upstream!==e)return this.free_to_any(e,t);if(n){return(0,this.map[n])(e,t)}return this.free_to_any(e,t)}static get_point(e){const t=e.env.layout_type;if(!t)return;const n=e.map2d.rect,r=Gi.IMath.RectPosition;return"right"===t?Gi.MathRect.get_rect_point(n,r.right_mid):"left"===t?Gi.MathRect.get_rect_point(n,r.left_mid):"down"===t?Gi.MathRect.get_rect_point(n,r.bottom_mid):"up"===t?Gi.MathRect.get_rect_point(n,r.top_mid):"time-down"===t?Gi.MathRect.get_rect_point(n,r.bottom_mid):"time-right"===t?Gi.MathRect.get_rect_point(n,r.right_mid):void 0}static time_down(e,t){const n=(t.env.prev_node||e).map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.bottom_mid),to:Gi.MathRect.get_rect_point(r,o.top_mid)}}static time_right(e,t){const n=(t.env.prev_node||e).map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.right_mid),to:Gi.MathRect.get_rect_point(r,o.left_mid)}}static up(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.top_mid),to:Gi.MathRect.get_rect_point(r,o.bottom_mid)}}static right(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.right_mid),to:Gi.MathRect.get_rect_point(r,o.left_mid)}}static left(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.left_mid),to:Gi.MathRect.get_rect_point(r,o.right_mid)}}static down(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.bottom_mid),to:Gi.MathRect.get_rect_point(r,o.top_mid)}}static file_tree(e,t){const n=e.map2d.rect,r=t.map2d.rect,o=Gi.IMath.RectPosition;return{from:Gi.MathRect.get_rect_point(n,o.bottom_mid),to:Gi.MathRect.get_rect_point(r,o.left_mid)}}static free_to_any(e,t){const n=e.map2d.shape_sample,r=t.map2d.shape_sample;if(0!==n.length&&0!==r.length)return Qi.find_closest_points(n,r)}}class qu{_observer;_nodes={};constructor(){this._observer=new ResizeObserver(this.watch.bind(this))}watch(e,t){for(let t of e){const e=t.target,n=t.target.dataset.id,r=this._nodes[n];r&&e.isConnected&&r.layout_self(t)}}register(e,t){const n=e.dataset.id;n&&(this._nodes[n]=t,this._observer.observe(e))}unregister(e){const t=e.dataset.id;t&&(delete this._nodes[t],e&&this._observer.unobserve(e))}}const Fu=new qu,$u=["id","data-type","transform","data-editing"],Gu=["d"],Vu=["x","y","width","height"],Uu=["data-id"],Ku={class:"node-status"},Wu=En({__name:"cube-node",props:{cube:{}},setup(e){const{map2d:t,status:n}=e.cube,r=Vt();Zn(()=>{const t=r.value;t&&Fu.register(t,e.cube)}),tr(()=>{const e=r.value;e&&Fu.unregister(e)});const o=gi(()=>({"node-selected":e.cube.pcube.status.is_node_selected(e.cube),"node-editable":n.editable,"line-delete-selected":e.cube.pcube.status.is_line_deleted(e.cube),"node-dragging":e.cube.pcube.status.is_node_dragging(e.cube)}));function i(){const{courier:t,history:n}=e.cube,r=t.get_recorder(),o=ts.layout_change(e.cube.id,{root:!1});r.tell(e.cube,o),n.record(r)}function s(t=!0){const{courier:n,history:r}=e.cube,o=n.get_recorder(),i=ts.layout_change(e.cube.id,{fold:t});o.tell(e.cube,i),r.record(o)}const a=gi(()=>{const e=n.css.fill;return{"--fill":e,"--color":function(e,t="#FFFFFF",n=158){if(!e)return"";const r=zl(e),{r:o,g:i,b:s,a}=r;if(1===a)return(299*o+587*i+114*s)/1e3>n?"#000000":"#FFFFFF";if(0===a){const e=zl(t);return(299*e.r+587*e.g+114*e.b)/1e3>n?"#000000":"#FFFFFF"}const l=zl(t);return(299*Math.round(o*a+l.r*(1-a))+587*Math.round(i*a+l.g*(1-a))+114*Math.round(s*a+l.b*(1-a)))/1e3>n?"#000000":"#FFFFFF"}(e,kl.bg)}});function l(){const{courier:t,history:n}=e.cube,r=t.get_recorder(),o=ts.layout_change(e.cube.id,{outbox:!1});r.tell(e.cube,o),n.record(r)}return(t,c)=>(No(),Oo("g",{id:t.cube.id,"data-type":t.cube.type,class:me(["cube-node",o.value]),transform:Yt(n).matrix2d_dom_string,"data-editing":Yt(n).editable,style:de(a.value)},[jo("path",{d:Yt(n).shape_path,ref:"p"},null,8,Gu),(No(),Oo("foreignObject",{x:Yt(n).rect_cbox.x,y:Yt(n).rect_cbox.y,width:Yt(n).rect_cbox.width,height:Yt(n).rect_cbox.height,style:de(Yt(n).css)},[jo("div",{class:"cube-node-box",ref_key:"box",ref:r,"data-id":t.cube.id},[(No(!0),Oo(wo,null,hr(Yt(n).children,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128)),Vo(" node statusbar "),jo("div",Ku,[Yt(n).attrs.root?(No(),Oo("div",{key:0,class:"iconfont icon-system-mind-map-filled",onClick:i})):Vo("v-if",!0),Yt(n).attrs.layout?(No(),Oo("div",{key:1,class:me(Yt(El).get_layout_icons(Yt(n).layout_type)),onClick:c[0]||(c[0]=t=>{return n=t,void e.cube.float.float_node_layout.show(n,e.cube);var n})},null,2)):Vo("v-if",!0),Yt(n).attrs.outbox?(No(),Oo("div",{key:2,class:"iconfont icon-background",onClick:l})):Vo("v-if",!0),Yt(n).has_layout_ability&&Yt(n).downstream_nodes_count>0?(No(),Oo(wo,{key:3},[Yt(n).attrs.fold?(No(),Oo("div",{key:0,class:"status-fold",onClick:c[1]||(c[1]=e=>s(!1))},ve(Yt(n).downstream_nodes_count),1)):(No(),Oo("div",{key:1,class:"iconfont icon-minussquare",onClick:c[2]||(c[2]=e=>s(!0))}))],64)):Vo("v-if",!0)])],8,Uu)],12,Vu))],14,$u))}}),Yu=(0,Is.A)(Wu,[["__scopeId","data-v-70d9594b"]]);class Xu extends td{constructor(e){super(e)}get cube(){return this._cube}}class Ju extends nd{constructor(e){super(e)}}class Zu extends Qc{_status=new Ju(this);_map2d=new Xu(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get map2d(){return this._map2d}get status(){return this._status}get meta(){return Zu.meta}get component(){return Yu}build_child(e){od.build_cubes(e.info,this,this._children)}update_data(e,t){return Zu.update_data(e,t)}gc(){this.base_gc()}export(){const e=this.base_export();e.info=[],e.attrs=structuredClone(Ht(this.attrs)),e.attrs.matrix2d=this.matrix2d_real;const{width:t,height:n}=this.map2d.rect_cbox;e.attrs.size={width:t,height:n};for(let t of this._children)e.info.push(t.export());return e}replace_id(e,t,n={}){return Zu.replace_id(this.root,e,t,n)}static get meta(){return{cubename:"图形节点",type:S.Cubes.node,block:!0,version:1,show:!1}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,od.replace_id(e,t,n.info,r),n}static get_default(e,t=[],n="rect"){const r=t.length>0?t:[xu.get_default()];return{id:od.get_id(),type:S.Cubes.node,info:r,attrs:{root:!1,matrix2d:{a:1,b:0,c:0,d:1,e:e.x,f:e.y},shape:n,layout:null},css:{}}}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}Zu=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([Si],Zu);class Qu{static get_shaple(e,t=8){const n=e.shape_type;return"rect"===n?this.rect(e,t):"circle"===n?this.circle(e,t):this.rect(e)}static rect(e,t=8,n=8){const{width:r,height:o}=e.rect_cbox,i=0,s=0,a=r+2*t,l=0,c=r+2*t,d=o+2*t,u=0,h=o+2*t;return`M${i+n} ${s}H${a-n}Q${a} ${l} ${a} ${l+n}V${d-n}Q${c} ${d} ${c-n} ${d}H ${u+n}Q${u} ${h} ${u} ${h-n}V${s+n}Q${i} ${s} ${i+n} ${s}Z`}static circle(e,t=8){const{width:n,height:r}=e.rect_cbox,o=Math.sqrt(n*n+r*r)/2,i=0;return`M${o} ${i} A ${o} ${o} 0 1 0 ${o} ${2*o}A${o} ${o} 0 1 0 ${o} ${i}`}}class eh{_row;_col;_nodes=new Set;constructor(e,t){this._row=e,this._col=t}get pos(){return{row:this._row,col:this._col}}get row(){return this._row}get col(){return this._col}get nodes(){return new Set(this._nodes)}add_node(e){this._nodes.add(e)}remove_node(e){this._nodes.delete(e)}}class th{_map;_nodes=new Map;_grider=[];_grid_width;_grid_height;constructor(e){this._map=e,this._grid_width=window.innerWidth,this._grid_height=window.innerHeight}get map(){return this._map}get grid_size(){return{width:this._grid_width,height:this._grid_height}}get row(){return this._grider.length}get col(){let e=1;for(let t of this._grider)t.length>e&&(e=t.length);return e}update_nodes(e){for(let t of e)this.update_node(t)}update_node(e){const t=this.get_node_griders(e),n=e.id;if(this._nodes.has(n)){const t=this._nodes.get(n);for(let n of t)n.remove_node(e)}const r=[];for(let e of t){const t=e.row,n=e.col;if(this._grider[t]||(this._grider[t]=[]),!this._grider[t][n]){const e=new eh(t,n);this._grider[t][n]=e}r.push(this._grider[t][n])}this._nodes.set(n,r);for(let t of r)t.add_node(e)}remove_node(e){const t=e.id;if(this._nodes.has(t)){const n=this._nodes.get(t);for(let t of n)t.remove_node(e);this._nodes.delete(t)}}get_node_griders(e){const t=[],n=e.map2d.rect_raw,r=Math.floor(n.y/this._grid_height),o=Math.floor((n.y+n.height)/this._grid_height),i=Math.floor(n.x/this._grid_width),s=Math.floor((n.x+n.width)/this._grid_width);for(let e=r;e<=o;e++)for(let n=i;n<=s;n++)t.push({row:e,col:n});return t}get_viewport_griders(){const e=this._map.get_view_rect(),t=[],n=Math.floor(e.y/this._grid_height),r=Math.floor((e.y+e.height)/this._grid_height),o=Math.floor(e.x/this._grid_width),i=Math.floor((e.x+e.width)/this._grid_width);for(let e=n;e<=r;e++)for(let n=o;n<=i;n++)this._grider[e]&&this._grider[e][n]&&t.push(this._grider[e][n]);return t}get_intersection_griders(e){const t=[],n=Math.floor(e.y/this._grid_height),r=Math.floor((e.y+e.height)/this._grid_height),o=Math.floor(e.x/this._grid_width),i=Math.floor((e.x+e.width)/this._grid_width);for(let e=n;e<=r;e++)for(let n=o;n<=i;n++)this._grider[e]&&this._grider[e][n]&&t.push(this._grider[e][n]);return t}get_intersection_nodes(e,t=!0){const n=new Set,r=this.get_intersection_griders(e),o=this.grid_size;for(let i of r){const r={x:i.col*o.width,y:i.row*o.height,width:o.width,height:o.height};if(Gi.MathRect.is_include(e,r))for(let e of i.nodes)!t&&e.env.folded_upstream||n.add(e);else for(let r of i.nodes)!t&&r.env.folded_upstream||Gi.MathRect.check_intersection(e,r.map2d.rect)&&n.add(r)}return n}}class nh extends Ps{_nodes_count=Vt(0);_view_rect=Pt({x:0,y:0,width:0,height:0});_nodes_view=Ot(new Set);_linkers_view=Ot(new Set);_nodes_selected=Ot(new Set);_nodes_editing=Ot(new Set);_nodes_outbox=Ot(new Set);_line_delete_selected=Ot(new Set);_nodes_dragging=Ot(new Set);_placeholder_linkers=Pt([]);_placeholder_box_selector=Vt("");_placeholder_line_delete=Vt("");constructor(e){super(e)}get attrs(){return this._data.attrs}get matrix2d(){return{...this.attrs.matrix2d}}get line_delete_selected(){return new Set(this._line_delete_selected)}get nodes_count(){return this._nodes_count.value}get nodes_view_count(){return this._nodes_view.size}get view_rect(){return{...this._view_rect}}get view_center(){const e=this._view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get map(){return this._cube}get matrix2d_dom_string(){return Zi.get_dom_string(this.matrix2d)}get placeholder_linkers(){return[...this._placeholder_linkers]}get placeholder_box_selector(){return this._placeholder_box_selector.value}get placeholder_line_delete(){return this._placeholder_line_delete.value}get nodes_view(){return new Set(this._nodes_view)}get linkers_view(){return new Set(this._linkers_view)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}reset_nodes_view(e){this._nodes_view.clear();for(let t of e)this._nodes_view.add(t)}reset_nodes_outbox(e){this._nodes_outbox.clear();for(let t of e)this._nodes_outbox.add(t)}reset_linkers_view(e){this._linkers_view.clear();for(let t of e)this._linkers_view.add(t)}remove_linker(e){this._linkers_view.delete(e),this._line_delete_selected.delete(e)}remove_node(e){this._nodes_view.delete(e),this._nodes_selected.delete(e),this._nodes_editing.delete(e),this._nodes_outbox.delete(e),this._line_delete_selected.delete(e),this._nodes_dragging.delete(e),this._nodes_count.value--}set_node_visible(e,t){t?this._nodes_view.add(e):this._nodes_view.delete(e)}set_linker_visible(e,t){t?this._linkers_view.add(e):this._linkers_view.delete(e)}set_node_editing(e,t){t?this._nodes_editing.add(e):this._nodes_editing.delete(e)}set_node_selected(e,t){t?this._nodes_selected.add(e):this._nodes_selected.delete(e)}set_node_outbox(e,t){t?this._nodes_outbox.add(e):this._nodes_outbox.delete(e)}set_line_deleted(e,t){t?this._line_delete_selected.add(e):this._line_delete_selected.delete(e)}is_node_visible(e){return this._nodes_view.has(e)}is_linker_visible(e){return this._linkers_view.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_line_deleted(){this._line_delete_selected.clear()}clear_node_editing(){for(let e of this.nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear()}clear_node_outbox(){this._nodes_outbox.clear()}update_nodes_count(e){this._nodes_count.value=e}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.map.matrix2d)}update_view_rect(e){Object.assign(this._view_rect,e)}update_placeholder_box_selector(e){this._placeholder_box_selector.value=e}update_placeholder_line_delete(e){this._placeholder_line_delete.value=e}update_placeholder_linkers(e){this._placeholder_linkers.length=0,this._placeholder_linkers.push(...e)}add_placeholder_linker(e){this._placeholder_linkers.push(e)}get nodes_dragging(){return new Set(this._nodes_dragging)}set_node_dragging(e,t){t?this._nodes_dragging.add(e):this._nodes_dragging.delete(e)}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_nodes_dragging(){this._nodes_dragging.clear()}}class rh extends xi{_ui_visible=Vt(!1);_canvas;_ui_scale=Vt(1);constructor(e){super(e)}get ui_scale(){return this._ui_scale.value}set ui_scale(e){this._ui_scale.value=e}get ui_width(){return this.grider.grid_size.width/4*this.ui_scale}get ui_height(){return this.grider.grid_size.height/4*this.ui_scale}get canvas(){return this._canvas}init(e){this._canvas=e}get grider(){return this.map.grider}get map(){return this._root}get ui_visible(){return this._ui_visible.value}get size_map(){const e=this.grider.row,t=this.grider.col,n=this.grider.grid_size;return{width:t*n.width,height:e*n.height}}get_scale(){const e=this.ui_width,t=this.ui_height,n=this.size_map,r=e/n.width,o=t/n.height;return Math.min(r,o)}get mini_nodes(){const e=getComputedStyle(document.documentElement).getPropertyValue("--node-bg").trim()||"#d1faf580",t=[];for(const[,n]of this.map.nodes){if(n.env.folded_upstream)continue;const r=n.map2d.rect;t.push({x:r.x,y:r.y,width:r.width,height:r.height,fill:n.map2d.node_fill||e})}return t}get content_rect(){const e=this.map.view_rect,t=this.mini_nodes;let n=e.x,r=e.y,o=e.x+e.width,i=e.y+e.height;for(const e of t)n=Math.min(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.x+e.width),i=Math.max(i,e.y+e.height);return{x:n,y:r,width:Math.max(o-n,1),height:Math.max(i-r,1)}}get_render_state(){const e=this.content_rect,t=this.ui_width,n=this.ui_height,r=t/e.width,o=n/e.height,i=Math.min(r,o);return{bounds:e,nodes:this.mini_nodes,scale:i}}toggle_visible(){this._ui_visible.value=!this._ui_visible.value,this._ui_visible.value&&this.refresh()}translate_delta(e,t){const{scale:n}=this.get_render_state();if(!Number.isFinite(n)||n<=0)return;const r=t/n,o=-(e/n)*this.map.matrix2d.a,i=-r*this.map.matrix2d.d;this.map.translate(o,i),this.refresh()}refresh_viewport(e,t){if(!this._ui_visible.value||!this._canvas)return;const n=this._canvas.getContext("2d");if(!n)return;const r=this.map.view_rect,o=getComputedStyle(document.documentElement),i=o.getPropertyValue("--placeholder-box-selector-fill").trim()||"#a5f3fc33",s=o.getPropertyValue("--placeholder-box-selector-stroke").trim()||"#0891b2";n.strokeStyle=s,n.fillStyle=i,n.lineWidth=1;const a=(r.x-e.x)*t,l=(r.y-e.y)*t,c=r.width*t,d=r.height*t;n.fillRect(a,l,c,d),n.strokeRect(a,l,c,d)}refresh(){if(!this.ui_visible||!this._canvas)return;const e=Date.now(),t=this._canvas.getContext("2d");if(!t)return;t.resetTransform();const n=this.ui_width,r=this.ui_height,{bounds:o,nodes:i,scale:s}=this.get_render_state();t.clearRect(0,0,n,r);for(const e of i){t.fillStyle=e.fill;const n=(e.x-o.x)*s,r=(e.y-o.y)*s,i=e.width*s,a=e.height*s;t.fillRect(n,r,i,a)}this.refresh_viewport(o,s),console.log("🐋minimap-refresh",Date.now()-e)}}function oh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class ih extends Ts{_status=new nh(this);_map_interaction=new ws(this);_grider=new th(this);_canvas=new rh(this);_app;_has_layout=!1;_nodes=new Map;_linkers=new Map;_node_from=this.data.info.node_from;_node_to=this.data.info.node_to;_nodes_editing=new Set;_nodes_outbox=new Set;_nodes_selected=new Set;_line_delete_selected=new Set;_nodes_dragging=new Set;_view_nodes=new Set;_view_linkers=new Set;_view_rect={x:0,y:0,width:0,height:0};constructor(e){super(e),this.setup(),this.status.init(),this._app=Ra(Kc,{cube:this}),this.stats.view="map"}get nodes(){return new Map(this._nodes)}get linkers(){return new Map(this._linkers)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}get nodes_view(){return new Set(this._view_nodes)}get linkers_view(){return new Set(this._view_linkers)}get line_deleted(){return new Set(this._line_delete_selected)}get id(){return this.data.id}get type(){return this.data.type}get status(){return this._status}get grider(){return this._grider}get canvas(){return this._canvas}get map_interaction(){return this._map_interaction}get matrix2d(){return this.attrs.matrix2d}get matrix2d_dom_string(){return Zi.get_dom_string(this.matrix2d)}get attrs(){return this.data.attrs}get has_layout(){return this._has_layout}get dom_rect(){const e=this.dom;return e?e.getBoundingClientRect():new DOMRect(0,0,0,0)}get dom_svg_rect(){const e=this.dom?.getElementsByTagName("svg");return e?e[0].getBoundingClientRect():new DOMRect(0,0,0,0)}get app(){return this._app}get component(){return Kc}get meta(){return ih.meta}get children(){return[...this._children]}get view_rect(){return{...this._view_rect}}wait_nodes_render(e){return Qi.wait_nodes_render(e)}find_cube(e){return this.cubes.find_cube(e)}filter(e){const t=[];for(let n of this._linkers.values())e(n)&&t.push(n),t.push(...n.filter(e));for(let n of this._nodes.values())e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this._linkers.values())e(t),t.each(e);for(let t of this._nodes.values())e(t),t.each(e)}find_child_cube(e){return this._nodes.get(e)||this._linkers.get(e)}pick(...e){for(let t of e)t instanceof Qc?(this._nodes.set(t.id,t),this._view_nodes.add(t),this.status.set_node_visible(t,!0)):t instanceof Bu&&(this._linkers.set(t.id,t),this._view_linkers.add(t),this.status.set_linker_visible(t,!0));this.status.update_nodes_count(this._nodes.size)}remove_node(e){this._nodes.delete(e.id),this._view_nodes.delete(e),this._nodes_outbox.delete(e),this.grider.remove_node(e),this.status.remove_node(e),e.gc(),this.status.update_nodes_count(this._nodes.size)}remove_linker(e){const t=this.get_node_to(e.from_id),n=this.get_node_from(e.to_id);let r;if(t&&n){const o=t.indexOf(e.to_id),i=n.indexOf(e.from_id);t.splice(o,1),n.splice(i,1),r={linker:e.export(),index_to:o,index_from:i}}return this._linkers.delete(e.id),this._view_linkers.delete(e),this._status.remove_linker(e),e.gc(),r}async build_child(e){const{nodes:t,linkers:n}=e.info;console.time("🍋build-nodes");for(let e of t){let t=new Zu(e,this);this._nodes.set(t.id,t),t.attrs.outbox&&this._nodes_outbox.add(t),t.layouted||this._view_nodes.add(t)}this.status.reset_nodes_view(this._view_nodes),this.status.reset_nodes_outbox(this._nodes_outbox),this.status.update_nodes_count(this._nodes.size),console.timeEnd("🍋build-nodes");for(let e of n){const{from:t,to:n}=e.attrs,r=this.get_node(e.attrs.from),o=this.get_node(e.attrs.to);if(!r||!o){const e=this._node_to[t],r=e.indexOf(n);e.splice(r,0);const o=this._node_from[n],i=o.indexOf(t);o.splice(i,1);continue}const i=new Bu(e,this);this._linkers.set(i.id,i)}this.init_env()}init_env(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&e.push(t);for(let t of e)t.env.flow("downstream")}init_map2d(){console.time("🍋wait-size-tree");const e=[];for(let t of this._nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.map2d.flow();console.timeEnd("🍋wait-size-tree")}init_grider(){const e=Date.now();this._grider.update_nodes(this._nodes.values()),console.log("🍋init-grider:",Date.now()-e)}gc(){}export(){const e={nodes:[],linkers:[],node_from:structuredClone(this._node_from),node_to:structuredClone(this._node_to)},t=structuredClone({...this.data,info:e});t.attrs.theme=Mi.note_theme,t.versions=Mi.export_versions();for(let e of this._nodes.values())t.info.nodes.push(e.export());for(let e of this._linkers.values())t.info.linkers.push(e.export());return t}update_data(e,t){return ih.update_data(e,t)}async render(e){this._dom=e,this.app.mount(e),console.time("🍋wait-svg & nodes"),await Ka.ps,await Qi.wait_nodes_render(this._view_nodes),await od.sleep(100),console.timeEnd("🍋wait-svg & nodes"),this.init_map2d(),this.init_grider(),this.check_show(),this._has_layout=!0;const t=this.dom?.querySelector(".note");this.event.emit_status_update(),t&&(this.hotkeys.listen(t),this.map_interaction.register(t))}is_noop_sibling_move(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;return o===("prev"===r?i:i+1)}reorder_siblings(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;e.splice(o,1);const s=e.indexOf(n),a="prev"===r?s:s+1;return e.splice(a,0,t),!0}on_node_add(e){const{data:t}=e,{cursor:n,courier:r,history:o}=this,i=r.get_recorder();i.add_cmd(e);const s=od.build_cubes(t,this);this.pick(...s);const a=t.map(e=>e.id);return i.add_recover(es.node_remove(this.id,a)),Promise.resolve().then(async()=>{const e=s.map(e=>e.wait_layout_self());await Promise.all(e),this.grider.update_nodes(s)}),i}on_node_remove(e){const{data:t}=e,{courier:n,cursor:r,history:o}=this;if(0===t.length)return;const i=n.get_recorder();i.add_cmd(e);const s=[],a=new Set,l=new Set,c=new Set;for(let e of t){const t=this.get_node(e);if(t){a.add(t);for(let e of t.env.downstream_nodes)a.add(e)}}for(let e of a){for(const t of e.linkers_from)c.add(t.id);for(const t of e.linkers_to)c.add(t.id)}let d=new Set;for(let e of a){s.push(e.export());const t=e.env.layout_root;t&&t!==e&&l.add(e.env.layout_root);e.env.upstream&&d.add(e.env.upstream),this.remove_node(e)}for(let e of d)e.env.flow("self");return i.tell(this,es.linker_remove(this.id,[...c],!1)),i.add_recover(es.node_add(this.id,s)),i}on_linker_add(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this,s=r.get_recorder();if(0===t.length)return;let a=Promise.resolve();s.add_cmd(e);const l=[],c=[],d=new Set;for(let e of t){const{index_to:t,index_from:n,linker:r}=e,o=new Bu(r,this),i=o.from_node,s=o.to_node;if(!i||!s)continue;this.pick(o);let a=this.get_node_from(o.to_id),u=this.get_node_to(o.from_id);a?a.indexOf(o.from_id)<0&&a.splice(n,0,o.from_id):this._node_from[o.to_id]=[o.from_id],u?u.indexOf(o.to_id)<0&&u.splice(t,0,o.to_id):this._node_to[o.from_id]=[o.to_id],l.unshift(o.id),c.push(s.wait_layout_self()),d.add(i)}const u=new Set;for(let e of d){e.env.flow("downstream"),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&u.add(t)}return s.add_recover(es.linker_remove(this.id,l,n)),a.then(async()=>Promise.all(c)).then(()=>{for(let e of u)e.layout_throttle();0===u.size&&this.check_show()}),s}on_linker_remove(e){const{data:t}=e,n=e.to_root,{courier:r,cursor:o,history:i}=this;if(0===t.length)return;const s=r.get_recorder();s.add_cmd(e);const a=[],l=new Set,c=new Set,d=new Set;for(let e of t){const t=this.get_linker(e);if(!t)continue;const n=t.from_node,r=t.to_node;n&&l.add(n),r&&c.add(r);const o=this.remove_linker(t);o&&a.unshift(o)}if(0!==a.length){if(n)for(let e of c){if(!e.env.check_env(!1).has_root){const t=ts.layout_change(e.id,{root:!0});s.tell(e,t)}}else for(let e of c){const t=e.env.check_env();if(!t.has_root)continue;const n=t.line[1];n.env.flow("downstream"),n.map2d.flow("downstream"),n.map2d.flow("upstream");const r=n.env.layout_root;r&&d.add(r)}for(let e of l){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&d.add(t)}for(let e of d)e.layout_throttle();return this.check_show_throttle(),s.add_recover(es.linker_add(this.id,a)),s}}on_node_drag(e){const{data:t}=e;if(0===t.length)return;const n=this.courier.get_recorder();n.add_cmd(e);const r=new Set,o=new Set;for(let e of t){const t=this.get_node(e.node_id);if(t)if(e.intention){const i=this.get_node(e.intention.target_id);if(!i)continue;const{type:s}=e.intention,a=t.env.upstream,l=t.env.layout_root,c="child"===s?i:i.env.upstream;if(!c)continue;if(c===t)continue;if(t.env.downstream_nodes.has(c))continue;if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[];if(a===c&&this.is_noop_sibling_move(e,t.id,i.id,s))continue}if(a&&r.add(a),r.add(c),r.add(t),l&&o.add(l),a?.env.layout_root&&o.add(a.env.layout_root),c.env.layout_root&&o.add(c.env.layout_root),("prev"===s||"next"===s)&&a===c){const e=this.get_node_to(c.id)||[];this.reorder_siblings(e,t.id,i.id,s);continue}if(a&&a!==c){const e=this.get_linker_id(a.id,t.id);n.tell(this,es.linker_remove(this.id,[e],!1))}if(t.is_layout_root&&n.tell(t,ts.layout_change(t.id,{root:!1})),"child"===s){const e=Qi.create_linker_info(this,i.id,t.id);n.tell(this,es.linker_add(this.id,[e],!1))}else if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[],r=e.indexOf(i.id),o="prev"===s?r:r+1,a={linker:Bu.get_default(c.id,t.id),index_to:o<0?e.length:o,index_from:this.get_node_from(t.id)?.length||0};n.tell(this,es.linker_add(this.id,[a],!1))}}else if(e.matrix2d){const r=ts.layout_change(t.id,{matrix2d:e.matrix2d});n.tell(t,r)}}for(let e of r){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&o.add(t)}for(let e of o)e.layout_throttle();return this.check_show_throttle(),n}replace_id(e,t,n={}){return ih.replace_id(this.root,e,t,n)}get_nodes_intersection(e){const t=this.grider.get_intersection_nodes(e);return Array.from(t)}get_linker_id(e,t){return Qi.get_linker_id(e,t)}get_linker(e){return this._linkers.get(e)}get_node(e){return this._nodes.get(e)}get_node_from(e){return this._node_from[e]}get_node_to(e){return this._node_to[e]}get_view_rect(){const{clientHeight:e,clientWidth:t}=document.documentElement,n=this.dom_rect,r=Math.max(n.left,0),o=Math.min(n.right,t),i={x:r,y:Math.max(0,n.top)},s={x:o,y:Math.min(n.bottom,e)},a=this.view_point_to_real(i),l=this.view_point_to_real(s),c=l.x-a.x,d=l.y-a.y,u={x:Math.trunc(a.x),y:Math.trunc(a.y),width:Math.trunc(c),height:Math.trunc(d)};return Object.assign(this._view_rect,u),this.status.update_view_rect(u),u}get_view_center(){const e=this.view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get_view_cube(e=!0){const t=this.view_rect,n=[],r=this.grider.get_intersection_nodes(t,e);for(let e of r)n.push(e),n.push(...e.linkers_from),n.push(...e.linkers_to);return n}set_node_outbox(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_outbox.add(n):this._nodes_outbox.delete(n),this.status.set_node_outbox(n,t))}set_node_visible(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._view_nodes.add(n):this._view_nodes.delete(n))}set_linker_visible(e,t){const n="string"==typeof e?this.get_linker(e):e;n&&(t?this._view_linkers.add(n):this._view_linkers.delete(n))}set_node_editing(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_editing.add(n):this._nodes_editing.delete(n),this.status.set_node_editing(n,t))}set_node_selected(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_selected.add(n):this._nodes_selected.delete(n),this.status.set_node_selected(n,t))}set_line_deleted(e,t){const n="string"==typeof e?this.get_node(e)||this.get_linker(e):e;n&&(t?this._line_delete_selected.add(n):this._line_delete_selected.delete(n),this.status.set_line_deleted(n,t))}is_node_visible(e){return this._view_nodes.has(e)}is_linker_visible(e){return this._view_linkers.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_node_outbox(){this._nodes_outbox.clear()}clear_node_editing(){for(let e of this._nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear(),this.status.clear_node_selected()}clear_line_deleted(){this._line_delete_selected.clear(),this.status.clear_line_deleted()}set_node_dragging(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_dragging.add(n):this._nodes_dragging.delete(n),this.status.set_node_dragging(n,t))}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_node_dragging(){this._nodes_dragging.clear(),this.status.clear_nodes_dragging()}get_farest_node_selected(e){if(0!==this._nodes_selected.size){if(e===C.Keys.left){let e;for(let t of this._nodes_selected){const n=t.map2d.rect;(!e||n.x<e.map2d.pos.x)&&(e=t)}return e}if(e===C.Keys.right){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.x+n.width>r.x+r.width)&&(e=t)}return e}if(e===C.Keys.down){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y+n.height>r.y+r.height)&&(e=t)}return e}if(e===C.Keys.up){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y<r.y)&&(e=t)}return e}}}get_nearest_node(e,t){const n=e.map2d.rect;let r=e,o=1/0;if(t===C.Keys.left)for(let t of this._nodes.values()){if(!t.show||e===t)continue;const i=t.map2d.rect;if(i.x>n.x||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.right)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.x+i.width<n.x+n.width||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.up)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y>n.y||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.down)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y+i.height<n.y+n.height||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}return r}move_select(e){if(0===this._nodes_selected.size)return;const t=this.get_farest_node_selected(e);if(!t)return;const n=this.get_nearest_node(t,e);this.clear_node_selected(),this.set_node_selected(n,!0),n.move_in_fig_view()}reset_matrix(e){e.a,this.matrix2d.a,Object.assign(this.matrix2d,e),this.get_view_rect(),this.status.update_matrix2d(e),this.event.emit_status_update()}translate(e,t){const n=Zi.multiply(this.matrix2d,Zi.get_matrix_translate(e,t));this.reset_matrix(n)}scale_diff(e,t){this.matrix2d.a+=e,this.matrix2d.d+=t}scale_by_point(e,t,n){const{map_scale_max:r,map_scale_min:o}=this.config.data,i=this.matrix2d.a+t;if(i>r||i<o)return;const s=this.view_point_to_fig(e),a=this.untransform_point(s);this.matrix2d.a+=t,this.matrix2d.d+=n;const l=this.transform_point(a),c=s.x-l.x,d=s.y-l.y,u=Zi.multiply(this.matrix2d,Zi.get_matrix_translate(c,d));this.reset_matrix(u)}get_upstream_sum_scale(){return{sx:1,sy:1}}view_point_to_fig(e){const t=this.dom_svg_rect,{sx:n,sy:r}=this.get_upstream_sum_scale();let{x:o,y:i}=e;return{x:Math.trunc((o-t.x)/n),y:Math.trunc((i-t.y)/r)}}view_point_to_real(e){const t=this.view_point_to_fig(e);return this.untransform_point(t)}fig_point_to_view(e){const t=this.dom_svg_rect;return{x:e.x+t.x,y:e.y+t.y}}fig_point_to_real(e){return this.untransform_point(e)}real_point_to_fig(e){return this.transform_point(e)}real_point_to_view(e){const t=this.real_point_to_fig(e);return this.fig_point_to_view(t)}transform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:t*a+r*l+i,y:n*a+o*l+s}}untransform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:Math.trunc((a-i-r*l)/t),y:Math.trunc((l-s-n*a)/o)}}find_layout_root(e){const t=new Set;for(let n of e){n.is_layout_root&&t.add(n)}return t}async layout(){console.time("🍋layout-nodes");const e=[];for(let t of this.nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.layout();console.timeEnd("🍋layout-nodes")}check_show(){console.time("🍋动态显示检查"),this.check_show_node(),this.check_show_line(),console.timeEnd("🍋动态显示检查"),this.canvas.refresh()}check_show_node(){this._view_nodes.clear();const e=this._grider.get_viewport_griders();for(let t of e)for(let e of t.nodes)if(!e.env.folded_upstream){this._view_nodes.add(e);e.map2d.sync_rect()}this.status.reset_nodes_view(this._view_nodes)}check_show_line(){this._view_linkers.clear();for(let e of this._view_nodes)e.check_show_line();this.status.reset_linkers_view(this._view_linkers);for(let e of this._view_linkers)e.map2d.update_path()}layout_throttle=Gi.Notice.throttle(this.layout.bind(this),10);check_show_throttle=Gi.Notice.throttle(this.check_show.bind(this),10);static get meta(){return{type:S.Cubes.map,cubename:"图形笔记",version:1,block:!0,show:!1}}static get_default(){return{id:od.get_id(),type:S.Cubes.map,versions:Mi.export_versions(),info:{nodes:[],linkers:[],node_from:{},node_to:{}},css:{},attrs:{matrix2d:Zi.get_default()}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,od.replace_id(e,t,n.info.nodes,r),od.replace_id(e,t,n.info.linkers,r),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}oh([Ri(b.Names.node_add)],ih.prototype,"on_node_add",null),oh([Ri(b.Names.node_remove)],ih.prototype,"on_node_remove",null),oh([Ri(b.Names.linker_add)],ih.prototype,"on_linker_add",null),oh([Ri(b.Names.linker_remove)],ih.prototype,"on_linker_remove",null),oh([Ri(b.Names.node_drag)],ih.prototype,"on_node_drag",null),ih=oh([Si],ih);const sh=["id","data-type"],ah={class:"cube-api-functions"},lh={key:0,class:"cube-api-arguments"},ch={key:1,class:"cube-api-exceptions"},dh=En({__name:"cube-api",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(No(),Oo("div",{class:"cube-api",id:e.cube.id,"data-type":e.cube.type,style:de(Yt(t).css),ref:"root",onContextmenu:n[0]||(n[0]=t=>Yt(oc)(t,e.cube))},[jo("div",ah,[n[1]||(n[1]=jo("div",{class:"legend"},"api",-1)),Ho(Os,{cube:e.cube.functions},null,8,["cube"])]),Yt(t).arguments?(No(),Oo("div",lh,[n[2]||(n[2]=jo("div",{class:"legend"},"arguments",-1)),Ho(Os,{cube:Yt(t).arguments},null,8,["cube"])])):Vo("v-if",!0),Yt(t).exceptions?(No(),Oo("div",ch,[n[3]||(n[3]=jo("div",{class:"legend"},"exceptions",-1)),Ho(Os,{cube:Yt(t).exceptions},null,8,["cube"])])):Vo("v-if",!0)],44,sh))}}),uh=(0,Is.A)(dh,[["__scopeId","data-v-b83f9c48"]]);class hh extends rd{_status=new fh(this);_functions;_arguments=void 0;_exceptions=void 0;_temp_funcnames=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get functions(){return this._functions}get arguments(){return this._arguments}set arguments(e){this._arguments=e,this.status.update_arguments(e)}get exceptions(){return this._exceptions}set exceptions(e){this._exceptions=e,this.status.update_exceptions(e)}get component(){return uh}get children(){const e=[this._functions];return this.arguments&&e.push(this.arguments),this.exceptions&&e.push(this.exceptions),e}get meta(){return hh.meta}add_arguments(){if(this.arguments)return;const e=Dh.get_default();this.arguments=new Dh(e,this)}add_exceptions(){if(this.exceptions)return;const e=Dh.get_default();this.exceptions=new Dh(e,this)}replace_id(e,t,n={}){return hh.replace_id(this.root,e,t,n)}build_child(e){this._functions=new Dh(e.info.functions,this),e.info.arguments&&(this.arguments=new Dh(e.info.arguments,this)),e.info.exceptions&&(this.exceptions=new Dh(e.info.exceptions,this))}event_bubble(t){const{recorder:n,cube:r,cmds:o,line_bubble:i}=t,a=[e.Names.reset,s.Names.remove,s.Names.reset];t.check_in_line(this.functions)&&o.find(e=>a.includes(e.name))&&this.parse(n);const l=o.find(e=>e.name===s.Names.add);if(r===this.functions&&l)for(let e of l.data){const t=e.data.id,o=r.find_cube(t),i=o?.child_first_line;if(!i)continue;const s=Qd.get_default("​",hh.type_funciton),a=zi.insert_child(i.id,[s],1);n.exe(i,a)}return"pass"}parse(e){const t=[];for(let e of this.functions.items){const{indent:n,data:r}=e,o=r.child_first_line?.children.find(e=>e instanceof Qd);o&&t.push(o)}if(t.length===this._temp_funcnames.length){let e=!0;for(let n=0;n<t.length;n++){if(this._temp_funcnames[n]!==t[n].info){e=!1;break}}if(e)return}this._temp_funcnames=t.map(e=>e.info);const n=new Map;if(this.arguments)for(let e of this.arguments.items){const{indent:t,data:r}=e,o=r.child_first_line?.children.find(e=>e instanceof Qd);o&&n.set(o.info,{item:e,text:o})}const r=new Set;for(let e of t){let t=e.data.info,n=t.indexOf("("),o=t.lastIndexOf(")");if(n>=o)continue;let i=t.slice(n+1,o).split(",").map(e=>e.trim()).filter(e=>e);for(let e of i)r.add(e)}r.size>0&&this.add_arguments();const o=[...n.values()];if(r.size===o.length){for(let[t,n]of Gi.Iteration.zip([...r],o))if(t!==n.text.info.trim()){const r=Xd.reset(n.text.id,t);e.exe(n.text,r)}}else{const t=[];for(let e of r){const n=o.find(t=>t.text.info===e);if(n)t.push({indent:n.item.indent,data:Mu.replace_id(this.root,Mi.versions_cube,n.item.data.export())});else{const n=hu.get_default([hh.get_text_argument(e),hh.get_text_argument_type()]);t.push(Dh.get_list_item([n]))}}if(this.arguments){const n=bl.reset(this.arguments.id,t);e.exe(this.arguments,n)}}}gc(){super.base_gc()}export(){const e=this.base_export();return e.info.functions=this.functions.export(),this.arguments&&(e.info.arguments=this.arguments.export()),this.exceptions&&(e.info.exceptions=this.exceptions.export()),e}update_data(e,t){return hh.update_data(e,t)}static update_data(e,t){let n=e[this.meta.type];if(n>this.meta.version)return{data:t,usable:!1};if(!n){const e=t;n=e.info.names||e.info.funcs||e.info.args?1:2}if(n<2){const e=t,n=hh.get_default(e.css||{},e.attrs||{}),r=[],o=[],i=n.info.functions,s=Dh.get_default(),a=e.info;for(let e of a.names.info)if(e.type===S.Cubes.line){const t=e.info.find(e=>e.type===S.Cubes.text);r.push({name:t,type:void 0,desc:[]})}for(let t=0;t<e.info.funcs.length;t++){const n=e.info.funcs[t],o=n.desc.info[0],i=r[t];if(i){if(o.type===S.Cubes.line){const e=o,t=e.info[0];if(t&&t.type===S.Cubes.text&&(i.type=t),o.info.length>1){const t=hu.get_default(e.info.slice(1));i.desc.push(t)}}i.desc.push(...n.desc.info.slice(1))}}for(let t=0;t<e.info.args.length;t++){const n=e.info.args[t],{name:r,desc:i}=n,s=n.desc.info[0],a={name:hh.get_text_argument(r),type:void 0,desc:[]};if(s.type===S.Cubes.line){const e=s,t=e.info[0];if(t&&t.type===S.Cubes.text&&(a.type=t),s.info.length>1){const t=hu.get_default(e.info.slice(1));a.desc.push(t)}}a.desc.push(...n.desc.info.slice(1)),o.push(a)}if(r.length>0){i.info.length=0;for(let e=0;e<r.length;e++){const t=r[e],n=hu.get_default([t.name,Qd.get_default(" ")]),o=t.type||Qd.get_default();Object.assign(o.css,this.type_funciton);const s=o.info.trim();s&&"​"!==s||(o.info="type"),n.info.push(o);const a=Dh.get_list_item([n,...t.desc]);i.info.push(a)}}if(o.length>0){s.info.length=0;for(let e=0;e<o.length;e++){const t=o[e],n=hu.get_default([t.name,Qd.get_default(" ")]),r=t.type||Qd.get_default();Object.assign(r.css,this.type_argument);const i=r.info.trim();i&&"​"!==i||(r.info="type"),n.info.push(r);const a=Dh.get_list_item([n,...t.desc]);s.info.push(a)}n.info.arguments=s}return{data:n,usable:!0}}return{data:t,usable:!0}}static get_default(e={},t={}){const n=this.get_line_function();return{id:od.get_id(),type:S.Cubes.api,info:{functions:Dh.get_default([n])},css:e,attrs:t}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n.info.functions=Dh.replace_id(e,t,n.info.functions,r),n.info.arguments&&(n.info.arguments=Dh.replace_id(e,t,n.info.arguments,r)),n.info.exceptions&&(n.info.exceptions=Dh.replace_id(e,t,n.info.exceptions,r)),n}static get meta(){return{type:S.Cubes.api,version:2,cubename:"Api",block:!0,show:!0}}static get_line_function(e="​"){return hu.get_default([hh.get_text_function(e),hh.get_text_function_type()])}static get_text_function_type(){return Qd.get_default("​",hh.type_funciton)}static get_text_function(e="​"){return Qd.get_default(e,{padding:"0px 6px"})}static get_text_argument(e="​"){return Qd.get_default(e,{padding:"0px 6px"})}static get_text_argument_type(){return Qd.get_default("​",hh.type_argument)}static get type_argument(){return{padding:"0px 4px",background:"var(--api-arguments-type-bg)",color:"var(--api-arguments-type-color)"}}static get type_funciton(){return{padding:"0px 4px",background:"var(--api-functions-type-bg)",color:"var(--api-functions-type-color)"}}}hh=function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}([Si],hh);class ph{}class fh extends Rs{_arguments=Ut(void 0);_exceptions=Ut(void 0);constructor(e){super(e)}get arguments(){return this._arguments.value}get exceptions(){return this._exceptions.value}update_arguments(e){return Promise.resolve().then(()=>{this._arguments.value=e})}update_exceptions(e){return Promise.resolve().then(()=>{this._exceptions.value=e})}}function mh(e,t="tail"){const{courier:n,history:r}=e,o=new ld(n),i=[Mu.get_default(),Mu.get_default()],s=gh.insert_row(e.id,t,[i]);o.tell(e,s),r.record(o)}var _h;!function(e){var t;(t=e.Names||(e.Names={})).insert_row="cube-detail-list:insert-row",t.remove_row="cube-detail-list:remove-row",t.change_width_col1="cube-detail-list:change-width-col1"}(_h||(_h={}));class gh{static insert_row(e,t,n){return{id:e,name:_h.Names.insert_row,pos:t,rows:n}}static remove_row(e,t,n=!1){return{id:e,name:_h.Names.remove_row,range:t,reserve:n}}static change_width_col1(e,t){return{id:e,width:t,name:_h.Names.change_width_col1}}}const bh=["id","data-type"],xh=En({__name:"cube-detail-list",props:{cube:{}},setup(e){const{status:t}=e.cube,n=e.cube.root,r=In("root"),o=Vt();Zn(()=>{const t=o.value,i=r.value;if(!t)return;const s=new Gi.DragDiff(t);let a=e.cube.attrs.width_col1,l=a,c={sx:1,sy:1};s.register_down(()=>{c=e.cube.get_upstream_sum_scale(),a=e.cube.attrs.width_col1}),s.register_move((e,t)=>{n.stats.is_read_mode||(l=Math.round(e/c.sx+a),i?.style.setProperty("--width-col1",l+"px"))}),s.register_up((t,r)=>{if(n.stats.is_read_mode)return;if(a===l)return;const o=e.cube.courier.get_recorder(),i=Math.round(t/c.sx+a);o.tell(e.cube,gh.change_width_col1(e.cube.id,i)),e.cube.history.record(o)}),s.register_cancel(()=>{e.cube.attrs.width=a,t.style.left=a-2+"px"})});gi(()=>({...e.cube.css,"--width-col1":e.cube.attrs.width_col1+"px"}));return(n,i)=>(No(),Oo("div",{class:"cube-detail-list",id:n.cube.id,"data-type":n.cube.type,ref_key:"root",ref:r,style:de(Yt(t).css),onContextmenu:i[1]||(i[1]=e=>Yt(oc)(e,n.cube))},[(No(!0),Oo(wo,null,hr(Yt(t).children,t=>(No(),Eo(Os,{key:t.id,cube:t,onKeydown:n=>function(t,n){t.ctrlKey&&!t.shiftKey&&"Enter"===t.key?(t.stopPropagation(),mh(e.cube,Math.floor(n.index/2)+1)):t.ctrlKey&&t.shiftKey&&"Enter"===t.key&&(t.stopPropagation(),mh(e.cube,Math.floor(n.index/2)))}(n,t)},null,8,["cube","onKeydown"]))),128)),jo("div",{class:"adder-wrap",onClick:i[0]||(i[0]=()=>Yt(mh)(n.cube))},[...i[2]||(i[2]=[jo("div",{class:"adder"},null,-1)])]),jo("div",{class:"adjuster",ref_key:"adjuster",ref:o},null,512)],44,bh))}}),vh=(0,Is.A)(xh,[["__scopeId","data-v-2f9144d8"]]);class yh extends Rs{_rows=Ot([]);constructor(e){super(e)}get children(){const e=[];for(let t of this.rows)e.push(...t);return e}get cube(){return this._cube}get rows(){return[...this._rows]}get css(){return{...super.css,"--width-col1":this.attrs.width_col1+"px"}}init(){super.init(),this.update_rows()}update_rows(){this._rows.splice(0,this._rows.length,...this.cube.rows)}}function wh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class kh extends rd{_status=new yh(this);_rows=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get rows(){return[...this._rows]}get component(){return vh}get children(){const e=[];for(let t of this.rows)e.push(...t);return e}get attrs(){return this.data.attrs}get css_col1(){return this.attrs.width_col1||(this.attrs.width_col1=150),{width:this.attrs.width_col1+"px"}}get is_empty(){return!1}get row_count(){return this.rows.length}get col1(){return this.rows.map(e=>e[0])}get col2(){return this.rows.map(e=>e[1])}get meta(){return kh.meta}update_data(e,t){return kh.update_data(e,t)}build_child(e){for(let t of e.info){const e=new Mu(t[0],this),n=new Mu(t[1],this);this._rows.push([e,n])}}copy(e,t){if(e===t)return[this.children[e].export()];const n=Math.floor(e/2),r=Math.floor((t-1)/2),o=kh.get_default();o.info=[];for(let e=n;e<=r;e++){const t=this.rows[e];if(!t)continue;const n=[t[0].export(),t[1].export()];o.info.push(n)}return 0===o.info.length?[]:[o]}gc(){super.base_gc()}export(){const e=this.base_export();e.css=structuredClone(Ht(this.css)),e.attrs=structuredClone(Ht(this.attrs)),e.info=[];for(let[t,n]of this.rows){const r=t.export(),o=n.export();e.info.push([r,o])}return e}replace_id(e,t,n={}){return kh.replace_id(this.root,e,t,n)}splice_rows(e,t,...n){const r=this._rows.splice(e,t,...n);for(let[e,t]of r)e.gc(),t.gc();return this.status.update_rows(),r}check_delete_edge(e){return 0===e.index%2&&!!e.is_empty}insert_row(e){const{courier:t}=this,{pos:n,rows:r}=e,o=t.get_recorder();o.add_cmd(e);const i=[];for(let[e,t]of r)i.push([new Mu(e,this),new Mu(t,this)]);let s=[0,0];return"tail"===n?(s=[this.row_count,this.row_count+i.length],this._rows.push(...i)):"head"===n?(s=[0,0+i.length],this._rows.unshift(...i)):(s=[n,n+i.length],this.splice_rows(n,0,...i)),this.status.update_rows(),o.add_recover(gh.remove_row(this.id,s)),o}remove_row(e){const{courier:t,cursor:n}=this,{range:r,reserve:o}=e,i=new ld(t);let[s,a]=r;if(s<0&&(s=0),a>this.row_count&&(a=this.row_count),0===s&&a>=this.row_count)if(o){if(this.is_empty)return;i.tell(this,gh.remove_row(this.id,[1,this.child_count]));const e=this.child_first,t=e.next_cube;t&&i.tell(t,zi.delete_child(t.id,"backward",[0,t.child_count],!0)),e&&i.tell(e,zi.delete_child(e.id,"backward",[0,e.child_count],!0))}else i.merge(this.remove_self());else{const e=this._rows[s-1]?.[1],t=this._rows[a+1]?.[1],n=this.splice_rows(s,a-s),r=[];for(let[e,t]of n)r.push([e.export(),t.export()]);i.add_recover(gh.insert_row(this.id,s,r)),e?i.tell(e,Ni.in_tail(e.id)):t&&i.tell(t,Ni.in_head(t.id))}return this.status.update_rows(),i}change_width_col1(e){const{width:t}=e,{courier:n,id:r}=this,o=n.get_recorder();o.add_cmd(e);const i=this.attrs.width_col1;return this.attrs.width_col1=t,this.dom?.style.setProperty("--width-col1",t+"px"),o.add_recover(gh.change_width_col1(r,i)),this.status.update_attrs(),o}delete_cube(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s,reserve:a}=e;if(!this.is_valid_range(s))return;const[l,c]=s,d=Math.floor(l/2),u=Math.floor((c-1)/2),h=gh.remove_row(this.id,[d,u+1],a);return this.remove_row(h)}static get meta(){return{type:S.Cubes.detail_list,version:2,cubename:"清单",block:!0,show:!0}}static get_default(e=[],t={},n={}){const r=0===e.length?[[Mu.get_default(),Mu.get_default()]]:e;return{id:yi(),type:S.Cubes.detail_list,info:r,css:t,attrs:{width_col1:150}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;const s=[];for(let o of n.info)s.push([Mu.replace_id(e,t,o[0],r),Mu.replace_id(e,t,o[1],r)]);return n.info=s,n}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(t.attrs.width_col1||(t.attrs.width_col1=150)),{data:t,usable:!0})}}wh([Ri(_h.Names.insert_row)],kh.prototype,"insert_row",null),wh([Ri(_h.Names.remove_row)],kh.prototype,"remove_row",null),wh([Ri(_h.Names.change_width_col1)],kh.prototype,"change_width_col1",null),wh([Ri(_.Names.cube_delete_child)],kh.prototype,"delete_cube",null),kh=wh([Si],kh);class Sh{static reset(e,t){return{id:e,data:t,name:c.Names.reset}}static add(e,t,n){return{id:e,name:c.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:c.Names.remove,range:t}}static indent(e,t){return{id:e,name:c.Names.indent,items:t}}static status(e,t,n){return{id:e,name:c.Names.status,index:t,done:n}}}const Ch=["id","data-type"],Mh=["onClick"],zh=En({__name:"cube-todo",props:{cube:{}},setup(e){const{root:t,status:n}=e.cube,{config:r}=t;return(t,o)=>(No(),Oo("div",{class:"cube-todo",id:t.cube.id,style:de(Yt(n).css),"data-type":t.cube.type,onContextmenu:o[0]||(o[0]=e=>Yt(oc)(e,t.cube))},[(No(!0),Oo(wo,null,hr(Yt(n).items,(n,o)=>(No(),Oo("div",{key:n.data.id,class:"todoitem",style:de({"margin-left":n.indent*Yt(r).data.line_indent+"px"})},[jo("div",{class:me(["todoitem-status",{active:n.done}]),onClick:()=>function(t,n){const r=Sh.status(e.cube.id,n,!t.done),o=e.cube.courier.get_recorder();o.tell(e.cube,r),e.cube.history.record(o)}(n,o)},null,10,Mh),Ho(Os,{class:"todoitem-box",cube:n.data,onKeydown:e=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{indent:a}=n,l=n.data;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(a);n.tell(t,Sh.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(a);n.tell(t,Sh.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,Sh.indent(t.id,l)),i.record(a)}else{const e=[{id:l.id,indent:!1}];a.tell(t,Sh.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,Sh.indent(t.id,l)),i.record(a)}else{const e=[{id:l.id,indent:!0}];a.tell(t,Sh.indent(t.id,e)),i.record(a)}}}(e,t.cube,n,o)},null,8,["cube","onKeydown"])],4))),128))],44,Ch))}}),Nh=(0,Is.A)(zh,[["__scopeId","data-v-2a0cb5b4"]]);class Ah extends Rs{_items=Pt([]);constructor(e){super(e)}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}get cube(){return this._cube}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.length=0;for(let e of t)this._items.push({...e})}update_item(e){const t=this._items.findIndex(t=>t.data.id===e.data.id),n=this._items[t];n&&Object.assign(n,e)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function Th(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Rh extends rd{_status=new Ah(this);_items=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get items(){return[...this._items]}get component(){return Nh}get children(){return[...this._items.map(e=>e.data)]}get meta(){return Rh.meta}get info(){return this.data.info}update_data(e,t){return Rh.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Mu(n.data,this),r={done:n.done,indent:n.indent,data:qt(e)};t.push(r)}return t}export(){const e=this.base_export();return e.info=[...this.export_items()],e}export_items(){const e=[];for(let t of this._items)e.push({done:t.done,indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({done:e.done,indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({done:e.done,indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Rh.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Mu(n.data,this);t.push({done:n.done,indent:n.indent,data:e})}return t}create_item_data(e=0){return{done:!1,indent:e,data:Mu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=Sh.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Mu(e.data,this);let n={done:e.done,indent:e.indent,data:qt(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,Ni.in_tail(l.id)),i.add_recover(Sh.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(i<=0&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(Sh.add(this.id,d.data,i)),l?o.tell(l,Ni.in_tail(l.id)):c&&o.tell(c,Ni.in_head(c.id)),o}indent_todoitem(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(Sh.indent(this.id,o)),r}update_status(e){const{courier:t}=this,{index:n,done:r}=e,o=t.get_recorder();o.add_cmd(e);const i=this._items[n];if(i)return i.done=r,this.status.update_item(i),o.add_recover(Sh.status(this.id,n,!r)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=Sh.remove(this.id,s);return this.remove_item(a)}static get_default(){let e=Mu.get_default();return{id:yi(),type:S.Cubes.todo,info:[{done:!1,indent:0,data:e}],attrs:{},css:{}}}static get_todo_item(e,t=!1){const n=od.pick(e).list;return{done:t,indent:0,data:Mu.get_default(n)}}static get meta(){return{cubename:"待办列表",type:S.Cubes.todo,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Mu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Th([Ri(c.Names.reset)],Rh.prototype,"on_reset",null),Th([Ri(c.Names.add)],Rh.prototype,"add_item",null),Th([Ri(c.Names.remove)],Rh.prototype,"remove_item",null),Th([Ri(c.Names.indent)],Rh.prototype,"indent_todoitem",null),Th([Ri(c.Names.status)],Rh.prototype,"update_status",null),Th([Ri(_.Names.cube_delete_child)],Rh.prototype,"on_delete_child",null),Rh=Th([Si],Rh);const Ph=["id","data-type"],Oh=En({__name:"cube-list",props:{cube:{}},setup(e){const{status:t,config:n}=e.cube;return(e,r)=>(No(),Oo("div",{class:"cube-list",id:e.cube.id,style:de(Yt(t).css),"data-type":e.cube.type,onContextmenu:r[0]||(r[0]=t=>Yt(oc)(t,e.cube))},[(No(!0),Oo(wo,null,hr(Yt(t).items,(t,o)=>(No(),Oo("div",{key:t.data.id,class:"listitem",style:de({"margin-left":t.indent*Yt(n).data.line_indent+"px"})},[r[1]||(r[1]=jo("div",{class:"listitem-symbol"},null,-1)),Ho(Os,{class:"listitem-box",cube:t.data,onKeydown:n=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{data:a,indent:l}=n,c=a;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,bl.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,bl.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,bl.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!1}];a.tell(t,bl.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,bl.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!0}];a.tell(t,bl.indent(t.id,e)),i.record(a)}}}(n,e.cube,t,o)},null,8,["cube","onKeydown"])],4))),128))],44,Ph))}}),Eh=(0,Is.A)(Oh,[["__scopeId","data-v-35620212"]]);class Lh extends Rs{_items=Pt([]);constructor(e){super(e)}get cube(){return this._cube}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.splice(0,this._items.length,...t)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function Ih(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Dh extends rd{_status=new Lh(this);_items=[];constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Eh}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}get meta(){return Dh.meta}get info(){return this.data.info}update_data(e,t){return Dh.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Mu(n.data,this),r={indent:n.indent,data:qt(e)};t.push(r)}return t}export(){const e=this.base_export();return e.info.length=0,e.info.push(...this.export_items()),e}export_items(){const e=[];for(let t of this._items)e.push({indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Dh.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Mu(n.data,this);t.push({indent:n.indent,data:e})}return t}create_item_data(e=0){return{indent:e,data:Mu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=bl.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Mu(e.data,this);let n={indent:e.indent,data:qt(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,Ni.in_tail(l.id)),i.add_recover(bl.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(0===i&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(bl.add(this.id,d.data,i)),l?o.tell(l,Ni.in_tail(l.id)):c&&o.tell(c,Ni.in_head(c.id)),o}indent_item(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(bl.indent(this.id,o)),r}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=bl.remove(this.id,s);return this.remove_item(a)}static get_default(e=[]){let t=Mu.get_default(e);return{id:yi(),type:S.Cubes.list,info:[{indent:0,data:t}],attrs:{},css:{}}}static get_list_item(e){return{indent:0,data:Mu.get_default(od.pick(e).list)}}static get meta(){return{cubename:"列表",type:S.Cubes.list,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Mu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Ih([Ri(s.Names.reset)],Dh.prototype,"on_reset",null),Ih([Ri(s.Names.add)],Dh.prototype,"add_item",null),Ih([Ri(s.Names.remove)],Dh.prototype,"remove_item",null),Ih([Ri(s.Names.indent)],Dh.prototype,"indent_item",null),Ih([Ri(_.Names.cube_delete_child)],Dh.prototype,"on_delete_child",null),Dh=Ih([Si],Dh);class Bh{static reset(e,t){return{id:e,data:t,name:a.Names.reset}}static add(e,t,n){return{id:e,name:a.Names.add,data:t,pos:n}}static remove(e,t){return{id:e,name:a.Names.remove,range:t}}static indent(e,t){return{id:e,name:a.Names.indent,items:t}}}const jh=["id","data-type"],Hh={class:"listitem-symbol"},qh=En({__name:"cube-list-ordered",props:{cube:{}},setup(e){const{root:t,config:n,status:r}=e.cube;return(e,t)=>(No(),Oo("div",{class:"cube-list-ordered",id:e.cube.id,style:de(Yt(r).css),"data-type":e.cube.type,onContextmenu:t[0]||(t[0]=t=>Yt(oc)(t,e.cube))},[(No(!0),Oo(wo,null,hr(Yt(r).items,(t,r)=>(No(),Oo("div",{key:t.data.id,class:"listitem",style:de({"margin-left":t.indent*Yt(n).data.line_indent+"px"})},[jo("div",Hh,ve(r+1),1),Ho(Os,{class:"listitem-box",cube:t.data,onKeydown:n=>function(e,t,n,r){const{courier:o,history:i,cursor:s}=t,{data:a,indent:l}=n,c=a;if(e.ctrlKey&&!e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,Bh.add(t.id,[s],r+1)),i.record(n)}else if(e.ctrlKey&&e.shiftKey&&"Enter"===e.key){e.stopPropagation();const n=o.get_recorder(),s=t.create_item_data(l);n.tell(t,Bh.add(t.id,[s],r)),i.record(n)}else if("Tab"!==e.key||e.shiftKey){if("Tab"===e.key&&e.shiftKey){e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!1});a.tell(t,Bh.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!1}];a.tell(t,Bh.indent(t.id,e)),i.record(a)}}}else{e.stopPropagation(),e.preventDefault();const{cube_start:n,cube_end:r}=s,a=o.get_recorder();if(n&&r){const e=n.find_upstream_untill(t),o=r.find_upstream_untill(t);if(!e||!o)return;const s=t.items.slice(e.index,o.index+1),l=[];for(let e of s)l.push({id:e.data.id,indent:!0});a.tell(t,Bh.indent(t.id,l)),i.record(a)}else{const e=[{id:c.id,indent:!0}];a.tell(t,Bh.indent(t.id,e)),i.record(a)}}}(n,e.cube,t,r)},null,8,["cube","onKeydown"])],4))),128))],44,jh))}}),Fh=(0,Is.A)(qh,[["__scopeId","data-v-cf6a0580"]]);class $h extends Rs{_items=Pt([]);constructor(e){super(e)}get cube(){return super.cube}get items(){return[...this._items]}get children(){return[...this._items.map(e=>e.data)]}init(){super.init(),this.update_items()}update_items(e){const t=e||this.cube.items;this._items.splice(0,this._items.length,...t)}update_indent(e,t){const n=this._items.find(t=>t.data.id===e);n&&(n.indent=t)}}function Gh(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Vh extends rd{_status=new $h(this);_items=Pt([]);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Fh}get children(){return[...this._items.map(e=>e.data)]}get items(){return[...this._items]}get meta(){return Vh.meta}get info(){return this.data.info}update_data(e,t){return Vh.update_data(e,t)}build_child(e){this._items.push(...this.build_items(e.info))}build_items(e){const t=[];for(let n of e){let e=new Mu(n.data,this),r={indent:n.indent,data:qt(e)};t.push(r)}return t}export(){const e=super.base_export();e.info=[];for(let t of this._items)e.info.push({indent:t.indent,data:t.data.export()});return e}export_items(){const e=[];for(let t of this._items)e.push({indent:t.indent,data:t.data.export()});return e}gc(){return super.base_gc()}copy(e,t){const n=super.base_export();n.info=[];const r=this._items.slice(e,t);for(let e of r)n.info.push({indent:e.indent,data:e.data.export()});return[n]}splice_items(e,t,...n){const r=this._items.splice(e,t,...n),o=[];for(let e of r)e.data.gc(),o.push({indent:e.indent,data:e.data.export()});return this.status.update_items(),{children:r,data:o}}replace_id(e,t,n={}){return Vh.replace_id(this.root,e,t,n)}create(e){const t=[];for(let n of e){let e=new Mu(n.data,this);t.push({indent:n.indent,data:e})}return t}create_item_data(e=0){return{indent:e,data:Mu.get_default()}}on_reset(e){const{data:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=Bh.reset(this.id,this.export_items());return this.splice_items(0,this._items.length,...this.build_items(t)),r.add_recover(o),r}add_item(e){const{data:t,pos:n}=e,{courier:r,pcube:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.get_valid_index(n),a=[];for(let e of t){const t=new Mu(e.data,this);let n={indent:e.indent,data:qt(t)};a.push(n)}this.splice_items(s,0,...a);const l=a[a.length-1]?.data;return l&&i.tell(l,Ni.in_tail(l.id)),i.add_recover(Bh.remove(this.id,[s,s+a.length])),i}remove_item(e){const{range:t}=e,{courier:n,pcube:r}=this,o=n.get_recorder();o.add_cmd(e);const[i,s]=t;if(0===i&&s>=this.child_count)return this.remove_self();const a=t[1]-t[0],l=this._items[i-1]?.data,c=this._items[s+1]?.data,d=this.splice_items(i,a);return o.add_recover(Bh.add(this.id,d.data,i)),l?o.tell(l,Ni.in_tail(l.id)):c&&o.tell(c,Ni.in_head(c.id)),o}indent_item(e){const{items:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=[];for(let e of t){let t=this._items.find(t=>t.data.id===e.id);t&&(t.indent=e.indent?t.indent+1:t.indent-1,t.indent<0&&(t.indent=0),o.push({id:e.id,indent:!e.indent}),this.status.update_indent(e.id,t.indent))}return r.add_recover(Bh.indent(this.id,o)),r}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,{dir:i,range:s}=e;if(!this.is_valid_range(s))return;const a=Bh.remove(this.id,s);return this.remove_item(a)}static get_default(){let e=Mu.get_default();return{id:od.get_id(),type:S.Cubes.list_ordered,info:[{indent:0,data:e}],attrs:{},css:{}}}static get_list_item(e){return{indent:0,data:Mu.get_default(od.pick(e).list)}}static get meta(){return{cubename:"有序列表",type:S.Cubes.list_ordered,block:!0,version:1,show:!0}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i;for(let o of n.info)o.data=Mu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Gh([Ri(a.Names.reset)],Vh.prototype,"on_reset",null),Gh([Ri(a.Names.add)],Vh.prototype,"add_item",null),Gh([Ri(a.Names.remove)],Vh.prototype,"remove_item",null),Gh([Ri(a.Names.indent)],Vh.prototype,"indent_item",null),Gh([Ri(_.Names.cube_delete_child)],Vh.prototype,"on_delete_child",null),Vh=Gh([Si],Vh);class Uh{static update(e,t,n){return{id:e,name:l.Names.code_update,code:n,tabid:t}}static add(e,t,n=!0){return{id:e,name:l.Names.code_add,item:Ht(t),focus:n}}static remove(e,t){return{id:e,name:l.Names.code_remove,tabid:t}}static rename(e,t,n){return{id:e,name:l.Names.code_rename,tabid:t,filename:n}}static change_lang(e,t,n){return{id:e,name:l.Names.change_lang,tabid:t,lang:n}}static change_active(e,t){return{id:e,name:l.Names.change_active,tabid:t}}static change_theme(e,t,n){return{id:e,tabid:t,theme:n,name:l.Names.change_theme}}}const Kh=[{id:"abap",name:"ABAP",import:()=>o.e(8617).then(o.bind(o,8617))},{id:"actionscript-3",name:"ActionScript",import:()=>o.e(3516).then(o.bind(o,3516))},{id:"ada",name:"Ada",import:()=>o.e(7561).then(o.bind(o,7561))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(535)]).then(o.bind(o,535))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7611),o.e(535),o.e(4886)]).then(o.bind(o,4886))},{id:"apache",name:"Apache Conf",import:()=>o.e(7625).then(o.bind(o,7625))},{id:"apex",name:"Apex",import:()=>o.e(9819).then(o.bind(o,9819))},{id:"apl",name:"APL",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(7504)]).then(o.bind(o,7504))},{id:"applescript",name:"AppleScript",import:()=>o.e(2108).then(o.bind(o,2108))},{id:"ara",name:"Ara",import:()=>o.e(5611).then(o.bind(o,5611))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>o.e(4354).then(o.bind(o,4354))},{id:"asm",name:"Assembly",import:()=>o.e(6324).then(o.bind(o,6324))},{id:"astro",name:"Astro",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4714),o.e(6940),o.e(4408)]).then(o.bind(o,4408))},{id:"awk",name:"AWK",import:()=>o.e(4862).then(o.bind(o,4862))},{id:"ballerina",name:"Ballerina",import:()=>o.e(5141).then(o.bind(o,5141))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>o.e(2068).then(o.bind(o,2068))},{id:"beancount",name:"Beancount",import:()=>o.e(5026).then(o.bind(o,5026))},{id:"berry",name:"Berry",aliases:["be"],import:()=>o.e(8753).then(o.bind(o,8753))},{id:"bibtex",name:"BibTeX",import:()=>o.e(4009).then(o.bind(o,4009))},{id:"bicep",name:"Bicep",import:()=>o.e(7688).then(o.bind(o,7688))},{id:"blade",name:"Blade",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(5283)]).then(o.bind(o,5283))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>o.e(5314).then(o.bind(o,5314))},{id:"c",name:"C",import:()=>o.e(5814).then(o.bind(o,5814))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>o.e(5728).then(o.bind(o,5728))},{id:"cairo",name:"Cairo",import:()=>Promise.all([o.e(2473),o.e(8237)]).then(o.bind(o,8237))},{id:"clarity",name:"Clarity",import:()=>o.e(6677).then(o.bind(o,6677))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>o.e(7681).then(o.bind(o,7681))},{id:"cmake",name:"CMake",import:()=>o.e(5936).then(o.bind(o,5936))},{id:"cobol",name:"COBOL",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(780)]).then(o.bind(o,780))},{id:"codeowners",name:"CODEOWNERS",import:()=>o.e(9096).then(o.bind(o,9096))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>o.e(6283).then(o.bind(o,6283))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([o.e(7258),o.e(6563)]).then(o.bind(o,6563))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>o.e(489).then(o.bind(o,489))},{id:"coq",name:"Coq",import:()=>o.e(8418).then(o.bind(o,8418))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([o.e(1230),o.e(5814),o.e(4914)]).then(o.bind(o,4914))},{id:"crystal",name:"Crystal",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1230),o.e(5814),o.e(3894),o.e(3403)]).then(o.bind(o,3403))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>o.e(2354).then(o.bind(o,2354))},{id:"css",name:"CSS",import:()=>o.e(1708).then(o.bind(o,1708))},{id:"csv",name:"CSV",import:()=>o.e(8849).then(o.bind(o,1230))},{id:"cue",name:"CUE",import:()=>o.e(172).then(o.bind(o,172))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>o.e(9806).then(o.bind(o,9806))},{id:"d",name:"D",import:()=>o.e(5177).then(o.bind(o,5177))},{id:"dart",name:"Dart",import:()=>o.e(9728).then(o.bind(o,9728))},{id:"dax",name:"DAX",import:()=>o.e(874).then(o.bind(o,874))},{id:"desktop",name:"Desktop",import:()=>o.e(6173).then(o.bind(o,6173))},{id:"diff",name:"Diff",import:()=>o.e(7670).then(o.bind(o,7670))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>o.e(415).then(o.bind(o,415))},{id:"dotenv",name:"dotEnv",import:()=>o.e(2173).then(o.bind(o,2173))},{id:"dream-maker",name:"Dream Maker",import:()=>o.e(3227).then(o.bind(o,3227))},{id:"edge",name:"Edge",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(3052)]).then(o.bind(o,3052))},{id:"elixir",name:"Elixir",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(3330)]).then(o.bind(o,3330))},{id:"elm",name:"Elm",import:()=>Promise.all([o.e(5814),o.e(9641)]).then(o.bind(o,9641))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>o.e(2505).then(o.bind(o,2505))},{id:"erb",name:"ERB",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(4007),o.e(9524)]).then(o.bind(o,9524))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([o.e(7900),o.e(2266)]).then(o.bind(o,2266))},{id:"fennel",name:"Fennel",import:()=>o.e(1631).then(o.bind(o,1631))},{id:"fish",name:"Fish",import:()=>o.e(9661).then(o.bind(o,9661))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>o.e(9077).then(o.bind(o,9077))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([o.e(8553),o.e(7549)]).then(o.bind(o,7549))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>o.e(8553).then(o.bind(o,8553))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([o.e(7900),o.e(9689)]).then(o.bind(o,9689))},{id:"gdresource",name:"GDResource",import:()=>o.e(7434).then(o.bind(o,7434))},{id:"gdscript",name:"GDScript",import:()=>o.e(4311).then(o.bind(o,4311))},{id:"gdshader",name:"GDShader",import:()=>o.e(6405).then(o.bind(o,6405))},{id:"genie",name:"Genie",import:()=>o.e(9017).then(o.bind(o,9017))},{id:"gherkin",name:"Gherkin",import:()=>o.e(4451).then(o.bind(o,4451))},{id:"git-commit",name:"Git Commit Message",import:()=>o.e(2861).then(o.bind(o,2861))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([o.e(3894),o.e(638)]).then(o.bind(o,638))},{id:"gleam",name:"Gleam",import:()=>o.e(8201).then(o.bind(o,8201))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(8700)]).then(o.bind(o,8700))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(5050)]).then(o.bind(o,5050))},{id:"glsl",name:"GLSL",import:()=>Promise.all([o.e(5814),o.e(2723)]).then(o.bind(o,2723))},{id:"gnuplot",name:"Gnuplot",import:()=>o.e(396).then(o.bind(o,396))},{id:"go",name:"Go",import:()=>o.e(3941).then(o.bind(o,3941))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([o.e(7258),o.e(4714),o.e(6940),o.e(6262),o.e(3170)]).then(o.bind(o,3170))},{id:"groovy",name:"Groovy",import:()=>o.e(1037).then(o.bind(o,1037))},{id:"hack",name:"Hack",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1230),o.e(6356)]).then(o.bind(o,6356))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(3949)]).then(o.bind(o,3949))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(1655)]).then(o.bind(o,1655))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>o.e(9045).then(o.bind(o,9045))},{id:"haxe",name:"Haxe",import:()=>o.e(8107).then(o.bind(o,8107))},{id:"hcl",name:"HashiCorp HCL",import:()=>o.e(6124).then(o.bind(o,6124))},{id:"hjson",name:"Hjson",import:()=>o.e(5203).then(o.bind(o,5203))},{id:"hlsl",name:"HLSL",import:()=>o.e(4598).then(o.bind(o,4598))},{id:"html",name:"HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940)]).then(o.bind(o,4940))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(914)]).then(o.bind(o,914))},{id:"http",name:"HTTP",import:()=>Promise.all([o.e(7258),o.e(4714),o.e(6967),o.e(3894),o.e(6940),o.e(6262),o.e(3170),o.e(5119)]).then(o.bind(o,5119))},{id:"hxml",name:"HXML",import:()=>o.e(8320).then(o.bind(o,8320))},{id:"hy",name:"Hy",import:()=>o.e(7470).then(o.bind(o,7470))},{id:"imba",name:"Imba",import:()=>o.e(3702).then(o.bind(o,3702))},{id:"ini",name:"INI",aliases:["properties"],import:()=>o.e(6343).then(o.bind(o,6343))},{id:"java",name:"Java",import:()=>o.e(6967).then(o.bind(o,6967))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>o.e(7258).then(o.bind(o,7258))},{id:"jinja",name:"Jinja",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(3837)]).then(o.bind(o,3837))},{id:"jison",name:"Jison",import:()=>Promise.all([o.e(7258),o.e(5536)]).then(o.bind(o,5536))},{id:"json",name:"JSON",import:()=>o.e(5709).then(o.bind(o,5709))},{id:"json5",name:"JSON5",import:()=>o.e(6010).then(o.bind(o,6010))},{id:"jsonc",name:"JSON with Comments",import:()=>o.e(212).then(o.bind(o,212))},{id:"jsonl",name:"JSON Lines",import:()=>o.e(4843).then(o.bind(o,4843))},{id:"jsonnet",name:"Jsonnet",import:()=>o.e(4962).then(o.bind(o,4962))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>o.e(7922).then(o.bind(o,7922))},{id:"jsx",name:"JSX",import:()=>o.e(6262).then(o.bind(o,6262))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([o.e(7258),o.e(1230),o.e(5814),o.e(4914),o.e(2473),o.e(9983),o.e(9910)]).then(o.bind(o,9910))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>o.e(2660).then(o.bind(o,2660))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>o.e(6297).then(o.bind(o,6297))},{id:"latex",name:"LaTeX",import:()=>Promise.all([o.e(9983),o.e(7817)]).then(o.bind(o,7817))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>o.e(8003).then(o.bind(o,8003))},{id:"less",name:"Less",import:()=>o.e(6964).then(o.bind(o,6964))},{id:"liquid",name:"Liquid",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(327)]).then(o.bind(o,327))},{id:"llvm",name:"LLVM IR",import:()=>o.e(3972).then(o.bind(o,3972))},{id:"log",name:"Log file",import:()=>o.e(3247).then(o.bind(o,3247))},{id:"logo",name:"Logo",import:()=>o.e(9730).then(o.bind(o,9730))},{id:"lua",name:"Lua",import:()=>Promise.all([o.e(5814),o.e(4199)]).then(o.bind(o,4199))},{id:"luau",name:"Luau",import:()=>o.e(5744).then(o.bind(o,5744))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>o.e(1757).then(o.bind(o,1757))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>o.e(7900).then(o.bind(o,7900))},{id:"marko",name:"Marko",import:()=>Promise.all([o.e(1708),o.e(4714),o.e(7611),o.e(6964),o.e(9175)]).then(o.bind(o,9175))},{id:"matlab",name:"MATLAB",import:()=>o.e(2492).then(o.bind(o,2492))},{id:"mdc",name:"MDC",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7900),o.e(2215)]).then(o.bind(o,2215))},{id:"mdx",name:"MDX",import:()=>o.e(4452).then(o.bind(o,4452))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>o.e(2860).then(o.bind(o,2860))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>o.e(8499).then(o.bind(o,8499))},{id:"mojo",name:"Mojo",import:()=>o.e(9526).then(o.bind(o,9526))},{id:"move",name:"Move",import:()=>o.e(9104).then(o.bind(o,9104))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>o.e(6239).then(o.bind(o,6239))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>o.e(9876).then(o.bind(o,9876))},{id:"nginx",name:"Nginx",import:()=>Promise.all([o.e(5814),o.e(697)]).then(o.bind(o,697))},{id:"nim",name:"Nim",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(5814),o.e(7900),o.e(4697)]).then(o.bind(o,4697))},{id:"nix",name:"Nix",import:()=>o.e(8212).then(o.bind(o,8212))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>o.e(7374).then(o.bind(o,7374))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>o.e(7148).then(o.bind(o,7148))},{id:"objective-cpp",name:"Objective-C++",import:()=>o.e(9788).then(o.bind(o,9788))},{id:"ocaml",name:"OCaml",import:()=>o.e(9057).then(o.bind(o,9057))},{id:"pascal",name:"Pascal",import:()=>o.e(9079).then(o.bind(o,9079))},{id:"perl",name:"Perl",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(9984)]).then(o.bind(o,9984))},{id:"php",name:"PHP",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6967),o.e(1230),o.e(7765),o.e(7966)]).then(o.bind(o,7765))},{id:"plsql",name:"PL/SQL",import:()=>o.e(8389).then(o.bind(o,8389))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>o.e(4520).then(o.bind(o,4520))},{id:"polar",name:"Polar",import:()=>o.e(9845).then(o.bind(o,9845))},{id:"postcss",name:"PostCSS",import:()=>o.e(9270).then(o.bind(o,9270))},{id:"powerquery",name:"PowerQuery",import:()=>o.e(454).then(o.bind(o,454))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>o.e(1476).then(o.bind(o,1476))},{id:"prisma",name:"Prisma",import:()=>o.e(5731).then(o.bind(o,5731))},{id:"prolog",name:"Prolog",import:()=>o.e(9206).then(o.bind(o,9206))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>o.e(5891).then(o.bind(o,5891))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(6757)]).then(o.bind(o,6757))},{id:"puppet",name:"Puppet",import:()=>o.e(3593).then(o.bind(o,3593))},{id:"purescript",name:"PureScript",import:()=>o.e(9904).then(o.bind(o,9904))},{id:"python",name:"Python",aliases:["py"],import:()=>o.e(2473).then(o.bind(o,2473))},{id:"qml",name:"QML",import:()=>Promise.all([o.e(7258),o.e(1803)]).then(o.bind(o,1803))},{id:"qmldir",name:"QML Directory",import:()=>o.e(4292).then(o.bind(o,4292))},{id:"qss",name:"Qt Style Sheets",import:()=>o.e(402).then(o.bind(o,402))},{id:"r",name:"R",import:()=>o.e(9983).then(o.bind(o,9983))},{id:"racket",name:"Racket",import:()=>o.e(9281).then(o.bind(o,9281))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>o.e(9780).then(o.bind(o,9780))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(2354),o.e(245)]).then(o.bind(o,245))},{id:"reg",name:"Windows Registry Script",import:()=>o.e(5827).then(o.bind(o,5827))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>o.e(3124).then(o.bind(o,3124))},{id:"rel",name:"Rel",import:()=>o.e(3043).then(o.bind(o,5424))},{id:"riscv",name:"RISC-V",import:()=>o.e(8684).then(o.bind(o,8684))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(2473),o.e(4007),o.e(8234)]).then(o.bind(o,8234))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(4007)]).then(o.bind(o,4007))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>o.e(7145).then(o.bind(o,7145))},{id:"sas",name:"SAS",import:()=>Promise.all([o.e(1230),o.e(9478)]).then(o.bind(o,9478))},{id:"sass",name:"Sass",import:()=>o.e(8709).then(o.bind(o,8709))},{id:"scala",name:"Scala",import:()=>o.e(3947).then(o.bind(o,3947))},{id:"scheme",name:"Scheme",import:()=>o.e(9982).then(o.bind(o,9982))},{id:"scss",name:"SCSS",import:()=>Promise.all([o.e(1708),o.e(7611)]).then(o.bind(o,7611))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>o.e(1624).then(o.bind(o,1624))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>o.e(8249).then(o.bind(o,8249))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>o.e(3894).then(o.bind(o,3894))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([o.e(3894),o.e(9965)]).then(o.bind(o,9965))},{id:"smalltalk",name:"Smalltalk",import:()=>o.e(1066).then(o.bind(o,1066))},{id:"solidity",name:"Solidity",import:()=>o.e(4780).then(o.bind(o,4780))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(7642)]).then(o.bind(o,7642))},{id:"sparql",name:"SPARQL",import:()=>o.e(4108).then(o.bind(o,4108))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>o.e(6514).then(o.bind(o,6514))},{id:"sql",name:"SQL",import:()=>o.e(1230).then(o.bind(o,8849))},{id:"ssh-config",name:"SSH Config",import:()=>o.e(3874).then(o.bind(o,3874))},{id:"stata",name:"Stata",import:()=>Promise.all([o.e(1230),o.e(542)]).then(o.bind(o,542))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>o.e(41).then(o.bind(o,41))},{id:"svelte",name:"Svelte",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4714),o.e(3454)]).then(o.bind(o,3454))},{id:"swift",name:"Swift",import:()=>o.e(8436).then(o.bind(o,8436))},{id:"system-verilog",name:"SystemVerilog",import:()=>o.e(6577).then(o.bind(o,6577))},{id:"systemd",name:"Systemd Units",import:()=>o.e(16).then(o.bind(o,16))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>o.e(4660).then(o.bind(o,4660))},{id:"tasl",name:"Tasl",import:()=>o.e(1839).then(o.bind(o,1839))},{id:"tcl",name:"Tcl",import:()=>o.e(7328).then(o.bind(o,7328))},{id:"templ",name:"Templ",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(3941),o.e(7095)]).then(o.bind(o,7095))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>o.e(4385).then(o.bind(o,4385))},{id:"tex",name:"TeX",import:()=>Promise.all([o.e(9983),o.e(9198)]).then(o.bind(o,9198))},{id:"toml",name:"TOML",import:()=>o.e(5363).then(o.bind(o,5363))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(9556)]).then(o.bind(o,9556))},{id:"tsv",name:"TSV",import:()=>o.e(6045).then(o.bind(o,8426))},{id:"tsx",name:"TSX",import:()=>o.e(6940).then(o.bind(o,6940))},{id:"turtle",name:"Turtle",import:()=>o.e(4877).then(o.bind(o,4877))},{id:"twig",name:"Twig",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(6967),o.e(1230),o.e(5814),o.e(3894),o.e(6940),o.e(6262),o.e(4914),o.e(3170),o.e(2473),o.e(7611),o.e(4007),o.e(7765),o.e(4236)]).then(o.bind(o,4236))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>o.e(4714).then(o.bind(o,4714))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>o.e(794).then(o.bind(o,794))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>o.e(8711).then(o.bind(o,8711))},{id:"v",name:"V",import:()=>o.e(5443).then(o.bind(o,5443))},{id:"vala",name:"Vala",import:()=>o.e(7141).then(o.bind(o,7141))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>o.e(8235).then(o.bind(o,8235))},{id:"verilog",name:"Verilog",import:()=>o.e(4283).then(o.bind(o,4283))},{id:"vhdl",name:"VHDL",import:()=>o.e(5521).then(o.bind(o,5521))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>o.e(7567).then(o.bind(o,7567))},{id:"vue",name:"Vue",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(1432)]).then(o.bind(o,1432))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(1432),o.e(7789)]).then(o.bind(o,7789))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([o.e(7258),o.e(1708),o.e(4940),o.e(4714),o.e(7611),o.e(6964),o.e(1432),o.e(41),o.e(5954)]).then(o.bind(o,5954))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>o.e(845).then(o.bind(o,845))},{id:"wasm",name:"WebAssembly",import:()=>o.e(7615).then(o.bind(o,7615))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>o.e(8393).then(o.bind(o,8393))},{id:"wgsl",name:"WGSL",import:()=>o.e(5884).then(o.bind(o,5884))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>o.e(2062).then(o.bind(o,2062))},{id:"wit",name:"WebAssembly Interface Types",import:()=>o.e(6957).then(o.bind(o,6957))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>o.e(5589).then(o.bind(o,5589))},{id:"xml",name:"XML",import:()=>Promise.all([o.e(6967),o.e(5585)]).then(o.bind(o,7966))},{id:"xsl",name:"XSL",import:()=>Promise.all([o.e(6967),o.e(5628)]).then(o.bind(o,5628))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>o.e(4546).then(o.bind(o,4546))},{id:"zenscript",name:"ZenScript",import:()=>o.e(5099).then(o.bind(o,5099))},{id:"zig",name:"Zig",import:()=>o.e(3279).then(o.bind(o,3279))}],Wh=Object.fromEntries(Kh.map(e=>[e.id,e.import])),Yh=Object.fromEntries(Kh.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Xh={...Wh,...Yh},Jh=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>o.e(2691).then(o.bind(o,2691))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>o.e(7768).then(o.bind(o,7768))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>o.e(7927).then(o.bind(o,7927))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>o.e(1216).then(o.bind(o,1216))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>o.e(7788).then(o.bind(o,7788))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>o.e(2071).then(o.bind(o,2071))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>o.e(9692).then(o.bind(o,9692))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>o.e(3032).then(o.bind(o,3032))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>o.e(8485).then(o.bind(o,8485))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>o.e(284).then(o.bind(o,284))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>o.e(1545).then(o.bind(o,1545))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>o.e(6083).then(o.bind(o,6083))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>o.e(5647).then(o.bind(o,5647))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>o.e(9179).then(o.bind(o,9179))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>o.e(9976).then(o.bind(o,9976))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>o.e(9831).then(o.bind(o,9831))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>o.e(9809).then(o.bind(o,9809))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>o.e(9681).then(o.bind(o,9681))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>o.e(1425).then(o.bind(o,1425))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>o.e(6865).then(o.bind(o,6865))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>o.e(7824).then(o.bind(o,7824))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>o.e(3646).then(o.bind(o,3646))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>o.e(2419).then(o.bind(o,2419))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>o.e(9225).then(o.bind(o,9225))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>o.e(4112).then(o.bind(o,4112))},{id:"houston",displayName:"Houston",type:"dark",import:()=>o.e(8931).then(o.bind(o,8931))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>o.e(2184).then(o.bind(o,2184))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>o.e(2142).then(o.bind(o,2142))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>o.e(5638).then(o.bind(o,5638))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>o.e(7831).then(o.bind(o,7831))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>o.e(8426).then(o.bind(o,6045))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>o.e(3492).then(o.bind(o,3492))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>o.e(3720).then(o.bind(o,3720))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>o.e(9294).then(o.bind(o,9294))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>o.e(4081).then(o.bind(o,4081))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>o.e(1729).then(o.bind(o,1729))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>o.e(4614).then(o.bind(o,4614))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>o.e(2934).then(o.bind(o,2934))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>o.e(2535).then(o.bind(o,2535))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>o.e(4214).then(o.bind(o,4214))},{id:"nord",displayName:"Nord",type:"dark",import:()=>o.e(4552).then(o.bind(o,4552))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>o.e(6736).then(o.bind(o,6736))},{id:"one-light",displayName:"One Light",type:"light",import:()=>o.e(3906).then(o.bind(o,3906))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>o.e(4445).then(o.bind(o,4445))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>o.e(4465).then(o.bind(o,4465))},{id:"red",displayName:"Red",type:"dark",import:()=>o.e(6980).then(o.bind(o,6980))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>o.e(753).then(o.bind(o,753))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>o.e(5424).then(o.bind(o,3043))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>o.e(8093).then(o.bind(o,8093))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>o.e(4838).then(o.bind(o,4838))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>o.e(5601).then(o.bind(o,5601))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>o.e(1857).then(o.bind(o,1857))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>o.e(7217).then(o.bind(o,7217))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>o.e(1931).then(o.bind(o,1931))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>o.e(321).then(o.bind(o,321))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>o.e(5034).then(o.bind(o,5034))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>o.e(224).then(o.bind(o,224))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>o.e(5542).then(o.bind(o,5542))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>o.e(6517).then(o.bind(o,6517))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>o.e(5143).then(o.bind(o,5143))}],Zh=Object.fromEntries(Jh.map(e=>[e.id,e.import]));class Qh extends Error{constructor(e){super(e),this.name="ShikiError"}}function ep(e){return Array.isArray(e)?function(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ep(e[n]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let n in e)t[n]=ep(e[n]);return t}(e):e}function tp(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function np(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?np(e.substring(0,e.length-1)):e.substr(1+~t)}var rp=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,op=class{static hasCaptures(e){return null!==e&&(rp.lastIndex=0,rp.test(e))}static replaceCaptures(e,t,n){return e.replace(rp,(e,r,o,i)=>{let s=n[parseInt(r||o,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function ip(e,t){return e<t?-1:e>t?1:0}function sp(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=ip(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function ap(e){return!!/^#[0-9a-f]{6}$/i.test(e)||(!!/^#[0-9a-f]{8}$/i.test(e)||(!!/^#[0-9a-f]{3}$/i.test(e)||!!/^#[0-9a-f]{4}$/i.test(e)))}function lp(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var cp=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},dp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,o=t.length;e<o;e++){let o,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),o=e.split(",")}else o=Array.isArray(i.scope)?i.scope:[""];let s=-1;if("string"==typeof i.settings.fontStyle){s=0;let e=i.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}}let a=null;"string"==typeof i.settings.foreground&&ap(i.settings.foreground)&&(a=i.settings.foreground);let l=null;"string"==typeof i.settings.background&&ap(i.settings.background)&&(l=i.settings.background);for(let t=0,i=o.length;t<i;t++){let i=o[t].trim().split(" "),c=i[i.length-1],d=null;i.length>1&&(d=i.slice(0,i.length-1),d.reverse()),n[r++]=new fp(c,d,e,s,a,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=ip(e.scope,t.scope);return 0!==n?n:(n=sp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(o=t.background)}let i=new _p(t),s=new pp(n,i.getId(r),i.getId(o)),a=new xp(new bp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];a.insert(0,n.scope,n.parentScopes,n.fontStyle,i.getId(n.foreground),i.getId(n.background))}return new dp(i,s,a)}(e,t)}_cachedMatchRoot=new cp(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!hp(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new pp(n.fontStyle,n.foreground,n.background):null}},up=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function hp(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var pp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var fp=class{constructor(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},mp=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(mp||{});var _p=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},gp=Object.freeze([]),bp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,o){this.scopeDepth=e,this.parentScopes=t||gp,this.fontStyle=n,this.foreground=r,this.background=o}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},xp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){const o=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==o)return o;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,o,i,s){if(""===n)return void this._doInsertHere(t,r,o,i,s);let a,l,c,d=n.indexOf(".");-1===d?(a=n,l=""):(a=n.substring(0,d),l=n.substring(d+1)),this._children.hasOwnProperty(a)?c=this._children[a]:(c=new e(this._mainRule.clone(),bp.cloneArr(this._rulesWithParentScopes)),this._children[a]=c),c.insert(t+1,l,r,o,i,s)}_doInsertHere(e,t,n,r,o){if(null!==t){for(let i=0,s=this._rulesWithParentScopes.length;i<s;i++){let s=this._rulesWithParentScopes[i];if(0===sp(s.parentScopes,t))return void s.acceptOverwrite(e,n,r,o)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new bp(e,t,n,r,o))}else this._mainRule.acceptOverwrite(e,n,r,o)}},vp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),r=e.getTokenType(t),o=e.getFontStyle(t),i=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:s})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,r,o,i,s,a){let l=e.getLanguageId(t),c=e.getTokenType(t),d=e.containsBalancedBrackets(t)?1:0,u=e.getFontStyle(t),h=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==o&&(d=o?1:0),-1!==i&&(u=i),0!==s&&(h=s),0!==a&&(p=a),(l|c<<8|d<<10|u<<11|h<<15|p<<24)>>>0}};function yp(e){return e}function wp(e,t){const n=[],r=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}(e);let o=r.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let t=s();if(n.push({matcher:t,priority:e}),","!==o)break;o=r.next()}return n;function i(){if("-"===o){o=r.next();const e=i();return t=>!!e&&!e(t)}if("("===o){o=r.next();const e=function(){const e=[];let t=s();for(;t&&(e.push(t),"|"===o||","===o);){do{o=r.next()}while("|"===o||","===o);t=s()}return t=>e.some(e=>e(t))}();return")"===o&&(o=r.next()),e}if(kp(o)){const e=[];do{e.push(o),o=r.next()}while(kp(o));return n=>t(e,n)}return null}function s(){const e=[];let t=i();for(;t;)e.push(t),t=i();return t=>e.every(e=>e(t))}}function kp(e){return!!e&&!!e.match(/[\w\.:]+/)}function Sp(e){"function"==typeof e.dispose&&e.dispose()}var Cp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Mp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},zp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Np=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Cp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new zp;for(const n of e)Ap(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof Cp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ap(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof Cp?Rp({baseGrammar:i,selfGrammar:o},r):Tp(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const s=n.injections(e.scopeName);if(s)for(const e of s)r.add(new Cp(e))}function Tp(e,t,n){if(t.repository&&t.repository[e]){Pp([t.repository[e]],t,n)}}function Rp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Pp(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Pp(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Pp(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?tp({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Pp(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=Bp(o);switch(i.kind){case 0:Rp({...t,selfGrammar:t.baseGrammar},n);break;case 1:Rp(t,n);break;case 2:Tp(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const r=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===i.kind?Tp(i.ruleName,o,n):Rp(o,n)}else 4===i.kind?n.add(new Mp(i.scopeName,i.ruleName)):n.add(new Cp(i.scopeName))}}}var Op=class{kind=0},Ep=class{kind=1},Lp=class{constructor(e){this.ruleName=e}kind=2},Ip=class{constructor(e){this.scopeName=e}kind=3},Dp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Bp(e){if("$base"===e)return new Op;if("$self"===e)return new Ep;const t=e.indexOf("#");if(-1===t)return new Ip(e);if(0===t)return new Lp(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new Dp(n,r)}}var jp=/\\(\d+)/,Hp=/\\(\d+)/g;Symbol("RuleId");var qp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=op.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=op.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${np(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?op.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?op.replaceCaptures(this._contentName,e,t):this._contentName}},Fp=class extends qp{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},$p=class extends qp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new Wp(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Gp=class extends qp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vp=class extends qp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,i,s,a,l,c){super(e,t,n,r),this._begin=new Wp(o,this.id),this.beginCaptures=i,this._end=new Wp(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yp;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Up=class extends qp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,i,s,a,l){super(e,t,n,r),this._begin=new Wp(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Wp(s,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yp;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Yp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Kp=class e{static createCaptureRule(e,t,n,r,o){return e.registerRule(e=>new Fp(t,e,n,r,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new $p(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=tp({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new Gp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new Up(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Vp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let i=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)o[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const s=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,r)),o[s]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let i=0,s=t.length;i<s;i++){const s=t[i];let a=-1;if(s.include){const t=Bp(s.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(r[s.include],n,r);break;case 2:let o=r[t.ruleName];o&&(a=e.getCompiledRuleId(o,n,r));break;case 3:case 4:const i=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(i,r);if(c)if(l){let t=c.repository[l];t&&(a=e.getCompiledRuleId(t,n,c.repository))}else a=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else a=e.getCompiledRuleId(s,n,r);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof Gp||e instanceof Vp||e instanceof Up)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Wp=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],o=!1;for(let i=0;i<t;i++){if("\\"===e.charAt(i)&&i+1<t){const t=e.charAt(i+1);"z"===t?(r.push(e.substring(n,i)),r.push("$(?!\\n)(?<!\\n)"),n=i+2):"A"!==t&&"G"!==t||(o=!0),i++}}this.hasAnchor=o,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=jp.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return Hp.lastIndex=0,this.source.replace(Hp,(e,t)=>lp(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,r,o=[],i=[],s=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),o[e]=n,i[e]=n,s[e]=n,a[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(o[e+1]="￿",i[e+1]="￿",s[e+1]="A",a[e+1]="A"):"G"===r?(o[e+1]="￿",i[e+1]="G",s[e+1]="￿",a[e+1]="G"):(o[e+1]=r,i[e+1]=r,s[e+1]=r,a[e+1]=r),e++);return{A0_G0:o.join(""),A0_G1:i.join(""),A1_G0:s.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},Yp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Xp(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(e=>e.resolveAnchors(t,n));return new Xp(e,r,this._items.map(e=>e.ruleId))}},Xp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Jp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Zp=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Jp(e,8),this._embeddedLanguagesMatcher=new Qp(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Jp(0,0);_getBasicScopeAttributes=new cp(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Jp(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Qp=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>lp(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}},ef=("undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG,class{constructor(e,t){this.stack=e,this.stoppedEarly=t}});function tf(e,t,n,r,o,i,s,a){const l=t.content.length;let c=!1,d=-1;if(s){const s=function(e,t,n,r,o,i){let s=o.beginRuleCapturedEOL?0:-1;const a=[];for(let t=o;t;t=t.pop()){const n=t.getRule(e);n instanceof Up&&a.push({rule:n,stack:t})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:a,findOptions:c}=rf(l.rule,e,l.stack.endRule,n,r===s),d=a.findNextMatchSync(t,r,c);if(!d){0,o=l.stack.pop();break}if(-2!==d.ruleId){o=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(l.stack,d.captureIndices[0].start),of(e,t,n,l.stack,i,l.rule.whileCaptures,d.captureIndices),i.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}return{stack:o,linePos:r,anchorPosition:s,isFirstLine:n}}(e,t,n,r,o,i);o=s.stack,r=s.linePos,n=s.isFirstLine,d=s.anchorPosition}const u=Date.now();for(;!c;){if(0!==a){if(Date.now()-u>a)return new ef(o,!0)}h()}return new ef(o,!1);function h(){const s=function(e,t,n,r,o,i){const s=function(e,t,n,r,o,i){const s=o.getRule(e),{ruleScanner:a,findOptions:l}=nf(s,e,o.endRule,n,r===i),c=a.findNextMatchSync(t,r,l);if(c)return{captureIndices:c.captureIndices,matchedRuleId:c.ruleId};return null}(e,t,n,r,o,i),a=e.getInjections();if(0===a.length)return s;const l=function(e,t,n,r,o,i,s){let a,l=Number.MAX_VALUE,c=null,d=0;const u=i.contentNameScopesList.getScopeNames();for(let i=0,h=e.length;i<h;i++){const h=e[i];if(!h.matcher(u))continue;const p=t.getRule(h.ruleId),{ruleScanner:f,findOptions:m}=nf(p,t,null,r,o===s),_=f.findNextMatchSync(n,o,m);if(!_)continue;0;const g=_.captureIndices[0].start;if(!(g>=l)&&(l=g,c=_.captureIndices,a=_.ruleId,d=h.priority,l===o))break}if(c)return{priorityMatch:-1===d,captureIndices:c,matchedRuleId:a};return null}(a,e,t,n,r,o,i);if(!l)return s;if(!s)return l;const c=s.captureIndices[0].start,d=l.captureIndices[0].start;if(d<c||l.priorityMatch&&d===c)return l;return s}(e,t,n,r,o,d);if(!s)return i.produce(o,l),void(c=!0);const a=s.captureIndices,u=s.matchedRuleId,h=!!(a&&a.length>0)&&a[0].end>r;if(-1===u){const s=o.getRule(e);0,i.produce(o,a[0].start),o=o.withContentNameScopesList(o.nameScopesList),of(e,t,n,o,i,s.endCaptures,a),i.produce(o,a[0].end);const u=o;if(o=o.parent,d=u.getAnchorPos(),!h&&u.getEnterPos()===r)return o=u,i.produce(o,l),void(c=!0)}else{const s=e.getRule(u);i.produce(o,a[0].start);const p=o,f=s.getName(t.content,a),m=o.contentNameScopesList.pushAttributed(f,e);if(o=o.push(u,r,d,a[0].end===l,null,m,m),s instanceof Vp){const r=s;0,of(e,t,n,o,i,r.beginCaptures,a),i.produce(o,a[0].end),d=a[0].end;const u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(o=o.withContentNameScopesList(f),r.endHasBackReferences&&(o=o.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(o))return o=o.pop(),i.produce(o,l),void(c=!0)}else if(s instanceof Up){const r=s;0,of(e,t,n,o,i,r.beginCaptures,a),i.produce(o,a[0].end),d=a[0].end;const u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(o=o.withContentNameScopesList(f),r.whileHasBackReferences&&(o=o.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!h&&p.hasSameRuleAs(o))return o=o.pop(),i.produce(o,l),void(c=!0)}else{if(of(e,t,n,o,i,s.captures,a),i.produce(o,a[0].end),o=o.pop(),!h)return o=o.safePop(),i.produce(o,l),void(c=!0)}}a[0].end>r&&(r=a[0].end,n=!1)}}function nf(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function rf(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function of(e,t,n,r,o,i,s){if(0===i.length)return;const a=t.content,l=Math.min(i.length,s.length),c=[],d=s[0].end;for(let t=0;t<l;t++){const l=i[t];if(null===l)continue;const u=s[t];if(0===u.length)continue;if(u.start>d)break;for(;c.length>0&&c[c.length-1].endPos<=u.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,u.start):o.produce(r,u.start),l.retokenizeCapturedWithRuleId){const t=l.getName(a,s),i=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(a,s),d=i.pushAttributed(c,e),h=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,i,d),p=e.createOnigString(a.substring(0,u.end));tf(e,p,n&&0===u.start,u.start,h,o,!1,0),Sp(p);continue}const h=l.getName(a,s);if(null!==h){const t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,e);c.push(new sf(t,u.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var sf=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function af(e,t,n,r,o){const i=wp(t,lf),s=Kp.getCompiledRuleId(n,r,o.repository);for(const n of i)e.push({debugSelector:t,matcher:n.matcher,ruleId:s,grammar:o,priority:n.priority})}function lf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(cf(t[r],e))return n=r+1,!0;return!1})}function cf(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var df=class{constructor(e,t,n,r,o,i,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=a,this._basicScopeAttributesProvider=new Zp(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=uf(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=wp(e,lf);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:o[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){const e=r.injections;if(e)for(let n in e)af(t,n,e[n],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&af(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=uf(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let o;if(-1===this._rootId&&(this._rootId=Kp.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==pf.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=vp.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),i=this.getRule(this._rootId).getName(null,null);let s;s=i?hf.createRootAndLookUpScopeName(i,r,this):hf.createRoot("unknown",r),t=new pf(null,this._rootId,-1,-1,!1,null,s,s)}e+="\n";const i=this.createOnigString(e),s=i.content.length,a=new mf(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=tf(this,i,o,0,t,a,!0,r);return Sp(i),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function uf(e,t){return(e=ep(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var hf=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(const t of n)o=up.push(o,t.scopeNames),r=new e(r,o,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new up(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),i=new up(null,t),s=r.themeProvider.themeMatch(i),a=e.mergeAttributes(n,o,s);return new e(null,i,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,o=0,i=0;return null!==n&&(r=n.fontStyle,o=n.foregroundId,i=n.backgroundId),vp.set(e,t.languageId,t.tokenType,null,r,o,i)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const t of r)o=e._pushAttributed(o,t,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),i=t.scopePath.push(n),s=r.themeProvider.themeMatch(i),a=e.mergeAttributes(t.tokenAttributes,o,s);return new e(t,i,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},pf=class e{constructor(e,t,n,r,o,i,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&hf.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,i,s,a){return new e(this,t,n,r,o,i,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=hf.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,hf.fromExtension(r,n.contentNameScopesList))}},ff=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):wp(e,lf).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>wp(e,lf).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},mf=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=vp.set(n,0,yp(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}return r&&(n=vp.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},_f=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,function(e,t,n,r,o,i,s,a){return new df(e,t,n,r,o,i,s,a)}(e,i,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},gf=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new _f(dp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(dp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ff(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,o){const i=new Np(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,n,r,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},bf=pf.NULL;const xf=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class vf{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function yf(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new vf(n,r,t)}function wf(e){return e.toLowerCase()}vf.prototype.normal={},vf.prototype.property={},vf.prototype.space=void 0;class kf{constructor(e,t){this.attribute=t,this.property=e}}kf.prototype.attribute="",kf.prototype.booleanish=!1,kf.prototype.boolean=!1,kf.prototype.commaOrSpaceSeparated=!1,kf.prototype.commaSeparated=!1,kf.prototype.defined=!1,kf.prototype.mustUseProperty=!1,kf.prototype.number=!1,kf.prototype.overloadedBoolean=!1,kf.prototype.property="",kf.prototype.spaceSeparated=!1,kf.prototype.space=void 0;let Sf=0;const Cf=Pf(),Mf=Pf(),zf=Pf(),Nf=Pf(),Af=Pf(),Tf=Pf(),Rf=Pf();function Pf(){return 2**++Sf}const Of=Object.keys(t);class Ef extends kf{constructor(e,n,r,o){let i=-1;if(super(e,n),Lf(this,"space",o),"number"==typeof r)for(;++i<Of.length;){const e=Of[i];Lf(this,Of[i],(r&t[e])===t[e])}}}function Lf(e,t,n){n&&(e[t]=n)}function If(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Ef(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[wf(r)]=r,n[wf(i.attribute)]=r}return new vf(t,n,e.space)}Ef.prototype.defined=!0;const Df=If({properties:{ariaActiveDescendant:null,ariaAtomic:Mf,ariaAutoComplete:null,ariaBusy:Mf,ariaChecked:Mf,ariaColCount:Nf,ariaColIndex:Nf,ariaColSpan:Nf,ariaControls:Af,ariaCurrent:null,ariaDescribedBy:Af,ariaDetails:null,ariaDisabled:Mf,ariaDropEffect:Af,ariaErrorMessage:null,ariaExpanded:Mf,ariaFlowTo:Af,ariaGrabbed:Mf,ariaHasPopup:null,ariaHidden:Mf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Af,ariaLevel:Nf,ariaLive:null,ariaModal:Mf,ariaMultiLine:Mf,ariaMultiSelectable:Mf,ariaOrientation:null,ariaOwns:Af,ariaPlaceholder:null,ariaPosInSet:Nf,ariaPressed:Mf,ariaReadOnly:Mf,ariaRelevant:null,ariaRequired:Mf,ariaRoleDescription:Af,ariaRowCount:Nf,ariaRowIndex:Nf,ariaRowSpan:Nf,ariaSelected:Mf,ariaSetSize:Nf,ariaSort:null,ariaValueMax:Nf,ariaValueMin:Nf,ariaValueNow:Nf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Bf(e,t){return t in e?e[t]:t}function jf(e,t){return Bf(e,t.toLowerCase())}const Hf=If({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tf,acceptCharset:Af,accessKey:Af,action:null,allow:null,allowFullScreen:Cf,allowPaymentRequest:Cf,allowUserMedia:Cf,alt:null,as:null,async:Cf,autoCapitalize:null,autoComplete:Af,autoFocus:Cf,autoPlay:Cf,blocking:Af,capture:null,charSet:null,checked:Cf,cite:null,className:Af,cols:Nf,colSpan:null,content:null,contentEditable:Mf,controls:Cf,controlsList:Af,coords:Nf|Tf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Cf,defer:Cf,dir:null,dirName:null,disabled:Cf,download:zf,draggable:Mf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Cf,formTarget:null,headers:Af,height:Nf,hidden:zf,high:Nf,href:null,hrefLang:null,htmlFor:Af,httpEquiv:Af,id:null,imageSizes:null,imageSrcSet:null,inert:Cf,inputMode:null,integrity:null,is:null,isMap:Cf,itemId:null,itemProp:Af,itemRef:Af,itemScope:Cf,itemType:Af,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Cf,low:Nf,manifest:null,max:null,maxLength:Nf,media:null,method:null,min:null,minLength:Nf,multiple:Cf,muted:Cf,name:null,nonce:null,noModule:Cf,noValidate:Cf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Cf,optimum:Nf,pattern:null,ping:Af,placeholder:null,playsInline:Cf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Cf,referrerPolicy:null,rel:Af,required:Cf,reversed:Cf,rows:Nf,rowSpan:Nf,sandbox:Af,scope:null,scoped:Cf,seamless:Cf,selected:Cf,shadowRootClonable:Cf,shadowRootDelegatesFocus:Cf,shadowRootMode:null,shape:null,size:Nf,sizes:null,slot:null,span:Nf,spellCheck:Mf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Nf,step:null,style:null,tabIndex:Nf,target:null,title:null,translate:null,type:null,typeMustMatch:Cf,useMap:null,value:Mf,width:Nf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Af,axis:null,background:null,bgColor:null,border:Nf,borderColor:null,bottomMargin:Nf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Cf,declare:Cf,event:null,face:null,frame:null,frameBorder:null,hSpace:Nf,leftMargin:Nf,link:null,longDesc:null,lowSrc:null,marginHeight:Nf,marginWidth:Nf,noResize:Cf,noHref:Cf,noShade:Cf,noWrap:Cf,object:null,profile:null,prompt:null,rev:null,rightMargin:Nf,rules:null,scheme:null,scrolling:Mf,standby:null,summary:null,text:null,topMargin:Nf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Nf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Cf,disableRemotePlayback:Cf,prefix:null,property:null,results:Nf,security:null,unselectable:null},space:"html",transform:jf}),qf=If({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Rf,accentHeight:Nf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Nf,amplitude:Nf,arabicForm:null,ascent:Nf,attributeName:null,attributeType:null,azimuth:Nf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Nf,by:null,calcMode:null,capHeight:Nf,className:Af,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Nf,diffuseConstant:Nf,direction:null,display:null,dur:null,divisor:Nf,dominantBaseline:null,download:Cf,dx:null,dy:null,edgeMode:null,editable:null,elevation:Nf,enableBackground:null,end:null,event:null,exponent:Nf,externalResourcesRequired:null,fill:null,fillOpacity:Nf,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tf,g2:Tf,glyphName:Tf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Nf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Nf,horizOriginX:Nf,horizOriginY:Nf,id:null,ideographic:Nf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Nf,k:Nf,k1:Nf,k2:Nf,k3:Nf,k4:Nf,kernelMatrix:Rf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Nf,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Nf,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Nf,overlineThickness:Nf,paintOrder:null,panose1:null,path:null,pathLength:Nf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Af,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Nf,pointsAtY:Nf,pointsAtZ:Nf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rf,rev:Rf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rf,requiredFeatures:Rf,requiredFonts:Rf,requiredFormats:Rf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Nf,specularExponent:Nf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Nf,strikethroughThickness:Nf,string:null,stroke:null,strokeDashArray:Rf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Nf,strokeOpacity:Nf,strokeWidth:null,style:null,surfaceScale:Nf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rf,tabIndex:Nf,tableValues:null,target:null,targetX:Nf,targetY:Nf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Nf,underlineThickness:Nf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Nf,values:null,vAlphabetic:Nf,vMathematical:Nf,vectorEffect:null,vHanging:Nf,vIdeographic:Nf,version:null,vertAdvY:Nf,vertOriginX:Nf,vertOriginY:Nf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Nf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bf}),Ff=If({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),$f=If({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jf}),Gf=If({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Vf=yf([Df,Hf,Ff,$f,Gf],"html"),Uf=yf([Df,qf,Ff,$f,Gf],"svg"),Kf={}.hasOwnProperty;const Wf=/["&'<>`]/g,Yf=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xf=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Jf=/[|\\{}()[\]^$+*?.]/g,Zf=new WeakMap;function Qf(e,t){return e=e.replace(t.subset?function(e){let t=Zf.get(e);t||(t=function(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Jf,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(e),Zf.set(e,t));return t}(t.subset):Wf,n),t.subset||t.escapeOnly?e:e.replace(Yf,function(e,n,r){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(Xf,n);function n(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}const em=/[\dA-Fa-f]/;const tm=/\d/;const nm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],rm={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},om=["cent","copy","divide","gt","lt","not","para","times"],im={}.hasOwnProperty,sm={};let am;for(am in rm)im.call(rm,am)&&(sm[rm[am]]=am);const lm=/[^\dA-Za-z]/;function cm(e,t,n){let r,o=function(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!em.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=function(e,t,n,r){const o=String.fromCharCode(e);if(im.call(sm,o)){const e=sm[o],i="&"+e;return n&&nm.includes(e)&&!om.includes(e)&&(!r||t&&61!==t&&lm.test(String.fromCharCode(t)))?i:i+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const r=function(e,t,n){const r="&#"+String(e);return n&&t&&!tm.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);r.length<o.length&&(o=r)}return r&&(!n.useShortestReferences||r.length<o.length)?r:o}function dm(e,t){return Qf(e,Object.assign({format:cm},t))}const um=/^>|^->|<!--|-->|--!>|<!-$/g,hm=[">"],pm=["<",">"];function fm(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function mm(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}const _m=/[A-Z]/g,gm=/-[a-z]/g,bm=/^data[-\w.:]+$/i;function xm(e){return"-"+e.toLowerCase()}function vm(e){return e.charAt(1).toUpperCase()}function ym(e){return e.join(" ").trim()}const wm=/[ \t\n\f\r]/g;function km(e){return"object"==typeof e?"text"===e.type&&Sm(e.value):Sm(e)}function Sm(e){return""===e.replace(wm,"")}const Cm=Nm(1),Mm=Nm(-1),zm=[];function Nm(e){return function(t,n,r){const o=t?t.children:zm;let i=(n||0)+e,s=o[i];if(!r)for(;s&&km(s);)i+=e,s=o[i];return s}}const Am={}.hasOwnProperty;function Tm(e){return function(t,n,r){return Am.call(e,t.tagName)&&e[t.tagName](t,n,r)}}const Rm=Tm({body:function(e,t,n){const r=Cm(n,t);return!r||"comment"!==r.type},caption:Pm,colgroup:Pm,dd:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){const r=Cm(n,t);return Boolean(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:Pm,html:function(e,t,n){const r=Cm(n,t);return!r||"comment"!==r.type},li:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){const r=Cm(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:Om,rt:Om,tbody:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:Em,tfoot:function(e,t,n){return!Cm(n,t)},th:Em,thead:function(e,t,n){const r=Cm(n,t);return Boolean(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function Pm(e,t,n){const r=Cm(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&km(r.value.charAt(0)))}function Om(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function Em(e,t,n){const r=Cm(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}const Lm=Tm({body:function(e){const t=Cm(e,-1,!0);return!(t&&("comment"===t.type||"text"===t.type&&km(t.value.charAt(0))||"element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName)))},colgroup:function(e,t,n){const r=Mm(n,t),o=Cm(e,-1,!0);if(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&Rm(r,n.children.indexOf(r),n))return!1;return Boolean(o&&"element"===o.type&&"col"===o.tagName)},head:function(e){const t=new Set;for(const n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}const n=e.children[0];return!n||"element"===n.type},html:function(e){const t=Cm(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){const r=Mm(n,t),o=Cm(e,-1);if(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&Rm(r,n.children.indexOf(r),n))return!1;return Boolean(o&&"element"===o.type&&"tr"===o.tagName)}});const Im={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Dm(e,t,n){const r=function(e,t){const n=wf(t);let r=t,o=kf;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&bm.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(gm,vm);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!gm.test(e)){let n=e.replace(_m,xm);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Ef}return new o(r,t)}(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,i=e.settings.allowDangerousCharacters?0:1;let s,a=e.quote;if(!r.overloadedBoolean||n!==r.attribute&&""!==n?!r.boolean&&!r.overloadedBoolean||"string"==typeof n&&n!==r.attribute&&""!==n||(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const l=dm(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Im.name[o][i]}));return!0===n?l:(n=Array.isArray(n)?(r.commaSeparated?mm:ym)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n?l:(e.settings.preferUnquoted&&(s=dm(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Im.unquoted[o][i]}))),s!==n&&(e.settings.quoteSmart&&fm(n,a)>fm(n,e.alternative)&&(a=e.alternative),s=a+dm(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?Im.single:Im.double)[o][i],attribute:!0}))+a),l+(s?"="+s:s)))}const Bm=["<","&"];function jm(e,t,n,r){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?dm(e.value,Object.assign({},r.settings.characterReferences,{subset:Bm})):e.value}const Hm=function(e,t){const n=t||{};function r(t,...n){let o=r.invalid;const i=r.handlers;if(t&&Kf.call(t,e)){const n=String(t[e]);o=Kf.call(i,n)?i[n]:r.unknown}if(o)return o.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:function(e){throw new Error("Expected node, not `"+e+"`")},unknown:function(e){throw new Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+dm(e.value,Object.assign({},r.settings.characterReferences,{subset:hm}))+">":"\x3c!--"+e.value.replace(um,function(e){return dm(e,Object.assign({},r.settings.characterReferences,{subset:pm}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){const o=r.schema,i="svg"!==o.space&&r.settings.omitOptionalTags;let s="svg"===o.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;"html"===o.space&&"svg"===e.tagName&&(r.schema=Uf);const c=function(e,t){const n=[];let r,o=-1;if(t)for(r in t)if(null!==t[r]&&void 0!==t[r]){const o=Dm(e,r,t[r]);o&&n.push(o)}for(;++o<n.length;){const t=e.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&'"'!==t&&"'"!==t&&(n[o]+=" ")}return n.join("")}(r,e.properties),d=r.all("html"===o.space&&"template"===e.tagName?e.content:e);return r.schema=o,d&&(s=!1),!c&&i&&Lm(e,t,n)||(a.push("<",e.tagName,c?" "+c:""),s&&("svg"===o.space||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===l||l&&'"'!==l&&"'"!==l)&&a.push(" "),a.push("/")),a.push(">")),a.push(d),s||i&&Rm(e,t,n)||a.push("</"+e.tagName+">"),a.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:jm(e,0,n,r)},root:function(e,t,n,r){return r.all(e)},text:jm}});const qm={},Fm={},$m=[];function Gm(e,t,n){return Hm(e,t,n,this)}function Vm(e){const t=[],n=e&&e.children||$m;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Um(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(const[e,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[e]=o:e===r&&Object.assign(n,o);return n}function Km(e,t){return e&&t?.[e?.toLowerCase()]||e}async function Wm(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Ym(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Xm(e){return"ansi"===e||Ym(e)}function Jm(e){return"none"===e}function Zm(e){return Jm(e)}function Qm(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function e_(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let e=0;e<n.length;e+=2){const i=t?n[e]+(n[e+1]||""):n[e];o.push([i,r]),r+=n[e].length,r+=n[e+1]?.length||0}return o}const t_="light-dark()",n_=["color","background-color"];function r_(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&mp.Italic&&(t["font-style"]="italic"),e.fontStyle&mp.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&mp.Underline&&n.push("underline"),e.fontStyle&mp.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function o_(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const i_=new WeakMap;function s_(e,t){i_.set(e,t)}function a_(e){return i_.get(e)}class l_{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new l_(Object.fromEntries((n=t,Array.isArray(n)?n:[n]).map(e=>[e,bf])),e);var n}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);const o=e?.nameScopesList?.scopeName;o&&t.push(o),e.parent&&r(e.parent)}return r(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function c_(){const e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new Qh(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{const t=r.lines[e.line];if(void 0===t)throw new Qh(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new Qh(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}};const r=function(e){const t=e_(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,o=0;for(const e of t){if(r<e.length)break;r-=e.length,o++}return{line:o,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}}}(t.source),o=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));!function(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Qh(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const t=e[r],o=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,i=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,s=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,a=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(o||i||s||a){if(o&&i)continue;if(s&&a)continue;if(s&&n.start.offset===n.end.offset)continue;if(i&&t.start.offset===t.end.offset)continue;throw new Qh(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}(o),e.set(t.meta,{decorations:o,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;const n=function(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?function(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}(e,t):e})):e}(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]));return n},code(e){if(!this.options.decorations?.length)return;const n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new Qh(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function o(e,t,n,o){const i=r[e];let a="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===Number.POSITIVE_INFINITY&&(c=i.children.length),-1===l||-1===c)for(let e=0;e<i.children.length;e++)a+=d_(i.children[e]),-1===l&&a.length===t&&(l=e+1),-1===c&&a.length===n&&(c=e+1);if(-1===l)throw new Qh(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===c)throw new Qh(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,c);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};s(e,o,"wrapper"),i.children.splice(l,d.length,e)}else s(d[0],o,"token");else s(i,o,"line")}function i(e,t){r[e]=s(r[e],t,"line")}function s(e,t,n){const r=t.properties||{},o=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Qm(e,t.properties.class),e=o(e,n)||e}const a=[],l=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const e of l){const{start:t,end:n}=e;if(t.line===n.line)o(t.line,t.character,n.character,e);else if(t.line<n.line){o(t.line,t.character,Number.POSITIVE_INFINITY,e);for(let r=t.line+1;r<n.line;r++)a.unshift(()=>i(r,e));o(n.line,0,n.character,e)}}a.forEach(e=>e())}}}function d_(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(d_).join(""):""}const u_=[c_()];function h_(e){const t=function(e){const t=[],n=[],r=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...u_]}var p_=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],f_={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function m_(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function __(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function g_(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9){f_[r]&&t.push({type:"setDecoration",value:f_[r]})}else if(r<=29){const e=f_[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:p_[r-30]}});else if(38===r){const n=__(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:p_[r-40]}});else if(48===r){const n=__(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:p_[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:p_[r-100+8]}})}return t}var b_={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function x_(e=b_){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(e){return function(){if(r)return r;r=[];for(let e=0;e<p_.length;e++)r.push(t(p_[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let o=0;o<6;o++)for(let i=0;i<6;i++)r.push(n([e[t],e[o],e[i]]));let o=8;for(let e=0;e<24;e++,o+=10)r.push(n([o,o,o]));return r}()[e]}return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return o(e.index)}}}}function v_(e,t,n){const r=Um(e,n),o=e_(t),i=x_(Object.fromEntries(p_.map(t=>[t,e.colors?.[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]]))),s=function(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let i=0;do{const s=m_(r,i),a=s.sequence?r.substring(i,s.startPosition):r.substring(i);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(n)}),s.sequence){const r=g_(s.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,n.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&n.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&n.add(o.value)}i=s.position}while(i<r.length);return o}}}();return o.map(t=>s.parse(t[0]).map(n=>{let o,s;n.decorations.has("reverse")?(o=n.background?i.value(n.background):e.bg,s=n.foreground?i.value(n.foreground):e.fg):(o=n.foreground?i.value(n.foreground):e.fg,s=n.background?i.value(n.background):void 0),o=Km(o,r),s=Km(s,r),n.decorations.has("dim")&&(o=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(o));let a=mp.None;return n.decorations.has("bold")&&(a|=mp.Bold),n.decorations.has("italic")&&(a|=mp.Italic),n.decorations.has("underline")&&(a|=mp.Underline),n.decorations.has("strikethrough")&&(a|=mp.Strikethrough),{content:n.value,offset:t[1],color:o,bgColor:s,fontStyle:a}}))}function y_(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(Ym(r)||Jm(o))return e_(t).map(e=>[{content:e[0],offset:e[1]}]);const{theme:i,colorMap:s}=e.setTheme(o);if("ansi"===r)return v_(i,t,n);const a=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Qh(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Qh(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return function(e,t,n,r,o){const i=k_(e,t,n,r,o),s=new l_(k_(e,t,n,r,o).stateStack,t.name,n.name);return s_(i.tokens,s),i.tokens}(t,a,i,s,n)}function w_(...e){if(2===e.length)return a_(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=r;if(Ym(o)||Jm(i))throw new Qh("Plain language does not have grammar state");if("ansi"===o)throw new Qh("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(i),l=t.getLanguage(o);return new l_(k_(n,l,s,a,r).stateStack,l.name,s.name)}function k_(e,t,n,r,o){const i=Um(n,o),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500}=o,l=e_(e);let c=o.grammarState?function(e,t){if(!(e instanceof l_))throw new Qh("Invalid grammar state");return e.getInternalStack(t)}(o.grammarState,n.name)??bf:null!=o.grammarContextCode?k_(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:bf,d=[];const u=[];for(let e=0,h=l.length;e<h;e++){const[h,p]=l[e];if(""===h){d=[],u.push([]);continue}if(s>0&&h.length>=s){d=[],u.push([{content:h,offset:p,color:"",fontStyle:0}]);continue}let f,m,_;o.includeExplanation&&(f=t.tokenizeLine(h,c,a),m=f.tokens,_=0);const g=t.tokenizeLine2(h,c,a),b=g.tokens.length/2;for(let e=0;e<b;e++){const t=g.tokens[2*e],s=e+1<b?g.tokens[2*e+2]:h.length;if(t===s)continue;const a=g.tokens[2*e+1],l=Km(r[vp.getForeground(a)],i),c=vp.getFontStyle(a),u={content:h.substring(t,s),offset:p+t,color:l,fontStyle:c};if(o.includeExplanation){const e=[];if("scopeName"!==o.includeExplanation)for(const t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}u.explanation=[];let r=0;for(;t+r<s;){const t=m[_],n=h.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===o.includeExplanation?S_(t.scopes):C_(e,t.scopes)}),_+=1}}d.push(u)}u.push(d),d=[],c=g.ruleStack}return{tokens:u,stateStack:c}}function S_(e){return e.map(e=>({scopeName:e}))}function C_(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const o=t[r];n[r]={scopeName:o,themeMatches:N_(e,o,t.slice(0,r))}}return n}function M_(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function z_(e,t,n){if(!M_(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)M_(e[r],n[o])&&(r-=1),o-=1;return-1===r}function N_(e,t,n){const r=[];for(const{selectors:o,settings:i}of e)for(const e of o)if(z_(e,t,n)){r.push(i);break}return r}function A_(e,t,n){const r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),o=r.map(r=>{const o=y_(e,t,{...n,theme:r.theme});return{tokens:o,state:a_(o),theme:"string"==typeof r.theme?r.theme:r.theme.name}}),i=function(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(e=>e[r]),i=t.map(()=>[]);t.forEach((e,t)=>e.push(i[t]));const s=o.map(()=>0),a=o.map(e=>e[0]);for(;a.every(e=>e);){const e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){const n=a[t];n.content.length===e?(i[t].push(n),s[t]+=1,a[t]=o[t][s[t]]):(i[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...o.map(e=>e.tokens)),s=i[0].map((e,t)=>e.map((e,o)=>{const s={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(s.explanation=e.explanation),i.forEach((e,n)=>{const{content:i,explanation:a,offset:l,...c}=e[t][o];s.variants[r[n].color]=c}),s})),a=o[0].state?new l_(Object.fromEntries(o.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),o[0].state.lang):void 0;return a&&s_(s,a),s}function T_(e,t,n){let r,o,i,s,a,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:d="--shiki-",colorsRendering:u="css-vars"}=n,h=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:t.color===c?1:0);if(0===h.length)throw new Qh("`themes` option must not be empty");const p=A_(e,t,n);if(l=a_(p),c&&t_!==c&&!h.find(e=>e.color===c))throw new Qh(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=h.map(t=>e.getTheme(t.theme)),m=h.map(e=>e.color);i=p.map(e=>e.map(e=>function(e,t,n,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(t=>r_(e.variants[t])),a=new Set(s.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{const o="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":o)};return s.forEach((e,n)=>{for(const i of a){const a=e[i]||"inherit";if(0===n&&r&&n_.includes(i))if(r===t_&&s.length>1){const e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new Qh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=s[e][i]||"inherit",u=s[r][i]||"inherit";l[i]=`light-dark(${d}, ${u})`,"css-vars"===o&&(l[c(n,i)]=a)}else l[i]=a;else"css-vars"===o&&(l[c(n,i)]=a)}}),i.htmlStyle=l,i}(e,m,d,c,u))),l&&s_(i,l);const _=h.map(e=>Um(e.theme,n));o=R_(h,f,_,d,c,"fg",u),r=R_(h,f,_,d,c,"bg",u),s=`shiki-themes ${f.map(e=>e.name).join(" ")}`,a=c?void 0:[o,r].join(";")}else{if(!("theme"in n))throw new Qh("Invalid options, either `theme` or `themes` must be provided");{const a=Um(n.theme,n);i=y_(e,t,n);const c=e.getTheme(n.theme);r=Km(c.bg,a),o=Km(c.fg,a),s=c.name,l=a_(i)}}return{tokens:i,fg:o,bg:r,themeName:s,rootStyle:a,grammarState:l}}function R_(e,t,n,r,o,i,s){return e.map((a,l)=>{const c=Km(t[l][i],n[l])||"inherit",d=`${r+a.color}${"bg"===i?"-bg":""}:${c}`;if(0===l&&o){if(o===t_&&e.length>1){const r=e.findIndex(e=>"light"===e.color),o=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===o)throw new Qh('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Km(t[r][i],n[r])||"inherit"}, ${Km(t[o][i],n[o])||"inherit"});${d}`}return c}return"css-vars"===s?d:null}).filter(e=>!!e).join(";")}function P_(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>P_(e,t,n),codeToTokens:(t,n)=>T_(e,t,n)}){let o=t;for(const e of h_(n))o=e.preprocess?.call(r,o,n)||o;let{tokens:i,fg:s,bg:a,themeName:l,rootStyle:c,grammarState:d}=T_(e,o,n);const{mergeWhitespaces:u=!0,mergeSameStyleTokens:h=!1}=n;!0===u?i=function(e){return e.map(e=>{const t=[];let n="",r=0;return e.forEach((o,i)=>{const s=!(o.fontStyle&&(o.fontStyle&mp.Underline||o.fontStyle&mp.Strikethrough));s&&o.content.match(/^\s+$/)&&e[i+1]?(r||(r=o.offset),n+=o.content):n?(s?t.push({...o,offset:r,content:n+o.content}):t.push({content:n,offset:r},o),r=0,n=""):t.push(o)}),t})}(i):"never"===u&&(i=function(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;const t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;const[,n,r,o]=t;if(!n&&!o)return e;const i=[{...e,offset:e.offset+n.length,content:r}];return n&&i.unshift({content:n,offset:e.offset}),o&&i.push({content:o,offset:e.offset+n.length+r.length}),i}))}(i)),h&&(i=function(e){return e.map(e=>{const t=[];for(const n of e){if(0===t.length){t.push({...n});continue}const e=t[t.length-1],r=o_(e.htmlStyle||r_(e)),o=o_(n.htmlStyle||r_(n)),i=e.fontStyle&&(e.fontStyle&mp.Underline||e.fontStyle&mp.Strikethrough),s=n.fontStyle&&(n.fontStyle&mp.Underline||n.fontStyle&mp.Strikethrough);i||s||r!==o?t.push({...n}):e.content+=n.content}return t})}(i));const p={...r,get source(){return o}};for(const e of h_(n))i=e.tokens?.call(p,i)||i;return function(e,t,n,r=a_(e)){const o=h_(t),i=[],s={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t;let c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==l&&null!=l?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:i};const u=[],h={...n,structure:a,addClassToHast:Qm,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return s},get pre(){return c},get code(){return d},get lines(){return u}};if(e.forEach((e,t)=>{t&&("inline"===a?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&i.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(const i of e){let e={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]};const l=o_(i.htmlStyle||r_(i));l&&(e.properties.style=l);for(const s of o)e=s?.span?.call(h,e,t+1,r,n,i)||e;"inline"===a?s.children.push(e):"classic"===a&&n.children.push(e),r+=i.content.length}if("classic"===a){for(const e of o)n=e?.line?.call(h,n,t+1)||n;u.push(n),i.push(n)}}),"classic"===a){for(const e of o)d=e?.code?.call(h,d)||d;c.children.push(d);for(const e of o)c=e?.pre?.call(h,c)||c;s.children.push(c)}let p=s;for(const e of o)p=e?.root?.call(h,p)||p;r&&s_(p,r);return p}(i,{...n,fg:s,bg:a,themeName:l,rootStyle:c},p,d)}const O_=function(e,t){const n=t||qm,r=n.quote||'"',o='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Gm,all:Vm,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||xf,characterReferences:n.characterReferences||Fm,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?Uf:Vf,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)};function E_(e,t,n){const r={meta:{},options:n,codeToHast:(t,n)=>P_(e,t,n),codeToTokens:(t,n)=>T_(e,t,n)};let o=O_(P_(e,t,n,r));for(const e of h_(n))o=e.postprocess?.call(r,o,n)||o;return o}const L_="#333333",I_="#bbbbbb",D_="#fffffe",B_="#1e1e1e",j_="__shiki_resolved";function H_(e){if(e?.[j_])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?L_:I_),n||(n="light"===t.type?D_:B_),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function s(e){if(i.has(e))return i.get(e);o+=1;const n=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?s(e):(i.set(e,n),n)}t.settings=t.settings.map(e=>{const n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;const o={...e,settings:{...e.settings}};if(n){const n=s(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,o.settings.foreground=n}if(r){const n=s(e.settings.background);t.colorReplacements[n]=e.settings.background,o.settings.background=n}return o});for(const e of Object.keys(t.colors||{}))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){const n=s(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,j_,{enumerable:!1,writable:!1,value:!0}),t}async function q_(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Xm(e)).map(async e=>await Wm(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function F_(e){return(await Promise.all(e.map(async e=>Zm(e)?null:H_(await Wm(e))))).filter(e=>!!e)}let $_=3,G_=!1;class V_ extends Error{constructor(e){super(e),this.name="ShikiError"}}class U_ extends gf{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=H_(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=dp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){const t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new V_(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(const e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){const e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new V_(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(const[e,n]of t)this._resolver.addLanguage(n);for(const[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class K_{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let e=1;e<=t.length;e++){const r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let W_=0;function Y_(e){W_+=1,!1!==e.warnings&&W_>=10&&W_%10==0&&console.warn(`[Shiki] ${W_} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new V_("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(H_),o=new K_(e.engine,n),i=new U_(o,r,n,e.langAlias);let s;function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};d();const t=i.getTheme(e);if(!t)throw new V_(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(...e){d(),i.loadLanguages(e.flat(1))}function c(...e){d();for(const t of e.flat(1))i.loadTheme(t)}function d(){if(t)throw new V_("Shiki instance has been disposed")}function u(){t||(t=!0,i.dispose(),W_-=1)}return{setTheme:function(e){d();const t=a(e);return s!==e&&(i.setTheme(t),s=e),{theme:t,colorMap:i.getColorMap()}},getTheme:a,getLanguage:function(e){d();const t=i.getGrammar("string"==typeof e?e:e.name);if(!t)throw new V_(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return d(),i.getLoadedThemes()},getLoadedLanguages:function(){return d(),i.getLoadedLanguages()},loadLanguage:async function(...e){return l(await q_(e))},loadLanguageSync:l,loadTheme:async function(...e){return d(),c(await F_(e))},loadThemeSync:c,dispose:u,[Symbol.dispose]:u}}async function X_(e){e.engine||function(e,t=3){if($_&&!("number"==typeof $_&&t>$_)){if(G_)throw new Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([F_(e.themes||[]),q_(e.langs||[]),e.engine]);return Y_({...e,themes:t,langs:n,engine:r})}async function J_(e){const t=await X_(e);return{getLastGrammarState:(...e)=>w_(t,...e),codeToTokensBase:(e,n)=>y_(t,e,n),codeToTokensWithThemes:(e,n)=>A_(t,e,n),codeToTokens:(e,n)=>T_(t,e,n),codeToHast:(e,n)=>P_(t,e,n),codeToHtml:(e,n)=>E_(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Z_(e){const t=e.langs,n=e.themes,r=e.engine;return async function(e){function o(n){if("string"==typeof n){if(Xm(n))return[];n=e.langAlias?.[n]||n;const r=t[n];if(!r)throw new Qh(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function i(e){if(Zm(e))return"none";if("string"==typeof e){const t=n[e];if(!t)throw new Qh(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}const s=(e.themes??[]).map(e=>i(e)),a=(e.langs??[]).map(e=>o(e)),l=await J_({engine:e.engine??r(),...e,themes:s,langs:a});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(o)),loadTheme:(...e)=>l.loadTheme(...e.map(i)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}function Q_(e,t){const n=function(e){let t;return async function(n={}){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}}(e);async function r(e,r){const o=await n({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),i=await(t?.guessEmbeddedLanguages?.(e,r.lang,o));return i&&await o.loadLanguage(...i),o}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await r(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await r(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await r(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await r(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await r(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}class eg extends Error{constructor(e){super(e),this.name="ShikiError"}}function tg(){return"undefined"!=typeof performance?performance.now():Date.now()}const ng=(e,t)=>e+(t-e%t)%t;async function rg(e){let t,n;const r={};function o(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function i(e){try{return t.grow(e-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}const s="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(e,t){return e?function(e,t,n=1024){const r=t+n;let o=t;for(;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&s)return s.decode(e.subarray(t,o));let i="";for(;t<o;){let n=e[t++];if(!(128&n)){i+=String.fromCharCode(n);continue}const r=63&e[t++];if(192==(224&n)){i+=String.fromCharCode((31&n)<<6|r);continue}const o=63&e[t++];if(n=224==(240&n)?(15&n)<<12|r<<6|o:(7&n)<<18|r<<12|o<<6|63&e[t++],n<65536)i+=String.fromCharCode(n);else{const e=n-65536;i+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return i}(r.HEAPU8,e,t):""}const l={emscripten_get_now:tg,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){const t=r.HEAPU8.length,n=2147483648;if((e>>>=0)>n)return!1;for(let r=1;r<=4;r*=2){let o=t*(1+.2/r);o=Math.min(o,e+100663296);if(i(Math.min(n,ng(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:l,wasi_snapshot_preview1:l},i=await e(n);t=i.memory,o(t.buffer),Object.assign(r,i),r.UTF8ToString=a}(),r}var og=Object.defineProperty,ig=(e,t,n)=>((e,t,n)=>t in e?og(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);let sg=null;class ag{constructor(e){ig(this,"utf16Length"),ig(this,"utf8Length"),ig(this,"utf16Value"),ig(this,"utf8Value"),ig(this,"utf16OffsetToUtf8"),ig(this,"utf8OffsetToUtf16");const t=e.length,n=ag._utf8ByteLength(e),r=n!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=n);const i=r?new Uint32Array(n+1):null;r&&(i[n]=t);const s=new Uint8Array(n);let a=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,d=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(l-55296<<10)|t-56320,d=!0)}r&&(o[n]=a,d&&(o[n+1]=a),c<=127?i[a+0]=n:c<=2047?(i[a+0]=n,i[a+1]=n):c<=65535?(i[a+0]=n,i[a+1]=n,i[a+2]=n):(i[a+0]=n,i[a+1]=n,i[a+2]=n,i[a+3]=n)),c<=127?s[a++]=c:c<=2047?(s[a++]=192|(1984&c)>>>6,s[a++]=128|(63&c)>>>0):c<=65535?(s[a++]=224|(61440&c)>>>12,s[a++]=128|(4032&c)>>>6,s[a++]=128|(63&c)>>>0):(s[a++]=240|(1835008&c)>>>18,s[a++]=128|(258048&c)>>>12,s[a++]=128|(4032&c)>>>6,s[a++]=128|(63&c)>>>0),d&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const o=e.charCodeAt(n);let i=o,s=!1;if(o>=55296&&o<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(i=65536+(o-55296<<10)|t-56320,s=!0)}t+=i<=127?1:i<=2047?2:i<=65535?3:4,s&&n++}return t}createString(e){const t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}const lg=class e{constructor(t){if(ig(this,"id",++e.LAST_ID),ig(this,"_onigBinding"),ig(this,"content"),ig(this,"utf16Length"),ig(this,"utf8Length"),ig(this,"utf16OffsetToUtf8"),ig(this,"utf8OffsetToUtf16"),ig(this,"ptr"),!sg)throw new eg("Must invoke loadWasm first.");this._onigBinding=sg,this.content=t;const n=new ag(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=sg.omalloc(1e4)),e._sharedPtrInUse=!0,sg.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(sg)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ig(lg,"LAST_ID",0),ig(lg,"_sharedPtr",0),ig(lg,"_sharedPtrInUse",!1);let cg,dg=lg;class ug{constructor(e){if(ig(this,"_onigBinding"),ig(this,"_ptr"),!sg)throw new eg("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,o=e.length;r<o;r++){const o=new ag(e[r]);t[r]=o.createString(sg),n[r]=o.utf8Length}const r=sg.omalloc(4*e.length);sg.HEAPU32.set(t,r/4);const o=sg.omalloc(4*e.length);sg.HEAPU32.set(n,o/4);const i=sg.createOnigScanner(r,o,e.length);for(let n=0,r=e.length;n<r;n++)sg.ofree(t[n]);sg.ofree(o),sg.ofree(r),0===i&&function(e){throw new eg(e.UTF8ToString(e.getLastOnigError()))}(sg),this._onigBinding=sg,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new dg(e);const n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){const o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===i)return null;const s=o.HEAPU32;let a=i/4;const l=s[a++],c=s[a++],d=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(s[a++]),r=e.convertUtf8OffsetToUtf16(s[a++]);d[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:d}}}function hg(e){if(cg)return cg;return cg=async function(){sg=await rg(async t=>{let n=e;var r;return n=await n,"function"==typeof n&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator?n=await n.instantiator(t):!function(e){return"function"==typeof e.default}(n)?(function(e){return void 0!==e.data}(n)&&(n=n.data),!function(e){return"undefined"!=typeof Response&&e instanceof Response}(n)?!function(e){return"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(e)||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&e instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await pg(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await pg(n.default)(t)):n=await pg(n)(t):n="function"==typeof WebAssembly.instantiateStreaming?await(r=n,e=>WebAssembly.instantiateStreaming(r,e))(t):await function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(n)(t)):n=await n.default(t),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}(),cg}function pg(e){return t=>WebAssembly.instantiate(e,t)}const fg=Z_({langs:Xh,themes:Zh,engine:()=>async function(e){return e&&await hg(e),{createScanner:e=>new ug(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new dg(e)}}(o.e(4709).then(o.bind(o,4709)))}),{codeToHtml:mg,codeToHast:_g,codeToTokens:gg,codeToTokensBase:bg,codeToTokensWithThemes:xg,getSingletonHighlighter:vg,getLastGrammarState:yg}=Q_(fg,{guessEmbeddedLanguages:function(e,t,n){const r=new Set;for(const t of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(t[1]);for(const t of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(t[1]);for(const t of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(t[1]);if(!n)return Array.from(r);const o=n.getBundledLanguages();return Array.from(r).filter(e=>e&&o[e])}}),wg=["id","data-type"],kg=["data-id","onClick"],Sg=["innerHTML"],Cg=["disabled"],Mg=En({__name:"cube-code",props:{cube:{}},setup(e){const{root:t,status:n}=e.cube,{stats:r}=t,o=Vt(),i=Vt(),s=Vt(),a=Vt();function l(e){if(!e._draglist)return;const t=e._draglist.init();return e.tabs.length>0&&t<=0?requestAnimationFrame(()=>l(e)):void 0}function c(){const t=e.cube._draglist;if(!t)return;const n=e.cube.get_upstream_sum_scale();t.scale_h=n.sx,t.scale_v=n.sy}function d(){const t=o.value,n=s.value;t&&n&&(e.cube._draglist=new Gi.DragList(t,"horizental","data-id","insert"),c(),e.cube._draglist.register_start(c),l(e.cube))}let u;Zn(()=>{e.cube.update_code_html()}),io(()=>[n.active_tab_id,n.active_tab?.code],()=>{const t=e.cube.active_tab,n=a.value;t&&n&&(n.value=t.code)},{immediate:!0}),io(()=>[n.code_html],()=>{const t=e.cube.active_tab,n=a.value,r=n?.previousElementSibling;if(!t||!n||!r)return;const o=n.parentElement;mn(()=>{const t=r.nextElementSibling,n=r.firstElementChild;if(t&&n){if(o){const t=n.style.backgroundColor;if(t.startsWith("rgb")){const n=t.replace("rgb","rgba").replace(")",", 0.85)");e.cube.attrs.codebg=n}else e.cube.attrs.codebg=t;e.cube.attrs.caret=n.style.color}n.style.border="none",n.style.outline="none"}})}),Zn(()=>{d(),function(){const t=s.value,n=a.value;if(!t)return;n&&(n.value=e.cube.active_tab?.code||"");const r=i.value;if(!r)return;u=new Gi.DragDiff(r);let o=e.cube.attrs.width,l=e.cube.attrs.height,c=o,d=l,h={sx:1,sy:1};u.register_down(()=>{h=e.cube.get_upstream_sum_scale(),o=e.cube.attrs.width,l=e.cube.attrs.height}),u.register_move((e,n)=>{c=Math.round(e/h.sx+o),d=Math.round(n/h.sy+l),t.style.width=c+"px",t.style.height=d+"px"}),u.register_up((t,n)=>{if(o===c&&l===d)return;const r=e.cube.courier.get_recorder(),i=Math.round(t/h.sx+o),s=Math.round(n/h.sy+l);r.tell(e.cube,zi.resize(e.cube.id,i,s)),e.cube.history.record(r)}),u.register_cancel(()=>{Object.assign(e.cube.data.attrs,{width:o,height:l})})}()}),nr(()=>{u?.off()});const h=gi(()=>({"caret-color":e.cube.attrs.caret}));function p(e){e.stopPropagation()}function f(t){if(!t.previousElementSibling)return;const n=t.value,{id:r,courier:o,history:i}=e.cube,s=e.cube.tabbar_height,a=e.cube.max_height_auto,l=o.get_recorder(),c=Uh.update(r,e.cube.active_tab_id,n);l.tell(e.cube,c),mn(()=>{const n=t.scrollHeight+s,o=Math.min(a,n),c=zi.set_attr(r,{height:o});l.tell(e.cube,c),i.record(l)})}function m(e){f(e.currentTarget)}function _(e){const{hotkeys:n,clipboard:r,history:o}=t,i=e.key.toLowerCase();if([n.data[k.HotKeys["scope-add"]]].some(t=>n.validate(e,t)))return e.preventDefault();if(t.status.scope_count_normal>0&&["backspace","delete"].includes(i)){e.preventDefault(),e.stopPropagation();const t=r.delete_scope();return void(t&&o.record(t))}const s=e.currentTarget;if("tab"===i){e.preventDefault(),e.stopPropagation();let t=s.value;const n=s.selectionStart,r=s.selectionEnd;t=t.slice(0,n)+"\t"+t.slice(r),s.value=t,s.selectionStart=n+1,s.selectionEnd=n+1,f(s)}}function g(e){e.preventDefault();const t=e.currentTarget;t.scrollTop=0,t.scrollLeft=0}function b(e,t=50){e.stopPropagation();const n=e.currentTarget;e.deltaY>0?Gi.DomAnimation.scroll_element(n,t,"horizental"):Gi.DomAnimation.scroll_element(n,-t,"horizental")}function x(e){const t=e.currentTarget,n=t.firstElementChild,r=t.lastElementChild;if(!n||!r)return;const o=e.shiftKey,{scrollLeft:i,scrollTop:s,scrollWidth:a,scrollHeight:l}=t,c=t.getBoundingClientRect();e.deltaY>0?o?i+c.width<a&&(e.preventDefault(),e.stopPropagation(),Gi.DomAnimation.scroll_element(t,20,"horizental")):s+c.height<l&&(e.preventDefault(),e.stopPropagation(),Gi.DomAnimation.scroll_element(t,20,"vertical")):o?i>0&&(e.preventDefault(),e.stopPropagation(),Gi.DomAnimation.scroll_element(t,-20,"horizental")):s>0&&(e.preventDefault(),e.stopPropagation(),Gi.DomAnimation.scroll_element(t,-20,"vertical"))}function v(t){oc(t,e.cube)}return(t,l)=>(No(),Oo("div",{class:"cube-code",id:t.cube.id,"data-type":t.cube.type,ref_key:"code",ref:s,style:de(Yt(n).css),onPointerdown:p,onBeforeinput:p,onCompositionstart:p,onContextmenu:v},[jo("div",{class:"code-tabbar",onWheel:b},[jo("div",{class:"code-tabs-box",ref_key:"tabsbox",ref:o},[(No(!0),Oo(wo,null,hr(Yt(n).tabs,n=>(No(),Oo("div",{class:"code-tab","data-id":n.id,key:n.id,onClick:()=>function(t){const{courier:n,history:r}=e.cube,o=n.get_recorder();o.tell(e.cube,Uh.change_active(e.cube.id,t.id)),r.record(o)}(n)},[jo("div",{class:me(["code-tab-name",{"code-active-tab":n.id===t.cube.active_tab_id}])},ve(n.name),3)],8,kg))),128))],512)],32),jo("div",{class:"code-box",onWheel:x},[jo("div",{class:"code-box-inner",style:de({background:Yt(n).attrs.codebg})},[jo("span",{class:"code-highlight",onWheel:l[0]||(l[0]=e=>e.preventDefault()),innerHTML:Yt(n).code_html},null,40,Sg),jo("textarea",{disabled:Yt(r).is_read_mode,ref_key:"textarea",ref:a,style:de(h.value),onKeyup:g,onKeydown:_,autocapitalize:"false",autocomplete:"false",autocorrect:"false",spellcheck:"false",onInput:m},null,44,Cg)],4)],32),jo("div",{class:"code-dragger",ref_key:"code_dragger",ref:i},null,512)],44,wg))}}),zg=(0,Is.A)(Mg,[["__scopeId","data-v-06afb6b3"]]),Ng={".py":"python",".java":"java",".c":"c",".cpp":"c++",".js":"javascript",".html":"html",".css":"css",".php":"php",".rb":"ruby",".go":"go",".swift":"swift",".kt":"kotlin",".rs":"rust",".ts":"typescript",".sh":"shell",".pl":"perl",".cs":"c#",".sql":"sql",".r":"r",".m":"matlab",".adb":"ada",".ads":"ada",".lua":"lua",".scala":"scala",".dart":"dart",".hs":"haskell",".erl":"erlang",".ex":"elixir",".jl":"julia",".groovy":"groovy",".fs":"f#",".clj":"clojure",".scm":"scheme",".ml":"ocaml",".pas":"pascal",".d":"d",".nim":"nim",".zig":"zig",".v":"v",".coffee":"coffeescript",".litcoffee":"coffeescript",".vue":"vue",".svelte":"svelte",".elm":"elm",".purs":"purescript",".exs":"elixir",".eex":"elixir",".heex":"elixir",".tcl":"tcl",".tk":"tcl",".awk":"awk",".ps1":"powershell",".psm1":"powershell",".psd1":"powershell",".bat":"batch",".cmd":"batch",".json":"json",".xml":"xml",".yaml":"yaml",".yml":"yaml",".toml":"toml",".ini":"ini",".md":"markdown",".markdown":"markdown",".tex":"latex",".sty":"latex",".cls":"latex",".bib":"bibtex",".csv":"csv",".tsv":"tsv",".log":"log"};class Ag extends Rs{_code_html=Vt("");constructor(e){super(e)}get cube(){return this._cube}get code_html(){return this._code_html.value}get attrs(){return this._data.attrs}get info(){return this._data.info}get tabs(){return this.info.tabs}get active_tab_id(){return this.info.active_tab_id}get active_tab(){return this.tabs.find(e=>e.id===this.active_tab_id)}init(){super.init(),this.update_code_html()}update_code_html(e){this._code_html.value=e||this.cube.code_html}update_tabs(e){this.info.tabs=e||this.cube.info.tabs}update_tab_name(e,t){const n=this.tabs.find(t=>t.id===e);n&&(n.name=t)}update_active_tab_id(e){this.info.active_tab_id=e}}function Tg(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const Rg="dracula";class Pg extends rd{static _langs=[...Object.keys(Xh)];static _themes=[...Object.keys(Zh)];_status=new Ag(this);_code_html="";_draglist;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get tabbar_height(){return 36}get max_height_auto(){return 600}get langs(){return[...Pg._langs]}get themes(){return[...Pg._themes]}get component(){return zg}get tabs(){return this.info.tabs}get active_tab_id(){return this.info.active_tab_id}set active_tab_id(e){const t=this.tabs.find(t=>t.id===e);t&&(this.info.active_tab_id=t.id)}get active_tab(){return this.tabs.find(e=>e.id===this.active_tab_id)}get info(){return this.data.info}get css(){const e=this.config.data.line_indent,t=this.attrs.indent,n=this.attrs.width,r=this.attrs.height;return{...this.data.css,"margin-left":t>0?t*e+"px":"0px",width:n+"px",height:r+"px"}}get attrs(){return this.data.attrs}get code_html(){return this._code_html}export(){return this.base_export()}gc(){super.base_gc()}build_child(e){}update_data(e,t){return Pg.update_data(e,t)}code_to_html(e){return mg(e.code,{lang:e.lang,theme:e.theme,cssVariablePrefix:"--shiki-"})}update_code_html(){if(0===this.tabs.length)this._code_html="",this.status.update_code_html();else{const e=this.active_tab;if(!e)return;this.code_to_html(e).then(e=>{this._code_html=e,this.status.update_code_html()})}}get meta(){return Pg.meta}create_tab(e,t,n=Rg){return{id:od.get_id(),name:t,lang:e,code:"",theme:n||Rg}}replace_id(e,t,n={}){return Pg.replace_id(this.root,e,t,n)}copy_code(){const e=this.active_tab;if(!e)return vi.tips?.tip_error("当前没有激活的代码块tab");const t=e.code,n=new Blob([t],{type:"text/plain"}),r=new ClipboardItem({[n.type]:n});this.clipboard.set_clipboard_data(r).then(e=>{vi.tips?.tip_info("复制代码成功👏")})}change_lang(e){const{tabid:t,lang:n}=e,{courier:r,id:o}=this,i=r.get_recorder(),s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.lang;return s.lang=n,i.add_recover(Uh.change_lang(o,t,a)),this.update_code_html(),i}change_theme(e){const{tabid:t,theme:n}=e,{courier:r,id:o}=this,i=r.get_recorder(),s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.theme;return s.theme=n,i.add_recover(Uh.change_theme(o,t,a)),this.update_code_html(),i}code_update(e){const{tabid:t,code:n}=e,{courier:r,id:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.code;return s.code=n,i.add_recover(Uh.update(o,t,a)),this.update_code_html(),i}code_add(e){const{item:t,focus:n}=e,{courier:r,id:o}=this,i=r.get_recorder();return i.add_cmd(e),this.info.tabs.push(t),i.add_recover(Uh.remove(o,t.id)),this.update_code_html(),n&&i.tell(this,Uh.change_active(o,t.id)),mn(()=>{this._draglist?.init()}),this.status.update_tabs(),i}code_remove(e){const{tabid:t}=e,{courier:n,id:r}=this,o=n.get_recorder();o.add_cmd(e);const i=this.tabs.find(e=>e.id===t);if(!i)return;const s=this.tabs.indexOf(i),a=this.tabs[s-1]||this.tabs[s+1];return s>=0&&this.tabs.splice(s,1),o.add_recover(Uh.add(r,i)),a&&(this.active_tab_id=a.id),this.update_code_html(),this.status.update_tabs(),mn(()=>{this._draglist?.init()}),o}code_rename(e){const{tabid:t,filename:n}=e,{courier:r,id:o}=this,i=r.get_recorder();i.add_cmd(e);const s=this.tabs.find(e=>e.id===t);if(!s)return;const a=s.name;return s.name=n,i.add_recover(Uh.rename(o,t,a)),this.status.update_tab_name(t,n),i}change_active(e){const{tabid:t}=e,{courier:n,id:r}=this,o=n.get_recorder(),i=this.tabs.find(e=>e.id===t);if(!i)return i;const s=this.active_tab_id;return this.active_tab_id=t,o.add_recover(Uh.change_active(r,s)),this.update_code_html(),this.status.update_active_tab_id(t),o}on_cursor_in_tail(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t),s=this.dom?.querySelector("textarea");return s?.focus(),i}on_cursor_in_head(e){const{courier:t,prev_cube:n,pcube:r,next_cube:o}=this,i=new ld(t),s=this.dom?.querySelector("textarea");return s?.focus(),i}static get langs(){return[...this._langs]}static get themes(){return[...this._themes]}static get meta(){return{cubename:"代码块",type:S.Cubes.code,block:!0,version:1,show:!0}}static get_default(){return{id:od.get_id(),type:S.Cubes.code,info:{tabs:[],active_tab_id:""},attrs:{width:560,height:120,codebg:"transparent",caret:"black"},css:{}}}static get_default_by_string(e="typescript",t=""){const n={name:`code${this.get_format_from_lang(e)}`,id:od.get_id(),code:t,lang:e,theme:"andromeeda"};return{id:od.get_id(),type:S.Cubes.code,info:{tabs:[n],active_tab_id:n.id},attrs:{width:560,height:120,codebg:"transparent",caret:"black"},css:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n}static get_format_from_lang(e){for(let t in Ng)if(Ng[t]===e)return t;return""}static get_lang_from_format(e){return Ng[e]}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Tg([Ri(l.Names.change_lang)],Pg.prototype,"change_lang",null),Tg([Ri(l.Names.change_theme)],Pg.prototype,"change_theme",null),Tg([Ri(l.Names.code_update)],Pg.prototype,"code_update",null),Tg([Ri(l.Names.code_add)],Pg.prototype,"code_add",null),Tg([Ri(l.Names.code_remove)],Pg.prototype,"code_remove",null),Tg([Ri(l.Names.code_rename)],Pg.prototype,"code_rename",null),Tg([Ri(l.Names.change_active)],Pg.prototype,"change_active",null),Tg([Ri(g.Names.cursor_in_tail)],Pg.prototype,"on_cursor_in_tail",null),Tg([Ri(g.Names.cursor_in_head)],Pg.prototype,"on_cursor_in_head",null),Pg=Tg([Si],Pg);const Og=["id","data-type","innerHTML"],Eg=En({__name:"cube-fomula",props:{cube:{}},setup(e){const{event:t,status:n}=e.cube;function r(){t.emit_show_cube_editor(e.cube)}const o=gi(()=>{let t={...n.css};return e.cube.attrs.block&&(t.display="block",t["text-align"]="center"),t});return(e,t)=>(No(),Oo("span",{class:"cube-fomula",onClick:r,id:e.cube.id,"data-type":e.cube.type,style:de(o.value),innerHTML:Yt(n).mathml},null,12,Og))}}),Lg=(0,Is.A)(Eg,[["__scopeId","data-v-7642071d"]]);class Ig{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Ig(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Dg{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Dg(t,Ig.range(this,e))}}class Bg{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,o="KaTeX parse error: "+e,i=t&&t.loc;if(i&&i.start<=i.end){var s=i.lexer.input;n=i.start,r=i.end,n===s.length?o+=" at end of input: ":o+=" at position "+(n+1)+": ";var a=s.slice(n,r).replace(/[^]/g,"$&̲");o+=(n>15?"…"+s.slice(n-15,n):s.slice(0,n))+a+(r+15<s.length?s.slice(r,r+15)+"…":s.slice(r))}var l=new Error(o);return l.name="ParseError",l.__proto__=Bg.prototype,l.position=n,null!=n&&null!=r&&(l.length=r-n),l.rawMessage=e,l}}Bg.prototype.__proto__=Error.prototype;var jg=/([A-Z])/g,Hg={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},qg=/[&><"']/g;var Fg=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},$g={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(qg,e=>Hg[e])},hyphenate:function(e){return e.replace(jg,"-$1").toLowerCase()},getBaseElem:Fg,isCharacterBox:function(e){var t=Fg(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Gg={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Vg(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Ug{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Gg)if(Gg.hasOwnProperty(t)){var n=Gg[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Vg(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Bg("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(e){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=$g.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class Kg{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Wg[Yg[this.id]]}sub(){return Wg[Xg[this.id]]}fracNum(){return Wg[Jg[this.id]]}fracDen(){return Wg[Zg[this.id]]}cramp(){return Wg[Qg[this.id]]}text(){return Wg[eb[this.id]]}isTight(){return this.size>=2}}var Wg=[new Kg(0,0,!1),new Kg(1,0,!0),new Kg(2,1,!1),new Kg(3,1,!0),new Kg(4,2,!1),new Kg(5,2,!0),new Kg(6,3,!1),new Kg(7,3,!0)],Yg=[4,5,4,5,6,7,6,7],Xg=[5,5,5,5,7,7,7,7],Jg=[2,3,4,5,6,7,6,7],Zg=[3,3,5,5,7,7,7,7],Qg=[1,1,3,3,5,5,7,7],eb=[0,1,2,3,2,3,2,3],tb={DISPLAY:Wg[0],TEXT:Wg[2],SCRIPT:Wg[4],SCRIPTSCRIPT:Wg[6]},nb=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var rb=[];function ob(e){for(var t=0;t<rb.length;t+=2)if(e>=rb[t]&&e<=rb[t+1])return!0;return!1}nb.forEach(e=>e.blocks.forEach(e=>rb.push(...e)));var ib=80,sb={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class ab{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return $g.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>e.toText()).join("")}}var lb={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},cb={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},db={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function ub(e,t,n){if(!lb[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),o=lb[t][r];if(!o&&e[0]in db&&(r=db[e[0]].charCodeAt(0),o=lb[t][r]),o||"text"!==n||ob(r)&&(o=lb[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var hb={};var pb=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],fb=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],mb=function(e,t){return t.size<2?e:pb[e-1][t.size-1]};class _b{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||_b.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=fb[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new _b(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:mb(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:fb[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=mb(_b.BASESIZE,e);return this.size===t&&this.textSize===_b.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==_b.BASESIZE?["sizing","reset-size"+this.size,"size"+_b.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!hb[t=e>=5?0:e>=3?1:2]){var n=hb[t]={cssEmPerMu:cb.quad[t]/18};for(var r in cb)cb.hasOwnProperty(r)&&(n[r]=cb[r][t])}return hb[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}_b.BASESIZE=6;var gb={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},bb={ex:!0,em:!0,mu:!0},xb=function(e){return"string"!=typeof e&&(e=e.unit),e in gb||e in bb||"ex"===e},vb=function(e,t){var n;if(e.unit in gb)n=gb[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Bg("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},yb=function(e){return+e.toFixed(4)+"em"},wb=function(e){return e.filter(e=>e).join(" ")},kb=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Sb=function(e){var t=document.createElement(e);for(var n in t.className=wb(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)t.appendChild(this.children[o].toNode());return t},Cb=/[\s"'>/=\x00-\x1f]/,Mb=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+$g.escape(wb(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=$g.hyphenate(r)+":"+this.style[r]+";");for(var o in n&&(t+=' style="'+$g.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(o)){if(Cb.test(o))throw new Bg("Invalid attribute name '"+o+"'");t+=" "+o+'="'+$g.escape(this.attributes[o])+'"'}t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"};class zb{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,kb.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $g.contains(this.classes,e)}toNode(){return Sb.call(this,"span")}toMarkup(){return Mb.call(this,"span")}}class Nb{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kb.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $g.contains(this.classes,e)}toNode(){return Sb.call(this,"a")}toMarkup(){return Mb.call(this,"a")}}class Ab{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return $g.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+$g.escape(this.src)+'" alt="'+$g.escape(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=$g.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+$g.escape(t)+'"'),e+="'/>"}}var Tb={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Rb{constructor(e,t,n,r,o,i,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=o||0,this.width=i||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<nb.length;t++)for(var n=nb[t],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(e>=o[0]&&e<=o[1])return n.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Tb[this.text])}hasClass(e){return $g.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=yb(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=wb(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=$g.escape(wb(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=$g.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+$g.escape(n)+'"');var o=$g.escape(this.text);return e?(t+=">",t+=o,t+="</span>"):o}}class Pb{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+$g.escape(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class Ob{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",sb[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+$g.escape(this.alternate)+'"/>':'<path d="'+$g.escape(sb[this.pathName])+'"/>'}}class Eb{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+$g.escape(this.attributes[t])+'"');return e+="/>"}}function Lb(e){if(e instanceof Rb)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var Ib={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Db={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Bb={math:{},text:{}};function jb(e,t,n,r,o,i){Bb[e][o]={font:t,group:n,replace:r},i&&r&&(Bb[e][r]=Bb[e][o])}var Hb="math",qb="text",Fb="main",$b="ams",Gb="accent-token",Vb="bin",Ub="close",Kb="inner",Wb="mathord",Yb="op-token",Xb="open",Jb="punct",Zb="rel",Qb="spacing",ex="textord";jb(Hb,Fb,Zb,"≡","\\equiv",!0),jb(Hb,Fb,Zb,"≺","\\prec",!0),jb(Hb,Fb,Zb,"≻","\\succ",!0),jb(Hb,Fb,Zb,"∼","\\sim",!0),jb(Hb,Fb,Zb,"⊥","\\perp"),jb(Hb,Fb,Zb,"⪯","\\preceq",!0),jb(Hb,Fb,Zb,"⪰","\\succeq",!0),jb(Hb,Fb,Zb,"≃","\\simeq",!0),jb(Hb,Fb,Zb,"∣","\\mid",!0),jb(Hb,Fb,Zb,"≪","\\ll",!0),jb(Hb,Fb,Zb,"≫","\\gg",!0),jb(Hb,Fb,Zb,"≍","\\asymp",!0),jb(Hb,Fb,Zb,"∥","\\parallel"),jb(Hb,Fb,Zb,"⋈","\\bowtie",!0),jb(Hb,Fb,Zb,"⌣","\\smile",!0),jb(Hb,Fb,Zb,"⊑","\\sqsubseteq",!0),jb(Hb,Fb,Zb,"⊒","\\sqsupseteq",!0),jb(Hb,Fb,Zb,"≐","\\doteq",!0),jb(Hb,Fb,Zb,"⌢","\\frown",!0),jb(Hb,Fb,Zb,"∋","\\ni",!0),jb(Hb,Fb,Zb,"∝","\\propto",!0),jb(Hb,Fb,Zb,"⊢","\\vdash",!0),jb(Hb,Fb,Zb,"⊣","\\dashv",!0),jb(Hb,Fb,Zb,"∋","\\owns"),jb(Hb,Fb,Jb,".","\\ldotp"),jb(Hb,Fb,Jb,"⋅","\\cdotp"),jb(Hb,Fb,ex,"#","\\#"),jb(qb,Fb,ex,"#","\\#"),jb(Hb,Fb,ex,"&","\\&"),jb(qb,Fb,ex,"&","\\&"),jb(Hb,Fb,ex,"ℵ","\\aleph",!0),jb(Hb,Fb,ex,"∀","\\forall",!0),jb(Hb,Fb,ex,"ℏ","\\hbar",!0),jb(Hb,Fb,ex,"∃","\\exists",!0),jb(Hb,Fb,ex,"∇","\\nabla",!0),jb(Hb,Fb,ex,"♭","\\flat",!0),jb(Hb,Fb,ex,"ℓ","\\ell",!0),jb(Hb,Fb,ex,"♮","\\natural",!0),jb(Hb,Fb,ex,"♣","\\clubsuit",!0),jb(Hb,Fb,ex,"℘","\\wp",!0),jb(Hb,Fb,ex,"♯","\\sharp",!0),jb(Hb,Fb,ex,"♢","\\diamondsuit",!0),jb(Hb,Fb,ex,"ℜ","\\Re",!0),jb(Hb,Fb,ex,"♡","\\heartsuit",!0),jb(Hb,Fb,ex,"ℑ","\\Im",!0),jb(Hb,Fb,ex,"♠","\\spadesuit",!0),jb(Hb,Fb,ex,"§","\\S",!0),jb(qb,Fb,ex,"§","\\S"),jb(Hb,Fb,ex,"¶","\\P",!0),jb(qb,Fb,ex,"¶","\\P"),jb(Hb,Fb,ex,"†","\\dag"),jb(qb,Fb,ex,"†","\\dag"),jb(qb,Fb,ex,"†","\\textdagger"),jb(Hb,Fb,ex,"‡","\\ddag"),jb(qb,Fb,ex,"‡","\\ddag"),jb(qb,Fb,ex,"‡","\\textdaggerdbl"),jb(Hb,Fb,Ub,"⎱","\\rmoustache",!0),jb(Hb,Fb,Xb,"⎰","\\lmoustache",!0),jb(Hb,Fb,Ub,"⟯","\\rgroup",!0),jb(Hb,Fb,Xb,"⟮","\\lgroup",!0),jb(Hb,Fb,Vb,"∓","\\mp",!0),jb(Hb,Fb,Vb,"⊖","\\ominus",!0),jb(Hb,Fb,Vb,"⊎","\\uplus",!0),jb(Hb,Fb,Vb,"⊓","\\sqcap",!0),jb(Hb,Fb,Vb,"∗","\\ast"),jb(Hb,Fb,Vb,"⊔","\\sqcup",!0),jb(Hb,Fb,Vb,"◯","\\bigcirc",!0),jb(Hb,Fb,Vb,"∙","\\bullet",!0),jb(Hb,Fb,Vb,"‡","\\ddagger"),jb(Hb,Fb,Vb,"≀","\\wr",!0),jb(Hb,Fb,Vb,"⨿","\\amalg"),jb(Hb,Fb,Vb,"&","\\And"),jb(Hb,Fb,Zb,"⟵","\\longleftarrow",!0),jb(Hb,Fb,Zb,"⇐","\\Leftarrow",!0),jb(Hb,Fb,Zb,"⟸","\\Longleftarrow",!0),jb(Hb,Fb,Zb,"⟶","\\longrightarrow",!0),jb(Hb,Fb,Zb,"⇒","\\Rightarrow",!0),jb(Hb,Fb,Zb,"⟹","\\Longrightarrow",!0),jb(Hb,Fb,Zb,"↔","\\leftrightarrow",!0),jb(Hb,Fb,Zb,"⟷","\\longleftrightarrow",!0),jb(Hb,Fb,Zb,"⇔","\\Leftrightarrow",!0),jb(Hb,Fb,Zb,"⟺","\\Longleftrightarrow",!0),jb(Hb,Fb,Zb,"↦","\\mapsto",!0),jb(Hb,Fb,Zb,"⟼","\\longmapsto",!0),jb(Hb,Fb,Zb,"↗","\\nearrow",!0),jb(Hb,Fb,Zb,"↩","\\hookleftarrow",!0),jb(Hb,Fb,Zb,"↪","\\hookrightarrow",!0),jb(Hb,Fb,Zb,"↘","\\searrow",!0),jb(Hb,Fb,Zb,"↼","\\leftharpoonup",!0),jb(Hb,Fb,Zb,"⇀","\\rightharpoonup",!0),jb(Hb,Fb,Zb,"↙","\\swarrow",!0),jb(Hb,Fb,Zb,"↽","\\leftharpoondown",!0),jb(Hb,Fb,Zb,"⇁","\\rightharpoondown",!0),jb(Hb,Fb,Zb,"↖","\\nwarrow",!0),jb(Hb,Fb,Zb,"⇌","\\rightleftharpoons",!0),jb(Hb,$b,Zb,"≮","\\nless",!0),jb(Hb,$b,Zb,"","\\@nleqslant"),jb(Hb,$b,Zb,"","\\@nleqq"),jb(Hb,$b,Zb,"⪇","\\lneq",!0),jb(Hb,$b,Zb,"≨","\\lneqq",!0),jb(Hb,$b,Zb,"","\\@lvertneqq"),jb(Hb,$b,Zb,"⋦","\\lnsim",!0),jb(Hb,$b,Zb,"⪉","\\lnapprox",!0),jb(Hb,$b,Zb,"⊀","\\nprec",!0),jb(Hb,$b,Zb,"⋠","\\npreceq",!0),jb(Hb,$b,Zb,"⋨","\\precnsim",!0),jb(Hb,$b,Zb,"⪹","\\precnapprox",!0),jb(Hb,$b,Zb,"≁","\\nsim",!0),jb(Hb,$b,Zb,"","\\@nshortmid"),jb(Hb,$b,Zb,"∤","\\nmid",!0),jb(Hb,$b,Zb,"⊬","\\nvdash",!0),jb(Hb,$b,Zb,"⊭","\\nvDash",!0),jb(Hb,$b,Zb,"⋪","\\ntriangleleft"),jb(Hb,$b,Zb,"⋬","\\ntrianglelefteq",!0),jb(Hb,$b,Zb,"⊊","\\subsetneq",!0),jb(Hb,$b,Zb,"","\\@varsubsetneq"),jb(Hb,$b,Zb,"⫋","\\subsetneqq",!0),jb(Hb,$b,Zb,"","\\@varsubsetneqq"),jb(Hb,$b,Zb,"≯","\\ngtr",!0),jb(Hb,$b,Zb,"","\\@ngeqslant"),jb(Hb,$b,Zb,"","\\@ngeqq"),jb(Hb,$b,Zb,"⪈","\\gneq",!0),jb(Hb,$b,Zb,"≩","\\gneqq",!0),jb(Hb,$b,Zb,"","\\@gvertneqq"),jb(Hb,$b,Zb,"⋧","\\gnsim",!0),jb(Hb,$b,Zb,"⪊","\\gnapprox",!0),jb(Hb,$b,Zb,"⊁","\\nsucc",!0),jb(Hb,$b,Zb,"⋡","\\nsucceq",!0),jb(Hb,$b,Zb,"⋩","\\succnsim",!0),jb(Hb,$b,Zb,"⪺","\\succnapprox",!0),jb(Hb,$b,Zb,"≆","\\ncong",!0),jb(Hb,$b,Zb,"","\\@nshortparallel"),jb(Hb,$b,Zb,"∦","\\nparallel",!0),jb(Hb,$b,Zb,"⊯","\\nVDash",!0),jb(Hb,$b,Zb,"⋫","\\ntriangleright"),jb(Hb,$b,Zb,"⋭","\\ntrianglerighteq",!0),jb(Hb,$b,Zb,"","\\@nsupseteqq"),jb(Hb,$b,Zb,"⊋","\\supsetneq",!0),jb(Hb,$b,Zb,"","\\@varsupsetneq"),jb(Hb,$b,Zb,"⫌","\\supsetneqq",!0),jb(Hb,$b,Zb,"","\\@varsupsetneqq"),jb(Hb,$b,Zb,"⊮","\\nVdash",!0),jb(Hb,$b,Zb,"⪵","\\precneqq",!0),jb(Hb,$b,Zb,"⪶","\\succneqq",!0),jb(Hb,$b,Zb,"","\\@nsubseteqq"),jb(Hb,$b,Vb,"⊴","\\unlhd"),jb(Hb,$b,Vb,"⊵","\\unrhd"),jb(Hb,$b,Zb,"↚","\\nleftarrow",!0),jb(Hb,$b,Zb,"↛","\\nrightarrow",!0),jb(Hb,$b,Zb,"⇍","\\nLeftarrow",!0),jb(Hb,$b,Zb,"⇏","\\nRightarrow",!0),jb(Hb,$b,Zb,"↮","\\nleftrightarrow",!0),jb(Hb,$b,Zb,"⇎","\\nLeftrightarrow",!0),jb(Hb,$b,Zb,"△","\\vartriangle"),jb(Hb,$b,ex,"ℏ","\\hslash"),jb(Hb,$b,ex,"▽","\\triangledown"),jb(Hb,$b,ex,"◊","\\lozenge"),jb(Hb,$b,ex,"Ⓢ","\\circledS"),jb(Hb,$b,ex,"®","\\circledR"),jb(qb,$b,ex,"®","\\circledR"),jb(Hb,$b,ex,"∡","\\measuredangle",!0),jb(Hb,$b,ex,"∄","\\nexists"),jb(Hb,$b,ex,"℧","\\mho"),jb(Hb,$b,ex,"Ⅎ","\\Finv",!0),jb(Hb,$b,ex,"⅁","\\Game",!0),jb(Hb,$b,ex,"‵","\\backprime"),jb(Hb,$b,ex,"▲","\\blacktriangle"),jb(Hb,$b,ex,"▼","\\blacktriangledown"),jb(Hb,$b,ex,"■","\\blacksquare"),jb(Hb,$b,ex,"⧫","\\blacklozenge"),jb(Hb,$b,ex,"★","\\bigstar"),jb(Hb,$b,ex,"∢","\\sphericalangle",!0),jb(Hb,$b,ex,"∁","\\complement",!0),jb(Hb,$b,ex,"ð","\\eth",!0),jb(qb,Fb,ex,"ð","ð"),jb(Hb,$b,ex,"╱","\\diagup"),jb(Hb,$b,ex,"╲","\\diagdown"),jb(Hb,$b,ex,"□","\\square"),jb(Hb,$b,ex,"□","\\Box"),jb(Hb,$b,ex,"◊","\\Diamond"),jb(Hb,$b,ex,"¥","\\yen",!0),jb(qb,$b,ex,"¥","\\yen",!0),jb(Hb,$b,ex,"✓","\\checkmark",!0),jb(qb,$b,ex,"✓","\\checkmark"),jb(Hb,$b,ex,"ℶ","\\beth",!0),jb(Hb,$b,ex,"ℸ","\\daleth",!0),jb(Hb,$b,ex,"ℷ","\\gimel",!0),jb(Hb,$b,ex,"ϝ","\\digamma",!0),jb(Hb,$b,ex,"ϰ","\\varkappa"),jb(Hb,$b,Xb,"┌","\\@ulcorner",!0),jb(Hb,$b,Ub,"┐","\\@urcorner",!0),jb(Hb,$b,Xb,"└","\\@llcorner",!0),jb(Hb,$b,Ub,"┘","\\@lrcorner",!0),jb(Hb,$b,Zb,"≦","\\leqq",!0),jb(Hb,$b,Zb,"⩽","\\leqslant",!0),jb(Hb,$b,Zb,"⪕","\\eqslantless",!0),jb(Hb,$b,Zb,"≲","\\lesssim",!0),jb(Hb,$b,Zb,"⪅","\\lessapprox",!0),jb(Hb,$b,Zb,"≊","\\approxeq",!0),jb(Hb,$b,Vb,"⋖","\\lessdot"),jb(Hb,$b,Zb,"⋘","\\lll",!0),jb(Hb,$b,Zb,"≶","\\lessgtr",!0),jb(Hb,$b,Zb,"⋚","\\lesseqgtr",!0),jb(Hb,$b,Zb,"⪋","\\lesseqqgtr",!0),jb(Hb,$b,Zb,"≑","\\doteqdot"),jb(Hb,$b,Zb,"≓","\\risingdotseq",!0),jb(Hb,$b,Zb,"≒","\\fallingdotseq",!0),jb(Hb,$b,Zb,"∽","\\backsim",!0),jb(Hb,$b,Zb,"⋍","\\backsimeq",!0),jb(Hb,$b,Zb,"⫅","\\subseteqq",!0),jb(Hb,$b,Zb,"⋐","\\Subset",!0),jb(Hb,$b,Zb,"⊏","\\sqsubset",!0),jb(Hb,$b,Zb,"≼","\\preccurlyeq",!0),jb(Hb,$b,Zb,"⋞","\\curlyeqprec",!0),jb(Hb,$b,Zb,"≾","\\precsim",!0),jb(Hb,$b,Zb,"⪷","\\precapprox",!0),jb(Hb,$b,Zb,"⊲","\\vartriangleleft"),jb(Hb,$b,Zb,"⊴","\\trianglelefteq"),jb(Hb,$b,Zb,"⊨","\\vDash",!0),jb(Hb,$b,Zb,"⊪","\\Vvdash",!0),jb(Hb,$b,Zb,"⌣","\\smallsmile"),jb(Hb,$b,Zb,"⌢","\\smallfrown"),jb(Hb,$b,Zb,"≏","\\bumpeq",!0),jb(Hb,$b,Zb,"≎","\\Bumpeq",!0),jb(Hb,$b,Zb,"≧","\\geqq",!0),jb(Hb,$b,Zb,"⩾","\\geqslant",!0),jb(Hb,$b,Zb,"⪖","\\eqslantgtr",!0),jb(Hb,$b,Zb,"≳","\\gtrsim",!0),jb(Hb,$b,Zb,"⪆","\\gtrapprox",!0),jb(Hb,$b,Vb,"⋗","\\gtrdot"),jb(Hb,$b,Zb,"⋙","\\ggg",!0),jb(Hb,$b,Zb,"≷","\\gtrless",!0),jb(Hb,$b,Zb,"⋛","\\gtreqless",!0),jb(Hb,$b,Zb,"⪌","\\gtreqqless",!0),jb(Hb,$b,Zb,"≖","\\eqcirc",!0),jb(Hb,$b,Zb,"≗","\\circeq",!0),jb(Hb,$b,Zb,"≜","\\triangleq",!0),jb(Hb,$b,Zb,"∼","\\thicksim"),jb(Hb,$b,Zb,"≈","\\thickapprox"),jb(Hb,$b,Zb,"⫆","\\supseteqq",!0),jb(Hb,$b,Zb,"⋑","\\Supset",!0),jb(Hb,$b,Zb,"⊐","\\sqsupset",!0),jb(Hb,$b,Zb,"≽","\\succcurlyeq",!0),jb(Hb,$b,Zb,"⋟","\\curlyeqsucc",!0),jb(Hb,$b,Zb,"≿","\\succsim",!0),jb(Hb,$b,Zb,"⪸","\\succapprox",!0),jb(Hb,$b,Zb,"⊳","\\vartriangleright"),jb(Hb,$b,Zb,"⊵","\\trianglerighteq"),jb(Hb,$b,Zb,"⊩","\\Vdash",!0),jb(Hb,$b,Zb,"∣","\\shortmid"),jb(Hb,$b,Zb,"∥","\\shortparallel"),jb(Hb,$b,Zb,"≬","\\between",!0),jb(Hb,$b,Zb,"⋔","\\pitchfork",!0),jb(Hb,$b,Zb,"∝","\\varpropto"),jb(Hb,$b,Zb,"◀","\\blacktriangleleft"),jb(Hb,$b,Zb,"∴","\\therefore",!0),jb(Hb,$b,Zb,"∍","\\backepsilon"),jb(Hb,$b,Zb,"▶","\\blacktriangleright"),jb(Hb,$b,Zb,"∵","\\because",!0),jb(Hb,$b,Zb,"⋘","\\llless"),jb(Hb,$b,Zb,"⋙","\\gggtr"),jb(Hb,$b,Vb,"⊲","\\lhd"),jb(Hb,$b,Vb,"⊳","\\rhd"),jb(Hb,$b,Zb,"≂","\\eqsim",!0),jb(Hb,Fb,Zb,"⋈","\\Join"),jb(Hb,$b,Zb,"≑","\\Doteq",!0),jb(Hb,$b,Vb,"∔","\\dotplus",!0),jb(Hb,$b,Vb,"∖","\\smallsetminus"),jb(Hb,$b,Vb,"⋒","\\Cap",!0),jb(Hb,$b,Vb,"⋓","\\Cup",!0),jb(Hb,$b,Vb,"⩞","\\doublebarwedge",!0),jb(Hb,$b,Vb,"⊟","\\boxminus",!0),jb(Hb,$b,Vb,"⊞","\\boxplus",!0),jb(Hb,$b,Vb,"⋇","\\divideontimes",!0),jb(Hb,$b,Vb,"⋉","\\ltimes",!0),jb(Hb,$b,Vb,"⋊","\\rtimes",!0),jb(Hb,$b,Vb,"⋋","\\leftthreetimes",!0),jb(Hb,$b,Vb,"⋌","\\rightthreetimes",!0),jb(Hb,$b,Vb,"⋏","\\curlywedge",!0),jb(Hb,$b,Vb,"⋎","\\curlyvee",!0),jb(Hb,$b,Vb,"⊝","\\circleddash",!0),jb(Hb,$b,Vb,"⊛","\\circledast",!0),jb(Hb,$b,Vb,"⋅","\\centerdot"),jb(Hb,$b,Vb,"⊺","\\intercal",!0),jb(Hb,$b,Vb,"⋒","\\doublecap"),jb(Hb,$b,Vb,"⋓","\\doublecup"),jb(Hb,$b,Vb,"⊠","\\boxtimes",!0),jb(Hb,$b,Zb,"⇢","\\dashrightarrow",!0),jb(Hb,$b,Zb,"⇠","\\dashleftarrow",!0),jb(Hb,$b,Zb,"⇇","\\leftleftarrows",!0),jb(Hb,$b,Zb,"⇆","\\leftrightarrows",!0),jb(Hb,$b,Zb,"⇚","\\Lleftarrow",!0),jb(Hb,$b,Zb,"↞","\\twoheadleftarrow",!0),jb(Hb,$b,Zb,"↢","\\leftarrowtail",!0),jb(Hb,$b,Zb,"↫","\\looparrowleft",!0),jb(Hb,$b,Zb,"⇋","\\leftrightharpoons",!0),jb(Hb,$b,Zb,"↶","\\curvearrowleft",!0),jb(Hb,$b,Zb,"↺","\\circlearrowleft",!0),jb(Hb,$b,Zb,"↰","\\Lsh",!0),jb(Hb,$b,Zb,"⇈","\\upuparrows",!0),jb(Hb,$b,Zb,"↿","\\upharpoonleft",!0),jb(Hb,$b,Zb,"⇃","\\downharpoonleft",!0),jb(Hb,Fb,Zb,"⊶","\\origof",!0),jb(Hb,Fb,Zb,"⊷","\\imageof",!0),jb(Hb,$b,Zb,"⊸","\\multimap",!0),jb(Hb,$b,Zb,"↭","\\leftrightsquigarrow",!0),jb(Hb,$b,Zb,"⇉","\\rightrightarrows",!0),jb(Hb,$b,Zb,"⇄","\\rightleftarrows",!0),jb(Hb,$b,Zb,"↠","\\twoheadrightarrow",!0),jb(Hb,$b,Zb,"↣","\\rightarrowtail",!0),jb(Hb,$b,Zb,"↬","\\looparrowright",!0),jb(Hb,$b,Zb,"↷","\\curvearrowright",!0),jb(Hb,$b,Zb,"↻","\\circlearrowright",!0),jb(Hb,$b,Zb,"↱","\\Rsh",!0),jb(Hb,$b,Zb,"⇊","\\downdownarrows",!0),jb(Hb,$b,Zb,"↾","\\upharpoonright",!0),jb(Hb,$b,Zb,"⇂","\\downharpoonright",!0),jb(Hb,$b,Zb,"⇝","\\rightsquigarrow",!0),jb(Hb,$b,Zb,"⇝","\\leadsto"),jb(Hb,$b,Zb,"⇛","\\Rrightarrow",!0),jb(Hb,$b,Zb,"↾","\\restriction"),jb(Hb,Fb,ex,"‘","`"),jb(Hb,Fb,ex,"$","\\$"),jb(qb,Fb,ex,"$","\\$"),jb(qb,Fb,ex,"$","\\textdollar"),jb(Hb,Fb,ex,"%","\\%"),jb(qb,Fb,ex,"%","\\%"),jb(Hb,Fb,ex,"_","\\_"),jb(qb,Fb,ex,"_","\\_"),jb(qb,Fb,ex,"_","\\textunderscore"),jb(Hb,Fb,ex,"∠","\\angle",!0),jb(Hb,Fb,ex,"∞","\\infty",!0),jb(Hb,Fb,ex,"′","\\prime"),jb(Hb,Fb,ex,"△","\\triangle"),jb(Hb,Fb,ex,"Γ","\\Gamma",!0),jb(Hb,Fb,ex,"Δ","\\Delta",!0),jb(Hb,Fb,ex,"Θ","\\Theta",!0),jb(Hb,Fb,ex,"Λ","\\Lambda",!0),jb(Hb,Fb,ex,"Ξ","\\Xi",!0),jb(Hb,Fb,ex,"Π","\\Pi",!0),jb(Hb,Fb,ex,"Σ","\\Sigma",!0),jb(Hb,Fb,ex,"Υ","\\Upsilon",!0),jb(Hb,Fb,ex,"Φ","\\Phi",!0),jb(Hb,Fb,ex,"Ψ","\\Psi",!0),jb(Hb,Fb,ex,"Ω","\\Omega",!0),jb(Hb,Fb,ex,"A","Α"),jb(Hb,Fb,ex,"B","Β"),jb(Hb,Fb,ex,"E","Ε"),jb(Hb,Fb,ex,"Z","Ζ"),jb(Hb,Fb,ex,"H","Η"),jb(Hb,Fb,ex,"I","Ι"),jb(Hb,Fb,ex,"K","Κ"),jb(Hb,Fb,ex,"M","Μ"),jb(Hb,Fb,ex,"N","Ν"),jb(Hb,Fb,ex,"O","Ο"),jb(Hb,Fb,ex,"P","Ρ"),jb(Hb,Fb,ex,"T","Τ"),jb(Hb,Fb,ex,"X","Χ"),jb(Hb,Fb,ex,"¬","\\neg",!0),jb(Hb,Fb,ex,"¬","\\lnot"),jb(Hb,Fb,ex,"⊤","\\top"),jb(Hb,Fb,ex,"⊥","\\bot"),jb(Hb,Fb,ex,"∅","\\emptyset"),jb(Hb,$b,ex,"∅","\\varnothing"),jb(Hb,Fb,Wb,"α","\\alpha",!0),jb(Hb,Fb,Wb,"β","\\beta",!0),jb(Hb,Fb,Wb,"γ","\\gamma",!0),jb(Hb,Fb,Wb,"δ","\\delta",!0),jb(Hb,Fb,Wb,"ϵ","\\epsilon",!0),jb(Hb,Fb,Wb,"ζ","\\zeta",!0),jb(Hb,Fb,Wb,"η","\\eta",!0),jb(Hb,Fb,Wb,"θ","\\theta",!0),jb(Hb,Fb,Wb,"ι","\\iota",!0),jb(Hb,Fb,Wb,"κ","\\kappa",!0),jb(Hb,Fb,Wb,"λ","\\lambda",!0),jb(Hb,Fb,Wb,"μ","\\mu",!0),jb(Hb,Fb,Wb,"ν","\\nu",!0),jb(Hb,Fb,Wb,"ξ","\\xi",!0),jb(Hb,Fb,Wb,"ο","\\omicron",!0),jb(Hb,Fb,Wb,"π","\\pi",!0),jb(Hb,Fb,Wb,"ρ","\\rho",!0),jb(Hb,Fb,Wb,"σ","\\sigma",!0),jb(Hb,Fb,Wb,"τ","\\tau",!0),jb(Hb,Fb,Wb,"υ","\\upsilon",!0),jb(Hb,Fb,Wb,"ϕ","\\phi",!0),jb(Hb,Fb,Wb,"χ","\\chi",!0),jb(Hb,Fb,Wb,"ψ","\\psi",!0),jb(Hb,Fb,Wb,"ω","\\omega",!0),jb(Hb,Fb,Wb,"ε","\\varepsilon",!0),jb(Hb,Fb,Wb,"ϑ","\\vartheta",!0),jb(Hb,Fb,Wb,"ϖ","\\varpi",!0),jb(Hb,Fb,Wb,"ϱ","\\varrho",!0),jb(Hb,Fb,Wb,"ς","\\varsigma",!0),jb(Hb,Fb,Wb,"φ","\\varphi",!0),jb(Hb,Fb,Vb,"∗","*",!0),jb(Hb,Fb,Vb,"+","+"),jb(Hb,Fb,Vb,"−","-",!0),jb(Hb,Fb,Vb,"⋅","\\cdot",!0),jb(Hb,Fb,Vb,"∘","\\circ",!0),jb(Hb,Fb,Vb,"÷","\\div",!0),jb(Hb,Fb,Vb,"±","\\pm",!0),jb(Hb,Fb,Vb,"×","\\times",!0),jb(Hb,Fb,Vb,"∩","\\cap",!0),jb(Hb,Fb,Vb,"∪","\\cup",!0),jb(Hb,Fb,Vb,"∖","\\setminus",!0),jb(Hb,Fb,Vb,"∧","\\land"),jb(Hb,Fb,Vb,"∨","\\lor"),jb(Hb,Fb,Vb,"∧","\\wedge",!0),jb(Hb,Fb,Vb,"∨","\\vee",!0),jb(Hb,Fb,ex,"√","\\surd"),jb(Hb,Fb,Xb,"⟨","\\langle",!0),jb(Hb,Fb,Xb,"∣","\\lvert"),jb(Hb,Fb,Xb,"∥","\\lVert"),jb(Hb,Fb,Ub,"?","?"),jb(Hb,Fb,Ub,"!","!"),jb(Hb,Fb,Ub,"⟩","\\rangle",!0),jb(Hb,Fb,Ub,"∣","\\rvert"),jb(Hb,Fb,Ub,"∥","\\rVert"),jb(Hb,Fb,Zb,"=","="),jb(Hb,Fb,Zb,":",":"),jb(Hb,Fb,Zb,"≈","\\approx",!0),jb(Hb,Fb,Zb,"≅","\\cong",!0),jb(Hb,Fb,Zb,"≥","\\ge"),jb(Hb,Fb,Zb,"≥","\\geq",!0),jb(Hb,Fb,Zb,"←","\\gets"),jb(Hb,Fb,Zb,">","\\gt",!0),jb(Hb,Fb,Zb,"∈","\\in",!0),jb(Hb,Fb,Zb,"","\\@not"),jb(Hb,Fb,Zb,"⊂","\\subset",!0),jb(Hb,Fb,Zb,"⊃","\\supset",!0),jb(Hb,Fb,Zb,"⊆","\\subseteq",!0),jb(Hb,Fb,Zb,"⊇","\\supseteq",!0),jb(Hb,$b,Zb,"⊈","\\nsubseteq",!0),jb(Hb,$b,Zb,"⊉","\\nsupseteq",!0),jb(Hb,Fb,Zb,"⊨","\\models"),jb(Hb,Fb,Zb,"←","\\leftarrow",!0),jb(Hb,Fb,Zb,"≤","\\le"),jb(Hb,Fb,Zb,"≤","\\leq",!0),jb(Hb,Fb,Zb,"<","\\lt",!0),jb(Hb,Fb,Zb,"→","\\rightarrow",!0),jb(Hb,Fb,Zb,"→","\\to"),jb(Hb,$b,Zb,"≱","\\ngeq",!0),jb(Hb,$b,Zb,"≰","\\nleq",!0),jb(Hb,Fb,Qb," ","\\ "),jb(Hb,Fb,Qb," ","\\space"),jb(Hb,Fb,Qb," ","\\nobreakspace"),jb(qb,Fb,Qb," ","\\ "),jb(qb,Fb,Qb," "," "),jb(qb,Fb,Qb," ","\\space"),jb(qb,Fb,Qb," ","\\nobreakspace"),jb(Hb,Fb,Qb,null,"\\nobreak"),jb(Hb,Fb,Qb,null,"\\allowbreak"),jb(Hb,Fb,Jb,",",","),jb(Hb,Fb,Jb,";",";"),jb(Hb,$b,Vb,"⊼","\\barwedge",!0),jb(Hb,$b,Vb,"⊻","\\veebar",!0),jb(Hb,Fb,Vb,"⊙","\\odot",!0),jb(Hb,Fb,Vb,"⊕","\\oplus",!0),jb(Hb,Fb,Vb,"⊗","\\otimes",!0),jb(Hb,Fb,ex,"∂","\\partial",!0),jb(Hb,Fb,Vb,"⊘","\\oslash",!0),jb(Hb,$b,Vb,"⊚","\\circledcirc",!0),jb(Hb,$b,Vb,"⊡","\\boxdot",!0),jb(Hb,Fb,Vb,"△","\\bigtriangleup"),jb(Hb,Fb,Vb,"▽","\\bigtriangledown"),jb(Hb,Fb,Vb,"†","\\dagger"),jb(Hb,Fb,Vb,"⋄","\\diamond"),jb(Hb,Fb,Vb,"⋆","\\star"),jb(Hb,Fb,Vb,"◃","\\triangleleft"),jb(Hb,Fb,Vb,"▹","\\triangleright"),jb(Hb,Fb,Xb,"{","\\{"),jb(qb,Fb,ex,"{","\\{"),jb(qb,Fb,ex,"{","\\textbraceleft"),jb(Hb,Fb,Ub,"}","\\}"),jb(qb,Fb,ex,"}","\\}"),jb(qb,Fb,ex,"}","\\textbraceright"),jb(Hb,Fb,Xb,"{","\\lbrace"),jb(Hb,Fb,Ub,"}","\\rbrace"),jb(Hb,Fb,Xb,"[","\\lbrack",!0),jb(qb,Fb,ex,"[","\\lbrack",!0),jb(Hb,Fb,Ub,"]","\\rbrack",!0),jb(qb,Fb,ex,"]","\\rbrack",!0),jb(Hb,Fb,Xb,"(","\\lparen",!0),jb(Hb,Fb,Ub,")","\\rparen",!0),jb(qb,Fb,ex,"<","\\textless",!0),jb(qb,Fb,ex,">","\\textgreater",!0),jb(Hb,Fb,Xb,"⌊","\\lfloor",!0),jb(Hb,Fb,Ub,"⌋","\\rfloor",!0),jb(Hb,Fb,Xb,"⌈","\\lceil",!0),jb(Hb,Fb,Ub,"⌉","\\rceil",!0),jb(Hb,Fb,ex,"\\","\\backslash"),jb(Hb,Fb,ex,"∣","|"),jb(Hb,Fb,ex,"∣","\\vert"),jb(qb,Fb,ex,"|","\\textbar",!0),jb(Hb,Fb,ex,"∥","\\|"),jb(Hb,Fb,ex,"∥","\\Vert"),jb(qb,Fb,ex,"∥","\\textbardbl"),jb(qb,Fb,ex,"~","\\textasciitilde"),jb(qb,Fb,ex,"\\","\\textbackslash"),jb(qb,Fb,ex,"^","\\textasciicircum"),jb(Hb,Fb,Zb,"↑","\\uparrow",!0),jb(Hb,Fb,Zb,"⇑","\\Uparrow",!0),jb(Hb,Fb,Zb,"↓","\\downarrow",!0),jb(Hb,Fb,Zb,"⇓","\\Downarrow",!0),jb(Hb,Fb,Zb,"↕","\\updownarrow",!0),jb(Hb,Fb,Zb,"⇕","\\Updownarrow",!0),jb(Hb,Fb,Yb,"∐","\\coprod"),jb(Hb,Fb,Yb,"⋁","\\bigvee"),jb(Hb,Fb,Yb,"⋀","\\bigwedge"),jb(Hb,Fb,Yb,"⨄","\\biguplus"),jb(Hb,Fb,Yb,"⋂","\\bigcap"),jb(Hb,Fb,Yb,"⋃","\\bigcup"),jb(Hb,Fb,Yb,"∫","\\int"),jb(Hb,Fb,Yb,"∫","\\intop"),jb(Hb,Fb,Yb,"∬","\\iint"),jb(Hb,Fb,Yb,"∭","\\iiint"),jb(Hb,Fb,Yb,"∏","\\prod"),jb(Hb,Fb,Yb,"∑","\\sum"),jb(Hb,Fb,Yb,"⨂","\\bigotimes"),jb(Hb,Fb,Yb,"⨁","\\bigoplus"),jb(Hb,Fb,Yb,"⨀","\\bigodot"),jb(Hb,Fb,Yb,"∮","\\oint"),jb(Hb,Fb,Yb,"∯","\\oiint"),jb(Hb,Fb,Yb,"∰","\\oiiint"),jb(Hb,Fb,Yb,"⨆","\\bigsqcup"),jb(Hb,Fb,Yb,"∫","\\smallint"),jb(qb,Fb,Kb,"…","\\textellipsis"),jb(Hb,Fb,Kb,"…","\\mathellipsis"),jb(qb,Fb,Kb,"…","\\ldots",!0),jb(Hb,Fb,Kb,"…","\\ldots",!0),jb(Hb,Fb,Kb,"⋯","\\@cdots",!0),jb(Hb,Fb,Kb,"⋱","\\ddots",!0),jb(Hb,Fb,ex,"⋮","\\varvdots"),jb(qb,Fb,ex,"⋮","\\varvdots"),jb(Hb,Fb,Gb,"ˊ","\\acute"),jb(Hb,Fb,Gb,"ˋ","\\grave"),jb(Hb,Fb,Gb,"¨","\\ddot"),jb(Hb,Fb,Gb,"~","\\tilde"),jb(Hb,Fb,Gb,"ˉ","\\bar"),jb(Hb,Fb,Gb,"˘","\\breve"),jb(Hb,Fb,Gb,"ˇ","\\check"),jb(Hb,Fb,Gb,"^","\\hat"),jb(Hb,Fb,Gb,"⃗","\\vec"),jb(Hb,Fb,Gb,"˙","\\dot"),jb(Hb,Fb,Gb,"˚","\\mathring"),jb(Hb,Fb,Wb,"","\\@imath"),jb(Hb,Fb,Wb,"","\\@jmath"),jb(Hb,Fb,ex,"ı","ı"),jb(Hb,Fb,ex,"ȷ","ȷ"),jb(qb,Fb,ex,"ı","\\i",!0),jb(qb,Fb,ex,"ȷ","\\j",!0),jb(qb,Fb,ex,"ß","\\ss",!0),jb(qb,Fb,ex,"æ","\\ae",!0),jb(qb,Fb,ex,"œ","\\oe",!0),jb(qb,Fb,ex,"ø","\\o",!0),jb(qb,Fb,ex,"Æ","\\AE",!0),jb(qb,Fb,ex,"Œ","\\OE",!0),jb(qb,Fb,ex,"Ø","\\O",!0),jb(qb,Fb,Gb,"ˊ","\\'"),jb(qb,Fb,Gb,"ˋ","\\`"),jb(qb,Fb,Gb,"ˆ","\\^"),jb(qb,Fb,Gb,"˜","\\~"),jb(qb,Fb,Gb,"ˉ","\\="),jb(qb,Fb,Gb,"˘","\\u"),jb(qb,Fb,Gb,"˙","\\."),jb(qb,Fb,Gb,"¸","\\c"),jb(qb,Fb,Gb,"˚","\\r"),jb(qb,Fb,Gb,"ˇ","\\v"),jb(qb,Fb,Gb,"¨",'\\"'),jb(qb,Fb,Gb,"˝","\\H"),jb(qb,Fb,Gb,"◯","\\textcircled");var tx={"--":!0,"---":!0,"``":!0,"''":!0};jb(qb,Fb,ex,"–","--",!0),jb(qb,Fb,ex,"–","\\textendash"),jb(qb,Fb,ex,"—","---",!0),jb(qb,Fb,ex,"—","\\textemdash"),jb(qb,Fb,ex,"‘","`",!0),jb(qb,Fb,ex,"‘","\\textquoteleft"),jb(qb,Fb,ex,"’","'",!0),jb(qb,Fb,ex,"’","\\textquoteright"),jb(qb,Fb,ex,"“","``",!0),jb(qb,Fb,ex,"“","\\textquotedblleft"),jb(qb,Fb,ex,"”","''",!0),jb(qb,Fb,ex,"”","\\textquotedblright"),jb(Hb,Fb,ex,"°","\\degree",!0),jb(qb,Fb,ex,"°","\\degree"),jb(qb,Fb,ex,"°","\\textdegree",!0),jb(Hb,Fb,ex,"£","\\pounds"),jb(Hb,Fb,ex,"£","\\mathsterling",!0),jb(qb,Fb,ex,"£","\\pounds"),jb(qb,Fb,ex,"£","\\textsterling",!0),jb(Hb,$b,ex,"✠","\\maltese"),jb(qb,$b,ex,"✠","\\maltese");for(var nx='0123456789/@."',rx=0;rx<14;rx++){var ox=nx.charAt(rx);jb(Hb,Fb,ex,ox,ox)}for(var ix='0123456789!@*()-=+";:?/.,',sx=0;sx<25;sx++){var ax=ix.charAt(sx);jb(qb,Fb,ex,ax,ax)}for(var lx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",cx=0;cx<52;cx++){var dx=lx.charAt(cx);jb(Hb,Fb,Wb,dx,dx),jb(qb,Fb,ex,dx,dx)}jb(Hb,$b,ex,"C","ℂ"),jb(qb,$b,ex,"C","ℂ"),jb(Hb,$b,ex,"H","ℍ"),jb(qb,$b,ex,"H","ℍ"),jb(Hb,$b,ex,"N","ℕ"),jb(qb,$b,ex,"N","ℕ"),jb(Hb,$b,ex,"P","ℙ"),jb(qb,$b,ex,"P","ℙ"),jb(Hb,$b,ex,"Q","ℚ"),jb(qb,$b,ex,"Q","ℚ"),jb(Hb,$b,ex,"R","ℝ"),jb(qb,$b,ex,"R","ℝ"),jb(Hb,$b,ex,"Z","ℤ"),jb(qb,$b,ex,"Z","ℤ"),jb(Hb,Fb,Wb,"h","ℎ"),jb(qb,Fb,Wb,"h","ℎ");for(var ux="",hx=0;hx<52;hx++){var px=lx.charAt(hx);jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56320+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56372+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56424+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56580+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56684+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56736+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56788+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56840+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56944+hx)),jb(qb,Fb,ex,px,ux),hx<26&&(jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56632+hx)),jb(qb,Fb,ex,px,ux),jb(Hb,Fb,Wb,px,ux=String.fromCharCode(55349,56476+hx)),jb(qb,Fb,ex,px,ux))}jb(Hb,Fb,Wb,"k",ux=String.fromCharCode(55349,56668)),jb(qb,Fb,ex,"k",ux);for(var fx=0;fx<10;fx++){var mx=fx.toString();jb(Hb,Fb,Wb,mx,ux=String.fromCharCode(55349,57294+fx)),jb(qb,Fb,ex,mx,ux),jb(Hb,Fb,Wb,mx,ux=String.fromCharCode(55349,57314+fx)),jb(qb,Fb,ex,mx,ux),jb(Hb,Fb,Wb,mx,ux=String.fromCharCode(55349,57324+fx)),jb(qb,Fb,ex,mx,ux),jb(Hb,Fb,Wb,mx,ux=String.fromCharCode(55349,57334+fx)),jb(qb,Fb,ex,mx,ux)}for(var _x="ÐÞþ",gx=0;gx<3;gx++){var bx=_x.charAt(gx);jb(Hb,Fb,Wb,bx,bx),jb(qb,Fb,ex,bx,bx)}var xx=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],vx=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],yx=function(e,t,n){return Bb[n][e]&&Bb[n][e].replace&&(e=Bb[n][e].replace),{value:e,metrics:ub(e,t,n)}},wx=function(e,t,n,r,o){var i,s=yx(e,t,n),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===n||r&&"mathit"===r.font)&&(l=0),i=new Rb(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),i=new Rb(e,0,0,0,0,0,o);if(r){i.maxFontSize=r.sizeMultiplier,r.style.isTight()&&i.classes.push("mtight");var c=r.getColor();c&&(i.style.color=c)}return i},kx=(e,t)=>{if(wb(e.classes)!==wb(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},Sx=function(e){for(var t=0,n=0,r=0,o=0;o<e.children.length;o++){var i=e.children[o];i.height>t&&(t=i.height),i.depth>n&&(n=i.depth),i.maxFontSize>r&&(r=i.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Cx=function(e,t,n,r){var o=new zb(e,t,n,r);return Sx(o),o},Mx=(e,t,n,r)=>new zb(e,t,n,r),zx=function(e){var t=new ab(e);return Sx(t),t},Nx=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Ax={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Tx={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Rx={fontMap:Ax,makeSymbol:wx,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&yx(e,"Main-Bold",t).metrics?wx(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Bb[t][e].font?wx(e,"Main-Regular",t,n,r):wx(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Cx,makeSvgSpan:Mx,makeLineSpan:function(e,t,n){var r=Cx([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=yb(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var o=new Nb(e,t,n,r);return Sx(o),o},makeFragment:zx,wrapFragment:function(e,t){return e instanceof ab?Cx([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,o=r,i=1;i<t.length;i++){var s=-t[i].shift-o-t[i].elem.depth,a=s-(t[i-1].elem.height+t[i-1].elem.depth);o+=s,n.push({type:"kern",size:a}),n.push(t[i])}return{children:n,depth:r}}var l;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===e.positionType)l=-e.positionData;else{var h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-h.elem.depth}}return{children:e.children,depth:l}}(e),o=0,i=0;i<n.length;i++){var s=n[i];if("elem"===s.type){var a=s.elem;o=Math.max(o,a.maxFontSize,a.height)}}o+=2;var l=Cx(["pstrut"],[]);l.style.height=yb(o);for(var c=[],d=r,u=r,h=r,p=0;p<n.length;p++){var f=n[p];if("kern"===f.type)h+=f.size;else{var m=f.elem,_=f.wrapperClasses||[],g=f.wrapperStyle||{},b=Cx(_,[l,m],void 0,g);b.style.top=yb(-o-h-m.depth),f.marginLeft&&(b.style.marginLeft=f.marginLeft),f.marginRight&&(b.style.marginRight=f.marginRight),c.push(b),h+=m.height+m.depth}d=Math.min(d,h),u=Math.max(u,h)}var x,v=Cx(["vlist"],c);if(v.style.height=yb(u),d<0){var y=Cx([],[]),w=Cx(["vlist"],[y]);w.style.height=yb(-d);var k=Cx(["vlist-s"],[new Rb("​")]);x=[Cx(["vlist-r"],[v,k]),Cx(["vlist-r"],[w])]}else x=[Cx(["vlist-r"],[v])];var S=Cx(["vlist-t"],x);return 2===x.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,n){var r=e.mode,o=e.text,i=["mord"],s="math"===r||"text"===r&&t.font,a=s?t.font:t.fontFamily,l="",c="";if(55349===o.charCodeAt(0)&&([l,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var o=Math.floor((n-119808)/26);return[xx[o][2],xx[o][r]]}if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return[vx[i][2],vx[i][r]]}if(120485===n||120486===n)return[xx[0][2],xx[0][r]];if(120486<n&&n<120782)return["",""];throw new Bg("Unsupported character: "+e)}(o,r)),l.length>0)return wx(o,l,r,t,i.concat(c));if(a){var d,u;if("boldsymbol"===a){var h=function(e,t,n,r,o){return"textord"!==o&&yx(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,r,0,0,n);d=h.fontName,u=[h.fontClass]}else s?(d=Ax[a].fontName,u=[a]):(d=Nx(a,t.fontWeight,t.fontShape),u=[a,t.fontWeight,t.fontShape]);if(yx(o,d,r).metrics)return wx(o,d,r,t,i.concat(u));if(tx.hasOwnProperty(o)&&"Typewriter"===d.slice(0,10)){for(var p=[],f=0;f<o.length;f++)p.push(wx(o[f],d,r,t,i.concat(u)));return zx(p)}}if("mathord"===n)return wx(o,"Math-Italic",r,t,i.concat(["mathnormal"]));if("textord"===n){var m=Bb[r][o]&&Bb[r][o].font;if("ams"===m){var _=Nx("amsrm",t.fontWeight,t.fontShape);return wx(o,_,r,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==m&&m){var g=Nx(m,t.fontWeight,t.fontShape);return wx(o,g,r,t,i.concat(g,t.fontWeight,t.fontShape))}var b=Nx("textrm",t.fontWeight,t.fontShape);return wx(o,b,r,t,i.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=Cx(["mspace"],[],t),r=vb(e,t);return n.style.marginRight=yb(r),n},staticSvg:function(e,t){var[n,r,o]=Tx[e],i=new Ob(n),s=new Pb([i],{width:yb(r),height:yb(o),style:"width:"+yb(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=Mx(["overlay"],[s],t);return a.height=o,a.style.height=yb(o),a.style.width=yb(r),a},svgData:Tx,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Rb&&r instanceof Rb&&kx(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},Px={number:3,unit:"mu"},Ox={number:4,unit:"mu"},Ex={number:5,unit:"mu"},Lx={mord:{mop:Px,mbin:Ox,mrel:Ex,minner:Px},mop:{mord:Px,mop:Px,mrel:Ex,minner:Px},mbin:{mord:Ox,mop:Ox,mopen:Ox,minner:Ox},mrel:{mord:Ex,mop:Ex,mopen:Ex,minner:Ex},mopen:{},mclose:{mop:Px,mbin:Ox,mrel:Ex,minner:Px},mpunct:{mord:Px,mop:Px,mrel:Ex,mopen:Px,mclose:Px,mpunct:Px,minner:Px},minner:{mord:Px,mop:Px,mbin:Ox,mrel:Ex,mopen:Px,mpunct:Px,minner:Px}},Ix={mord:{mop:Px},mop:{mord:Px,mop:Px},mbin:{},mrel:{},mopen:{},mclose:{mop:Px},mpunct:{},minner:{mop:Px}},Dx={},Bx={},jx={};function Hx(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:s}=e,a={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},l=0;l<n.length;++l)Dx[n[l]]=a;t&&(i&&(Bx[t]=i),s&&(jx[t]=s))}function qx(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Hx({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Fx=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},$x=function(e){return"ordgroup"===e.type?e.body:[e]},Gx=Rx.makeSpan,Vx=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ux=["rightmost","mrel","mclose","mpunct"],Kx={display:tb.DISPLAY,text:tb.TEXT,script:tb.SCRIPT,scriptscript:tb.SCRIPTSCRIPT},Wx={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Yx=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var o=[],i=0;i<e.length;i++){var s=tv(e[i],t);if(s instanceof ab){var a=s.children;o.push(...a)}else o.push(s)}if(Rx.tryCombineChars(o),!n)return o;var l=t;if(1===e.length){var c=e[0];"sizing"===c.type?l=t.havingSize(c.size):"styling"===c.type&&(l=t.havingStyle(Kx[c.style]))}var d=Gx([r[0]||"leftmost"],[],t),u=Gx([r[1]||"rightmost"],[],t),h="root"===n;return Xx(o,(e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&$g.contains(Ux,r)?t.classes[0]="mord":"mbin"===r&&$g.contains(Vx,n)&&(e.classes[0]="mord")},{node:d},u,h),Xx(o,(e,t)=>{var n=Qx(t),r=Qx(e),o=n&&r?e.hasClass("mtight")?Ix[n][r]:Lx[n][r]:null;if(o)return Rx.makeGlue(o,l)},{node:d},u,h),o},Xx=function e(t,n,r,o,i){o&&t.push(o);for(var s=0;s<t.length;s++){var a=t[s],l=Jx(a);if(l)e(l.children,n,r,null,i);else{var c=!a.hasClass("mspace");if(c){var d=n(a,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),s++))}c?r.node=a:i&&a.hasClass("newline")&&(r.node=Gx(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),s++})(s)}}o&&t.pop()},Jx=function(e){return e instanceof ab||e instanceof Nb||e instanceof zb&&e.hasClass("enclosing")?e:null},Zx=function e(t,n){var r=Jx(t);if(r){var o=r.children;if(o.length){if("right"===n)return e(o[o.length-1],"right");if("left"===n)return e(o[0],"left")}}return t},Qx=function(e,t){return e?(t&&(e=Zx(e,t)),Wx[e.classes[0]]||null):null},ev=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Gx(t.concat(n))},tv=function(e,t,n){if(!e)return Gx();if(Bx[e.type]){var r=Bx[e.type](e,t);if(n&&t.size!==n.size){r=Gx(t.sizingClasses(n),[r],t);var o=t.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}throw new Bg("Got group of unknown type: '"+e.type+"'")};function nv(e,t){var n=Gx(["base"],e,t),r=Gx(["strut"]);return r.style.height=yb(n.height+n.depth),n.depth&&(r.style.verticalAlign=yb(-n.depth)),n.children.unshift(r),n}function rv(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,o=Yx(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(r=o.pop());for(var i,s=[],a=[],l=0;l<o.length;l++)if(a.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var c=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,a.push(o[l]),o[l].hasClass("nobreak")&&(c=!0);c||(s.push(nv(a,t)),a=[])}else o[l].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(nv(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(nv(a,t)),n?((i=nv(Yx(n,t,!0))).classes=["tag"],s.push(i)):r&&s.push(r);var d=Gx(["katex-html"],s);if(d.setAttribute("aria-hidden","true"),i){var u=i.children[0];u.style.height=yb(d.height+d.depth),d.depth&&(u.style.verticalAlign=yb(-d.depth))}return d}function ov(e){return new ab(e)}class iv{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=wb(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof sv&&this.children[n+1]instanceof sv){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof sv;)r+=this.children[++n].toText();e.appendChild(new sv(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=$g.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+$g.escape(wb(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map(e=>e.toText()).join("")}}class sv{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $g.escape(this.toText())}toText(){return this.text}}var av={MathNode:iv,TextNode:sv,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",yb(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+yb(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:ov},lv=function(e,t,n){return!Bb[t][e]||!Bb[t][e].replace||55349===e.charCodeAt(0)||tx.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Bb[t][e].replace),new av.TextNode(e)},cv=function(e){return 1===e.length?e[0]:new av.MathNode("mrow",e)},dv=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathsfit"===n)return"sans-serif-italic";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var o=e.text;return $g.contains(["\\imath","\\jmath"],o)?null:(Bb[r][o]&&Bb[r][o].replace&&(o=Bb[r][o].replace),ub(o,Rx.fontMap[n].fontName,r)?Rx.fontMap[n].variant:null)};function uv(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof sv&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var n=e.children[0];return n instanceof sv&&","===n.text}return!1}var hv=function(e,t,n){if(1===e.length){var r=fv(e[0],t);return n&&r instanceof iv&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o,i=[],s=0;s<e.length;s++){var a=fv(e[s],t);if(a instanceof iv&&o instanceof iv){if("mtext"===a.type&&"mtext"===o.type&&a.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...a.children);continue}if("mn"===a.type&&"mn"===o.type){o.children.push(...a.children);continue}if(uv(a)&&"mn"===o.type){o.children.push(...a.children);continue}if("mn"===a.type&&uv(o))a.children=[...o.children,...a.children],i.pop();else if(("msup"===a.type||"msub"===a.type)&&a.children.length>=1&&("mn"===o.type||uv(o))){var l=a.children[0];l instanceof iv&&"mn"===l.type&&(l.children=[...o.children,...l.children],i.pop())}else if("mi"===o.type&&1===o.children.length){var c=o.children[0];if(c instanceof sv&&"̸"===c.text&&("mo"===a.type||"mi"===a.type||"mn"===a.type)){var d=a.children[0];d instanceof sv&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),i.pop())}}}i.push(a),o=a}return i},pv=function(e,t,n){return cv(hv(e,t,n))},fv=function(e,t){if(!e)return new av.MathNode("mrow");if(jx[e.type])return jx[e.type](e,t);throw new Bg("Got group of unknown type: '"+e.type+"'")};function mv(e,t,n,r,o){var i,s=hv(e,n);i=1===s.length&&s[0]instanceof iv&&$g.contains(["mrow","mtable"],s[0].type)?s[0]:new av.MathNode("mrow",s);var a=new av.MathNode("annotation",[new av.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var l=new av.MathNode("semantics",[i,a]),c=new av.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=o?"katex":"katex-mathml";return Rx.makeSpan([d],[c])}var _v=function(e){return new _b({style:e.displayMode?tb.DISPLAY:tb.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},gv=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Rx.makeSpan(n,[e])}return e},bv={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},xv={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},vv=function(e,t,n,r,o){var i,s=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(i=Rx.makeSpan(["stretchy",t],[],o),"fbox"===t){var a=o.color&&o.getColor();a&&(i.style.borderColor=a)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Eb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Eb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Pb(l,{width:"100%",height:yb(s)});i=Rx.makeSvgSpan([],[c],o)}return i.height=s,i.style.height=yb(s),i},yv=function(e){var t=new av.MathNode("mo",[new av.TextNode(bv[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},wv=function(e,t){var{span:n,minWidth:r,height:o}=function(){var n=4e5,r=e.label.slice(1);if($g.contains(["widehat","widecheck","widetilde","utilde"],r)){var o,i,s,a="ordgroup"===(p=e.base).type?p.body.length:1;if(a>5)"widehat"===r||"widecheck"===r?(o=420,n=2364,s=.42,i=r+"4"):(o=312,n=2340,s=.34,i="tilde4");else{var l=[1,1,2,2,3,3][a];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],i=r+l):(n=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],i="tilde"+l)}var c=new Ob(i),d=new Pb([c],{width:"100%",height:yb(s),viewBox:"0 0 "+n+" "+o,preserveAspectRatio:"none"});return{span:Rx.makeSvgSpan([],[d],t),minWidth:0,height:s}}var u,h,p,f=[],m=xv[r],[_,g,b]=m,x=b/1e3,v=_.length;if(1===v)u=["hide-tail"],h=[m[3]];else if(2===v)u=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==v)throw new Error("Correct katexImagesData or update code here to support\n "+v+" children.");u=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var y=0;y<v;y++){var w=new Ob(_[y]),k=new Pb([w],{width:"400em",height:yb(x),viewBox:"0 0 "+n+" "+b,preserveAspectRatio:h[y]+" slice"}),S=Rx.makeSvgSpan([u[y]],[k],t);if(1===v)return{span:S,minWidth:g,height:x};S.style.height=yb(x),f.push(S)}return{span:Rx.makeSpan(["stretchy"],f,t),minWidth:g,height:x}}();return n.height=o,n.style.height=yb(o),r>0&&(n.style.minWidth=yb(r)),n};function kv(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Sv(e){var t=Cv(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Cv(e){return e&&("atom"===e.type||Db.hasOwnProperty(e.type))?e:null}var Mv=(e,t)=>{var n,r,o;e&&"supsub"===e.type?(n=(r=kv(e.base,"accent")).base,e.base=n,o=function(e){if(e instanceof zb)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(tv(e,t)),e.base=r):n=(r=kv(e,"accent")).base;var i=tv(n,t.havingCrampedStyle()),s=0;if(r.isShifty&&$g.isCharacterBox(n)){var a=$g.getBaseElem(n);s=Lb(tv(a,t.havingCrampedStyle())).skew}var l,c="\\c"===r.label,d=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(r.isStretchy)l=wv(r,t),l=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+yb(2*s)+")",marginLeft:yb(2*s)}:void 0}]},t);else{var u,h;"\\vec"===r.label?(u=Rx.staticSvg("vec",t),h=Rx.svgData.vec[1]):((u=Lb(u=Rx.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,h=u.width,c&&(d+=u.depth)),l=Rx.makeSpan(["accent-body"],[u]);var p="\\textcircled"===r.label;p&&(l.classes.push("accent-full"),d=i.height);var f=s;p||(f-=h/2),l.style.left=yb(f),"\\textcircled"===r.label&&(l.style.top=".2em"),l=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-d},{type:"elem",elem:l}]},t)}var m=Rx.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},zv=(e,t)=>{var n=e.isStretchy?yv(e.label):new av.MathNode("mo",[lv(e.label,e.mode)]),r=new av.MathNode("mover",[fv(e.base,t),n]);return r.setAttribute("accent","true"),r},Nv=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Hx({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Fx(t[0]),r=!Nv.test(e.funcName),o=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Mv,mathmlBuilder:zv}),Hx({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Mv,mathmlBuilder:zv}),Hx({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(e,t)=>{var n=tv(e.base,t),r=wv(e,t),o="\\utilde"===e.label?.12:0,i=Rx.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},t);return Rx.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=yv(e.label),r=new av.MathNode("munder",[fv(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Av=e=>{var t=new av.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Hx({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:o}=e;return{type:"xArrow",mode:r.mode,label:o,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,o=t.havingStyle(r.sup()),i=Rx.wrapFragment(tv(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(r.sub()),(n=Rx.wrapFragment(tv(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=wv(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,d=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=i.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*l.height+.111;a=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d},{type:"elem",elem:l,shift:c},{type:"elem",elem:n,shift:u}]},t)}else a=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:d},{type:"elem",elem:l,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),Rx.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var n,r=yv(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=Av(fv(e.body,t));if(e.below){var i=Av(fv(e.below,t));n=new av.MathNode("munderover",[r,i,o])}else n=new av.MathNode("mover",[r,o])}else if(e.below){var s=Av(fv(e.below,t));n=new av.MathNode("munder",[r,s])}else n=Av(),n=new av.MathNode("mover",[r,n]);return n}});var Tv=Rx.makeSpan;function Rv(e,t){var n=Yx(e.body,t,!0);return Tv([e.mclass],n,t)}function Pv(e,t){var n,r=hv(e.body,t);return"minner"===e.mclass?n=new av.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new av.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new av.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Hx({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:$x(o),isCharacterBox:$g.isCharacterBox(o)}},htmlBuilder:Rv,mathmlBuilder:Pv});var Ov=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Hx({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Ov(t[0]),body:$x(t[1]),isCharacterBox:$g.isCharacterBox(t[1])}}}),Hx({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:o}=e,i=t[1],s=t[0];n="\\stackrel"!==o?Ov(i):"mrel";var a={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:$x(i)},l={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===o?null:s,sub:"\\underset"===o?s:null};return{type:"mclass",mode:r.mode,mclass:n,body:[l],isCharacterBox:$g.isCharacterBox(l)}},htmlBuilder:Rv,mathmlBuilder:Pv}),Hx({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Ov(t[0]),body:$x(t[0])}},htmlBuilder(e,t){var n=Yx(e.body,t,!0),r=Rx.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=hv(e.body,t),r=new av.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Ev={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Lv=()=>({type:"styling",body:[],mode:"math",style:"display"}),Iv=e=>"textord"===e.type&&"@"===e.text,Dv=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function Bv(e,t,n){var r=Ev[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:r,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[o],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Hx({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Rx.wrapFragment(tv(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=yb(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new av.MathNode("mrow",[fv(e.label,t)]);return(n=new av.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new av.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),Hx({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Rx.wrapFragment(tv(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new av.MathNode("mrow",[fv(e.fragment,t)])}),Hx({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=kv(t[0],"ordgroup").body,o="",i=0;i<r.length;i++){o+=kv(r[i],"textord").text}var s,a=parseInt(o);if(isNaN(a))throw new Bg("\\@char has non-numeric argument "+o);if(a<0||a>=1114111)throw new Bg("\\@char with invalid code point "+o);return a<=65535?s=String.fromCharCode(a):(a-=65536,s=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:n.mode,text:s}}});var jv=(e,t)=>{var n=Yx(e.body,t.withColor(e.color),!1);return Rx.makeFragment(n)},Hv=(e,t)=>{var n=hv(e.body,t.withColor(e.color)),r=new av.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Hx({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=kv(t[0],"color-token").color,o=t[1];return{type:"color",mode:n.mode,color:r,body:$x(o)}},htmlBuilder:jv,mathmlBuilder:Hv}),Hx({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,o=kv(t[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var i=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:i}},htmlBuilder:jv,mathmlBuilder:Hv}),Hx({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,o="["===r.gullet.future().text?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:o&&kv(o,"size").value}},htmlBuilder(e,t){var n=Rx.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=yb(vb(e.size,t)))),n},mathmlBuilder(e,t){var n=new av.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",yb(vb(e.size,t)))),n}});var qv={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Fv=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Bg("Expected a control sequence",e);return t},$v=(e,t,n,r)=>{var o=e.gullet.macros.get(n.text);null==o&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,o,r)};Hx({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(qv[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=qv[r.text]),kv(t.parseFunction(),"internal");throw new Bg("Invalid token after macro prefix",r)}}),Hx({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Bg("Expected a control sequence",r);for(var i,s=0,a=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=t.gullet.future(),a[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Bg('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Bg('Argument number "'+r.text+'" out of order');s++,a.push([])}else{if("EOF"===r.text)throw new Bg("Expected a macro definition");a[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return i&&l.unshift(i),"\\edef"!==n&&"\\xdef"!==n||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:s,delimiters:a},n===qv[n]),{type:"internal",mode:t.mode}}}),Hx({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Fv(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return $v(t,r,o,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Hx({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Fv(t.gullet.popToken()),o=t.gullet.popToken(),i=t.gullet.popToken();return $v(t,r,i,"\\\\globalfuture"===n),t.gullet.pushToken(i),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var Gv=function(e,t,n){var r=ub(Bb.math[e]&&Bb.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Vv=function(e,t,n,r){var o=n.havingBaseStyle(t),i=Rx.makeSpan(r.concat(o.sizingClasses(n)),[e],n),s=o.sizeMultiplier/n.sizeMultiplier;return i.height*=s,i.depth*=s,i.maxFontSize=o.sizeMultiplier,i},Uv=function(e,t,n){var r=t.havingBaseStyle(n),o=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=yb(o),e.height-=o,e.depth+=o},Kv=function(e,t,n,r,o,i){var s=function(e,t,n,r){return Rx.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,o,r),a=Vv(Rx.makeSpan(["delimsizing","size"+t],[s],r),tb.TEXT,r,i);return n&&Uv(a,r,tb.TEXT),a},Wv=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Rx.makeSpan(["delimsizinginner",r],[Rx.makeSpan([],[Rx.makeSymbol(e,t,n)])])}},Yv=function(e,t,n){var r=lb["Size4-Regular"][e.charCodeAt(0)]?lb["Size4-Regular"][e.charCodeAt(0)][4]:lb["Size1-Regular"][e.charCodeAt(0)][4],o=new Ob("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new Pb([o],{width:yb(r),height:yb(t),style:"width:"+yb(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=Rx.makeSvgSpan([],[i],n);return s.height=t,s.style.height=yb(t),s.style.width=yb(r),{type:"elem",elem:s}},Xv={type:"kern",size:-.008},Jv=["|","\\lvert","\\rvert","\\vert"],Zv=["\\|","\\lVert","\\rVert","\\Vert"],Qv=function(e,t,n,r,o,i){var s,a,l,c,d="",u=0;s=l=c=e,a=null;var h="Size1-Regular";"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?s=l="⏐":"\\Downarrow"===e?s=l="‖":"\\updownarrow"===e?(s="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(s="\\Uparrow",l="‖",c="\\Downarrow"):$g.contains(Jv,e)?(l="∣",d="vert",u=333):$g.contains(Zv,e)?(l="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(s="⎡",l="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(s="⎤",l="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=s="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(s="⎡",l=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=s="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(s="⎤",l=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(s="⎛",l="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(s="⎞",l="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(s="⎧",a="⎨",c="⎩",l="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(s="⎫",a="⎬",c="⎭",l="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(s="⎧",c="⎩",l="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(s="⎫",c="⎭",l="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(s="⎧",c="⎭",l="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(s="⎫",c="⎩",l="⎪",h="Size4-Regular");var p=Gv(s,h,o),f=p.height+p.depth,m=Gv(l,h,o),_=m.height+m.depth,g=Gv(c,h,o),b=g.height+g.depth,x=0,v=1;if(null!==a){var y=Gv(a,h,o);x=y.height+y.depth,v=2}var w=f+b+x,k=w+Math.max(0,Math.ceil((t-w)/(v*_)))*v*_,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var C=k/2-S,M=[];if(d.length>0){var z=k-f-b,N=Math.round(1e3*k),A=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*z)),T=new Ob(d,A),R=(u/1e3).toFixed(3)+"em",P=(N/1e3).toFixed(3)+"em",O=new Pb([T],{width:R,height:P,viewBox:"0 0 "+u+" "+N}),E=Rx.makeSvgSpan([],[O],r);E.height=N/1e3,E.style.width=R,E.style.height=P,M.push({type:"elem",elem:E})}else{if(M.push(Wv(c,h,o)),M.push(Xv),null===a){var L=k-f-b+.016;M.push(Yv(l,L,r))}else{var I=(k-f-b-x)/2+.016;M.push(Yv(l,I,r)),M.push(Xv),M.push(Wv(a,h,o)),M.push(Xv),M.push(Yv(l,I,r))}M.push(Xv),M.push(Wv(s,h,o))}var D=r.havingBaseStyle(tb.TEXT),B=Rx.makeVList({positionType:"bottom",positionData:C,children:M},D);return Vv(Rx.makeSpan(["delimsizing","mult"],[B],D),tb.TEXT,r,i)},ey=.08,ty=function(e,t,n,r,o){var i=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ib);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ib);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,ib);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,ib);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,ib);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,ib,n)}return r}(e,r,n),s=new Ob(e,i),a=new Pb([s],{width:"400em",height:yb(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Rx.makeSvgSpan(["hide-tail"],[a],o)},ny=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ry=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],oy=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],iy=[0,1.2,1.8,2.4,3],sy=[{type:"small",style:tb.SCRIPTSCRIPT},{type:"small",style:tb.SCRIPT},{type:"small",style:tb.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ay=[{type:"small",style:tb.SCRIPTSCRIPT},{type:"small",style:tb.SCRIPT},{type:"small",style:tb.TEXT},{type:"stack"}],ly=[{type:"small",style:tb.SCRIPTSCRIPT},{type:"small",style:tb.SCRIPT},{type:"small",style:tb.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],cy=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},dy=function(e,t,n,r){for(var o=Math.min(2,3-r.style.size);o<n.length&&"stack"!==n[o].type;o++){var i=Gv(e,cy(n[o]),"math"),s=i.height+i.depth;if("small"===n[o].type&&(s*=r.havingBaseStyle(n[o].style).sizeMultiplier),s>t)return n[o]}return n[n.length-1]},uy=function(e,t,n,r,o,i){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=$g.contains(oy,e)?sy:$g.contains(ny,e)?ly:ay;var a=dy(e,t,s,r);return"small"===a.type?function(e,t,n,r,o,i){var s=Rx.makeSymbol(e,"Main-Regular",o,r),a=Vv(s,t,r,i);return n&&Uv(a,r,t),a}(e,a.style,n,r,o,i):"large"===a.type?Kv(e,a.size,n,r,o,i):Qv(e,t,n,r,o,i)},hy={sqrtImage:function(e,t){var n,r,o=t.havingBaseSizing(),i=dy("\\surd",e*o.sizeMultiplier,ly,o),s=o.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,c=0,d=0;return"small"===i.type?(e<1?s=1:e<1.4&&(s=.7),c=(1+a)/s,(n=ty("sqrtMain",l=(1+a+ey)/s,d=1e3+1e3*a+80,a,t)).style.minWidth="0.853em",r=.833/s):"large"===i.type?(d=1080*iy[i.size],c=(iy[i.size]+a)/s,l=(iy[i.size]+a+ey)/s,(n=ty("sqrtSize"+i.size,l,d,a,t)).style.minWidth="1.02em",r=1/s):(l=e+a+ey,c=e+a,d=Math.floor(1e3*e+a)+80,(n=ty("sqrtTall",l,d,a,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=yb(l),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},sizedDelim:function(e,t,n,r,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),$g.contains(ny,e)||$g.contains(oy,e))return Kv(e,t,!1,n,r,o);if($g.contains(ry,e))return Qv(e,iy[t],!1,n,r,o);throw new Bg("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:iy,customSizedDelim:uy,leftRightDelim:function(e,t,n,r,o,i){var s=r.fontMetrics().axisHeight*r.sizeMultiplier,a=5/r.fontMetrics().ptPerEm,l=Math.max(t-s,n+s),c=Math.max(l/500*901,2*l-a);return uy(e,c,!0,r,o,i)}},py={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},fy=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function my(e,t){var n=Cv(e);if(n&&$g.contains(fy,n.text))return n;throw new Bg(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function _y(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Hx({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=my(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:py[e.funcName].size,mclass:py[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Rx.makeSpan([e.mclass]):hy.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(lv(e.delim,e.mode));var n=new av.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=yb(hy.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),Hx({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Bg("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:my(t[0],e).text,color:n}}}),Hx({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=my(t[0],e),r=e.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=kv(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{_y(e);for(var n,r,o=Yx(e.body,t,!0,["mopen","mclose"]),i=0,s=0,a=!1,l=0;l<o.length;l++)o[l].isMiddle?a=!0:(i=Math.max(o[l].height,i),s=Math.max(o[l].depth,s));if(i*=t.sizeMultiplier,s*=t.sizeMultiplier,n="."===e.left?ev(t,["mopen"]):hy.leftRightDelim(e.left,i,s,t,e.mode,["mopen"]),o.unshift(n),a)for(var c=1;c<o.length;c++){var d=o[c].isMiddle;d&&(o[c]=hy.leftRightDelim(d.delim,i,s,d.options,e.mode,[]))}if("."===e.right)r=ev(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;r=hy.leftRightDelim(e.right,i,s,u,e.mode,["mclose"])}return o.push(r),Rx.makeSpan(["minner"],o,t)},mathmlBuilder:(e,t)=>{_y(e);var n=hv(e.body,t);if("."!==e.left){var r=new av.MathNode("mo",[lv(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var o=new av.MathNode("mo",[lv(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),n.push(o)}return cv(n)}}),Hx({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=my(t[0],e);if(!e.parser.leftrightDepth)throw new Bg("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=ev(t,[]);else{n=hy.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?lv("|","text"):lv(e.delim,e.mode),r=new av.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var gy=(e,t)=>{var n,r,o,i=Rx.wrapFragment(tv(e.body,t),t),s=e.label.slice(1),a=t.sizeMultiplier,l=0,c=$g.isCharacterBox(e.body);if("sout"===s)(n=Rx.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,l=-.5*t.fontMetrics().xHeight;else if("phase"===s){var d=vb({number:.6,unit:"pt"},t),u=vb({number:.35,unit:"ex"},t);a/=t.havingBaseSizing().sizeMultiplier;var h=i.height+i.depth+d+u;i.style.paddingLeft=yb(h/2+d);var p=Math.floor(1e3*h*a),f="M400000 "+(r=p)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",m=new Pb([new Ob("phase",f)],{width:"400em",height:yb(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});(n=Rx.makeSvgSpan(["hide-tail"],[m],t)).style.height=yb(h),l=i.depth+d+u}else{/cancel/.test(s)?c||i.classes.push("cancel-pad"):"angl"===s?i.classes.push("anglpad"):i.classes.push("boxpad");var _=0,g=0,b=0;/box/.test(s)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=_=t.fontMetrics().fboxsep+("colorbox"===s?0:b)):"angl"===s?(_=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),g=Math.max(0,.25-i.depth)):g=_=c?.2:0,n=vv(i,s,_,g,t),/fbox|boxed|fcolorbox/.test(s)?(n.style.borderStyle="solid",n.style.borderWidth=yb(b)):"angl"===s&&.049!==b&&(n.style.borderTopWidth=yb(b),n.style.borderRightWidth=yb(b)),l=i.depth+g,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)o=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:l},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(s)?["svg-align"]:[];o=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:n,shift:l,wrapperClasses:x}]},t)}return/cancel/.test(s)&&(o.height=i.height,o.depth=i.depth),/cancel/.test(s)&&!c?Rx.makeSpan(["mord","cancel-lap"],[o],t):Rx.makeSpan(["mord"],[o],t)},by=(e,t)=>{var n=0,r=new av.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[fv(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Hx({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=kv(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:i,body:s}},htmlBuilder:gy,mathmlBuilder:by}),Hx({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:o}=e,i=kv(t[0],"color-token").color,s=kv(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:s,borderColor:i,body:a}},htmlBuilder:gy,mathmlBuilder:by}),Hx({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),Hx({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:gy,mathmlBuilder:by}),Hx({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var xy={};function vy(e){for(var{type:t,names:n,props:r,handler:o,htmlBuilder:i,mathmlBuilder:s}=e,a={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l<n.length;++l)xy[n[l]]=a;i&&(Bx[t]=i),s&&(jx[t]=s)}var yy={};function wy(e,t){yy[e]=t}function ky(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var Sy=e=>{if(!e.parser.settings.displayMode)throw new Bg("{"+e.envName+"} can be used only in display mode.")};function Cy(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function My(e,t,n){var{hskipBeforeAndAfter:r,addJot:o,cols:i,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var p=e.gullet.expandMacroAsText("\\arraystretch");if(null==p)s=1;else if(!(s=parseFloat(p))||s<0)throw new Bg("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var f=[],m=[f],_=[],g=[],b=null!=l?[]:void 0;function x(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function v(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new Dg("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),g.push(ky(e));;){var y=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),y={type:"ordgroup",mode:e.mode,body:y},n&&(y={type:"styling",mode:e.mode,style:n,body:[y]}),f.push(y);var w=e.fetch().text;if("&"===w){if(u&&f.length===u){if(c||a)throw new Bg("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===w){v(),1===f.length&&"styling"===y.type&&0===y.body[0].body.length&&(m.length>1||!d)&&m.pop(),g.length<m.length+1&&g.push([]);break}if("\\\\"!==w)throw new Bg("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),_.push(k?k.value:null),v(),g.push(ky(e)),f=[],m.push(f),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:m,cols:i,rowGaps:_,hskipBeforeAndAfter:r,hLinesBeforeRow:g,colSeparationType:a,tags:b,leqno:h}}function zy(e){return"d"===e.slice(0,1)?"display":"text"}var Ny=function(e,t){var n,r,o=e.body.length,i=e.hLinesBeforeRow,s=0,a=new Array(o),l=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(tb.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?vb({number:3,unit:"ex"},t):12*d,p=3*d,f=e.arraystretch*h,m=.7*f,_=.3*f,g=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(g+=.25),l.push({pos:g,isDashed:e[t]})}for(b(i[0]),n=0;n<e.body.length;++n){var x=e.body[n],v=m,y=_;s<x.length&&(s=x.length);var w=new Array(x.length);for(r=0;r<x.length;++r){var k=tv(x[r],t);y<k.depth&&(y=k.depth),v<k.height&&(v=k.height),w[r]=k}var S=e.rowGaps[n],C=0;S&&(C=vb(S,t))>0&&(y<(C+=_)&&(y=C),C=0),e.addJot&&(y+=p),w.height=v,w.depth=y,g+=v,w.pos=g,g+=y+C,a[n]=w,b(i[n+1])}var M,z,N=g/2+t.fontMetrics().axisHeight,A=e.cols||[],T=[],R=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<o;++n){var P=a[n],O=P.pos-N,E=e.tags[n],L=void 0;(L=!0===E?Rx.makeSpan(["eqn-num"],[],t):!1===E?Rx.makeSpan([],[],t):Rx.makeSpan([],Yx(E,t,!0),t)).depth=P.depth,L.height=P.height,R.push({type:"elem",elem:L,shift:O})}for(r=0,z=0;r<s||z<A.length;++r,++z){for(var I=A[z]||{},D=!0;"separator"===I.type;){if(D||((M=Rx.makeSpan(["arraycolsep"],[])).style.width=yb(t.fontMetrics().doubleRuleSep),T.push(M)),"|"!==I.separator&&":"!==I.separator)throw new Bg("Invalid separator type: "+I.separator);var B="|"===I.separator?"solid":"dashed",j=Rx.makeSpan(["vertical-separator"],[],t);j.style.height=yb(g),j.style.borderRightWidth=yb(c),j.style.borderRightStyle=B,j.style.margin="0 "+yb(-c/2);var H=g-N;H&&(j.style.verticalAlign=yb(-H)),T.push(j),I=A[++z]||{},D=!1}if(!(r>=s)){var q=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(q=$g.deflt(I.pregap,u))&&((M=Rx.makeSpan(["arraycolsep"],[])).style.width=yb(q),T.push(M));var F=[];for(n=0;n<o;++n){var $=a[n],G=$[r];if(G){var V=$.pos-N;G.depth=$.depth,G.height=$.height,F.push({type:"elem",elem:G,shift:V})}}F=Rx.makeVList({positionType:"individualShift",children:F},t),F=Rx.makeSpan(["col-align-"+(I.align||"c")],[F]),T.push(F),(r<s-1||e.hskipBeforeAndAfter)&&0!==(q=$g.deflt(I.postgap,u))&&((M=Rx.makeSpan(["arraycolsep"],[])).style.width=yb(q),T.push(M))}}if(a=Rx.makeSpan(["mtable"],T),l.length>0){for(var U=Rx.makeLineSpan("hline",t,c),K=Rx.makeLineSpan("hdashline",t,c),W=[{type:"elem",elem:a,shift:0}];l.length>0;){var Y=l.pop(),X=Y.pos-N;Y.isDashed?W.push({type:"elem",elem:K,shift:X}):W.push({type:"elem",elem:U,shift:X})}a=Rx.makeVList({positionType:"individualShift",children:W},t)}if(0===R.length)return Rx.makeSpan(["mord"],[a],t);var J=Rx.makeVList({positionType:"individualShift",children:R},t);return J=Rx.makeSpan(["tag"],[J],t),Rx.makeFragment([a,J])},Ay={c:"center ",l:"left ",r:"right "},Ty=function(e,t){for(var n=[],r=new av.MathNode("mtd",[],["mtr-glue"]),o=new av.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var s=e.body[i],a=[],l=0;l<s.length;l++)a.push(new av.MathNode("mtd",[fv(s[l],t)]));e.tags&&e.tags[i]&&(a.unshift(r),a.push(r),e.leqno?a.unshift(o):a.push(o)),n.push(new av.MathNode("mtr",a))}var c=new av.MathNode("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",yb(d));var u="",h="";if(e.cols&&e.cols.length>0){var p=e.cols,f="",m=!1,_=0,g=p.length;"separator"===p[0].type&&(u+="top ",_=1),"separator"===p[p.length-1].type&&(u+="bottom ",g-=1);for(var b=_;b<g;b++)"align"===p[b].type?(h+=Ay[p[b].align],m&&(f+="none "),m=!0):"separator"===p[b].type&&m&&(f+="|"===p[b].separator?"solid ":"dashed ",m=!1);c.setAttribute("columnalign",h.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===e.colSeparationType){for(var x=e.cols||[],v="",y=1;y<x.length;y++)v+=y%2?"0em ":"1em ";c.setAttribute("columnspacing",v.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var w="",k=e.hLinesBeforeRow;u+=k[0].length>0?"left ":"",u+=k[k.length-1].length>0?"right ":"";for(var S=1;S<k.length-1;S++)w+=0===k[S].length?"none ":k[S][0]?"dashed ":"solid ";return/[sd]/.test(w)&&c.setAttribute("rowlines",w.trim()),""!==u&&(c=new av.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new av.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Ry=function(e,t){-1===e.envName.indexOf("ed")&&Sy(e);var n,r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",i="split"===e.envName,s=My(e.parser,{cols:r,addJot:!0,autoTag:i?void 0:Cy(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",d=0;d<t[0].body.length;d++){c+=kv(t[0].body[d],"textord").text}n=Number(c),a=2*n}var u=!a;s.body.forEach(function(e){for(var t=1;t<e.length;t+=2){var r=kv(e[t],"styling");kv(r.body[0],"ordgroup").body.unshift(l)}if(u)a<e.length&&(a=e.length);else{var o=e.length/2;if(n<o)throw new Bg("Too many math in a row: expected "+n+", but got "+o,e[0])}});for(var h=0;h<a;++h){var p="r",f=0;h%2==1?p="l":h>0&&u&&(f=1),r[h]={type:"align",align:p,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};vy({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(Cv(t[0])?[t[0]]:kv(t[0],"ordgroup").body).map(function(e){var t=Sv(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Bg("Unknown column alignment: "+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return My(e.parser,r,zy(e.envName))},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,-1==="lcr".indexOf(n))throw new Bg("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var i=My(e.parser,r,zy(e.envName)),s=Math.max(0,...i.body.map(e=>e.length));return i.cols=new Array(s).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=My(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(Cv(t[0])?[t[0]]:kv(t[0],"ordgroup").body).map(function(e){var t=Sv(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Bg("Unknown column alignment: "+t,e)});if(n.length>1)throw new Bg("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=My(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Bg("{subarray} can contain only one column");return r},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=My(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},zy(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ry,htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){$g.contains(["gather","gather*"],e.envName)&&Sy(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Cy(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return My(e.parser,t,"display")},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ry,htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Sy(e);var t={autoTag:Cy(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return My(e.parser,t,"display")},htmlBuilder:Ny,mathmlBuilder:Ty}),vy({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Sy(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Bg("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r=[],o=[r],i=0;i<t.length;i++){for(var s=t[i],a=Lv(),l=0;l<s.length;l++)if(Iv(s[l])){r.push(a);var c=Sv(s[l+=1]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(c)>-1);else{if(!("<>AV".indexOf(c)>-1))throw new Bg('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var h=!0,p=l+1;p<s.length;p++){if(Dv(s[p],c)){h=!1,l=p;break}if(Iv(s[p]))throw new Bg("Missing a "+c+" character to complete a CD arrow.",s[p]);d[u].body.push(s[p])}if(h)throw new Bg("Missing a "+c+" character to complete a CD arrow.",s[l])}}var f={type:"styling",body:[Bv(c,d,e)],mode:"math",style:"display"};r.push(f),a=Lv()}else a.body.push(s[l]);i%2==0?r.push(a):r.shift(),r=[],o.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)),htmlBuilder:Ny,mathmlBuilder:Ty}),wy("\\nonumber","\\gdef\\@eqnsw{0}"),wy("\\notag","\\nonumber"),Hx({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Bg(e.funcName+" valid only within array environment")}});var Py=xy;Hx({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];if("ordgroup"!==o.type)throw new Bg("Invalid environment name",o);for(var i="",s=0;s<o.body.length;++s)i+=kv(o.body[s],"textord").text;if("\\begin"===r){if(!Py.hasOwnProperty(i))throw new Bg("No such environment: "+i,o);var a=Py[i],{args:l,optArgs:c}=n.parseArguments("\\begin{"+i+"}",a),d={mode:n.mode,envName:i,parser:n},u=a.handler(d,l,c);n.expect("\\end",!1);var h=n.nextToken,p=kv(n.parseFunction(),"environment");if(p.name!==i)throw new Bg("Mismatch: \\begin{"+i+"} matched by \\end{"+p.name+"}",h);return u}return{type:"environment",mode:n.mode,name:i,nameGroup:o}}});var Oy=(e,t)=>{var n=e.font,r=t.withFont(n);return tv(e.body,r)},Ey=(e,t)=>{var n=e.font,r=t.withFont(n);return fv(e.body,r)},Ly={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Hx({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=Fx(t[0]),i=r;return i in Ly&&(i=Ly[i]),{type:"font",mode:n.mode,font:i.slice(1),body:o}},htmlBuilder:Oy,mathmlBuilder:Ey}),Hx({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],o=$g.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Ov(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}}),Hx({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:o}=e,{mode:i}=n,s=n.parseExpression(!0,o);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:s}}},htmlBuilder:Oy,mathmlBuilder:Ey});var Iy=(e,t)=>{var n=t;return"display"===e?n=n.id>=tb.SCRIPT.id?n.text():tb.DISPLAY:"text"===e&&n.size===tb.DISPLAY.size?n=tb.TEXT:"script"===e?n=tb.SCRIPT:"scriptscript"===e&&(n=tb.SCRIPTSCRIPT),n},Dy=(e,t)=>{var n,r=Iy(e.size,t.style),o=r.fracNum(),i=r.fracDen();n=t.havingStyle(o);var s=tv(e.numer,n,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}n=t.havingStyle(i);var c,d,u,h,p,f,m,_,g,b,x=tv(e.denom,n,t);if(e.hasBarLine?(e.barSize?(d=vb(e.barSize,t),c=Rx.makeLineSpan("frac-line",t,d)):c=Rx.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),r.size===tb.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,p=d>0?3*u:7*u,f=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,p=u):(h=t.fontMetrics().num3,p=3*u),f=t.fontMetrics().denom2),c){var v=t.fontMetrics().axisHeight;h-s.depth-(v+.5*d)<p&&(h+=p-(h-s.depth-(v+.5*d))),v-.5*d-(x.height-f)<p&&(f+=p-(v-.5*d-(x.height-f)));var y=-(v-.5*d);m=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:c,shift:y},{type:"elem",elem:s,shift:-h}]},t)}else{var w=h-s.depth-(x.height-f);w<p&&(h+=.5*(p-w),f+=.5*(p-w)),m=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:x,shift:f},{type:"elem",elem:s,shift:-h}]},t)}return n=t.havingStyle(r),m.height*=n.sizeMultiplier/t.sizeMultiplier,m.depth*=n.sizeMultiplier/t.sizeMultiplier,_=r.size===tb.DISPLAY.size?t.fontMetrics().delim1:r.size===tb.SCRIPTSCRIPT.size?t.havingStyle(tb.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,g=null==e.leftDelim?ev(t,["mopen"]):hy.customSizedDelim(e.leftDelim,_,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?Rx.makeSpan([]):null==e.rightDelim?ev(t,["mclose"]):hy.customSizedDelim(e.rightDelim,_,!0,t.havingStyle(r),e.mode,["mclose"]),Rx.makeSpan(["mord"].concat(n.sizingClasses(t)),[g,Rx.makeSpan(["mfrac"],[m]),b],t)},By=(e,t)=>{var n=new av.MathNode("mfrac",[fv(e.numer,t),fv(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=vb(e.barSize,t);n.setAttribute("linethickness",yb(r))}}else n.setAttribute("linethickness","0px");var o=Iy(e.size,t.style);if(o.size!==t.style.size){n=new av.MathNode("mstyle",[n]);var i=o.size===tb.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",i),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var s=[];if(null!=e.leftDelim){var a=new av.MathNode("mo",[new av.TextNode(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(n),null!=e.rightDelim){var l=new av.MathNode("mo",[new av.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return cv(s)}return n};Hx({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:o}=e,i=t[0],s=t[1],a=null,l=null,c="auto";switch(o){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,a="(",l=")";break;case"\\\\bracefrac":n=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":n=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(o){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:s,hasBarLine:n,leftDelim:a,rightDelim:l,size:c,barSize:null}},htmlBuilder:Dy,mathmlBuilder:By}),Hx({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Hx({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:o}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:o}}});var jy=["display","text","script","scriptscript"],Hy=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Hx({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,o=t[4],i=t[5],s=Fx(t[0]),a="atom"===s.type&&"open"===s.family?Hy(s.text):null,l=Fx(t[1]),c="atom"===l.type&&"close"===l.family?Hy(l.text):null,d=kv(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var h="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var f=kv(p.body[0],"textord");h=jy[Number(f.text)]}}else p=kv(p,"textord"),h=jy[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:n,barSize:u,leftDelim:a,rightDelim:c,size:h}},htmlBuilder:Dy,mathmlBuilder:By}),Hx({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:o}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:kv(t[0],"size").value,token:o}}}),Hx({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0],i=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(kv(t[1],"infix").size),s=t[2],a=i.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:s,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Dy,mathmlBuilder:By});var qy=(e,t)=>{var n,r,o=t.style;"supsub"===e.type?(n=e.sup?tv(e.sup,t.havingStyle(o.sup()),t):tv(e.sub,t.havingStyle(o.sub()),t),r=kv(e.base,"horizBrace")):r=kv(e,"horizBrace");var i,s=tv(r.base,t.havingBaseStyle(tb.DISPLAY)),a=wv(r,t);if(r.isOver?(i=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Rx.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var l=Rx.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t);i=r.isOver?Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Rx.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Rx.makeSpan(["mord",r.isOver?"mover":"munder"],[i],t)};Hx({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:qy,mathmlBuilder:(e,t)=>{var n=yv(e.label);return new av.MathNode(e.isOver?"mover":"munder",[fv(e.base,t),n])}}),Hx({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],o=kv(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:$x(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Yx(e.body,t,!1);return Rx.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=pv(e.body,t);return n instanceof iv||(n=new iv("mrow",[n])),n.setAttribute("href",e.href),n}}),Hx({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=kv(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],i=0;i<r.length;i++){var s=r[i];"~"===s&&(s="\\textasciitilde"),o.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:$x(a)}}}),Hx({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:$x(t[0])}},htmlBuilder(e,t){var n=Yx(e.body,t,!1);return Rx.makeFragment(n)},mathmlBuilder:(e,t)=>new av.MathNode("mrow",hv(e.body,t))}),Hx({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:o,token:i}=e,s=kv(t[0],"raw").string,a=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=s,n={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,n={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,n={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var c=s.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(2!==u.length)throw new Bg("Error parsing key-value for \\htmlData");l["data-"+u[0].trim()]=u[1].trim()}n={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:l,body:$x(a)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var n=Yx(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var o=Rx.makeSpan(r,n,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&o.setAttribute(i,e.attributes[i]);return o},mathmlBuilder:(e,t)=>pv(e.body,t)}),Hx({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:$x(t[0]),mathml:$x(t[1])}},htmlBuilder:(e,t)=>{var n=Yx(e.html,t,!1);return Rx.makeFragment(n)},mathmlBuilder:(e,t)=>pv(e.mathml,t)});var Fy=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Bg("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!xb(n))throw new Bg("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Hx({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,o={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(n[0])for(var l=kv(n[0],"raw").string.split(","),c=0;c<l.length;c++){var d=l[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":a=u;break;case"width":o=Fy(u);break;case"height":i=Fy(u);break;case"totalheight":s=Fy(u);break;default:throw new Bg("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=kv(t[0],"url").url;return""===a&&(a=(a=(a=h).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:r.mode,alt:a,width:o,height:i,totalheight:s,src:h}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=vb(e.height,t),r=0;e.totalheight.number>0&&(r=vb(e.totalheight,t)-n);var o=0;e.width.number>0&&(o=vb(e.width,t));var i={height:yb(n+r)};o>0&&(i.width=yb(o)),r>0&&(i.verticalAlign=yb(-r));var s=new Ab(e.src,e.alt,i);return s.height=n,s.depth=r,s},mathmlBuilder:(e,t)=>{var n=new av.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=vb(e.height,t),o=0;if(e.totalheight.number>0&&(o=vb(e.totalheight,t)-r,n.setAttribute("valign",yb(-o))),n.setAttribute("height",yb(r+o)),e.width.number>0){var i=vb(e.width,t);n.setAttribute("width",yb(i))}return n.setAttribute("src",e.src),n}}),Hx({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=kv(t[0],"size");if(n.settings.strict){var i="m"===r[1],s="mu"===o.value.unit;i?(s||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+o.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):s&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder:(e,t)=>Rx.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=vb(e.dimension,t);return new av.SpaceNode(n)}}),Hx({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Rx.makeSpan([],[tv(e.body,t)]),n=Rx.makeSpan(["inner"],[n],t)):n=Rx.makeSpan(["inner"],[tv(e.body,t)]);var r=Rx.makeSpan(["fix"],[]),o=Rx.makeSpan([e.alignment],[n,r],t),i=Rx.makeSpan(["strut"]);return i.style.height=yb(o.height+o.depth),o.depth&&(i.style.verticalAlign=yb(-o.depth)),o.children.unshift(i),o=Rx.makeSpan(["thinbox"],[o],t),Rx.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{var n=new av.MathNode("mpadded",[fv(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),Hx({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,o=r.mode;r.switchMode("math");var i="\\("===n?"\\)":"$",s=r.parseExpression(!1,i);return r.expect(i),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:s}}}),Hx({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Bg("Mismatched "+e.funcName)}});var $y=(e,t)=>{switch(t.style.size){case tb.DISPLAY.size:return e.display;case tb.TEXT.size:return e.text;case tb.SCRIPT.size:return e.script;case tb.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Hx({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:$x(t[0]),text:$x(t[1]),script:$x(t[2]),scriptscript:$x(t[3])}},htmlBuilder:(e,t)=>{var n=$y(e,t),r=Yx(n,t,!1);return Rx.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=$y(e,t);return pv(n,t)}});var Gy=(e,t,n,r,o,i,s)=>{e=Rx.makeSpan([],[e]);var a,l,c,d=n&&$g.isCharacterBox(n);if(t){var u=tv(t,r.havingStyle(o.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var h=tv(n,r.havingStyle(o.sub()),r);a={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}if(l&&a){var p=r.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;c=Rx.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:yb(-i)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:yb(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(a){var f=e.height-s;c=Rx.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:yb(-i)},{type:"kern",size:a.kern},{type:"elem",elem:e}]},r)}else{if(!l)return e;var m=e.depth+s;c=Rx.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:yb(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var _=[c];if(a&&0!==i&&!d){var g=Rx.makeSpan(["mspace"],[],r);g.style.marginRight=yb(i),_.unshift(g)}return Rx.makeSpan(["mop","op-limits"],_,r)},Vy=["\\smallint"],Uy=(e,t)=>{var n,r,o,i=!1;"supsub"===e.type?(n=e.sup,r=e.sub,o=kv(e.base,"op"),i=!0):o=kv(e,"op");var s,a=t.style,l=!1;if(a.size===tb.DISPLAY.size&&o.symbol&&!$g.contains(Vy,o.name)&&(l=!0),o.symbol){var c=l?"Size2-Regular":"Size1-Regular",d="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(d=o.name.slice(1),o.name="oiint"===d?"\\iint":"\\iiint"),s=Rx.makeSymbol(o.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),d.length>0){var u=s.italic,h=Rx.staticSvg(d+"Size"+(l?"2":"1"),t);s=Rx.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:h,shift:l?.08:0}]},t),o.name="\\"+d,s.classes.unshift("mop"),s.italic=u}}else if(o.body){var p=Yx(o.body,t,!0);1===p.length&&p[0]instanceof Rb?(s=p[0]).classes[0]="mop":s=Rx.makeSpan(["mop"],p,t)}else{for(var f=[],m=1;m<o.name.length;m++)f.push(Rx.mathsym(o.name[m],o.mode,t));s=Rx.makeSpan(["mop"],f,t)}var _=0,g=0;return(s instanceof Rb||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(_=(s.height-s.depth)/2-t.fontMetrics().axisHeight,g=s.italic),i?Gy(s,n,r,t,a,g,_):(_&&(s.style.position="relative",s.style.top=yb(_)),s)},Ky=(e,t)=>{var n;if(e.symbol)n=new iv("mo",[lv(e.name,e.mode)]),$g.contains(Vy,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new iv("mo",hv(e.body,t));else{n=new iv("mi",[new sv(e.name.slice(1))]);var r=new iv("mo",[lv("⁡","text")]);n=e.parentIsSupSub?new iv("mrow",[n,r]):ov([n,r])}return n},Wy={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Hx({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=r;return 1===o.length&&(o=Wy[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:Uy,mathmlBuilder:Ky}),Hx({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:$x(r)}},htmlBuilder:Uy,mathmlBuilder:Ky});var Yy={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Hx({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Uy,mathmlBuilder:Ky}),Hx({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Uy,mathmlBuilder:Ky}),Hx({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=Yy[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Uy,mathmlBuilder:Ky});var Xy=(e,t)=>{var n,r,o,i,s=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,o=kv(e.base,"operatorname"),s=!0):o=kv(e,"operatorname"),o.body.length>0){for(var a=o.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),l=Yx(a,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var d=l[c];d instanceof Rb&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Rx.makeSpan(["mop"],l,t)}else i=Rx.makeSpan(["mop"],[],t);return s?Gy(i,n,r,t,t.style,0,0):i};function Jy(e,t,n){for(var r=Yx(e,t,!1),o=t.sizeMultiplier/n.sizeMultiplier,i=0;i<r.length;i++){var s=r[i].classes.indexOf("sizing");s<0?Array.prototype.push.apply(r[i].classes,t.sizingClasses(n)):r[i].classes[s+1]==="reset-size"+t.size&&(r[i].classes[s+1]="reset-size"+n.size),r[i].height*=o,r[i].depth*=o}return Rx.makeFragment(r)}Hx({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,o=t[0];return{type:"operatorname",mode:n.mode,body:$x(o),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Xy,mathmlBuilder:(e,t)=>{for(var n=hv(e.body,t.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var i=n[o];if(i instanceof av.SpaceNode);else if(i instanceof av.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=i.children[0];1===i.children.length&&s instanceof av.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var a=n.map(e=>e.toText()).join("");n=[new av.TextNode(a)]}var l=new av.MathNode("mi",n);l.setAttribute("mathvariant","normal");var c=new av.MathNode("mo",[lv("⁡","text")]);return e.parentIsSupSub?new av.MathNode("mrow",[l,c]):av.newDocumentFragment([l,c])}}),wy("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),qx({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Rx.makeFragment(Yx(e.body,t,!1)):Rx.makeSpan(["mord"],Yx(e.body,t,!0),t),mathmlBuilder:(e,t)=>pv(e.body,t,!0)}),Hx({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=tv(e.body,t.havingCrampedStyle()),r=Rx.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,i=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},t);return Rx.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var n=new av.MathNode("mo",[new av.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new av.MathNode("mover",[fv(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Hx({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:$x(r)}},htmlBuilder:(e,t)=>{var n=Yx(e.body,t.withPhantom(),!1);return Rx.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=hv(e.body,t);return new av.MathNode("mphantom",n)}}),Hx({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Rx.makeSpan([],[tv(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Rx.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=hv($x(e.body),t),r=new av.MathNode("mphantom",n),o=new av.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),Hx({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Rx.makeSpan(["inner"],[tv(e.body,t.withPhantom())]),r=Rx.makeSpan(["fix"],[]);return Rx.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=hv($x(e.body),t),r=new av.MathNode("mphantom",n),o=new av.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}}),Hx({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=kv(t[0],"size").value,o=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(e,t){var n=tv(e.body,t),r=vb(e.dy,t);return Rx.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new av.MathNode("mpadded",[fv(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Hx({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Hx({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,o=n[0],i=kv(t[0],"size"),s=kv(t[1],"size");return{type:"rule",mode:r.mode,shift:o&&kv(o,"size").value,width:i.value,height:s.value}},htmlBuilder(e,t){var n=Rx.makeSpan(["mord","rule"],[],t),r=vb(e.width,t),o=vb(e.height,t),i=e.shift?vb(e.shift,t):0;return n.style.borderRightWidth=yb(r),n.style.borderTopWidth=yb(o),n.style.bottom=yb(i),n.width=r,n.height=o+i,n.depth=-i,n.maxFontSize=1.125*o*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=vb(e.width,t),r=vb(e.height,t),o=e.shift?vb(e.shift,t):0,i=t.color&&t.getColor()||"black",s=new av.MathNode("mspace");s.setAttribute("mathbackground",i),s.setAttribute("width",yb(n)),s.setAttribute("height",yb(r));var a=new av.MathNode("mpadded",[s]);return o>=0?a.setAttribute("height",yb(o)):(a.setAttribute("height",yb(o)),a.setAttribute("depth",yb(-o))),a.setAttribute("voffset",yb(o)),a}});var Zy=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Hx({type:"sizing",names:Zy,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Zy.indexOf(r)+1,body:i}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Jy(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=hv(e.body,n),o=new av.MathNode("mstyle",r);return o.setAttribute("mathsize",yb(n.sizeMultiplier)),o}}),Hx({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,o=!1,i=!1,s=n[0]&&kv(n[0],"ordgroup");if(s)for(var a="",l=0;l<s.body.length;++l){if("t"===(a=s.body[l].text))o=!0;else{if("b"!==a){o=!1,i=!1;break}i=!0}}else o=!0,i=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:o,smashDepth:i}},htmlBuilder:(e,t)=>{var n=Rx.makeSpan([],[tv(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var i=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Rx.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var n=new av.MathNode("mpadded",[fv(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Hx({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,o=n[0],i=t[0];return{type:"sqrt",mode:r.mode,body:i,index:o}},htmlBuilder(e,t){var n=tv(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Rx.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,o=r;t.style.id<tb.TEXT.id&&(o=t.fontMetrics().xHeight);var i=r+o/4,s=n.height+n.depth+i+r,{span:a,ruleWidth:l,advanceWidth:c}=hy.sqrtImage(s,t),d=a.height-l;d>n.height+n.depth+i&&(i=(i+d-n.height-n.depth)/2);var u=a.height-n.height-i-l;n.style.paddingLeft=yb(c);var h=Rx.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){var p=t.havingStyle(tb.SCRIPTSCRIPT),f=tv(e.index,p,t),m=.6*(h.height-h.depth),_=Rx.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:f}]},t),g=Rx.makeSpan(["root"],[_]);return Rx.makeSpan(["mord","sqrt"],[g,h],t)}return Rx.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new av.MathNode("mroot",[fv(n,t),fv(r,t)]):new av.MathNode("msqrt",[fv(n,t)])}});var Qy={display:tb.DISPLAY,text:tb.TEXT,script:tb.SCRIPT,scriptscript:tb.SCRIPTSCRIPT};Hx({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:o}=e,i=o.parseExpression(!0,n),s=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:s,body:i}},htmlBuilder(e,t){var n=Qy[e.style],r=t.havingStyle(n).withFont("");return Jy(e.body,r,t)},mathmlBuilder(e,t){var n=Qy[e.style],r=t.havingStyle(n),o=hv(e.body,r),i=new av.MathNode("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",s[0]),i.setAttribute("displaystyle",s[1]),i}});qx({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===tb.DISPLAY.size||n.alwaysHandleSupSub)?Uy:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===tb.DISPLAY.size||n.limits)?Xy:null:"accent"===n.type?$g.isCharacterBox(n.base)?Mv:null:"horizBrace"===n.type&&!e.sub===n.isOver?qy:null:null}(e,t);if(n)return n(e,t);var r,o,i,{base:s,sup:a,sub:l}=e,c=tv(s,t),d=t.fontMetrics(),u=0,h=0,p=s&&$g.isCharacterBox(s);if(a){var f=t.havingStyle(t.style.sup());r=tv(a,f,t),p||(u=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());o=tv(l,m,t),p||(h=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}i=t.style===tb.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var _,g=t.sizeMultiplier,b=yb(.5/d.ptPerEm/g),x=null;if(o){var v=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Rb||v)&&(x=yb(-c.italic))}if(r&&o){u=Math.max(u,i,r.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var y=4*d.defaultRuleThickness;if(u-r.depth-(o.height-h)<y){h=y-(u-r.depth)+o.height;var w=.8*d.xHeight-(u-r.depth);w>0&&(u+=w,h-=w)}var k=[{type:"elem",elem:o,shift:h,marginRight:b,marginLeft:x},{type:"elem",elem:r,shift:-u,marginRight:b}];_=Rx.makeVList({positionType:"individualShift",children:k},t)}else if(o){h=Math.max(h,d.sub1,o.height-.8*d.xHeight);var S=[{type:"elem",elem:o,marginLeft:x,marginRight:b}];_=Rx.makeVList({positionType:"shift",positionData:h,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,r.depth+.25*d.xHeight),_=Rx.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:b}]},t)}var C=Qx(c,"right")||"mord";return Rx.makeSpan([C],[c,Rx.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,i=[fv(e.base,t)];if(e.sub&&i.push(fv(e.sub,t)),e.sup&&i.push(fv(e.sup,t)),r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===tb.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===tb.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===tb.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===tb.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===tb.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===tb.DISPLAY)?"mover":"msup"}return new av.MathNode(o,i)}}),qx({type:"atom",htmlBuilder:(e,t)=>Rx.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new av.MathNode("mo",[lv(e.text,e.mode)]);if("bin"===e.family){var r=dv(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var ew={mi:"italic",mn:"normal",mtext:"normal"};qx({type:"mathord",htmlBuilder:(e,t)=>Rx.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new av.MathNode("mi",[lv(e.text,e.mode,t)]),r=dv(e,t)||"italic";return r!==ew[n.type]&&n.setAttribute("mathvariant",r),n}}),qx({type:"textord",htmlBuilder:(e,t)=>Rx.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=lv(e.text,e.mode,t),o=dv(e,t)||"normal";return n="text"===e.mode?new av.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new av.MathNode("mn",[r]):"\\prime"===e.text?new av.MathNode("mo",[r]):new av.MathNode("mi",[r]),o!==ew[n.type]&&n.setAttribute("mathvariant",o),n}});var tw={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},nw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};qx({type:"spacing",htmlBuilder(e,t){if(nw.hasOwnProperty(e.text)){var n=nw[e.text].className||"";if("text"===e.mode){var r=Rx.makeOrd(e,t,"textord");return r.classes.push(n),r}return Rx.makeSpan(["mspace",n],[Rx.mathsym(e.text,e.mode,t)],t)}if(tw.hasOwnProperty(e.text))return Rx.makeSpan(["mspace",tw[e.text]],[],t);throw new Bg('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!nw.hasOwnProperty(e.text)){if(tw.hasOwnProperty(e.text))return new av.MathNode("mspace");throw new Bg('Unknown type of space "'+e.text+'"')}return new av.MathNode("mtext",[new av.TextNode(" ")])}});var rw=()=>{var e=new av.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};qx({type:"tag",mathmlBuilder(e,t){var n=new av.MathNode("mtable",[new av.MathNode("mtr",[rw(),new av.MathNode("mtd",[pv(e.body,t)]),rw(),new av.MathNode("mtd",[pv(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var ow={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},iw={"\\textbf":"textbf","\\textmd":"textmd"},sw={"\\textit":"textit","\\textup":"textup"},aw=(e,t)=>{var n=e.font;return n?ow[n]?t.withTextFontFamily(ow[n]):iw[n]?t.withTextFontWeight(iw[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(sw[n]):t};Hx({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,o=t[0];return{type:"text",mode:n.mode,body:$x(o),font:r}},htmlBuilder(e,t){var n=aw(e,t),r=Yx(e.body,n,!0);return Rx.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=aw(e,t);return pv(e.body,n)}}),Hx({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=tv(e.body,t),r=Rx.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,i=Rx.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},t);return Rx.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var n=new av.MathNode("mo",[new av.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new av.MathNode("munder",[fv(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Hx({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=tv(e.body,t),r=t.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Rx.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new av.MathNode("mpadded",[fv(e.body,t)],["vcenter"])}),Hx({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Bg("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=lw(e),r=[],o=t.havingStyle(t.style.text()),i=0;i<n.length;i++){var s=n[i];"~"===s&&(s="\\textasciitilde"),r.push(Rx.makeSymbol(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return Rx.makeSpan(["mord","text"].concat(o.sizingClasses(t)),Rx.tryCombineChars(r),o)},mathmlBuilder(e,t){var n=new av.TextNode(lw(e)),r=new av.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var lw=e=>e.body.replace(/ /g,e.star?"␣":" "),cw=Dx,dw="[ \r\n\t]",uw="(\\\\[a-zA-Z@]+)"+dw+"*",hw="[̀-ͯ]",pw=new RegExp(hw+"+$"),fw="("+dw+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+hw+"*|[\ud800-\udbff][\udc00-\udfff]"+hw+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+uw+"|\\\\[^\ud800-\udfff])";class mw{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(fw,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Dg("EOF",new Ig(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Bg("Unexpected character: '"+e[t]+"'",new Dg(e[t],new Ig(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Dg(r,new Ig(this,t,this.tokenRegex.lastIndex))}}class _w{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Bg("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var gw=yy;wy("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),wy("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),wy("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),wy("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),wy("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),wy("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),wy("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var bw={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};wy("\\char",function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Bg("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=bw[n.text])||r>=t)throw new Bg("Invalid base-"+t+" digit "+n.text);for(var o;null!=(o=bw[e.future().text])&&o<t;)r*=t,r+=o,e.popToken()}return"\\@char{"+r+"}"});var xw=(e,t,n,r)=>{var o=e.consumeArg().tokens;if(1!==o.length)throw new Bg("\\newcommand's first argument must be a macro name");var i=o[0].text,s=e.isDefined(i);if(s&&!t)throw new Bg("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!s&&!n)throw new Bg("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(1===(o=e.consumeArg().tokens).length&&"["===o[0].text){for(var l="",c=e.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Bg("Invalid number of arguments: "+l);a=parseInt(l),o=e.consumeArg().tokens}return s&&r||e.macros.set(i,{tokens:o,numArgs:a}),""};wy("\\newcommand",e=>xw(e,!1,!0,!1)),wy("\\renewcommand",e=>xw(e,!0,!1,!1)),wy("\\providecommand",e=>xw(e,!0,!0,!0)),wy("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),wy("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),wy("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),cw[n],Bb.math[n],Bb.text[n]),""}),wy("\\bgroup","{"),wy("\\egroup","}"),wy("~","\\nobreakspace"),wy("\\lq","`"),wy("\\rq","'"),wy("\\aa","\\r a"),wy("\\AA","\\r A"),wy("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),wy("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),wy("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),wy("ℬ","\\mathscr{B}"),wy("ℰ","\\mathscr{E}"),wy("ℱ","\\mathscr{F}"),wy("ℋ","\\mathscr{H}"),wy("ℐ","\\mathscr{I}"),wy("ℒ","\\mathscr{L}"),wy("ℳ","\\mathscr{M}"),wy("ℛ","\\mathscr{R}"),wy("ℭ","\\mathfrak{C}"),wy("ℌ","\\mathfrak{H}"),wy("ℨ","\\mathfrak{Z}"),wy("\\Bbbk","\\Bbb{k}"),wy("·","\\cdotp"),wy("\\llap","\\mathllap{\\textrm{#1}}"),wy("\\rlap","\\mathrlap{\\textrm{#1}}"),wy("\\clap","\\mathclap{\\textrm{#1}}"),wy("\\mathstrut","\\vphantom{(}"),wy("\\underbar","\\underline{\\text{#1}}"),wy("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),wy("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),wy("\\ne","\\neq"),wy("≠","\\neq"),wy("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),wy("∉","\\notin"),wy("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),wy("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),wy("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),wy("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),wy("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),wy("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),wy("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),wy("⟂","\\perp"),wy("‼","\\mathclose{!\\mkern-0.8mu!}"),wy("∌","\\notni"),wy("⌜","\\ulcorner"),wy("⌝","\\urcorner"),wy("⌞","\\llcorner"),wy("⌟","\\lrcorner"),wy("©","\\copyright"),wy("®","\\textregistered"),wy("️","\\textregistered"),wy("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),wy("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),wy("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),wy("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),wy("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),wy("⋮","\\vdots"),wy("\\varGamma","\\mathit{\\Gamma}"),wy("\\varDelta","\\mathit{\\Delta}"),wy("\\varTheta","\\mathit{\\Theta}"),wy("\\varLambda","\\mathit{\\Lambda}"),wy("\\varXi","\\mathit{\\Xi}"),wy("\\varPi","\\mathit{\\Pi}"),wy("\\varSigma","\\mathit{\\Sigma}"),wy("\\varUpsilon","\\mathit{\\Upsilon}"),wy("\\varPhi","\\mathit{\\Phi}"),wy("\\varPsi","\\mathit{\\Psi}"),wy("\\varOmega","\\mathit{\\Omega}"),wy("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),wy("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),wy("\\boxed","\\fbox{$\\displaystyle{#1}$}"),wy("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),wy("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),wy("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),wy("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),wy("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var vw={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};wy("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in vw?t=vw[n]:("\\not"===n.slice(0,4)||n in Bb.math&&$g.contains(["bin","rel"],Bb.math[n].group))&&(t="\\dotsb"),t});var yw={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};wy("\\dotso",function(e){return e.future().text in yw?"\\ldots\\,":"\\ldots"}),wy("\\dotsc",function(e){var t=e.future().text;return t in yw&&","!==t?"\\ldots\\,":"\\ldots"}),wy("\\cdots",function(e){return e.future().text in yw?"\\@cdots\\,":"\\@cdots"}),wy("\\dotsb","\\cdots"),wy("\\dotsm","\\cdots"),wy("\\dotsi","\\!\\cdots"),wy("\\dotsx","\\ldots\\,"),wy("\\DOTSI","\\relax"),wy("\\DOTSB","\\relax"),wy("\\DOTSX","\\relax"),wy("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),wy("\\,","\\tmspace+{3mu}{.1667em}"),wy("\\thinspace","\\,"),wy("\\>","\\mskip{4mu}"),wy("\\:","\\tmspace+{4mu}{.2222em}"),wy("\\medspace","\\:"),wy("\\;","\\tmspace+{5mu}{.2777em}"),wy("\\thickspace","\\;"),wy("\\!","\\tmspace-{3mu}{.1667em}"),wy("\\negthinspace","\\!"),wy("\\negmedspace","\\tmspace-{4mu}{.2222em}"),wy("\\negthickspace","\\tmspace-{5mu}{.277em}"),wy("\\enspace","\\kern.5em "),wy("\\enskip","\\hskip.5em\\relax"),wy("\\quad","\\hskip1em\\relax"),wy("\\qquad","\\hskip2em\\relax"),wy("\\tag","\\@ifstar\\tag@literal\\tag@paren"),wy("\\tag@paren","\\tag@literal{({#1})}"),wy("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Bg("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),wy("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),wy("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),wy("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),wy("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),wy("\\newline","\\\\\\relax"),wy("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ww=yb(lb["Main-Regular"]["T".charCodeAt(0)][1]-.7*lb["Main-Regular"]["A".charCodeAt(0)][1]);wy("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ww+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),wy("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ww+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),wy("\\hspace","\\@ifstar\\@hspacer\\@hspace"),wy("\\@hspace","\\hskip #1\\relax"),wy("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),wy("\\ordinarycolon",":"),wy("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),wy("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),wy("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),wy("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),wy("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),wy("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),wy("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),wy("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),wy("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),wy("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),wy("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),wy("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),wy("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),wy("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),wy("∷","\\dblcolon"),wy("∹","\\eqcolon"),wy("≔","\\coloneqq"),wy("≕","\\eqqcolon"),wy("⩴","\\Coloneqq"),wy("\\ratio","\\vcentcolon"),wy("\\coloncolon","\\dblcolon"),wy("\\colonequals","\\coloneqq"),wy("\\coloncolonequals","\\Coloneqq"),wy("\\equalscolon","\\eqqcolon"),wy("\\equalscoloncolon","\\Eqqcolon"),wy("\\colonminus","\\coloneq"),wy("\\coloncolonminus","\\Coloneq"),wy("\\minuscolon","\\eqcolon"),wy("\\minuscoloncolon","\\Eqcolon"),wy("\\coloncolonapprox","\\Colonapprox"),wy("\\coloncolonsim","\\Colonsim"),wy("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),wy("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),wy("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),wy("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),wy("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),wy("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),wy("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),wy("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),wy("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),wy("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),wy("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),wy("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),wy("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),wy("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),wy("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),wy("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),wy("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),wy("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),wy("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),wy("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),wy("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),wy("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),wy("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),wy("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),wy("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),wy("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),wy("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),wy("\\imath","\\html@mathml{\\@imath}{ı}"),wy("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),wy("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),wy("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),wy("⟦","\\llbracket"),wy("⟧","\\rrbracket"),wy("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),wy("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),wy("⦃","\\lBrace"),wy("⦄","\\rBrace"),wy("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),wy("⦵","\\minuso"),wy("\\darr","\\downarrow"),wy("\\dArr","\\Downarrow"),wy("\\Darr","\\Downarrow"),wy("\\lang","\\langle"),wy("\\rang","\\rangle"),wy("\\uarr","\\uparrow"),wy("\\uArr","\\Uparrow"),wy("\\Uarr","\\Uparrow"),wy("\\N","\\mathbb{N}"),wy("\\R","\\mathbb{R}"),wy("\\Z","\\mathbb{Z}"),wy("\\alef","\\aleph"),wy("\\alefsym","\\aleph"),wy("\\Alpha","\\mathrm{A}"),wy("\\Beta","\\mathrm{B}"),wy("\\bull","\\bullet"),wy("\\Chi","\\mathrm{X}"),wy("\\clubs","\\clubsuit"),wy("\\cnums","\\mathbb{C}"),wy("\\Complex","\\mathbb{C}"),wy("\\Dagger","\\ddagger"),wy("\\diamonds","\\diamondsuit"),wy("\\empty","\\emptyset"),wy("\\Epsilon","\\mathrm{E}"),wy("\\Eta","\\mathrm{H}"),wy("\\exist","\\exists"),wy("\\harr","\\leftrightarrow"),wy("\\hArr","\\Leftrightarrow"),wy("\\Harr","\\Leftrightarrow"),wy("\\hearts","\\heartsuit"),wy("\\image","\\Im"),wy("\\infin","\\infty"),wy("\\Iota","\\mathrm{I}"),wy("\\isin","\\in"),wy("\\Kappa","\\mathrm{K}"),wy("\\larr","\\leftarrow"),wy("\\lArr","\\Leftarrow"),wy("\\Larr","\\Leftarrow"),wy("\\lrarr","\\leftrightarrow"),wy("\\lrArr","\\Leftrightarrow"),wy("\\Lrarr","\\Leftrightarrow"),wy("\\Mu","\\mathrm{M}"),wy("\\natnums","\\mathbb{N}"),wy("\\Nu","\\mathrm{N}"),wy("\\Omicron","\\mathrm{O}"),wy("\\plusmn","\\pm"),wy("\\rarr","\\rightarrow"),wy("\\rArr","\\Rightarrow"),wy("\\Rarr","\\Rightarrow"),wy("\\real","\\Re"),wy("\\reals","\\mathbb{R}"),wy("\\Reals","\\mathbb{R}"),wy("\\Rho","\\mathrm{P}"),wy("\\sdot","\\cdot"),wy("\\sect","\\S"),wy("\\spades","\\spadesuit"),wy("\\sub","\\subset"),wy("\\sube","\\subseteq"),wy("\\supe","\\supseteq"),wy("\\Tau","\\mathrm{T}"),wy("\\thetasym","\\vartheta"),wy("\\weierp","\\wp"),wy("\\Zeta","\\mathrm{Z}"),wy("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),wy("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),wy("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),wy("\\bra","\\mathinner{\\langle{#1}|}"),wy("\\ket","\\mathinner{|{#1}\\rangle}"),wy("\\braket","\\mathinner{\\langle{#1}\\rangle}"),wy("\\Bra","\\left\\langle#1\\right|"),wy("\\Ket","\\left|#1\\right\\rangle");var kw=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set("|",s),o.length&&n.macros.set("\\|",a));var i=t;!t&&o.length&&("|"===n.future().text&&(n.popToken(),i=!0));return{tokens:i?o:r,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...i,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};wy("\\bra@ket",kw(!1)),wy("\\bra@set",kw(!0)),wy("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),wy("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),wy("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),wy("\\angln","{\\angl n}"),wy("\\blue","\\textcolor{##6495ed}{#1}"),wy("\\orange","\\textcolor{##ffa500}{#1}"),wy("\\pink","\\textcolor{##ff00af}{#1}"),wy("\\red","\\textcolor{##df0030}{#1}"),wy("\\green","\\textcolor{##28ae7b}{#1}"),wy("\\gray","\\textcolor{gray}{#1}"),wy("\\purple","\\textcolor{##9d38bd}{#1}"),wy("\\blueA","\\textcolor{##ccfaff}{#1}"),wy("\\blueB","\\textcolor{##80f6ff}{#1}"),wy("\\blueC","\\textcolor{##63d9ea}{#1}"),wy("\\blueD","\\textcolor{##11accd}{#1}"),wy("\\blueE","\\textcolor{##0c7f99}{#1}"),wy("\\tealA","\\textcolor{##94fff5}{#1}"),wy("\\tealB","\\textcolor{##26edd5}{#1}"),wy("\\tealC","\\textcolor{##01d1c1}{#1}"),wy("\\tealD","\\textcolor{##01a995}{#1}"),wy("\\tealE","\\textcolor{##208170}{#1}"),wy("\\greenA","\\textcolor{##b6ffb0}{#1}"),wy("\\greenB","\\textcolor{##8af281}{#1}"),wy("\\greenC","\\textcolor{##74cf70}{#1}"),wy("\\greenD","\\textcolor{##1fab54}{#1}"),wy("\\greenE","\\textcolor{##0d923f}{#1}"),wy("\\goldA","\\textcolor{##ffd0a9}{#1}"),wy("\\goldB","\\textcolor{##ffbb71}{#1}"),wy("\\goldC","\\textcolor{##ff9c39}{#1}"),wy("\\goldD","\\textcolor{##e07d10}{#1}"),wy("\\goldE","\\textcolor{##a75a05}{#1}"),wy("\\redA","\\textcolor{##fca9a9}{#1}"),wy("\\redB","\\textcolor{##ff8482}{#1}"),wy("\\redC","\\textcolor{##f9685d}{#1}"),wy("\\redD","\\textcolor{##e84d39}{#1}"),wy("\\redE","\\textcolor{##bc2612}{#1}"),wy("\\maroonA","\\textcolor{##ffbde0}{#1}"),wy("\\maroonB","\\textcolor{##ff92c6}{#1}"),wy("\\maroonC","\\textcolor{##ed5fa6}{#1}"),wy("\\maroonD","\\textcolor{##ca337c}{#1}"),wy("\\maroonE","\\textcolor{##9e034e}{#1}"),wy("\\purpleA","\\textcolor{##ddd7ff}{#1}"),wy("\\purpleB","\\textcolor{##c6b9fc}{#1}"),wy("\\purpleC","\\textcolor{##aa87ff}{#1}"),wy("\\purpleD","\\textcolor{##7854ab}{#1}"),wy("\\purpleE","\\textcolor{##543b78}{#1}"),wy("\\mintA","\\textcolor{##f5f9e8}{#1}"),wy("\\mintB","\\textcolor{##edf2df}{#1}"),wy("\\mintC","\\textcolor{##e0e5cc}{#1}"),wy("\\grayA","\\textcolor{##f6f7f7}{#1}"),wy("\\grayB","\\textcolor{##f0f1f2}{#1}"),wy("\\grayC","\\textcolor{##e3e5e6}{#1}"),wy("\\grayD","\\textcolor{##d6d8da}{#1}"),wy("\\grayE","\\textcolor{##babec2}{#1}"),wy("\\grayF","\\textcolor{##888d93}{#1}"),wy("\\grayG","\\textcolor{##626569}{#1}"),wy("\\grayH","\\textcolor{##3b3e40}{#1}"),wy("\\grayI","\\textcolor{##21242c}{#1}"),wy("\\kaBlue","\\textcolor{##314453}{#1}"),wy("\\kaGreen","\\textcolor{##71B307}{#1}");var Sw={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Cw{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _w(gw,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new mw(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new Dg("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,o=this.future(),i=0,s=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++i;else if("}"===r.text){if(-1===--i)throw new Bg("Extra }",r)}else if("EOF"===r.text)throw new Bg("Unexpected end of input in a macro argument, expected '"+(e&&n?e[s]:"}")+"'",r);if(e&&n)if((0===i||1===i&&"{"===e[s])&&r.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==i||n);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Bg("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var o=this.popToken();if(n[r]!==o.text)throw new Bg("Use of the macro doesn't match its definition",o)}}for(var i=[],s=0;s<e;s++)i.push(this.consumeArg(t&&t[s+1]).tokens);return i}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Bg("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Bg("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var o=r.tokens,i=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var a=o[s];if("#"===a.text){if(0===s)throw new Bg("Incomplete placeholder at end of macro body",a);if("#"===(a=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(a.text))throw new Bg("Not a valid argument number",a);o.splice(s,2,...i[+a.text-1])}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Dg(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var o=0;if(-1!==r.indexOf("#"))for(var i=r.replace(/##/g,"");-1!==i.indexOf("#"+(o+1));)++o;for(var s=new mw(r,this.settings),a=[],l=s.lex();"EOF"!==l.text;)a.push(l),l=s.lex();return a.reverse(),{tokens:a,numArgs:o}}return r}isDefined(e){return this.macros.has(e)||cw.hasOwnProperty(e)||Bb.math.hasOwnProperty(e)||Bb.text.hasOwnProperty(e)||Sw.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:cw.hasOwnProperty(e)&&!cw[e].primitive}}var Mw=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,zw=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),Nw={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Aw={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Tw{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Cw(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Bg("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Dg("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==Tw.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&cw[r.text]&&cw[r.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&n.push(o)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new Bg("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var o,i,s=e.slice(0,n),a=e.slice(n+1);return o=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},i=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===t?this.callFunction(t,[o,e[n],i],[]):this.callFunction(t,[o,i],[])]}return e}handleSupSubscript(e){var t,n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();do{var o;t=this.parseGroup(e)}while("internal"===(null==(o=t)?void 0:o.type));if(!t)throw new Bg("Expected group after '"+r+"'",n);return t}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("internal"===(null==r?void 0:r.type))return r;if("text"===this.mode)return r;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(r&&"op"===r.type){var i="\\limits"===o.text;r.limits=i,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new Bg("Limit controls must follow a math operator",o);r.alwaysHandleSupSub&&(r.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new Bg("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(n)throw new Bg("Double subscript",o);n=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new Bg("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},a=[s];for(this.consume();"'"===this.fetch().text;)a.push(s),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:a}}else{if(!zw[o.text])break;var l=Mw.test(o.text),c=[];for(c.push(new Dg(zw[o.text])),this.consume();;){var d=this.fetch().text;if(!zw[d])break;if(Mw.test(d)!==l)break;c.unshift(new Dg(zw[d])),this.consume()}var u=this.subparse(c);l?n={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,o=cw[r];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new Bg("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!o.allowedInText)throw new Bg("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===o.allowedInMath)throw new Bg("Can't use function '"+r+"' in math mode",n);var{args:i,optArgs:s}=this.parseArguments(r,o);return this.callFunction(r,i,s,n,e)}callFunction(e,t,n,r,o){var i={funcName:e,parser:this,token:r,breakOnTokenText:o},s=cw[e];if(s&&s.handler)return s.handler(i,t,n);throw new Bg("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],o=[],i=0;i<n;i++){var s=t.argTypes&&t.argTypes[i],a=i<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===i&&null==o[0])&&(s="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",s,a);if(a)o.push(l);else{if(null==l)throw new Bg("Null argument, please report this as a bug");r.push(l)}}return{args:r,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var o=this.parseStringGroup("raw",n);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(n)throw new Bg("A primitive argument cannot be optional");var i=this.parseGroup(e);if(null==i)throw new Bg("Expected group as "+e,this.fetch());return i;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Bg("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,o="";"EOF"!==(r=this.fetch()).text;)o+=r.text,this.consume();return this.consume(),n.text=o,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),o=r,i="";"EOF"!==(n=this.fetch()).text&&e.test(i+n.text);)i+=(o=n).text,this.consume();if(""===i)throw new Bg("Invalid "+t+": '"+r.text+"'",r);return r.range(o,i)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Bg("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Bg("Invalid size: '"+t.text+"'",t);var o={number:+(r[1]+r[2]),unit:r[3]};if(!xb(o))throw new Bg("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:n.loc,body:o};return t&&this.switchMode(r),i}parseGroup(e,t){var n,r=this.fetch(),o=r.text;if("{"===o||"\\begingroup"===o){this.consume();var i="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,i),a=this.fetch();this.expect(i),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Ig.range(r,a),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Sw.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Bg("Undefined control sequence: "+o,r);n=this.formatUnsupportedCmd(o),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],o=r.text;"-"===o&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:Ig.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Ig.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[n+1].text!==o||(e.splice(n,2,{type:"textord",mode:"text",loc:Ig.range(r,e[n+1]),text:o+o}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Bg("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}Aw.hasOwnProperty(t[0])&&!Bb[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Aw[t[0]]+t.slice(1));var o,i=pw.exec(t);if(i&&("i"===(t=t.substring(0,i.index))?t="ı":"j"===t&&(t="ȷ")),Bb[this.mode][t]){this.settings.strict&&"math"===this.mode&&_x.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,a=Bb[this.mode][t].group,l=Ig.range(e);if(Ib.hasOwnProperty(a)){var c=a;s={type:"atom",mode:this.mode,family:c,loc:l,text:t}}else s={type:a,mode:this.mode,loc:l,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(ob(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Ig.range(e),text:t}}if(this.consume(),i)for(var d=0;d<i[0].length;d++){var u=i[0][d];if(!Nw[u])throw new Bg("Unknown accent ' "+u+"'",e);var h=Nw[u][this.mode]||Nw[u].text;if(!h)throw new Bg("Accent "+u+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:Ig.range(e),label:h,isStretchy:!1,isShifty:!0,base:o}}return o}}Tw.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Rw=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Tw(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Bg("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Dg("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var Pw=function(e,t,n){if(n.throwOnError||!(e instanceof Bg))throw e;var r=Rx.makeSpan(["katex-error"],[new Rb(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Ow=function(e,t){var n=new Ug(t);try{return function(e,t,n){var r,o=_v(n);if("mathml"===n.output)return mv(e,t,o,n.displayMode,!0);if("html"===n.output){var i=rv(e,o);r=Rx.makeSpan(["katex"],[i])}else{var s=mv(e,t,o,n.displayMode,!1),a=rv(e,o);r=Rx.makeSpan(["katex"],[s,a])}return gv(r,n)}(Rw(e,n),e,n)}catch(t){return Pw(t,e,n)}},Ew=function(e,t){return Ow(e,t).toMarkup()};class Lw{static update(e,t,n,r=!1){return{id:e,name:u.Names.update,size:n,latex:t,block:r}}}class Iw extends Rs{constructor(e){super(e)}_mathml=gi(()=>{const e=this.attrs.size+this.latex;return Bw.render(e,{displayMode:this.attrs.block})});get cube(){return this._cube}get latex(){return this.info}get mathml(){return this._mathml.value}update_latex(){Promise.resolve().then(()=>{this._data.info=this.cube.info})}}function Dw(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Bw extends rd{_status=new Iw(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Lg}get attrs(){return this.data.attrs}get meta(){return Bw.meta}get mathml(){const e=this.attrs.size+this.info.latex;return Bw.render(e,{displayMode:this.attrs.block})}build_child(e){}export(){return this.base_export()}gc(){super.base_gc()}update_data(e,t){return Bw.update_data(e,t)}replace_id(e,t,n={}){return Bw.replace_id(this.root,e,t,n)}update(e){const{latex:t,block:n,size:r}=e,{courier:o,id:i}=this,s=o.get_recorder();s.add_cmd(e);const a=this.info,l=this.attrs.block,c=this.attrs.size;return this.data.info=t,this.data.attrs.block=n,this.data.attrs.size=r,this.status.update_attrs(),this.status.update_latex(),s.add_recover(Lw.update(i,a,c,l)),s}static render(e,t={}){const n={...t,throwOnError:!1,output:"html"};try{return Ew(e,{...n})}catch(e){return""}}static get meta(){return{cubename:"公式",type:S.Cubes.fomula,block:!1,version:1,show:!0}}static get_default(e="",t={},n={}){return{id:od.get_id(),type:S.Cubes.fomula,info:e,attrs:{block:!1,size:d.Size.h4,...n},css:t}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Dw([Ri(u.Names.update)],Bw.prototype,"update",null),Bw=Dw([Si],Bw);class jw{static add_title(e,t){return{id:e,name:h.Names.add_title,data:t}}static remove_title(e){return{id:e,name:h.Names.remove_title}}static add_cell(e,t){return{id:e,name:h.Names.add_cell,data:t}}static remove_cell(e,t){return{id:e,name:h.Names.remove_cell,cid:t}}static add_row(e,t,n){return{id:e,name:h.Names.add_row,index:t,rows:n}}static remove_row(e,t){return{id:e,name:h.Names.remove_row,index:t}}static add_col(e,t,n){return{id:e,name:h.Names.add_col,index:t,cols:n}}static remove_col(e,t){return{id:e,name:h.Names.remove_col,index:t}}static moveto(e,t,n){return{id:e,name:h.Names.moveto,tid:t,cells:n}}static merge(e,t){return{id:e,name:h.Names.merge,area:t}}static update_cell_area(e,t,n){return{id:e,name:h.Names.update_area,tid:t,area:n}}static add_grid_col(e,t,n){return{id:e,name:h.Names.add_grid_col,index:t,width:n}}static remove_grid_col(e,t){return{id:e,name:h.Names.remove_grid_col,index:t}}static col_resize(e,t,n){return{id:e,name:h.Names.col_resize,cols:t,step:n}}}function Hw(e,t){const{hotkeys:n,courier:r,id:o,history:i}=t,s=vi.tips;if(n.validate_hotkeys(e))return;if(!e.ctrlKey)return;e.stopPropagation();const a=e.key.toLowerCase(),l=e.shiftKey,c=t.get_active_cell();if(!c)return s?.tip_info("未发现激活单元格");if(a===C.Keys.up)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_row_top(e.top))return s?.tip_info("上方不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[1];e++)o.push(Mu.get_default());n.tell(t,jw.add_row(t.id,c.row,o)),i.record(n)}else{if(t.get_cell(c.row-1,c.col))return s?.tip_info("上方已存在单元格");if(c.row-1<0)return s?.tip_info("上方已达边界");{const e=r.get_recorder(),n={row:c.row-1,col:c.col,rowspan:1,colspan:1,data:Mu.get_default()};e.tell(t,jw.add_cell(t.id,n)),i.record(e)}}else if(a===C.Keys.down)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_row_bottom(e.bottom))return s?.tip_info("下方不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[1];e++)o.push(Mu.get_default());n.tell(t,jw.add_row(t.id,c.row+c.rowspan,o)),i.record(n)}else{if(t.get_cell(c.row+1,c.col))return s?.tip_info("下方已存在单元格");if(c.row+1>=t.size[0])return s?.tip_info("下方已达边界");{const e=r.get_recorder(),n={row:c.row+1,col:c.col,rowspan:1,colspan:1,data:Mu.get_default()};e.tell(t,jw.add_cell(t.id,n)),i.record(e)}}else if(a===C.Keys.left)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_col_left(e.left))return s?.tip_info("左侧不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[0];e++)o.push(Mu.get_default());n.tell(t,jw.add_col(t.id,c.col,o)),i.record(n)}else{if(t.get_cell(c.row,c.col-1))return s?.tip_info("左侧已存在单元格");if(c.col-1<0)return s?.tip_info("左侧已达边界");{const e=r.get_recorder(),n={row:c.row,col:c.col-1,rowspan:1,colspan:1,data:Mu.get_default()};e.tell(t,jw.add_cell(t.id,n)),i.record(e)}}else if(a===C.Keys.right)if(l){const e=t.get_cell_area(c);if(!t.check_orderly_col_right(e.right))return s?.tip_info("右侧不整齐");const n=r.get_recorder(),o=[];for(let e=0;e<t.size[0];e++)o.push(Mu.get_default());n.tell(t,jw.add_col(t.id,c.col+c.colspan,o)),i.record(n)}else{if(t.get_cell(c.row,c.col+1))return s?.tip_info("右侧已存在单元格");if(c.col+1>=t.size[1])return s?.tip_info("右侧已达边界");{const e=r.get_recorder(),n={row:c.row,col:c.col+1,rowspan:1,colspan:1,data:Mu.get_default()};e.tell(t,jw.add_cell(t.id,n)),i.record(e)}}}const qw={drag_cell:void 0,hover:void 0};function Fw(e,t){const n=e.currentTarget;n.parentElement?.style.setProperty("--drag-pointer-events","none"),e.stopPropagation(),qw.drag_cell=t}function $w(e,t){if(qw.drag_cell===t)return;const n=e.currentTarget;n.classList.add("cube-cell-selection"),qw.hover=n}function Gw(e,t){e.currentTarget.classList.remove("cube-cell-selection")}function Vw(e,t){const{drag_cell:n,hover:r}=qw,{pcube:o,courier:i,history:s}=t.box;if(!n)return;const a=e.currentTarget;a.parentElement?.style.setProperty("--drag-pointer-events","auto"),r&&r.classList.remove("cube-cell-selection");const l=i.get_recorder();l.tell(o,jw.moveto(o.id,t.box.id,[n.box.id])),s.record(l)}const Uw={anchor:void 0,hover:void 0,down_point:void 0,has_down:!1,has_move:!1};function Kw(e,t){const{root:n,cursor:r}=t;if(e.ctrlKey)e.stopPropagation();else{od.check_mouse_key(e,"left")&&t.clear_selection();const n=e.target;if(!(n instanceof Node))return;const r=t.find_dom_cube(n),o=r?.find_upstream_untill(t);if(!o)return;const i=t.cells.find(e=>e.box===o);if(!i)return;Uw.down_point={x:e.clientX,y:e.clientY},Uw.has_down=!0,Uw.anchor=i}}function Ww(e,t){const{cursor:n}=t,{down_point:r,has_down:o,anchor:i,has_move:s}=Uw;if(!r)return;if(Uw.has_move=Math.sqrt((e.clientX-r.x)**2+(e.clientY-r.y)**2)>5,!o||!i||!s||e.buttons<=0)return;const a=e.target;if(!(a instanceof Node))return;const l=t.find_dom_cube(a),c=l?.find_upstream_untill(t),d=t.cells.find(e=>e.box===c);if(!d||d===i)return void t.clear_selection();const u={left:Math.min(i.col,d.col),right:Math.max(i.col+i.colspan-1,d.col+d.colspan-1),top:Math.min(i.row,d.row),bottom:Math.max(i.row+i.rowspan-1,d.row+d.rowspan-1)},h=t.get_rectarea_cell(u);t.clear_selection();for(let e of h.cells)e.selection=!0;h.cells.length>1&&e.stopPropagation()}function Yw(e,t){const{cursor:n}=t;Uw.has_down=!1,Uw.anchor=void 0}const Xw=["id","data-type"],Jw=En({__name:"cube-table",props:{cube:{}},setup(e){const{status:t}=e.cube,n=In("dragger"),r=In("box");function o(e){return{"grid-row":`${e.row+1}/span ${e.rowspan}`,"grid-column":`${e.col+1}/span ${e.colspan}`}}function i(e){return{"cube-cell-selection":e.selection}}const s=gi(()=>({"grid-template-columns":t.cols.map(e=>e>0?e+"fr":"1fr").join(" ")}));return Zn(()=>{const t=n.value,o=r.value;if(!t||!o)return;let i=e.cube.data.attrs.width,s=i,a={sx:1,sy:1};const l=new Gi.DragDiff(t);l.register_down(()=>{a=e.cube.get_upstream_sum_scale(),i=e.cube.data.attrs.width}),l.register_move((t,n)=>{const r=t/a.sx;i+r<e.cube.min_width||(s=i+r,o.style.width=s+"px")}),l.register_up((t,n)=>{if(s===i)return;const{courier:r,history:o}=e.cube,a=r.get_recorder();a.tell(e.cube,zi.resize(e.cube.id,s)),o.record(a)}),l.register_cancel(()=>{o.style.width=i+"px"})}),(e,a)=>(No(),Oo("div",{ref_key:"box",ref:r,class:"cube-table",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type,onPointerdown:a[0]||(a[0]=t=>Yt(Kw)(t,e.cube)),onPointermove:a[1]||(a[1]=t=>Yt(Ww)(t,e.cube)),onPointerup:a[2]||(a[2]=t=>Yt(Yw)(t,e.cube)),onPointercancel:a[3]||(a[3]=t=>Yt(Yw)(t,e.cube)),onKeyup:a[4]||(a[4]=t=>Yt(Hw)(t,e.cube)),onContextmenu:a[5]||(a[5]=t=>Yt(oc)(t,e.cube))},[e.cube.title?(No(),Eo(Os,{key:0,class:"cube-table-title",cube:qt(e.cube.title)},null,8,["cube"])):Vo("v-if",!0),jo("div",{class:"cube-table-container",style:de(s.value)},[(No(!0),Oo(wo,null,hr(Yt(t).cells,(e,t)=>(No(),Eo(Os,{key:e.box.id,cube:qt(e.box),style:de(o(e)),class:me(i(e)),draggable:"true",onDragstart:t=>Yt(Fw)(t,e),onDragenter:t=>Yt($w)(t,e),onDragleave:t=>Yt(Gw)(t,e),onDrop:t=>Yt(Vw)(t,e)},null,8,["cube","style","class","onDragstart","onDragenter","onDragleave","onDrop"]))),128))],4),jo("div",{class:"cube-table-dragger",ref_key:"dragger",ref:n},null,512)],44,Xw))}}),Zw=(0,Is.A)(Jw,[["__scopeId","data-v-3ea8d380"]]);class Qw extends Rs{_cells=Pt([]);_title=Ut(void 0);constructor(e){super(e)}get cube(){return this._cube}get title(){return this._title.value}get cells(){return[...this._cells]}get info(){return this._data.info}get cols(){return this.info.cols}init(){super.init(),this.update_cells()}update_cells(){return Promise.resolve().then(()=>{this._cells.splice(0,this._cells.length,...this.cube.cells)})}update_title(){return Promise.resolve().then(()=>{this._title.value=this.cube.title})}}function ek(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class tk extends rd{_status=new Qw(this);_cells=[];_title;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get title(){return this._title}set title(e){this._title=e,this.status.update_title()}get component(){return Zw}get cells(){return[...this._cells]}get meta(){return tk.meta}get children(){const e=[],t=this._cells;return t.sort((e,t)=>e.row!==t.row?e.row-t.row:e.col-t.col),this.title&&e.unshift(this.title),e.push(...t.map(e=>e.box)),e}get cells_sorted(){const e=[],t=this._cells;return t.sort((e,t)=>e.row!==t.row?e.row-t.row:e.col-t.col),e.push(...t),e}get css(){const e=this.attrs;return{...super.css,width:e.width+"px"}}get attrs(){return this.data.attrs}get cols(){return this.data.info.cols}get size(){return this.data.info.size}get selection_cells(){const e=[];for(let t of this.cells_sorted)t.selection&&e.push(t);return e}get min_width(){return 500}build_child(e){e.info.title&&(this.title=qt(new Mu(e.info.title,this)));for(let t of e.info.cells){const e=new Mu(t.data,this),n={row:t.row,col:t.col,rowspan:t.rowspan,colspan:t.colspan,box:qt(e),selection:!1};this._cells.push(n)}}export(){const e=this.base_export();this.title&&(e.info.title=this.title.export()),e.info.cells=[];for(let t of this._cells)e.info.cells.push(this.get_cell_data(t));return e}update_data(e,t){return tk.update_data(e,t)}gc(){this.base_gc()}get_cell_data(e){return{row:e.row,col:e.col,rowspan:e.rowspan,colspan:e.colspan,data:e.box.export()}}replace_id(e,t,n={}){return tk.replace_id(this.root,e,t,n)}get_rows(e){const t=[];for(let n of this.cells_sorted)e>=n.row&&e<n.row+n.rowspan&&t.push(n);return t}get_cols(e){const t=[];for(let n of this.cells_sorted)e>=n.col&&e<n.col+n.colspan&&t.push(n);return t}check_orderly_col(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));const r=1===new Set(n.map(e=>e.right)).size,o=1===new Set(n.map(e=>e.left)).size;return r&&o}check_orderly_col_left(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.left)).size}check_orderly_col_right(e){const t=this.get_cols(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.right)).size}check_orderly_row(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));const r=1===new Set(n.map(e=>e.bottom)).size,o=1===new Set(n.map(e=>e.top)).size;return r&&o}check_orderly_row_top(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));new Set(n.map(e=>e.bottom)).size;return 1===new Set(n.map(e=>e.top)).size}check_orderly_row_bottom(e){const t=this.get_rows(e),n=[];for(let e of t)n.push(this.get_cell_area(e));return 1===new Set(n.map(e=>e.bottom)).size}get_cell_area(e){return{left:e.col,right:e.col+e.colspan-1,top:e.row,bottom:e.row+e.rowspan-1}}get_cell(e,t){for(let n of this._cells){const r=e>=n.row&&e<n.row+n.rowspan,o=t>=n.col&&t<n.col+n.colspan;if(r&&o)return n}}get_rectarea_cell(e){let t=!1;for(;!t;){const{left:n,right:r,top:o,bottom:i}=e;for(let s of this._cells){let{row:a,rowspan:l,col:c,colspan:d}=s,u=a,h=a+l-1,p=c,f=c+d-1;if(n>=p&&n<=f||n<=p&&f<=r||r>=p&&r<=f){if(u<o&&h>=o){e.top=a;break}if(u<=i&&h>i){e.bottom=a+l-1;break}}if(o>=u&&o<=h||o<u&&i>=h||i>=u&&i<=h){if(p<n&&f>=n){e.left=c;break}if(p<=r&&f>r){e.right=c+d-1;break}}s===this._cells[this._cells.length-1]&&(t=!0)}}const n=[];for(let t of this.cells_sorted){let{row:r,col:o,rowspan:i,colspan:s}=t;o>=e.left&&o+s-1<=e.right&&r>=e.top&&r+i-1<=e.bottom&&n.push(t)}return{...e,cells:n}}clear_selection(){for(let e of this._cells)e.selection=!1}get_active_cell(){const{cursor:e}=this,{cube_end:t}=e;if(!t)return;const n=t?.find_upstream_untill(this);return this._cells.find(e=>e.box===n)}set_selection_area(e){this.get_rectarea_cell(e);for(let e of this._cells)e.selection=!1;for(let e of this._cells)e.selection=!0}get_focus_cell(){const{cursor:e}=this,{cube_end:t}=e;if(!t)return;const n=t.find_upstream_untill(this);return n?this._cells.find(e=>e.box.id===n.id):void 0}get_selection_area(){let e,t;const n=this.selection_cells;if(0===n.length)return;for(let r of n){const n=this.get_cell_area(r);e||(e=[n.top,n.bottom]),t||(t=[n.left,n.right]),n.top<e[0]&&(e[0]=n.top),n.left<t[0]&&(t[0]=n.left),n.bottom>e[1]&&(e[1]=n.bottom),n.right>t[1]&&(t[1]=n.right)}if(!e||!t)return;return{left:t[0],right:t[1],top:e[0],bottom:e[1]}}get_selection_size(){const e=this.get_selection_area();if(e)return[e.bottom-e.top+1,e.right-e.left+1]}get_selection_text(){const e=this.selection_cells;let t="";if(0===e.length)return t;for(let n of e)t+=n.box.text;return t}copy_selection_table(){const e=this.get_selection_size(),t=this.selection_cells,n=this.get_selection_area();if(!e||!t||!n)return;const r=[];for(let e of t)r.push({row:e.row-n.top,col:e.col-n.left,rowspan:e.rowspan,colspan:e.colspan,data:e.box.export()});const o=tk.get_default_by_data(e,r);return o.attrs=structuredClone(Ht(this.attrs)),o}add_title(e){const{data:t}=e,{courier:n,cursor:r,id:o}=this,i=n.get_recorder();i.add_cmd(e);const s=new Mu(t,this);return this.title=qt(s),i.add_recover(jw.remove_title(o)),i}remove_title(e){const{id:t,courier:n,cursor:r}=this;if(!this.title)return;const o=this.title.export(),i=n.get_recorder();return i.add_cmd(e),this.title=void 0,i.add_recover(jw.add_title(t,o)),i}add_cell(e){const{id:t,courier:n,cursor:r}=this,{data:o}=e;this.clear_selection();const i=n.get_recorder();i.add_cmd(e);const s={row:o.row,col:o.col,rowspan:o.rowspan,colspan:o.colspan,box:qt(new Mu(o.data,this)),selection:!1};return this._cells.push(s),i.add_recover(jw.remove_cell(t,s.box.id)),this.status.update_cells(),i}remove_cell(e){const{id:t,courier:n,cursor:r}=this,{cid:o}=e,i=n.get_recorder();i.add_cmd(e);const s=this._cells.findIndex(e=>e.box.id===o),a=this._cells[s];if(!a)return;const l={row:a.row,col:a.col,rowspan:a.rowspan,colspan:a.colspan,data:a.box.export()};return s>=0&&(this._cells.splice(s,1),this.status.update_cells()),i.add_recover(jw.add_cell(t,l)),i}add_row(e){const{courier:t,cursor:n,id:r}=this,{index:o,rows:i}=e,s=t.get_recorder(),a=[];for(let e=0;e<i.length;e++){const t=i[e];a.push({row:o,col:e,rowspan:1,colspan:1,data:t})}this.size[0]++;for(let e of this._cells)e.row<o||s.tell(this,jw.update_cell_area(r,e.box.id,{row:e.row+1,col:e.col,rowspan:e.rowspan,colspan:e.colspan}));for(let e of a)s.tell(this,jw.add_cell(r,e));return s}remove_row(e){const{id:t,courier:n,cursor:r}=this,{index:o}=e,i=this.get_rows(o),s=n.get_recorder();for(let e of i)s.tell(this,jw.remove_cell(t,e.box.id));return this.size[0]--,s}add_col(e){const{id:t,cursor:n,courier:r}=this,{index:o,cols:i}=e,s=r.get_recorder(),a=[];for(let e=0;e<i.length;e++){const t=i[e];a.push({row:e,col:o,rowspan:1,colspan:1,data:t})}s.tell(this,jw.add_grid_col(t,o,2));for(let e of this._cells)e.col<o||s.tell(this,jw.update_cell_area(t,e.box.id,{row:e.row,col:e.col+1,rowspan:e.rowspan,colspan:e.colspan}));for(let e of a)s.tell(this,jw.add_cell(t,e));return s}remove_col(e){const{id:t,cursor:n,courier:r}=this,{index:o}=e;if(!this.check_orderly_col(o))return vi.tips?.tip_info("目标列不整齐");let i;for(let e=0;e<=this.size[0]&&(i||(i=this.get_cell(e,o),!i));e++);if(!i)return;const s=r.get_recorder();for(let e=i.col;e<i.col+i.colspan;e++)s.tell(this,jw.remove_grid_col(t,e));const a=this.get_cols(o);for(let e of a)s.tell(this,jw.remove_cell(t,e.box.id));for(let e of this._cells){if(e.col<o)continue;const n={row:e.row,col:e.col-1,rowspan:e.rowspan,colspan:e.colspan};s.tell(this,jw.update_cell_area(t,e.box.id,n))}return s}moveto(e){const{id:t,courier:n,cursor:r}=this,{tid:o,cells:i}=e,s=n.get_recorder(),a=this._cells.find(e=>e.box.id===o);if(!a)return;const l=a.box,c=this.cells_sorted.filter(e=>e.box.id!==o&&i.includes(e.box.id));for(let e of c){const n=e.box.export();s.tell(this,jw.remove_cell(t,e.box.id)),s.tell(l,zi.insert_child(l.id,n.info,l.child_count))}return s}update_area(e){const{id:t,courier:n,cursor:r}=this,{tid:o,area:i}=e,s=n.get_recorder(),a=this._cells.find(e=>e.box.id===o);if(!a)return;s.add_cmd(e);const l={row:a.row,col:a.col,rowspan:a.rowspan,colspan:a.colspan};return a.row=i.row,a.col=i.col,a.rowspan=i.rowspan,a.colspan=i.colspan,s.add_recover(jw.update_cell_area(t,o,l)),s}merge_cell(e){const{id:t,cursor:n,courier:r}=this,{area:o}=e,i=r.get_recorder(),s=this.get_rectarea_cell(o);let a=s.cells[0];if(!a)return;const l={row:o.top,col:o.left,rowspan:o.bottom-o.top+1,colspan:o.right-o.left+1},c=a.box.id;return i.tell(this,jw.update_cell_area(t,c,l)),i.tell(this,jw.moveto(t,c,s.cells.map(e=>e.box.id))),i}add_grid_col(e){const{id:t,courier:n,cursor:r}=this,{index:o,width:i}=e,s=n.get_recorder();return s.add_cmd(e),this.cols.splice(o,0,i),this.size[1]++,s.add_recover(jw.remove_grid_col(t,o)),s}remove_grid_col(e){const{id:t,courier:n,cursor:r}=this,{index:o}=e,i=n.get_recorder(),s=this.cols.splice(o,1);if(0!==s.length)return this.size[1]--,i.add_recover(jw.add_grid_col(t,o,s[0])),i}col_resize(e){const{id:t,courier:n,cursor:r}=this,{cols:o,step:i}=e,s=n.get_recorder();s.add_cmd(e);let a=!1;for(let e=o[0];e<=o[1];e++){let t=this.cols[e]+i;t<=0||(a=!0,this.cols[e]=t)}if(a)return s.add_recover(jw.col_resize(t,o,-i)),s}delete_child(e){const{dir:t,range:n,reserve:r}=e;if(!this.is_valid_range(n))return;const{courier:o,cursor:i,history:s}=this,a=o.get_recorder();let[l,c]=n;if(0===l&&c>=this.child_count)if(r){if(this.is_empty)return;const e=this.child_first;a.tell(this,zi.delete_child(this.id,"backward",[1,this.child_count],r)),a.tell(e,zi.delete_child(e.id,"backward",[0,e.child_count],r))}else a.merge(this.remove_self());else{let e=[];for(let t=l;t<c;t++){let n=this.children[t];e.push(n.id)}for(let t of e)a.tell(this,jw.remove_cell(this.id,t))}return a}static get meta(){return{cubename:"表格",type:S.Cubes.table,block:!0,version:1,show:!0}}static get_default(e=3,t=3){const n=[],r=[];r.length=t,r.fill(2);for(let r=0;r<e;r++)for(let e=0;e<t;e++){const t={row:r,col:e,rowspan:1,colspan:1,data:Mu.get_default()};n.push(t)}return{id:od.get_id(),type:S.Cubes.table,info:{size:[e,t],cols:r,cells:n},attrs:{width:500},css:{}}}static get_default_by_data(e,t){const[n,r]=e,o=[];return o.length=r,o.fill(2),{id:od.get_id(),type:S.Cubes.table,info:{size:[n,r],cols:o,cells:t},attrs:{width:500},css:{}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();r[o]=i,n.id=i,n.info.title&&(n.info.title=Mu.replace_id(e,t,n.info.title,r));for(let o of n.info.cells)o.data=Mu.replace_id(e,t,o.data,r);return n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}ek([Ri(h.Names.add_title)],tk.prototype,"add_title",null),ek([Ri(h.Names.remove_title)],tk.prototype,"remove_title",null),ek([Ri(h.Names.add_cell)],tk.prototype,"add_cell",null),ek([Ri(h.Names.remove_cell)],tk.prototype,"remove_cell",null),ek([Ri(h.Names.add_row)],tk.prototype,"add_row",null),ek([Ri(h.Names.remove_row)],tk.prototype,"remove_row",null),ek([Ri(h.Names.add_col)],tk.prototype,"add_col",null),ek([Ri(h.Names.remove_col)],tk.prototype,"remove_col",null),ek([Ri(h.Names.moveto)],tk.prototype,"moveto",null),ek([Ri(h.Names.update_area)],tk.prototype,"update_area",null),ek([Ri(h.Names.merge)],tk.prototype,"merge_cell",null),ek([Ri(h.Names.add_grid_col)],tk.prototype,"add_grid_col",null),ek([Ri(h.Names.remove_grid_col)],tk.prototype,"remove_grid_col",null),ek([Ri(h.Names.col_resize)],tk.prototype,"col_resize",null),ek([Ri(_.Names.cube_delete_child)],tk.prototype,"delete_child",null),tk=ek([Si],tk);const nk=["id","data-type"],rk=En({__name:"cube-tip",props:{cube:{}},setup(e){const{status:t}=e.cube;return(e,n)=>(No(),Oo("div",{class:"cube-tip",style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type,onContextmenu:n[0]||(n[0]=t=>Yt(oc)(t,e.cube))},[Ho(Os,{cube:e.cube.box},null,8,["cube"])],44,nk))}}),ok=(0,Is.A)(rk,[["__scopeId","data-v-525ea373"]]);class ik extends Rs{constructor(e){super(e)}}function sk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class ak extends rd{_status=new ik(this);_box;constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return ok}get box(){return this._box}set box(e){this._box=e}get children(){return[this.box]}replace_id(e,t,n={}){return ak.replace_id(this.root,e,t,n)}build_child(e){this.box=new Mu(e.info,this)}update_data(e,t){return ak.update_data(e,t)}export(){const e=this.base_export();return e.info=this.box.export(),e}gc(){super.base_gc()}on_insert_child(e){const{courier:t}=this,{pos:n,data:r}=e,o=t.get_recorder();if(o.add_cmd(e),0===r.length)return;if(!this.meta.block)return;let i=this.get_valid_index(n);const s=this.create_child_block(r);this.splice(i,0,...s),o.add_recover(zi.delete_child(this.id,"backward",[i,i+s.length]));const a=this.children[i+1];return a?o.tell(a,Ni.in_head(a.id)):o.tell(this.child_last,Ni.in_tail(this.child_last.id)),o}on_delete_child(e){const{courier:t,pid:n,index:r,pcube:o}=this,i=t.get_recorder();i.add_cmd(e);const{dir:s,range:a}=e;if(!this.is_valid_range(a))return;const[l,c]=a;let d=l<0?0:l,u=c>this.child_count?this.child_count:c;if(d>=u)return;if(d<=0&&u>=this.child_count)return this.is_empty?i.tell(o,zi.delete_child(n,s,[r,r+1])):i.tell(this,zi.reset(this.id,[])),i;const h=this.children[d-1],p=this.children[u],f=u-d;let m=this.splice(l,f);return i.add_recover(zi.insert_child(this.id,m.data,l)),"backward"===s?h?i.tell(h,Ni.in_tail(h.id)):p&&i.tell(p,Ni.in_head(p.id)):"forward"===s&&(p?i.tell(p,Ni.in_head(p.id)):h&&i.tell(h,Ni.in_tail(h.id))),i}get meta(){return ak.meta}static get meta(){return{cubename:"提示",type:S.Cubes.tip,block:!0,version:1,show:!0}}static get_default(e,t={},n={}){return{id:od.get_id(),type:S.Cubes.tip,info:Mu.get_default(e),attrs:n,css:t}}static get_default_by_string(e,t={},n={}){const r=hu.get_default_by_string(e),o=Mu.get_default([r]);return{id:od.get_id(),type:S.Cubes.tip,info:o,attrs:n,css:t}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,n.info=Mu.replace_id(e,t,n.info,r),n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}sk([Ri(_.Names.cube_insert_child)],ak.prototype,"on_insert_child",null),sk([Ri(_.Names.cube_delete_child)],ak.prototype,"on_delete_child",null),ak=sk([Si],ak);const lk={class:"map-status"},ck=En({__name:"submap-status",props:{cube:{}},setup(e){const{status:t}=e.cube;function n(t){const n=e.cube.dom_rect,r={x:n.x+n.width/2,y:n.y+n.height/2};e.cube.scale_by_point(r,t,t)}return(e,r)=>(No(),Oo("div",lk,[jo("span",{class:"iconfont icon-icon_window_small_new-copy-copy",onClick:r[0]||(r[0]=e=>n(-.1))}),jo("span",null,ve((100*t.matrix2d.a).toFixed(0)+"%"),1),jo("span",{class:"iconfont icon-add",onClick:r[1]||(r[1]=e=>n(.1))})]))}}),dk=(0,Is.A)(ck,[["__scopeId","data-v-432c737f"]]),uk=["id","data-type"],hk=["transform"],pk=["data-group"],fk=["data-group"],mk=["d"],_k=["data-group"],gk=["data-group"],bk=["data-group"],xk=["d"],vk=["d","marker-start","marker-end"],yk=["d"],wk=En({__name:"cube-submap",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Vt(),r=Vt(),o=new ResizeObserver(t=>{e.cube.get_view_rect()}),i=Vt();let s;function a(){e.cube.dom_svg_rect}return Zn(()=>{const t=r.value;t&&o.observe(t);const a=n.value;a&&e.cube.map_interaction.register(a);const l=i.value;if(!l)return;s=new Gi.DragDiff(l);let c=e.cube.attrs.width,d=e.cube.attrs.height,u=c,h=d,p={sx:1,sy:1};s.register_down(()=>{p=e.cube.get_upstream_sum_scale(),c=e.cube.attrs.width,d=e.cube.attrs.height}),s.register_move((e,t)=>{u=Math.round(e/p.sx+c),h=Math.round(t/p.sy+d),a.style.width=u+"px",a.style.height=h+"px"}),s.register_up((t,n)=>{if(c===u&&d===h)return;const r=e.cube.courier.get_recorder();r.tell(e.cube,zi.resize(e.cube.id,u,h)),e.cube.history.record(r),e.cube.check_show()}),s.register_cancel(()=>{e.cube.attrs.width=c,e.cube.attrs.height=d})}),nr(()=>{s?.off()}),(e,o)=>(No(),Oo("div",{class:"cube-submap",id:e.cube.id,style:de(Yt(t).css),"data-type":e.cube.type,ref_key:"box",ref:n,onClick:a},[(No(),Oo("svg",{ref_key:"svg",ref:r,onContextmenu:o[0]||(o[0]=t=>Yt(oc)(t,e.cube))},[jo("g",{transform:Yt(t).matrix2d_dom_string},[jo("g",{"data-group":Yt(v).markers,class:"group-defs"},[...o[1]||(o[1]=[Go('<defs data-v-7cb94390>\x3c!-- 箭头 --\x3e<marker id="marker-arrow" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><path d="M 0 0 L 6 3 L 0 6 z" data-v-7cb94390></path></marker>\x3c!-- 圆 --\x3e<marker id="marker-point" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><circle cx="3" cy="3" r="3" data-v-7cb94390></circle></marker>\x3c!-- 方块 --\x3e<marker id="marker-square" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="auto" fill="context-stroke" data-v-7cb94390><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-7cb94390></rect></marker>\x3c!-- 菱形 --\x3e<marker id="marker-rhomb" refX="3" refY="3" markerWidth="6" markerHeight="6" orient="45" fill="context-stroke" data-v-7cb94390><rect x="0" y="0" width="6" height="6" rx="1" ry="1" data-v-7cb94390></rect></marker></defs>',1)])],8,pk),jo("g",{"data-group":Yt(v).outbox,class:"group-outbox"},[(No(!0),Oo(wo,null,hr(Yt(t).nodes_outbox,e=>(No(),Oo("path",{key:e.id,class:"node-outbox",d:e.status.outbox},null,8,mk))),128))],8,fk),jo("g",{"data-group":Yt(v).linkers,class:"group-linkers"},[(No(!0),Oo(wo,null,hr(Yt(t).linkers_view,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],8,_k),jo("g",{"data-group":Yt(v).nodes,class:"group-nodes"},[(No(!0),Oo(wo,null,hr(Yt(t).nodes_view,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],8,gk),jo("g",{"data-group":Yt(v).placeholder,class:"group-placeholder"},[Yt(t).placeholder_box_selector?(No(),Oo("path",{key:0,class:"placeholder-box-selector",d:Yt(t).placeholder_box_selector},null,8,xk)):Vo("v-if",!0),(No(!0),Oo(wo,null,hr(Yt(t).placeholder_linkers,e=>(No(),Oo(wo,null,[e?(No(),Oo("path",{key:0,class:"placeholder-linker",d:e.path,style:de({stroke:e.stroke,"stroke-width":e.width}),"marker-start":`url(#${e.anchor_start})`,"marker-end":`url(#${e.anchor_end})`},null,12,vk)):Vo("v-if",!0)],64))),256)),Yt(t).placeholder_line_delete?(No(),Oo("path",{key:1,class:"placeholder-line-delete",d:Yt(t).placeholder_line_delete,stroke:"#ff7f7f","marker-start":"url(#marker-point)","marker-end":"url(#marker-arrow)"},null,8,yk)):Vo("v-if",!0),Ho(Ws,{cube:e.cube},null,8,["cube"])],8,bk)],8,hk)],544)),Ho(dk,{cube:e.cube},null,8,["cube"]),jo("div",{class:"submap-dragger",ref_key:"dragger",ref:i},null,512)],12,uk))}}),kk=(0,Is.A)(wk,[["__scopeId","data-v-7cb94390"]]);class Sk extends Rs{_nodes_count=Vt(0);_view_rect=Pt({x:0,y:0,width:0,height:0});_nodes_view=Ot(new Set);_linkers_view=Ot(new Set);_nodes_selected=Ot(new Set);_nodes_editing=Ot(new Set);_nodes_outbox=Ot(new Set);_line_delete_selected=Ot(new Set);_nodes_dragging=Ot(new Set);_placeholder_linkers=Pt([]);_placeholder_box_selector=Vt("");_placeholder_line_delete=Vt("");constructor(e){super(e)}get css(){return{...super.css,width:this.attrs.width+"px",height:this.attrs.height+"px"}}get attrs(){return this._data.attrs}get matrix2d(){return{...this.attrs.matrix2d}}get line_delete_selected(){return new Set(this._line_delete_selected)}get view_rect(){return{...this._view_rect}}get view_center(){const e=this._view_rect;return{x:e.x+e.width/2,y:e.y+e.height/2}}get nodes_count(){return this._nodes_count.value}get map(){return this._cube}get matrix2d_dom_string(){return Zi.get_dom_string(this.matrix2d)}get placeholder_linkers(){return[...this._placeholder_linkers]}get placeholder_box_selector(){return this._placeholder_box_selector.value}get placeholder_line_delete(){return this._placeholder_line_delete.value}get nodes_view(){return new Set(this._nodes_view)}get linkers_view(){return new Set(this._linkers_view)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_outbox(){return new Set(this._nodes_outbox)}reset_nodes_view(e){this._nodes_view.clear();for(let t of e)this._nodes_view.add(t)}reset_nodes_outbox(e){this._nodes_outbox.clear();for(let t of e)this._nodes_outbox.add(t)}reset_linkers_view(e){this._linkers_view.clear();for(let t of e)this._linkers_view.add(t)}remove_linker(e){this._linkers_view.delete(e),this._line_delete_selected.delete(e)}remove_node(e){this._nodes_view.delete(e),this._nodes_selected.delete(e),this._nodes_editing.delete(e),this._line_delete_selected.delete(e),this._nodes_dragging.delete(e),this._nodes_outbox.delete(e),this._nodes_count.value--}set_node_visible(e,t){t?this._nodes_view.add(e):this._nodes_view.delete(e)}set_linker_visible(e,t){t?this._linkers_view.add(e):this._linkers_view.delete(e)}set_node_editing(e,t){t?this._nodes_editing.add(e):this._nodes_editing.delete(e)}set_node_selected(e,t){t?this._nodes_selected.add(e):this._nodes_selected.delete(e)}set_node_outbox(e,t){t?this._nodes_outbox.add(e):this._nodes_outbox.delete(e)}set_line_deleted(e,t){t?this._line_delete_selected.add(e):this._line_delete_selected.delete(e)}is_node_visible(e){return this._nodes_view.has(e)}is_linker_visible(e){return this._linkers_view.has(e)}is_node_editing(e){return this._nodes_editing.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}clear_line_deleted(){this._line_delete_selected.clear()}clear_node_editing(){for(let e of this.nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear()}clear_node_outbox(){this._nodes_outbox.clear()}update_matrix2d(e){Object.assign(this.attrs.matrix2d,e||this.map.matrix2d)}update_view_rect(e){Object.assign(this._view_rect,e)}update_placeholder_box_selector(e){this._placeholder_box_selector.value=e}update_placeholder_line_delete(e){this._placeholder_line_delete.value=e}update_placeholder_linkers(e){this._placeholder_linkers.length=0,this._placeholder_linkers.push(...e)}add_placeholder_linker(e){this._placeholder_linkers.push(e)}update_nodes_count(e){this._nodes_count.value=e}get nodes_dragging(){return new Set(this._nodes_dragging)}set_node_dragging(e,t){t?this._nodes_dragging.add(e):this._nodes_dragging.delete(e)}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_nodes_dragging(){this._nodes_dragging.clear()}}function Ck(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Mk extends rd{_status=new Sk(this);_map_interaction=new ws(this);_grider=new th(this);_has_layout=!1;_display_success=!1;_nodes=new Map;_linkers=new Map;_node_from=this.data.info.node_from;_node_to=this.data.info.node_to;_nodes_editing=new Set;_nodes_selected=new Set;_nodes_outbox=new Set;_line_delete_selected=new Set;_nodes_dragging=new Set;_view_nodes=new Set;_view_linkers=new Set;_view_rect={x:0,y:0,width:0,height:0};constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get grider(){return this._grider}get nodes(){return new Map(this._nodes)}get linkers(){return new Map(this._linkers)}get nodes_selected(){return new Set(this._nodes_selected)}get nodes_outbox(){return new Set(this._nodes_outbox)}get nodes_editing(){return new Set(this._nodes_editing)}get nodes_view(){return new Set(this._view_nodes)}get linkers_view(){return new Set(this._view_linkers)}get line_deleted(){return new Set(this._line_delete_selected)}get nodes_count(){return this._nodes.size}get linkers_count(){return this._linkers.size}get attrs(){return this.data.attrs}get has_layout(){return this._has_layout}get view_rect(){return{...this._view_rect}}get matrix2d(){return this.attrs.matrix2d}get dom_rect(){const e=this.dom;return e?e.getBoundingClientRect():new DOMRect(0,0,0,0)}get dom_svg_rect(){const e=this.dom?.getElementsByTagName("svg");return e?e[0].getBoundingClientRect():new DOMRect(0,0,0,0)}get matrix2d_dom_string(){return Zi.get_dom_string(this.matrix2d)}get map_interaction(){return this._map_interaction}get domain(){return"doc"}get meta(){return Mk.meta}get component(){return kk}find_layout_root(e){const t=new Set;for(let n of e){n.is_layout_root&&t.add(n)}return t}wait_nodes_render(e){const t=[];for(let n of e)t.push(n.wait_layout_self());return Promise.all(t)}find_cube(e){const t=this.linkers.get(e);if(t)return t;for(let t of this._nodes.values()){const n=t.find_cube(e);if(n)return n}}filter(e){const t=[];for(let n of this._linkers.values())e(n)&&t.push(n),t.push(...n.filter(e));for(let n of this._nodes.values())e(n)&&t.push(n),t.push(...n.filter(e));return t}each(e){for(let t of this._linkers.values())e(t),t.each(e);for(let t of this._nodes.values())e(t),t.each(e)}find_child_cube(e){}check_show(){this.check_show_node(),this.check_show_line()}check_show_node(){this._view_nodes.clear();const e=this._grider.get_viewport_griders();for(let t of e)for(let e of t.nodes)if(!e.env.folded_upstream){this._view_nodes.add(e);e.map2d.sync_rect()}this.status.reset_nodes_view(this._view_nodes)}check_show_line(){this._view_linkers.clear();for(let e of this._view_nodes)e.check_show_line();this.status.reset_linkers_view(this._view_linkers);for(let e of this._view_linkers)e.map2d.update_path()}layout(){for(let e of this._nodes.values())e.is_layout_root&&e.attrs.layout&&e.layout()}layout_throttle=Gi.Notice.throttle(this.layout.bind(this),10);check_show_throttle=Gi.Notice.throttle(this.check_show.bind(this),10);init_env(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&e.push(t);for(let t of e)t.env.flow()}init_map2d(){const e=[];for(let t of this._nodes.values())t.is_layout_root&&t.attrs.layout&&e.push(t);for(let t of e)t.map2d.flow()}check_in_view(e){const{innerHeight:t,innerWidth:n}=window;return!(e.y>t||e.y+e.height<0)&&!(e.x>n||e.x+e.width<0)}build_child(e){const{nodes:t,linkers:n}=e.info;for(let e of t){let t=new Zu(e,this);this._nodes.set(t.id,t),t.attrs.outbox&&this._nodes_outbox.add(t),t.layouted||this._view_nodes.add(t)}this.status.reset_nodes_view(this._view_nodes),this.status.reset_nodes_outbox(this._nodes_outbox),this.status.update_nodes_count(this._nodes.size);for(let e of n){const t=this.get_node(e.attrs.from),n=this.get_node(e.attrs.to);if(!t||!n)continue;const r=new Bu(e,this);this._linkers.set(r.id,r)}this.init_env(),this.wait_nodes_render(this._view_nodes).then(async e=>{await od.sleep(50),this.init_map2d(),this.init_grider(),this.check_show(),this._has_layout=!0})}init_grider(){this._grider.update_nodes(this._nodes.values())}update_data(e,t){return Mk.update_data(e,t)}export(){const e={nodes:[],linkers:[],node_from:structuredClone(this._node_from),node_to:structuredClone(this._node_to)},t=structuredClone({...this.data,info:e});for(let e of this._nodes.values())t.info.nodes.push(e.export());for(let e of this._linkers.values())t.info.linkers.push(e.export());return t}remove_node(e){this._nodes.delete(e.id),this._view_nodes.delete(e),this._nodes_outbox.delete(e),this.grider.remove_node(e),this.status.remove_node(e),e.gc(),this.status.update_nodes_count(this._nodes.size)}remove_linker(e){const t=this._node_to[e.from_id],n=this._node_from[e.to_id];let r;if(t&&n){const o=t.indexOf(e.to_id),i=n.indexOf(e.from_id);t.splice(o,1),n.splice(i,1),r={linker:e.export(),index_to:o,index_from:i}}return this._linkers.delete(e.id),this._view_linkers.delete(e),this.status.set_linker_visible(e,!1),this.status.remove_linker(e),e.gc(),r}is_noop_sibling_move(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;return o===("prev"===r?i:i+1)}reorder_siblings(e,t,n,r){const o=e.indexOf(t),i=e.indexOf(n);if(o<0||i<0)return!1;e.splice(o,1);const s=e.indexOf(n),a="prev"===r?s:s+1;return e.splice(a,0,t),!0}on_node_add(e){const{data:t}=e,{cursor:n,courier:r,history:o}=this,i=r.get_recorder();i.add_cmd(e);const s=od.build_cubes(t,this);this.pick(...s);const a=t.map(e=>e.id);return i.add_recover(es.node_remove(this.id,a)),Promise.resolve().then(async()=>{const e=s.map(e=>e.wait_layout_self());await Promise.all(e),this.grider.update_nodes(s)}),i}on_node_remove(e){const{data:t}=e,{courier:n,cursor:r,history:o}=this;if(0===t.length)return;const i=n.get_recorder();i.add_cmd(e);const s=[],a=new Set,l=new Set,c=new Set;for(let e of t){const t=this.get_node(e);if(t){a.add(t);for(let e of t.env.downstream_nodes)a.add(e)}}for(let e of a){for(const t of e.linkers_from)c.add(t.id);for(const t of e.linkers_to)c.add(t.id)}let d=new Set;for(let e of a){s.push(e.export());const t=e.env.layout_root;t&&t!==e&&l.add(e.env.layout_root);e.env.upstream&&d.add(e.env.upstream),this.remove_node(e)}for(let e of d)e.env.flow("self");return i.tell(this,es.linker_remove(this.id,[...c],!1)),i.add_recover(es.node_add(this.id,s)),i}on_linker_add(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this,s=r.get_recorder();if(0===t.length)return;let a=Promise.resolve();s.add_cmd(e);const l=[],c=[],d=new Set;for(let e of t){const{index_to:t,index_from:n,linker:r}=e,o=new Bu(r,this),i=o.from_node,s=o.to_node;if(!i||!s)continue;this.pick(o);let a=this.get_node_from(o.to_id),u=this.get_node_to(o.from_id);a?a.indexOf(o.from_id)<0&&a.splice(n,0,o.from_id):this._node_from[o.to_id]=[o.from_id],u?u.indexOf(o.to_id)<0&&u.splice(t,0,o.to_id):this._node_to[o.from_id]=[o.to_id],l.unshift(o.id),c.push(s.wait_layout_self()),d.add(i)}const u=new Set;for(let e of d){e.env.flow("downstream"),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&u.add(t)}return s.add_recover(es.linker_remove(this.id,l,n)),a.then(async()=>{await Promise.all(c);for(let e of u)e.layout_throttle();0===u.size&&this.check_show()}),s}on_linker_remove(e){const{data:t}=e,n=e.to_root??!0,{courier:r,cursor:o,history:i}=this;if(0===t.length)return;const s=r.get_recorder();s.add_cmd(e);const a=[],l=new Set,c=new Set;for(let e of t){const t=this.get_linker(e);if(!t)continue;const n=t.from_node,r=t.to_node;n&&l.add(n),r&&c.add(r);const o=this.remove_linker(t);o&&a.unshift(o)}if(0===a.length)return;if(n)for(let e of c){if(!e.env.check_env(!1).has_root){const t=ts.layout_change(e.id,{root:!0});s.tell(e,t)}}const d=new Set;for(let e of l){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&d.add(t)}for(let e of d)e.layout_throttle();return this.check_show_throttle(),s.add_recover(es.linker_add(this.id,a)),s}on_node_drag(e){const{data:t}=e;if(0===t.length)return;const n=this.courier.get_recorder();n.add_cmd(e);const r=new Set,o=new Set;for(let e of t){const t=this.get_node(e.node_id);if(t)if(e.intention){const i=this.get_node(e.intention.target_id);if(!i)continue;const{type:s}=e.intention,a=t.env.upstream,l=t.env.layout_root,c="child"===s?i:i.env.upstream;if(!c)continue;if(c===t)continue;if(t.env.downstream_nodes.has(c))continue;if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[];if(a===c&&this.is_noop_sibling_move(e,t.id,i.id,s))continue}if(a&&r.add(a),r.add(c),r.add(t),l&&o.add(l),a?.env.layout_root&&o.add(a.env.layout_root),c.env.layout_root&&o.add(c.env.layout_root),("prev"===s||"next"===s)&&a===c){const e=this.get_node_to(c.id)||[];this.reorder_siblings(e,t.id,i.id,s);continue}if(a&&a!==c){const e=this.get_linker_id(a.id,t.id);n.tell(this,es.linker_remove(this.id,[e],!1))}if(t.is_layout_root&&n.tell(t,ts.layout_change(t.id,{root:!1})),"child"===s){const e=Qi.create_linker_info(this,i.id,t.id);n.tell(this,es.linker_add(this.id,[e],!1))}else if("prev"===s||"next"===s){const e=this.get_node_to(c.id)||[],r=e.indexOf(i.id),o="prev"===s?r:r+1,a={linker:Bu.get_default(c.id,t.id),index_to:o<0?e.length:o,index_from:this.get_node_from(t.id)?.length||0};n.tell(this,es.linker_add(this.id,[a],!1))}}else if(e.matrix2d){const r=ts.layout_change(t.id,{matrix2d:e.matrix2d});n.tell(t,r)}}for(let e of r){e.env.flow(),e.map2d.flow("downstream"),e.map2d.flow("upstream");const t=e.env.layout_root;t&&o.add(t)}for(let e of o)e.layout_throttle();return this.check_show_throttle(),n}replace_id(e,t,n={}){return Mk.replace_id(this.root,e,t,n)}pick(...e){for(let t of e)t instanceof Qc?(this._nodes.set(t.id,t),this._view_nodes.add(t),this.status.set_node_visible(t,!0)):t instanceof Bu&&(this._linkers.set(t.id,t),this._view_linkers.add(t),this.status.set_linker_visible(t,!0));this.status.update_nodes_count(this._nodes.size)}get_nodes_all(){return{...this._nodes}}get_linkers_all(){return{...this._linkers}}get_nodes_selected(){return new Set(this._nodes_selected)}get_nodes_view(){return new Set(this._view_nodes)}get_nodes_intersection(e){const t=this.grider.get_intersection_nodes(e);return Array.from(t)}get_linkers_view(){return new Set(this._view_linkers)}get_line_deleted(){return new Set(this._line_delete_selected)}get_linker_id(e,t){return Qi.get_linker_id(e,t)}get_linker(e){return this._linkers.get(e)}get_node(e){return this._nodes.get(e)}get_node_from(e){return this._node_from[e]}get_node_to(e){return this._node_to[e]}get_view_rect(){const{clientHeight:e,clientWidth:t}=document.documentElement,n=this.dom_svg_rect,r=Math.max(n.left,0),o=Math.min(n.right,t),i={x:r,y:Math.max(0,n.top)},s={x:o,y:Math.min(n.bottom,e)},a=this.view_point_to_real(i),l=this.view_point_to_real(s),c=l.x-a.x,d=l.y-a.y,u={x:a.x,y:a.y,width:c,height:d};return Object.assign(this._view_rect,u),this.status.update_view_rect(u),u}get_view_center(){const e=this.get_view_rect();return{x:e.x+e.width/2,y:e.y+e.height/2}}get_view_cube(e=!0){const t=this.view_rect,n=[],r=this.grider.get_intersection_nodes(t);for(let t of r)!e&&t.env.folded_upstream||(n.push(t),n.push(...t.linkers_from),n.push(...t.linkers_to));return n}set_node_outbox(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_outbox.add(n):this._nodes_outbox.delete(n),this.status.set_node_outbox(n,t))}set_node_visible(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._view_nodes.add(n):this._view_nodes.delete(n))}set_linker_visible(e,t){const n="string"==typeof e?this.get_linker(e):e;n&&(t?this._view_linkers.add(n):this._view_linkers.delete(n))}set_node_editing(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_editing.add(n):this._nodes_editing.delete(n),this.status.set_node_editing(n,t))}set_node_selected(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_selected.add(n):this._nodes_selected.delete(n),this.status.set_node_selected(n,t))}set_line_deleted(e,t){const n="string"==typeof e?this.get_node(e)||this.get_linker(e):e;n&&(t?this._line_delete_selected.add(n):this._line_delete_selected.delete(n),this.status.set_line_deleted(n,t))}clear_node_outbox(){this._nodes_outbox.clear()}clear_node_editing(){for(let e of this._nodes_editing)e.editable=!1;this._nodes_editing.clear()}clear_node_selected(){this._nodes_selected.clear(),this.status.clear_node_selected()}clear_line_deleted(){this._line_delete_selected.clear(),this.status.clear_line_deleted()}set_node_dragging(e,t){const n="string"==typeof e?this.get_node(e):e;n&&(t?this._nodes_dragging.add(n):this._nodes_dragging.delete(n),this.status.set_node_dragging(n,t))}is_node_dragging(e){return this._nodes_dragging.has(e)}clear_node_dragging(){this._nodes_dragging.clear(),this.status.clear_nodes_dragging()}is_node_editing(e){return this._nodes_editing.has(e)}is_node_visible(e){return this._view_nodes.has(e)}is_linker_visible(e){return this._view_linkers.has(e)}is_node_selected(e){return this._nodes_selected.has(e)}is_line_deleted(e){return this._line_delete_selected.has(e)}get_farest_node_selected(e){if(0!==this._nodes_selected.size){if(e===C.Keys.left){let e;for(let t of this._nodes_selected){const n=t.map2d.rect;(!e||n.x<e.map2d.pos.x)&&(e=t)}return e}if(e===C.Keys.right){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.x+n.width>r.x+r.width)&&(e=t)}return e}if(e===C.Keys.down){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y+n.height>r.y+r.height)&&(e=t)}return e}if(e===C.Keys.up){let e;for(let t of this._nodes_selected){const n=t.map2d.rect,r=e?.map2d.rect;(!r||n.y<r.y)&&(e=t)}return e}}}get_nearest_node(e,t){const n=e.map2d.rect;let r=e,o=1/0;if(t===C.Keys.left)for(let t of this._nodes.values()){if(!t.show||e===t)continue;const i=t.map2d.rect;if(i.x>n.x||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.right)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.x+i.width<n.x+n.width||i.y+i.height<n.y||i.y>n.y+n.height)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.up)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y>n.y||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}else if(t===C.Keys.down)for(let t of this._nodes.values()){if(e===t)continue;let i=t.map2d.rect;if(i.y+i.height<n.y+n.height||i.x>n.x+n.width||i.x+i.width<n.x)continue;const s=Gi.MathRect.distance_with(n,i);s<o&&(r=t,o=s)}return r}move_select(e){if(0===this._nodes_selected.size)return;const t=this.get_farest_node_selected(e);if(!t)return;const n=this.get_nearest_node(t,e);this.clear_node_selected(),this.set_node_selected(n,!0),n.move_in_fig_view()}reset_matrix(e){Object.assign(this.matrix2d,e),this.status.update_matrix2d(e)}translate(e,t){const n=Zi.multiply(this.matrix2d,Zi.get_matrix_translate(e,t));this.reset_matrix(n)}scale_diff(e,t){this.matrix2d.a+=e,this.matrix2d.d+=t}scale_by_point(e,t,n){const{map_scale_max:r,map_scale_min:o}=this.config.data,i=this.matrix2d.a+t;if(i>r||i<o)return;const s=this.view_point_to_fig(e),a=this.untransform_point(s);this.matrix2d.a+=t,this.matrix2d.d+=n;const l=this.transform_point(a),c=s.x-l.x,d=s.y-l.y,u=Zi.multiply(this.matrix2d,Zi.get_matrix_translate(c,d));this.reset_matrix(u)}view_point_to_fig(e){const t=this.dom_svg_rect,{sx:n,sy:r}=this.get_upstream_sum_scale();let{x:o,y:i}=e;return{x:(o-t.x)/n,y:(i-t.y)/r}}view_point_to_real(e){const t=this.view_point_to_fig(e);return this.untransform_point(t)}fig_point_to_view(e){const t=this.dom_svg_rect;return{x:e.x+t.x,y:e.y+t.y}}fig_point_to_real(e){return this.untransform_point(e)}real_point_to_fig(e){return this.transform_point(e)}real_point_to_view(e){const t=this.real_point_to_fig(e);return this.fig_point_to_view(t)}transform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:t*a+r*l+i,y:n*a+o*l+s}}untransform_point(e){const{a:t,b:n,c:r,d:o,e:i,f:s}=this.matrix2d,{x:a,y:l}=e;return{x:(a-i-r*l)/t,y:(l-s-n*a)/o}}static get meta(){return{type:S.Cubes.submap,cubename:"子图",version:2,block:!0,show:!0}}static get_default(e=400,t=200){return{id:od.get_id(),type:S.Cubes.submap,info:{nodes:[],linkers:[],node_from:{},node_to:{}},css:{},attrs:{matrix2d:Zi.get_default(),width:e,height:t}}}static replace_id(e,t,n,r={}){const o=n.id,i=od.get_id();return r[o]=i,n.id=i,od.replace_id(e,t,n.info.nodes,r),od.replace_id(e,t,n.info.linkers,r),n}static update_data(e,t){const n=e[this.meta.type]||1;return n>this.meta.version?{data:t,usable:!1}:(n<2&&(t.attrs.matrix2d=Zi.get_default()),{usable:!0,data:t})}}Ck([Ri(b.Names.node_add)],Mk.prototype,"on_node_add",null),Ck([Ri(b.Names.node_remove)],Mk.prototype,"on_node_remove",null),Ck([Ri(b.Names.linker_add)],Mk.prototype,"on_linker_add",null),Ck([Ri(b.Names.linker_remove)],Mk.prototype,"on_linker_remove",null),Ck([Ri(b.Names.node_drag)],Mk.prototype,"on_node_drag",null),Mk=Ck([Si],Mk);const zk=["id","data-type"],Nk=En({__name:"cube-box-columns",props:{cube:{}},setup(e){const{status:t}=e.cube,n=Vt(),r=Vt();let o;function i(){const e=t.attrs;return e.column_count?{"column-count":e.column_count}:e.column_width?{"column-width":e.column_width+"px"}:{}}return Zn(()=>{const t=n.value;if(!t)return;const i=r.value;if(!i)return;o=new Gi.DragDiff(i);let s=e.cube.attrs.width,a=e.cube.attrs.height,l=s,c={sx:1,sy:1};o.register_down(()=>{c=e.cube.get_upstream_sum_scale(),s=e.cube.attrs.width,a=e.cube.attrs.height}),o.register_move((n,r)=>{const o=n/c.sx;c.sy;l=Math.round(o+s),l<e.cube.min_width&&(l=e.cube.min_width),t.style.width=l+"px"}),o.register_up((t,n)=>{if(s===l)return;const r=e.cube.courier.get_recorder();r.tell(e.cube,zi.resize(e.cube.id,l)),e.cube.history.record(r)}),o.register_cancel(()=>{e.cube.attrs.width=s})}),nr(()=>{o?.off()}),(e,o)=>(No(),Oo("div",{class:"cube-box-columns",ref_key:"box",ref:n,style:de(Yt(t).css),id:e.cube.id,"data-type":e.cube.type,onContextmenu:o[0]||(o[0]=t=>Yt(oc)(t,e.cube))},[jo("div",{class:"box-columns-content",style:de(i())},[(No(!0),Oo(wo,null,hr(Yt(t).children,e=>(No(),Eo(Os,{key:e.id,cube:e},null,8,["cube"]))),128))],4),jo("div",{class:"box-columns-dragger",ref_key:"dragger",ref:r},null,512)],44,zk))}}),Ak=(0,Is.A)(Nk,[["__scopeId","data-v-1ce25866"]]);class Tk extends Rs{constructor(e){super(e)}get css(){const{width:e}=this.attrs;return{...super.css,width:e+"px"}}}function Rk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class Pk extends rd{_status=new Tk(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get component(){return Ak}get attrs(){return this.data.attrs}get meta(){return Pk.meta}get min_width(){return 200}build_child(e){od.build_cubes(e.info,this,this._children)}update_data(e,t){return Pk.update_data(e,t)}export(){const e=this.base_export();e.info=[];for(let t of this._children)e.info.push(t.export());return e}gc(){this.base_gc()}replace_id(e,t,n){return Pk.replace_id(this.root,e,t,n)}on_insert_child(e){const{courier:t,history:n}=this,{data:r}=e,o=t.get_recorder();o.add_cmd(e);const i=od.build_cubes(e.data,this),s=this.child_count;return this.splice(this.child_count,0,...i),o.add_recover(zi.delete_child(this.id,"backward",[s,this.child_count])),o}on_delete_child(e){const{courier:t,history:n}=this,{dir:r,range:o,reserve:i}=e;if(!this.is_valid_range(o))return;const s=t.get_recorder(),a=this.get_valid_index(o[0]),l=this.get_valid_index(o[1]),c=[],d=this.splice(a,l-a);for(let e of d.children)c.push(e.export());return s.add_recover(zi.insert_child(this.id,c,a)),this.status.update_children(),s}static replace_id(e,t,n,r){const o=n.id,i=r[o]||od.get_id();return r[o]=i,n.id=i,od.replace_id(e,t,n.info,r),n}static get_default(){const e=Mu.get_default(),t=Mu.get_default(),n=Mu.get_default();return{id:od.get_id(),type:S.Cubes.box_columns,info:[e,t,n],attrs:{width:400,column_count:3},css:{}}}static get meta(){return{cubename:"多列容器",type:S.Cubes.box_columns,block:!0,version:1,show:!0}}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{data:t,usable:!0}}}Rk([Ri(_.Names.cube_insert_child)],Pk.prototype,"on_insert_child",null),Rk([Ri(_.Names.cube_delete_child)],Pk.prototype,"on_delete_child",null),Pk=Rk([Si],Pk);class Ok extends Rs{constructor(e){super(e)}}class Ek{static reset(e,t){return{id:e,name:m.Names.reset,explanation:t}}}const Lk=["id","data-type"],Ik=En({__name:"cube-rt",props:{cube:{}},setup(e){const{event:t,status:n}=e.cube;function r(){t.emit_show_cube_editor(e.cube)}return(t,o)=>(No(),Oo("ruby",{class:"cube-rt",id:t.cube.id,style:de(Yt(n).css),"data-type":t.cube.type,onClick:r},[$o(ve(Yt(n).info.text)+" ",1),jo("rt",{style:de({"font-size":`max(calc(0.6 * ${e.cube.css["font-size"]||"16px"}),${jk.min_size}px)`})},ve(Yt(n).info.explanation),5),o[0]||(o[0]=$o("​ ",-1))],12,Lk))}}),Dk=Ik;function Bk(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}class jk extends rd{_status=new Ok(this);constructor(e,t){super(e,t),this.setup(),this.status.init()}get status(){return this._status}get info(){return this.data.info}get component(){return Dk}get meta(){return jk.meta}build_child(e){}update_data(e,t){return jk.update_data(e,t)}export(){return this.base_export()}gc(){this.base_gc()}replace_id(e,t,n){return jk.replace_id(this.root,e,t,n)}reset(e){const{explanation:t}=e,{courier:n}=this,r=n.get_recorder();r.add_cmd(e);const o=this.info.explanation;this.info.explanation=t;const i=Ek.reset(this.id,o);return r.add_recover(i),this.status.update_info(),r}static get min_size(){return 12}static get scale(){return.6}static get meta(){return{cubename:"标注文本",type:S.Cubes.rt,block:!1,version:1,show:!1}}static get_default(e="",t="",n={}){return{id:od.get_id(),type:S.Cubes.rt,info:{text:e,explanation:t},attrs:{},css:n}}static replace_id(e,t,n,r){const o=n.id;return n.id=r[o]||od.get_id(),r[o]=n.id,n}static update_data(e,t){return(e[this.meta.type]||1)>this.meta.version?{data:t,usable:!1}:{usable:!0,data:t}}}Bk([Ri(m.Names.reset)],jk.prototype,"reset",null),jk=Bk([Si],jk)})(),i})());