ezekiel-cli 5.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (854) hide show
  1. package/.editorconfig +24 -0
  2. package/.eslintrc +40 -0
  3. package/.prettierignore +1 -0
  4. package/README.md +139 -0
  5. package/bin/insites-cli-archive.js +35 -0
  6. package/bin/insites-cli-audit.js +5 -0
  7. package/bin/insites-cli-data-clean.js +69 -0
  8. package/bin/insites-cli-data-export.js +111 -0
  9. package/bin/insites-cli-data-import.js +105 -0
  10. package/bin/insites-cli-data.js +15 -0
  11. package/bin/insites-cli-deploy.js +43 -0
  12. package/bin/insites-cli-env-add.js +107 -0
  13. package/bin/insites-cli-env-list.js +22 -0
  14. package/bin/insites-cli-env.js +12 -0
  15. package/bin/insites-cli-gui-serve.js +47 -0
  16. package/bin/insites-cli-gui.js +8 -0
  17. package/bin/insites-cli-init.js +44 -0
  18. package/bin/insites-cli-logs.js +124 -0
  19. package/bin/insites-cli-logsv2-alerts-add.js +34 -0
  20. package/bin/insites-cli-logsv2-alerts-list.js +24 -0
  21. package/bin/insites-cli-logsv2-alerts-trigger.js +25 -0
  22. package/bin/insites-cli-logsv2-alerts.js +11 -0
  23. package/bin/insites-cli-logsv2-reports.js +36 -0
  24. package/bin/insites-cli-logsv2-search.js +40 -0
  25. package/bin/insites-cli-logsv2-searchAround.js +29 -0
  26. package/bin/insites-cli-logsv2.js +11 -0
  27. package/bin/insites-cli-modules-init.js +54 -0
  28. package/bin/insites-cli-modules-list.js +28 -0
  29. package/bin/insites-cli-modules-pull.js +43 -0
  30. package/bin/insites-cli-modules-remove.js +26 -0
  31. package/bin/insites-cli-modules-version.js +60 -0
  32. package/bin/insites-cli-modules.js +13 -0
  33. package/bin/insites-cli-pull.js +42 -0
  34. package/bin/insites-cli-sync.js +30 -0
  35. package/bin/insites-cli.js +53 -0
  36. package/gui/graphql/babel.config.js +21 -0
  37. package/gui/graphql/package-lock.json +4772 -0
  38. package/gui/graphql/package.json +28 -0
  39. package/gui/graphql/public/105.js +7 -0
  40. package/gui/graphql/public/178.js +1 -0
  41. package/gui/graphql/public/198.js +1 -0
  42. package/gui/graphql/public/441.js +4 -0
  43. package/gui/graphql/public/471.js +1 -0
  44. package/gui/graphql/public/480.js +24 -0
  45. package/gui/graphql/public/481.js +1 -0
  46. package/gui/graphql/public/571.js +12 -0
  47. package/gui/graphql/public/573.js +8 -0
  48. package/gui/graphql/public/574.js +1 -0
  49. package/gui/graphql/public/584.js +38 -0
  50. package/gui/graphql/public/588.js +1 -0
  51. package/gui/graphql/public/662.js +8 -0
  52. package/gui/graphql/public/724.js +1 -0
  53. package/gui/graphql/public/739.js +1 -0
  54. package/gui/graphql/public/744.js +1 -0
  55. package/gui/graphql/public/768.js +1 -0
  56. package/gui/graphql/public/79.js +1 -0
  57. package/gui/graphql/public/845.js +2 -0
  58. package/gui/graphql/public/863.js +1 -0
  59. package/gui/graphql/public/896.js +1 -0
  60. package/gui/graphql/public/92.js +2 -0
  61. package/gui/graphql/public/98.js +1 -0
  62. package/gui/graphql/public/980.js +1 -0
  63. package/gui/graphql/public/995.js +1 -0
  64. package/gui/graphql/public/index.html +12 -0
  65. package/gui/graphql/public/main.css +27 -0
  66. package/gui/graphql/public/main.js +2230 -0
  67. package/gui/graphql/public/main.js.LICENSE.txt +39 -0
  68. package/gui/graphql/src/index.jsx +139 -0
  69. package/gui/graphql/webpack.config.js +52 -0
  70. package/gui/liquid/public/index.html +82 -0
  71. package/gui/v1/build/_app/immutable/assets/0.251ef76d.css +1 -0
  72. package/gui/v1/build/_app/immutable/assets/10.ee72ee6d.css +1 -0
  73. package/gui/v1/build/_app/immutable/assets/12.f6879dba.css +1 -0
  74. package/gui/v1/build/_app/immutable/assets/13.bf080bcc.css +1 -0
  75. package/gui/v1/build/_app/immutable/assets/15.0e0670ce.css +1 -0
  76. package/gui/v1/build/_app/immutable/assets/2.4a46c382.css +1 -0
  77. package/gui/v1/build/_app/immutable/assets/4.73dde45b.css +1 -0
  78. package/gui/v1/build/_app/immutable/assets/6.6bcda092.css +1 -0
  79. package/gui/v1/build/_app/immutable/assets/7.c0038863.css +1 -0
  80. package/gui/v1/build/_app/immutable/assets/9.6957ad32.css +1 -0
  81. package/gui/v1/build/_app/immutable/assets/Aside.66c2d12f.css +1 -0
  82. package/gui/v1/build/_app/immutable/assets/JSONTree.507a2dde.css +1 -0
  83. package/gui/v1/build/_app/immutable/assets/JSONTree.79010849.css +1 -0
  84. package/gui/v1/build/_app/immutable/assets/_layout.4a46c382.css +1 -0
  85. package/gui/v1/build/_app/immutable/assets/_layout.6bcda092.css +1 -0
  86. package/gui/v1/build/_app/immutable/assets/_layout.73dde45b.css +1 -0
  87. package/gui/v1/build/_app/immutable/assets/_layout.85c17bd0.css +1 -0
  88. package/gui/v1/build/_app/immutable/assets/_page.0e0670ce.css +1 -0
  89. package/gui/v1/build/_app/immutable/assets/_page.425c1d28.css +1 -0
  90. package/gui/v1/build/_app/immutable/assets/_page.6957ad32.css +1 -0
  91. package/gui/v1/build/_app/immutable/assets/_page.bf080bcc.css +1 -0
  92. package/gui/v1/build/_app/immutable/assets/_page.c0038863.css +1 -0
  93. package/gui/v1/build/_app/immutable/assets/_page.ee72ee6d.css +1 -0
  94. package/gui/v1/build/_app/immutable/chunks/Aside.c28a1ec5.js +1 -0
  95. package/gui/v1/build/_app/immutable/chunks/Icon.1db6668c.js +1 -0
  96. package/gui/v1/build/_app/immutable/chunks/JSONTree.641da795.js +2 -0
  97. package/gui/v1/build/_app/immutable/chunks/backgroundJob.0f2693c5.js +53 -0
  98. package/gui/v1/build/_app/immutable/chunks/graphql.6101590b.js +1 -0
  99. package/gui/v1/build/_app/immutable/chunks/index.50c00146.js +1 -0
  100. package/gui/v1/build/_app/immutable/chunks/index.5744cd58.js +1 -0
  101. package/gui/v1/build/_app/immutable/chunks/index.88325b8f.js +4 -0
  102. package/gui/v1/build/_app/immutable/chunks/index.c35021d1.js +1 -0
  103. package/gui/v1/build/_app/immutable/chunks/singletons.b6d4da89.js +1 -0
  104. package/gui/v1/build/_app/immutable/chunks/state.adc829f2.js +1 -0
  105. package/gui/v1/build/_app/immutable/chunks/stores.71f75302.js +1 -0
  106. package/gui/v1/build/_app/immutable/chunks/table.71e66f99.js +16 -0
  107. package/gui/v1/build/_app/immutable/chunks/tryParseJSON.f125f883.js +1 -0
  108. package/gui/v1/build/_app/immutable/chunks/user.039256f6.js +31 -0
  109. package/gui/v1/build/_app/immutable/entry/app.44548b11.js +1 -0
  110. package/gui/v1/build/_app/immutable/entry/start.4e385061.js +3 -0
  111. package/gui/v1/build/_app/immutable/nodes/0.d27a86c9.js +1 -0
  112. package/gui/v1/build/_app/immutable/nodes/1.532e414a.js +1 -0
  113. package/gui/v1/build/_app/immutable/nodes/10.962850d6.js +26 -0
  114. package/gui/v1/build/_app/immutable/nodes/11.d0e2eb78.js +1 -0
  115. package/gui/v1/build/_app/immutable/nodes/12.6449d2bf.js +74 -0
  116. package/gui/v1/build/_app/immutable/nodes/13.d3883433.js +1 -0
  117. package/gui/v1/build/_app/immutable/nodes/14.b1e09778.js +1 -0
  118. package/gui/v1/build/_app/immutable/nodes/15.af2c20ae.js +1 -0
  119. package/gui/v1/build/_app/immutable/nodes/2.4d90d0b8.js +9 -0
  120. package/gui/v1/build/_app/immutable/nodes/3.06f6ef98.js +1 -0
  121. package/gui/v1/build/_app/immutable/nodes/4.32a26935.js +1 -0
  122. package/gui/v1/build/_app/immutable/nodes/5.06f6ef98.js +1 -0
  123. package/gui/v1/build/_app/immutable/nodes/6.57fec5aa.js +7 -0
  124. package/gui/v1/build/_app/immutable/nodes/7.ae78c23b.js +13 -0
  125. package/gui/v1/build/_app/immutable/nodes/8.f57c5fbf.js +1 -0
  126. package/gui/v1/build/_app/immutable/nodes/9.374909fd.js +1 -0
  127. package/gui/v1/build/_app/version.json +1 -0
  128. package/gui/v1/build/favicon.png +0 -0
  129. package/gui/v1/build/icon/apple-touch-icon-114x114.png +0 -0
  130. package/gui/v1/build/icon/apple-touch-icon-120x120.png +0 -0
  131. package/gui/v1/build/icon/apple-touch-icon-144x144.png +0 -0
  132. package/gui/v1/build/icon/apple-touch-icon-152x152.png +0 -0
  133. package/gui/v1/build/icon/apple-touch-icon-57x57.png +0 -0
  134. package/gui/v1/build/icon/apple-touch-icon-60x60.png +0 -0
  135. package/gui/v1/build/icon/apple-touch-icon-72x72.png +0 -0
  136. package/gui/v1/build/icon/apple-touch-icon-76x76.png +0 -0
  137. package/gui/v1/build/icon/code.txt +20 -0
  138. package/gui/v1/build/icon/favicon-128.png +0 -0
  139. package/gui/v1/build/icon/favicon-16x16.png +0 -0
  140. package/gui/v1/build/icon/favicon-196x196.png +0 -0
  141. package/gui/v1/build/icon/favicon-32x32.png +0 -0
  142. package/gui/v1/build/icon/favicon-96x96.png +0 -0
  143. package/gui/v1/build/icon/favicon.ico +0 -0
  144. package/gui/v1/build/icon/mstile-144x144.png +0 -0
  145. package/gui/v1/build/icon/mstile-150x150.png +0 -0
  146. package/gui/v1/build/icon/mstile-310x150.png +0 -0
  147. package/gui/v1/build/icon/mstile-310x310.png +0 -0
  148. package/gui/v1/build/icon/mstile-70x70.png +0 -0
  149. package/gui/v1/build/index.html +35 -0
  150. package/gui/v1/build/insites-logo-old.png +0 -0
  151. package/gui/v1/build/insites-logo.png +0 -0
  152. package/gui/v1/build/prism.js +8 -0
  153. package/gui/v1/package-lock.json +1616 -0
  154. package/gui/v1/package.json +27 -0
  155. package/gui/v1/playwright.config.js +10 -0
  156. package/gui/v1/pnpm-lock.yaml +992 -0
  157. package/gui/v1/src/app.html +12 -0
  158. package/gui/v1/src/lib/api/backgroundJob.js +124 -0
  159. package/gui/v1/src/lib/api/constant.js +68 -0
  160. package/gui/v1/src/lib/api/graphql.js +57 -0
  161. package/gui/v1/src/lib/api/logs.js +45 -0
  162. package/gui/v1/src/lib/api/record.js +286 -0
  163. package/gui/v1/src/lib/api/table.js +45 -0
  164. package/gui/v1/src/lib/api/user.js +78 -0
  165. package/gui/v1/src/lib/backgroundJob/Delete.svelte +61 -0
  166. package/gui/v1/src/lib/backgroundJob/Retry.svelte +45 -0
  167. package/gui/v1/src/lib/database/Create.svelte +324 -0
  168. package/gui/v1/src/lib/database/Delete.svelte +61 -0
  169. package/gui/v1/src/lib/database/Filters.svelte +155 -0
  170. package/gui/v1/src/lib/database/Sort.svelte +110 -0
  171. package/gui/v1/src/lib/database/Table.svelte +261 -0
  172. package/gui/v1/src/lib/database/Tables.svelte +276 -0
  173. package/gui/v1/src/lib/parseValue.js +51 -0
  174. package/gui/v1/src/lib/relativeTime.js +33 -0
  175. package/gui/v1/src/lib/state.js +190 -0
  176. package/gui/v1/src/lib/tryParseJSON.js +32 -0
  177. package/gui/v1/src/lib/ui/Aside.svelte +176 -0
  178. package/gui/v1/src/lib/ui/Code.svelte +50 -0
  179. package/gui/v1/src/lib/ui/ConnectionIndicator.svelte +133 -0
  180. package/gui/v1/src/lib/ui/Header.svelte +252 -0
  181. package/gui/v1/src/lib/ui/Icon.svelte +55 -0
  182. package/gui/v1/src/lib/ui/JSONTree.svelte +77 -0
  183. package/gui/v1/src/lib/ui/Notifications.svelte +111 -0
  184. package/gui/v1/src/lib/ui/forms/Toggle.svelte +114 -0
  185. package/gui/v1/src/routes/+layout.svelte +25 -0
  186. package/gui/v1/src/routes/+page.svelte +511 -0
  187. package/gui/v1/src/routes/backgroundJobs/+layout.svelte +366 -0
  188. package/gui/v1/src/routes/backgroundJobs/+page.svelte +0 -0
  189. package/gui/v1/src/routes/backgroundJobs/[type]/[id]/+page.svelte +157 -0
  190. package/gui/v1/src/routes/constants/+layout.svelte +1 -0
  191. package/gui/v1/src/routes/constants/+page.svelte +382 -0
  192. package/gui/v1/src/routes/database/+layout.svelte +67 -0
  193. package/gui/v1/src/routes/database/+page.svelte +3 -0
  194. package/gui/v1/src/routes/database/table/[id]/+page.svelte +219 -0
  195. package/gui/v1/src/routes/logs/+layout.svelte +1 -0
  196. package/gui/v1/src/routes/logs/+page.svelte +512 -0
  197. package/gui/v1/src/routes/users/+layout.svelte +252 -0
  198. package/gui/v1/src/routes/users/+page.svelte +4 -0
  199. package/gui/v1/src/routes/users/[id]/+page.svelte +127 -0
  200. package/gui/v1/src/style/button.css +141 -0
  201. package/gui/v1/src/style/code.css +4 -0
  202. package/gui/v1/src/style/config.css +186 -0
  203. package/gui/v1/src/style/forms.css +55 -0
  204. package/gui/v1/src/style/general.css +53 -0
  205. package/gui/v1/src/style/reset.css +75 -0
  206. package/gui/v1/static/favicon.png +0 -0
  207. package/gui/v1/static/icon/apple-touch-icon-114x114.png +0 -0
  208. package/gui/v1/static/icon/apple-touch-icon-120x120.png +0 -0
  209. package/gui/v1/static/icon/apple-touch-icon-144x144.png +0 -0
  210. package/gui/v1/static/icon/apple-touch-icon-152x152.png +0 -0
  211. package/gui/v1/static/icon/apple-touch-icon-57x57.png +0 -0
  212. package/gui/v1/static/icon/apple-touch-icon-60x60.png +0 -0
  213. package/gui/v1/static/icon/apple-touch-icon-72x72.png +0 -0
  214. package/gui/v1/static/icon/apple-touch-icon-76x76.png +0 -0
  215. package/gui/v1/static/icon/code.txt +20 -0
  216. package/gui/v1/static/icon/favicon-128.png +0 -0
  217. package/gui/v1/static/icon/favicon-16x16.png +0 -0
  218. package/gui/v1/static/icon/favicon-196x196.png +0 -0
  219. package/gui/v1/static/icon/favicon-32x32.png +0 -0
  220. package/gui/v1/static/icon/favicon-96x96.png +0 -0
  221. package/gui/v1/static/icon/favicon.ico +0 -0
  222. package/gui/v1/static/icon/mstile-144x144.png +0 -0
  223. package/gui/v1/static/icon/mstile-150x150.png +0 -0
  224. package/gui/v1/static/icon/mstile-310x150.png +0 -0
  225. package/gui/v1/static/icon/mstile-310x310.png +0 -0
  226. package/gui/v1/static/icon/mstile-70x70.png +0 -0
  227. package/gui/v1/static/insites-logo-old.png +0 -0
  228. package/gui/v1/static/insites-logo.png +0 -0
  229. package/gui/v1/static/prism.js +8 -0
  230. package/gui/v1/svelte.config.js +12 -0
  231. package/gui/v1/vite.config.js +9 -0
  232. package/gui/v2/.env.local.sample +1 -0
  233. package/gui/v2/.eslintrc.json +3 -0
  234. package/gui/v2/README.md +36 -0
  235. package/gui/v2/jsconfig.json +7 -0
  236. package/gui/v2/next.config.mjs +8 -0
  237. package/gui/v2/out/404/index.html +1 -0
  238. package/gui/v2/out/404.html +1 -0
  239. package/gui/v2/out/_next/static/chunks/1255.653490595d3fc3e0.js +1 -0
  240. package/gui/v2/out/_next/static/chunks/156-d7f9f402651cf1ce.js +1 -0
  241. package/gui/v2/out/_next/static/chunks/1607-f540467bd5a5afbb.js +1 -0
  242. package/gui/v2/out/_next/static/chunks/1846.1d14172e53de7bd5.js +1 -0
  243. package/gui/v2/out/_next/static/chunks/2380.950327f4432936af.js +1 -0
  244. package/gui/v2/out/_next/static/chunks/2572.bec81f6c42bcb825.js +1 -0
  245. package/gui/v2/out/_next/static/chunks/2650.fe9586a828cdca9d.js +1 -0
  246. package/gui/v2/out/_next/static/chunks/3331.562d592a07589250.js +1 -0
  247. package/gui/v2/out/_next/static/chunks/3510.61b58fad9f502d34.js +1 -0
  248. package/gui/v2/out/_next/static/chunks/363642f4-2accd15316551dfa.js +1 -0
  249. package/gui/v2/out/_next/static/chunks/4704.c49f871da8f25277.js +1 -0
  250. package/gui/v2/out/_next/static/chunks/49448ee7.02b7afe6f73c8f9d.js +1 -0
  251. package/gui/v2/out/_next/static/chunks/4d1bfaba-4c00fd5561f9a075.js +1 -0
  252. package/gui/v2/out/_next/static/chunks/5103.b86a80704c50b2cb.js +1 -0
  253. package/gui/v2/out/_next/static/chunks/5250-f85a6556cdac145c.js +1 -0
  254. package/gui/v2/out/_next/static/chunks/5253.6fc3f7a625a83de9.js +1 -0
  255. package/gui/v2/out/_next/static/chunks/6163.50329d0319b2e55b.js +1 -0
  256. package/gui/v2/out/_next/static/chunks/6262.57b323874390cc1b.js +1 -0
  257. package/gui/v2/out/_next/static/chunks/6442.5e49a9feebedaf1a.js +1 -0
  258. package/gui/v2/out/_next/static/chunks/6711.076ab1f536726d8d.js +1 -0
  259. package/gui/v2/out/_next/static/chunks/6729.9cc7e67fe8be26d8.js +1 -0
  260. package/gui/v2/out/_next/static/chunks/6744.73e5042f769356c2.js +1 -0
  261. package/gui/v2/out/_next/static/chunks/7058.e63b764d613d6d14.js +1 -0
  262. package/gui/v2/out/_next/static/chunks/714.039f29b090afd075.js +1 -0
  263. package/gui/v2/out/_next/static/chunks/720.b5dff7afd9961ccc.js +1 -0
  264. package/gui/v2/out/_next/static/chunks/7283.e2af380e1cb385c4.js +1 -0
  265. package/gui/v2/out/_next/static/chunks/7567.fb1e0ef7389df59d.js +1 -0
  266. package/gui/v2/out/_next/static/chunks/7604.12b8307c002ce3f4.js +1 -0
  267. package/gui/v2/out/_next/static/chunks/7612.f071dccc7f2b0711.js +1 -0
  268. package/gui/v2/out/_next/static/chunks/7737.6191e6708d094927.js +1 -0
  269. package/gui/v2/out/_next/static/chunks/7833.6ff3b0179c6aab2e.js +1 -0
  270. package/gui/v2/out/_next/static/chunks/7934.875b05fd89a8eeae.js +1 -0
  271. package/gui/v2/out/_next/static/chunks/7957.c1f316fb4f52b181.js +1 -0
  272. package/gui/v2/out/_next/static/chunks/7979.1ed8d3011a12e2f1.js +1 -0
  273. package/gui/v2/out/_next/static/chunks/8043.592171badd8f3ea1.js +57 -0
  274. package/gui/v2/out/_next/static/chunks/8047-327e12b999e88629.js +1 -0
  275. package/gui/v2/out/_next/static/chunks/8069-99e6658a6772ea80.js +1 -0
  276. package/gui/v2/out/_next/static/chunks/8414.c85352362d33de3e.js +1 -0
  277. package/gui/v2/out/_next/static/chunks/8700.4409d1a867db1bf3.js +1 -0
  278. package/gui/v2/out/_next/static/chunks/9121.b83f5b8780f6c093.js +1 -0
  279. package/gui/v2/out/_next/static/chunks/9336.17897c831ce187f3.js +1 -0
  280. package/gui/v2/out/_next/static/chunks/9479.f984522cec5ff059.js +1 -0
  281. package/gui/v2/out/_next/static/chunks/9557.471a0e1662abe246.js +1 -0
  282. package/gui/v2/out/_next/static/chunks/989.aa0766c8bb66a392.js +1 -0
  283. package/gui/v2/out/_next/static/chunks/app/background-job/page-0521f8d6e8ec9b55.js +1 -0
  284. package/gui/v2/out/_next/static/chunks/app/constants/page-f1397b414fe2e4c0.js +1 -0
  285. package/gui/v2/out/_next/static/chunks/app/database/layout-c1e28d1ae358bc77.js +1 -0
  286. package/gui/v2/out/_next/static/chunks/app/database/page-d2f667b24c673fbb.js +1 -0
  287. package/gui/v2/out/_next/static/chunks/app/error-3cf235b6b99c469f.js +1 -0
  288. package/gui/v2/out/_next/static/chunks/app/global-error-afc2c2c9b5e82f57.js +1 -0
  289. package/gui/v2/out/_next/static/chunks/app/graphql/page-ae7c858f41b54801.js +1 -0
  290. package/gui/v2/out/_next/static/chunks/app/layout-8194e46834cb4aba.js +1 -0
  291. package/gui/v2/out/_next/static/chunks/app/liquid/page-02caf239e75f472f.js +1 -0
  292. package/gui/v2/out/_next/static/chunks/app/loading-54414b5097331d64.js +1 -0
  293. package/gui/v2/out/_next/static/chunks/app/logs/layout-5f78d72b1b805625.js +1 -0
  294. package/gui/v2/out/_next/static/chunks/app/logs/page-ef7dd2b328d24734.js +1 -0
  295. package/gui/v2/out/_next/static/chunks/app/not-found-33cae8ec5bdcd26f.js +1 -0
  296. package/gui/v2/out/_next/static/chunks/app/page-73b1f8b1f7552d3f.js +1 -0
  297. package/gui/v2/out/_next/static/chunks/app/users/page-2195ac1594366ce4.js +1 -0
  298. package/gui/v2/out/_next/static/chunks/d9670eb5.68da5e9f84dd26cf.js +1 -0
  299. package/gui/v2/out/_next/static/chunks/fd9d1056-0e6b8922e4ebe23a.js +1 -0
  300. package/gui/v2/out/_next/static/chunks/framework-08aa667e5202eed8.js +33 -0
  301. package/gui/v2/out/_next/static/chunks/main-7b334683379129cf.js +1 -0
  302. package/gui/v2/out/_next/static/chunks/main-app-35b90d128e2e05cf.js +1 -0
  303. package/gui/v2/out/_next/static/chunks/pages/_app-57bdff7978360b1c.js +1 -0
  304. package/gui/v2/out/_next/static/chunks/pages/_error-29037c284dd0eec6.js +1 -0
  305. package/gui/v2/out/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
  306. package/gui/v2/out/_next/static/chunks/webpack-d07cc8d61c19af5d.js +1 -0
  307. package/gui/v2/out/_next/static/css/874c6e64ab8446a4.css +6 -0
  308. package/gui/v2/out/_next/static/css/88716ec5fc4aa1e3.css +15 -0
  309. package/gui/v2/out/_next/static/wmD1UwESxpzZj8pfiHFeB/_buildManifest.js +1 -0
  310. package/gui/v2/out/_next/static/wmD1UwESxpzZj8pfiHFeB/_ssgManifest.js +1 -0
  311. package/gui/v2/out/assets/icons/home-bg-job.png +0 -0
  312. package/gui/v2/out/assets/icons/home-constants.png +0 -0
  313. package/gui/v2/out/assets/icons/home-database.png +0 -0
  314. package/gui/v2/out/assets/icons/home-graphql.png +0 -0
  315. package/gui/v2/out/assets/icons/home-info-fill-light.png +0 -0
  316. package/gui/v2/out/assets/icons/home-info-light.png +0 -0
  317. package/gui/v2/out/assets/icons/home-liquid.png +0 -0
  318. package/gui/v2/out/assets/icons/home-logs.png +0 -0
  319. package/gui/v2/out/assets/icons/home-pin-fill-light.png +0 -0
  320. package/gui/v2/out/assets/icons/home-pin-light.png +0 -0
  321. package/gui/v2/out/assets/icons/home-support.png +0 -0
  322. package/gui/v2/out/assets/icons/home-users.png +0 -0
  323. package/gui/v2/out/assets/icons/menu-bg-job-dark.png +0 -0
  324. package/gui/v2/out/assets/icons/menu-bg-job-light.png +0 -0
  325. package/gui/v2/out/assets/icons/menu-console-dark.png +0 -0
  326. package/gui/v2/out/assets/icons/menu-console-light.png +0 -0
  327. package/gui/v2/out/assets/icons/menu-constants-dark.png +0 -0
  328. package/gui/v2/out/assets/icons/menu-constants-light.png +0 -0
  329. package/gui/v2/out/assets/icons/menu-database-dark.png +0 -0
  330. package/gui/v2/out/assets/icons/menu-database-light.png +0 -0
  331. package/gui/v2/out/assets/icons/menu-docs-dark.png +0 -0
  332. package/gui/v2/out/assets/icons/menu-docs-light.png +0 -0
  333. package/gui/v2/out/assets/icons/menu-graphql-dark.png +0 -0
  334. package/gui/v2/out/assets/icons/menu-graphql-light.png +0 -0
  335. package/gui/v2/out/assets/icons/menu-iia-dark.png +0 -0
  336. package/gui/v2/out/assets/icons/menu-iia-light.png +0 -0
  337. package/gui/v2/out/assets/icons/menu-liquid-dark.png +0 -0
  338. package/gui/v2/out/assets/icons/menu-liquid-light.png +0 -0
  339. package/gui/v2/out/assets/icons/menu-logs-dark.png +0 -0
  340. package/gui/v2/out/assets/icons/menu-logs-light.png +0 -0
  341. package/gui/v2/out/assets/icons/menu-support-dark.png +0 -0
  342. package/gui/v2/out/assets/icons/menu-support-light.png +0 -0
  343. package/gui/v2/out/assets/icons/menu-theme-dark.png +0 -0
  344. package/gui/v2/out/assets/icons/menu-theme-light.png +0 -0
  345. package/gui/v2/out/assets/icons/menu-users-dark.png +0 -0
  346. package/gui/v2/out/assets/icons/menu-users-light.png +0 -0
  347. package/gui/v2/out/assets/icons/search-icon-dark.svg +3 -0
  348. package/gui/v2/out/assets/ins-logo-dark.svg +35 -0
  349. package/gui/v2/out/assets/ins-logo-light.svg +35 -0
  350. package/gui/v2/out/background-job/index.html +1 -0
  351. package/gui/v2/out/background-job/index.txt +9 -0
  352. package/gui/v2/out/constants/index.html +1 -0
  353. package/gui/v2/out/constants/index.txt +11 -0
  354. package/gui/v2/out/database/index.html +1 -0
  355. package/gui/v2/out/database/index.txt +13 -0
  356. package/gui/v2/out/favicon.ico +0 -0
  357. package/gui/v2/out/favicon.png +0 -0
  358. package/gui/v2/out/graphql/index.html +1 -0
  359. package/gui/v2/out/graphql/index.txt +11 -0
  360. package/gui/v2/out/index.html +1 -0
  361. package/gui/v2/out/index.txt +11 -0
  362. package/gui/v2/out/liquid/index.html +1 -0
  363. package/gui/v2/out/liquid/index.txt +11 -0
  364. package/gui/v2/out/logs/index.html +1 -0
  365. package/gui/v2/out/logs/index.txt +13 -0
  366. package/gui/v2/out/next.svg +1 -0
  367. package/gui/v2/out/users/index.html +1 -0
  368. package/gui/v2/out/users/index.txt +11 -0
  369. package/gui/v2/out/vercel.svg +1 -0
  370. package/gui/v2/package-lock.json +9575 -0
  371. package/gui/v2/package.json +37 -0
  372. package/gui/v2/postcss.config.js +6 -0
  373. package/gui/v2/public/assets/icons/home-bg-job.png +0 -0
  374. package/gui/v2/public/assets/icons/home-constants.png +0 -0
  375. package/gui/v2/public/assets/icons/home-database.png +0 -0
  376. package/gui/v2/public/assets/icons/home-graphql.png +0 -0
  377. package/gui/v2/public/assets/icons/home-info-fill-light.png +0 -0
  378. package/gui/v2/public/assets/icons/home-info-light.png +0 -0
  379. package/gui/v2/public/assets/icons/home-liquid.png +0 -0
  380. package/gui/v2/public/assets/icons/home-logs.png +0 -0
  381. package/gui/v2/public/assets/icons/home-pin-fill-light.png +0 -0
  382. package/gui/v2/public/assets/icons/home-pin-light.png +0 -0
  383. package/gui/v2/public/assets/icons/home-support.png +0 -0
  384. package/gui/v2/public/assets/icons/home-users.png +0 -0
  385. package/gui/v2/public/assets/icons/menu-bg-job-dark.png +0 -0
  386. package/gui/v2/public/assets/icons/menu-bg-job-light.png +0 -0
  387. package/gui/v2/public/assets/icons/menu-console-dark.png +0 -0
  388. package/gui/v2/public/assets/icons/menu-console-light.png +0 -0
  389. package/gui/v2/public/assets/icons/menu-constants-dark.png +0 -0
  390. package/gui/v2/public/assets/icons/menu-constants-light.png +0 -0
  391. package/gui/v2/public/assets/icons/menu-database-dark.png +0 -0
  392. package/gui/v2/public/assets/icons/menu-database-light.png +0 -0
  393. package/gui/v2/public/assets/icons/menu-docs-dark.png +0 -0
  394. package/gui/v2/public/assets/icons/menu-docs-light.png +0 -0
  395. package/gui/v2/public/assets/icons/menu-graphql-dark.png +0 -0
  396. package/gui/v2/public/assets/icons/menu-graphql-light.png +0 -0
  397. package/gui/v2/public/assets/icons/menu-iia-dark.png +0 -0
  398. package/gui/v2/public/assets/icons/menu-iia-light.png +0 -0
  399. package/gui/v2/public/assets/icons/menu-liquid-dark.png +0 -0
  400. package/gui/v2/public/assets/icons/menu-liquid-light.png +0 -0
  401. package/gui/v2/public/assets/icons/menu-logs-dark.png +0 -0
  402. package/gui/v2/public/assets/icons/menu-logs-light.png +0 -0
  403. package/gui/v2/public/assets/icons/menu-support-dark.png +0 -0
  404. package/gui/v2/public/assets/icons/menu-support-light.png +0 -0
  405. package/gui/v2/public/assets/icons/menu-theme-dark.png +0 -0
  406. package/gui/v2/public/assets/icons/menu-theme-light.png +0 -0
  407. package/gui/v2/public/assets/icons/menu-users-dark.png +0 -0
  408. package/gui/v2/public/assets/icons/menu-users-light.png +0 -0
  409. package/gui/v2/public/assets/icons/search-icon-dark.svg +3 -0
  410. package/gui/v2/public/assets/ins-logo-dark.svg +35 -0
  411. package/gui/v2/public/assets/ins-logo-light.svg +35 -0
  412. package/gui/v2/public/favicon.png +0 -0
  413. package/gui/v2/public/next.svg +1 -0
  414. package/gui/v2/public/vercel.svg +1 -0
  415. package/gui/v2/src/app/background-job/page.js +35 -0
  416. package/gui/v2/src/app/constants/components/Field/Field.css +11 -0
  417. package/gui/v2/src/app/constants/components/Field/Field.js +52 -0
  418. package/gui/v2/src/app/constants/components/Filter.js +50 -0
  419. package/gui/v2/src/app/constants/components/Form/Form.css +3 -0
  420. package/gui/v2/src/app/constants/components/Form/Form.js +41 -0
  421. package/gui/v2/src/app/constants/page.js +40 -0
  422. package/gui/v2/src/app/database/components/Filters/FilterForm.js +70 -0
  423. package/gui/v2/src/app/database/components/Filters/FilterValue.js +68 -0
  424. package/gui/v2/src/app/database/components/Filters/Filters.js +72 -0
  425. package/gui/v2/src/app/database/components/Sidebar.js +46 -0
  426. package/gui/v2/src/app/database/components/Table.js +122 -0
  427. package/gui/v2/src/app/database/context.js +106 -0
  428. package/gui/v2/src/app/database/layout.js +10 -0
  429. package/gui/v2/src/app/database/page.js +31 -0
  430. package/gui/v2/src/app/error.js +25 -0
  431. package/gui/v2/src/app/favicon.ico +0 -0
  432. package/gui/v2/src/app/global-error.js +20 -0
  433. package/gui/v2/src/app/globals.css +30 -0
  434. package/gui/v2/src/app/graphql/graphql.js +71 -0
  435. package/gui/v2/src/app/graphql/page.js +11 -0
  436. package/gui/v2/src/app/layout.js +27 -0
  437. package/gui/v2/src/app/liquid/page.js +68 -0
  438. package/gui/v2/src/app/loading.js +7 -0
  439. package/gui/v2/src/app/logs/components/JsonTree.js +31 -0
  440. package/gui/v2/src/app/logs/components/LogMetadata/LogMetadata.js +61 -0
  441. package/gui/v2/src/app/logs/components/LogRow.js +62 -0
  442. package/gui/v2/src/app/logs/components/PinnedPanel/PinnedPanel.js +46 -0
  443. package/gui/v2/src/app/logs/components/Toolbar/ClearButton.js +10 -0
  444. package/gui/v2/src/app/logs/components/Toolbar/Filter.js +13 -0
  445. package/gui/v2/src/app/logs/components/Toolbar/MetaDataCheckbox.js +11 -0
  446. package/gui/v2/src/app/logs/components/Toolbar/ShowPinnedButton.js +8 -0
  447. package/gui/v2/src/app/logs/components/Toolbar/Toolbar.js +45 -0
  448. package/gui/v2/src/app/logs/context.js +66 -0
  449. package/gui/v2/src/app/logs/layout.js +10 -0
  450. package/gui/v2/src/app/logs/page.js +73 -0
  451. package/gui/v2/src/app/not-found.js +11 -0
  452. package/gui/v2/src/app/page.js +103 -0
  453. package/gui/v2/src/app/providers.js +18 -0
  454. package/gui/v2/src/app/users/components/UserDetails.js +38 -0
  455. package/gui/v2/src/app/users/page.js +121 -0
  456. package/gui/v2/src/components/CodeEditor/CodeEditor.css +12 -0
  457. package/gui/v2/src/components/CodeEditor/CodeEditor.js +76 -0
  458. package/gui/v2/src/components/layout/Header/Header.css +6 -0
  459. package/gui/v2/src/components/layout/Header/Header.js +139 -0
  460. package/gui/v2/src/constants/filters.js +32 -0
  461. package/gui/v2/src/constants/records.js +17 -0
  462. package/gui/v2/src/context/config.js +27 -0
  463. package/gui/v2/src/context/filters.js +22 -0
  464. package/gui/v2/src/context/menu.js +14 -0
  465. package/gui/v2/src/context/theme.js +29 -0
  466. package/gui/v2/src/hooks/config.js +6 -0
  467. package/gui/v2/src/hooks/constants.js +99 -0
  468. package/gui/v2/src/hooks/database.js +44 -0
  469. package/gui/v2/src/hooks/filters.js +30 -0
  470. package/gui/v2/src/hooks/menu.js +19 -0
  471. package/gui/v2/src/hooks/query.js +10 -0
  472. package/gui/v2/src/hooks/queryParams.js +20 -0
  473. package/gui/v2/src/hooks/recordQuery.js +109 -0
  474. package/gui/v2/src/hooks/theme.js +6 -0
  475. package/gui/v2/src/hooks/users.js +63 -0
  476. package/gui/v2/src/reducers/filter.js +28 -0
  477. package/gui/v2/src/reducers/menu.js +125 -0
  478. package/gui/v2/src/reducers/query.js +143 -0
  479. package/gui/v2/src/services/ConfigService.js +7 -0
  480. package/gui/v2/src/services/CoreService.js +68 -0
  481. package/gui/v2/src/services/GraphiQLService.js +14 -0
  482. package/gui/v2/src/services/LiquidService.js +7 -0
  483. package/gui/v2/src/services/LogService.js +7 -0
  484. package/gui/v2/src/services/RecordService.js +27 -0
  485. package/gui/v2/src/styles/app/database.css +10 -0
  486. package/gui/v2/src/styles/app/graphql.css +100 -0
  487. package/gui/v2/src/styles/app/liquid.css +4 -0
  488. package/gui/v2/src/styles/app/users.css +3 -0
  489. package/gui/v2/src/styles/general.css +31 -0
  490. package/gui/v2/src/styles/icons.css +7 -0
  491. package/gui/v2/src/styles/utils.css +103 -0
  492. package/gui/v2/src/styles/variables.css +94 -0
  493. package/gui/v2/tailwind.config.js +18 -0
  494. package/gui/v3/.cta.json +13 -0
  495. package/gui/v3/.cursorrules +7 -0
  496. package/gui/v3/.vscode/settings.json +18 -0
  497. package/gui/v3/README.md +300 -0
  498. package/gui/v3/components.json +21 -0
  499. package/gui/v3/index.html +17 -0
  500. package/gui/v3/out/assets/asn1-EdZsLKOL.js +1 -0
  501. package/gui/v3/out/assets/babel-C9dsZwsK.js +15 -0
  502. package/gui/v3/out/assets/clojure-BMjYHr_A.js +1 -0
  503. package/gui/v3/out/assets/codicon-DCmgc-ay.ttf +0 -0
  504. package/gui/v3/out/assets/constants-BTP7rcyh.js +1 -0
  505. package/gui/v3/out/assets/createLucideIcon-C36JZ1s3.js +21 -0
  506. package/gui/v3/out/assets/css-BnMrqG3P.js +1 -0
  507. package/gui/v3/out/assets/database-DV7gHS2m.js +106 -0
  508. package/gui/v3/out/assets/estree-DZUM3lmb.js +36 -0
  509. package/gui/v3/out/assets/format-Bs4upCOt.js +1 -0
  510. package/gui/v3/out/assets/graphql-7Dzro_xV.js +29 -0
  511. package/gui/v3/out/assets/graphql-Cg7bfA9N.js +6 -0
  512. package/gui/v3/out/assets/graphql-D05RS2Ys.js +29 -0
  513. package/gui/v3/out/assets/graphql-DeSRErpC.css +6 -0
  514. package/gui/v3/out/assets/graphql-Kf_-WQAL.js +335 -0
  515. package/gui/v3/out/assets/graphqlMode-BiZPK6IB.js +2 -0
  516. package/gui/v3/out/assets/icons/home-bg-job.png +0 -0
  517. package/gui/v3/out/assets/icons/home-constants.png +0 -0
  518. package/gui/v3/out/assets/icons/home-database.png +0 -0
  519. package/gui/v3/out/assets/icons/home-graphql.png +0 -0
  520. package/gui/v3/out/assets/icons/home-info-fill-light.png +0 -0
  521. package/gui/v3/out/assets/icons/home-info-light.png +0 -0
  522. package/gui/v3/out/assets/icons/home-liquid.png +0 -0
  523. package/gui/v3/out/assets/icons/home-logs.png +0 -0
  524. package/gui/v3/out/assets/icons/home-pin-fill-light.png +0 -0
  525. package/gui/v3/out/assets/icons/home-pin-light.png +0 -0
  526. package/gui/v3/out/assets/icons/home-support.png +0 -0
  527. package/gui/v3/out/assets/icons/home-users.png +0 -0
  528. package/gui/v3/out/assets/icons/menu-bg-job-dark.png +0 -0
  529. package/gui/v3/out/assets/icons/menu-bg-job-light.png +0 -0
  530. package/gui/v3/out/assets/icons/menu-console-dark.png +0 -0
  531. package/gui/v3/out/assets/icons/menu-console-light.png +0 -0
  532. package/gui/v3/out/assets/icons/menu-constants-dark.png +0 -0
  533. package/gui/v3/out/assets/icons/menu-constants-light.png +0 -0
  534. package/gui/v3/out/assets/icons/menu-database-dark.png +0 -0
  535. package/gui/v3/out/assets/icons/menu-database-light.png +0 -0
  536. package/gui/v3/out/assets/icons/menu-docs-dark.png +0 -0
  537. package/gui/v3/out/assets/icons/menu-docs-light.png +0 -0
  538. package/gui/v3/out/assets/icons/menu-graphql-dark.png +0 -0
  539. package/gui/v3/out/assets/icons/menu-graphql-light.png +0 -0
  540. package/gui/v3/out/assets/icons/menu-iia-dark.png +0 -0
  541. package/gui/v3/out/assets/icons/menu-iia-light.png +0 -0
  542. package/gui/v3/out/assets/icons/menu-liquid-dark.png +0 -0
  543. package/gui/v3/out/assets/icons/menu-liquid-light.png +0 -0
  544. package/gui/v3/out/assets/icons/menu-logs-dark.png +0 -0
  545. package/gui/v3/out/assets/icons/menu-logs-light.png +0 -0
  546. package/gui/v3/out/assets/icons/menu-support-dark.png +0 -0
  547. package/gui/v3/out/assets/icons/menu-support-light.png +0 -0
  548. package/gui/v3/out/assets/icons/menu-theme-dark.png +0 -0
  549. package/gui/v3/out/assets/icons/menu-theme-light.png +0 -0
  550. package/gui/v3/out/assets/icons/menu-users-dark.png +0 -0
  551. package/gui/v3/out/assets/icons/menu-users-light.png +0 -0
  552. package/gui/v3/out/assets/icons/search-icon-dark.svg +3 -0
  553. package/gui/v3/out/assets/index-AQmQqDwZ.js +68 -0
  554. package/gui/v3/out/assets/index-BkuncLX2.js +1 -0
  555. package/gui/v3/out/assets/index-Cf5jXmk6.css +1 -0
  556. package/gui/v3/out/assets/index-CizP5xBC.js +7 -0
  557. package/gui/v3/out/assets/index-DO4-OviR.js +1 -0
  558. package/gui/v3/out/assets/index-DuTWoEAJ.js +1 -0
  559. package/gui/v3/out/assets/index-Fzn1QYI7.js +41 -0
  560. package/gui/v3/out/assets/ins-logo-dark.svg +35 -0
  561. package/gui/v3/out/assets/ins-logo-light.svg +35 -0
  562. package/gui/v3/out/assets/javascript-qCveANmP.js +1 -0
  563. package/gui/v3/out/assets/jsonMode-D3_vpDO9.js +15 -0
  564. package/gui/v3/out/assets/liquid-eqk0BGFR.js +56 -0
  565. package/gui/v3/out/assets/lite-BCVbb_oz.js +2 -0
  566. package/gui/v3/out/assets/logs-DI6Go5dW.js +16 -0
  567. package/gui/v3/out/assets/mllike-CXdrOF99.js +1 -0
  568. package/gui/v3/out/assets/monaco-editor-C4cuflwX.js +722 -0
  569. package/gui/v3/out/assets/monaco-editor-D6kYW_CN.css +1 -0
  570. package/gui/v3/out/assets/mouseTarget-B_KnTiWf.js +9 -0
  571. package/gui/v3/out/assets/objectWithoutPropertiesLoose-Ls7qkcH1.js +1 -0
  572. package/gui/v3/out/assets/pug-DukmZTjD.js +1 -0
  573. package/gui/v3/out/assets/python-BuPzkPfP.js +1 -0
  574. package/gui/v3/out/assets/rpm-CTu-6PCP.js +1 -0
  575. package/gui/v3/out/assets/sql-D0XecflT.js +1 -0
  576. package/gui/v3/out/assets/standalone-BS_cqyLa.js +39 -0
  577. package/gui/v3/out/assets/table-D17Bwjdk.js +6 -0
  578. package/gui/v3/out/assets/toolkit-DToHxdMP.js +1 -0
  579. package/gui/v3/out/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  580. package/gui/v3/out/assets/users-DI3wqkEI.js +1 -0
  581. package/gui/v3/out/favicon.png +0 -0
  582. package/gui/v3/out/index.html +41 -0
  583. package/gui/v3/out/logo192.png +0 -0
  584. package/gui/v3/out/logo512.png +0 -0
  585. package/gui/v3/out/manifest.json +25 -0
  586. package/gui/v3/out/monacoeditorwork/editor.worker.bundle.js +13519 -0
  587. package/gui/v3/out/monacoeditorwork/graphql.worker..bundle.js +32105 -0
  588. package/gui/v3/out/monacoeditorwork/json.worker.bundle.js +21320 -0
  589. package/gui/v3/out/robots.txt +3 -0
  590. package/gui/v3/package-lock.json +7193 -0
  591. package/gui/v3/package.json +69 -0
  592. package/gui/v3/public/assets/icons/home-bg-job.png +0 -0
  593. package/gui/v3/public/assets/icons/home-constants.png +0 -0
  594. package/gui/v3/public/assets/icons/home-database.png +0 -0
  595. package/gui/v3/public/assets/icons/home-graphql.png +0 -0
  596. package/gui/v3/public/assets/icons/home-info-fill-light.png +0 -0
  597. package/gui/v3/public/assets/icons/home-info-light.png +0 -0
  598. package/gui/v3/public/assets/icons/home-liquid.png +0 -0
  599. package/gui/v3/public/assets/icons/home-logs.png +0 -0
  600. package/gui/v3/public/assets/icons/home-pin-fill-light.png +0 -0
  601. package/gui/v3/public/assets/icons/home-pin-light.png +0 -0
  602. package/gui/v3/public/assets/icons/home-support.png +0 -0
  603. package/gui/v3/public/assets/icons/home-users.png +0 -0
  604. package/gui/v3/public/assets/icons/menu-bg-job-dark.png +0 -0
  605. package/gui/v3/public/assets/icons/menu-bg-job-light.png +0 -0
  606. package/gui/v3/public/assets/icons/menu-console-dark.png +0 -0
  607. package/gui/v3/public/assets/icons/menu-console-light.png +0 -0
  608. package/gui/v3/public/assets/icons/menu-constants-dark.png +0 -0
  609. package/gui/v3/public/assets/icons/menu-constants-light.png +0 -0
  610. package/gui/v3/public/assets/icons/menu-database-dark.png +0 -0
  611. package/gui/v3/public/assets/icons/menu-database-light.png +0 -0
  612. package/gui/v3/public/assets/icons/menu-docs-dark.png +0 -0
  613. package/gui/v3/public/assets/icons/menu-docs-light.png +0 -0
  614. package/gui/v3/public/assets/icons/menu-graphql-dark.png +0 -0
  615. package/gui/v3/public/assets/icons/menu-graphql-light.png +0 -0
  616. package/gui/v3/public/assets/icons/menu-iia-dark.png +0 -0
  617. package/gui/v3/public/assets/icons/menu-iia-light.png +0 -0
  618. package/gui/v3/public/assets/icons/menu-liquid-dark.png +0 -0
  619. package/gui/v3/public/assets/icons/menu-liquid-light.png +0 -0
  620. package/gui/v3/public/assets/icons/menu-logs-dark.png +0 -0
  621. package/gui/v3/public/assets/icons/menu-logs-light.png +0 -0
  622. package/gui/v3/public/assets/icons/menu-support-dark.png +0 -0
  623. package/gui/v3/public/assets/icons/menu-support-light.png +0 -0
  624. package/gui/v3/public/assets/icons/menu-theme-dark.png +0 -0
  625. package/gui/v3/public/assets/icons/menu-theme-light.png +0 -0
  626. package/gui/v3/public/assets/icons/menu-users-dark.png +0 -0
  627. package/gui/v3/public/assets/icons/menu-users-light.png +0 -0
  628. package/gui/v3/public/assets/icons/search-icon-dark.svg +3 -0
  629. package/gui/v3/public/assets/ins-logo-dark.svg +35 -0
  630. package/gui/v3/public/assets/ins-logo-light.svg +35 -0
  631. package/gui/v3/public/favicon.png +0 -0
  632. package/gui/v3/public/logo192.png +0 -0
  633. package/gui/v3/public/logo512.png +0 -0
  634. package/gui/v3/public/manifest.json +25 -0
  635. package/gui/v3/public/robots.txt +3 -0
  636. package/gui/v3/src/components/CodeEditor.tsx +100 -0
  637. package/gui/v3/src/components/commons/DatePicker.tsx +93 -0
  638. package/gui/v3/src/components/commons/DateRangeFilter.tsx +76 -0
  639. package/gui/v3/src/components/commons/InputBox.tsx +88 -0
  640. package/gui/v3/src/components/data/DataPagination.tsx +116 -0
  641. package/gui/v3/src/components/data/DataTable.tsx +84 -0
  642. package/gui/v3/src/components/layout/Header.tsx +42 -0
  643. package/gui/v3/src/components/layout/Layout.tsx +15 -0
  644. package/gui/v3/src/components/ui/alert.tsx +66 -0
  645. package/gui/v3/src/components/ui/badge.tsx +48 -0
  646. package/gui/v3/src/components/ui/button.tsx +59 -0
  647. package/gui/v3/src/components/ui/calendar.tsx +211 -0
  648. package/gui/v3/src/components/ui/card.tsx +92 -0
  649. package/gui/v3/src/components/ui/dropdown-menu.tsx +255 -0
  650. package/gui/v3/src/components/ui/hover-card.tsx +42 -0
  651. package/gui/v3/src/components/ui/input.tsx +21 -0
  652. package/gui/v3/src/components/ui/navigation-menu.tsx +168 -0
  653. package/gui/v3/src/components/ui/pagination.tsx +127 -0
  654. package/gui/v3/src/components/ui/popover.tsx +46 -0
  655. package/gui/v3/src/components/ui/resizable.tsx +54 -0
  656. package/gui/v3/src/components/ui/select.tsx +183 -0
  657. package/gui/v3/src/components/ui/separator.tsx +28 -0
  658. package/gui/v3/src/components/ui/sheet.tsx +137 -0
  659. package/gui/v3/src/components/ui/sidebar.tsx +724 -0
  660. package/gui/v3/src/components/ui/skeleton.tsx +13 -0
  661. package/gui/v3/src/components/ui/switch.tsx +29 -0
  662. package/gui/v3/src/components/ui/table.tsx +114 -0
  663. package/gui/v3/src/components/ui/tooltip.tsx +61 -0
  664. package/gui/v3/src/features/config/context.ts +21 -0
  665. package/gui/v3/src/features/config/hooks.ts +11 -0
  666. package/gui/v3/src/features/config/provider.tsx +33 -0
  667. package/gui/v3/src/features/config/services.ts +14 -0
  668. package/gui/v3/src/features/config/type.ts +7 -0
  669. package/gui/v3/src/features/database/components/DatabaseLayout.tsx +44 -0
  670. package/gui/v3/src/features/database/components/DatabaseLoader.tsx +3 -0
  671. package/gui/v3/src/features/database/components/DatabaseNotFound.tsx +6 -0
  672. package/gui/v3/src/features/database/components/DatabaseSidebar.tsx +60 -0
  673. package/gui/v3/src/features/database/components/LoadingIndicator.tsx +3 -0
  674. package/gui/v3/src/features/database/components/RecordsFilter.tsx +89 -0
  675. package/gui/v3/src/features/database/components/RecordsTable.tsx +64 -0
  676. package/gui/v3/src/features/database/components/RecordsViewer.tsx +39 -0
  677. package/gui/v3/src/features/database/graphql/queries.ts +64 -0
  678. package/gui/v3/src/features/database/hooks/useDatabaseColumns.ts +34 -0
  679. package/gui/v3/src/features/database/hooks/useRecords.ts +21 -0
  680. package/gui/v3/src/features/database/hooks/useSelectedTable.ts +14 -0
  681. package/gui/v3/src/features/database/hooks/useTables.ts +18 -0
  682. package/gui/v3/src/features/database/reducers/useRecordsVariable.ts +66 -0
  683. package/gui/v3/src/features/database/schema/records.ts +82 -0
  684. package/gui/v3/src/features/database/schema/tables.ts +51 -0
  685. package/gui/v3/src/features/graphiql/components/GraphiQL.tsx +21 -0
  686. package/gui/v3/src/features/graphiql/style.css +120 -0
  687. package/gui/v3/src/features/liquid/components/LiquidEditor.tsx +95 -0
  688. package/gui/v3/src/features/liquid/service.ts +13 -0
  689. package/gui/v3/src/features/logs/components/LogMessage.tsx +83 -0
  690. package/gui/v3/src/features/logs/components/LogsTable.tsx +121 -0
  691. package/gui/v3/src/features/logs/components/LogsViewer.tsx +30 -0
  692. package/gui/v3/src/features/logs/hooks/useLogs.tsx +59 -0
  693. package/gui/v3/src/features/logs/types/schema.ts +8 -0
  694. package/gui/v3/src/features/menu/components/GuiMenu.tsx +32 -0
  695. package/gui/v3/src/features/menu/components/InsitesMenu.tsx +56 -0
  696. package/gui/v3/src/features/menu/components/TileMenu.tsx +88 -0
  697. package/gui/v3/src/features/menu/constants.ts +99 -0
  698. package/gui/v3/src/features/menu/hooks.ts +11 -0
  699. package/gui/v3/src/features/menu/store.ts +26 -0
  700. package/gui/v3/src/features/menu/types.ts +16 -0
  701. package/gui/v3/src/features/theme/context.tsx +16 -0
  702. package/gui/v3/src/features/theme/hook.tsx +11 -0
  703. package/gui/v3/src/features/theme/provider.tsx +35 -0
  704. package/gui/v3/src/features/theme/store.ts +17 -0
  705. package/gui/v3/src/features/theme/types.ts +1 -0
  706. package/gui/v3/src/features/users/components/Users.tsx +77 -0
  707. package/gui/v3/src/features/users/types.ts +31 -0
  708. package/gui/v3/src/features/users/usernames.ts +45 -0
  709. package/gui/v3/src/hooks/use-mobile.ts +19 -0
  710. package/gui/v3/src/lib/api/constants.ts +1 -0
  711. package/gui/v3/src/lib/api/errors.ts +22 -0
  712. package/gui/v3/src/lib/api/request.ts +57 -0
  713. package/gui/v3/src/lib/api/types.ts +16 -0
  714. package/gui/v3/src/lib/graphql/hooks.ts +27 -0
  715. package/gui/v3/src/lib/graphql/request.ts +31 -0
  716. package/gui/v3/src/lib/graphql/schema/filters.ts +108 -0
  717. package/gui/v3/src/lib/graphql/schema/sorts.ts +10 -0
  718. package/gui/v3/src/lib/graphql/types.ts +29 -0
  719. package/gui/v3/src/lib/providers/entries.ts +21 -0
  720. package/gui/v3/src/lib/providers/index.tsx +10 -0
  721. package/gui/v3/src/lib/providers/queryClient.tsx +16 -0
  722. package/gui/v3/src/lib/providers/types.ts +9 -0
  723. package/gui/v3/src/lib/utils.ts +30 -0
  724. package/gui/v3/src/logo.svg +44 -0
  725. package/gui/v3/src/main.tsx +42 -0
  726. package/gui/v3/src/pages/ConstantPage.tsx +3 -0
  727. package/gui/v3/src/pages/DatabasePage.tsx +31 -0
  728. package/gui/v3/src/pages/GraphqlPage.tsx +9 -0
  729. package/gui/v3/src/pages/HomePage.tsx +36 -0
  730. package/gui/v3/src/pages/LiquidPage.tsx +5 -0
  731. package/gui/v3/src/pages/LogsPage.tsx +10 -0
  732. package/gui/v3/src/pages/Userspage.tsx +5 -0
  733. package/gui/v3/src/reportWebVitals.ts +13 -0
  734. package/gui/v3/src/routeTree.gen.ts +189 -0
  735. package/gui/v3/src/routes/__root.tsx +6 -0
  736. package/gui/v3/src/routes/constants.tsx +7 -0
  737. package/gui/v3/src/routes/database.tsx +6 -0
  738. package/gui/v3/src/routes/graphql.tsx +6 -0
  739. package/gui/v3/src/routes/index.tsx +6 -0
  740. package/gui/v3/src/routes/liquid.tsx +6 -0
  741. package/gui/v3/src/routes/logs.tsx +6 -0
  742. package/gui/v3/src/routes/users.tsx +6 -0
  743. package/gui/v3/src/styles.css +247 -0
  744. package/gui/v3/tsconfig.json +28 -0
  745. package/gui/v3/vite.config.ts +43 -0
  746. package/lib/ServerError.js +122 -0
  747. package/lib/apiRequest.js +15 -0
  748. package/lib/archive.js +126 -0
  749. package/lib/assets/insites-icon.png +0 -0
  750. package/lib/assets/manifest.js +34 -0
  751. package/lib/assets/packAssets.js +53 -0
  752. package/lib/assets.js +56 -0
  753. package/lib/audit/detailed.js +97 -0
  754. package/lib/audit/duplicateFile.js +31 -0
  755. package/lib/audit/extensions.js +53 -0
  756. package/lib/audit/fileName.js +20 -0
  757. package/lib/audit/filters.js +99 -0
  758. package/lib/audit/orphanedIncludes.js +85 -0
  759. package/lib/audit/tags.js +69 -0
  760. package/lib/audit.js +47 -0
  761. package/lib/data/fetchFiles.js +93 -0
  762. package/lib/data/isValidJSON.js +12 -0
  763. package/lib/data/uploadFiles.js +92 -0
  764. package/lib/data/waitForStatus.js +31 -0
  765. package/lib/deploy/directAssetsUploadStrategy.js +57 -0
  766. package/lib/deploy/strategy.js +8 -0
  767. package/lib/directories.js +23 -0
  768. package/lib/downloadFile.js +16 -0
  769. package/lib/duration.js +7 -0
  770. package/lib/files.js +96 -0
  771. package/lib/insites-apig.js +18 -0
  772. package/lib/insites-console.js +24 -0
  773. package/lib/logger/rainbow.js +11 -0
  774. package/lib/logger/simple.js +9 -0
  775. package/lib/logger.js +63 -0
  776. package/lib/logsv2/http.js +40 -0
  777. package/lib/modules.js +129 -0
  778. package/lib/portal.js +52 -0
  779. package/lib/pos-proxy.js +162 -0
  780. package/lib/prepareArchive.js +49 -0
  781. package/lib/presignUrl.js +71 -0
  782. package/lib/proxy.js +75 -0
  783. package/lib/push.js +62 -0
  784. package/lib/s3UploadFile.js +56 -0
  785. package/lib/server.js +123 -0
  786. package/lib/settings.js +42 -0
  787. package/lib/shouldBeSynced.js +89 -0
  788. package/lib/swagger-client.js +287 -0
  789. package/lib/templates.js +52 -0
  790. package/lib/updateNotifier.js +8 -0
  791. package/lib/utils/valid-file-path.js +21 -0
  792. package/lib/validators/directoryEmpty.js +12 -0
  793. package/lib/validators/directoryExists.js +12 -0
  794. package/lib/validators/email.js +8 -0
  795. package/lib/validators/existence.js +9 -0
  796. package/lib/validators/index.js +13 -0
  797. package/lib/validators/url.js +8 -0
  798. package/lib/watch-files-extensions.js +39 -0
  799. package/lib/watch.js +192 -0
  800. package/mock/app.js +45 -0
  801. package/mock/bin/www +91 -0
  802. package/mock/package-lock.json +2287 -0
  803. package/mock/package.json +18 -0
  804. package/mock/public/stylesheets/style.css +8 -0
  805. package/mock/responses/constants.js +39 -0
  806. package/mock/responses/databases.js +3589 -0
  807. package/mock/responses/logs.js +126 -0
  808. package/mock/responses/records.js +443 -0
  809. package/mock/responses/schemas.js +36896 -0
  810. package/mock/responses/users.js +194 -0
  811. package/mock/routes/api.js +53 -0
  812. package/mock/routes/index.js +13 -0
  813. package/mock/routes/users.js +9 -0
  814. package/mock/views/error.jade +6 -0
  815. package/mock/views/index.jade +5 -0
  816. package/mock/views/layout.jade +7 -0
  817. package/package.json +77 -0
  818. package/tests/archive.test.js +33 -0
  819. package/tests/deploy.test.js +26 -0
  820. package/tests/fixtures/archive/default/app/assets/images/insites-logo.svg +55 -0
  821. package/tests/fixtures/archive/default/app/views/pages/hello.liquid +4 -0
  822. package/tests/fixtures/archive/default/modules/testModule/public/views/pages/hello-test-module.liquid +4 -0
  823. package/tests/fixtures/archive/default/modules/testModule/public/views/partials/dir/subdir/foo.liquid +1 -0
  824. package/tests/fixtures/deploy/default/app/assets/images/insites-logo.svg +55 -0
  825. package/tests/fixtures/deploy/default/app/views/pages/index.liquid +6 -0
  826. package/tests/fixtures/deploy/default/app/views/partials/test.liquid +1 -0
  827. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/README.md +22 -0
  828. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/api_calls/.keep +0 -0
  829. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/assets/.keep +0 -0
  830. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/emails/.keep +0 -0
  831. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/graphql/.keep +0 -0
  832. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/model_schemas/.keep +0 -0
  833. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/smses/.keep +0 -0
  834. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/translations/.keep +0 -0
  835. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/views/layouts/.keep +0 -0
  836. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/views/pages/.keep +0 -0
  837. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/private/views/partials/.keep +0 -0
  838. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/api_calls/.keep +0 -0
  839. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/assets/.keep +0 -0
  840. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/emails/.keep +0 -0
  841. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/graphql/.keep +0 -0
  842. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/model_schemas/.keep +0 -0
  843. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/smses/.keep +0 -0
  844. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/translations/.keep +0 -0
  845. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/layouts/.keep +0 -0
  846. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/pages/.keep +0 -0
  847. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/pages/demo.json.liquid +4 -0
  848. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/partials/.keep +0 -0
  849. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/partials/components/.keep +0 -0
  850. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/partials/components/test.html.liquid +1 -0
  851. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/public/views/partials/components/test.liquid +1 -0
  852. package/tests/fixtures/deploy/default/modules/insites-cli-demo-module/template-values.json +7 -0
  853. package/tests/utils/cliPath.js +4 -0
  854. package/tests/utils/exec.js +12 -0
@@ -0,0 +1,24 @@
1
+ "use strict";(self.webpackChunk_platformos_gui=self.webpackChunk_platformos_gui||[]).push([[480],{7480:(pu,Nl,yn)=>{yn.r(Nl),yn.d(Nl,{C:()=>Hl,a:()=>ei,c:()=>Qs});var qs=yn(9361),Zs=Object.defineProperty,u=(ht,ti)=>Zs(ht,"name",{value:ti,configurable:!0});function Wl(ht,ti){return ti.forEach(function(z){z&&typeof z!="string"&&!Array.isArray(z)&&Object.keys(z).forEach(function(Ne){if(Ne!=="default"&&!(Ne in ht)){var Ce=Object.getOwnPropertyDescriptor(z,Ne);Object.defineProperty(ht,Ne,Ce.get?Ce:{enumerable:!0,get:function(){return z[Ne]}})}})}),Object.freeze(ht)}u(Wl,"_mergeNamespaces");var ei={exports:{}};(function(ht,ti){(function(z,Ne){ht.exports=Ne()})(qs.c,function(){var z=navigator.userAgent,Ne=navigator.platform,Ce=/gecko\/\d/i.test(z),Pl=/MSIE \d/.test(z),El=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(z),ri=/Edge\/(\d+)/.exec(z),N=Pl||El||ri,I=N&&(Pl?document.documentMode||6:+(ri||El)[1]),oe=!ri&&/WebKit\//.test(z),Js=oe&&/Qt\/\d+\.\d+/.test(z),ii=!ri&&/Chrome\//.test(z),Te=/Opera\//.test(z),ni=/Apple Computer/.test(navigator.vendor),js=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(z),Vs=/PhantomJS/.test(z),hr=ni&&(/Mobile\/\w+/.test(z)||navigator.maxTouchPoints>2),oi=/Android/.test(z),dr=hr||oi||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(z),Se=hr||/Mac/.test(Ne),$s=/\bCrOS\b/.test(z),eu=/win/i.test(Ne),dt=Te&&z.match(/Version\/(\d*\.\d*)/);dt&&(dt=Number(dt[1])),dt&&dt>=15&&(Te=!1,oe=!0);var Fl=Se&&(Js||Te&&(dt==null||dt<12.11)),mn=Ce||N&&I>=9;function ct(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}u(ct,"classTest");var pt=u(function(e,t){var i=e.className,r=ct(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}},"rmClass");function Be(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}u(Be,"removeChildren");function ve(e,t){return Be(e).appendChild(t)}u(ve,"removeChildrenAndAdd");function T(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)n.appendChild(t[o]);return n}u(T,"elt");function vt(e,t,i,r){var n=T(e,t,i,r);return n.setAttribute("role","presentation"),n}u(vt,"eltP");var gt;document.createRange?gt=u(function(e,t,i,r){var n=document.createRange();return n.setEnd(r||e,i),n.setStart(e,t),n},"range"):gt=u(function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r},"range");function Re(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}u(Re,"contains");function ye(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}u(ye,"activeElt");function Je(e,t){var i=e.className;ct(t).test(i)||(e.className+=(i?" ":"")+t)}u(Je,"addClass");function li(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ct(i[r]).test(t)&&(t+=" "+i[r]);return t}u(li,"joinClasses");var cr=u(function(e){e.select()},"selectInput");hr?cr=u(function(e){e.selectionStart=0,e.selectionEnd=e.value.length},"selectInput"):N&&(cr=u(function(e){try{e.select()}catch{}},"selectInput"));function ai(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}u(ai,"bind");function je(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}u(je,"copyObj");function me(e,t,i,r,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=n||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=i-l%i,o=a+1}}u(me,"countColumn");var Ve=u(function(){this.id=null,this.f=null,this.time=0,this.handler=ai(this.onTimeout,this)},"Delayed");Ve.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ve.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function ee(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}u(ee,"indexOf");var Il=50,si={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},bn={origin:"*mouse"},pr={origin:"+move"};function ui(e,t,i){for(var r=0,n=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||n+l>=t)return r+Math.min(l,t-n);if(n+=o-r,n+=i-n%i,r=o+1,n>=t)return r}}u(ui,"findColumn");var fi=[""];function hi(e){for(;fi.length<=e;)fi.push(W(fi)+" ");return fi[e]}u(hi,"spaceStr");function W(e){return e[e.length-1]}u(W,"lst");function vr(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}u(vr,"map");function Bl(e,t,i){for(var r=0,n=i(t);r<e.length&&i(e[r])<=n;)r++;e.splice(r,0,t)}u(Bl,"insertSorted");function xn(){}u(xn,"nothing");function Cn(e,t){var i;return Object.create?i=Object.create(e):(xn.prototype=e,i=new xn),t&&je(t,i),i}u(Cn,"createObj");var tu=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function di(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||tu.test(e))}u(di,"isWordCharBasic");function gr(e,t){return t?t.source.indexOf("\\w")>-1&&di(e)?!0:t.test(e):di(e)}u(gr,"isWordChar");function Sn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}u(Sn,"isEmpty");var ru=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ci(e){return e.charCodeAt(0)>=768&&ru.test(e)}u(ci,"isExtendingChar");function wn(e,t,i){for(;(i<0?t>0:t<e.length)&&ci(e.charAt(t));)t+=i;return t}u(wn,"skipExtendingChars");function Ft(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var n=(t+i)/2,o=r<0?Math.ceil(n):Math.floor(n);if(o==t)return e(o)?t:i;e(o)?i=o:t=o+r}}u(Ft,"findFirst");function Rl(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,o=0;o<e.length;++o){var l=e[o];(l.from<i&&l.to>t||t==i&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o),n=!0)}n||r(t,i,"ltr")}u(Rl,"iterateBidiSections");var yr=null;function It(e,t,i){var r;yr=null;for(var n=0;n<e.length;++n){var o=e[n];if(o.from<t&&o.to>t)return n;o.to==t&&(o.from!=o.to&&i=="before"?r=n:yr=n),o.from==t&&(o.from!=o.to&&i!="before"?r=n:yr=n)}return r!=null?r:yr}u(It,"getBidiPartAt");var iu=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}u(i,"charType");var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(f,h,d){this.level=f,this.from=h,this.to=d}return u(s,"BidiSpan"),function(f,h){var d=h=="ltr"?"L":"R";if(f.length==0||h=="ltr"&&!r.test(f))return!1;for(var p=f.length,c=[],v=0;v<p;++v)c.push(i(f.charCodeAt(v)));for(var g=0,m=d;g<p;++g){var b=c[g];b=="m"?c[g]=m:m=b}for(var C=0,x=d;C<p;++C){var S=c[C];S=="1"&&x=="r"?c[C]="n":o.test(S)&&(x=S,S=="r"&&(c[C]="R"))}for(var k=1,L=c[0];k<p-1;++k){var O=c[k];O=="+"&&L=="1"&&c[k+1]=="1"?c[k]="1":O==","&&L==c[k+1]&&(L=="1"||L=="n")&&(c[k]=L),L=O}for(var F=0;F<p;++F){var V=c[F];if(V==",")c[F]="N";else if(V=="%"){var R=void 0;for(R=F+1;R<p&&c[R]=="%";++R);for(var he=F&&c[F-1]=="!"||R<p&&c[R]=="1"?"1":"N",de=F;de<R;++de)c[de]=he;F=R-1}}for(var X=0,ce=d;X<p;++X){var re=c[X];ce=="L"&&re=="1"?c[X]="L":o.test(re)&&(ce=re)}for(var j=0;j<p;++j)if(n.test(c[j])){var Y=void 0;for(Y=j+1;Y<p&&n.test(c[Y]);++Y);for(var G=(j?c[j-1]:d)=="L",pe=(Y<p?c[Y]:d)=="L",ur=G==pe?G?"L":"R":d,ft=j;ft<Y;++ft)c[ft]=ur;j=Y-1}for(var ne=[],Ie,$=0;$<p;)if(l.test(c[$])){var Al=$;for(++$;$<p&&l.test(c[$]);++$);ne.push(new s(0,Al,$))}else{var Qe=$,Pt=ne.length,Et=h=="rtl"?1:0;for(++$;$<p&&c[$]!="L";++$);for(var se=Qe;se<$;)if(a.test(c[se])){Qe<se&&(ne.splice(Pt,0,new s(1,Qe,se)),Pt+=Et);var fr=se;for(++se;se<$&&a.test(c[se]);++se);ne.splice(Pt,0,new s(2,fr,se)),Pt+=Et,Qe=se}else++se;Qe<$&&ne.splice(Pt,0,new s(1,Qe,$))}return h=="ltr"&&(ne[0].level==1&&(Ie=f.match(/^\s+/))&&(ne[0].from=Ie[0].length,ne.unshift(new s(0,0,Ie[0].length))),W(ne).level==1&&(Ie=f.match(/\s+$/))&&(W(ne).to-=Ie[0].length,ne.push(new s(0,p-Ie[0].length,p)))),h=="rtl"?ne.reverse():ne}}();function He(e,t){var i=e.order;return i==null&&(i=e.order=iu(e.text,t)),i}u(He,"getOrder");var zl=[],M=u(function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||zl).concat(i)}},"on");function pi(e,t){return e._handlers&&e._handlers[t]||zl}u(pi,"getHandlers");function ge(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,n=r&&r[t];if(n){var o=ee(n,i);o>-1&&(r[t]=n.slice(0,o).concat(n.slice(o+1)))}}}u(ge,"off");function U(e,t){var i=pi(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<i.length;++n)i[n].apply(null,r)}u(U,"signal");function q(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),U(e,i||t.type,e,t),vi(t)||t.codemirrorIgnore}u(q,"signalDOMEvent");function Ln(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)ee(i,t[r])==-1&&i.push(t[r])}u(Ln,"signalCursorActivity");function be(e,t){return pi(e,t).length>0}u(be,"hasHandler");function yt(e){e.prototype.on=function(t,i){M(this,t,i)},e.prototype.off=function(t,i){ge(this,t,i)}}u(yt,"eventMixin");function le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}u(le,"e_preventDefault");function kn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}u(kn,"e_stopPropagation");function vi(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}u(vi,"e_defaultPrevented");function Bt(e){le(e),kn(e)}u(Bt,"e_stop");function gi(e){return e.target||e.srcElement}u(gi,"e_target");function Tn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),Se&&e.ctrlKey&&t==1&&(t=3),t}u(Tn,"e_button");var nu=function(){if(N&&I<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),Mn;function Gl(e){if(Mn==null){var t=T("span","\u200B");ve(e,T("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Mn=t.offsetWidth<=1&&t.offsetHeight>2&&!(N&&I<8))}var i=Mn?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}u(Gl,"zeroWidthElement");var Dn;function Ul(e){if(Dn!=null)return Dn;var t=ve(e,document.createTextNode("A\u062EA")),i=gt(t,0,1).getBoundingClientRect(),r=gt(t,1,2).getBoundingClientRect();return Be(e),!i||i.left==i.right?!1:Dn=r.right-i.right<3}u(Ul,"hasBadBidiRects");var An=`
2
+
3
+ b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(`
4
+ `,t);n==-1&&(n=e.length);var o=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),l=o.indexOf("\r");l!=-1?(i.push(o.slice(0,l)),t+=l+1):(i.push(o),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},ou=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},lu=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),On=null;function Kl(e){if(On!=null)return On;var t=ve(e,T("span","x")),i=t.getBoundingClientRect(),r=gt(t,0,1).getBoundingClientRect();return On=Math.abs(i.left-r.left)>1}u(Kl,"hasBadZoomedRects");var Nn={},Rt={};function _l(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Nn[e]=t}u(_l,"defineMode");function Xl(e,t){Rt[e]=t}u(Xl,"defineMIME");function mr(e){if(typeof e=="string"&&Rt.hasOwnProperty(e))e=Rt[e];else if(e&&typeof e.name=="string"&&Rt.hasOwnProperty(e.name)){var t=Rt[e.name];typeof t=="string"&&(t={name:t}),e=Cn(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return mr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return mr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}u(mr,"resolveMode");function yi(e,t){t=mr(t);var i=Nn[t.name];if(!i)return yi(e,"text/plain");var r=i(e,t);if(zt.hasOwnProperty(t.name)){var n=zt[t.name];for(var o in n)n.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=n[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}u(yi,"getMode");var zt={};function Yl(e,t){var i=zt.hasOwnProperty(e)?zt[e]:zt[e]={};je(t,i)}u(Yl,"extendMode");function $e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}u($e,"copyState");function mi(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}u(mi,"innerMode");function Wn(e,t,i){return e.startState?e.startState(t,i):!0}u(Wn,"startState");var _=u(function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i},"StringStream");_.prototype.eol=function(){return this.pos>=this.string.length},_.prototype.sol=function(){return this.pos==this.lineStart},_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},_.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},_.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},_.prototype.skipToEnd=function(){this.pos=this.string.length},_.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},_.prototype.backUp=function(e){this.pos-=e},_.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},_.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},_.prototype.match=function(e,t,i){if(typeof e=="string"){var r=u(function(l){return i?l.toLowerCase():l},"cased"),n=this.string.substr(this.pos,e.length);if(r(n)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},_.prototype.current=function(){return this.string.slice(this.start,this.pos)},_.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},_.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},_.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function w(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],o=n.chunkSize();if(t<o){i=n;break}t-=o}return i.lines[t]}u(w,"getLine");function et(e,t,i){var r=[],n=t.line;return e.iter(t.line,i.line+1,function(o){var l=o.text;n==i.line&&(l=l.slice(0,i.ch)),n==t.line&&(l=l.slice(t.ch)),r.push(l),++n}),r}u(et,"getBetween");function bi(e,t,i){var r=[];return e.iter(t,i,function(n){r.push(n.text)}),r}u(bi,"getLines");function Me(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}u(Me,"updateLineHeight");function P(e){if(e.parent==null)return null;for(var t=e.parent,i=ee(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var n=0;r.children[n]!=t;++n)i+=r.children[n].chunkSize();return i+t.first}u(P,"lineNo");function tt(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var n=e.children[r],o=n.height;if(t<o){e=n;continue e}t-=o,i+=n.chunkSize()}return i}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return i+l}u(tt,"lineAtHeight");function Gt(e,t){return t>=e.first&&t<e.first+e.size}u(Gt,"isLine");function xi(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}u(xi,"lineNumberFor");function y(e,t,i){if(i===void 0&&(i=null),!(this instanceof y))return new y(e,t,i);this.line=e,this.ch=t,this.sticky=i}u(y,"Pos");function D(e,t){return e.line-t.line||e.ch-t.ch}u(D,"cmp");function Ci(e,t){return e.sticky==t.sticky&&D(e,t)==0}u(Ci,"equalCursorPos");function Si(e){return y(e.line,e.ch)}u(Si,"copyPos");function br(e,t){return D(e,t)<0?t:e}u(br,"maxPos");function xr(e,t){return D(e,t)<0?e:t}u(xr,"minPos");function Hn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}u(Hn,"clipLine");function A(e,t){if(t.line<e.first)return y(e.first,0);var i=e.first+e.size-1;return t.line>i?y(i,w(e,i).text.length):ql(t,w(e,t.line).text.length)}u(A,"clipPos");function ql(e,t){var i=e.ch;return i==null||i>t?y(e.line,t):i<0?y(e.line,0):e}u(ql,"clipToLen");function Pn(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=A(e,t[r]);return i}u(Pn,"clipPosArray");var wi=u(function(e,t){this.state=e,this.lookAhead=t},"SavedContext"),Pe=u(function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1},"Context");Pe.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pe.fromSaved=function(e,t,i){return t instanceof wi?new Pe(e,$e(e.mode,t.state),i,t.lookAhead):new Pe(e,$e(e.mode,t),i)},Pe.prototype.save=function(e){var t=e!==!1?$e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new wi(t,this.maxLookAhead):t};function En(e,t,i,r){var n=[e.state.modeGen],o={};zn(e,t.text,e.doc.mode,i,function(f,h){return n.push(f,h)},o,r);for(var l=i.state,a=u(function(f){i.baseTokens=n;var h=e.state.overlays[f],d=1,p=0;i.state=!0,zn(e,t.text,h.mode,i,function(c,v){for(var g=d;p<c;){var m=n[d];m>c&&n.splice(d,1,c,n[d+1],m),d+=2,p=Math.min(c,m)}if(v)if(h.opaque)n.splice(g,d-g,c,"overlay "+v),d=g+2;else for(;g<d;g+=2){var b=n[g+1];n[g+1]=(b?b+" ":"")+"overlay "+v}},o),i.state=l,i.baseTokens=null,i.baseTokenPos=1},"loop"),s=0;s<e.state.overlays.length;++s)a(s);return{styles:n,classes:o.bgClass||o.textClass?o:null}}u(En,"highlightLine");function Fn(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ut(e,P(t)),n=t.text.length>e.options.maxHighlightLength&&$e(e.doc.mode,r.state),o=En(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}u(Fn,"getLineStyles");function Ut(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new Pe(r,!0,t);var o=Ql(e,t,i),l=o>r.first&&w(r,o-1).stateAfter,a=l?Pe.fromSaved(r,l,o):new Pe(r,Wn(r.mode),o);return r.iter(o,t,function(s){Li(e,s.text,a);var f=a.line;s.stateAfter=f==t-1||f%5==0||f>=n.viewFrom&&f<n.viewTo?a.save():null,a.nextLine()}),i&&(r.modeFrontier=a.line),a}u(Ut,"getContextBefore");function Li(e,t,i,r){var n=e.doc.mode,o=new _(t,e.options.tabSize,i);for(o.start=o.pos=r||0,t==""&&In(n,i.state);!o.eol();)ki(n,o,i.state),o.start=o.pos}u(Li,"processLine");function In(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=mi(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}u(In,"callBlankLine");function ki(e,t,i,r){for(var n=0;n<10;n++){r&&(r[0]=mi(e,i).mode);var o=e.token(t,i);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}u(ki,"readToken");var Zl=u(function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i},"Token");function Bn(e,t,i,r){var n=e.doc,o=n.mode,l;t=A(n,t);var a=w(n,t.line),s=Ut(e,t.line,i),f=new _(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,l=ki(o,f,s.state),r&&h.push(new Zl(f,l,$e(n.mode,s.state)));return r?h:new Zl(f,l,s.state)}u(Bn,"takeToken");function Rn(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}u(Rn,"extractLineClasses");function zn(e,t,i,r,n,o,l){var a=i.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,f=null,h=new _(t,e.options.tabSize,r),d,p=e.options.addModeClass&&[null];for(t==""&&Rn(In(i,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,l&&Li(e,t,r,h.pos),h.pos=t.length,d=null):d=Rn(ki(i,h,r.state,p),o),p){var c=p[0].name;c&&(d="m-"+(d?c+" "+d:c))}if(!a||f!=d){for(;s<h.start;)s=Math.min(h.start,s+5e3),n(s,f);f=d}h.start=h.pos}for(;s<h.pos;){var v=Math.min(h.pos,s+5e3);n(v,f),s=v}}u(zn,"runMode");function Ql(e,t,i){for(var r,n,o=e.doc,l=i?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=w(o,a-1),f=s.stateAfter;if(f&&(!i||a+(f instanceof wi?f.lookAhead:0)<=o.modeFrontier))return a;var h=me(s.text,null,e.options.tabSize);(n==null||r>h)&&(n=a-1,r=h)}return n}u(Ql,"findStartLine");function Jl(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var n=w(e,r).stateAfter;if(n&&(!(n instanceof wi)||r+n.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}u(Jl,"retreatFrontier");var jl=!1,ze=!1;function Vl(){jl=!0}u(Vl,"seeReadOnlySpans");function $l(){ze=!0}u($l,"seeCollapsedSpans");function Cr(e,t,i){this.marker=e,this.from=t,this.to=i}u(Cr,"MarkedSpan");function Kt(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}u(Kt,"getMarkedSpanFor");function ea(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}u(ea,"removeMarkedSpan");function ta(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}u(ta,"addMarkedSpan");function ra(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var o=e[n],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!i||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Cr(l,o.from,s?null:o.to))}}return r}u(ra,"markedSpansBefore");function ia(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var o=e[n],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!i||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Cr(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}u(ia,"markedSpansAfter");function Ti(e,t){if(t.full)return null;var i=Gt(e,t.from.line)&&w(e,t.from.line).markedSpans,r=Gt(e,t.to.line)&&w(e,t.to.line).markedSpans;if(!i&&!r)return null;var n=t.from.ch,o=t.to.ch,l=D(t.from,t.to)==0,a=ra(i,n,l),s=ia(r,o,l),f=t.text.length==1,h=W(t.text).length+(f?n:0);if(a)for(var d=0;d<a.length;++d){var p=a[d];if(p.to==null){var c=Kt(s,p.marker);c?f&&(p.to=c.to==null?null:c.to+h):p.to=n}}if(s)for(var v=0;v<s.length;++v){var g=s[v];if(g.to!=null&&(g.to+=h),g.from==null){var m=Kt(a,g.marker);m||(g.from=h,f&&(a||(a=[])).push(g))}else g.from+=h,f&&(a||(a=[])).push(g)}a&&(a=Gn(a)),s&&s!=a&&(s=Gn(s));var b=[a];if(!f){var C=t.text.length-2,x;if(C>0&&a)for(var S=0;S<a.length;++S)a[S].to==null&&(x||(x=[])).push(new Cr(a[S].marker,null,null));for(var k=0;k<C;++k)b.push(x);b.push(s)}return b}u(Ti,"stretchSpansOverChange");function Gn(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}u(Gn,"clearEmptySpans");function na(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(c){if(c.markedSpans)for(var v=0;v<c.markedSpans.length;++v){var g=c.markedSpans[v].marker;g.readOnly&&(!r||ee(r,g)==-1)&&(r||(r=[])).push(g)}}),!r)return null;for(var n=[{from:t,to:i}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<n.length;++s){var f=n[s];if(!(D(f.to,a.from)<0||D(f.from,a.to)>0)){var h=[s,1],d=D(f.from,a.from),p=D(f.to,a.to);(d<0||!l.inclusiveLeft&&!d)&&h.push({from:f.from,to:a.from}),(p>0||!l.inclusiveRight&&!p)&&h.push({from:a.to,to:f.to}),n.splice.apply(n,h),s+=h.length-3}}return n}u(na,"removeReadOnlyRanges");function Un(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}u(Un,"detachMarkedSpans");function Kn(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}u(Kn,"attachMarkedSpans");function Sr(e){return e.inclusiveLeft?-1:0}u(Sr,"extraLeft");function wr(e){return e.inclusiveRight?1:0}u(wr,"extraRight");function Mi(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),n=t.find(),o=D(r.from,n.from)||Sr(e)-Sr(t);if(o)return-o;var l=D(r.to,n.to)||wr(e)-wr(t);return l||t.id-e.id}u(Mi,"compareCollapsedMarkers");function _n(e,t){var i=ze&&e.markedSpans,r;if(i)for(var n=void 0,o=0;o<i.length;++o)n=i[o],n.marker.collapsed&&(t?n.from:n.to)==null&&(!r||Mi(r,n.marker)<0)&&(r=n.marker);return r}u(_n,"collapsedSpanAtSide");function Xn(e){return _n(e,!0)}u(Xn,"collapsedSpanAtStart");function Lr(e){return _n(e,!1)}u(Lr,"collapsedSpanAtEnd");function oa(e,t){var i=ze&&e.markedSpans,r;if(i)for(var n=0;n<i.length;++n){var o=i[n];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Mi(r,o.marker)<0)&&(r=o.marker)}return r}u(oa,"collapsedSpanAround");function Yn(e,t,i,r,n){var o=w(e,t),l=ze&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var f=s.marker.find(0),h=D(f.from,i)||Sr(s.marker)-Sr(n),d=D(f.to,r)||wr(s.marker)-wr(n);if(!(h>=0&&d<=0||h<=0&&d>=0)&&(h<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?D(f.to,i)>=0:D(f.to,i)>0)||h>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?D(f.from,r)<=0:D(f.from,r)<0)))return!0}}}u(Yn,"conflictingCollapsedRange");function we(e){for(var t;t=Xn(e);)e=t.find(-1,!0).line;return e}u(we,"visualLine");function la(e){for(var t;t=Lr(e);)e=t.find(1,!0).line;return e}u(la,"visualLineEnd");function aa(e){for(var t,i;t=Lr(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}u(aa,"visualLineContinued");function Di(e,t){var i=w(e,t),r=we(i);return i==r?t:P(r)}u(Di,"visualLineNo");function qn(e,t){if(t>e.lastLine())return t;var i=w(e,t),r;if(!Ge(e,i))return t;for(;r=Lr(i);)i=r.find(1,!0).line;return P(i)+1}u(qn,"visualLineEndNo");function Ge(e,t){var i=ze&&t.markedSpans;if(i){for(var r=void 0,n=0;n<i.length;++n)if(r=i[n],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Ai(e,t,r))return!0}}}u(Ge,"lineIsHidden");function Ai(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return Ai(e,r.line,Kt(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var n=void 0,o=0;o<t.markedSpans.length;++o)if(n=t.markedSpans[o],n.marker.collapsed&&!n.marker.widgetNode&&n.from==i.to&&(n.to==null||n.to!=i.from)&&(n.marker.inclusiveLeft||i.marker.inclusiveRight)&&Ai(e,t,n))return!0}u(Ai,"lineIsHiddenInner");function Ee(e){e=we(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var n=i.lines[r];if(n==e)break;t+=n.height}for(var o=i.parent;o;i=o,o=i.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==i)break;t+=a.height}return t}u(Ee,"heightAtLine");function kr(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=Xn(r);){var n=i.find(0,!0);r=n.from.line,t+=n.from.ch-n.to.ch}for(r=e;i=Lr(r);){var o=i.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}u(kr,"lineLength");function Oi(e){var t=e.display,i=e.doc;t.maxLine=w(i,i.first),t.maxLineLength=kr(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var n=kr(r);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}u(Oi,"findMaxLine");var _t=u(function(e,t,i){this.text=e,Kn(this,t),this.height=i?i(this):1},"Line");_t.prototype.lineNo=function(){return P(this)},yt(_t);function sa(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Un(e),Kn(e,i);var n=r?r(e):1;n!=e.height&&Me(e,n)}u(sa,"updateLine");function ua(e){e.parent=null,Un(e)}u(ua,"cleanUpLine");var au={},su={};function Zn(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?su:au;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}u(Zn,"interpretTokenStyle");function Qn(e,t){var i=vt("span",null,null,oe?"padding-right: .1px":null),r={pre:vt("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var o=n?t.rest[n-1]:t.line,l=void 0;r.pos=0,r.addToken=ha,Ul(e.display.measure)&&(l=He(o,e.doc.direction))&&(r.addToken=ca(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&P(o);pa(o,r,Fn(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=li(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=li(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Gl(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(oe){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return U(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=li(r.pre.className,r.textClass||"")),r}u(Qn,"buildLineContent");function fa(e){var t=T("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}u(fa,"defaultSpecialCharPlaceholder");function ha(e,t,i,r,n,o,l){if(t){var a=e.splitSpaces?da(t,e.trailingSpace):t,s=e.cm.state.specialChars,f=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),N&&I<9&&(f=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var d=0;;){s.lastIndex=d;var p=s.exec(t),c=p?p.index-d:t.length-d;if(c){var v=document.createTextNode(a.slice(d,d+c));N&&I<9?h.appendChild(T("span",[v])):h.appendChild(v),e.map.push(e.pos,e.pos+c,v),e.col+=c,e.pos+=c}if(!p)break;d+=c+1;var g=void 0;if(p[0]==" "){var m=e.cm.options.tabSize,b=m-e.col%m;g=h.appendChild(T("span",hi(b),"cm-tab")),g.setAttribute("role","presentation"),g.setAttribute("cm-text"," "),e.col+=b}else p[0]=="\r"||p[0]==`
5
+ `?(g=h.appendChild(T("span",p[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),g.setAttribute("cm-text",p[0]),e.col+=1):(g=e.cm.options.specialCharPlaceholder(p[0]),g.setAttribute("cm-text",p[0]),N&&I<9?h.appendChild(T("span",[g])):h.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,i||r||n||f||o||l){var C=i||"";r&&(C+=r),n&&(C+=n);var x=T("span",[h],C,o);if(l)for(var S in l)l.hasOwnProperty(S)&&S!="style"&&S!="class"&&x.setAttribute(S,l[S]);return e.content.appendChild(x)}e.content.appendChild(h)}}u(ha,"buildToken");function da(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;n<e.length;n++){var o=e.charAt(n);o==" "&&i&&(n==e.length-1||e.charCodeAt(n+1)==32)&&(o="\xA0"),r+=o,i=o==" "}return r}u(da,"splitSpaces");function ca(e,t){return function(i,r,n,o,l,a,s){n=n?n+" cm-force-border":"cm-force-border";for(var f=i.pos,h=f+r.length;;){for(var d=void 0,p=0;p<t.length&&(d=t[p],!(d.to>f&&d.from<=f));p++);if(d.to>=h)return e(i,r,n,o,l,a,s);e(i,r.slice(0,d.to-f),n,o,null,a,s),o=null,r=r.slice(d.to-f),f=d.to}}}u(ca,"buildTokenBadBidi");function Jn(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}u(Jn,"buildCollapsedSpan");function pa(e,t,i){var r=e.markedSpans,n=e.text,o=0;if(!r){for(var l=1;l<i.length;l+=2)t.addToken(t,n.slice(o,o=i[l]),Zn(i[l+1],t.cm.options));return}for(var a=n.length,s=0,f=1,h="",d,p,c=0,v,g,m,b,C;;){if(c==s){v=g=m=p="",C=null,b=null,c=1/0;for(var x=[],S=void 0,k=0;k<r.length;++k){var L=r[k],O=L.marker;if(O.type=="bookmark"&&L.from==s&&O.widgetNode)x.push(O);else if(L.from<=s&&(L.to==null||L.to>s||O.collapsed&&L.to==s&&L.from==s)){if(L.to!=null&&L.to!=s&&c>L.to&&(c=L.to,g=""),O.className&&(v+=" "+O.className),O.css&&(p=(p?p+";":"")+O.css),O.startStyle&&L.from==s&&(m+=" "+O.startStyle),O.endStyle&&L.to==c&&(S||(S=[])).push(O.endStyle,L.to),O.title&&((C||(C={})).title=O.title),O.attributes)for(var F in O.attributes)(C||(C={}))[F]=O.attributes[F];O.collapsed&&(!b||Mi(b.marker,O)<0)&&(b=L)}else L.from>s&&c>L.from&&(c=L.from)}if(S)for(var V=0;V<S.length;V+=2)S[V+1]==c&&(g+=" "+S[V]);if(!b||b.from==s)for(var R=0;R<x.length;++R)Jn(t,0,x[R]);if(b&&(b.from||0)==s){if(Jn(t,(b.to==null?a+1:b.to)-s,b.marker,b.from==null),b.to==null)return;b.to==s&&(b=!1)}}if(s>=a)break;for(var he=Math.min(a,c);;){if(h){var de=s+h.length;if(!b){var X=de>he?h.slice(0,he-s):h;t.addToken(t,X,d?d+v:v,m,s+X.length==c?g:"",p,C)}if(de>=he){h=h.slice(he-s),s=he;break}s=de,m=""}h=n.slice(o,o=i[f++]),d=Zn(i[f++],t.cm.options)}}}u(pa,"insertLineContent");function jn(e,t,i){this.line=t,this.rest=aa(t),this.size=this.rest?P(W(this.rest))-i+1:1,this.node=this.text=null,this.hidden=Ge(e,t)}u(jn,"LineView");function Tr(e,t,i){for(var r=[],n,o=t;o<i;o=n){var l=new jn(e.doc,w(e.doc,o),o);n=o+l.size,r.push(l)}return r}u(Tr,"buildViewArray");var Xt=null;function va(e){Xt?Xt.ops.push(e):e.ownsGroup=Xt={ops:[e],delayedCallbacks:[]}}u(va,"pushOperation");function ga(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var n=e.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(i<t.length)}u(ga,"fireCallbacksForOps");function ya(e,t){var i=e.ownsGroup;if(i)try{ga(i)}finally{Xt=null,t(i)}}u(ya,"finishOperation");var Mr=null;function Z(e,t){var i=pi(e,t);if(i.length){var r=Array.prototype.slice.call(arguments,2),n;Xt?n=Xt.delayedCallbacks:Mr?n=Mr:(n=Mr=[],setTimeout(ma,0));for(var o=u(function(a){n.push(function(){return i[a].apply(null,r)})},"loop"),l=0;l<i.length;++l)o(l)}}u(Z,"signalLater");function ma(){var e=Mr;Mr=null;for(var t=0;t<e.length;++t)e[t]()}u(ma,"fireOrphanDelayed");function Vn(e,t,i,r){for(var n=0;n<t.changes.length;n++){var o=t.changes[n];o=="text"?xa(e,t):o=="gutter"?eo(e,t,i,r):o=="class"?Ni(e,t):o=="widget"&&Ca(e,t,r)}t.changes=null}u(Vn,"updateLineForChanges");function Yt(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),N&&I<8&&(e.node.style.zIndex=2)),e.node}u(Yt,"ensureLineWrapped");function ba(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var r=Yt(t);t.background=r.insertBefore(T("div",null,i),r.firstChild),e.display.input.setUneditable(t.background)}}u(ba,"updateLineBackground");function $n(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Qn(e,t)}u($n,"getLineContent");function xa(e,t){var i=t.text.className,r=$n(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ni(e,t)):i&&(t.text.className=i)}u(xa,"updateLineText");function Ni(e,t){ba(e,t),t.line.wrapClass?Yt(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}u(Ni,"updateLineClasses");function eo(e,t,i,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var n=Yt(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),n.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=Yt(t),a=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=a.appendChild(T("div",xi(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var f=e.display.gutterSpecs[s].className,h=o.hasOwnProperty(f)&&o[f];h&&a.appendChild(T("div",[h],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}u(eo,"updateLineGutter");function Ca(e,t,i){t.alignable&&(t.alignable=null);for(var r=ct("CodeMirror-linewidget"),n=t.node.firstChild,o=void 0;n;n=o)o=n.nextSibling,r.test(n.className)&&t.node.removeChild(n);to(e,t,i)}u(Ca,"updateLineWidgets");function Sa(e,t,i,r){var n=$n(e,t);return t.text=t.node=n.pre,n.bgClass&&(t.bgClass=n.bgClass),n.textClass&&(t.textClass=n.textClass),Ni(e,t),eo(e,t,i,r),to(e,t,r),t.node}u(Sa,"buildLineElement");function to(e,t,i){if(ro(e,t.line,t,i,!0),t.rest)for(var r=0;r<t.rest.length;r++)ro(e,t.rest[r],t,i,!1)}u(to,"insertLineWidgets");function ro(e,t,i,r,n){if(t.widgets)for(var o=Yt(i),l=0,a=t.widgets;l<a.length;++l){var s=a[l],f=T("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),wa(s,f,i,r),e.display.input.setUneditable(f),n&&s.above?o.insertBefore(f,i.gutter||i.text):o.appendChild(f),Z(s,"redraw")}}u(ro,"insertLineWidgetsFor");function wa(e,t,i,r){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var n=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(n-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=n+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}u(wa,"positionLineWidget");function qt(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Re(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),ve(t.display.measure,T("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}u(qt,"widgetHeight");function Fe(e,t){for(var i=gi(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}u(Fe,"eventInWidget");function Dr(e){return e.lineSpace.offsetTop}u(Dr,"paddingTop");function Wi(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}u(Wi,"paddingVert");function io(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ve(e.measure,T("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}u(io,"paddingH");function De(e){return Il-e.display.nativeBarWidth}u(De,"scrollGap");function rt(e){return e.display.scroller.clientWidth-De(e)-e.display.barWidth}u(rt,"displayWidth");function Hi(e){return e.display.scroller.clientHeight-De(e)-e.display.barHeight}u(Hi,"displayHeight");function La(e,t,i){var r=e.options.lineWrapping,n=r&&rt(e);if(!t.measure.heights||r&&t.measure.width!=n){var o=t.measure.heights=[];if(r){t.measure.width=n;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],f=l[a+1];Math.abs(s.bottom-f.bottom)>2&&o.push((s.bottom+f.top)/2-i.top)}}o.push(i.bottom-i.top)}}u(La,"ensureLineHeights");function no(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var n=0;n<e.rest.length;n++)if(P(e.rest[n])>i)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}}u(no,"mapFromLineView");function ka(e,t){t=we(t);var i=P(t),r=e.display.externalMeasured=new jn(e.doc,t,i);r.lineN=i;var n=r.built=Qn(e,r);return r.text=n.pre,ve(e.display.lineMeasure,n.pre),r}u(ka,"updateExternalMeasurement");function oo(e,t,i,r){return Ae(e,mt(e,t),i,r)}u(oo,"measureChar");function Pi(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[nt(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}u(Pi,"findViewForLine");function mt(e,t){var i=P(t),r=Pi(e,i);r&&!r.text?r=null:r&&r.changes&&(Vn(e,r,i,Ri(e)),e.curOp.forceUpdate=!0),r||(r=ka(e,t));var n=no(r,t,i);return{line:t,view:r,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}u(mt,"prepareMeasureForLine");function Ae(e,t,i,r,n){t.before&&(i=-1);var o=i+(r||""),l;return t.cache.hasOwnProperty(o)?l=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(La(e,t.view,t.rect),t.hasHeights=!0),l=Da(e,t,i,r),l.bogus||(t.cache[o]=l)),{left:l.left,right:l.right,top:n?l.rtop:l.top,bottom:n?l.rbottom:l.bottom}}u(Ae,"measureCharPrepared");var Ta={left:0,right:0,top:0,bottom:0};function lo(e,t,i){for(var r,n,o,l,a,s,f=0;f<e.length;f+=3)if(a=e[f],s=e[f+1],t<a?(n=0,o=1,l="left"):t<s?(n=t-a,o=n+1):(f==e.length-3||t==s&&e[f+3]>t)&&(o=s-a,n=o-1,t>=s&&(l="right")),n!=null){if(r=e[f+2],a==s&&i==(r.insertLeft?"left":"right")&&(l=i),i=="left"&&n==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],l="left";if(i=="right"&&n==s-a)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)r=e[(f+=3)+2],l="right";break}return{node:r,start:n,end:o,collapse:l,coverStart:a,coverEnd:s}}u(lo,"nodeAndOffsetInLineMap");function Ma(e,t){var i=Ta;if(t=="left")for(var r=0;r<e.length&&(i=e[r]).left==i.right;r++);else for(var n=e.length-1;n>=0&&(i=e[n]).left==i.right;n--);return i}u(Ma,"getUsefulRect");function Da(e,t,i,r){var n=lo(t.map,i,r),o=n.node,l=n.start,a=n.end,s=n.collapse,f;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&ci(t.line.text.charAt(n.coverStart+l));)--l;for(;n.coverStart+a<n.coverEnd&&ci(t.line.text.charAt(n.coverStart+a));)++a;if(N&&I<9&&l==0&&a==n.coverEnd-n.coverStart?f=o.parentNode.getBoundingClientRect():f=Ma(gt(o,l,a).getClientRects(),r),f.left||f.right||l==0)break;a=l,l=l-1,s="right"}N&&I<11&&(f=Aa(e.display.measure,f))}else{l>0&&(s=r="right");var d;e.options.lineWrapping&&(d=o.getClientRects()).length>1?f=d[r=="right"?d.length-1:0]:f=o.getBoundingClientRect()}if(N&&I<9&&!l&&(!f||!f.left&&!f.right)){var p=o.parentNode.getClientRects()[0];p?f={left:p.left,right:p.left+Ct(e.display),top:p.top,bottom:p.bottom}:f=Ta}for(var c=f.top-t.rect.top,v=f.bottom-t.rect.top,g=(c+v)/2,m=t.view.measure.heights,b=0;b<m.length-1&&!(g<m[b]);b++);var C=b?m[b-1]:0,x=m[b],S={left:(s=="right"?f.right:f.left)-t.rect.left,right:(s=="left"?f.left:f.right)-t.rect.left,top:C,bottom:x};return!f.left&&!f.right&&(S.bogus=!0),e.options.singleCursorHeightPerLine||(S.rtop=c,S.rbottom=v),S}u(Da,"measureCharInner");function Aa(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Kl(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*r,bottom:t.bottom*r}}u(Aa,"maybeUpdateRectForZooming");function ao(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}u(ao,"clearLineMeasurementCacheFor");function so(e){e.display.externalMeasure=null,Be(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ao(e.display.view[t])}u(so,"clearLineMeasurementCache");function Zt(e){so(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}u(Zt,"clearCaches");function uo(){return ii&&oi?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}u(uo,"pageScrollX");function fo(){return ii&&oi?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}u(fo,"pageScrollY");function Ei(e){var t=we(e),i=t.widgets,r=0;if(i)for(var n=0;n<i.length;++n)i[n].above&&(r+=qt(i[n]));return r}u(Ei,"widgetTopHeight");function Ar(e,t,i,r,n){if(!n){var o=Ei(t);i.top+=o,i.bottom+=o}if(r=="line")return i;r||(r="local");var l=Ee(t);if(r=="local"?l+=Dr(e.display):l-=e.display.viewOffset,r=="page"||r=="window"){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+(r=="window"?0:fo());var s=a.left+(r=="window"?0:uo());i.left+=s,i.right+=s}return i.top+=l,i.bottom+=l,i}u(Ar,"intoCoordSystem");function ho(e,t,i){if(i=="div")return t;var r=t.left,n=t.top;if(i=="page")r-=uo(),n-=fo();else if(i=="local"||!i){var o=e.display.sizer.getBoundingClientRect();r+=o.left,n+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:r-l.left,top:n-l.top}}u(ho,"fromCoordSystem");function Or(e,t,i,r,n){return r||(r=w(e.doc,t.line)),Ar(e,r,oo(e,r,t.ch,n),i)}u(Or,"charCoords");function Le(e,t,i,r,n,o){r=r||w(e.doc,t.line),n||(n=mt(e,r));function l(v,g){var m=Ae(e,n,v,g?"right":"left",o);return g?m.left=m.right:m.right=m.left,Ar(e,r,m,i)}u(l,"get");var a=He(r,e.doc.direction),s=t.ch,f=t.sticky;if(s>=r.text.length?(s=r.text.length,f="before"):s<=0&&(s=0,f="after"),!a)return l(f=="before"?s-1:s,f=="before");function h(v,g,m){var b=a[g],C=b.level==1;return l(m?v-1:v,C!=m)}u(h,"getBidi");var d=It(a,s,f),p=yr,c=h(s,d,f=="before");return p!=null&&(c.other=h(s,p,f!="before")),c}u(Le,"cursorCoords");function co(e,t){var i=0;t=A(e.doc,t),e.options.lineWrapping||(i=Ct(e.display)*t.ch);var r=w(e.doc,t.line),n=Ee(r)+Dr(e.display);return{left:i,right:i,top:n,bottom:n+r.height}}u(co,"estimateCoords");function Fi(e,t,i,r,n){var o=y(e,t,i);return o.xRel=n,r&&(o.outside=r),o}u(Fi,"PosWithInfo");function Ii(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return Fi(r.first,0,null,-1,-1);var n=tt(r,i),o=r.first+r.size-1;if(n>o)return Fi(r.first+r.size-1,w(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=w(r,n);;){var a=Oa(e,l,n,t,i),s=oa(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var f=s.find(1);if(f.line==n)return f;l=w(r,n=f.line)}}u(Ii,"coordsChar");function po(e,t,i,r){r-=Ei(t);var n=t.text.length,o=Ft(function(l){return Ae(e,i,l-1).bottom<=r},n,0);return n=Ft(function(l){return Ae(e,i,l).top>r},o,n),{begin:o,end:n}}u(po,"wrappedLineExtent");function vo(e,t,i,r){i||(i=mt(e,t));var n=Ar(e,t,Ae(e,i,r),"line").top;return po(e,t,i,n)}u(vo,"wrappedLineExtentChar");function Bi(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}u(Bi,"boxIsAfter");function Oa(e,t,i,r,n){n-=Ee(t);var o=mt(e,t),l=Ei(t),a=0,s=t.text.length,f=!0,h=He(t,e.doc.direction);if(h){var d=(e.options.lineWrapping?Wa:Na)(e,t,i,o,h,r,n);f=d.level!=1,a=f?d.from:d.to-1,s=f?d.to:d.from-1}var p=null,c=null,v=Ft(function(k){var L=Ae(e,o,k);return L.top+=l,L.bottom+=l,Bi(L,r,n,!1)?(L.top<=n&&L.left<=r&&(p=k,c=L),!0):!1},a,s),g,m,b=!1;if(c){var C=r-c.left<c.right-r,x=C==f;v=p+(x?0:1),m=x?"after":"before",g=C?c.left:c.right}else{!f&&(v==s||v==a)&&v++,m=v==0?"after":v==t.text.length?"before":Ae(e,o,v-(f?1:0)).bottom+l<=n==f?"after":"before";var S=Le(e,y(i,v,m),"line",t,o);g=S.left,b=n<S.top?-1:n>=S.bottom?1:0}return v=wn(t.text,v,1),Fi(i,v,m,b,r-g)}u(Oa,"coordsCharInner");function Na(e,t,i,r,n,o,l){var a=Ft(function(d){var p=n[d],c=p.level!=1;return Bi(Le(e,y(i,c?p.to:p.from,c?"before":"after"),"line",t,r),o,l,!0)},0,n.length-1),s=n[a];if(a>0){var f=s.level!=1,h=Le(e,y(i,f?s.from:s.to,f?"after":"before"),"line",t,r);Bi(h,o,l,!0)&&h.top>l&&(s=n[a-1])}return s}u(Na,"coordsBidiPart");function Wa(e,t,i,r,n,o,l){var a=po(e,t,r,l),s=a.begin,f=a.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var h=null,d=null,p=0;p<n.length;p++){var c=n[p];if(!(c.from>=f||c.to<=s)){var v=c.level!=1,g=Ae(e,r,v?Math.min(f,c.to)-1:Math.max(s,c.from)).right,m=g<o?o-g+1e9:g-o;(!h||d>m)&&(h=c,d=m)}}return h||(h=n[n.length-1]),h.from<s&&(h={from:s,to:h.to,level:h.level}),h.to>f&&(h={from:h.from,to:f,level:h.level}),h}u(Wa,"coordsBidiPartWrapped");var bt;function xt(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(bt==null){bt=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)bt.appendChild(document.createTextNode("x")),bt.appendChild(T("br"));bt.appendChild(document.createTextNode("x"))}ve(e.measure,bt);var i=bt.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Be(e.measure),i||1}u(xt,"textHeight");function Ct(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),i=T("pre",[t],"CodeMirror-line-like");ve(e.measure,i);var r=t.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}u(Ct,"charWidth");function Ri(e){for(var t=e.display,i={},r={},n=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;i[a]=o.offsetLeft+o.clientLeft+n,r[a]=o.clientWidth}return{fixedPos:zi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}u(Ri,"getDimensions");function zi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}u(zi,"compensateForHScroll");function go(e){var t=xt(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/Ct(e.display)-3);return function(n){if(Ge(e.doc,n))return 0;var o=0;if(n.widgets)for(var l=0;l<n.widgets.length;l++)n.widgets[l].height&&(o+=n.widgets[l].height);return i?o+(Math.ceil(n.text.length/r)||1)*t:o+t}}u(go,"estimateHeight");function Gi(e){var t=e.doc,i=go(e);t.iter(function(r){var n=i(r);n!=r.height&&Me(r,n)})}u(Gi,"estimateLineHeights");function it(e,t,i,r){var n=e.display;if(!i&&gi(t).getAttribute("cm-not-content")=="true")return null;var o,l,a=n.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch{return null}var s=Ii(e,o,l),f;if(r&&s.xRel>0&&(f=w(e.doc,s.line).text).length==s.ch){var h=me(f,f.length,e.options.tabSize)-f.length;s=y(s.line,Math.max(0,Math.round((o-io(e.display).left)/Ct(e.display))-h))}return s}u(it,"posFromMouse");function nt(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;r<i.length;r++)if(t-=i[r].size,t<0)return r}u(nt,"findViewIndex");function ae(e,t,i,r){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),r||(r=0);var n=e.display;if(r&&i<n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>t)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)ze&&Di(e.doc,t)<n.viewTo&&Ke(e);else if(i<=n.viewFrom)ze&&qn(e.doc,i+r)>n.viewFrom?Ke(e):(n.viewFrom+=r,n.viewTo+=r);else if(t<=n.viewFrom&&i>=n.viewTo)Ke(e);else if(t<=n.viewFrom){var o=Nr(e,i,i+r,1);o?(n.view=n.view.slice(o.index),n.viewFrom=o.lineN,n.viewTo+=r):Ke(e)}else if(i>=n.viewTo){var l=Nr(e,t,t,-1);l?(n.view=n.view.slice(0,l.index),n.viewTo=l.lineN):Ke(e)}else{var a=Nr(e,t,t,-1),s=Nr(e,i,i+r,1);a&&s?(n.view=n.view.slice(0,a.index).concat(Tr(e,a.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):Ke(e)}var f=n.externalMeasured;f&&(i<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(n.externalMeasured=null))}u(ae,"regChange");function Ue(e,t,i){e.curOp.viewChanged=!0;var r=e.display,n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[nt(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);ee(l,i)==-1&&l.push(i)}}}u(Ue,"regLineChange");function Ke(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}u(Ke,"resetView");function Nr(e,t,i,r){var n=nt(e,t),o,l=e.display.view;if(!ze||i==e.doc.first+e.doc.size)return{index:n,lineN:i};for(var a=e.display.viewFrom,s=0;s<n;s++)a+=l[s].size;if(a!=t){if(r>0){if(n==l.length-1)return null;o=a+l[n].size-t,n++}else o=a-t;t+=o,i+=o}for(;Di(e.doc,i)!=i;){if(n==(r<0?0:l.length-1))return null;i+=r*l[n-(r<0?1:0)].size,n+=r}return{index:n,lineN:i}}u(Nr,"viewCuttingPoint");function Ha(e,t,i){var r=e.display,n=r.view;n.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=Tr(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=Tr(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(nt(e,t))),r.viewFrom=t,r.viewTo<i?r.view=r.view.concat(Tr(e,r.viewTo,i)):r.viewTo>i&&(r.view=r.view.slice(0,nt(e,i)))),r.viewTo=i}u(Ha,"adjustView");function yo(e){for(var t=e.display.view,i=0,r=0;r<t.length;r++){var n=t[r];!n.hidden&&(!n.node||n.changes)&&++i}return i}u(yo,"countDirtyView");function Qt(e){e.display.input.showSelection(e.display.input.prepareSelection())}u(Qt,"updateSelection");function mo(e,t){t===void 0&&(t=!0);var i=e.doc,r={},n=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var a=0;a<i.sel.ranges.length;a++)if(!(!t&&a==i.sel.primIndex)){var s=i.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var f=s.empty();if(l){var h=l(e,s);h&&Ui(e,h,n)}else(f||e.options.showCursorWhenSelecting)&&Ui(e,s.head,n);f||Pa(e,s,o)}}return r}u(mo,"prepareSelection");function Ui(e,t,i){var r=Le(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),n=i.appendChild(T("div","\xA0","CodeMirror-cursor"));if(n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Or(e,t,"div",null,null),l=o.right-o.left;n.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(r.other){var a=i.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}u(Ui,"drawSelectionCursor");function Wr(e,t){return e.top-t.top||e.left-t.left}u(Wr,"cmpCoords");function Pa(e,t,i){var r=e.display,n=e.doc,o=document.createDocumentFragment(),l=io(e.display),a=l.left,s=Math.max(r.sizerWidth,rt(e)-r.sizer.offsetLeft)-l.right,f=n.direction=="ltr";function h(x,S,k,L){S<0&&(S=0),S=Math.round(S),L=Math.round(L),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+x+`px;
6
+ top: `+S+"px; width: "+(k==null?s-x:k)+`px;
7
+ height: `+(L-S)+"px"))}u(h,"add");function d(x,S,k){var L=w(n,x),O=L.text.length,F,V;function R(X,ce){return Or(e,y(x,X),"div",L,ce)}u(R,"coords");function he(X,ce,re){var j=vo(e,L,null,X),Y=ce=="ltr"==(re=="after")?"left":"right",G=re=="after"?j.begin:j.end-(/\s/.test(L.text.charAt(j.end-1))?2:1);return R(G,Y)[Y]}u(he,"wrapX");var de=He(L,n.direction);return Rl(de,S||0,k==null?O:k,function(X,ce,re,j){var Y=re=="ltr",G=R(X,Y?"left":"right"),pe=R(ce-1,Y?"right":"left"),ur=S==null&&X==0,ft=k==null&&ce==O,ne=j==0,Ie=!de||j==de.length-1;if(pe.top-G.top<=3){var $=(f?ur:ft)&&ne,Al=(f?ft:ur)&&Ie,Qe=$?a:(Y?G:pe).left,Pt=Al?s:(Y?pe:G).right;h(Qe,G.top,Pt-Qe,G.bottom)}else{var Et,se,fr,Ol;Y?(Et=f&&ur&&ne?a:G.left,se=f?s:he(X,re,"before"),fr=f?a:he(ce,re,"after"),Ol=f&&ft&&Ie?s:pe.right):(Et=f?he(X,re,"before"):a,se=!f&&ur&&ne?s:G.right,fr=!f&&ft&&Ie?a:pe.left,Ol=f?he(ce,re,"after"):s),h(Et,G.top,se-Et,G.bottom),G.bottom<pe.top&&h(a,G.bottom,null,pe.top),h(fr,pe.top,Ol-fr,pe.bottom)}(!F||Wr(G,F)<0)&&(F=G),Wr(pe,F)<0&&(F=pe),(!V||Wr(G,V)<0)&&(V=G),Wr(pe,V)<0&&(V=pe)}),{start:F,end:V}}u(d,"drawForLine");var p=t.from(),c=t.to();if(p.line==c.line)d(p.line,p.ch,c.ch);else{var v=w(n,p.line),g=w(n,c.line),m=we(v)==we(g),b=d(p.line,p.ch,m?v.text.length+1:null).end,C=d(c.line,m?0:null,c.ch).start;m&&(b.top<C.top-2?(h(b.right,b.top,null,b.bottom),h(a,C.top,C.left,C.bottom)):h(b.right,b.top,C.left-b.right,b.bottom)),b.bottom<C.top&&h(a,b.bottom,null,C.top)}i.appendChild(o)}u(Pa,"drawSelectionRange");function Ki(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||St(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}u(Ki,"restartBlink");function bo(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xi(e))}u(bo,"ensureFocus");function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&St(e))},100)}u(_i,"delayBlurEvent");function Xi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(U(e,"focus",e,t),e.state.focused=!0,Je(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),oe&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ki(e))}u(Xi,"onFocus");function St(e,t){e.state.delayingBlurEvent||(e.state.focused&&(U(e,"blur",e,t),e.state.focused=!1,pt(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}u(St,"onBlur");function Hr(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,f=void 0,h=0;if(!a.hidden){if(n+=a.line.height,N&&I<8){var d=a.node.offsetTop+a.node.offsetHeight;f=d-i,i=d}else{var p=a.node.getBoundingClientRect();f=p.bottom-p.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-p.left-1)}var c=a.line.height-f;if((c>.005||c<-.005)&&(n<r&&(o-=c),Me(a.line,f),xo(a.line),a.rest))for(var v=0;v<a.rest.length;v++)xo(a.rest[v]);if(h>e.display.sizerWidth){var g=Math.ceil(h/Ct(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}u(Hr,"updateHeightsInViewport");function xo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}u(xo,"updateWidgetHeight");function Pr(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-Dr(e));var n=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,o=tt(t,r),l=tt(t,n);if(i&&i.ensure){var a=i.ensure.from.line,s=i.ensure.to.line;a<o?(o=a,l=tt(t,Ee(w(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=tt(t,Ee(w(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}u(Pr,"visibleLines");function Ea(e,t){if(!q(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),n=null;if(t.top+r.top<0?n=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(n=!1),n!=null&&!Vs){var o=T("div","\u200B",null,`position: absolute;
8
+ top: `+(t.top-i.viewOffset-Dr(e.display))+`px;
9
+ height: `+(t.bottom-t.top+De(e)+i.barHeight)+`px;
10
+ left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(n),e.display.lineSpace.removeChild(o)}}}u(Ea,"maybeScrollWindow");function Fa(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?y(t.line,t.ch+1,"before"):t,t=t.ch?y(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Le(e,t),s=!i||i==t?a:Le(e,i);n={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var f=Yi(e,n),h=e.doc.scrollTop,d=e.doc.scrollLeft;if(f.scrollTop!=null&&(jt(e,f.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),f.scrollLeft!=null&&(ot(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(l=!0)),!l)break}return n}u(Fa,"scrollPosIntoView");function Ia(e,t){var i=Yi(e,t);i.scrollTop!=null&&jt(e,i.scrollTop),i.scrollLeft!=null&&ot(e,i.scrollLeft)}u(Ia,"scrollIntoView");function Yi(e,t){var i=e.display,r=xt(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,o=Hi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Wi(i),s=t.top<r,f=t.bottom>a-r;if(t.top<n)l.scrollTop=s?0:t.top;else if(t.bottom>n+o){var h=Math.min(t.top,(f?a:t.bottom)-o);h!=n&&(l.scrollTop=h)}var d=e.options.fixedGutter?0:i.gutters.offsetWidth,p=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-d,c=rt(e)-i.gutters.offsetWidth,v=t.right-t.left>c;return v&&(t.right=t.left+c),t.left<10?l.scrollLeft=0:t.left<p?l.scrollLeft=Math.max(0,t.left+d-(v?0:10)):t.right>c+p-3&&(l.scrollLeft=t.right+(v?0:10)-c),l}u(Yi,"calculateScrollPos");function qi(e,t){t!=null&&(Er(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}u(qi,"addToScrollTop");function wt(e){Er(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}u(wt,"ensureCursorVisible");function Jt(e,t,i){(t!=null||i!=null)&&Er(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}u(Jt,"scrollToCoords");function Ba(e,t){Er(e),e.curOp.scrollToPos=t}u(Ba,"scrollToRange");function Er(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=co(e,t.from),r=co(e,t.to);Co(e,i,r,t.margin)}}u(Er,"resolveScrollToPos");function Co(e,t,i,r){var n=Yi(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});Jt(e,n.scrollLeft,n.scrollTop)}u(Co,"scrollToCoordsRange");function jt(e,t){Math.abs(e.doc.scrollTop-t)<2||(Ce||Ji(e,{top:t}),So(e,t,!0),Ce&&Ji(e),$t(e,100))}u(jt,"updateScrollTop");function So(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}u(So,"setScrollTop");function ot(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,To(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}u(ot,"setScrollLeft");function Vt(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+Wi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+De(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}u(Vt,"measureForScrollbars");var Lt=u(function(e,t,i){this.cm=i;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),M(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),M(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,N&&I<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Lt.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+n)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:t?r:0}},Lt.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Lt.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Lt.prototype.zeroWidthHack=function(){var e=Se&&!js?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ve,this.disableVert=new Ve},Lt.prototype.enableZeroWidthBar=function(e,t,i){e.style.pointerEvents="auto";function r(){var n=e.getBoundingClientRect(),o=i=="vert"?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}u(r,"maybeDisable"),t.set(1e3,r)},Lt.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fr=u(function(){},"NullScrollbars");Fr.prototype.update=function(){return{bottom:0,right:0}},Fr.prototype.setScrollLeft=function(){},Fr.prototype.setScrollTop=function(){},Fr.prototype.clear=function(){};function kt(e,t){t||(t=Vt(e));var i=e.display.barWidth,r=e.display.barHeight;wo(e,t);for(var n=0;n<4&&i!=e.display.barWidth||r!=e.display.barHeight;n++)i!=e.display.barWidth&&e.options.lineWrapping&&Hr(e),wo(e,Vt(e)),i=e.display.barWidth,r=e.display.barHeight}u(kt,"updateScrollbars");function wo(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}u(wo,"updateScrollbarsInner");var Ra={native:Lt,null:Fr};function Lo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&pt(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ra[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),M(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?ot(e,t):jt(e,t)},e),e.display.scrollbars.addClass&&Je(e.display.wrapper,e.display.scrollbars.addClass)}u(Lo,"initScrollbars");var uu=0;function lt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++uu,markArrays:null},va(e.curOp)}u(lt,"startOperation");function at(e){var t=e.curOp;t&&ya(t,function(i){for(var r=0;r<i.ops.length;r++)i.ops[r].cm.curOp=null;za(i)})}u(at,"endOperation");function za(e){for(var t=e.ops,i=0;i<t.length;i++)Ga(t[i]);for(var r=0;r<t.length;r++)Ua(t[r]);for(var n=0;n<t.length;n++)Ka(t[n]);for(var o=0;o<t.length;o++)_a(t[o]);for(var l=0;l<t.length;l++)Xa(t[l])}u(za,"endOperations");function Ga(e){var t=e.cm,i=t.display;qa(t),e.updateMaxLine&&Oi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Zi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}u(Ga,"endOperation_R1");function Ua(e){e.updatedDisplay=e.mustUpdate&&Qi(e.cm,e.update)}u(Ua,"endOperation_W1");function Ka(e){var t=e.cm,i=t.display;e.updatedDisplay&&Hr(t),e.barMeasure=Vt(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=oo(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+De(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-rt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}u(Ka,"endOperation_R2");function _a(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ot(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==ye();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&kt(t,e.barMeasure),e.updatedDisplay&&Vi(t,e.barMeasure),e.selectionChanged&&Ki(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&bo(e.cm)}u(_a,"endOperation_W2");function Xa(e){var t=e.cm,i=t.display,r=t.doc;if(e.updatedDisplay&&ko(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&So(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ot(t,e.scrollLeft,!0,!0),e.scrollToPos){var n=Fa(t,A(r,e.scrollToPos.from),A(r,e.scrollToPos.to),e.scrollToPos.margin);Ea(t,n)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||U(o[a],"hide");if(l)for(var s=0;s<l.length;++s)l[s].lines.length&&U(l[s],"unhide");i.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&U(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}u(Xa,"endOperation_finish");function ue(e,t){if(e.curOp)return t();lt(e);try{return t()}finally{at(e)}}u(ue,"runInOp");function Q(e,t){return function(){if(e.curOp)return t.apply(e,arguments);lt(e);try{return t.apply(e,arguments)}finally{at(e)}}}u(Q,"operation");function ie(e){return function(){if(this.curOp)return e.apply(this,arguments);lt(this);try{return e.apply(this,arguments)}finally{at(this)}}}u(ie,"methodOp");function J(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);lt(t);try{return e.apply(this,arguments)}finally{at(t)}}}u(J,"docMethodOp");function $t(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ai(Ya,e))}u($t,"startWorker");function Ya(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,r=Ut(e,t.highlightFrontier),n=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?$e(t.mode,r.state):null,s=En(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var f=o.styleClasses,h=s.classes;h?o.styleClasses=h:f&&(o.styleClasses=null);for(var d=!l||l.length!=o.styles.length||f!=h&&(!f||!h||f.bgClass!=h.bgClass||f.textClass!=h.textClass),p=0;!d&&p<l.length;++p)d=l[p]!=o.styles[p];d&&n.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Li(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>i)return $t(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),n.length&&ue(e,function(){for(var o=0;o<n.length;o++)Ue(e,n[o],"text")})}}u(Ya,"highlightWorker");var Zi=u(function(e,t,i){var r=e.display;this.viewport=t,this.visible=Pr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=rt(e),this.force=i,this.dims=Ri(e),this.events=[]},"DisplayUpdate");Zi.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},Zi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)U.apply(null,this.events[e])};function qa(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=De(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=De(e)+"px",t.scrollbarsClipped=!0)}u(qa,"maybeClipScrollbars");function Za(e){if(e.hasFocus())return null;var t=ye();if(!t||!Re(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&Re(e.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}u(Za,"selectionSnapshot");function Qa(e){if(!(!e||!e.activeElt||e.activeElt==ye())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Re(document.body,e.anchorNode)&&Re(document.body,e.focusNode))){var t=window.getSelection(),i=document.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),t.removeAllRanges(),t.addRange(i),t.extend(e.focusNode,e.focusOffset)}}u(Qa,"restoreSelection");function Qi(e,t){var i=e.display,r=e.doc;if(t.editorIsHidden)return Ke(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&yo(e)==0)return!1;Mo(e)&&(Ke(e),t.dims=Ri(e));var n=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(n,t.visible.to+e.options.viewportMargin);i.viewFrom<o&&o-i.viewFrom<20&&(o=Math.max(r.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(n,i.viewTo)),ze&&(o=Di(e.doc,o),l=qn(e.doc,l));var a=o!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Ha(e,o,l),i.viewOffset=Ee(w(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var s=yo(e);if(!a&&s==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var f=Za(e);return s>4&&(i.lineDiv.style.display="none"),Ja(e,i.updateLineNumbers,t.dims),s>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Qa(f),Be(i.cursorDiv),Be(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,a&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,$t(e,400)),i.updateLineNumbers=null,!0}u(Qi,"updateDisplayIfNeeded");function ko(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==rt(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+Wi(e.display)-Hi(e),i.top)}),t.visible=Pr(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Pr(e.display,e.doc,i));if(!Qi(e,t))break;Hr(e);var n=Vt(e);Qt(e),kt(e,n),Vi(e,n),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}u(ko,"postUpdateDisplay");function Ji(e,t){var i=new Zi(e,t);if(Qi(e,i)){Hr(e),ko(e,i);var r=Vt(e);Qt(e),kt(e,r),Vi(e,r),i.finish()}}u(Ji,"updateDisplaySimple");function Ja(e,t,i){var r=e.display,n=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(v){var g=v.nextSibling;return oe&&Se&&e.display.currentWheelTarget==v?v.style.display="none":v.parentNode.removeChild(v),g}u(a,"rm");for(var s=r.view,f=r.viewFrom,h=0;h<s.length;h++){var d=s[h];if(!d.hidden)if(!d.node||d.node.parentNode!=o){var p=Sa(e,d,f,i);o.insertBefore(p,l)}else{for(;l!=d.node;)l=a(l);var c=n&&t!=null&&t<=f&&d.lineNumber;d.changes&&(ee(d.changes,"gutter")>-1&&(c=!1),Vn(e,d,f,i)),c&&(Be(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(xi(e.options,f)))),l=d.node.nextSibling}f+=d.size}for(;l;)l=a(l)}u(Ja,"patchDisplay");function ji(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Z(e,"gutterChanged",e)}u(ji,"updateGutterSpace");function Vi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+De(e)+"px"}u(Vi,"setDocumentHeight");function To(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=zi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,o=r+"px",l=0;l<i.length;l++)if(!i[l].hidden){e.options.fixedGutter&&(i[l].gutter&&(i[l].gutter.style.left=o),i[l].gutterBackground&&(i[l].gutterBackground.style.left=o));var a=i[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+n+"px")}}u(To,"alignHorizontally");function Mo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=xi(e.options,t.first+t.size-1),r=e.display;if(i.length!=r.lineNumChars){var n=r.measure.appendChild(T("div",[T("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=n.firstChild.offsetWidth,l=n.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-l)+1,r.lineNumWidth=r.lineNumInnerWidth+l,r.lineNumChars=r.lineNumInnerWidth?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ji(e.display),!0}return!1}u(Mo,"maybeUpdateLineNumberWidth");function $i(e,t){for(var i=[],r=!1,n=0;n<e.length;n++){var o=e[n],l=null;if(typeof o!="string"&&(l=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)r=!0;else continue;i.push({className:o,style:l})}return t&&!r&&i.push({className:"CodeMirror-linenumbers",style:null}),i}u($i,"getGutters");function Do(e){var t=e.gutters,i=e.gutterSpecs;Be(t),e.lineGutter=null;for(var r=0;r<i.length;++r){var n=i[r],o=n.className,l=n.style,a=t.appendChild(T("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),o=="CodeMirror-linenumbers"&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",ji(e)}u(Do,"renderGutters");function er(e){Do(e.display),ae(e),To(e)}u(er,"updateGutters");function ja(e,t,i,r){var n=this;this.input=i,n.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=vt("div",null,"CodeMirror-code"),n.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=T("div",null,"CodeMirror-cursors"),n.measure=T("div",null,"CodeMirror-measure"),n.lineMeasure=T("div",null,"CodeMirror-measure"),n.lineSpace=vt("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var o=vt("div",[n.lineSpace],"CodeMirror-lines");n.mover=T("div",[o],null,"position: relative"),n.sizer=T("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=T("div",null,null,"position: absolute; height: "+Il+"px; width: 1px;"),n.gutters=T("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=T("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=T("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),n.wrapper.setAttribute("translate","no"),N&&I<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),!oe&&!(Ce&&dr)&&(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=$i(r.gutters,r.lineNumbers),Do(n),i.init(n)}u(ja,"Display");var en=0,_e=null;N?_e=-.53:Ce?_e=15:ii?_e=-.7:ni&&(_e=-1/3);function Ao(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}u(Ao,"wheelEventDelta");function Va(e){var t=Ao(e);return t.x*=_e,t.y*=_e,t}u(Va,"wheelEventPixels");function Oo(e,t){var i=Ao(t),r=i.x,n=i.y,o=_e;t.deltaMode===0&&(r=t.deltaX,n=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,f=a.scrollHeight>a.clientHeight;if(r&&s||n&&f){if(n&&Se&&oe){e:for(var h=t.target,d=l.view;h!=a;h=h.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==h){e.display.currentWheelTarget=h;break e}}if(r&&!Ce&&!Te&&o!=null){n&&f&&jt(e,Math.max(0,a.scrollTop+n*o)),ot(e,Math.max(0,a.scrollLeft+r*o)),(!n||n&&f)&&le(t),l.wheelStartX=null;return}if(n&&o!=null){var c=n*o,v=e.doc.scrollTop,g=v+l.wrapper.clientHeight;c<0?v=Math.max(0,v+c-50):g=Math.min(e.doc.height,g+c+50),Ji(e,{top:v,bottom:g})}en<20&&t.deltaMode!==0&&(l.wheelStartX==null?(l.wheelStartX=a.scrollLeft,l.wheelStartY=a.scrollTop,l.wheelDX=r,l.wheelDY=n,setTimeout(function(){if(l.wheelStartX!=null){var m=a.scrollLeft-l.wheelStartX,b=a.scrollTop-l.wheelStartY,C=b&&l.wheelDY&&b/l.wheelDY||m&&l.wheelDX&&m/l.wheelDX;l.wheelStartX=l.wheelStartY=null,C&&(_e=(_e*en+C)/(en+1),++en)}},200)):(l.wheelDX+=r,l.wheelDY+=n))}}u(Oo,"onScrollWheel");var xe=u(function(e,t){this.ranges=e,this.primIndex=t},"Selection");xe.prototype.primary=function(){return this.ranges[this.primIndex]},xe.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],r=e.ranges[t];if(!Ci(i.anchor,r.anchor)||!Ci(i.head,r.head))return!1}return!0},xe.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new H(Si(this.ranges[t].anchor),Si(this.ranges[t].head));return new xe(e,this.primIndex)},xe.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},xe.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var r=this.ranges[i];if(D(t,r.from())>=0&&D(e,r.to())<=0)return i}return-1};var H=u(function(e,t){this.anchor=e,this.head=t},"Range");H.prototype.from=function(){return xr(this.anchor,this.head)},H.prototype.to=function(){return br(this.anchor,this.head)},H.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ke(e,t,i){var r=e&&e.options.selectionsMayTouch,n=t[i];t.sort(function(p,c){return D(p.from(),c.from())}),i=ee(t,n);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=D(a.to(),l.from());if(r&&!l.empty()?s>0:s>=0){var f=xr(a.from(),l.from()),h=br(a.to(),l.to()),d=a.empty()?l.from()==l.head:a.from()==a.head;o<=i&&--i,t.splice(--o,2,new H(d?h:f,d?f:h))}}return new xe(t,i)}u(ke,"normalizeSelection");function Xe(e,t){return new xe([new H(e,t||e)],0)}u(Xe,"simpleSelection");function Ye(e){return e.text?y(e.from.line+e.text.length-1,W(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}u(Ye,"changeEnd");function No(e,t){if(D(e,t.from)<0)return e;if(D(e,t.to)<=0)return Ye(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ye(t).ch-t.to.ch),y(i,r)}u(No,"adjustForChange");function tn(e,t){for(var i=[],r=0;r<e.sel.ranges.length;r++){var n=e.sel.ranges[r];i.push(new H(No(n.anchor,t),No(n.head,t)))}return ke(e.cm,i,e.sel.primIndex)}u(tn,"computeSelAfterChange");function Wo(e,t,i){return e.line==t.line?y(i.line,e.ch-t.ch+i.ch):y(i.line+(e.line-t.line),e.ch)}u(Wo,"offsetPos");function $a(e,t,i){for(var r=[],n=y(e.first,0),o=n,l=0;l<t.length;l++){var a=t[l],s=Wo(a.from,n,o),f=Wo(Ye(a),n,o);if(n=a.to,o=f,i=="around"){var h=e.sel.ranges[l],d=D(h.head,h.anchor)<0;r[l]=new H(d?f:s,d?s:f)}else r[l]=new H(s,s)}return new xe(r,e.sel.primIndex)}u($a,"computeReplacedSel");function rn(e){e.doc.mode=yi(e.options,e.doc.modeOption),tr(e)}u(rn,"loadMode");function tr(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,$t(e,100),e.state.modeGen++,e.curOp&&ae(e)}u(tr,"resetModeState");function Ho(e,t){return t.from.ch==0&&t.to.ch==0&&W(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}u(Ho,"isWholeLineUpdate");function nn(e,t,i,r){function n(C){return i?i[C]:null}u(n,"spansFor");function o(C,x,S){sa(C,x,S,r),Z(C,"change",C,t)}u(o,"update");function l(C,x){for(var S=[],k=C;k<x;++k)S.push(new _t(f[k],n(k),r));return S}u(l,"linesFor");var a=t.from,s=t.to,f=t.text,h=w(e,a.line),d=w(e,s.line),p=W(f),c=n(f.length-1),v=s.line-a.line;if(t.full)e.insert(0,l(0,f.length)),e.remove(f.length,e.size-f.length);else if(Ho(e,t)){var g=l(0,f.length-1);o(d,d.text,c),v&&e.remove(a.line,v),g.length&&e.insert(a.line,g)}else if(h==d)if(f.length==1)o(h,h.text.slice(0,a.ch)+p+h.text.slice(s.ch),c);else{var m=l(1,f.length-1);m.push(new _t(p+h.text.slice(s.ch),c,r)),o(h,h.text.slice(0,a.ch)+f[0],n(0)),e.insert(a.line+1,m)}else if(f.length==1)o(h,h.text.slice(0,a.ch)+f[0]+d.text.slice(s.ch),n(0)),e.remove(a.line+1,v);else{o(h,h.text.slice(0,a.ch)+f[0],n(0)),o(d,p+d.text.slice(s.ch),c);var b=l(1,f.length-1);v>1&&e.remove(a.line+1,v-1),e.insert(a.line+1,b)}Z(e,"change",e,t)}u(nn,"updateDoc");function qe(e,t,i){function r(n,o,l){if(n.linked)for(var a=0;a<n.linked.length;++a){var s=n.linked[a];if(s.doc!=o){var f=l&&s.sharedHist;i&&!f||(t(s.doc,f),r(s.doc,n,f))}}}u(r,"propagate"),r(e,null,!0)}u(qe,"linkedDocs");function Po(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Gi(e),rn(e),Eo(e),e.options.direction=t.direction,e.options.lineWrapping||Oi(e),e.options.mode=t.modeOption,ae(e)}u(Po,"attachDoc");function Eo(e){(e.doc.direction=="rtl"?Je:pt)(e.display.lineDiv,"CodeMirror-rtl")}u(Eo,"setDirectionClass");function es(e){ue(e,function(){Eo(e),ae(e)})}u(es,"directionChanged");function Ir(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}u(Ir,"History");function on(e,t){var i={from:Si(t.from),to:Ye(t),text:et(e,t.from,t.to)};return Bo(e,i,t.from.line,t.to.line+1),qe(e,function(r){return Bo(r,i,t.from.line,t.to.line+1)},!0),i}u(on,"historyChangeFromChange");function Fo(e){for(;e.length;){var t=W(e);if(t.ranges)e.pop();else break}}u(Fo,"clearSelectionEvents");function ts(e,t){if(t)return Fo(e.done),W(e.done);if(e.done.length&&!W(e.done).ranges)return W(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),W(e.done)}u(ts,"lastChangeEvent");function Io(e,t,i,r){var n=e.history;n.undone.length=0;var o=+new Date,l,a;if((n.lastOp==r||n.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&n.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=ts(n,n.lastOp==r)))a=W(l.changes),D(t.from,t.to)==0&&D(t.from,a.to)==0?a.to=Ye(t):l.changes.push(on(e,t));else{var s=W(n.done);for((!s||!s.ranges)&&Br(e.sel,n.done),l={changes:[on(e,t)],generation:n.generation},n.done.push(l);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=o,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=t.origin,a||U(e,"historyAdded")}u(Io,"addChangeToHistory");function rs(e,t,i,r){var n=t.charAt(0);return n=="*"||n=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}u(rs,"selectionEventCanBeMerged");function is(e,t,i,r){var n=e.history,o=r&&r.origin;i==n.lastSelOp||o&&n.lastSelOrigin==o&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==o||rs(e,o,W(n.done),t))?n.done[n.done.length-1]=t:Br(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=o,n.lastSelOp=i,r&&r.clearRedo!==!1&&Fo(n.undone)}u(is,"addSelectionToHistory");function Br(e,t){var i=W(t);i&&i.ranges&&i.equals(e)||t.push(e)}u(Br,"pushSelectionToHistory");function Bo(e,t,i,r){var n=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((n||(n=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}u(Bo,"attachLocalSpans");function ns(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}u(ns,"removeClearedSpans");function os(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var r=[],n=0;n<t.text.length;++n)r.push(ns(i[n]));return r}u(os,"getOldSpans");function Ro(e,t){var i=os(e,t),r=Ti(e,t);if(!i)return r;if(!r)return i;for(var n=0;n<i.length;++n){var o=i[n],l=r[n];if(o&&l){e:for(var a=0;a<l.length;++a){for(var s=l[a],f=0;f<o.length;++f)if(o[f].marker==s.marker)continue e;o.push(s)}}else l&&(i[n]=l)}return i}u(Ro,"mergeOldSpans");function Tt(e,t,i){for(var r=[],n=0;n<e.length;++n){var o=e[n];if(o.ranges){r.push(i?xe.prototype.deepCopy.call(o):o);continue}var l=o.changes,a=[];r.push({changes:a});for(var s=0;s<l.length;++s){var f=l[s],h=void 0;if(a.push({from:f.from,to:f.to,text:f.text}),t)for(var d in f)(h=d.match(/^spans_(\d+)$/))&&ee(t,Number(h[1]))>-1&&(W(a)[d]=f[d],delete f[d])}}return r}u(Tt,"copyHistoryArray");function ln(e,t,i,r){if(r){var n=e.anchor;if(i){var o=D(t,n)<0;o!=D(i,n)<0?(n=t,t=i):o!=D(t,i)<0&&(t=i)}return new H(n,t)}else return new H(i||t,t)}u(ln,"extendRange");function Rr(e,t,i,r,n){n==null&&(n=e.cm&&(e.cm.display.shift||e.extend)),te(e,new xe([ln(e.sel.primary(),t,i,n)],0),r)}u(Rr,"extendSelection");function zo(e,t,i){for(var r=[],n=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=ln(e.sel.ranges[o],t[o],null,n);var l=ke(e.cm,r,e.sel.primIndex);te(e,l,i)}u(zo,"extendSelections");function an(e,t,i,r){var n=e.sel.ranges.slice(0);n[t]=i,te(e,ke(e.cm,n,e.sel.primIndex),r)}u(an,"replaceOneSelection");function Go(e,t,i,r){te(e,Xe(t,i),r)}u(Go,"setSimpleSelection");function ls(e,t,i){var r={ranges:t.ranges,update:function(n){this.ranges=[];for(var o=0;o<n.length;o++)this.ranges[o]=new H(A(e,n[o].anchor),A(e,n[o].head))},origin:i&&i.origin};return U(e,"beforeSelectionChange",e,r),e.cm&&U(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ke(e.cm,r.ranges,r.ranges.length-1):t}u(ls,"filterSelectionChange");function Uo(e,t,i){var r=e.history.done,n=W(r);n&&n.ranges?(r[r.length-1]=t,zr(e,t,i)):te(e,t,i)}u(Uo,"setSelectionReplaceHistory");function te(e,t,i){zr(e,t,i),is(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}u(te,"setSelection");function zr(e,t,i){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=ls(e,t,i));var r=i&&i.bias||(D(t.primary().head,e.sel.primary().head)<0?-1:1);Ko(e,Xo(e,t,r,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&wt(e.cm)}u(zr,"setSelectionNoUndo");function Ko(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ln(e.cm)),Z(e,"cursorActivity",e))}u(Ko,"setSelectionInner");function _o(e){Ko(e,Xo(e,e.sel,null,!1))}u(_o,"reCheckSelection");function Xo(e,t,i,r){for(var n,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Gr(e,l.anchor,a&&a.anchor,i,r),f=Gr(e,l.head,a&&a.head,i,r);(n||s!=l.anchor||f!=l.head)&&(n||(n=t.ranges.slice(0,o)),n[o]=new H(s,f))}return n?ke(e.cm,n,t.primIndex):t}u(Xo,"skipAtomicInSelection");function Mt(e,t,i,r,n){var o=w(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,f="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,h="selectRight"in s?!s.selectRight:s.inclusiveRight;if((a.from==null||(f?a.from<=t.ch:a.from<t.ch))&&(a.to==null||(h?a.to>=t.ch:a.to>t.ch))){if(n&&(U(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(i){var d=s.find(r<0?1:-1),p=void 0;if((r<0?h:f)&&(d=Yo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(p=D(d,i))&&(r<0?p<0:p>0))return Mt(e,d,t,r,n)}var c=s.find(r<0?-1:1);return(r<0?f:h)&&(c=Yo(e,c,r,c.line==t.line?o:null)),c?Mt(e,c,t,r,n):null}}return t}u(Mt,"skipAtomicInner");function Gr(e,t,i,r,n){var o=r||1,l=Mt(e,t,i,o,n)||!n&&Mt(e,t,i,o,!0)||Mt(e,t,i,-o,n)||!n&&Mt(e,t,i,-o,!0);return l||(e.cantEdit=!0,y(e.first,0))}u(Gr,"skipAtomic");function Yo(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?A(e,y(t.line-1)):null:i>0&&t.ch==(r||w(e,t.line)).text.length?t.line<e.first+e.size-1?y(t.line+1,0):null:new y(t.line,t.ch+i)}u(Yo,"movePos");function qo(e){e.setSelection(y(e.firstLine(),0),y(e.lastLine()),We)}u(qo,"selectAll");function Zo(e,t,i){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return i&&(r.update=function(n,o,l,a){n&&(r.from=A(e,n)),o&&(r.to=A(e,o)),l&&(r.text=l),a!==void 0&&(r.origin=a)}),U(e,"beforeChange",e,r),e.cm&&U(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}u(Zo,"filterChange");function Dt(e,t,i){if(e.cm){if(!e.cm.curOp)return Q(e.cm,Dt)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))&&(t=Zo(e,t,!0),!t))){var r=jl&&!i&&na(e,t.from,t.to);if(r)for(var n=r.length-1;n>=0;--n)Qo(e,{from:r[n].from,to:r[n].to,text:n?[""]:t.text,origin:t.origin});else Qo(e,t)}}u(Dt,"makeChange");function Qo(e,t){if(!(t.text.length==1&&t.text[0]==""&&D(t.from,t.to)==0)){var i=tn(e,t);Io(e,t,i,e.cm?e.cm.curOp.id:NaN),rr(e,t,i,Ti(e,t));var r=[];qe(e,function(n,o){!o&&ee(r,n.history)==-1&&($o(n.history,t),r.push(n.history)),rr(n,t,null,Ti(n,t))})}}u(Qo,"makeChangeInner");function Ur(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var n=e.history,o,l=e.sel,a=t=="undo"?n.done:n.undone,s=t=="undo"?n.undone:n.done,f=0;f<a.length&&(o=a[f],!(i?o.ranges&&!o.equals(e.sel):!o.ranges));f++);if(f!=a.length){for(n.lastOrigin=n.lastSelOrigin=null;;)if(o=a.pop(),o.ranges){if(Br(o,s),i&&!o.equals(e.sel)){te(e,o,{clearRedo:!1});return}l=o}else if(r){a.push(o);return}else break;var h=[];Br(l,s),s.push({changes:h,generation:n.generation}),n.generation=o.generation||++n.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),p=u(function(g){var m=o.changes[g];if(m.origin=t,d&&!Zo(e,m,!1))return a.length=0,{};h.push(on(e,m));var b=g?tn(e,m):W(a);rr(e,m,b,Ro(e,m)),!g&&e.cm&&e.cm.scrollIntoView({from:m.from,to:Ye(m)});var C=[];qe(e,function(x,S){!S&&ee(C,x.history)==-1&&($o(x.history,m),C.push(x.history)),rr(x,m,null,Ro(x,m))})},"loop"),c=o.changes.length-1;c>=0;--c){var v=p(c);if(v)return v.v}}}}u(Ur,"makeChangeFromHistory");function Jo(e,t){if(t!=0&&(e.first+=t,e.sel=new xe(vr(e.sel.ranges,function(n){return new H(y(n.anchor.line+t,n.anchor.ch),y(n.head.line+t,n.head.ch))}),e.sel.primIndex),e.cm)){ae(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;r<i.viewTo;r++)Ue(e.cm,r,"gutter")}}u(Jo,"shiftDoc");function rr(e,t,i,r){if(e.cm&&!e.cm.curOp)return Q(e.cm,rr)(e,t,i,r);if(t.to.line<e.first){Jo(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var n=t.text.length-1-(e.first-t.from.line);Jo(e,n),t={from:y(e.first,0),to:y(t.to.line+n,t.to.ch),text:[W(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:y(o,w(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=et(e,t.from,t.to),i||(i=tn(e,t)),e.cm?as(e.cm,t,r):nn(e,t,r),zr(e,i,We),e.cantEdit&&Gr(e,y(e.firstLine(),0))&&(e.cantEdit=!1)}}u(rr,"makeChangeSingleDoc");function as(e,t,i){var r=e.doc,n=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=P(we(w(r,o.line))),r.iter(s,l.line+1,function(c){if(c==n.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ln(e),nn(r,t,i,go(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(c){var v=kr(c);v>n.maxLineLength&&(n.maxLine=c,n.maxLineLength=v,n.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Jl(r,o.line),$t(e,400);var f=t.text.length-(l.line-o.line)-1;t.full?ae(e):o.line==l.line&&t.text.length==1&&!Ho(e.doc,t)?Ue(e,o.line,"text"):ae(e,o.line,l.line+1,f);var h=be(e,"changes"),d=be(e,"change");if(d||h){var p={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};d&&Z(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}u(as,"makeChangeSingleDocInEditor");function At(e,t,i,r,n){var o;r||(r=i),D(r,i)<0&&(o=[r,i],i=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Dt(e,{from:i,to:r,text:t,origin:n})}u(At,"replaceRange");function jo(e,t,i,r){i<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}u(jo,"rebaseHistSelSingle");function Vo(e,t,i,r){for(var n=0;n<e.length;++n){var o=e[n],l=!0;if(o.ranges){o.copied||(o=e[n]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)jo(o.ranges[a].anchor,t,i,r),jo(o.ranges[a].head,t,i,r);continue}for(var s=0;s<o.changes.length;++s){var f=o.changes[s];if(i<f.from.line)f.from=y(f.from.line+r,f.from.ch),f.to=y(f.to.line+r,f.to.ch);else if(t<=f.to.line){l=!1;break}}l||(e.splice(0,n+1),n=0)}}u(Vo,"rebaseHistArray");function $o(e,t){var i=t.from.line,r=t.to.line,n=t.text.length-(r-i)-1;Vo(e.done,i,r,n),Vo(e.undone,i,r,n)}u($o,"rebaseHist");function ir(e,t,i,r){var n=t,o=t;return typeof t=="number"?o=w(e,Hn(e,t)):n=P(t),n==null?null:(r(o,n)&&e.cm&&Ue(e.cm,n,i),o)}u(ir,"changeLine");function nr(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}u(nr,"LeafChunk"),nr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,r=e+t;i<r;++i){var n=this.lines[i];this.height-=n.height,ua(n),Z(n,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,i){for(var r=e+t;e<r;++e)if(i(this.lines[e]))return!0}};function or(e){this.children=e;for(var t=0,i=0,r=0;r<e.length;++r){var n=e[r];t+=n.chunkSize(),i+=n.height,n.parent=this}this.size=t,this.height=i,this.parent=null}u(or,"BranchChunk"),or.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var r=this.children[i],n=r.chunkSize();if(e<n){var o=Math.min(t,n-e),l=r.height;if(r.removeInner(e,o),this.height-=l-r.height,n==o&&(this.children.splice(i--,1),r.parent=null),(t-=o)==0)break;e=0}else e-=n}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof nr))){var a=[];this.collapse(a),this.children=[new nr(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<=o){if(n.insertInner(e,t,i),n.lines&&n.lines.length>50){for(var l=n.lines.length%25+25,a=l;a<n.lines.length;){var s=new nr(n.lines.slice(a,a+=25));n.height-=s.height,this.children.splice(++r,0,s),s.parent=this}n.lines=n.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new or(t);if(e.parent){e.size-=i.size,e.height-=i.height;var n=ee(e.parent.children,e);e.parent.children.splice(n+1,0,i)}else{var r=new or(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<o){var l=Math.min(t,o-e);if(n.iterN(e,l,i))return!0;if((t-=l)==0)break;e=0}else e-=o}}};var Kr=u(function(e,t,i){if(i)for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);this.doc=e,this.node=t},"LineWidget");Kr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,r=P(i);if(!(r==null||!t)){for(var n=0;n<t.length;++n)t[n]==this&&t.splice(n--,1);t.length||(i.widgets=null);var o=qt(this);Me(i,Math.max(0,i.height-o)),e&&(ue(e,function(){el(e,i,-o),Ue(e,r,"widget")}),Z(e,"lineWidgetCleared",e,this,r))}},Kr.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,r=this.line;this.height=null;var n=qt(this)-t;n&&(Ge(this.doc,r)||Me(r,r.height+n),i&&ue(i,function(){i.curOp.forceUpdate=!0,el(i,r,n),Z(i,"lineWidgetChanged",i,e,P(r))}))},yt(Kr);function el(e,t,i){Ee(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&qi(e,i)}u(el,"adjustScrollWhenAboveVisible");function ss(e,t,i,r){var n=new Kr(e,i,r),o=e.cm;return o&&n.noHScroll&&(o.display.alignWidgets=!0),ir(e,t,"widget",function(l){var a=l.widgets||(l.widgets=[]);if(n.insertAt==null?a.push(n):a.splice(Math.min(a.length,Math.max(0,n.insertAt)),0,n),n.line=l,o&&!Ge(e,l)){var s=Ee(l)<e.scrollTop;Me(l,l.height+qt(n)),s&&qi(o,n.height),o.curOp.forceUpdate=!0}return!0}),o&&Z(o,"lineWidgetAdded",o,n,typeof t=="number"?t:P(t)),n}u(ss,"addLineWidget");var us=0,st=u(function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++us},"TextMarker");st.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&lt(e),be(this,"clear")){var i=this.find();i&&Z(this,"clear",i.from,i.to)}for(var r=null,n=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=Kt(l.markedSpans,this);e&&!this.collapsed?Ue(e,P(l),"text"):e&&(a.to!=null&&(n=P(l)),a.from!=null&&(r=P(l))),l.markedSpans=ea(l.markedSpans,a),a.from==null&&this.collapsed&&!Ge(this.doc,l)&&e&&Me(l,xt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var f=we(this.lines[s]),h=kr(f);h>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&ae(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_o(e.doc)),e&&Z(e,"markerCleared",e,this,r,n),t&&at(e),this.parent&&this.parent.clear()}},st.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,n=0;n<this.lines.length;++n){var o=this.lines[n],l=Kt(o.markedSpans,this);if(l.from!=null&&(i=y(t?o:P(o),l.from),e==-1))return i;if(l.to!=null&&(r=y(t?o:P(o),l.to),e==1))return r}return i&&{from:i,to:r}},st.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,r=this.doc.cm;!t||!r||ue(r,function(){var n=t.line,o=P(t.line),l=Pi(r,o);if(l&&(ao(l),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ge(i.doc,n)&&i.height!=null){var a=i.height;i.height=null;var s=qt(i)-a;s&&Me(n,n.height+s)}Z(r,"markerChanged",r,e)})},st.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ee(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},st.prototype.detachLine=function(e){if(this.lines.splice(ee(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},yt(st);function Ot(e,t,i,r,n){if(r&&r.shared)return fs(e,t,i,r,n);if(e.cm&&!e.cm.curOp)return Q(e.cm,Ot)(e,t,i,r,n);var o=new st(e,n),l=D(t,i);if(r&&je(r,o,!1),l>0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=vt("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Yn(e,t.line,t,i,o)||t.line!=i.line&&Yn(e,i.line,t,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");$l()}o.addToHistory&&Io(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,f;if(e.iter(a,i.line+1,function(d){s&&o.collapsed&&!s.options.lineWrapping&&we(d)==s.display.maxLine&&(f=!0),o.collapsed&&a!=t.line&&Me(d,0),ta(d,new Cr(o,a==t.line?t.ch:null,a==i.line?i.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,i.line+1,function(d){Ge(e,d)&&Me(d,0)}),o.clearOnEnter&&M(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Vl(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++us,o.atomic=!0),s){if(f&&(s.curOp.updateMaxLine=!0),o.collapsed)ae(s,t.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=i.line;h++)Ue(s,h,"text");o.atomic&&_o(s.doc),Z(s,"markerAdded",s,o)}return o}u(Ot,"markText");var _r=u(function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this},"SharedTextMarker");_r.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Z(this,"clear")}},_r.prototype.find=function(e,t){return this.primary.find(e,t)},yt(_r);function fs(e,t,i,r,n){r=je(r),r.shared=!1;var o=[Ot(e,t,i,r,n)],l=o[0],a=r.widgetNode;return qe(e,function(s){a&&(r.widgetNode=a.cloneNode(!0)),o.push(Ot(s,A(s,t),A(s,i),r,n));for(var f=0;f<s.linked.length;++f)if(s.linked[f].isParent)return;l=W(o)}),new _r(o,l)}u(fs,"markTextShared");function tl(e){return e.findMarks(y(e.first,0),e.clipPos(y(e.lastLine())),function(t){return t.parent})}u(tl,"findSharedMarkers");function hs(e,t){for(var i=0;i<t.length;i++){var r=t[i],n=r.find(),o=e.clipPos(n.from),l=e.clipPos(n.to);if(D(o,l)){var a=Ot(e,o,l,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}u(hs,"copySharedMarkers");function ds(e){for(var t=u(function(r){var n=e[r],o=[n.primary.doc];qe(n.primary.doc,function(s){return o.push(s)});for(var l=0;l<n.markers.length;l++){var a=n.markers[l];ee(o,a.doc)==-1&&(a.parent=null,n.markers.splice(l--,1))}},"loop"),i=0;i<e.length;i++)t(i)}u(ds,"detachSharedMarkers");var fu=0,fe=u(function(e,t,i,r,n){if(!(this instanceof fe))return new fe(e,t,i,r,n);i==null&&(i=0),or.call(this,[new nr([new _t("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var o=y(i,0);this.sel=Xe(o),this.history=new Ir(null),this.id=++fu,this.modeOption=t,this.lineSep=r,this.direction=n=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),nn(this,{from:o,to:o,text:e}),te(this,Xe(o),We)},"Doc");fe.prototype=Cn(or.prototype,{constructor:fe,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,r=0;r<t.length;++r)i+=t[r].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=bi(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:J(function(e){var t=y(this.first,0),i=this.first+this.size-1;Dt(this,{from:t,to:y(i,w(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Jt(this.cm,0,0),te(this,Xe(t),We)}),replaceRange:function(e,t,i,r){t=A(this,t),i=i?A(this,i):t,At(this,e,t,i,r)},getRange:function(e,t,i){var r=et(this,A(this,e),A(this,t));return i===!1?r:i===""?r.join(""):r.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Gt(this,e))return w(this,e)},getLineNumber:function(e){return P(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=w(this,e)),we(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return A(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:J(function(e,t,i){Go(this,A(this,typeof e=="number"?y(e,t||0):e),null,i)}),setSelection:J(function(e,t,i){Go(this,A(this,e),A(this,t||e),i)}),extendSelection:J(function(e,t,i){Rr(this,A(this,e),t&&A(this,t),i)}),extendSelections:J(function(e,t){zo(this,Pn(this,e),t)}),extendSelectionsBy:J(function(e,t){var i=vr(this.sel.ranges,e);zo(this,Pn(this,i),t)}),setSelections:J(function(e,t,i){if(e.length){for(var r=[],n=0;n<e.length;n++)r[n]=new H(A(this,e[n].anchor),A(this,e[n].head||e[n].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),te(this,ke(this.cm,r,t),i)}}),addSelection:J(function(e,t,i){var r=this.sel.ranges.slice(0);r.push(new H(A(this,e),A(this,t||e))),te(this,ke(this.cm,r,r.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,r=0;r<t.length;r++){var n=et(this,t[r].from(),t[r].to());i=i?i.concat(n):n}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,r=0;r<i.length;r++){var n=et(this,i[r].from(),i[r].to());e!==!1&&(n=n.join(e||this.lineSeparator())),t[r]=n}return t},replaceSelection:function(e,t,i){for(var r=[],n=0;n<this.sel.ranges.length;n++)r[n]=e;this.replaceSelections(r,t,i||"+input")},replaceSelections:J(function(e,t,i){for(var r=[],n=this.sel,o=0;o<n.ranges.length;o++){var l=n.ranges[o];r[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:i}}for(var a=t&&t!="end"&&$a(this,r,t),s=r.length-1;s>=0;s--)Dt(this,r[s]);a?Uo(this,a):this.cm&&wt(this.cm)}),undo:J(function(){Ur(this,"undo")}),redo:J(function(){Ur(this,"redo")}),undoSelection:J(function(){Ur(this,"undo",!0)}),redoSelection:J(function(){Ur(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Ir(this.history),qe(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Tt(this.history.done),undone:Tt(this.history.undone)}},setHistory:function(e){var t=this.history=new Ir(this.history);t.done=Tt(e.done.slice(0),null,!0),t.undone=Tt(e.undone.slice(0),null,!0)},setGutterMarker:J(function(e,t,i){return ir(this,e,"gutter",function(r){var n=r.gutterMarkers||(r.gutterMarkers={});return n[t]=i,!i&&Sn(n)&&(r.gutterMarkers=null),!0})}),clearGutter:J(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&ir(t,i,"gutter",function(){return i.gutterMarkers[e]=null,Sn(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Gt(this,e)||(t=e,e=w(this,e),!e))return null}else if(t=P(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:J(function(e,t,i){return ir(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[n])r[n]=i;else{if(ct(i).test(r[n]))return!1;r[n]+=" "+i}return!0})}),removeLineClass:J(function(e,t,i){return ir(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=r[n];if(o)if(i==null)r[n]=null;else{var l=o.match(ct(i));if(!l)return!1;var a=l.index+l[0].length;r[n]=o.slice(0,l.index)+(!l.index||a==o.length?"":" ")+o.slice(a)||null}else return!1;return!0})}),addLineWidget:J(function(e,t,i){return ss(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Ot(this,A(this,e),A(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=A(this,e),Ot(this,e,e,i,"bookmark")},findMarksAt:function(e){e=A(this,e);var t=[],i=w(this,e.line).markedSpans;if(i)for(var r=0;r<i.length;++r){var n=i[r];(n.from==null||n.from<=e.ch)&&(n.to==null||n.to>=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,i){e=A(this,e),t=A(this,t);var r=[],n=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];!(s.to!=null&&n==e.line&&e.ch>=s.to||s.from==null&&n!=e.line||s.from!=null&&n==t.line&&s.from>=t.ch)&&(!i||i(s.marker))&&r.push(s.marker.parent||s.marker)}++n}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;r<i.length;++r)i[r].from!=null&&e.push(i[r].marker)}),e},posFromIndex:function(e){var t,i=this.first,r=this.lineSeparator().length;return this.iter(function(n){var o=n.text.length+r;if(o>e)return t=e,!0;e-=o,++i}),A(this,y(i,t))},indexFromPos:function(e){e=A(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+i}),t},copy:function(e){var t=new fe(bi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var r=new fe(bi(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],hs(r,tl(this)),r},unlinkDoc:function(e){if(e instanceof B&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ds(tl(this));break}}if(e.history==this.history){var r=[e.id];qe(e,function(n){return r.push(n.id)},!0),e.history=new Ir(null),e.history.done=Tt(this.history.done,r),e.history.undone=Tt(this.history.undone,r)}},iterLinkedDocs:function(e){qe(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):An(e)},lineSeparator:function(){return this.lineSep||`
11
+ `},setDirection:J(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&es(this.cm))})}),fe.prototype.eachLine=fe.prototype.iter;var cs=0;function ps(e){var t=this;if(rl(t),!(q(t,e)||Fe(t.display,e))){le(e),N&&(cs=+new Date);var i=it(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,o=Array(n),l=0,a=u(function(){++l==n&&Q(t,function(){i=A(t.doc,i);var c={from:i,to:i,text:t.doc.splitLines(o.filter(function(v){return v!=null}).join(t.doc.lineSeparator())),origin:"paste"};Dt(t.doc,c),Uo(t.doc,Xe(A(t.doc,i),A(t.doc,Ye(c))))})()},"markAsReadAndPasteIfAllFilesAreRead"),s=u(function(c,v){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,c.type)==-1){a();return}var g=new FileReader;g.onerror=function(){return a()},g.onload=function(){var m=g.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(m)){a();return}o[v]=m,a()},g.readAsText(c)},"readTextFromFile"),f=0;f<r.length;f++)s(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),zr(t.doc,Xe(i,i)),d)for(var p=0;p<d.length;++p)At(t.doc,"",d[p].anchor,d[p].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}u(ps,"onDrop");function vs(e,t){if(N&&(!e.state.draggingText||+new Date-cs<100)){Bt(t);return}if(!(q(e,t)||Fe(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ni)){var i=T("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Te&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),Te&&i.parentNode.removeChild(i)}}u(vs,"onDragStart");function gs(e,t){var i=it(e,t);if(i){var r=document.createDocumentFragment();Ui(e,i,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ve(e.display.dragCursor,r)}}u(gs,"onDragOver");function rl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}u(rl,"clearDragCursor");function il(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&i.push(n)}i.length&&i[0].operation(function(){for(var o=0;o<i.length;o++)e(i[o])})}}u(il,"forEachCodeMirror");var ys=!1;function ms(){ys||(bs(),ys=!0)}u(ms,"ensureGlobalHandlers");function bs(){var e;M(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,il(xs)},100))}),M(window,"blur",function(){return il(St)})}u(bs,"registerGlobalHandlers");function xs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}u(xs,"onResize");for(var ut={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Xr=0;Xr<10;Xr++)ut[Xr+48]=ut[Xr+96]=String(Xr);for(var sn=65;sn<=90;sn++)ut[sn]=String.fromCharCode(sn);for(var Yr=1;Yr<=12;Yr++)ut[Yr+111]=ut[Yr+63235]="F"+Yr;var Ze={};Ze.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ze.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ze.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ze.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ze.default=Se?Ze.macDefault:Ze.pcDefault;function Cs(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,r,n,o,l=0;l<t.length-1;l++){var a=t[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))i=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))n=!0;else throw new Error("Unrecognized modifier name: "+a)}return i&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}u(Cs,"normalizeKeyName");function Ss(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(r=="..."){delete e[i];continue}for(var n=vr(i.split(" "),Cs),o=0;o<n.length;o++){var l=void 0,a=void 0;o==n.length-1?(a=n.join(" "),l=r):(a=n.slice(0,o+1).join(" "),l="...");var s=t[a];if(!s)t[a]=l;else if(s!=l)throw new Error("Inconsistent bindings for "+a)}delete e[i]}for(var f in t)e[f]=t[f];return e}u(Ss,"normalizeKeyMap");function Nt(e,t,i,r){t=qr(t);var n=t.call?t.call(e,r):t[e];if(n===!1)return"nothing";if(n==="...")return"multi";if(n!=null&&i(n))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Nt(e,t.fallthrough,i,r);for(var o=0;o<t.fallthrough.length;o++){var l=Nt(e,t.fallthrough[o],i,r);if(l)return l}}}u(Nt,"lookupKey");function nl(e){var t=typeof e=="string"?e:ut[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}u(nl,"isModifierKey");function ol(e,t,i){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(Fl?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(Fl?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}u(ol,"addModifierNames");function ll(e,t){if(Te&&e.keyCode==34&&e.char)return!1;var i=ut[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),ol(i,e,t))}u(ll,"keyName");function qr(e){return typeof e=="string"?Ze[e]:e}u(qr,"getKeyMap");function Wt(e,t){for(var i=e.doc.sel.ranges,r=[],n=0;n<i.length;n++){for(var o=t(i[n]);r.length&&D(o.from,W(r).to)<=0;){var l=r.pop();if(D(l.from,o.from)<0){o.from=l.from;break}}r.push(o)}ue(e,function(){for(var a=r.length-1;a>=0;a--)At(e.doc,"",r[a].from,r[a].to,"+delete");wt(e)})}u(Wt,"deleteNearSelection");function un(e,t,i){var r=wn(e.text,t+i,i);return r<0||r>e.text.length?null:r}u(un,"moveCharLogically");function fn(e,t,i){var r=un(e,t.ch,i);return r==null?null:new y(t.line,r,i<0?"after":"before")}u(fn,"moveLogically");function hn(e,t,i,r,n){if(e){t.doc.direction=="rtl"&&(n=-n);var o=He(i,t.doc.direction);if(o){var l=n<0?W(o):o[0],a=n<0==(l.level==1),s=a?"after":"before",f;if(l.level>0||t.doc.direction=="rtl"){var h=mt(t,i);f=n<0?i.text.length-1:0;var d=Ae(t,h,f).top;f=Ft(function(p){return Ae(t,h,p).top==d},n<0==(l.level==1)?l.from:l.to-1,f),s=="before"&&(f=un(i,f,1))}else f=n<0?l.to:l.from;return new y(r,f,s)}}return new y(r,n<0?i.text.length:0,n<0?"before":"after")}u(hn,"endOfLine");function ws(e,t,i,r){var n=He(t,e.doc.direction);if(!n)return fn(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var o=It(n,i.ch,i.sticky),l=n[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>i.ch:l.from<i.ch))return fn(t,i,r);var a=u(function(b,C){return un(t,b instanceof y?b.ch:b,C)},"mv"),s,f=u(function(b){return e.options.lineWrapping?(s=s||mt(e,t),vo(e,t,s,b)):{begin:0,end:t.text.length}},"getWrappedLineExtent"),h=f(i.sticky=="before"?a(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var d=l.level==1==r<0,p=a(i,d?1:-1);if(p!=null&&(d?p<=l.to&&p<=h.end:p>=l.from&&p>=h.begin)){var c=d?"before":"after";return new y(i.line,p,c)}}var v=u(function(b,C,x){for(var S=u(function(F,V){return V?new y(i.line,a(F,1),"before"):new y(i.line,F,"after")},"getRes");b>=0&&b<n.length;b+=C){var k=n[b],L=C>0==(k.level!=1),O=L?x.begin:a(x.end,-1);if(k.from<=O&&O<k.to||(O=L?k.from:a(k.to,-1),x.begin<=O&&O<x.end))return S(O,L)}},"searchInVisualLine"),g=v(o+r,r,h);if(g)return g;var m=r>0?h.end:a(h.begin,-1);return m!=null&&!(r>0&&m==t.text.length)&&(g=v(r>0?0:n.length-1,r,f(m)),g)?g:null}u(ws,"moveVisually");var Zr={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),We)},killLine:function(e){return Wt(e,function(t){if(t.empty()){var i=w(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:y(t.head.line+1,0)}:{from:t.head,to:y(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Wt(e,function(t){return{from:y(t.from().line,0),to:A(e.doc,y(t.to().line+1,0))}})},delLineLeft:function(e){return Wt(e,function(t){return{from:y(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Wt(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Wt(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(y(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(y(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return al(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return sl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ls(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},pr)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},pr)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return r.ch<e.getLine(r.line).search(/\S/)?sl(e,t.head):r},pr)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),r=e.options.tabSize,n=0;n<i.length;n++){var o=i[n].from(),l=me(e.getLine(o.line),o.ch,r);t.push(hi(r-l%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ue(e,function(){for(var t=e.listSelections(),i=[],r=0;r<t.length;r++)if(t[r].empty()){var n=t[r].head,o=w(e.doc,n.line).text;if(o){if(n.ch==o.length&&(n=new y(n.line,n.ch-1)),n.ch>0)n=new y(n.line,n.ch+1),e.replaceRange(o.charAt(n.ch-1)+o.charAt(n.ch-2),y(n.line,n.ch-2),n,"+transpose");else if(n.line>e.doc.first){var l=w(e.doc,n.line-1).text;l&&(n=new y(n.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),y(n.line-1,l.length-1),n,"+transpose"))}}i.push(new H(n,n))}e.setSelections(i)})},newlineAndIndent:function(e){return ue(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);wt(e)})},openLine:function(e){return e.replaceSelection(`
12
+ `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function al(e,t){var i=w(e.doc,t),r=we(i);return r!=i&&(t=P(r)),hn(!0,e,r,t,1)}u(al,"lineStart");function Ls(e,t){var i=w(e.doc,t),r=la(i);return r!=i&&(t=P(r)),hn(!0,e,i,t,-1)}u(Ls,"lineEnd");function sl(e,t){var i=al(e,t.line),r=w(e.doc,i.line),n=He(r,e.doc.direction);if(!n||n[0].level==0){var o=Math.max(i.ch,r.text.search(/\S/)),l=t.line==i.line&&t.ch<=o&&t.ch;return y(i.line,l?0:o,i.sticky)}return i}u(sl,"lineStartSmart");function Qr(e,t,i){if(typeof t=="string"&&(t=Zr[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),n=t(e)!=si}finally{e.display.shift=r,e.state.suppressEdits=!1}return n}u(Qr,"doHandleBinding");function ks(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var n=Nt(t,e.state.keyMaps[r],i,e);if(n)return n}return e.options.extraKeys&&Nt(t,e.options.extraKeys,i,e)||Nt(t,e.options.keyMap,i,e)}u(ks,"lookupKeyForEditor");var hu=new Ve;function lr(e,t,i,r){var n=e.state.keySeq;if(n){if(nl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:hu.set(50,function(){e.state.keySeq==n&&(e.state.keySeq=null,e.display.input.reset())}),ul(e,n+" "+t,i,r))return!0}return ul(e,t,i,r)}u(lr,"dispatchKey");function ul(e,t,i,r){var n=ks(e,t,r);return n=="multi"&&(e.state.keySeq=t),n=="handled"&&Z(e,"keyHandled",e,t,i),(n=="handled"||n=="multi")&&(le(i),Ki(e)),!!n}u(ul,"dispatchKeyInner");function fl(e,t){var i=ll(t,!0);return i?t.shiftKey&&!e.state.keySeq?lr(e,"Shift-"+i,t,function(r){return Qr(e,r,!0)})||lr(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Qr(e,r)}):lr(e,i,t,function(r){return Qr(e,r)}):!1}u(fl,"handleKeyBinding");function Ts(e,t,i){return lr(e,"'"+i+"'",t,function(r){return Qr(e,r,!0)})}u(Ts,"handleCharBinding");var hl=null;function dl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=ye(),!q(t,e))){N&&I<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=fl(t,e);Te&&(hl=r?i:null,!r&&i==88&&!lu&&(Se?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),Ce&&!Se&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ms(t)}}u(dl,"onKeyDown");function Ms(e){var t=e.display.lineDiv;Je(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(pt(t,"CodeMirror-crosshair"),ge(document,"keyup",i),ge(document,"mouseover",i))}u(i,"up"),M(document,"keyup",i),M(document,"mouseover",i)}u(Ms,"showCrossHair");function cl(e){e.keyCode==16&&(this.doc.sel.shift=!1),q(this,e)}u(cl,"onKeyUp");function pl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Fe(t.display,e)||q(t,e)||e.ctrlKey&&!e.altKey||Se&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(Te&&i==hl){hl=null,le(e);return}if(!(Te&&(!e.which||e.which<10)&&fl(t,e))){var n=String.fromCharCode(r==null?i:r);n!="\b"&&(Ts(t,e,n)||t.display.input.onKeyPress(e))}}}u(pl,"onKeyPress");var du=400,vl=u(function(e,t,i){this.time=e,this.pos=t,this.button=i},"PastClick");vl.prototype.compare=function(e,t,i){return this.time+du>e&&D(t,this.pos)==0&&i==this.button};var Jr,jr;function Ds(e,t){var i=+new Date;return jr&&jr.compare(i,e,t)?(Jr=jr=null,"triple"):Jr&&Jr.compare(i,e,t)?(jr=new vl(i,e,t),Jr=null,"double"):(Jr=new vl(i,e,t),jr=null,"single")}u(Ds,"clickRepeat");function gl(e){var t=this,i=t.display;if(!(q(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,Fe(i,e)){oe||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!dn(t,e)){var r=it(t,e),n=Tn(e),o=r?Ds(r,n):"single";window.focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&As(t,n,r,o,e))&&(n==1?r?Ns(t,r,o,e):gi(e)==i.scroller&&le(e):n==2?(r&&Rr(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(mn?t.display.input.onContextMenu(e):_i(t)))}}}u(gl,"onMouseDown");function As(e,t,i,r,n){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,lr(e,ol(o,n),n,function(l){if(typeof l=="string"&&(l=Zr[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,i)!=si}finally{e.state.suppressEdits=!1}return a})}u(As,"handleMappedButton");function Os(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==null){var o=$s?i.shiftKey&&i.metaKey:i.altKey;n.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(n.extend==null||e.doc.extend)&&(n.extend=e.doc.extend||i.shiftKey),n.addNew==null&&(n.addNew=Se?i.metaKey:i.ctrlKey),n.moveOnDrag==null&&(n.moveOnDrag=!(Se?i.altKey:i.ctrlKey)),n}u(Os,"configureMouse");function Ns(e,t,i,r){N?setTimeout(ai(bo,e),0):e.curOp.focus=ye();var n=Os(e,i,r),o=e.doc.sel,l;e.options.dragDrop&&nu&&!e.isReadOnly()&&i=="single"&&(l=o.contains(t))>-1&&(D((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(D(l.to(),t)>0||t.xRel<0)?Ws(e,r,t,n):Hs(e,r,t,n)}u(Ns,"leftButtonDown");function Ws(e,t,i,r){var n=e.display,o=!1,l=Q(e,function(f){oe&&(n.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),ge(n.wrapper.ownerDocument,"mouseup",l),ge(n.wrapper.ownerDocument,"mousemove",a),ge(n.scroller,"dragstart",s),ge(n.scroller,"drop",l),o||(le(f),r.addNew||Rr(e.doc,i,null,null,r.extend),oe&&!ni||N&&I==9?setTimeout(function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()},20):n.input.focus())}),a=u(function(f){o=o||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},"mouseMove"),s=u(function(){return o=!0},"dragStart");oe&&(n.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,M(n.wrapper.ownerDocument,"mouseup",l),M(n.wrapper.ownerDocument,"mousemove",a),M(n.scroller,"dragstart",s),M(n.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return n.input.focus()},20),n.scroller.dragDrop&&n.scroller.dragDrop()}u(Ws,"leftButtonStartDrag");function yl(e,t,i){if(i=="char")return new H(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new H(y(t.line,0),A(e.doc,y(t.line+1,0)));var r=i(e,t);return new H(r.from,r.to)}u(yl,"rangeForUnit");function Hs(e,t,i,r){N&&_i(e);var n=e.display,o=e.doc;le(t);var l,a,s=o.sel,f=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(i),a>-1?l=f[a]:l=new H(i,i)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new H(i,i)),i=it(e,t,!0,!0),a=-1;else{var h=yl(e,i,r.unit);r.extend?l=ln(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=f.length,te(o,ke(e,f.concat([l]),a),{scroll:!1,origin:"*mouse"})):f.length>1&&f[a].empty()&&r.unit=="char"&&!r.extend?(te(o,ke(e,f.slice(0,a).concat(f.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):an(o,a,l,bn):(a=0,te(o,new xe([l],0),bn),s=o.sel);var d=i;function p(x){if(D(d,x)!=0)if(d=x,r.unit=="rectangle"){for(var S=[],k=e.options.tabSize,L=me(w(o,i.line).text,i.ch,k),O=me(w(o,x.line).text,x.ch,k),F=Math.min(L,O),V=Math.max(L,O),R=Math.min(i.line,x.line),he=Math.min(e.lastLine(),Math.max(i.line,x.line));R<=he;R++){var de=w(o,R).text,X=ui(de,F,k);F==V?S.push(new H(y(R,X),y(R,X))):de.length>X&&S.push(new H(y(R,X),y(R,ui(de,V,k))))}S.length||S.push(new H(i,i)),te(o,ke(e,s.ranges.slice(0,a).concat(S),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(x)}else{var ce=l,re=yl(e,x,r.unit),j=ce.anchor,Y;D(re.anchor,j)>0?(Y=re.head,j=xr(ce.from(),re.anchor)):(Y=re.anchor,j=br(ce.to(),re.head));var G=s.ranges.slice(0);G[a]=Ps(e,new H(A(o,j),Y)),te(o,ke(e,G,a),bn)}}u(p,"extendTo");var c=n.wrapper.getBoundingClientRect(),v=0;function g(x){var S=++v,k=it(e,x,!0,r.unit=="rectangle");if(k)if(D(k,d)!=0){e.curOp.focus=ye(),p(k);var L=Pr(n,o);(k.line>=L.to||k.line<L.from)&&setTimeout(Q(e,function(){v==S&&g(x)}),150)}else{var O=x.clientY<c.top?-20:x.clientY>c.bottom?20:0;O&&setTimeout(Q(e,function(){v==S&&(n.scroller.scrollTop+=O,g(x))}),50)}}u(g,"extend");function m(x){e.state.selectingText=!1,v=1/0,x&&(le(x),n.input.focus()),ge(n.wrapper.ownerDocument,"mousemove",b),ge(n.wrapper.ownerDocument,"mouseup",C),o.history.lastSelOrigin=null}u(m,"done");var b=Q(e,function(x){x.buttons===0||!Tn(x)?m(x):g(x)}),C=Q(e,m);e.state.selectingText=C,M(n.wrapper.ownerDocument,"mousemove",b),M(n.wrapper.ownerDocument,"mouseup",C)}u(Hs,"leftButtonSelect");function Ps(e,t){var i=t.anchor,r=t.head,n=w(e.doc,i.line);if(D(i,r)==0&&i.sticky==r.sticky)return t;var o=He(n);if(!o)return t;var l=It(o,i.ch,i.sticky),a=o[l];if(a.from!=i.ch&&a.to!=i.ch)return t;var s=l+(a.from==i.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var f;if(r.line!=i.line)f=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=It(o,r.ch,r.sticky),d=h-l||(r.ch-i.ch)*(a.level==1?-1:1);h==s-1||h==s?f=d<0:f=d>0}var p=o[s+(f?-1:0)],c=f==(p.level==1),v=c?p.from:p.to,g=c?"after":"before";return i.ch==v&&i.sticky==g?t:new H(new y(i.line,v,g),r)}u(Ps,"bidiSimplify");function ml(e,t,i,r){var n,o;if(t.touches)n=t.touches[0].clientX,o=t.touches[0].clientY;else try{n=t.clientX,o=t.clientY}catch{return!1}if(n>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&le(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!be(e,i))return vi(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var f=l.gutters.childNodes[s];if(f&&f.getBoundingClientRect().right>=n){var h=tt(e.doc,o),d=e.display.gutterSpecs[s];return U(e,i,e,h,d.className,t),vi(t)}}}u(ml,"gutterEvent");function dn(e,t){return ml(e,t,"gutterClick",!0)}u(dn,"clickInGutter");function bl(e,t){Fe(e.display,t)||Es(e,t)||q(e,t,"contextmenu")||mn||e.display.input.onContextMenu(t)}u(bl,"onContextMenu");function Es(e,t){return be(e,"gutterContextMenu")?ml(e,t,"gutterContextMenu",!1):!1}u(Es,"contextMenuInGutter");function xl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zt(e)}u(xl,"themeChanged");var ar={toString:function(){return"CodeMirror.Init"}},Fs={},cn={};function Is(e){var t=e.optionHandlers;function i(r,n,o,l){e.defaults[r]=n,o&&(t[r]=l?function(a,s,f){f!=ar&&o(a,s,f)}:o)}u(i,"option"),e.defineOption=i,e.Init=ar,i("value","",function(r,n){return r.setValue(n)},!0),i("mode",null,function(r,n){r.doc.modeOption=n,rn(r)},!0),i("indentUnit",2,rn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){tr(r),Zt(r),ae(r)},!0),i("lineSeparator",null,function(r,n){if(r.doc.lineSep=n,!!n){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var f=0;;){var h=s.text.indexOf(n,f);if(h==-1)break;f=h+n.length,o.push(y(l,h))}l++});for(var a=o.length-1;a>=0;a--)At(r.doc,n,o[a],y(o[a].line,o[a].ch+n.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,n,o){r.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),o!=ar&&r.refresh()}),i("specialCharPlaceholder",fa,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",dr?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,n){return r.getInputField().spellcheck=n},!0),i("autocorrect",!1,function(r,n){return r.getInputField().autocorrect=n},!0),i("autocapitalize",!1,function(r,n){return r.getInputField().autocapitalize=n},!0),i("rtlMoveVisually",!eu),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){xl(r),er(r)},!0),i("keyMap","default",function(r,n,o){var l=qr(n),a=o!=ar&&qr(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,Rs,!0),i("gutters",[],function(r,n){r.display.gutterSpecs=$i(n,r.options.lineNumbers),er(r)},!0),i("fixedGutter",!0,function(r,n){r.display.gutters.style.left=n?zi(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return kt(r)},!0),i("scrollbarStyle","native",function(r){Lo(r),kt(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,n){r.display.gutterSpecs=$i(r.options.gutters,n),er(r)},!0),i("firstLineNumber",1,er,!0),i("lineNumberFormatter",function(r){return r},er,!0),i("showCursorWhenSelecting",!1,Qt,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,n){n=="nocursor"&&(St(r),r.display.input.blur()),r.display.input.readOnlyChanged(n)}),i("screenReaderLabel",null,function(r,n){n=n===""?null:n,r.display.input.screenReaderLabelChanged(n)}),i("disableInput",!1,function(r,n){n||r.display.input.reset()},!0),i("dragDrop",!0,Bs),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,Qt,!0),i("singleCursorHeightPerLine",!0,Qt,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,tr,!0),i("addModeClass",!1,tr,!0),i("pollInterval",100),i("undoDepth",200,function(r,n){return r.doc.history.undoDepth=n}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,tr,!0),i("moveInputWithCursor",!0,function(r,n){n||r.display.input.resetPosition()}),i("tabindex",null,function(r,n){return r.display.input.getField().tabIndex=n||""}),i("autofocus",null),i("direction","ltr",function(r,n){return r.doc.setDirection(n)},!0),i("phrases",null)}u(Is,"defineOptions");function Bs(e,t,i){var r=i&&i!=ar;if(!t!=!r){var n=e.display.dragFunctions,o=t?M:ge;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}u(Bs,"dragDropChanged");function Rs(e){e.options.lineWrapping?(Je(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(pt(e.display.wrapper,"CodeMirror-wrap"),Oi(e)),Gi(e),ae(e),Zt(e),setTimeout(function(){return kt(e)},100)}u(Rs,"wrappingChanged");function B(e,t){var i=this;if(!(this instanceof B))return new B(e,t);this.options=t=t?je(t):{},je(Fs,t,!1);var r=t.value;typeof r=="string"?r=new fe(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var n=new B.inputStyles[t.inputStyle](this),o=this.display=new ja(e,r,n,t);o.wrapper.CodeMirror=this,xl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Lo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ve,keySeq:null,specialChars:null},t.autofocus&&!dr&&o.input.focus(),N&&I<11&&setTimeout(function(){return i.display.input.reset(!0)},20),zs(this),ms(),lt(this),this.curOp.forceUpdate=!0,Po(this,r),t.autofocus&&!dr||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Xi(i)},20):St(this);for(var l in cn)cn.hasOwnProperty(l)&&cn[l](this,t[l],ar);Mo(this),t.finishInit&&t.finishInit(this);for(var a=0;a<Cl.length;++a)Cl[a](this);at(this),oe&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}u(B,"CodeMirror"),B.defaults=Fs,B.optionHandlers=cn;function zs(e){var t=e.display;M(t.scroller,"mousedown",Q(e,gl)),N&&I<11?M(t.scroller,"dblclick",Q(e,function(s){if(!q(e,s)){var f=it(e,s);if(!(!f||dn(e,s)||Fe(e.display,s))){le(s);var h=e.findWordAt(f);Rr(e.doc,h.anchor,h.head)}}})):M(t.scroller,"dblclick",function(s){return q(e,s)||le(s)}),M(t.scroller,"contextmenu",function(s){return bl(e,s)}),M(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||bl(e,s)});var i,r={end:0};function n(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}u(n,"finishTouch");function o(s){if(s.touches.length!=1)return!1;var f=s.touches[0];return f.radiusX<=1&&f.radiusY<=1}u(o,"isMouseLikeTouchEvent");function l(s,f){if(f.left==null)return!0;var h=f.left-s.left,d=f.top-s.top;return h*h+d*d>20*20}u(l,"farAway"),M(t.scroller,"touchstart",function(s){if(!q(e,s)&&!o(s)&&!dn(e,s)){t.input.ensurePolled(),clearTimeout(i);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),M(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),M(t.scroller,"touchend",function(s){var f=t.activeTouch;if(f&&!Fe(t,s)&&f.left!=null&&!f.moved&&new Date-f.start<300){var h=e.coordsChar(t.activeTouch,"page"),d;!f.prev||l(f,f.prev)?d=new H(h,h):!f.prev.prev||l(f,f.prev.prev)?d=e.findWordAt(h):d=new H(y(h.line,0),A(e.doc,y(h.line+1,0))),e.setSelection(d.anchor,d.head),e.focus(),le(s)}n()}),M(t.scroller,"touchcancel",n),M(t.scroller,"scroll",function(){t.scroller.clientHeight&&(jt(e,t.scroller.scrollTop),ot(e,t.scroller.scrollLeft,!0),U(e,"scroll",e))}),M(t.scroller,"mousewheel",function(s){return Oo(e,s)}),M(t.scroller,"DOMMouseScroll",function(s){return Oo(e,s)}),M(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){q(e,s)||Bt(s)},over:function(s){q(e,s)||(gs(e,s),Bt(s))},start:function(s){return vs(e,s)},drop:Q(e,ps),leave:function(s){q(e,s)||rl(e)}};var a=t.input.getField();M(a,"keyup",function(s){return cl.call(e,s)}),M(a,"keydown",Q(e,dl)),M(a,"keypress",Q(e,pl)),M(a,"focus",function(s){return Xi(e,s)}),M(a,"blur",function(s){return St(e,s)})}u(zs,"registerEventHandlers");var Cl=[];B.defineInitHook=function(e){return Cl.push(e)};function sr(e,t,i,r){var n=e.doc,o;i==null&&(i="add"),i=="smart"&&(n.mode.indent?o=Ut(e,t).state:i="prev");var l=e.options.tabSize,a=w(n,t),s=me(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var f=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,i="not";else if(i=="smart"&&(h=n.mode.indent(o,a.text.slice(f.length),a.text),h==si||h>150)){if(!r)return;i="prev"}i=="prev"?t>n.first?h=me(w(n,t-1).text,null,l):h=0:i=="add"?h=s+e.options.indentUnit:i=="subtract"?h=s-e.options.indentUnit:typeof i=="number"&&(h=s+i),h=Math.max(0,h);var d="",p=0;if(e.options.indentWithTabs)for(var c=Math.floor(h/l);c;--c)p+=l,d+=" ";if(p<h&&(d+=hi(h-p)),d!=f)return At(n,d,y(t,0),y(t,f.length),"+input"),a.stateAfter=null,!0;for(var v=0;v<n.sel.ranges.length;v++){var g=n.sel.ranges[v];if(g.head.line==t&&g.head.ch<f.length){var m=y(t,f.length);an(n,v,new H(m,m));break}}}u(sr,"indentLine");var Oe=null;function Vr(e){Oe=e}u(Vr,"setLastCopied");function pn(e,t,i,r,n){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var l=+new Date-200,a=n=="paste"||e.state.pasteIncoming>l,s=An(t),f=null;if(a&&r.ranges.length>1)if(Oe&&Oe.text.join(`
13
+ `)==t){if(r.ranges.length%Oe.text.length==0){f=[];for(var h=0;h<Oe.text.length;h++)f.push(o.splitLines(Oe.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=vr(s,function(b){return[b]}));for(var d=e.curOp.updateInput,p=r.ranges.length-1;p>=0;p--){var c=r.ranges[p],v=c.from(),g=c.to();c.empty()&&(i&&i>0?v=y(v.line,v.ch-i):e.state.overwrite&&!a?g=y(g.line,Math.min(w(o,g.line).text.length,g.ch+W(s).length)):a&&Oe&&Oe.lineWise&&Oe.text.join(`
14
+ `)==s.join(`
15
+ `)&&(v=g=y(v.line,0)));var m={from:v,to:g,text:f?f[p%f.length]:s,origin:n||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Dt(e.doc,m),Z(e,"inputRead",e,m)}t&&!a&&wl(e,t),wt(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}u(pn,"applyTextInput");function Sl(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&ue(t,function(){return pn(t,i,0,null,"paste")}),!0}u(Sl,"handlePaste");function wl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var o=e.getModeAt(n.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=sr(e,n.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(w(e.doc,n.head.line).text.slice(0,n.head.ch))&&(l=sr(e,n.head.line,"smart"));l&&Z(e,"electricInput",e,n.head.line)}}}u(wl,"triggerElectric");function Ll(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var n=e.doc.sel.ranges[r].head.line,o={anchor:y(n,0),head:y(n+1,0)};i.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:i}}u(Ll,"copyableRanges");function kl(e,t,i,r){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}u(kl,"disableBrowserMagic");function Tl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return oe?e.style.width="1000px":e.setAttribute("wrap","off"),hr&&(e.style.border="1px solid black"),kl(e),t}u(Tl,"hiddenTextarea");function Gs(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,n){var o=this.options,l=o[r];o[r]==n&&r!="mode"||(o[r]=n,t.hasOwnProperty(r)&&Q(this,t[r])(this,n,l),U(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,n){this.state.keyMaps[n?"push":"unshift"](qr(r))},removeKeyMap:function(r){for(var n=this.state.keyMaps,o=0;o<n.length;++o)if(n[o]==r||n[o].name==r)return n.splice(o,1),!0},addOverlay:ie(function(r,n){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");Bl(this.state.overlays,{mode:o,modeSpec:r,opaque:n&&n.opaque,priority:n&&n.priority||0},function(l){return l.priority}),this.state.modeGen++,ae(this)}),removeOverlay:ie(function(r){for(var n=this.state.overlays,o=0;o<n.length;++o){var l=n[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){n.splice(o,1),this.state.modeGen++,ae(this);return}}}),indentLine:ie(function(r,n,o){typeof n!="string"&&typeof n!="number"&&(n==null?n=this.options.smartIndent?"smart":"prev":n=n?"add":"subtract"),Gt(this.doc,r)&&sr(this,r,n,o)}),indentSelection:ie(function(r){for(var n=this.doc.sel.ranges,o=-1,l=0;l<n.length;l++){var a=n[l];if(a.empty())a.head.line>o&&(sr(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&wt(this));else{var s=a.from(),f=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var d=h;d<o;++d)sr(this,d,r);var p=this.doc.sel.ranges;s.ch==0&&n.length==p.length&&p[l].from().ch>0&&an(this.doc,l,new H(s,p[l].to()),We)}}}),getTokenAt:function(r,n){return Bn(this,r,n)},getLineTokens:function(r,n){return Bn(this,y(r),n,!0)},getTokenTypeAt:function(r){r=A(this.doc,r);var n=Fn(this,w(this.doc,r.line)),o=0,l=(n.length-1)/2,a=r.ch,s;if(a==0)s=n[2];else for(;;){var f=o+l>>1;if((f?n[f*2-1]:0)>=a)l=f;else if(n[f*2+1]<a)o=f+1;else{s=n[f*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(r).state).mode:n},getHelper:function(r,n){return this.getHelpers(r,n)[0]},getHelpers:function(r,n){var o=[];if(!i.hasOwnProperty(n))return o;var l=i[n],a=this.getModeAt(r);if(typeof a[n]=="string")l[a[n]]&&o.push(l[a[n]]);else if(a[n])for(var s=0;s<a[n].length;s++){var f=l[a[n][s]];f&&o.push(f)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var h=0;h<l._global.length;h++){var d=l._global[h];d.pred(a,this)&&ee(o,d.val)==-1&&o.push(d.val)}return o},getStateAfter:function(r,n){var o=this.doc;return r=Hn(o,r==null?o.first+o.size-1:r),Ut(this,r+1,n).state},cursorCoords:function(r,n){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=A(this.doc,r):o=r?l.from():l.to(),Le(this,o,n||"page")},charCoords:function(r,n){return Or(this,A(this.doc,r),n||"page")},coordsChar:function(r,n){return r=ho(this,r,n||"page"),Ii(this,r.left,r.top)},lineAtHeight:function(r,n){return r=ho(this,{top:r,left:0},n||"page").top,tt(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,n,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,l=!0),a=w(this.doc,r)}else a=r;return Ar(this,a,{top:0,left:0},n||"page",o||l).top+(l?this.doc.height-Ee(a):0)},defaultTextHeight:function(){return xt(this.display)},defaultCharWidth:function(){return Ct(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,n,o,l,a){var s=this.display;r=Le(this,A(this.doc,r));var f=r.bottom,h=r.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),s.sizer.appendChild(n),l=="over")f=r.top;else if(l=="above"||l=="near"){var d=Math.max(s.wrapper.clientHeight,this.doc.height),p=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+n.offsetHeight>d)&&r.top>n.offsetHeight?f=r.top-n.offsetHeight:r.bottom+n.offsetHeight<=d&&(f=r.bottom),h+n.offsetWidth>p&&(h=p-n.offsetWidth)}n.style.top=f+"px",n.style.left=n.style.right="",a=="right"?(h=s.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-n.offsetWidth)/2),n.style.left=h+"px"),o&&Ia(this,{left:h,top:f,right:h+n.offsetWidth,bottom:f+n.offsetHeight})},triggerOnKeyDown:ie(dl),triggerOnKeyPress:ie(pl),triggerOnKeyUp:cl,triggerOnMouseDown:ie(gl),execCommand:function(r){if(Zr.hasOwnProperty(r))return Zr[r].call(null,this)},triggerElectric:ie(function(r){wl(this,r)}),findPosH:function(r,n,o,l){var a=1;n<0&&(a=-1,n=-n);for(var s=A(this.doc,r),f=0;f<n&&(s=vn(this.doc,s,a,o,l),!s.hitSide);++f);return s},moveH:ie(function(r,n){var o=this;this.extendSelectionsBy(function(l){return o.display.shift||o.doc.extend||l.empty()?vn(o.doc,l.head,r,n,o.options.rtlMoveVisually):r<0?l.from():l.to()},pr)}),deleteH:ie(function(r,n){var o=this.doc.sel,l=this.doc;o.somethingSelected()?l.replaceSelection("",null,"+delete"):Wt(this,function(a){var s=vn(l,a.head,r,n,!1);return r<0?{from:s,to:a.head}:{from:a.head,to:s}})}),findPosV:function(r,n,o,l){var a=1,s=l;n<0&&(a=-1,n=-n);for(var f=A(this.doc,r),h=0;h<n;++h){var d=Le(this,f,"div");if(s==null?s=d.left:d.left=s,f=Ml(this,d,a,o),f.hitSide)break}return f},moveV:ie(function(r,n){var o=this,l=this.doc,a=[],s=!this.display.shift&&!l.extend&&l.sel.somethingSelected();if(l.extendSelectionsBy(function(h){if(s)return r<0?h.from():h.to();var d=Le(o,h.head,"div");h.goalColumn!=null&&(d.left=h.goalColumn),a.push(d.left);var p=Ml(o,d,r,n);return n=="page"&&h==l.sel.primary()&&qi(o,Or(o,p,"div").top-d.top),p},pr),a.length)for(var f=0;f<l.sel.ranges.length;f++)l.sel.ranges[f].goalColumn=a[f]}),findWordAt:function(r){var n=this.doc,o=w(n,r.line).text,l=r.ch,a=r.ch;if(o){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||a==o.length)&&l?--l:++a;for(var f=o.charAt(l),h=gr(f,s)?function(d){return gr(d,s)}:/\s/.test(f)?function(d){return/\s/.test(d)}:function(d){return!/\s/.test(d)&&!gr(d)};l>0&&h(o.charAt(l-1));)--l;for(;a<o.length&&h(o.charAt(a));)++a}return new H(y(r.line,l),y(r.line,a))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Je(this.display.cursorDiv,"CodeMirror-overwrite"):pt(this.display.cursorDiv,"CodeMirror-overwrite"),U(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ye()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ie(function(r,n){Jt(this,r,n)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-De(this)-this.display.barHeight,width:r.scrollWidth-De(this)-this.display.barWidth,clientHeight:Hi(this),clientWidth:rt(this)}},scrollIntoView:ie(function(r,n){r==null?(r={from:this.doc.sel.primary().head,to:null},n==null&&(n=this.options.cursorScrollMargin)):typeof r=="number"?r={from:y(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=n||0,r.from.line!=null?Ba(this,r):Co(this,r.from,r.to,r.margin)}),setSize:ie(function(r,n){var o=this,l=u(function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s},"interpret");r!=null&&(this.display.wrapper.style.width=l(r)),n!=null&&(this.display.wrapper.style.height=l(n)),this.options.lineWrapping&&so(this);var a=this.display.viewFrom;this.doc.iter(a,this.display.viewTo,function(s){if(s.widgets){for(var f=0;f<s.widgets.length;f++)if(s.widgets[f].noHScroll){Ue(o,a,"widget");break}}++a}),this.curOp.forceUpdate=!0,U(this,"refresh",this)}),operation:function(r){return ue(this,r)},startOperation:function(){return lt(this)},endOperation:function(){return at(this)},refresh:ie(function(){var r=this.display.cachedTextHeight;ae(this),this.curOp.forceUpdate=!0,Zt(this),Jt(this,this.doc.scrollLeft,this.doc.scrollTop),ji(this.display),(r==null||Math.abs(r-xt(this.display))>.5||this.options.lineWrapping)&&Gi(this),U(this,"refresh",this)}),swapDoc:ie(function(r){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),Po(this,r),Zt(this),this.display.input.reset(),Jt(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,Z(this,"swapDoc",this,n),n}),phrase:function(r){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,r)?n[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yt(e),e.registerHelper=function(r,n,o){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][n]=o},e.registerGlobalHelper=function(r,n,o,l){e.registerHelper(r,n,l),i[r]._global.push({pred:o,val:l})}}u(Gs,"addEditorMethods");function vn(e,t,i,r,n){var o=t,l=i,a=w(e,t.line),s=n&&e.direction=="rtl"?-i:i;function f(){var C=t.line+s;return C<e.first||C>=e.first+e.size?!1:(t=new y(C,t.ch,t.sticky),a=w(e,C))}u(f,"findNextLine");function h(C){var x;if(r=="codepoint"){var S=a.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(S))x=null;else{var k=i>0?S>=55296&&S<56320:S>=56320&&S<57343;x=new y(t.line,Math.max(0,Math.min(a.text.length,t.ch+i*(k?2:1))),-i)}}else n?x=ws(e.cm,a,t,i):x=fn(a,t,i);if(x==null)if(!C&&f())t=hn(n,e.cm,a,t.line,s);else return!1;else t=x;return!0}if(u(h,"moveOnce"),r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var d=null,p=r=="group",c=e.cm&&e.cm.getHelper(t,"wordChars"),v=!0;!(i<0&&!h(!v));v=!1){var g=a.text.charAt(t.ch)||`
16
+ `,m=gr(g,c)?"w":p&&g==`
17
+ `?"n":!p||/\s/.test(g)?null:"p";if(p&&!v&&!m&&(m="s"),d&&d!=m){i<0&&(i=1,h(),t.sticky="after");break}if(m&&(d=m),i>0&&!h(!v))break}var b=Gr(e,t,o,l,!0);return Ci(o,b)&&(b.hitSide=!0),b}u(vn,"findPosH");function Ml(e,t,i,r){var n=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(a-.5*xt(e.display),3);l=(i>0?t.bottom:t.top)+i*s}else r=="line"&&(l=i>0?t.bottom+3:t.top-3);for(var f;f=Ii(e,o,l),!!f.outside;){if(i<0?l<=0:l>=n.height){f.hitSide=!0;break}l+=i*5}return f}u(Ml,"findPosV");var E=u(function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ve,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");E.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,kl(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}u(o,"belongsToInput"),M(n,"paste",function(a){!o(a)||q(r,a)||Sl(a,r)||I<=11&&setTimeout(Q(r,function(){return t.updateFromDOM()}),20)}),M(n,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),M(n,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),M(n,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),M(n,"touchstart",function(){return i.forceCompositionEnd()}),M(n,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||q(r,a))){if(r.somethingSelected())Vr({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=Ll(r);Vr({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,We),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var f=Oe.text.join(`
18
+ `);if(a.clipboardData.setData("Text",f),a.clipboardData.getData("Text")==f){a.preventDefault();return}}var h=Tl(),d=h.firstChild;r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),d.value=Oe.text.join(`
19
+ `);var p=ye();cr(d),setTimeout(function(){r.display.lineSpace.removeChild(h),p.focus(),p==n&&i.showPrimarySelection()},50)}}u(l,"onCopyCut"),M(n,"copy",l),M(n,"cut",l)},E.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},E.prototype.prepareSelection=function(){var e=mo(this.cm,!1);return e.focus=ye()==this.div,e},E.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},E.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},E.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line<t.display.viewFrom){e.removeAllRanges();return}var o=$r(t,e.anchorNode,e.anchorOffset),l=$r(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&D(xr(o,l),r)==0&&D(br(o,l),n)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&Dl(t,r)||{node:a[0].measure.map[2],offset:0},f=n.line<t.display.viewTo&&Dl(t,n);if(!f){var h=a[a.length-1].measure,d=h.maps?h.maps[h.maps.length-1]:h.map;f={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(!s||!f){e.removeAllRanges();return}var p=e.rangeCount&&e.getRangeAt(0),c;try{c=gt(s.node,s.offset,f.offset,f.node)}catch{}c&&(!Ce&&t.state.focused?(e.collapse(s.node,s.offset),c.collapsed||(e.removeAllRanges(),e.addRange(c))):(e.removeAllRanges(),e.addRange(c)),p&&e.anchorNode==null?e.addRange(p):Ce&&this.startGracePeriod()),this.rememberSelection()}},E.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},E.prototype.showMultipleSelections=function(e){ve(this.cm.display.cursorDiv,e.cursors),ve(this.cm.display.selectionDiv,e.selection)},E.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},E.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Re(this.div,t)},E.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||ye()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},E.prototype.blur=function(){this.div.blur()},E.prototype.getField=function(){return this.div},E.prototype.supportsTouch=function(){return!0},E.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):ue(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}u(i,"poll"),this.polling.set(this.cm.options.pollInterval,i)},E.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},E.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(oi&&ii&&this.cm.display.gutterSpecs.length&&Us(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=$r(t,e.anchorNode,e.anchorOffset),r=$r(t,e.focusNode,e.focusOffset);i&&r&&ue(t,function(){te(t.doc,Xe(i,r),We),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},E.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),n=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=y(r.line-1,w(e.doc,r.line-1).length)),n.ch==w(e.doc,n.line).text.length&&n.line<e.lastLine()&&(n=y(n.line+1,0)),r.line<t.viewFrom||n.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=nt(e,r.line))==0?(l=P(t.view[0].line),a=t.view[0].node):(l=P(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=nt(e,n.line),f,h;if(s==t.view.length-1?(f=t.viewTo-1,h=t.lineDiv.lastChild):(f=P(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var d=e.doc.splitLines(Ks(e,a,h,l,f)),p=et(e.doc,y(l,0),y(f,w(e.doc,f).text.length));d.length>1&&p.length>1;)if(W(d)==W(p))d.pop(),p.pop(),f--;else if(d[0]==p[0])d.shift(),p.shift(),l++;else break;for(var c=0,v=0,g=d[0],m=p[0],b=Math.min(g.length,m.length);c<b&&g.charCodeAt(c)==m.charCodeAt(c);)++c;for(var C=W(d),x=W(p),S=Math.min(C.length-(d.length==1?c:0),x.length-(p.length==1?c:0));v<S&&C.charCodeAt(C.length-v-1)==x.charCodeAt(x.length-v-1);)++v;if(d.length==1&&p.length==1&&l==r.line)for(;c&&c>r.ch&&C.charCodeAt(C.length-v-1)==x.charCodeAt(x.length-v-1);)c--,v++;d[d.length-1]=C.slice(0,C.length-v).replace(/^\u200b+/,""),d[0]=d[0].slice(c).replace(/\u200b+$/,"");var k=y(l,c),L=y(f,p.length?W(p).length-v:0);if(d.length>1||d[0]||D(k,L))return At(e.doc,d,k,L,"+input"),!0},E.prototype.ensurePolled=function(){this.forceCompositionEnd()},E.prototype.reset=function(){this.forceCompositionEnd()},E.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},E.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},E.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&ue(this.cm,function(){return ae(e.cm)})},E.prototype.setUneditable=function(e){e.contentEditable="false"},E.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Q(this.cm,pn)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},E.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},E.prototype.onContextMenu=function(){},E.prototype.resetPosition=function(){},E.prototype.needsContentAttribute=!0;function Dl(e,t){var i=Pi(e,t.line);if(!i||i.hidden)return null;var r=w(e.doc,t.line),n=no(i,r,t.line),o=He(r,e.doc.direction),l="left";if(o){var a=It(o,t.ch);l=a%2?"right":"left"}var s=lo(n.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}u(Dl,"posToDOM");function Us(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}u(Us,"isInGutter");function Ht(e,t){return t&&(e.bad=!0),e}u(Ht,"badPos");function Ks(e,t,i,r,n){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function f(c){return function(v){return v.id==c}}u(f,"recognizeMarker");function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}u(h,"close");function d(c){c&&(h(),o+=c)}u(d,"addText");function p(c){if(c.nodeType==1){var v=c.getAttribute("cm-text");if(v){d(v);return}var g=c.getAttribute("cm-marker"),m;if(g){var b=e.findMarks(y(r,0),y(n+1,0),f(+g));b.length&&(m=b[0].find(0))&&d(et(e.doc,m.from,m.to).join(a));return}if(c.getAttribute("contenteditable")=="false")return;var C=/^(pre|div|p|li|table|br)$/i.test(c.nodeName);if(!/^br$/i.test(c.nodeName)&&c.textContent.length==0)return;C&&h();for(var x=0;x<c.childNodes.length;x++)p(c.childNodes[x]);/^(pre|p)$/i.test(c.nodeName)&&(s=!0),C&&(l=!0)}else c.nodeType==3&&d(c.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(u(p,"walk");p(t),t!=i;)t=t.nextSibling,s=!1;return o}u(Ks,"domTextBetween");function $r(e,t,i){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[i],!r)return Ht(e.clipPos(y(e.display.viewTo-1)),!0);t=null,i=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var n=0;n<e.display.view.length;n++){var o=e.display.view[n];if(o.node==r)return _s(o,t,i)}}u($r,"domToPos");function _s(e,t,i){var r=e.text.firstChild,n=!1;if(!t||!Re(r,t))return Ht(y(P(e.line),0),!0);if(t==r&&(n=!0,t=r.childNodes[i],i=0,!t)){var o=e.rest?W(e.rest):e.line;return Ht(y(P(o),o.text.length),n)}var l=t.nodeType==3?t:null,a=t;for(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(l=t.firstChild,i&&(i=l.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var s=e.measure,f=s.maps;function h(m,b,C){for(var x=-1;x<(f?f.length:0);x++)for(var S=x<0?s.map:f[x],k=0;k<S.length;k+=3){var L=S[k+2];if(L==m||L==b){var O=P(x<0?e.line:e.rest[x]),F=S[k]+C;return(C<0||L!=m)&&(F=S[k+(C?1:0)]),y(O,F)}}}u(h,"find");var d=h(l,a,i);if(d)return Ht(d,n);for(var p=a.nextSibling,c=l?l.nodeValue.length-i:0;p;p=p.nextSibling){if(d=h(p,p.firstChild,0),d)return Ht(y(d.line,d.ch-c),n);c+=p.textContent.length}for(var v=a.previousSibling,g=i;v;v=v.previousSibling){if(d=h(v,v.firstChild,-1),d)return Ht(y(d.line,d.ch+g),n);g+=v.textContent.length}}u(_s,"locateNodeInLineView");var K=u(function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ve,this.hasSelection=!1,this.composing=null},"TextareaInput");K.prototype.init=function(e){var t=this,i=this,r=this.cm;this.createField(e);var n=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),hr&&(n.style.width="0px"),M(n,"input",function(){N&&I>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),M(n,"paste",function(l){q(r,l)||Sl(l,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function o(l){if(!q(r,l)){if(r.somethingSelected())Vr({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=Ll(r);Vr({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,We):(i.prevInput="",n.value=a.text.join(`
20
+ `),cr(n))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}u(o,"prepareCopyCut"),M(n,"cut",o),M(n,"copy",o),M(e.scroller,"paste",function(l){if(!(Fe(e,l)||q(r,l))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,n.dispatchEvent(a)}}),M(e.lineSpace,"selectstart",function(l){Fe(e,l)||le(l)}),M(n,"compositionstart",function(){var l=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),M(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},K.prototype.createField=function(e){this.wrapper=Tl(),this.textarea=this.wrapper.firstChild},K.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},K.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=mo(e);if(e.options.moveInputWithCursor){var n=Le(e,i.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+l.left-o.left))}return r},K.prototype.showSelection=function(e){var t=this.cm,i=t.display;ve(i.cursorDiv,e.cursors),ve(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},K.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&cr(this.textarea),N&&I>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",N&&I>=9&&(this.hasSelection=null))}},K.prototype.getField=function(){return this.textarea},K.prototype.supportsTouch=function(){return!1},K.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!dr||ye()!=this.textarea))try{this.textarea.focus()}catch{}},K.prototype.blur=function(){this.textarea.blur()},K.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},K.prototype.receivedFocus=function(){this.slowPoll()},K.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},K.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}u(i,"p"),t.polling.set(20,i)},K.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||ou(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(N&&I>=9&&this.hasSelection===n||Se&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=n.charCodeAt(0);if(o==8203&&!r&&(r="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,n.length);l<a&&r.charCodeAt(l)==n.charCodeAt(l);)++l;return ue(t,function(){pn(t,n.slice(l),r.length-l,null,e.composing?"*compose":null),n.length>1e3||n.indexOf(`
21
+ `)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},K.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},K.prototype.onKeyPress=function(){N&&I>=9&&(this.hasSelection=null),this.fastPoll()},K.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=it(i,e),l=r.scroller.scrollTop;if(!o||Te)return;var a=i.options.resetSelectionOnContextMenu;a&&i.doc.sel.contains(o)==-1&&Q(i,te)(i.doc,Xe(o),We);var s=n.style.cssText,f=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px;
22
+ top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
23
+ z-index: 1000; background: `+(N?"rgba(255, 255, 255, .05)":"transparent")+`;
24
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var d;oe&&(d=window.scrollY),r.input.focus(),oe&&window.scrollTo(null,d),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=c,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function p(){if(n.selectionStart!=null){var g=i.somethingSelected(),m="\u200B"+(g?n.value:"");n.value="\u21DA",n.value=m,t.prevInput=g?"":"\u200B",n.selectionStart=1,n.selectionEnd=m.length,r.selForContextMenu=i.doc.sel}}u(p,"prepareSelectAllHack");function c(){if(t.contextMenuPending==c&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,n.style.cssText=s,N&&I<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),n.selectionStart!=null)){(!N||N&&I<9)&&p();var g=0,m=u(function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="\u200B"?Q(i,qo)(i):g++<10?r.detectingSelectAll=setTimeout(m,500):(r.selForContextMenu=null,r.input.reset())},"poll");r.detectingSelectAll=setTimeout(m,200)}}if(u(c,"rehide"),N&&I>=9&&p(),mn){Bt(e);var v=u(function(){ge(window,"mouseup",v),setTimeout(c,20)},"mouseup");M(window,"mouseup",v)}else setTimeout(c,50)},K.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},K.prototype.setUneditable=function(){},K.prototype.needsContentAttribute=!1;function Xs(e,t){if(t=t?je(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=ye();t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=a.getValue()}u(r,"save");var n;if(e.form&&(M(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;n=o.submit;try{var l=o.submit=function(){r(),o.submit=n,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var a=B(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}u(Xs,"fromTextArea");function Ys(e){e.off=ge,e.on=M,e.wheelEventPixels=Va,e.Doc=fe,e.splitLines=An,e.countColumn=me,e.findColumn=ui,e.isWordChar=di,e.Pass=si,e.signal=U,e.Line=_t,e.changeEnd=Ye,e.scrollbarModel=Ra,e.Pos=y,e.cmpPos=D,e.modes=Nn,e.mimeModes=Rt,e.resolveMode=mr,e.getMode=yi,e.modeExtensions=zt,e.extendMode=Yl,e.copyState=$e,e.startState=Wn,e.innerMode=mi,e.commands=Zr,e.keyMap=Ze,e.keyName=ll,e.isModifierKey=nl,e.lookupKey=Nt,e.normalizeKeyMap=Ss,e.StringStream=_,e.SharedTextMarker=_r,e.TextMarker=st,e.LineWidget=Kr,e.e_preventDefault=le,e.e_stopPropagation=kn,e.e_stop=Bt,e.addClass=Je,e.contains=Re,e.rmClass=pt,e.keyNames=ut}u(Ys,"addLegacyProps"),Is(B),Gs(B);var cu="iter insert remove copy getEditor constructor".split(" ");for(var gn in fe.prototype)fe.prototype.hasOwnProperty(gn)&&ee(cu,gn)<0&&(B.prototype[gn]=function(e){return function(){return e.apply(this.doc,arguments)}}(fe.prototype[gn]));return yt(fe),B.inputStyles={textarea:K,contenteditable:E},B.defineMode=function(e){!B.defaults.mode&&e!="null"&&(B.defaults.mode=e),_l.apply(this,arguments)},B.defineMIME=Xl,B.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),B.defineMIME("text/plain","null"),B.defineExtension=function(e,t){B.prototype[e]=t},B.defineDocExtension=function(e,t){fe.prototype[e]=t},B.fromTextArea=Xs,Ys(B),B.version="5.65.3",B})})(ei);var Hl=ei.exports,Qs=Object.freeze(Wl({__proto__:null,[Symbol.toStringTag]:"Module",default:Hl},[ei.exports]))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_platformos_gui=self.webpackChunk_platformos_gui||[]).push([[481],{7481:($,N,O)=>{O.r(N),O.d(N,{l:()=>V});var R=O(7480),z=Object.defineProperty,s=(g,v)=>z(g,"name",{value:v,configurable:!0});function w(g,v){return v.forEach(function(l){l&&typeof l!="string"&&!Array.isArray(l)&&Object.keys(l).forEach(function(f){if(f!=="default"&&!(f in g)){var c=Object.getOwnPropertyDescriptor(l,f);Object.defineProperty(g,f,c.get?c:{enumerable:!0,get:function(){return l[f]}})}})}),Object.freeze(g)}s(w,"_mergeNamespaces");var x={exports:{}};(function(g,v){(function(l){l(R.a.exports)})(function(l){var f="CodeMirror-lint-markers",c="CodeMirror-lint-line-";function A(t,e,o){var n=document.createElement("div");n.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,n.appendChild(o.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(n):document.body.appendChild(n);function r(i){if(!n.parentNode)return l.off(document,"mousemove",r);n.style.top=Math.max(0,i.clientY-n.offsetHeight-5)+"px",n.style.left=i.clientX+5+"px"}return s(r,"position"),l.on(document,"mousemove",r),r(e),n.style.opacity!=null&&(n.style.opacity=1),n}s(A,"showTooltip");function T(t){t.parentNode&&t.parentNode.removeChild(t)}s(T,"rm");function F(t){t.parentNode&&(t.style.opacity==null&&T(t),t.style.opacity=0,setTimeout(function(){T(t)},600))}s(F,"hideTooltip");function L(t,e,o,n){var r=A(t,e,o);function i(){l.off(n,"mouseout",i),r&&(F(r),r=null)}s(i,"hide");var a=setInterval(function(){if(r)for(var u=n;;u=u.parentNode){if(u&&u.nodeType==11&&(u=u.host),u==document.body)return;if(!u){i();break}}if(!r)return clearInterval(a)},400);l.on(n,"mouseout",i)}s(L,"showTooltipFor");function I(t,e,o){this.marked=[],e instanceof Function&&(e={getAnnotations:e}),(!e||e===!0)&&(e={}),this.options={},this.linterOptions=e.options||{};for(var n in k)this.options[n]=k[n];for(var n in e)k.hasOwnProperty(n)?e[n]!=null&&(this.options[n]=e[n]):e.options||(this.linterOptions[n]=e[n]);this.timeout=null,this.hasGutter=o,this.onMouseOver=function(r){B(t,r)},this.waitingFor=0}s(I,"LintState");var k={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function M(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(f),e.options.highlightLines&&P(t);for(var o=0;o<e.marked.length;++o)e.marked[o].clear();e.marked.length=0}s(M,"clearMarks");function P(t){t.eachLine(function(e){var o=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);o&&t.removeLineClass(e,"wrap",o[0])})}s(P,"clearErrorLines");function j(t,e,o,n,r){var i=document.createElement("div"),a=i;return i.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+o,n&&(a=i.appendChild(document.createElement("div")),a.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),r!=!1&&l.on(a,"mouseover",function(u){L(t,u,e,a)}),i}s(j,"makeMarker");function D(t,e){return t=="error"?t:e}s(D,"getMaxSeverity");function G(t){for(var e=[],o=0;o<t.length;++o){var n=t[o],r=n.from.line;(e[r]||(e[r]=[])).push(n)}return e}s(G,"groupByLine");function _(t){var e=t.severity;e||(e="error");var o=document.createElement("div");return o.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,typeof t.messageHTML<"u"?o.innerHTML=t.messageHTML:o.appendChild(document.createTextNode(t.message)),o}s(_,"annotationTooltip");function H(t,e){var o=t.state.lint,n=++o.waitingFor;function r(){n=-1,t.off("change",r)}s(r,"abort"),t.on("change",r),e(t.getValue(),function(i,a){t.off("change",r),o.waitingFor==n&&(a&&i instanceof l&&(i=a),t.operation(function(){y(t,i)}))},o.linterOptions,t)}s(H,"lintAsync");function m(t){var e=t.state.lint;if(e){var o=e.options,n=o.getAnnotations||t.getHelper(l.Pos(0,0),"lint");if(n)if(o.async||n.async)H(t,n);else{var r=n(t.getValue(),e.linterOptions,t);if(!r)return;r.then?r.then(function(i){t.operation(function(){y(t,i)})}):t.operation(function(){y(t,r)})}}}s(m,"startLinting");function y(t,e){var o=t.state.lint;if(o){var n=o.options;M(t);for(var r=G(e),i=0;i<r.length;++i){var a=r[i];if(a){var u=[];a=a.filter(function(W){return u.indexOf(W.message)>-1?!1:u.push(W.message)});for(var p=null,d=o.hasGutter&&document.createDocumentFragment(),b=0;b<a.length;++b){var h=a[b],C=h.severity;C||(C="error"),p=D(p,C),n.formatAnnotation&&(h=n.formatAnnotation(h)),o.hasGutter&&d.appendChild(_(h)),h.to&&o.marked.push(t.markText(h.from,h.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+C,__annotation:h}))}o.hasGutter&&t.setGutterMarker(i,f,j(t,d,p,r[i].length>1,n.tooltips)),n.highlightLines&&t.addLineClass(i,"wrap",c+p)}}n.onUpdateLinting&&n.onUpdateLinting(e,r,t)}}s(y,"updateLinting");function E(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){m(t)},e.options.delay))}s(E,"onChange");function U(t,e,o){for(var n=o.target||o.srcElement,r=document.createDocumentFragment(),i=0;i<e.length;i++){var a=e[i];r.appendChild(_(a))}L(t,o,r,n)}s(U,"popupTooltips");function B(t,e){var o=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(o.className)){for(var n=o.getBoundingClientRect(),r=(n.left+n.right)/2,i=(n.top+n.bottom)/2,a=t.findMarksAt(t.coordsChar({left:r,top:i},"client")),u=[],p=0;p<a.length;++p){var d=a[p].__annotation;d&&u.push(d)}u.length&&U(t,u,e)}}s(B,"onMouseOver"),l.defineOption("lint",!1,function(t,e,o){if(o&&o!=l.Init&&(M(t),t.state.lint.options.lintOnChange!==!1&&t.off("change",E),l.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),e){for(var n=t.getOption("gutters"),r=!1,i=0;i<n.length;++i)n[i]==f&&(r=!0);var a=t.state.lint=new I(t,e,r);a.options.lintOnChange&&t.on("change",E),a.options.tooltips!=!1&&a.options.tooltips!="gutter"&&l.on(t.getWrapperElement(),"mouseover",a.onMouseOver),m(t)}}),l.defineExtension("performLint",function(){m(this)})})})();var S=x.exports,V=Object.freeze(w({__proto__:null,[Symbol.toStringTag]:"Module",default:S},[x.exports]))}}]);