@nqlib/nqui 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (630) hide show
  1. package/README.md +40 -2
  2. package/dist/abap-DV7Q1lGP.cjs +1 -0
  3. package/dist/abap-Y8Dl9g_6.js +6 -0
  4. package/dist/actionscript-3-DXOxkRa2.cjs +1 -0
  5. package/dist/actionscript-3-DZzbMeqX.js +6 -0
  6. package/dist/ada-D46EKCNf.cjs +1 -0
  7. package/dist/ada-vP6ak0IW.js +6 -0
  8. package/dist/andromeeda-BIpZ7gaU.js +4 -0
  9. package/dist/andromeeda-DVDxRwp5.cjs +1 -0
  10. package/dist/angular-html-DPB4Rf0C.js +32 -0
  11. package/dist/angular-html-KMf2QdtP.cjs +1 -0
  12. package/dist/angular-ts-BxIbo3R1.cjs +1 -0
  13. package/dist/angular-ts-CTOR2ofC.js +21 -0
  14. package/dist/apache-BUjz-sD2.js +6 -0
  15. package/dist/apache-DL1xuH1f.cjs +1 -0
  16. package/dist/apex-6AM9YZbQ.cjs +1 -0
  17. package/dist/apex-OyTfjCYK.js +6 -0
  18. package/dist/apl-CjNiDgad.js +16 -0
  19. package/dist/apl-Dj2G2M9w.cjs +1 -0
  20. package/dist/applescript-BPx7YFFu.js +6 -0
  21. package/dist/applescript-COilsSrZ.cjs +1 -0
  22. package/dist/ara-B6Lpq1YJ.cjs +1 -0
  23. package/dist/ara-Z2fSOxSw.js +6 -0
  24. package/dist/asciidoc-B-pCoB3G.js +6 -0
  25. package/dist/asciidoc-DcKqW72n.cjs +1 -0
  26. package/dist/asm-BTWLY5ym.js +6 -0
  27. package/dist/asm-DYMFy-sD.cjs +1 -0
  28. package/dist/astro-CFFExE8Q.js +18 -0
  29. package/dist/astro-DAOP_Xq6.cjs +1 -0
  30. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  31. package/dist/aurora-x-C5IpmIOG.cjs +1 -0
  32. package/dist/awk-Fb0P9dkn.js +6 -0
  33. package/dist/awk-IEszImW6.cjs +1 -0
  34. package/dist/ayu-dark-CDpQIJw4.cjs +1 -0
  35. package/dist/ayu-dark-DG7aLdHp.js +4 -0
  36. package/dist/ballerina-Dr6dU4hP.cjs +1 -0
  37. package/dist/ballerina-oZK-YekG.js +6 -0
  38. package/dist/base-80a1f760-D0C4rGX6.js +23 -0
  39. package/dist/base-80a1f760-DjCXSyeI.cjs +1 -0
  40. package/dist/bat-0FvbqU9S.js +6 -0
  41. package/dist/bat-DGkUhhn2.cjs +1 -0
  42. package/dist/beancount-Bv1Sweoy.cjs +1 -0
  43. package/dist/beancount-DqJEb89h.js +6 -0
  44. package/dist/berry-DEMs4LK_.cjs +1 -0
  45. package/dist/berry-DODBq_Ff.js +6 -0
  46. package/dist/bibtex-BgA36Z3k.cjs +1 -0
  47. package/dist/bibtex-EULQRLY5.js +6 -0
  48. package/dist/bicep-BorU73w0.js +6 -0
  49. package/dist/bicep-DL0zb-7W.cjs +1 -0
  50. package/dist/blade-D0HyNvCw.js +20 -0
  51. package/dist/blade-DEjek0u9.cjs +1 -0
  52. package/dist/bsl-9bVgFeM9.cjs +1 -0
  53. package/dist/bsl-NkNNwerW.js +8 -0
  54. package/dist/c-CtlmKnPF.cjs +1 -0
  55. package/dist/c-eeMepfLm.js +6 -0
  56. package/dist/c3-Bt581sCe.js +6 -0
  57. package/dist/c3-DtfRRWXN.cjs +1 -0
  58. package/dist/cadence-02UX7mW8.js +6 -0
  59. package/dist/cadence-DcbmM5v3.cjs +1 -0
  60. package/dist/cairo-DM6WF2e3.js +8 -0
  61. package/dist/cairo-li7sQsxU.cjs +1 -0
  62. package/dist/catppuccin-frappe-Bn4lgmUk.cjs +1 -0
  63. package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
  64. package/dist/catppuccin-latte-BPtsb8jD.cjs +1 -0
  65. package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
  66. package/dist/catppuccin-macchiato-BLfpQWhT.cjs +1 -0
  67. package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
  68. package/dist/catppuccin-mocha-COMta283.cjs +1 -0
  69. package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
  70. package/dist/clarity-PKm5CwqM.js +6 -0
  71. package/dist/clarity-gPuvqtpF.cjs +1 -0
  72. package/dist/clojure-CXJfHrL3.js +6 -0
  73. package/dist/clojure-OUsr1SUl.cjs +1 -0
  74. package/dist/cmake-BJz8BOTU.js +6 -0
  75. package/dist/cmake-jM6P58qY.cjs +1 -0
  76. package/dist/cobol-CcrsCSUZ.cjs +1 -0
  77. package/dist/cobol-HihOMwht.js +10 -0
  78. package/dist/codeowners-Bt9yU6NX.js +6 -0
  79. package/dist/codeowners-QhPK6lIJ.cjs +1 -0
  80. package/dist/codeql-D9-TdUN8.cjs +1 -0
  81. package/dist/codeql-DHkodjjI.js +6 -0
  82. package/dist/coffee-DGBR_nr_.js +8 -0
  83. package/dist/coffee-DycxIFwY.cjs +1 -0
  84. package/dist/common-lisp-C77gR-8i.cjs +1 -0
  85. package/dist/common-lisp-EVqT9Zhp.js +6 -0
  86. package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
  87. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  88. package/dist/components/ui/shadcn-io/code-block/index.d.ts +67 -0
  89. package/dist/components/ui/shadcn-io/code-block/index.d.ts.map +1 -0
  90. package/dist/components/ui/shadcn-io/code-block/server.d.ts +10 -0
  91. package/dist/components/ui/shadcn-io/code-block/server.d.ts.map +1 -0
  92. package/dist/components/ui/shadcn-io/code-editor/index.d.ts +35 -0
  93. package/dist/components/ui/shadcn-io/code-editor/index.d.ts.map +1 -0
  94. package/dist/components/ui/shadcn-io/sandbox/index.d.ts +38 -0
  95. package/dist/components/ui/shadcn-io/sandbox/index.d.ts.map +1 -0
  96. package/dist/components/ui/shadcn-io/snippet/index.d.ts +21 -0
  97. package/dist/components/ui/shadcn-io/snippet/index.d.ts.map +1 -0
  98. package/dist/consoleHook-59e792cb-Bn_kYimG.js +168 -0
  99. package/dist/consoleHook-59e792cb-Bo5H9MpE.cjs +2 -0
  100. package/dist/coq-B0L9upzn.js +6 -0
  101. package/dist/coq-vlPdR5hP.cjs +1 -0
  102. package/dist/cpp-Cj177cuW.js +18 -0
  103. package/dist/cpp-DvI2Eoso.cjs +1 -0
  104. package/dist/crystal-B_WXhL2O.cjs +1 -0
  105. package/dist/crystal-CRJyc4G-.js +18 -0
  106. package/dist/csharp-BUkAIRXW.cjs +1 -0
  107. package/dist/csharp-C7yUs7-w.js +6 -0
  108. package/dist/css-CECN5uSL.js +6 -0
  109. package/dist/css-Do0mp2lm.cjs +1 -0
  110. package/dist/csv-CmYOceLb.js +6 -0
  111. package/dist/csv-DiEdJzSJ.cjs +1 -0
  112. package/dist/cue-D1vJRJEx.cjs +1 -0
  113. package/dist/cue-ZzumE7IT.js +6 -0
  114. package/dist/cypher-atSM3NsM.cjs +1 -0
  115. package/dist/cypher-jpdmjtA6.js +6 -0
  116. package/dist/d-2qe3NhmZ.cjs +1 -0
  117. package/dist/d-CBagWSwH.js +6 -0
  118. package/dist/dark-plus-Cd5emcYO.cjs +1 -0
  119. package/dist/dark-plus-pUHDTVV0.js +4 -0
  120. package/dist/dart-6ObCrKr9.js +6 -0
  121. package/dist/dart-Ds0_0fwe.cjs +1 -0
  122. package/dist/dax-CcDT-8dH.js +6 -0
  123. package/dist/dax-DbkQa40E.cjs +1 -0
  124. package/dist/desktop-B93p9R9O.js +6 -0
  125. package/dist/desktop-tn3MFXCZ.cjs +1 -0
  126. package/dist/diff-BxzP2J8R.js +6 -0
  127. package/dist/diff-CA31fCOg.cjs +1 -0
  128. package/dist/docker-CsHqm9tx.js +6 -0
  129. package/dist/docker-zJpMwmYa.cjs +1 -0
  130. package/dist/dotenv-BMjVjUL1.js +6 -0
  131. package/dist/dotenv-DpcNCNek.cjs +1 -0
  132. package/dist/dracula-BNgwAJ-d.cjs +1 -0
  133. package/dist/dracula-BtZx2Kac.js +4 -0
  134. package/dist/dracula-soft-BHZ7sHFu.cjs +1 -0
  135. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  136. package/dist/dream-maker-BkijXDkm.cjs +1 -0
  137. package/dist/dream-maker-PAx17jaB.js +6 -0
  138. package/dist/edge-BYQkOzbF.js +12 -0
  139. package/dist/edge-DaIYN5Mx.cjs +1 -0
  140. package/dist/elixir-BH_wmMK4.cjs +1 -0
  141. package/dist/elixir-Dh036GMp.js +8 -0
  142. package/dist/elm-BtNbw_Cd.js +8 -0
  143. package/dist/elm-Dc4sEBjc.cjs +1 -0
  144. package/dist/emacs-lisp-C1UCIjUO.cjs +1 -0
  145. package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
  146. package/dist/erb-BqFQADjR.cjs +1 -0
  147. package/dist/erb-CS4zioBv.js +10 -0
  148. package/dist/erlang-CB2cfp6Z.cjs +1 -0
  149. package/dist/erlang-DNcDT8Hi.js +8 -0
  150. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  151. package/dist/everforest-dark-_sBMomR1.cjs +1 -0
  152. package/dist/everforest-light-BbXl82Em.js +4 -0
  153. package/dist/everforest-light-H0xoYxl0.cjs +1 -0
  154. package/dist/fennel-Bz9-EMMc.cjs +1 -0
  155. package/dist/fennel-N4WcXuKx.js +6 -0
  156. package/dist/fish-BTDEUgqH.js +6 -0
  157. package/dist/fish-DwmQKRZi.cjs +1 -0
  158. package/dist/fluent-BMXUxfv1.js +6 -0
  159. package/dist/fluent-CJtpNuaO.cjs +1 -0
  160. package/dist/fortran-fixed-form-B67KFkXH.js +8 -0
  161. package/dist/fortran-fixed-form-CcXh5Xzk.cjs +1 -0
  162. package/dist/fortran-free-form-Cs4ztolN.cjs +1 -0
  163. package/dist/fortran-free-form-CwqYvCLJ.js +6 -0
  164. package/dist/fsharp-CYOiIVNx.js +8 -0
  165. package/dist/fsharp-DVcRF7k-.cjs +1 -0
  166. package/dist/gdresource-BwtMIoBm.js +10 -0
  167. package/dist/gdresource-CcLusmd_.cjs +1 -0
  168. package/dist/gdscript-BifyeYhI.js +6 -0
  169. package/dist/gdscript-DSegQKMB.cjs +1 -0
  170. package/dist/gdshader-Bk8fF6yr.js +6 -0
  171. package/dist/gdshader-DsmqQl4t.cjs +1 -0
  172. package/dist/genie-Dy2rU8CF.cjs +1 -0
  173. package/dist/genie-DzUvd7U9.js +6 -0
  174. package/dist/gherkin-BmiEVBJ1.cjs +1 -0
  175. package/dist/gherkin-DHRaV0YP.js +6 -0
  176. package/dist/git-commit-Bd32YZ0K.js +8 -0
  177. package/dist/git-commit-DlVDzq9L.cjs +1 -0
  178. package/dist/git-rebase-Bn4RLd7u.cjs +1 -0
  179. package/dist/git-rebase-ZWUFO_T4.js +8 -0
  180. package/dist/github-dark-BKL9xNgN.cjs +1 -0
  181. package/dist/github-dark-DenFmJkN.js +4 -0
  182. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  183. package/dist/github-dark-default-Dsv5MuSi.cjs +1 -0
  184. package/dist/github-dark-dimmed-CtB9hz8U.cjs +1 -0
  185. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  186. package/dist/github-dark-high-contrast-BqZVM-jF.cjs +1 -0
  187. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  188. package/dist/github-light-BFTOhCbz.cjs +1 -0
  189. package/dist/github-light-JYsPkUQd.js +4 -0
  190. package/dist/github-light-default-BZoWH9dH.cjs +1 -0
  191. package/dist/github-light-default-D99KPAby.js +4 -0
  192. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  193. package/dist/github-light-high-contrast-Ks3kPGJU.cjs +1 -0
  194. package/dist/gleam-Bv284lvN.js +6 -0
  195. package/dist/gleam-DHVuTCr7.cjs +1 -0
  196. package/dist/glimmer-js-CzmC7OX8.cjs +1 -0
  197. package/dist/glimmer-js-DkxNrfPT.js +14 -0
  198. package/dist/glimmer-ts-D6YZEmK_.js +14 -0
  199. package/dist/glimmer-ts-DLN2_wRt.cjs +1 -0
  200. package/dist/glsl-CQekZ3Zq.cjs +1 -0
  201. package/dist/glsl-CkUcVZNK.js +8 -0
  202. package/dist/gn-0WGnAyGi.cjs +1 -0
  203. package/dist/gn-XtJxiLa4.js +6 -0
  204. package/dist/gnuplot-CDPKvI9X.cjs +1 -0
  205. package/dist/gnuplot-yPG9-sE_.js +6 -0
  206. package/dist/go-ChxJuLYK.js +6 -0
  207. package/dist/go-epHseFUa.cjs +1 -0
  208. package/dist/graphql-BnP1YhXQ.cjs +1 -0
  209. package/dist/graphql-CBu2ehBn.js +14 -0
  210. package/dist/groovy-CJQTphOW.js +6 -0
  211. package/dist/groovy-D7VuDBXz.cjs +1 -0
  212. package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
  213. package/dist/gruvbox-dark-hard-CUGefKS6.cjs +1 -0
  214. package/dist/gruvbox-dark-medium-BoKPlKfz.cjs +1 -0
  215. package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
  216. package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
  217. package/dist/gruvbox-dark-soft-DSrhOWeL.cjs +1 -0
  218. package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
  219. package/dist/gruvbox-light-hard-De4IuseP.cjs +1 -0
  220. package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
  221. package/dist/gruvbox-light-medium-CzMY3IEJ.cjs +1 -0
  222. package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
  223. package/dist/gruvbox-light-soft-U4iAIpWZ.cjs +1 -0
  224. package/dist/hack-BaDv2o40.cjs +1 -0
  225. package/dist/hack-ItRNKiEb.js +10 -0
  226. package/dist/haml-Bk21rGjP.cjs +1 -0
  227. package/dist/haml-NZLVzu_R.js +10 -0
  228. package/dist/handlebars-CJJi3lrU.cjs +1 -0
  229. package/dist/handlebars-mxStpSE7.js +14 -0
  230. package/dist/haskell-BShesV2P.cjs +1 -0
  231. package/dist/haskell-WeIwNIP6.js +6 -0
  232. package/dist/haxe-Bo5XuRS0.cjs +1 -0
  233. package/dist/haxe-TztHsm5T.js +6 -0
  234. package/dist/hcl-CrZnvm-1.cjs +1 -0
  235. package/dist/hcl-D438OF-I.js +6 -0
  236. package/dist/hjson-CEESwTUP.cjs +1 -0
  237. package/dist/hjson-DYBUbqOl.js +6 -0
  238. package/dist/hlsl-Bk8TCZNL.js +6 -0
  239. package/dist/hlsl-CyvYRIb9.cjs +1 -0
  240. package/dist/houston-BDYrDoDW.js +4 -0
  241. package/dist/houston-T57H3gQZ.cjs +1 -0
  242. package/dist/html-B50bmoVb.js +10 -0
  243. package/dist/html-C62Zf2h4.cjs +1 -0
  244. package/dist/html-derivative-C6bxFbFW.js +8 -0
  245. package/dist/html-derivative-NDb86jON.cjs +1 -0
  246. package/dist/http-BPlLI56k.cjs +1 -0
  247. package/dist/http-DLvAkeD-.js +14 -0
  248. package/dist/hurl-BQGBr8gH.cjs +1 -0
  249. package/dist/hurl-CgkFN90t.js +12 -0
  250. package/dist/hxml-GbqSQCLa.js +8 -0
  251. package/dist/hxml-vnw7fzrV.cjs +1 -0
  252. package/dist/hy-Brt5EZ7-.js +6 -0
  253. package/dist/hy-a1E2Ed6P.cjs +1 -0
  254. package/dist/imba-CR1Q6r17.cjs +1 -0
  255. package/dist/imba-CimUv-Uh.js +6 -0
  256. package/dist/index-599aeaf7-D4wnsI9S.js +8813 -0
  257. package/dist/index-599aeaf7-DrU1PSR6.cjs +16 -0
  258. package/dist/index-BXIRKklr.js +1088 -0
  259. package/dist/index-BfXl0N5c.cjs +1 -0
  260. package/dist/index-Bh54my7Z.cjs +1 -0
  261. package/dist/index-Blaj1BKg.cjs +4 -0
  262. package/dist/index-DC77eP71.js +68816 -0
  263. package/dist/index-DXsoJSDt.cjs +1253 -0
  264. package/dist/index-Dk2p9rpx.js +2952 -0
  265. package/dist/index-y0wancIw.js +44 -0
  266. package/dist/index.d.ts +12 -2
  267. package/dist/index.d.ts.map +1 -1
  268. package/dist/ini-BZIuRIvJ.js +6 -0
  269. package/dist/ini-Dpu3Xy2p.cjs +1 -0
  270. package/dist/java--6gf61wy.cjs +1 -0
  271. package/dist/java-DY6VlHhP.js +6 -0
  272. package/dist/javascript-C25yR2R2.js +6 -0
  273. package/dist/javascript-DgmXW4Ha.cjs +1 -0
  274. package/dist/jinja-6NmewwV8.cjs +1 -0
  275. package/dist/jinja-CFW5uAwY.js +11 -0
  276. package/dist/jison-CD9Qsaj0.cjs +1 -0
  277. package/dist/jison-DdreslRX.js +8 -0
  278. package/dist/json-DxJze_jm.js +6 -0
  279. package/dist/json-YkPizm35.cjs +1 -0
  280. package/dist/json5-BT4Fjg39.js +6 -0
  281. package/dist/json5-CCgFZiQn.cjs +1 -0
  282. package/dist/jsonc-CHjZD8gR.js +6 -0
  283. package/dist/jsonc-CKPHIcXW.cjs +1 -0
  284. package/dist/jsonl-BGuvDmy9.js +6 -0
  285. package/dist/jsonl-Dq56Hab-.cjs +1 -0
  286. package/dist/jsonnet-Bx2cfsXg.js +6 -0
  287. package/dist/jsonnet-Csh7E68F.cjs +1 -0
  288. package/dist/jssm-BcADi6EI.js +6 -0
  289. package/dist/jssm-D0M9iZPY.cjs +1 -0
  290. package/dist/jsx-BtKADgXT.js +6 -0
  291. package/dist/jsx-DLX6UGgg.cjs +1 -0
  292. package/dist/julia-1BTSV8k5.cjs +1 -0
  293. package/dist/julia-CZiKXNNP.js +16 -0
  294. package/dist/kanagawa-dragon-BJZF7xDr.cjs +1 -0
  295. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  296. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  297. package/dist/kanagawa-lotus-BhgzmRV4.cjs +1 -0
  298. package/dist/kanagawa-wave-BgJip59C.cjs +1 -0
  299. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  300. package/dist/kdl-BNOv9TC3.js +6 -0
  301. package/dist/kdl-CDG1p2Qi.cjs +1 -0
  302. package/dist/kotlin-BHZjvNqT.cjs +1 -0
  303. package/dist/kotlin-ByBMgTeR.js +6 -0
  304. package/dist/kusto-C6kOQWT0.cjs +1 -0
  305. package/dist/kusto-DH_XitHS.js +6 -0
  306. package/dist/laserwave--izBLY1I.cjs +1 -0
  307. package/dist/laserwave-6a00oqik.js +4 -0
  308. package/dist/latex-BH0OjEyf.cjs +1 -0
  309. package/dist/latex-DLWszopg.js +8 -0
  310. package/dist/lean-BnVxaZxY.js +6 -0
  311. package/dist/lean-DvVQmxVK.cjs +1 -0
  312. package/dist/less-B1GLI2Di.js +6 -0
  313. package/dist/less-Dtg8mm6P.cjs +1 -0
  314. package/dist/light-plus-B5D0le0o.cjs +1 -0
  315. package/dist/light-plus-CZuVqSLX.js +4 -0
  316. package/dist/liquid-CHzkx3jT.js +14 -0
  317. package/dist/liquid-DjlCV7Vm.cjs +1 -0
  318. package/dist/llvm-DcRvQ_r8.cjs +1 -0
  319. package/dist/llvm-co1rIKs3.js +6 -0
  320. package/dist/log-Al8wyEFV.js +6 -0
  321. package/dist/log-CjTZ0gSB.cjs +1 -0
  322. package/dist/logo-BAktp_5i.cjs +1 -0
  323. package/dist/logo-DBa4JDzV.js +6 -0
  324. package/dist/lua-BfOnSJPp.cjs +1 -0
  325. package/dist/lua-kX5WP_P5.js +8 -0
  326. package/dist/luau-BMXmwtw0.cjs +1 -0
  327. package/dist/luau-UQyhudEE.js +6 -0
  328. package/dist/make-CsMclxtr.js +6 -0
  329. package/dist/make-NcdIe21U.cjs +1 -0
  330. package/dist/markdown-Byu9Sdmq.cjs +1 -0
  331. package/dist/markdown-CrScaQ96.js +6 -0
  332. package/dist/marko-BAIoWxJR.cjs +1 -0
  333. package/dist/marko-Ns9BYtDO.js +14 -0
  334. package/dist/material-theme-D6KBX41T.js +4 -0
  335. package/dist/material-theme-Dj0-OyRN.cjs +1 -0
  336. package/dist/material-theme-darker-CkRroheE.js +4 -0
  337. package/dist/material-theme-darker-Dvfs29ir.cjs +1 -0
  338. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  339. package/dist/material-theme-lighter-EU3ZGl_r.cjs +1 -0
  340. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  341. package/dist/material-theme-ocean-px_3Pwqa.cjs +1 -0
  342. package/dist/material-theme-palenight-38jxvsGX.cjs +1 -0
  343. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  344. package/dist/matlab-BOAaUVP0.js +6 -0
  345. package/dist/matlab-CHTOL9Kx.cjs +1 -0
  346. package/dist/mdc-DEPKJPdx.cjs +1 -0
  347. package/dist/mdc-uaivvctV.js +12 -0
  348. package/dist/mdx-BOhZZUJ8.js +6 -0
  349. package/dist/mdx-CjwI68TB.cjs +1 -0
  350. package/dist/mermaid-BXSwQYo5.cjs +1 -0
  351. package/dist/mermaid-C3rz4dYh.js +6 -0
  352. package/dist/min-dark-C7ak0t6c.js +4 -0
  353. package/dist/min-dark-tt5o_I5e.cjs +1 -0
  354. package/dist/min-light-CKFxVcPp.js +4 -0
  355. package/dist/min-light-tmTHl_CQ.cjs +1 -0
  356. package/dist/mipsasm-BSlRcFIy.cjs +1 -0
  357. package/dist/mipsasm-CTx18fBl.js +6 -0
  358. package/dist/mojo-CgKe2b8g.js +6 -0
  359. package/dist/mojo-D2tXKFxS.cjs +1 -0
  360. package/dist/monokai-C1KBYcO0.js +4 -0
  361. package/dist/monokai-DMIxv6MM.cjs +1 -0
  362. package/dist/moonbit-BweIWWUc.cjs +1 -0
  363. package/dist/moonbit-NVPuhMCm.js +6 -0
  364. package/dist/move-Bm1vlCWg.cjs +1 -0
  365. package/dist/move-F-dICmj2.js +6 -0
  366. package/dist/narrat-CBeKHgTl.cjs +1 -0
  367. package/dist/narrat-DmhDCBs-.js +6 -0
  368. package/dist/nextflow-CM8Ed358.cjs +1 -0
  369. package/dist/nextflow-DmSVRGjG.js +6 -0
  370. package/dist/nginx-5vhPAEw3.js +8 -0
  371. package/dist/nginx-ByVOUyIE.cjs +1 -0
  372. package/dist/night-owl-BN78kThQ.cjs +1 -0
  373. package/dist/night-owl-Bm2rzalh.js +4 -0
  374. package/dist/nim-Bqmp5Of3.cjs +1 -0
  375. package/dist/nim-QAjRdh9w.js +20 -0
  376. package/dist/nix-BOiBJUDf.cjs +1 -0
  377. package/dist/nix-fTRXMGic.js +9 -0
  378. package/dist/nord-CC5OiUXg.js +4 -0
  379. package/dist/nord-Ca5AGUWc.cjs +1 -0
  380. package/dist/nqui.cjs.js +1 -521
  381. package/dist/nqui.es.js +329 -35451
  382. package/dist/nushell-D8j3dhT-.js +6 -0
  383. package/dist/nushell-nGrB_wpI.cjs +1 -0
  384. package/dist/objective-c-Itk8tzmv.js +6 -0
  385. package/dist/objective-c-RjkWwFge.cjs +1 -0
  386. package/dist/objective-cpp-DGt5UKRO.js +6 -0
  387. package/dist/objective-cpp-HnfhWwRe.cjs +1 -0
  388. package/dist/ocaml-Cx8ewW_A.cjs +1 -0
  389. package/dist/ocaml-eSVK32Eg.js +6 -0
  390. package/dist/one-dark-pro-C09VQHwB.cjs +1 -0
  391. package/dist/one-dark-pro-DTA3VF0_.js +4 -0
  392. package/dist/one-light-020-h_lv.cjs +1 -0
  393. package/dist/one-light-D9sNaUtq.js +4 -0
  394. package/dist/openscad-D7eUrVPv.cjs +1 -0
  395. package/dist/openscad-Sp5uZ6f2.js +6 -0
  396. package/dist/pages/Dashboard.d.ts.map +1 -1
  397. package/dist/pascal-DBu9vQ2o.cjs +1 -0
  398. package/dist/pascal-xy8pJNns.js +6 -0
  399. package/dist/perl-CxWZPeDZ.cjs +1 -0
  400. package/dist/perl-DkVrgJBg.js +16 -0
  401. package/dist/php-BLXVJphD.cjs +1 -0
  402. package/dist/php-j2zCzTEz.js +18 -0
  403. package/dist/pkl-C-zSNmaA.js +6 -0
  404. package/dist/pkl-Dvyry4Rm.cjs +1 -0
  405. package/dist/plastic-CSTz3KZp.js +4 -0
  406. package/dist/plastic-r5piqq-S.cjs +1 -0
  407. package/dist/plsql-IJkoPJ9P.cjs +1 -0
  408. package/dist/plsql-pVbGZfOv.js +6 -0
  409. package/dist/po-BNfHvqmm.js +6 -0
  410. package/dist/po-Rhu6MvnX.cjs +1 -0
  411. package/dist/poimandres-BLP3NNjc.cjs +1 -0
  412. package/dist/poimandres-C-VADXHD.js +4 -0
  413. package/dist/polar-BtWqSUq2.cjs +1 -0
  414. package/dist/polar-CAZahv3u.js +6 -0
  415. package/dist/postcss-05aHdL-n.js +6 -0
  416. package/dist/postcss-Dh97DcaJ.cjs +1 -0
  417. package/dist/powerquery-BGL6VIw7.cjs +1 -0
  418. package/dist/powerquery-DI9HkTvs.js +6 -0
  419. package/dist/powershell-BiEPMjy-.cjs +1 -0
  420. package/dist/powershell-Clc4ydu-.js +6 -0
  421. package/dist/prisma-Dp473sn0.cjs +1 -0
  422. package/dist/prisma-FZjmVtSl.js +6 -0
  423. package/dist/prolog-C5-yg4TO.js +6 -0
  424. package/dist/prolog-N1U-3UeF.cjs +1 -0
  425. package/dist/proto-C7QgialS.js +6 -0
  426. package/dist/proto-DMjUErYA.cjs +1 -0
  427. package/dist/pug-DiGNE7sm.cjs +1 -0
  428. package/dist/pug-XOw9Q1Ho.js +12 -0
  429. package/dist/puppet-CUJHmnxV.js +6 -0
  430. package/dist/puppet-cDQP_ZC_.cjs +1 -0
  431. package/dist/purescript-DMxb59gF.cjs +1 -0
  432. package/dist/purescript-rUfGld-4.js +6 -0
  433. package/dist/python-BFNSHbwJ.js +6 -0
  434. package/dist/python-s9jfVbew.cjs +1 -0
  435. package/dist/qml-beorq0E4.cjs +1 -0
  436. package/dist/qml-rTNXsquU.js +8 -0
  437. package/dist/qmldir-BInDYbpo.js +6 -0
  438. package/dist/qmldir-DNF9H2ir.cjs +1 -0
  439. package/dist/qss-AeJTysr_.js +6 -0
  440. package/dist/qss-DwA_oiAM.cjs +1 -0
  441. package/dist/r-CSmzDPi7.js +6 -0
  442. package/dist/r-DAqIyZhh.cjs +1 -0
  443. package/dist/racket-B83wSAja.js +6 -0
  444. package/dist/racket-D4laxZit.cjs +1 -0
  445. package/dist/raku-DHySPsLw.cjs +1 -0
  446. package/dist/raku-nEQ4ZJJ7.js +6 -0
  447. package/dist/razor-C5CyrFEt.js +10 -0
  448. package/dist/razor-PuMYvsDx.cjs +1 -0
  449. package/dist/red-7y8PH7HH.js +4 -0
  450. package/dist/red-BQGOv1D5.cjs +1 -0
  451. package/dist/reg-CevkCKuZ.cjs +1 -0
  452. package/dist/reg-m_s_Kiip.js +6 -0
  453. package/dist/regexp-BazyLpPg.js +6 -0
  454. package/dist/regexp-DabTWNLE.cjs +1 -0
  455. package/dist/rel-BS5APza7.cjs +1 -0
  456. package/dist/rel-BcRfyd6Q.js +6 -0
  457. package/dist/riscv-BnGFr6V7.cjs +1 -0
  458. package/dist/riscv-Ce8MAQLP.js +6 -0
  459. package/dist/rose-pine-BKc3yVeu.js +4 -0
  460. package/dist/rose-pine-CfBWm6WX.cjs +1 -0
  461. package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
  462. package/dist/rose-pine-dawn-CaZ5I2lt.cjs +1 -0
  463. package/dist/rose-pine-moon-Cql8LDLp.cjs +1 -0
  464. package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
  465. package/dist/rosmsg-C7VSFzUC.cjs +1 -0
  466. package/dist/rosmsg-Cz0w1km8.js +6 -0
  467. package/dist/rst-CcbeA9zE.js +22 -0
  468. package/dist/rst-D08gsKw8.cjs +1 -0
  469. package/dist/ruby-B5H7kBtd.cjs +1 -0
  470. package/dist/ruby-DMPw6uKF.js +30 -0
  471. package/dist/rust-CLzF9zIN.js +6 -0
  472. package/dist/rust-CNeTMPbB.cjs +1 -0
  473. package/dist/sas-D5Fn8Q38.cjs +1 -0
  474. package/dist/sas-fpEvgATw.js +8 -0
  475. package/dist/sass-DxHp5rTx.js +6 -0
  476. package/dist/sass-vyo-bUwh.cjs +1 -0
  477. package/dist/scala-D4grkFkl.js +6 -0
  478. package/dist/scala-ZSekD-8-.cjs +1 -0
  479. package/dist/scheme-BCRWuEm4.js +6 -0
  480. package/dist/scheme-vM0LdD-_.cjs +1 -0
  481. package/dist/scss-B1FaCqwR.js +8 -0
  482. package/dist/scss-CKlduTMv.cjs +1 -0
  483. package/dist/sdbl-B7T8abf4.js +6 -0
  484. package/dist/sdbl-DeWT5r4i.cjs +1 -0
  485. package/dist/shaderlab-Cr62-Wb4.js +8 -0
  486. package/dist/shaderlab-DGJjQHxC.cjs +1 -0
  487. package/dist/shellscript-DYWjN7qW.cjs +1 -0
  488. package/dist/shellscript-InADTalH.js +6 -0
  489. package/dist/shellsession-DMUSXX8m.cjs +1 -0
  490. package/dist/shellsession-DiDJNQdy.js +8 -0
  491. package/dist/slack-dark-akqwQ7ED.cjs +1 -0
  492. package/dist/slack-dark-i7wN4OET.js +4 -0
  493. package/dist/slack-ochin-BoQQWmTv.cjs +1 -0
  494. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  495. package/dist/smalltalk-BNs6hxu4.cjs +1 -0
  496. package/dist/smalltalk-BlI1_OkM.js +6 -0
  497. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  498. package/dist/snazzy-light-D_IwRieF.cjs +1 -0
  499. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  500. package/dist/solarized-dark-gmm-WbDC.cjs +1 -0
  501. package/dist/solarized-light-BheCkDPT.js +4 -0
  502. package/dist/solarized-light-DzcxRSZP.cjs +1 -0
  503. package/dist/solidity-DUWnFhS6.js +6 -0
  504. package/dist/solidity-uQuzgchP.cjs +1 -0
  505. package/dist/soy-C1-6njHa.js +8 -0
  506. package/dist/soy-CDFPDtGX.cjs +1 -0
  507. package/dist/sparql-6Cg9ppCl.cjs +1 -0
  508. package/dist/sparql-B0KWFEri.js +8 -0
  509. package/dist/splunk-CRXR8A9s.js +6 -0
  510. package/dist/splunk-CWPivao_.cjs +1 -0
  511. package/dist/sql-Cn_v3PB0.js +6 -0
  512. package/dist/sql-DhUUVgH1.cjs +1 -0
  513. package/dist/ssh-config-B93wBIBa.cjs +1 -0
  514. package/dist/ssh-config-DP-hNVbF.js +6 -0
  515. package/dist/stata-B8c5fTjX.js +8 -0
  516. package/dist/stata-DCWFCQQG.cjs +1 -0
  517. package/dist/styles.css +468 -21
  518. package/dist/stylus-B64Bt0D4.cjs +1 -0
  519. package/dist/stylus-CyKEU1Ej.js +6 -0
  520. package/dist/svelte-CYf4HR3U.js +14 -0
  521. package/dist/svelte-Do4zIqEL.cjs +1 -0
  522. package/dist/swift-9UzSvamq.js +6 -0
  523. package/dist/swift-BMbGdc3j.cjs +1 -0
  524. package/dist/synthwave-84-BBRLOmNT.cjs +1 -0
  525. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  526. package/dist/system-verilog-BCm7smPJ.js +6 -0
  527. package/dist/system-verilog-BFclLo9e.cjs +1 -0
  528. package/dist/systemd-C-4qm6XH.js +6 -0
  529. package/dist/systemd-Dtw7P4tb.cjs +1 -0
  530. package/dist/talonscript-CFF3LF_O.js +6 -0
  531. package/dist/talonscript-D8SvZJVc.cjs +1 -0
  532. package/dist/tasl--DC4oX-L.cjs +1 -0
  533. package/dist/tasl-Cg_WBUAe.js +6 -0
  534. package/dist/tcl-0Q0H86Yn.cjs +1 -0
  535. package/dist/tcl-DN7buRTF.js +6 -0
  536. package/dist/templ-BDNMUns0.cjs +1 -0
  537. package/dist/templ-peLZIM2D.js +12 -0
  538. package/dist/terraform-C0RDrmWi.cjs +1 -0
  539. package/dist/terraform-DGvcn9zM.js +6 -0
  540. package/dist/tex-BvKThJ8p.js +8 -0
  541. package/dist/tex-Dz7jjuD4.cjs +1 -0
  542. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  543. package/dist/tokyo-night-GOhjzM5y.cjs +1 -0
  544. package/dist/toml-DY62mUL_.js +6 -0
  545. package/dist/toml-Q64DoSvG.cjs +1 -0
  546. package/dist/ts-tags-DILCom6A.cjs +1 -0
  547. package/dist/ts-tags-ioVe2PKw.js +41 -0
  548. package/dist/tsv-BtvSkaG0.js +6 -0
  549. package/dist/tsv-DqNGnuVj.cjs +1 -0
  550. package/dist/tsx-B8rCNbgL.js +6 -0
  551. package/dist/tsx-DIpfUf9u.cjs +1 -0
  552. package/dist/turtle-DipIidr5.cjs +1 -0
  553. package/dist/turtle-_H59FV7D.js +6 -0
  554. package/dist/twig-B42NGISI.cjs +1 -0
  555. package/dist/twig-CcRLVyUg.js +18 -0
  556. package/dist/typescript-RycA9KXf.js +6 -0
  557. package/dist/typescript-b48wo4zk.cjs +1 -0
  558. package/dist/typespec-DWqp-kUU.js +6 -0
  559. package/dist/typespec-DqXOE4_L.cjs +1 -0
  560. package/dist/typst-Cqq4j4V-.cjs +1 -0
  561. package/dist/typst-D_1QKWns.js +6 -0
  562. package/dist/v-81C2s01-.cjs +1 -0
  563. package/dist/v-BPCNiyYe.js +6 -0
  564. package/dist/vala-CsAYdCD2.cjs +1 -0
  565. package/dist/vala-uxaPR7d1.js +6 -0
  566. package/dist/vb-AiTMb16X.cjs +1 -0
  567. package/dist/vb-D8_c5-KN.js +6 -0
  568. package/dist/verilog-AMohXZcN.cjs +1 -0
  569. package/dist/verilog-B-bybjPF.js +6 -0
  570. package/dist/vesper-B59Iw4gV.cjs +1 -0
  571. package/dist/vesper-BckBta1U.js +4 -0
  572. package/dist/vhdl-CUlNa8ac.js +6 -0
  573. package/dist/vhdl-DIdR1NA5.cjs +1 -0
  574. package/dist/viml-D01eKeA4.cjs +1 -0
  575. package/dist/viml-DsfA-sWm.js +6 -0
  576. package/dist/vitesse-black-BoGvW84i.js +4 -0
  577. package/dist/vitesse-black-MF-1S1MG.cjs +1 -0
  578. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  579. package/dist/vitesse-dark-SIffJYSe.cjs +1 -0
  580. package/dist/vitesse-light-CcmG315c.js +4 -0
  581. package/dist/vitesse-light-U63SkYGT.cjs +1 -0
  582. package/dist/vue-DXEmyXn9.js +31 -0
  583. package/dist/vue-S9bl2EgW.cjs +1 -0
  584. package/dist/vue-html-B2-sfQT7.cjs +1 -0
  585. package/dist/vue-html-j9xNEdu3.js +8 -0
  586. package/dist/vue-vine-CpIsWjsQ.cjs +1 -0
  587. package/dist/vue-vine-D41-N99t.js +18 -0
  588. package/dist/vyper-CPQuu50u.js +6 -0
  589. package/dist/vyper-DTzyzn3a.cjs +1 -0
  590. package/dist/wasm-BBXxrAl7.js +6 -0
  591. package/dist/wasm-DQxwEHae.js +7 -0
  592. package/dist/wasm-Dp-QrJpp.cjs +1 -0
  593. package/dist/wasm-Dw4u1m6u.cjs +1 -0
  594. package/dist/wenyan-CRNx8UP3.cjs +1 -0
  595. package/dist/wenyan-pbVjoM9_.js +6 -0
  596. package/dist/wgsl-DF5qc9dd.cjs +1 -0
  597. package/dist/wgsl-DY4iK1q1.js +6 -0
  598. package/dist/wikitext-D7uzEIfK.cjs +1 -0
  599. package/dist/wikitext-Z-MoUasO.js +6 -0
  600. package/dist/wit-BjWgLsJj.cjs +1 -0
  601. package/dist/wit-CQMQOlTg.js +6 -0
  602. package/dist/wolfram-BR4t3Ffc.cjs +1 -0
  603. package/dist/wolfram-Dz4KXISs.js +6 -0
  604. package/dist/xml-BpsKWkuV.cjs +1 -0
  605. package/dist/xml-C2J0sS9M.js +8 -0
  606. package/dist/xsl-BmSZphgC.js +8 -0
  607. package/dist/xsl-D-3VYix6.cjs +1 -0
  608. package/dist/yaml-DaO7k5B1.js +6 -0
  609. package/dist/yaml-XVBmpKh-.cjs +1 -0
  610. package/dist/zenscript-CxBjpf9c.js +6 -0
  611. package/dist/zenscript-fNvwKexi.cjs +1 -0
  612. package/dist/zig-BAyIAcWK.cjs +1 -0
  613. package/dist/zig-Vm0PO9wB.js +6 -0
  614. package/package.json +13 -1
  615. package/scripts/build-styles.js +0 -10
  616. package/scripts/examples/nextjs-layout.tsx +2 -0
  617. package/scripts/examples.js +76 -0
  618. package/scripts/framework.js +68 -0
  619. package/scripts/getPackageRoot.js +26 -0
  620. package/scripts/help.js +34 -0
  621. package/scripts/init-css.js +88 -569
  622. package/scripts/pipeline/emit.js +21 -0
  623. package/scripts/pipeline/extract.js +118 -0
  624. package/scripts/pipeline/index.js +90 -0
  625. package/scripts/pipeline/tokens.js +25 -0
  626. package/scripts/pipeline/transform.js +51 -0
  627. package/scripts/postcss.config.mjs +10 -0
  628. package/scripts/setup-helper.js +72 -0
  629. package/scripts/wizard.js +57 -0
  630. package/dist/vite.svg +0 -1
@@ -0,0 +1,1088 @@
1
+ import { _ as X, R as _, T as E, U as k, P as H, V as D } from "./index-DC77eP71.js";
2
+ import { S as Q } from "./base-80a1f760-D0C4rGX6.js";
3
+ import { g as W, r as F, f as Z, w as x, a as $, b as ee, E as te, c as re } from "./consoleHook-59e792cb-Bn_kYimG.js";
4
+ var ne = Object.create, T = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, V = Object.getOwnPropertyNames, se = Object.getPrototypeOf, oe = Object.prototype.hasOwnProperty, ae = (t, n, e) => n in t ? T(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, P = (t, n) => function() {
5
+ return n || (0, t[V(t)[0]])((n = { exports: {} }).exports, n), n.exports;
6
+ }, ce = (t, n, e, r) => {
7
+ if (n && typeof n == "object" || typeof n == "function")
8
+ for (let s of V(n))
9
+ !oe.call(t, s) && s !== e && T(t, s, { get: () => n[s], enumerable: !(r = ie(n, s)) || r.enumerable });
10
+ return t;
11
+ }, j = (t, n, e) => (e = t != null ? ne(se(t)) : {}, ce(
12
+ !t || !t.__esModule ? T(e, "default", { value: t, enumerable: !0 }) : e,
13
+ t
14
+ )), de = (t, n, e) => (ae(t, n + "", e), e), R = (t, n, e) => {
15
+ if (!n.has(t))
16
+ throw TypeError("Cannot " + e);
17
+ }, g = (t, n, e) => (R(t, n, "read from private field"), e ? e.call(t) : n.get(t)), M = (t, n, e) => {
18
+ if (n.has(t))
19
+ throw TypeError("Cannot add the same private member more than once");
20
+ n instanceof WeakSet ? n.add(t) : n.set(t, e);
21
+ }, O = (t, n, e, r) => (R(t, n, "write to private field"), n.set(t, e), e), y = (t, n, e) => (R(t, n, "access private method"), e), z = P({
22
+ "../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/pad.js"(t, n) {
23
+ n.exports = function(r, s) {
24
+ var i = "000000000" + r;
25
+ return i.substr(i.length - s);
26
+ };
27
+ }
28
+ }), le = P({
29
+ "../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/fingerprint.browser.js"(t, n) {
30
+ var e = z(), r = typeof window == "object" ? window : self, s = Object.keys(r).length, i = navigator.mimeTypes ? navigator.mimeTypes.length : 0, o = e((i + navigator.userAgent.length).toString(36) + s.toString(36), 4);
31
+ n.exports = function() {
32
+ return o;
33
+ };
34
+ }
35
+ }), ue = P({
36
+ "../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/lib/getRandomValue.browser.js"(t, n) {
37
+ var e, r = typeof window < "u" && (window.crypto || window.msCrypto) || typeof self < "u" && self.crypto;
38
+ r ? (s = Math.pow(2, 32) - 1, e = function() {
39
+ return Math.abs(r.getRandomValues(new Uint32Array(1))[0] / s);
40
+ }) : e = Math.random;
41
+ var s;
42
+ n.exports = e;
43
+ }
44
+ }), G = P({
45
+ "../../node_modules/.pnpm/cuid@2.1.8/node_modules/cuid/index.js"(t, n) {
46
+ var e = le(), r = z(), s = ue(), i = 0, o = 4, a = 36, d = Math.pow(a, o);
47
+ function l() {
48
+ return r((s() * d << 0).toString(a), o);
49
+ }
50
+ function h() {
51
+ return i = i < d ? i : 0, i++, i - 1;
52
+ }
53
+ function p() {
54
+ var m = "c", v = (/* @__PURE__ */ new Date()).getTime().toString(a), b = r(h().toString(a), o), c = e(), u = l() + l();
55
+ return m + v + b + c + u;
56
+ }
57
+ p.slug = function() {
58
+ var v = (/* @__PURE__ */ new Date()).getTime().toString(36), b = h().toString(36).slice(-4), c = e().slice(0, 1) + e().slice(-1), u = l().slice(-2);
59
+ return v.slice(-2) + b + c + u;
60
+ }, p.isCuid = function(v) {
61
+ return typeof v != "string" ? !1 : !!v.startsWith("c");
62
+ }, p.isSlug = function(v) {
63
+ if (typeof v != "string")
64
+ return !1;
65
+ var b = v.length;
66
+ return b >= 7 && b <= 10;
67
+ }, p.fingerprint = e, n.exports = p;
68
+ }
69
+ }), J = P({
70
+ "../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/createDeferredExecutor.js"(t) {
71
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.createDeferredExecutor = void 0;
72
+ function n() {
73
+ const e = (r, s) => {
74
+ e.state = "pending", e.resolve = (i) => {
75
+ if (e.state !== "pending")
76
+ return;
77
+ e.result = i;
78
+ const o = (a) => (e.state = "fulfilled", a);
79
+ return r(i instanceof Promise ? i : Promise.resolve(i).then(o));
80
+ }, e.reject = (i) => {
81
+ if (e.state === "pending")
82
+ return queueMicrotask(() => {
83
+ e.state = "rejected";
84
+ }), s(e.rejectionReason = i);
85
+ };
86
+ };
87
+ return e;
88
+ }
89
+ t.createDeferredExecutor = n;
90
+ }
91
+ }), he = P({
92
+ "../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/DeferredPromise.js"(t) {
93
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.DeferredPromise = void 0;
94
+ var n = J(), e = class extends Promise {
95
+ #e;
96
+ resolve;
97
+ reject;
98
+ constructor(r = null) {
99
+ const s = (0, n.createDeferredExecutor)();
100
+ super((i, o) => {
101
+ s(i, o), r?.(s.resolve, s.reject);
102
+ }), this.#e = s, this.resolve = this.#e.resolve, this.reject = this.#e.reject;
103
+ }
104
+ get state() {
105
+ return this.#e.state;
106
+ }
107
+ get rejectionReason() {
108
+ return this.#e.rejectionReason;
109
+ }
110
+ then(r, s) {
111
+ return this.#t(super.then(r, s));
112
+ }
113
+ catch(r) {
114
+ return this.#t(super.catch(r));
115
+ }
116
+ finally(r) {
117
+ return this.#t(super.finally(r));
118
+ }
119
+ #t(r) {
120
+ return Object.defineProperties(r, {
121
+ resolve: { configurable: !0, value: this.resolve },
122
+ reject: { configurable: !0, value: this.reject }
123
+ });
124
+ }
125
+ };
126
+ t.DeferredPromise = e;
127
+ }
128
+ }), U = P({
129
+ "../../node_modules/.pnpm/@open-draft+deferred-promise@2.1.0/node_modules/@open-draft/deferred-promise/build/index.js"(t) {
130
+ var n = t && t.__createBinding || (Object.create ? function(r, s, i, o) {
131
+ o === void 0 && (o = i);
132
+ var a = Object.getOwnPropertyDescriptor(s, i);
133
+ (!a || ("get" in a ? !s.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: function() {
134
+ return s[i];
135
+ } }), Object.defineProperty(r, o, a);
136
+ } : function(r, s, i, o) {
137
+ o === void 0 && (o = i), r[o] = s[i];
138
+ }), e = t && t.__exportStar || function(r, s) {
139
+ for (var i in r)
140
+ i !== "default" && !Object.prototype.hasOwnProperty.call(s, i) && n(s, r, i);
141
+ };
142
+ Object.defineProperty(t, "__esModule", { value: !0 }), e(J(), t), e(he(), t);
143
+ }
144
+ }), Y = P({
145
+ "../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/MemoryLeakError.js"(t) {
146
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.MemoryLeakError = void 0;
147
+ var n = class extends Error {
148
+ emitter;
149
+ type;
150
+ count;
151
+ constructor(e, r, s) {
152
+ super(`Possible EventEmitter memory leak detected. ${s} ${r.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`), this.emitter = e, this.type = r, this.count = s, this.name = "MaxListenersExceededWarning";
153
+ }
154
+ };
155
+ t.MemoryLeakError = n;
156
+ }
157
+ }), fe = P({
158
+ "../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/Emitter.js"(t) {
159
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.Emitter = void 0;
160
+ var n = Y(), e, r, s, i, o, a, d, l, h, p, m, v = class {
161
+ constructor() {
162
+ M(this, i), M(this, a), M(this, l), M(this, p), M(this, e, void 0), M(this, r, void 0), M(this, s, void 0), O(this, e, /* @__PURE__ */ new Map()), O(this, r, v.defaultMaxListeners), O(this, s, !1);
163
+ }
164
+ static listenerCount(c, u) {
165
+ return c.listenerCount(u);
166
+ }
167
+ setMaxListeners(c) {
168
+ return O(this, r, c), this;
169
+ }
170
+ getMaxListeners() {
171
+ return g(this, r);
172
+ }
173
+ eventNames() {
174
+ return Array.from(g(this, e).keys());
175
+ }
176
+ emit(c, ...u) {
177
+ const f = y(this, i, o).call(this, c);
178
+ return f.forEach((I) => {
179
+ I.apply(this, u);
180
+ }), f.length > 0;
181
+ }
182
+ addListener(c, u) {
183
+ y(this, p, m).call(this, "newListener", c, u);
184
+ const f = y(this, i, o).call(this, c).concat(u);
185
+ if (g(this, e).set(c, f), g(this, r) > 0 && this.listenerCount(c) > g(this, r) && !g(this, s)) {
186
+ O(this, s, !0);
187
+ const I = new n.MemoryLeakError(this, c, this.listenerCount(c));
188
+ console.warn(I);
189
+ }
190
+ return this;
191
+ }
192
+ on(c, u) {
193
+ return this.addListener(c, u);
194
+ }
195
+ once(c, u) {
196
+ return this.addListener(c, y(this, l, h).call(this, c, u));
197
+ }
198
+ prependListener(c, u) {
199
+ const f = y(this, i, o).call(this, c);
200
+ if (f.length > 0) {
201
+ const I = [u].concat(f);
202
+ g(this, e).set(c, I);
203
+ } else
204
+ g(this, e).set(c, f.concat(u));
205
+ return this;
206
+ }
207
+ prependOnceListener(c, u) {
208
+ return this.prependListener(c, y(this, l, h).call(this, c, u));
209
+ }
210
+ removeListener(c, u) {
211
+ const f = y(this, i, o).call(this, c);
212
+ return f.length > 0 && (y(this, a, d).call(this, f, u), g(this, e).set(c, f), y(this, p, m).call(this, "removeListener", c, u)), this;
213
+ }
214
+ off(c, u) {
215
+ return this.removeListener(c, u);
216
+ }
217
+ removeAllListeners(c) {
218
+ return c ? g(this, e).delete(c) : g(this, e).clear(), this;
219
+ }
220
+ listeners(c) {
221
+ return Array.from(y(this, i, o).call(this, c));
222
+ }
223
+ listenerCount(c) {
224
+ return y(this, i, o).call(this, c).length;
225
+ }
226
+ rawListeners(c) {
227
+ return this.listeners(c);
228
+ }
229
+ }, b = v;
230
+ e = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakSet(), o = function(c) {
231
+ return g(this, e).get(c) || [];
232
+ }, a = /* @__PURE__ */ new WeakSet(), d = function(c, u) {
233
+ const f = c.indexOf(u);
234
+ return f > -1 && c.splice(f, 1), [];
235
+ }, l = /* @__PURE__ */ new WeakSet(), h = function(c, u) {
236
+ const f = (...I) => {
237
+ this.removeListener(c, f), u.apply(this, I);
238
+ };
239
+ return f;
240
+ }, p = /* @__PURE__ */ new WeakSet(), m = function(c, u, f) {
241
+ this.emit(
242
+ c,
243
+ u,
244
+ f
245
+ );
246
+ }, de(b, "defaultMaxListeners", 10), t.Emitter = b;
247
+ }
248
+ }), pe = P({
249
+ "../../node_modules/.pnpm/strict-event-emitter@0.4.3/node_modules/strict-event-emitter/lib/index.js"(t) {
250
+ var n = t && t.__createBinding || (Object.create ? function(r, s, i, o) {
251
+ o === void 0 && (o = i);
252
+ var a = Object.getOwnPropertyDescriptor(s, i);
253
+ (!a || ("get" in a ? !s.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: function() {
254
+ return s[i];
255
+ } }), Object.defineProperty(r, o, a);
256
+ } : function(r, s, i, o) {
257
+ o === void 0 && (o = i), r[o] = s[i];
258
+ }), e = t && t.__exportStar || function(r, s) {
259
+ for (var i in r)
260
+ i !== "default" && !Object.prototype.hasOwnProperty.call(s, i) && n(s, r, i);
261
+ };
262
+ Object.defineProperty(t, "__esModule", { value: !0 }), e(fe(), t), e(Y(), t);
263
+ }
264
+ }), me = j(G()), ve = /(%?)(%([sdjo]))/g;
265
+ function we(t, n) {
266
+ switch (n) {
267
+ case "s":
268
+ return t;
269
+ case "d":
270
+ case "i":
271
+ return Number(t);
272
+ case "j":
273
+ return JSON.stringify(t);
274
+ case "o": {
275
+ if (typeof t == "string")
276
+ return t;
277
+ const e = JSON.stringify(t);
278
+ return e === "{}" || e === "[]" || /^\[object .+?\]$/.test(e) ? t : e;
279
+ }
280
+ }
281
+ }
282
+ function w(t, ...n) {
283
+ if (n.length === 0)
284
+ return t;
285
+ let e = 0, r = t.replace(
286
+ ve,
287
+ (s, i, o, a) => {
288
+ const d = n[e], l = we(d, a);
289
+ return i ? s : (e++, l);
290
+ }
291
+ );
292
+ return e < n.length && (r += ` ${n.slice(e).join(" ")}`), r = r.replace(/%{2,2}/g, "%"), r;
293
+ }
294
+ var ge = 2;
295
+ function ye(t) {
296
+ if (!t.stack)
297
+ return;
298
+ const n = t.stack.split(`
299
+ `);
300
+ n.splice(1, ge), t.stack = n.join(`
301
+ `);
302
+ }
303
+ var _e = class extends Error {
304
+ constructor(t, ...n) {
305
+ super(t), this.message = t, this.name = "Invariant Violation", this.message = w(t, ...n), ye(this);
306
+ }
307
+ }, S = (t, n, ...e) => {
308
+ if (!t)
309
+ throw new _e(n, ...e);
310
+ };
311
+ S.as = (t, n, e, ...r) => {
312
+ if (!n)
313
+ throw t.prototype.name != null ? new t(w(e, r)) : t(w(e, r));
314
+ };
315
+ var A = j(U()), Ee = window.localStorage.CSB_EMULATOR_DEBUG, Pe = "\x1B[0m", be = "\x1B[32;1m", Se = "\x1B[31m", Le = "\x1B[34m", Ie = "\x1B[33;1m", Me = "\x1B[35;1m", B = "\x1B[36;1m", je = {
316
+ preview: Ie,
317
+ emulator: Me,
318
+ runtime: B,
319
+ bridge: Le,
320
+ "runtime:worker": B
321
+ };
322
+ function K(t) {
323
+ return function(e, ...r) {
324
+ if (Ee === "true") {
325
+ const s = () => e.includes("sender") ? `${be}sender` : e.includes("receiver") ? `${Se}receiver` : "", i = e.replace(/\[.+\]:/, "");
326
+ console.debug(`${je[t]}${t}:${s()}${Pe}:${i}`, ...r);
327
+ }
328
+ };
329
+ }
330
+ var L = K("emulator"), Oe = class {
331
+ constructor(t) {
332
+ this.target = t, this.emitter = new EventTarget(), this.channel = new MessageChannel(), this.receiverPort = this.channel.port1;
333
+ const n = new A.DeferredPromise(), e = (r) => {
334
+ r.data.type === "internal/ready" && (L("[message-sender]: runtime is ready"), n.resolve());
335
+ };
336
+ window.addEventListener("message", e), n.then(() => {
337
+ window.removeEventListener("message", e);
338
+ }), this.receiverReadyPromise = n, this.receiverPort.onmessage = (r) => {
339
+ const s = r.data;
340
+ s.type != null && (L('[message-sender]: emitting "%s" event...', s.type, s.payload), this.emitter.dispatchEvent(new MessageEvent(s.type, { data: s.payload })));
341
+ };
342
+ }
343
+ emitter;
344
+ channel;
345
+ receiverPort;
346
+ receiverReadyPromise;
347
+ async handshake() {
348
+ const t = new A.DeferredPromise();
349
+ await this.receiverReadyPromise, L("[message-sender]: sending handshake"), this.target.postMessage(
350
+ {
351
+ type: "internal/handshake"
352
+ },
353
+ "*",
354
+ [this.channel.port2]
355
+ ), this.on("internal/handshake/done", () => {
356
+ t.resolve(), clearTimeout(n);
357
+ });
358
+ const n = setTimeout(() => {
359
+ t.reject(new Error("MessageSender: Handshake timeout"));
360
+ }, 5e3);
361
+ return t;
362
+ }
363
+ on(t, n, e) {
364
+ L('[message-sender]: add listener "%s"', t), this.emitter.addEventListener(
365
+ t,
366
+ (r) => {
367
+ r instanceof MessageEvent && n(r);
368
+ },
369
+ e
370
+ );
371
+ }
372
+ off(t, n, e) {
373
+ this.emitter.removeEventListener(t, n, e);
374
+ }
375
+ async send(t, ...n) {
376
+ const e = new A.DeferredPromise(), r = (0, me.default)(), s = n[0] || {};
377
+ L('[message-sender]: send "%s" (%s)', t, r, s), this.receiverPort.postMessage({ type: t, payload: { operationId: r, payload: s } }), L('[message-sender]: adding done listener for "%s" (%s)', t, r);
378
+ const i = (a) => {
379
+ const { data: d } = a;
380
+ if (d.operationId === r) {
381
+ const l = d.listenerPayload || {};
382
+ L('[message-sender]: resolving "%s (%s) promise!', t, r), e.resolve({
383
+ ...l,
384
+ operationId: d.operationId
385
+ });
386
+ }
387
+ }, o = (a) => {
388
+ const { data: d } = a;
389
+ d.operationId === r && (L('[message-sender]: rejecting "%s (%s) promise!', t, r), e.reject(d.error));
390
+ };
391
+ return this.on("internal/operation/done", i), this.on("internal/operation/failed", o), e.finally(() => {
392
+ this.emitter.removeEventListener("internal/operation/done", i), this.emitter.removeEventListener("internal/operation/failed", o);
393
+ });
394
+ }
395
+ }, N = j(U()), ke = j(G()), Ce = class {
396
+ constructor(t) {
397
+ this.channel = t;
398
+ }
399
+ async init(t) {
400
+ await this.channel.send("fs/init", { files: t });
401
+ }
402
+ async readFile(t, n) {
403
+ const e = await this.channel.send("fs/readFile", { path: t, encoding: n }).catch((r) => {
404
+ throw new Error(w('Failed to read file at path "%s"', t), { cause: r });
405
+ });
406
+ if (!e)
407
+ throw new Error("File not found");
408
+ return e.data;
409
+ }
410
+ async writeFile(t, n, e) {
411
+ let r, s = !1;
412
+ typeof e == "object" ? (r = e.encoding, s = !!e.recursive) : typeof e == "string" && (r = e), await this.channel.send("fs/writeFile", { path: t, content: n, encoding: r, recursive: s }).catch((i) => {
413
+ throw new Error(w('Failed to write file at path "%s"', t), { cause: i });
414
+ });
415
+ }
416
+ async readdir(t) {
417
+ const n = await this.channel.send("fs/readdir", { path: t }).catch((e) => {
418
+ throw new Error(w('Failed to read directory at path "%s"', t), { cause: e });
419
+ });
420
+ if (!n)
421
+ throw new Error("Directory not found");
422
+ return n.data;
423
+ }
424
+ async mkdir(t, n) {
425
+ const e = !!n?.recursive;
426
+ await this.channel.send("fs/mkdir", { path: t, recursive: e }).catch((r) => {
427
+ throw new Error(w('Failed to make directory at path "%s"', t), { cause: r });
428
+ });
429
+ }
430
+ async stat(t) {
431
+ const n = await this.channel.send("fs/stat", { path: t }).catch((e) => {
432
+ throw new Error(w('Failed to stat file at path "%s"', t), { cause: e });
433
+ });
434
+ if (!n)
435
+ throw new Error("File not found");
436
+ return n.data;
437
+ }
438
+ async rm(t, n) {
439
+ const { force: e, recursive: r } = n || {};
440
+ await this.channel.send("fs/rm", { path: t, force: e, recursive: r }).catch((s) => {
441
+ throw new Error(w('Failed to remove file at path "%s"', t), { cause: s });
442
+ });
443
+ }
444
+ async watch(t, n, e) {
445
+ const r = (0, ke.default)();
446
+ return await this.channel.send("fs/watch", { watcherId: r, includes: t, excludes: n }), this.channel.on("fs/watch-event", ({ data: s }) => {
447
+ if (s.watcherId === r && e) {
448
+ const i = { ...s };
449
+ delete i.watcherId, e(i);
450
+ }
451
+ }), {
452
+ dispose: () => this.channel.send("fs/unwatch", { watcherId: r })
453
+ };
454
+ }
455
+ }, q = j(pe()), Fe = class {
456
+ constructor(t) {
457
+ this.channel = t;
458
+ }
459
+ create() {
460
+ return new xe(this.channel);
461
+ }
462
+ }, xe = class {
463
+ constructor(t) {
464
+ this.channel = t, this.state = "running", this.stdout = new q.Emitter(), this.stderr = new q.Emitter(), this.stdin = {
465
+ write: (n) => {
466
+ if (!this.id)
467
+ throw new Error("Failed to write to stdin, no process is currently running");
468
+ return this.channel.send("shell/stdin", { data: n, workerId: this.id });
469
+ }
470
+ }, this.forwardStdEvents();
471
+ }
472
+ id;
473
+ state;
474
+ stdout;
475
+ stderr;
476
+ stdin;
477
+ forwardStdEvents() {
478
+ this.channel.on("worker/tty", (t) => {
479
+ const { data: n } = t;
480
+ if (n.workerId === this.id)
481
+ switch (n.payload.type) {
482
+ case "out": {
483
+ this.stdout.emit("data", n.payload.data);
484
+ break;
485
+ }
486
+ case "err": {
487
+ this.stderr.emit("data", n.payload.data);
488
+ break;
489
+ }
490
+ }
491
+ });
492
+ }
493
+ async runCommand(t, n, e = {}) {
494
+ S(!this.id, 'Failed to run "runCommand" on a ShellProcess: there is already a process running.');
495
+ const r = await this.channel.send("shell/runCommand", { command: t, args: n, options: e });
496
+ return S(r, 'Failed to run "runCommand" on a ShellProcess: was not able to retrieve a running process.'), this.id = r.id, this.state = "running", r;
497
+ }
498
+ async on(t, n) {
499
+ switch (t) {
500
+ case "progress": {
501
+ this.channel.on("worker/progress", ({ data: e }) => {
502
+ n(e.status);
503
+ });
504
+ return;
505
+ }
506
+ case "exit": {
507
+ this.channel.on("worker/exit", ({ data: e }) => {
508
+ e.workerId === this.id && n(e.exitCode, e.error);
509
+ });
510
+ return;
511
+ }
512
+ }
513
+ }
514
+ async kill() {
515
+ S(
516
+ this.id,
517
+ 'Failed to run "kill" on a ShellProcess: there is no process running. Did you forget to run it?'
518
+ ), this.state = "idle", await this.channel.send("shell/exit", { id: this.id }).catch((t) => {
519
+ throw new Error(w('Failed to kill shell with ID "%s"', this.id), { cause: t });
520
+ }), this.id = void 0;
521
+ }
522
+ }, Ae = j(U()), De = 2e4, Te = class {
523
+ constructor(t) {
524
+ this.channel = t;
525
+ }
526
+ async waitFor(t, n, e = De) {
527
+ const r = new Ae.DeferredPromise(), s = setTimeout(() => {
528
+ r.reject();
529
+ }, e), i = await this.channel.send("preview/get/info", t).catch((a) => {
530
+ r.reject(
531
+ new Error(
532
+ w(
533
+ 'Failed to look up preview information for shell ID "%s" (port: %d)',
534
+ t.sourceShellId,
535
+ t.port
536
+ )
537
+ )
538
+ );
539
+ }), o = i && n(i);
540
+ return o && r.resolve({
541
+ url: i.url,
542
+ port: i.port,
543
+ sourceShellId: i.sourceShellId
544
+ }), this.channel.on("preview/port/ready", ({ data: a }) => {
545
+ !o && n(a) && r.resolve({
546
+ url: a.url,
547
+ port: a.port,
548
+ sourceShellId: a.sourceShellId
549
+ });
550
+ }), r.finally(() => {
551
+ clearTimeout(s);
552
+ });
553
+ }
554
+ async getByShellId(t, n) {
555
+ return this.waitFor({ sourceShellId: t }, (e) => e.sourceShellId === t, n).catch((e) => {
556
+ throw new Error(w('Failed to get shell by ID "%s"', t), { cause: e });
557
+ });
558
+ }
559
+ async waitForPort(t, n) {
560
+ return this.waitFor({ port: t }, (e) => e.port === t, n).catch((e) => {
561
+ throw new Error(w("Failed to await port %d", t), { cause: e });
562
+ });
563
+ }
564
+ }, Re = "https://nodebox-runtime.codesandbox.io", C = K("emulator"), Ue = class {
565
+ constructor(t) {
566
+ this.options = t, S(
567
+ this.options.iframe,
568
+ 'Failed to create a Nodebox: expected "iframe" argument to be a reference to an <iframe> element but got %j',
569
+ this.options.iframe
570
+ ), this.url = this.options.runtimeUrl || Re, this.isConnected = !1;
571
+ }
572
+ channel = null;
573
+ isConnected;
574
+ url;
575
+ fileSystemApi = null;
576
+ shellApi = null;
577
+ previewApi = null;
578
+ async connect() {
579
+ const { iframe: t, cdnUrl: n } = this.options;
580
+ C("[message-sender]: Connecting to node emulator...");
581
+ const e = new N.DeferredPromise();
582
+ this.url || e.reject(
583
+ new Error("Nodebox URL is missing. Did you forget to provide it when creating this Nodebox instance?")
584
+ ), S(
585
+ t.contentWindow,
586
+ "Failed to create a MessageChannel with the Nodebox iframe: no content window found"
587
+ ), this.channel = new Oe(t.contentWindow);
588
+ const r = new N.DeferredPromise();
589
+ return t.setAttribute("src", this.url), t.addEventListener(
590
+ "load",
591
+ () => {
592
+ r.resolve();
593
+ },
594
+ { once: !0 }
595
+ ), t.addEventListener(
596
+ "error",
597
+ (s) => {
598
+ r.reject(s.error);
599
+ },
600
+ { once: !0 }
601
+ ), await r, C("[message-sender]: IFrame loaded..."), await this.channel.handshake(), C("[message-sender]: Handshake completed..."), this.channel.send("connect", {
602
+ cdnUrl: n
603
+ }), this.channel.on("runtime/ready", () => {
604
+ e.resolve();
605
+ }), e.then(() => {
606
+ C("[message-sender]: Connected to runtime..."), this.isConnected = !0;
607
+ });
608
+ }
609
+ get fs() {
610
+ return S(
611
+ this.isConnected,
612
+ 'Failed to access the File System API: consumer is not connected. Did you forget to run "connect()"?'
613
+ ), this.fileSystemApi ? this.fileSystemApi : (this.fileSystemApi = new Ce(this.channel), this.fileSystemApi);
614
+ }
615
+ get shell() {
616
+ return S(
617
+ this.isConnected,
618
+ 'Failed to access the Shell API: consumer is not connected. Did you forget to run "connect()"?'
619
+ ), this.shellApi ? this.shellApi : (this.shellApi = new Fe(this.channel), this.shellApi);
620
+ }
621
+ get preview() {
622
+ return S(
623
+ this.isConnected,
624
+ 'Failed to access the Preview API: consumer is not connected. Did you forget to run "connect()"?'
625
+ ), this.previewApi ? this.previewApi : (this.previewApi = new Te(this.channel), this.previewApi);
626
+ }
627
+ }, We = "INJECT_AND_INVOKE", Be = "PREVIEW_LOADED";
628
+ function Ne(t, n) {
629
+ return _(this, void 0, void 0, function() {
630
+ var e, r, s, i, o;
631
+ return E(this, function(a) {
632
+ return e = t.contentWindow, D(e, "Failed to await preview iframe: no content window found"), r = 9e4, s = 20, i = 0, [2, new Promise(function(d, l) {
633
+ var h = function() {
634
+ var p = function() {
635
+ clearTimeout(o), i = s, d(), t.removeEventListener("load", p);
636
+ };
637
+ if (i >= s) {
638
+ l(H("Could not able to connect to preview."));
639
+ return;
640
+ }
641
+ t.setAttribute("src", n), o = setTimeout(function() {
642
+ h(), t.removeEventListener("load", p);
643
+ }, r), i = i + 1, t.addEventListener("load", p);
644
+ };
645
+ t.addEventListener("error", function() {
646
+ return l(new Error("Iframe error"));
647
+ }), t.addEventListener("abort", function() {
648
+ return l(new Error("Aborted"));
649
+ }), h();
650
+ })];
651
+ });
652
+ });
653
+ }
654
+ var qe = function(t, n) {
655
+ t.style.border = "0", t.style.width = n.width || "100%", t.style.height = n.height || "100%", t.style.overflow = "hidden", t.allow = "cross-origin-isolated";
656
+ };
657
+ function He(t) {
658
+ var n = t.scope, e = window.history.__proto__, r = [], s = 0, i = function(d) {
659
+ parent.postMessage({
660
+ type: "urlchange",
661
+ url: d,
662
+ back: s > 0,
663
+ forward: s < r.length - 1,
664
+ channelId: n.channelId
665
+ }, "*");
666
+ };
667
+ function o(d, l) {
668
+ r.splice(s + 1), r.push({ url: d, state: l }), s = r.length - 1;
669
+ }
670
+ Object.assign(window.history, {
671
+ go: function(d) {
672
+ var l = s + d;
673
+ if (l >= 0 && l <= r.length - 1) {
674
+ s = l;
675
+ var h = r[s], p = h.url, m = h.state;
676
+ e.replaceState.call(window.history, m, "", p);
677
+ var v = document.location.href;
678
+ i(v), window.dispatchEvent(new PopStateEvent("popstate", { state: m }));
679
+ }
680
+ },
681
+ back: function() {
682
+ window.history.go(-1);
683
+ },
684
+ forward: function() {
685
+ window.history.go(1);
686
+ },
687
+ pushState: function(d, l, h) {
688
+ e.replaceState.call(window.history, d, l, h), o(h, d), i(document.location.href);
689
+ },
690
+ replaceState: function(d, l, h) {
691
+ e.replaceState.call(window.history, d, l, h), r[s] = { state: d, url: h }, i(document.location.href);
692
+ }
693
+ });
694
+ function a(d) {
695
+ var l = d.data;
696
+ l.type === "urlback" ? history.back() : l.type === "urlforward" ? history.forward() : l.type === "refresh" && document.location.reload();
697
+ }
698
+ window.addEventListener("message", a);
699
+ }
700
+ function Ve(t) {
701
+ var n = t.scope, e = 0;
702
+ function r() {
703
+ if (typeof window > "u")
704
+ return 0;
705
+ var a = document.body, d = document.documentElement;
706
+ return Math.max(a.scrollHeight, a.offsetHeight, d.offsetHeight);
707
+ }
708
+ function s() {
709
+ var a = r();
710
+ e !== a && window.parent.postMessage({
711
+ type: "resize",
712
+ height: a,
713
+ codesandbox: !0,
714
+ channelId: n.channelId
715
+ }, "*"), e = a;
716
+ }
717
+ s();
718
+ var i, o = new MutationObserver(function() {
719
+ i === void 0 && (s(), i = setTimeout(function() {
720
+ i = void 0;
721
+ }, 300));
722
+ });
723
+ o.observe(document, {
724
+ attributes: !0,
725
+ childList: !0,
726
+ subtree: !0
727
+ }), setInterval(s, 300);
728
+ }
729
+ var ze = [
730
+ { code: He.toString(), id: "historyListener" },
731
+ {
732
+ code: "function consoleHook({ scope }) {" + re + `
733
+ };`,
734
+ id: "consoleHook"
735
+ },
736
+ { code: Ve.toString(), id: "watchResize" }
737
+ ], Ge = function(t, n) {
738
+ ze.forEach(function(e) {
739
+ var r, s = e.code, i = e.id, o = {
740
+ uid: i,
741
+ type: We,
742
+ code: "exports.activate = ".concat(s),
743
+ scope: { channelId: n }
744
+ };
745
+ (r = t.contentWindow) === null || r === void 0 || r.postMessage(o, "*");
746
+ });
747
+ }, Xe = (
748
+ /** @class */
749
+ (function(t) {
750
+ X(n, t);
751
+ function n(e, r, s) {
752
+ s === void 0 && (s = {});
753
+ var i = t.call(this, e, r, k(k({}, s), { bundlerURL: s.bundlerURL })) || this;
754
+ return i._modulesCache = /* @__PURE__ */ new Map(), i.messageChannelId = ee(), i._initPromise = null, i.emitter = new te(), i.manageIframes(e), i.emulator = new Ue({
755
+ iframe: i.emulatorIframe,
756
+ runtimeUrl: i.options.bundlerURL
757
+ }), i.updateSandbox(r), i;
758
+ }
759
+ return n.prototype._init = function(e) {
760
+ return _(this, void 0, void 0, function() {
761
+ return E(this, function(r) {
762
+ switch (r.label) {
763
+ case 0:
764
+ return [4, this.emulator.connect()];
765
+ case 1:
766
+ return r.sent(), [4, this.emulator.fs.init(e)];
767
+ case 2:
768
+ return r.sent(), [4, this.globalListeners()];
769
+ case 3:
770
+ return r.sent(), [
771
+ 2
772
+ /*return*/
773
+ ];
774
+ }
775
+ });
776
+ });
777
+ }, n.prototype.compile = function(e) {
778
+ return _(this, void 0, void 0, function() {
779
+ var r, s;
780
+ return E(this, function(i) {
781
+ switch (i.label) {
782
+ case 0:
783
+ return i.trys.push([0, 5, , 6]), this.status = "initializing", this.dispatch({ type: "start", firstLoad: !0 }), this._initPromise || (this._initPromise = this._init(e)), [4, this._initPromise];
784
+ case 1:
785
+ return i.sent(), this.dispatch({ type: "connected" }), [4, this.createShellProcessFromTask(e)];
786
+ case 2:
787
+ return r = i.sent().id, [4, this.createPreviewURLFromId(r)];
788
+ case 3:
789
+ return i.sent(), [4, this.setLocationURLIntoIFrame()];
790
+ case 4:
791
+ return i.sent(), this.dispatchDoneMessage(), [3, 6];
792
+ case 5:
793
+ return s = i.sent(), this.dispatch({
794
+ type: "action",
795
+ action: "notification",
796
+ notificationType: "error",
797
+ title: W(s)
798
+ }), this.dispatch({ type: "done", compilatonError: !0 }), [3, 6];
799
+ case 6:
800
+ return [
801
+ 2
802
+ /*return*/
803
+ ];
804
+ }
805
+ });
806
+ });
807
+ }, n.prototype.createShellProcessFromTask = function(e) {
808
+ return _(this, void 0, void 0, function() {
809
+ var r, s, i = this;
810
+ return E(this, function(o) {
811
+ switch (o.label) {
812
+ case 0:
813
+ return r = F(e["/package.json"]), this.emulatorCommand = Z(r), this.emulatorShellProcess = this.emulator.shell.create(), [4, this.emulatorShellProcess.on("exit", function(a) {
814
+ i.dispatch({
815
+ type: "action",
816
+ action: "notification",
817
+ notificationType: "error",
818
+ title: H("Error: process.exit(".concat(a, ") called."))
819
+ });
820
+ })];
821
+ case 1:
822
+ return o.sent(), [4, this.emulatorShellProcess.on("progress", function(a) {
823
+ var d, l;
824
+ if (a.state === "command_running" || a.state === "starting_command") {
825
+ i.dispatch({
826
+ type: "shell/progress",
827
+ data: k(k({}, a), { command: [
828
+ (d = i.emulatorCommand) === null || d === void 0 ? void 0 : d[0],
829
+ (l = i.emulatorCommand) === null || l === void 0 ? void 0 : l[1].join(" ")
830
+ ].join(" ") })
831
+ }), i.status = "installing-dependencies";
832
+ return;
833
+ }
834
+ i.dispatch({ type: "shell/progress", data: a });
835
+ })];
836
+ case 2:
837
+ return o.sent(), this.emulatorShellProcess.stdout.on("data", function(a) {
838
+ i.dispatch({ type: "stdout", payload: { data: a, type: "out" } });
839
+ }), this.emulatorShellProcess.stderr.on("data", function(a) {
840
+ i.dispatch({ type: "stdout", payload: { data: a, type: "err" } });
841
+ }), [4, (s = this.emulatorShellProcess).runCommand.apply(s, this.emulatorCommand)];
842
+ case 3:
843
+ return [2, o.sent()];
844
+ }
845
+ });
846
+ });
847
+ }, n.prototype.createPreviewURLFromId = function(e) {
848
+ var r;
849
+ return _(this, void 0, void 0, function() {
850
+ var s;
851
+ return E(this, function(i) {
852
+ switch (i.label) {
853
+ case 0:
854
+ return this.iframePreviewUrl = void 0, [4, this.emulator.preview.getByShellId(e)];
855
+ case 1:
856
+ return s = i.sent().url, this.iframePreviewUrl = s + ((r = this.options.startRoute) !== null && r !== void 0 ? r : ""), [
857
+ 2
858
+ /*return*/
859
+ ];
860
+ }
861
+ });
862
+ });
863
+ }, n.prototype.manageIframes = function(e) {
864
+ var r;
865
+ if (typeof e == "string") {
866
+ var s = document.querySelector(e);
867
+ D(s, "The element '".concat(e, "' was not found")), this.iframe = document.createElement("iframe"), s?.appendChild(this.iframe);
868
+ } else
869
+ this.iframe = e;
870
+ qe(this.iframe, this.options), D(this.iframe.parentNode, "The given iframe does not have a parent."), this.emulatorIframe = document.createElement("iframe"), this.emulatorIframe.classList.add("sp-bridge-frame"), (r = this.iframe.parentNode) === null || r === void 0 || r.appendChild(this.emulatorIframe);
871
+ }, n.prototype.setLocationURLIntoIFrame = function() {
872
+ return _(this, void 0, void 0, function() {
873
+ return E(this, function(e) {
874
+ switch (e.label) {
875
+ case 0:
876
+ return this.iframePreviewUrl ? [4, Ne(this.iframe, this.iframePreviewUrl)] : [3, 2];
877
+ case 1:
878
+ e.sent(), e.label = 2;
879
+ case 2:
880
+ return [
881
+ 2
882
+ /*return*/
883
+ ];
884
+ }
885
+ });
886
+ });
887
+ }, n.prototype.dispatchDoneMessage = function() {
888
+ this.status = "done", this.dispatch({ type: "done", compilatonError: !1 }), this.iframePreviewUrl && this.dispatch({
889
+ type: "urlchange",
890
+ url: this.iframePreviewUrl,
891
+ back: !1,
892
+ forward: !1
893
+ });
894
+ }, n.prototype.globalListeners = function() {
895
+ return _(this, void 0, void 0, function() {
896
+ var e = this;
897
+ return E(this, function(r) {
898
+ switch (r.label) {
899
+ case 0:
900
+ return window.addEventListener("message", function(s) {
901
+ s.data.type === Be && Ge(e.iframe, e.messageChannelId), s.data.type === "urlchange" && s.data.channelId === e.messageChannelId ? e.dispatch({
902
+ type: "urlchange",
903
+ url: s.data.url,
904
+ back: s.data.back,
905
+ forward: s.data.forward
906
+ }) : s.data.channelId === e.messageChannelId && e.dispatch(s.data);
907
+ }), [4, this.emulator.fs.watch(["*"], [
908
+ ".next",
909
+ "node_modules",
910
+ "build",
911
+ "dist",
912
+ "vendor",
913
+ ".config",
914
+ ".vuepress"
915
+ ], function(s) {
916
+ return _(e, void 0, void 0, function() {
917
+ var i, o, a, d, l, h, p;
918
+ return E(this, function(m) {
919
+ switch (m.label) {
920
+ case 0:
921
+ return s ? (i = s, o = "newPath" in i ? i.newPath : "path" in i ? i.path : "", [4, this.emulator.fs.stat(o)]) : [
922
+ 2
923
+ /*return*/
924
+ ];
925
+ case 1:
926
+ if (a = m.sent().type, a !== "file")
927
+ return [2, null];
928
+ m.label = 2;
929
+ case 2:
930
+ switch (m.trys.push([2, 10, , 11]), d = i.type, d) {
931
+ case "change":
932
+ return [3, 3];
933
+ case "create":
934
+ return [3, 3];
935
+ case "remove":
936
+ return [3, 5];
937
+ case "rename":
938
+ return [3, 6];
939
+ case "close":
940
+ return [3, 8];
941
+ }
942
+ return [3, 9];
943
+ case 3:
944
+ return [4, this.emulator.fs.readFile(i.path, "utf8")];
945
+ case 4:
946
+ return l = m.sent(), this.dispatch({
947
+ type: "fs/change",
948
+ path: i.path,
949
+ content: l
950
+ }), this._modulesCache.set(i.path, x(l)), [3, 9];
951
+ case 5:
952
+ return this.dispatch({
953
+ type: "fs/remove",
954
+ path: i.path
955
+ }), this._modulesCache.delete(i.path), [3, 9];
956
+ case 6:
957
+ return this.dispatch({
958
+ type: "fs/remove",
959
+ path: i.oldPath
960
+ }), this._modulesCache.delete(i.oldPath), [4, this.emulator.fs.readFile(i.newPath, "utf8")];
961
+ case 7:
962
+ return h = m.sent(), this.dispatch({
963
+ type: "fs/change",
964
+ path: i.newPath,
965
+ content: h
966
+ }), this._modulesCache.set(i.newPath, x(h)), [3, 9];
967
+ case 8:
968
+ return [3, 9];
969
+ case 9:
970
+ return [3, 11];
971
+ case 10:
972
+ return p = m.sent(), this.dispatch({
973
+ type: "action",
974
+ action: "notification",
975
+ notificationType: "error",
976
+ title: W(p)
977
+ }), [3, 11];
978
+ case 11:
979
+ return [
980
+ 2
981
+ /*return*/
982
+ ];
983
+ }
984
+ });
985
+ });
986
+ })];
987
+ case 1:
988
+ return r.sent(), [
989
+ 2
990
+ /*return*/
991
+ ];
992
+ }
993
+ });
994
+ });
995
+ }, n.prototype.restartShellProcess = function() {
996
+ var e;
997
+ return _(this, void 0, void 0, function() {
998
+ return E(this, function(r) {
999
+ switch (r.label) {
1000
+ case 0:
1001
+ return this.emulatorShellProcess && this.emulatorCommand ? (this.dispatch({ type: "start", firstLoad: !0 }), this.status = "initializing", [4, this.emulatorShellProcess.kill()]) : [3, 3];
1002
+ case 1:
1003
+ return r.sent(), (e = this.iframe) === null || e === void 0 || e.removeAttribute("attr"), this.emulator.fs.rm("/node_modules/.vite", {
1004
+ recursive: !0,
1005
+ force: !0
1006
+ }), [4, this.compile(Object.fromEntries(this._modulesCache))];
1007
+ case 2:
1008
+ r.sent(), r.label = 3;
1009
+ case 3:
1010
+ return [
1011
+ 2
1012
+ /*return*/
1013
+ ];
1014
+ }
1015
+ });
1016
+ });
1017
+ }, n.prototype.updateSandbox = function(e) {
1018
+ var r = this, s, i = $(e.files);
1019
+ if (((s = this.emulatorShellProcess) === null || s === void 0 ? void 0 : s.state) === "running") {
1020
+ Object.entries(i).forEach(function(o) {
1021
+ var a = o[0], d = o[1];
1022
+ (!r._modulesCache.get(a) || F(d) !== F(r._modulesCache.get(a))) && r.emulator.fs.writeFile(a, d, { recursive: !0 });
1023
+ });
1024
+ return;
1025
+ }
1026
+ this.dispatch({
1027
+ codesandbox: !0,
1028
+ modules: i,
1029
+ template: e.template,
1030
+ type: "compile"
1031
+ }), Object.entries(i).forEach(function(o) {
1032
+ var a = o[0], d = o[1];
1033
+ r._modulesCache.set(a, x(d));
1034
+ });
1035
+ }, n.prototype.dispatch = function(e) {
1036
+ var r, s;
1037
+ return _(this, void 0, void 0, function() {
1038
+ var i;
1039
+ return E(this, function(o) {
1040
+ switch (o.label) {
1041
+ case 0:
1042
+ switch (i = e.type, i) {
1043
+ case "compile":
1044
+ return [3, 1];
1045
+ case "refresh":
1046
+ return [3, 2];
1047
+ case "urlback":
1048
+ return [3, 4];
1049
+ case "urlforward":
1050
+ return [3, 4];
1051
+ case "shell/restart":
1052
+ return [3, 5];
1053
+ case "shell/openPreview":
1054
+ return [3, 6];
1055
+ }
1056
+ return [3, 7];
1057
+ case 1:
1058
+ return this.compile(e.modules), [3, 8];
1059
+ case 2:
1060
+ return [4, this.setLocationURLIntoIFrame()];
1061
+ case 3:
1062
+ return o.sent(), [3, 8];
1063
+ case 4:
1064
+ return (s = (r = this.iframe) === null || r === void 0 ? void 0 : r.contentWindow) === null || s === void 0 || s.postMessage(e, "*"), [3, 8];
1065
+ case 5:
1066
+ return this.restartShellProcess(), [3, 8];
1067
+ case 6:
1068
+ return window.open(this.iframePreviewUrl, "_blank"), [3, 8];
1069
+ case 7:
1070
+ this.emitter.dispatch(e), o.label = 8;
1071
+ case 8:
1072
+ return [
1073
+ 2
1074
+ /*return*/
1075
+ ];
1076
+ }
1077
+ });
1078
+ });
1079
+ }, n.prototype.listen = function(e) {
1080
+ return this.emitter.listener(e);
1081
+ }, n.prototype.destroy = function() {
1082
+ this.emulatorIframe.remove(), this.emitter.cleanup();
1083
+ }, n;
1084
+ })(Q)
1085
+ );
1086
+ export {
1087
+ Xe as SandpackNode
1088
+ };