@nullix/zod-mongoose-studio 3.3.2 → 3.3.3

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 (322) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{B7ScFmDB.js → 5ZXm4f56.js} +1 -1
  3. package/.output/public/_nuxt/{DbqvVYbv.js → B2fcLSyW.js} +1 -1
  4. package/.output/public/_nuxt/{DKK0Mrrg.js → BBN7l5Hn.js} +1 -1
  5. package/.output/public/_nuxt/BBTTtb8r.js +41 -0
  6. package/.output/public/_nuxt/{C8xmwXC2.js → BDbISGvP.js} +1 -1
  7. package/.output/public/_nuxt/{DJa7_7Hz.js → BijI4RNx.js} +1 -1
  8. package/.output/public/_nuxt/{BlZ0x31M.js → Bp9qkJ9m.js} +1 -1
  9. package/.output/public/_nuxt/{BcYnCaqL.js → Bu3-sqCf.js} +1 -1
  10. package/.output/public/_nuxt/{C919AVYR.js → C-FtTvwz.js} +1 -1
  11. package/.output/public/_nuxt/C02JV0Aj.js +1 -0
  12. package/.output/public/_nuxt/{Bbi9UBvi.js → C1UkIsDc.js} +1 -1
  13. package/.output/public/_nuxt/{PXBhK7S_.js → CJT28r6J.js} +1 -1
  14. package/.output/public/_nuxt/{BC9tFNFa.js → CL7qtgl2.js} +3 -3
  15. package/.output/public/_nuxt/{B6lqezyA.js → CRMd2YH2.js} +3 -3
  16. package/.output/public/_nuxt/{YC-RLggm.js → CRkdQgFz.js} +1 -1
  17. package/.output/public/_nuxt/{iKW_mt0p.js → Cw1XFOz5.js} +1 -1
  18. package/.output/public/_nuxt/{d1NBz903.js → D5yWk6Ly.js} +1 -1
  19. package/.output/public/_nuxt/{iGzUozbF.js → DA9GjKpR.js} +1 -1
  20. package/.output/public/_nuxt/{JkiDMdYG.js → DaWAlZhp.js} +1 -1
  21. package/.output/public/_nuxt/{OVQ3C2Ge.js → DafLMUHo.js} +1 -1
  22. package/.output/public/_nuxt/{Bw82IGM8.js → Dyaldc-t.js} +1 -1
  23. package/.output/public/_nuxt/{CsQL5F-l.js → UU9fpRNQ.js} +1 -1
  24. package/.output/public/_nuxt/builds/latest.json +1 -1
  25. package/.output/public/_nuxt/builds/meta/717459d8-0da1-42ed-af0b-9ec5395e8fdc.json +1 -0
  26. package/.output/public/_nuxt/entry.CDPplHzk.css +1 -0
  27. package/.output/public/_nuxt/error-404.hPtlUQpd.css +1 -0
  28. package/.output/public/_nuxt/error-500.E-PXUb6B.css +1 -0
  29. package/.output/public/_nuxt/{DbUZZZZu.js → kFZJW2-u.js} +2 -2
  30. package/.output/public/_nuxt/{B8gqXD2U.js → u3DlT5Mh.js} +1 -1
  31. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  32. package/.output/server/chunks/_/parse-request.mjs +29 -0
  33. package/.output/server/chunks/_/parse-request.mjs.map +1 -0
  34. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  35. package/.output/server/chunks/build/{error-404-KRkA0DPI.mjs → error-404-aQ5PiVuX.mjs} +6 -12
  36. package/.output/server/chunks/build/error-404-aQ5PiVuX.mjs.map +1 -0
  37. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs +8 -0
  38. package/.output/server/chunks/build/error-404-styles.DIZfBVBR.mjs.map +1 -0
  39. package/.output/server/chunks/build/{error-500-DIIFf55p.mjs → error-500-BY6ZAZZ2.mjs} +6 -12
  40. package/.output/server/chunks/build/error-500-BY6ZAZZ2.mjs.map +1 -0
  41. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs +8 -0
  42. package/.output/server/chunks/build/error-500-styles.BZXgEzR5.mjs.map +1 -0
  43. package/.output/server/chunks/build/index-57_mtIua.mjs +235 -0
  44. package/.output/server/chunks/build/index-57_mtIua.mjs.map +1 -0
  45. package/.output/server/chunks/build/{index-CB1N4gax.mjs → index-Qa-4KqCB.mjs} +7 -13
  46. package/.output/server/chunks/build/index-Qa-4KqCB.mjs.map +1 -0
  47. package/.output/server/chunks/build/server.mjs +3913 -3378
  48. package/.output/server/chunks/build/server.mjs.map +1 -1
  49. package/.output/server/chunks/build/styles.mjs +4 -4
  50. package/.output/server/chunks/nitro/nitro.mjs +562 -2188
  51. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  52. package/.output/server/chunks/routes/api/editor-types.get.mjs +0 -6
  53. package/.output/server/chunks/routes/api/editor-types.get.mjs.map +1 -1
  54. package/.output/server/chunks/routes/api/parse.post.mjs +1599 -7
  55. package/.output/server/chunks/routes/api/parse.post.mjs.map +1 -1
  56. package/.output/server/chunks/routes/api/resolve.get.mjs +0 -6
  57. package/.output/server/chunks/routes/api/resolve.get.mjs.map +1 -1
  58. package/.output/server/chunks/routes/api/studio/run.post.mjs +41 -8
  59. package/.output/server/chunks/routes/api/studio/run.post.mjs.map +1 -1
  60. package/.output/server/chunks/routes/renderer.mjs +21 -44
  61. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  62. package/.output/server/index.mjs +1 -7
  63. package/.output/server/index.mjs.map +1 -1
  64. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/dist/compiler-core.cjs.prod.js +6801 -0
  65. package/.output/server/node_modules/.nitro/@vue/compiler-core@3.5.43/package.json +58 -0
  66. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/dist/compiler-dom.cjs.prod.js +692 -0
  67. package/.output/server/node_modules/.nitro/@vue/compiler-dom@3.5.43/package.json +57 -0
  68. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/dist/reactivity.cjs.prod.js +1905 -0
  69. package/.output/server/node_modules/.nitro/@vue/reactivity@3.5.43/package.json +55 -0
  70. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/dist/runtime-core.cjs.prod.js +7006 -0
  71. package/.output/server/node_modules/.nitro/@vue/runtime-core@3.5.43/package.json +52 -0
  72. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/dist/runtime-dom.cjs.prod.js +1867 -0
  73. package/.output/server/node_modules/.nitro/@vue/runtime-dom@3.5.43/package.json +60 -0
  74. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/dist/shared.cjs.prod.js +655 -0
  75. package/.output/server/node_modules/.nitro/@vue/shared@3.5.43/package.json +47 -0
  76. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/array-set.js +121 -0
  77. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64-vlq.js +140 -0
  78. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/base64.js +67 -0
  79. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/binary-search.js +111 -0
  80. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/mapping-list.js +79 -0
  81. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/quick-sort.js +141 -0
  82. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-consumer.js +1236 -0
  83. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-map-generator.js +446 -0
  84. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/source-node.js +420 -0
  85. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/lib/util.js +594 -0
  86. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/package.json +71 -0
  87. package/.output/server/node_modules/.nitro/source-map-js@1.2.2/source-map.js +8 -0
  88. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.js +80 -0
  89. package/.output/server/node_modules/.nitro/vue@3.5.43/dist/vue.cjs.prod.js +66 -0
  90. package/.output/server/node_modules/.nitro/vue@3.5.43/index.js +7 -0
  91. package/.output/server/node_modules/.nitro/vue@3.5.43/index.mjs +1 -0
  92. package/.output/server/node_modules/.nitro/vue@3.5.43/package.json +112 -0
  93. package/.output/server/node_modules/@babel/parser/lib/index.js +55 -21
  94. package/.output/server/node_modules/@babel/parser/package.json +7 -7
  95. package/.output/server/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  96. package/.output/server/node_modules/@esbuild/linux-x64/package.json +1 -1
  97. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +19 -16
  98. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +3 -4
  99. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +16 -16
  100. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +1 -2
  101. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +11 -14
  102. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +13 -16
  103. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +1 -2
  104. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +1 -3
  105. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +2 -5
  106. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +1 -3
  107. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +4 -5
  108. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +1 -3
  109. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +9 -11
  110. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +1 -2
  111. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +1 -3
  112. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +1 -3
  113. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +12 -18
  114. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +3 -4
  115. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +5 -7
  116. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +1 -8
  117. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +11 -12
  118. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +5 -7
  119. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +1 -3
  120. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +1 -3
  121. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +7 -7
  122. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +2 -4
  123. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +5 -9
  124. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +3 -5
  125. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +2 -4
  126. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +7 -8
  127. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +1 -2
  128. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +1 -3
  129. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +3 -4
  130. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +1 -2
  131. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +1 -2
  132. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +10 -15
  133. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +1 -3
  134. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +3 -5
  135. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +1 -3
  136. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +1 -3
  137. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +1 -3
  138. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +1 -2
  139. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +1 -3
  140. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +21 -13
  141. package/.output/server/node_modules/@iconify/utils/lib/index.js +1 -2
  142. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +3 -3
  143. package/.output/server/node_modules/@iconify/utils/lib/loader/hmr-utils.js +33 -0
  144. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +22 -22
  145. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +7 -22
  146. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +60 -16
  147. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +1 -2
  148. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +1 -2
  149. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +1 -2
  150. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +9 -11
  151. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +1 -2
  152. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +1 -3
  153. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +1 -2
  154. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +1 -2
  155. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +1 -2
  156. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +3 -5
  157. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +5 -4
  158. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +1 -2
  159. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +1 -2
  160. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +1 -2
  161. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +2 -3
  162. package/.output/server/node_modules/@iconify/utils/package.json +15 -13
  163. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +8 -1
  164. package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
  165. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +34 -13
  166. package/.output/server/node_modules/@vue/server-renderer/package.json +4 -6
  167. package/.output/server/node_modules/devalue/index.js +15 -2
  168. package/.output/server/node_modules/devalue/package.json +5 -3
  169. package/.output/server/node_modules/devalue/src/base64.js +46 -96
  170. package/.output/server/node_modules/devalue/src/constants.js +5 -0
  171. package/.output/server/node_modules/devalue/src/operations.js +221 -0
  172. package/.output/server/node_modules/devalue/src/parse.js +76 -62
  173. package/.output/server/node_modules/devalue/src/stringify.js +164 -81
  174. package/.output/server/node_modules/devalue/src/uneval.js +312 -104
  175. package/.output/server/node_modules/devalue/src/utils.js +61 -19
  176. package/.output/server/node_modules/esbuild/lib/main.js +12 -8
  177. package/.output/server/node_modules/esbuild/package.json +50 -50
  178. package/.output/server/node_modules/hookable/dist/index.mjs +2 -11
  179. package/.output/server/node_modules/hookable/package.json +23 -22
  180. package/.output/server/node_modules/ip-address/dist/ipv4.js +7 -0
  181. package/.output/server/node_modules/ip-address/package.json +1 -1
  182. package/.output/server/node_modules/zod/package.json +20 -8
  183. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
  184. package/.output/server/node_modules/zod/v4/classic/deep-partial.js +13 -0
  185. package/.output/server/node_modules/zod/v4/classic/errors.js +44 -35
  186. package/.output/server/node_modules/zod/v4/classic/external.js +5 -8
  187. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +375 -78
  188. package/.output/server/node_modules/zod/v4/classic/in-out.js +36 -0
  189. package/.output/server/node_modules/zod/v4/classic/index.js +2 -2
  190. package/.output/server/node_modules/zod/v4/classic/iso.js +2 -17
  191. package/.output/server/node_modules/zod/v4/classic/package.json +2 -1
  192. package/.output/server/node_modules/zod/v4/classic/parse.js +1 -0
  193. package/.output/server/node_modules/zod/v4/classic/schemas.js +601 -223
  194. package/.output/server/node_modules/zod/v4/core/api.js +51 -26
  195. package/.output/server/node_modules/zod/v4/core/checks.js +68 -127
  196. package/.output/server/node_modules/zod/v4/core/compile.js +1858 -0
  197. package/.output/server/node_modules/zod/v4/core/core.js +87 -22
  198. package/.output/server/node_modules/zod/v4/core/doc.js +12 -9
  199. package/.output/server/node_modules/zod/v4/core/errors.js +127 -42
  200. package/.output/server/node_modules/zod/v4/core/index.js +3 -0
  201. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  202. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +413 -175
  203. package/.output/server/node_modules/zod/v4/core/memoizer.js +311 -0
  204. package/.output/server/node_modules/zod/v4/core/package.json +2 -1
  205. package/.output/server/node_modules/zod/v4/core/parse.js +130 -48
  206. package/.output/server/node_modules/zod/v4/core/regexes.js +39 -16
  207. package/.output/server/node_modules/zod/v4/core/registries.js +2 -2
  208. package/.output/server/node_modules/zod/v4/core/schemas.js +895 -382
  209. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +253 -39
  210. package/.output/server/node_modules/zod/v4/core/util.js +383 -175
  211. package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
  212. package/.output/server/node_modules/zod/v4/core/visit.js +169 -0
  213. package/.output/server/node_modules/zod/v4/index.js +3 -2
  214. package/.output/server/node_modules/zod/v4/locales/ar.js +5 -0
  215. package/.output/server/node_modules/zod/v4/locales/az.js +5 -0
  216. package/.output/server/node_modules/zod/v4/locales/be.js +12 -0
  217. package/.output/server/node_modules/zod/v4/locales/bg.js +5 -0
  218. package/.output/server/node_modules/zod/v4/locales/bn.js +113 -0
  219. package/.output/server/node_modules/zod/v4/locales/ca.js +5 -0
  220. package/.output/server/node_modules/zod/v4/locales/ckb.js +133 -0
  221. package/.output/server/node_modules/zod/v4/locales/cs.js +5 -0
  222. package/.output/server/node_modules/zod/v4/locales/da.js +7 -2
  223. package/.output/server/node_modules/zod/v4/locales/de.js +5 -0
  224. package/.output/server/node_modules/zod/v4/locales/el.js +112 -0
  225. package/.output/server/node_modules/zod/v4/locales/en.js +20 -4
  226. package/.output/server/node_modules/zod/v4/locales/eo.js +5 -0
  227. package/.output/server/node_modules/zod/v4/locales/es.js +4 -0
  228. package/.output/server/node_modules/zod/v4/locales/fa.js +5 -0
  229. package/.output/server/node_modules/zod/v4/locales/fi.js +5 -0
  230. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +5 -0
  231. package/.output/server/node_modules/zod/v4/locales/fr.js +38 -17
  232. package/.output/server/node_modules/zod/v4/locales/gu.js +113 -0
  233. package/.output/server/node_modules/zod/v4/locales/he.js +7 -0
  234. package/.output/server/node_modules/zod/v4/locales/hi.js +111 -0
  235. package/.output/server/node_modules/zod/v4/locales/hr.js +126 -0
  236. package/.output/server/node_modules/zod/v4/locales/hu.js +5 -0
  237. package/.output/server/node_modules/zod/v4/locales/hy.js +11 -0
  238. package/.output/server/node_modules/zod/v4/locales/id.js +5 -0
  239. package/.output/server/node_modules/zod/v4/locales/index.js +14 -0
  240. package/.output/server/node_modules/zod/v4/locales/is.js +5 -0
  241. package/.output/server/node_modules/zod/v4/locales/it.js +6 -1
  242. package/.output/server/node_modules/zod/v4/locales/ja.js +5 -0
  243. package/.output/server/node_modules/zod/v4/locales/ka.js +13 -8
  244. package/.output/server/node_modules/zod/v4/locales/km.js +5 -0
  245. package/.output/server/node_modules/zod/v4/locales/kn.js +116 -0
  246. package/.output/server/node_modules/zod/v4/locales/ko.js +5 -0
  247. package/.output/server/node_modules/zod/v4/locales/lt.js +4 -0
  248. package/.output/server/node_modules/zod/v4/locales/mk.js +5 -0
  249. package/.output/server/node_modules/zod/v4/locales/ms.js +5 -0
  250. package/.output/server/node_modules/zod/v4/locales/ne.js +111 -0
  251. package/.output/server/node_modules/zod/v4/locales/nl.js +5 -0
  252. package/.output/server/node_modules/zod/v4/locales/nn.js +113 -0
  253. package/.output/server/node_modules/zod/v4/locales/no.js +7 -2
  254. package/.output/server/node_modules/zod/v4/locales/ota.js +5 -0
  255. package/.output/server/node_modules/zod/v4/locales/package.json +2 -1
  256. package/.output/server/node_modules/zod/v4/locales/pl.js +5 -0
  257. package/.output/server/node_modules/zod/v4/locales/ps.js +5 -0
  258. package/.output/server/node_modules/zod/v4/locales/pt-BR.js +143 -0
  259. package/.output/server/node_modules/zod/v4/locales/pt.js +89 -55
  260. package/.output/server/node_modules/zod/v4/locales/ro.js +122 -0
  261. package/.output/server/node_modules/zod/v4/locales/ru.js +12 -0
  262. package/.output/server/node_modules/zod/v4/locales/sk.js +116 -0
  263. package/.output/server/node_modules/zod/v4/locales/sl.js +5 -0
  264. package/.output/server/node_modules/zod/v4/locales/sv.js +7 -2
  265. package/.output/server/node_modules/zod/v4/locales/ta.js +5 -0
  266. package/.output/server/node_modules/zod/v4/locales/tg.js +117 -0
  267. package/.output/server/node_modules/zod/v4/locales/th.js +5 -0
  268. package/.output/server/node_modules/zod/v4/locales/tk.js +107 -0
  269. package/.output/server/node_modules/zod/v4/locales/tr.js +5 -0
  270. package/.output/server/node_modules/zod/v4/locales/uk.js +5 -0
  271. package/.output/server/node_modules/zod/v4/locales/ur.js +5 -0
  272. package/.output/server/node_modules/zod/v4/locales/uz.js +4 -0
  273. package/.output/server/node_modules/zod/v4/locales/vi.js +5 -0
  274. package/.output/server/node_modules/zod/v4/locales/yo.js +5 -0
  275. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +5 -0
  276. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +5 -0
  277. package/.output/server/node_modules/zod/v4/package.json +2 -1
  278. package/.output/server/package.json +18 -18
  279. package/README.md +9 -0
  280. package/package.json +8 -8
  281. package/.output/public/_nuxt/Czp4_2o-.js +0 -33
  282. package/.output/public/_nuxt/builds/meta/46174b5e-cab6-4a73-95f8-66a1c9b1be2b.json +0 -1
  283. package/.output/public/_nuxt/entry.DaqrxXuH.css +0 -1
  284. package/.output/public/_nuxt/error-404.CTSXlFYa.css +0 -1
  285. package/.output/public/_nuxt/error-500.DqEfQnVZ.css +0 -1
  286. package/.output/server/chunks/build/error-404-KRkA0DPI.mjs.map +0 -1
  287. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs +0 -8
  288. package/.output/server/chunks/build/error-404-styles.I0NYw-Bn.mjs.map +0 -1
  289. package/.output/server/chunks/build/error-500-DIIFf55p.mjs.map +0 -1
  290. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs +0 -8
  291. package/.output/server/chunks/build/error-500-styles.D1cs9hQy.mjs.map +0 -1
  292. package/.output/server/chunks/build/index-CB1N4gax.mjs.map +0 -1
  293. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/dist/compiler-core.cjs.prod.js +0 -0
  294. /package/.output/server/node_modules/{@vue/compiler-core → .nitro/@vue/compiler-core@3.5.32}/package.json +0 -0
  295. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/dist/compiler-dom.cjs.prod.js +0 -0
  296. /package/.output/server/node_modules/{@vue/compiler-dom → .nitro/@vue/compiler-dom@3.5.32}/package.json +0 -0
  297. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/dist/reactivity.cjs.prod.js +0 -0
  298. /package/.output/server/node_modules/{@vue/reactivity → .nitro/@vue/reactivity@3.5.32}/package.json +0 -0
  299. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/dist/runtime-core.cjs.prod.js +0 -0
  300. /package/.output/server/node_modules/{@vue/runtime-core → .nitro/@vue/runtime-core@3.5.32}/package.json +0 -0
  301. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/dist/runtime-dom.cjs.prod.js +0 -0
  302. /package/.output/server/node_modules/{@vue/runtime-dom → .nitro/@vue/runtime-dom@3.5.32}/package.json +0 -0
  303. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/dist/shared.cjs.prod.js +0 -0
  304. /package/.output/server/node_modules/{@vue/shared → .nitro/@vue/shared@3.5.32}/package.json +0 -0
  305. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/array-set.js +0 -0
  306. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64-vlq.js +0 -0
  307. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/base64.js +0 -0
  308. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/binary-search.js +0 -0
  309. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/mapping-list.js +0 -0
  310. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/quick-sort.js +0 -0
  311. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-consumer.js +0 -0
  312. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-map-generator.js +0 -0
  313. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/source-node.js +0 -0
  314. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/lib/util.js +0 -0
  315. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/package.json +0 -0
  316. /package/.output/server/node_modules/{source-map-js → .nitro/source-map-js@1.2.1}/source-map.js +0 -0
  317. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.js +0 -0
  318. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/dist/vue.cjs.prod.js +0 -0
  319. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.js +0 -0
  320. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/index.mjs +0 -0
  321. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.32}/package.json +0 -0
  322. /package/.output/server/node_modules/{vue → .nitro/vue@3.5.43}/server-renderer/index.mjs +0 -0
@@ -0,0 +1,1236 @@
1
+ /* -*- Mode: js; js-indent-level: 2; -*- */
2
+ /*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+ var util = require('./util');
9
+ var binarySearch = require('./binary-search');
10
+ var ArraySet = require('./array-set').ArraySet;
11
+ var base64VLQ = require('./base64-vlq');
12
+ var quickSort = require('./quick-sort').quickSort;
13
+
14
+ // Upper bound for a section's `offset.line` in an indexed source map. A flat
15
+ // map spends one ';' per generated line, so a tiny indexed map with a huge
16
+ // offset.line turns into a huge amount of work and memory once its mappings
17
+ // are copied into a SourceMapGenerator (CVE-2026-93749). Ten million lines is
18
+ // far beyond any real generated file. Columns are VLQ-encoded as deltas and
19
+ // don't amplify, so they only need to be valid integers.
20
+ var MAX_SECTION_OFFSET_LINE = 1e7;
21
+
22
+ function SourceMapConsumer(aSourceMap, aSourceMapURL) {
23
+ var sourceMap = aSourceMap;
24
+ if (typeof aSourceMap === 'string') {
25
+ sourceMap = util.parseSourceMapInput(aSourceMap);
26
+ }
27
+
28
+ return sourceMap.sections != null
29
+ ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)
30
+ : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
31
+ }
32
+
33
+ SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
34
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
35
+ }
36
+
37
+ /**
38
+ * The version of the source mapping spec that we are consuming.
39
+ */
40
+ SourceMapConsumer.prototype._version = 3;
41
+
42
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
43
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
44
+ // are lazily instantiated, accessed via the `_generatedMappings` and
45
+ // `_originalMappings` getters respectively, and we only parse the mappings
46
+ // and create these arrays once queried for a source location. We jump through
47
+ // these hoops because there can be many thousands of mappings, and parsing
48
+ // them is expensive, so we only want to do it if we must.
49
+ //
50
+ // Each object in the arrays is of the form:
51
+ //
52
+ // {
53
+ // generatedLine: The line number in the generated code,
54
+ // generatedColumn: The column number in the generated code,
55
+ // source: The path to the original source file that generated this
56
+ // chunk of code,
57
+ // originalLine: The line number in the original source that
58
+ // corresponds to this chunk of generated code,
59
+ // originalColumn: The column number in the original source that
60
+ // corresponds to this chunk of generated code,
61
+ // name: The name of the original symbol which generated this chunk of
62
+ // code.
63
+ // }
64
+ //
65
+ // All properties except for `generatedLine` and `generatedColumn` can be
66
+ // `null`.
67
+ //
68
+ // `_generatedMappings` is ordered by the generated positions.
69
+ //
70
+ // `_originalMappings` is ordered by the original positions.
71
+
72
+ SourceMapConsumer.prototype.__generatedMappings = null;
73
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
74
+ configurable: true,
75
+ enumerable: true,
76
+ get: function () {
77
+ if (!this.__generatedMappings) {
78
+ this._parseMappings(this._mappings, this.sourceRoot);
79
+ }
80
+
81
+ return this.__generatedMappings;
82
+ }
83
+ });
84
+
85
+ SourceMapConsumer.prototype.__originalMappings = null;
86
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
87
+ configurable: true,
88
+ enumerable: true,
89
+ get: function () {
90
+ if (!this.__originalMappings) {
91
+ this._parseMappings(this._mappings, this.sourceRoot);
92
+ }
93
+
94
+ return this.__originalMappings;
95
+ }
96
+ });
97
+
98
+ SourceMapConsumer.prototype._charIsMappingSeparator =
99
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
100
+ var c = aStr.charAt(index);
101
+ return c === ";" || c === ",";
102
+ };
103
+
104
+ /**
105
+ * Parse the mappings in a string in to a data structure which we can easily
106
+ * query (the ordered arrays in the `this.__generatedMappings` and
107
+ * `this.__originalMappings` properties).
108
+ */
109
+ SourceMapConsumer.prototype._parseMappings =
110
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
111
+ throw new Error("Subclasses must implement _parseMappings");
112
+ };
113
+
114
+ SourceMapConsumer.GENERATED_ORDER = 1;
115
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
116
+
117
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
118
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
119
+
120
+ /**
121
+ * Iterate over each mapping between an original source/line/column and a
122
+ * generated line/column in this source map.
123
+ *
124
+ * @param Function aCallback
125
+ * The function that is called with each mapping.
126
+ * @param Object aContext
127
+ * Optional. If specified, this object will be the value of `this` every
128
+ * time that `aCallback` is called.
129
+ * @param aOrder
130
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
131
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
132
+ * iterate over the mappings sorted by the generated file's line/column
133
+ * order or the original's source/line/column order, respectively. Defaults to
134
+ * `SourceMapConsumer.GENERATED_ORDER`.
135
+ */
136
+ SourceMapConsumer.prototype.eachMapping =
137
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
138
+ var context = aContext || null;
139
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
140
+
141
+ var mappings;
142
+ switch (order) {
143
+ case SourceMapConsumer.GENERATED_ORDER:
144
+ mappings = this._generatedMappings;
145
+ break;
146
+ case SourceMapConsumer.ORIGINAL_ORDER:
147
+ mappings = this._originalMappings;
148
+ break;
149
+ default:
150
+ throw new Error("Unknown order of iteration.");
151
+ }
152
+
153
+ var sourceRoot = this.sourceRoot;
154
+ var boundCallback = aCallback.bind(context);
155
+ var names = this._names;
156
+ var sources = this._sources;
157
+ var sourceMapURL = this._sourceMapURL;
158
+
159
+ for (var i = 0, n = mappings.length; i < n; i++) {
160
+ var mapping = mappings[i];
161
+ var source = mapping.source === null ? null : sources.at(mapping.source);
162
+ if(source !== null) {
163
+ source = util.computeSourceURL(sourceRoot, source, sourceMapURL);
164
+ }
165
+ boundCallback({
166
+ source: source,
167
+ generatedLine: mapping.generatedLine,
168
+ generatedColumn: mapping.generatedColumn,
169
+ originalLine: mapping.originalLine,
170
+ originalColumn: mapping.originalColumn,
171
+ name: mapping.name === null ? null : names.at(mapping.name)
172
+ });
173
+ }
174
+ };
175
+
176
+ /**
177
+ * Returns all generated line and column information for the original source,
178
+ * line, and column provided. If no column is provided, returns all mappings
179
+ * corresponding to a either the line we are searching for or the next
180
+ * closest line that has any mappings. Otherwise, returns all mappings
181
+ * corresponding to the given line and either the column we are searching for
182
+ * or the next closest column that has any offsets.
183
+ *
184
+ * The only argument is an object with the following properties:
185
+ *
186
+ * - source: The filename of the original source.
187
+ * - line: The line number in the original source. The line number is 1-based.
188
+ * - column: Optional. the column number in the original source.
189
+ * The column number is 0-based.
190
+ *
191
+ * and an array of objects is returned, each with the following properties:
192
+ *
193
+ * - line: The line number in the generated source, or null. The
194
+ * line number is 1-based.
195
+ * - column: The column number in the generated source, or null.
196
+ * The column number is 0-based.
197
+ */
198
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
199
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
200
+ var line = util.getArg(aArgs, 'line');
201
+
202
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
203
+ // returns the index of the closest mapping less than the needle. By
204
+ // setting needle.originalColumn to 0, we thus find the last mapping for
205
+ // the given line, provided such a mapping exists.
206
+ var needle = {
207
+ source: util.getArg(aArgs, 'source'),
208
+ originalLine: line,
209
+ originalColumn: util.getArg(aArgs, 'column', 0)
210
+ };
211
+
212
+ needle.source = this._findSourceIndex(needle.source);
213
+ if (needle.source < 0) {
214
+ return [];
215
+ }
216
+
217
+ var mappings = [];
218
+
219
+ var index = this._findMapping(needle,
220
+ this._originalMappings,
221
+ "originalLine",
222
+ "originalColumn",
223
+ util.compareByOriginalPositions,
224
+ binarySearch.LEAST_UPPER_BOUND);
225
+ if (index >= 0) {
226
+ var mapping = this._originalMappings[index];
227
+
228
+ if (aArgs.column === undefined) {
229
+ var originalLine = mapping.originalLine;
230
+
231
+ // Iterate until either we run out of mappings, or we run into
232
+ // a mapping for a different line than the one we found. Since
233
+ // mappings are sorted, this is guaranteed to find all mappings for
234
+ // the line we found.
235
+ while (mapping && mapping.originalLine === originalLine) {
236
+ mappings.push({
237
+ line: util.getArg(mapping, 'generatedLine', null),
238
+ column: util.getArg(mapping, 'generatedColumn', null),
239
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
240
+ });
241
+
242
+ mapping = this._originalMappings[++index];
243
+ }
244
+ } else {
245
+ var originalColumn = mapping.originalColumn;
246
+
247
+ // Iterate until either we run out of mappings, or we run into
248
+ // a mapping for a different line than the one we were searching for.
249
+ // Since mappings are sorted, this is guaranteed to find all mappings for
250
+ // the line we are searching for.
251
+ while (mapping &&
252
+ mapping.originalLine === line &&
253
+ mapping.originalColumn == originalColumn) {
254
+ mappings.push({
255
+ line: util.getArg(mapping, 'generatedLine', null),
256
+ column: util.getArg(mapping, 'generatedColumn', null),
257
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
258
+ });
259
+
260
+ mapping = this._originalMappings[++index];
261
+ }
262
+ }
263
+ }
264
+
265
+ return mappings;
266
+ };
267
+
268
+ exports.SourceMapConsumer = SourceMapConsumer;
269
+
270
+ /**
271
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
272
+ * query for information about the original file positions by giving it a file
273
+ * position in the generated source.
274
+ *
275
+ * The first parameter is the raw source map (either as a JSON string, or
276
+ * already parsed to an object). According to the spec, source maps have the
277
+ * following attributes:
278
+ *
279
+ * - version: Which version of the source map spec this map is following.
280
+ * - sources: An array of URLs to the original source files.
281
+ * - names: An array of identifiers which can be referrenced by individual mappings.
282
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
283
+ * - sourcesContent: Optional. An array of contents of the original source files.
284
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
285
+ * - file: Optional. The generated file this source map is associated with.
286
+ *
287
+ * Here is an example source map, taken from the source map spec[0]:
288
+ *
289
+ * {
290
+ * version : 3,
291
+ * file: "out.js",
292
+ * sourceRoot : "",
293
+ * sources: ["foo.js", "bar.js"],
294
+ * names: ["src", "maps", "are", "fun"],
295
+ * mappings: "AA,AB;;ABCDE;"
296
+ * }
297
+ *
298
+ * The second parameter, if given, is a string whose value is the URL
299
+ * at which the source map was found. This URL is used to compute the
300
+ * sources array.
301
+ *
302
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
303
+ */
304
+ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
305
+ var sourceMap = aSourceMap;
306
+ if (typeof aSourceMap === 'string') {
307
+ sourceMap = util.parseSourceMapInput(aSourceMap);
308
+ }
309
+
310
+ var version = util.getArg(sourceMap, 'version');
311
+ var sources = util.getArg(sourceMap, 'sources');
312
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
313
+ // requires the array) to play nice here.
314
+ var names = util.getArg(sourceMap, 'names', []);
315
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
316
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
317
+ var mappings = util.getArg(sourceMap, 'mappings');
318
+ var file = util.getArg(sourceMap, 'file', null);
319
+
320
+ // Once again, Sass deviates from the spec and supplies the version as a
321
+ // string rather than a number, so we use loose equality checking here.
322
+ if (version != this._version) {
323
+ throw new Error('Unsupported version: ' + version);
324
+ }
325
+
326
+ if (sourceRoot) {
327
+ sourceRoot = util.normalize(sourceRoot);
328
+ }
329
+
330
+ sources = sources
331
+ .map(String)
332
+ // Some source maps produce relative source paths like "./foo.js" instead of
333
+ // "foo.js". Normalize these first so that future comparisons will succeed.
334
+ // See bugzil.la/1090768.
335
+ .map(util.normalize)
336
+ // Always ensure that absolute sources are internally stored relative to
337
+ // the source root, if the source root is absolute. Not doing this would
338
+ // be particularly problematic when the source root is a prefix of the
339
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
340
+ .map(function (source) {
341
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
342
+ ? util.relative(sourceRoot, source)
343
+ : source;
344
+ });
345
+
346
+ // Pass `true` below to allow duplicate names and sources. While source maps
347
+ // are intended to be compressed and deduplicated, the TypeScript compiler
348
+ // sometimes generates source maps with duplicates in them. See Github issue
349
+ // #72 and bugzil.la/889492.
350
+ this._names = ArraySet.fromArray(names.map(String), true);
351
+ this._sources = ArraySet.fromArray(sources, true);
352
+
353
+ this._absoluteSources = this._sources.toArray().map(function (s) {
354
+ return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
355
+ });
356
+
357
+ this.sourceRoot = sourceRoot;
358
+ this.sourcesContent = sourcesContent;
359
+ this._mappings = mappings;
360
+ this._sourceMapURL = aSourceMapURL;
361
+ this.file = file;
362
+ }
363
+
364
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
365
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
366
+
367
+ /**
368
+ * Utility function to find the index of a source. Returns -1 if not
369
+ * found.
370
+ */
371
+ BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
372
+ var relativeSource = aSource;
373
+ if (this.sourceRoot != null) {
374
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
375
+ }
376
+
377
+ if (this._sources.has(relativeSource)) {
378
+ return this._sources.indexOf(relativeSource);
379
+ }
380
+
381
+ // Maybe aSource is an absolute URL as returned by |sources|. In
382
+ // this case we can't simply undo the transform.
383
+ var i;
384
+ for (i = 0; i < this._absoluteSources.length; ++i) {
385
+ if (this._absoluteSources[i] == aSource) {
386
+ return i;
387
+ }
388
+ }
389
+
390
+ return -1;
391
+ };
392
+
393
+ /**
394
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
395
+ *
396
+ * @param SourceMapGenerator aSourceMap
397
+ * The source map that will be consumed.
398
+ * @param String aSourceMapURL
399
+ * The URL at which the source map can be found (optional)
400
+ * @returns BasicSourceMapConsumer
401
+ */
402
+ BasicSourceMapConsumer.fromSourceMap =
403
+ function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
404
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
405
+
406
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
407
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
408
+ smc.sourceRoot = aSourceMap._sourceRoot;
409
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
410
+ smc.sourceRoot);
411
+ smc.file = aSourceMap._file;
412
+ smc._sourceMapURL = aSourceMapURL;
413
+ smc._absoluteSources = smc._sources.toArray().map(function (s) {
414
+ return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
415
+ });
416
+
417
+ // Because we are modifying the entries (by converting string sources and
418
+ // names to indices into the sources and names ArraySets), we have to make
419
+ // a copy of the entry or else bad things happen. Shared mutable state
420
+ // strikes again! See github issue #191.
421
+
422
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
423
+ var destGeneratedMappings = smc.__generatedMappings = [];
424
+ var destOriginalMappings = smc.__originalMappings = [];
425
+
426
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
427
+ var srcMapping = generatedMappings[i];
428
+ var destMapping = new Mapping;
429
+ destMapping.generatedLine = srcMapping.generatedLine;
430
+ destMapping.generatedColumn = srcMapping.generatedColumn;
431
+
432
+ if (srcMapping.source) {
433
+ destMapping.source = sources.indexOf(srcMapping.source);
434
+ destMapping.originalLine = srcMapping.originalLine;
435
+ destMapping.originalColumn = srcMapping.originalColumn;
436
+
437
+ if (srcMapping.name) {
438
+ destMapping.name = names.indexOf(srcMapping.name);
439
+ }
440
+
441
+ destOriginalMappings.push(destMapping);
442
+ }
443
+
444
+ destGeneratedMappings.push(destMapping);
445
+ }
446
+
447
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
448
+
449
+ return smc;
450
+ };
451
+
452
+ /**
453
+ * The version of the source mapping spec that we are consuming.
454
+ */
455
+ BasicSourceMapConsumer.prototype._version = 3;
456
+
457
+ /**
458
+ * The list of original sources.
459
+ */
460
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
461
+ get: function () {
462
+ return this._absoluteSources.slice();
463
+ }
464
+ });
465
+
466
+ /**
467
+ * Provide the JIT with a nice shape / hidden class.
468
+ */
469
+ function Mapping() {
470
+ this.generatedLine = 0;
471
+ this.generatedColumn = 0;
472
+ this.source = null;
473
+ this.originalLine = null;
474
+ this.originalColumn = null;
475
+ this.name = null;
476
+ }
477
+
478
+ /**
479
+ * Parse the mappings in a string in to a data structure which we can easily
480
+ * query (the ordered arrays in the `this.__generatedMappings` and
481
+ * `this.__originalMappings` properties).
482
+ */
483
+
484
+ const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;
485
+ function sortGenerated(array, start) {
486
+ let l = array.length;
487
+ let n = array.length - start;
488
+ if (n <= 1) {
489
+ return;
490
+ } else if (n == 2) {
491
+ let a = array[start];
492
+ let b = array[start + 1];
493
+ if (compareGenerated(a, b) > 0) {
494
+ array[start] = b;
495
+ array[start + 1] = a;
496
+ }
497
+ } else if (n < 20) {
498
+ for (let i = start; i < l; i++) {
499
+ for (let j = i; j > start; j--) {
500
+ let a = array[j - 1];
501
+ let b = array[j];
502
+ if (compareGenerated(a, b) <= 0) {
503
+ break;
504
+ }
505
+ array[j - 1] = b;
506
+ array[j] = a;
507
+ }
508
+ }
509
+ } else {
510
+ quickSort(array, compareGenerated, start);
511
+ }
512
+ }
513
+ BasicSourceMapConsumer.prototype._parseMappings =
514
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
515
+ var generatedLine = 1;
516
+ var previousGeneratedColumn = 0;
517
+ var previousOriginalLine = 0;
518
+ var previousOriginalColumn = 0;
519
+ var previousSource = 0;
520
+ var previousName = 0;
521
+ var length = aStr.length;
522
+ var index = 0;
523
+ var cachedSegments = {};
524
+ var temp = {};
525
+ var originalMappings = [];
526
+ var generatedMappings = [];
527
+ var mapping, str, segment, end, value;
528
+
529
+ let subarrayStart = 0;
530
+ while (index < length) {
531
+ if (aStr.charAt(index) === ';') {
532
+ generatedLine++;
533
+ index++;
534
+ previousGeneratedColumn = 0;
535
+
536
+ sortGenerated(generatedMappings, subarrayStart);
537
+ subarrayStart = generatedMappings.length;
538
+ }
539
+ else if (aStr.charAt(index) === ',') {
540
+ index++;
541
+ }
542
+ else {
543
+ mapping = new Mapping();
544
+ mapping.generatedLine = generatedLine;
545
+
546
+ for (end = index; end < length; end++) {
547
+ if (this._charIsMappingSeparator(aStr, end)) {
548
+ break;
549
+ }
550
+ }
551
+ str = aStr.slice(index, end);
552
+
553
+ segment = [];
554
+ while (index < end) {
555
+ base64VLQ.decode(aStr, index, temp);
556
+ value = temp.value;
557
+ index = temp.rest;
558
+ segment.push(value);
559
+ }
560
+
561
+ if (segment.length === 2) {
562
+ throw new Error('Found a source, but no line and column');
563
+ }
564
+
565
+ if (segment.length === 3) {
566
+ throw new Error('Found a source and line, but no column');
567
+ }
568
+
569
+ // Generated column.
570
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
571
+ previousGeneratedColumn = mapping.generatedColumn;
572
+
573
+ if (segment.length > 1) {
574
+ // Original source.
575
+ mapping.source = previousSource + segment[1];
576
+ previousSource += segment[1];
577
+
578
+ // Original line.
579
+ mapping.originalLine = previousOriginalLine + segment[2];
580
+ previousOriginalLine = mapping.originalLine;
581
+ // Lines are stored 0-based
582
+ mapping.originalLine += 1;
583
+
584
+ // Original column.
585
+ mapping.originalColumn = previousOriginalColumn + segment[3];
586
+ previousOriginalColumn = mapping.originalColumn;
587
+
588
+ if (segment.length > 4) {
589
+ // Original name.
590
+ mapping.name = previousName + segment[4];
591
+ previousName += segment[4];
592
+ }
593
+ }
594
+
595
+ generatedMappings.push(mapping);
596
+ if (typeof mapping.originalLine === 'number') {
597
+ let currentSource = mapping.source;
598
+ while (originalMappings.length <= currentSource) {
599
+ originalMappings.push(null);
600
+ }
601
+ if (originalMappings[currentSource] === null) {
602
+ originalMappings[currentSource] = [];
603
+ }
604
+ originalMappings[currentSource].push(mapping);
605
+ }
606
+ }
607
+ }
608
+
609
+ sortGenerated(generatedMappings, subarrayStart);
610
+ this.__generatedMappings = generatedMappings;
611
+
612
+ for (var i = 0; i < originalMappings.length; i++) {
613
+ if (originalMappings[i] != null) {
614
+ quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);
615
+ }
616
+ }
617
+ this.__originalMappings = [].concat(...originalMappings);
618
+ };
619
+
620
+ /**
621
+ * Find the mapping that best matches the hypothetical "needle" mapping that
622
+ * we are searching for in the given "haystack" of mappings.
623
+ */
624
+ BasicSourceMapConsumer.prototype._findMapping =
625
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
626
+ aColumnName, aComparator, aBias) {
627
+ // To return the position we are searching for, we must first find the
628
+ // mapping for the given position and then return the opposite position it
629
+ // points to. Because the mappings are sorted, we can use binary search to
630
+ // find the best mapping.
631
+
632
+ if (aNeedle[aLineName] <= 0) {
633
+ throw new TypeError('Line must be greater than or equal to 1, got '
634
+ + aNeedle[aLineName]);
635
+ }
636
+ if (aNeedle[aColumnName] < 0) {
637
+ throw new TypeError('Column must be greater than or equal to 0, got '
638
+ + aNeedle[aColumnName]);
639
+ }
640
+
641
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
642
+ };
643
+
644
+ /**
645
+ * Compute the last column for each generated mapping. The last column is
646
+ * inclusive.
647
+ */
648
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
649
+ function SourceMapConsumer_computeColumnSpans() {
650
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
651
+ var mapping = this._generatedMappings[index];
652
+
653
+ // Mappings do not contain a field for the last generated columnt. We
654
+ // can come up with an optimistic estimate, however, by assuming that
655
+ // mappings are contiguous (i.e. given two consecutive mappings, the
656
+ // first mapping ends where the second one starts).
657
+ if (index + 1 < this._generatedMappings.length) {
658
+ var nextMapping = this._generatedMappings[index + 1];
659
+
660
+ if (mapping.generatedLine === nextMapping.generatedLine) {
661
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
662
+ continue;
663
+ }
664
+ }
665
+
666
+ // The last mapping for each line spans the entire line.
667
+ mapping.lastGeneratedColumn = Infinity;
668
+ }
669
+ };
670
+
671
+ /**
672
+ * Returns the original source, line, and column information for the generated
673
+ * source's line and column positions provided. The only argument is an object
674
+ * with the following properties:
675
+ *
676
+ * - line: The line number in the generated source. The line number
677
+ * is 1-based.
678
+ * - column: The column number in the generated source. The column
679
+ * number is 0-based.
680
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
681
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
682
+ * closest element that is smaller than or greater than the one we are
683
+ * searching for, respectively, if the exact element cannot be found.
684
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
685
+ *
686
+ * and an object is returned with the following properties:
687
+ *
688
+ * - source: The original source file, or null.
689
+ * - line: The line number in the original source, or null. The
690
+ * line number is 1-based.
691
+ * - column: The column number in the original source, or null. The
692
+ * column number is 0-based.
693
+ * - name: The original identifier, or null.
694
+ */
695
+ BasicSourceMapConsumer.prototype.originalPositionFor =
696
+ function SourceMapConsumer_originalPositionFor(aArgs) {
697
+ var needle = {
698
+ generatedLine: util.getArg(aArgs, 'line'),
699
+ generatedColumn: util.getArg(aArgs, 'column')
700
+ };
701
+
702
+ var index = this._findMapping(
703
+ needle,
704
+ this._generatedMappings,
705
+ "generatedLine",
706
+ "generatedColumn",
707
+ util.compareByGeneratedPositionsDeflated,
708
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
709
+ );
710
+
711
+ if (index >= 0) {
712
+ var mapping = this._generatedMappings[index];
713
+
714
+ if (mapping.generatedLine === needle.generatedLine) {
715
+ var source = util.getArg(mapping, 'source', null);
716
+ if (source !== null) {
717
+ source = this._sources.at(source);
718
+ source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
719
+ }
720
+ var name = util.getArg(mapping, 'name', null);
721
+ if (name !== null) {
722
+ name = this._names.at(name);
723
+ }
724
+ return {
725
+ source: source,
726
+ line: util.getArg(mapping, 'originalLine', null),
727
+ column: util.getArg(mapping, 'originalColumn', null),
728
+ name: name
729
+ };
730
+ }
731
+ }
732
+
733
+ return {
734
+ source: null,
735
+ line: null,
736
+ column: null,
737
+ name: null
738
+ };
739
+ };
740
+
741
+ /**
742
+ * Return true if we have the source content for every source in the source
743
+ * map, false otherwise.
744
+ */
745
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
746
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
747
+ if (!this.sourcesContent) {
748
+ return false;
749
+ }
750
+ return this.sourcesContent.length >= this._sources.size() &&
751
+ !this.sourcesContent.some(function (sc) { return sc == null; });
752
+ };
753
+
754
+ /**
755
+ * Returns the original source content. The only argument is the url of the
756
+ * original source file. Returns null if no original source content is
757
+ * available.
758
+ */
759
+ BasicSourceMapConsumer.prototype.sourceContentFor =
760
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
761
+ if (!this.sourcesContent) {
762
+ return null;
763
+ }
764
+
765
+ var index = this._findSourceIndex(aSource);
766
+ if (index >= 0) {
767
+ return this.sourcesContent[index];
768
+ }
769
+
770
+ var relativeSource = aSource;
771
+ if (this.sourceRoot != null) {
772
+ relativeSource = util.relative(this.sourceRoot, relativeSource);
773
+ }
774
+
775
+ var url;
776
+ if (this.sourceRoot != null
777
+ && (url = util.urlParse(this.sourceRoot))) {
778
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
779
+ // many users. We can help them out when they expect file:// URIs to
780
+ // behave like it would if they were running a local HTTP server. See
781
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
782
+ var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
783
+ if (url.scheme == "file"
784
+ && this._sources.has(fileUriAbsPath)) {
785
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
786
+ }
787
+
788
+ if ((!url.path || url.path == "/")
789
+ && this._sources.has("/" + relativeSource)) {
790
+ return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
791
+ }
792
+ }
793
+
794
+ // This function is used recursively from
795
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
796
+ // don't want to throw if we can't find the source - we just want to
797
+ // return null, so we provide a flag to exit gracefully.
798
+ if (nullOnMissing) {
799
+ return null;
800
+ }
801
+ else {
802
+ throw new Error('"' + relativeSource + '" is not in the SourceMap.');
803
+ }
804
+ };
805
+
806
+ /**
807
+ * Returns the generated line and column information for the original source,
808
+ * line, and column positions provided. The only argument is an object with
809
+ * the following properties:
810
+ *
811
+ * - source: The filename of the original source.
812
+ * - line: The line number in the original source. The line number
813
+ * is 1-based.
814
+ * - column: The column number in the original source. The column
815
+ * number is 0-based.
816
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
817
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
818
+ * closest element that is smaller than or greater than the one we are
819
+ * searching for, respectively, if the exact element cannot be found.
820
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
821
+ *
822
+ * and an object is returned with the following properties:
823
+ *
824
+ * - line: The line number in the generated source, or null. The
825
+ * line number is 1-based.
826
+ * - column: The column number in the generated source, or null.
827
+ * The column number is 0-based.
828
+ */
829
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
830
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
831
+ var source = util.getArg(aArgs, 'source');
832
+ source = this._findSourceIndex(source);
833
+ if (source < 0) {
834
+ return {
835
+ line: null,
836
+ column: null,
837
+ lastColumn: null
838
+ };
839
+ }
840
+
841
+ var needle = {
842
+ source: source,
843
+ originalLine: util.getArg(aArgs, 'line'),
844
+ originalColumn: util.getArg(aArgs, 'column')
845
+ };
846
+
847
+ var index = this._findMapping(
848
+ needle,
849
+ this._originalMappings,
850
+ "originalLine",
851
+ "originalColumn",
852
+ util.compareByOriginalPositions,
853
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
854
+ );
855
+
856
+ if (index >= 0) {
857
+ var mapping = this._originalMappings[index];
858
+
859
+ if (mapping.source === needle.source) {
860
+ return {
861
+ line: util.getArg(mapping, 'generatedLine', null),
862
+ column: util.getArg(mapping, 'generatedColumn', null),
863
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
864
+ };
865
+ }
866
+ }
867
+
868
+ return {
869
+ line: null,
870
+ column: null,
871
+ lastColumn: null
872
+ };
873
+ };
874
+
875
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
876
+
877
+ /**
878
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
879
+ * we can query for information. It differs from BasicSourceMapConsumer in
880
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
881
+ * input.
882
+ *
883
+ * The first parameter is a raw source map (either as a JSON string, or already
884
+ * parsed to an object). According to the spec for indexed source maps, they
885
+ * have the following attributes:
886
+ *
887
+ * - version: Which version of the source map spec this map is following.
888
+ * - file: Optional. The generated file this source map is associated with.
889
+ * - sections: A list of section definitions.
890
+ *
891
+ * Each value under the "sections" field has two fields:
892
+ * - offset: The offset into the original specified at which this section
893
+ * begins to apply, defined as an object with a "line" and "column"
894
+ * field.
895
+ * - map: A source map definition. This source map could also be indexed,
896
+ * but doesn't have to be.
897
+ *
898
+ * Instead of the "map" field, it's also possible to have a "url" field
899
+ * specifying a URL to retrieve a source map from, but that's currently
900
+ * unsupported.
901
+ *
902
+ * Here's an example source map, taken from the source map spec[0], but
903
+ * modified to omit a section which uses the "url" field.
904
+ *
905
+ * {
906
+ * version : 3,
907
+ * file: "app.js",
908
+ * sections: [{
909
+ * offset: {line:100, column:10},
910
+ * map: {
911
+ * version : 3,
912
+ * file: "section.js",
913
+ * sources: ["foo.js", "bar.js"],
914
+ * names: ["src", "maps", "are", "fun"],
915
+ * mappings: "AAAA,E;;ABCDE;"
916
+ * }
917
+ * }],
918
+ * }
919
+ *
920
+ * The second parameter, if given, is a string whose value is the URL
921
+ * at which the source map was found. This URL is used to compute the
922
+ * sources array.
923
+ *
924
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
925
+ */
926
+ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
927
+ var sourceMap = aSourceMap;
928
+ if (typeof aSourceMap === 'string') {
929
+ sourceMap = util.parseSourceMapInput(aSourceMap);
930
+ }
931
+
932
+ var version = util.getArg(sourceMap, 'version');
933
+ var sections = util.getArg(sourceMap, 'sections');
934
+
935
+ if (version != this._version) {
936
+ throw new Error('Unsupported version: ' + version);
937
+ }
938
+
939
+ this._sources = new ArraySet();
940
+ this._names = new ArraySet();
941
+
942
+ var lastOffset = {
943
+ line: -1,
944
+ column: 0
945
+ };
946
+ var maxOffsetLine = 0;
947
+ this._sections = sections.map(function (s) {
948
+ if (s.url) {
949
+ // The url field will require support for asynchronicity.
950
+ // See https://github.com/mozilla/source-map/issues/16
951
+ throw new Error('Support for url field in sections not implemented.');
952
+ }
953
+ var offset = util.getArg(s, 'offset');
954
+ var offsetLine = util.getArg(offset, 'line');
955
+ var offsetColumn = util.getArg(offset, 'column');
956
+
957
+ if (!isValidOffset(offsetLine) || !isValidOffset(offsetColumn)) {
958
+ throw new Error('Section offset line and column must be non-negative integers.');
959
+ }
960
+ if (offsetLine > MAX_SECTION_OFFSET_LINE) {
961
+ throw new Error('Section offset line must not exceed ' + MAX_SECTION_OFFSET_LINE + '.');
962
+ }
963
+
964
+ if (offsetLine < lastOffset.line ||
965
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
966
+ throw new Error('Section offsets must be ordered and non-overlapping.');
967
+ }
968
+ lastOffset = offset;
969
+
970
+ var consumer = new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL);
971
+
972
+ // Offsets of a nested indexed map add up with this one, so apply the
973
+ // bound to the total.
974
+ var totalOffsetLine = offsetLine + (consumer._maxOffsetLine || 0);
975
+ if (totalOffsetLine > MAX_SECTION_OFFSET_LINE) {
976
+ throw new Error('Section offset line must not exceed ' + MAX_SECTION_OFFSET_LINE +
977
+ ', including offsets of nested sections.');
978
+ }
979
+ if (totalOffsetLine > maxOffsetLine) {
980
+ maxOffsetLine = totalOffsetLine;
981
+ }
982
+
983
+ return {
984
+ generatedOffset: {
985
+ // The offset fields are 0-based, but we use 1-based indices when
986
+ // encoding/decoding from VLQ.
987
+ generatedLine: offsetLine + 1,
988
+ generatedColumn: offsetColumn + 1
989
+ },
990
+ consumer: consumer
991
+ }
992
+ });
993
+
994
+ // The largest offset.line of any section, including nested sections.
995
+ this._maxOffsetLine = maxOffsetLine;
996
+ }
997
+
998
+ /**
999
+ * Section offsets come from untrusted input and are used as line/column
1000
+ * numbers, so only accept non-negative safe integers (rejects NaN, Infinity,
1001
+ * strings, fractions, etc).
1002
+ */
1003
+ function isValidOffset(aValue) {
1004
+ return typeof aValue === 'number' &&
1005
+ aValue >= 0 &&
1006
+ aValue <= 9007199254740991 && // Number.MAX_SAFE_INTEGER
1007
+ Math.floor(aValue) === aValue;
1008
+ }
1009
+
1010
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
1011
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
1012
+
1013
+ /**
1014
+ * The version of the source mapping spec that we are consuming.
1015
+ */
1016
+ IndexedSourceMapConsumer.prototype._version = 3;
1017
+
1018
+ /**
1019
+ * The list of original sources.
1020
+ */
1021
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
1022
+ get: function () {
1023
+ var sources = [];
1024
+ for (var i = 0; i < this._sections.length; i++) {
1025
+ // Read the getter once per section: for a nested indexed map it is
1026
+ // itself this getter, and re-reading it per item is exponential in the
1027
+ // nesting depth (CVE-2026-93749).
1028
+ var sectionSources = this._sections[i].consumer.sources;
1029
+ for (var j = 0; j < sectionSources.length; j++) {
1030
+ sources.push(sectionSources[j]);
1031
+ }
1032
+ }
1033
+ return sources;
1034
+ }
1035
+ });
1036
+
1037
+ /**
1038
+ * Returns the original source, line, and column information for the generated
1039
+ * source's line and column positions provided. The only argument is an object
1040
+ * with the following properties:
1041
+ *
1042
+ * - line: The line number in the generated source. The line number
1043
+ * is 1-based.
1044
+ * - column: The column number in the generated source. The column
1045
+ * number is 0-based.
1046
+ *
1047
+ * and an object is returned with the following properties:
1048
+ *
1049
+ * - source: The original source file, or null.
1050
+ * - line: The line number in the original source, or null. The
1051
+ * line number is 1-based.
1052
+ * - column: The column number in the original source, or null. The
1053
+ * column number is 0-based.
1054
+ * - name: The original identifier, or null.
1055
+ */
1056
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
1057
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
1058
+ var needle = {
1059
+ generatedLine: util.getArg(aArgs, 'line'),
1060
+ generatedColumn: util.getArg(aArgs, 'column')
1061
+ };
1062
+
1063
+ // Find the section containing the generated position we're trying to map
1064
+ // to an original position.
1065
+ var sectionIndex = binarySearch.search(needle, this._sections,
1066
+ function(needle, section) {
1067
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
1068
+ if (cmp) {
1069
+ return cmp;
1070
+ }
1071
+
1072
+ return (needle.generatedColumn -
1073
+ section.generatedOffset.generatedColumn);
1074
+ });
1075
+ var section = this._sections[sectionIndex];
1076
+
1077
+ if (!section) {
1078
+ return {
1079
+ source: null,
1080
+ line: null,
1081
+ column: null,
1082
+ name: null
1083
+ };
1084
+ }
1085
+
1086
+ return section.consumer.originalPositionFor({
1087
+ line: needle.generatedLine -
1088
+ (section.generatedOffset.generatedLine - 1),
1089
+ column: needle.generatedColumn -
1090
+ (section.generatedOffset.generatedLine === needle.generatedLine
1091
+ ? section.generatedOffset.generatedColumn - 1
1092
+ : 0),
1093
+ bias: aArgs.bias
1094
+ });
1095
+ };
1096
+
1097
+ /**
1098
+ * Return true if we have the source content for every source in the source
1099
+ * map, false otherwise.
1100
+ */
1101
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
1102
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
1103
+ return this._sections.every(function (s) {
1104
+ return s.consumer.hasContentsOfAllSources();
1105
+ });
1106
+ };
1107
+
1108
+ /**
1109
+ * Returns the original source content. The only argument is the url of the
1110
+ * original source file. Returns null if no original source content is
1111
+ * available.
1112
+ */
1113
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
1114
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
1115
+ for (var i = 0; i < this._sections.length; i++) {
1116
+ var section = this._sections[i];
1117
+
1118
+ var content = section.consumer.sourceContentFor(aSource, true);
1119
+ if (content || content === '') {
1120
+ return content;
1121
+ }
1122
+ }
1123
+ if (nullOnMissing) {
1124
+ return null;
1125
+ }
1126
+ else {
1127
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
1128
+ }
1129
+ };
1130
+
1131
+ /**
1132
+ * Returns the generated line and column information for the original source,
1133
+ * line, and column positions provided. The only argument is an object with
1134
+ * the following properties:
1135
+ *
1136
+ * - source: The filename of the original source.
1137
+ * - line: The line number in the original source. The line number
1138
+ * is 1-based.
1139
+ * - column: The column number in the original source. The column
1140
+ * number is 0-based.
1141
+ *
1142
+ * and an object is returned with the following properties:
1143
+ *
1144
+ * - line: The line number in the generated source, or null. The
1145
+ * line number is 1-based.
1146
+ * - column: The column number in the generated source, or null.
1147
+ * The column number is 0-based.
1148
+ */
1149
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
1150
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
1151
+ for (var i = 0; i < this._sections.length; i++) {
1152
+ var section = this._sections[i];
1153
+
1154
+ // Only consider this section if the requested source is in the list of
1155
+ // sources of the consumer.
1156
+ if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {
1157
+ continue;
1158
+ }
1159
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
1160
+ if (generatedPosition) {
1161
+ var ret = {
1162
+ line: generatedPosition.line +
1163
+ (section.generatedOffset.generatedLine - 1),
1164
+ column: generatedPosition.column +
1165
+ (section.generatedOffset.generatedLine === generatedPosition.line
1166
+ ? section.generatedOffset.generatedColumn - 1
1167
+ : 0)
1168
+ };
1169
+ return ret;
1170
+ }
1171
+ }
1172
+
1173
+ return {
1174
+ line: null,
1175
+ column: null
1176
+ };
1177
+ };
1178
+
1179
+ /**
1180
+ * Parse the mappings in a string in to a data structure which we can easily
1181
+ * query (the ordered arrays in the `this.__generatedMappings` and
1182
+ * `this.__originalMappings` properties).
1183
+ */
1184
+ IndexedSourceMapConsumer.prototype._parseMappings =
1185
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1186
+ this.__generatedMappings = [];
1187
+ this.__originalMappings = [];
1188
+ for (var i = 0; i < this._sections.length; i++) {
1189
+ var section = this._sections[i];
1190
+ var sectionMappings = section.consumer._generatedMappings;
1191
+ for (var j = 0; j < sectionMappings.length; j++) {
1192
+ var mapping = sectionMappings[j];
1193
+
1194
+ var source = section.consumer._sources.at(mapping.source);
1195
+ if(source !== null) {
1196
+ source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
1197
+ }
1198
+ this._sources.add(source);
1199
+ source = this._sources.indexOf(source);
1200
+
1201
+ var name = null;
1202
+ if (mapping.name) {
1203
+ name = section.consumer._names.at(mapping.name);
1204
+ this._names.add(name);
1205
+ name = this._names.indexOf(name);
1206
+ }
1207
+
1208
+ // The mappings coming from the consumer for the section have
1209
+ // generated positions relative to the start of the section, so we
1210
+ // need to offset them to be relative to the start of the concatenated
1211
+ // generated file.
1212
+ var adjustedMapping = {
1213
+ source: source,
1214
+ generatedLine: mapping.generatedLine +
1215
+ (section.generatedOffset.generatedLine - 1),
1216
+ generatedColumn: mapping.generatedColumn +
1217
+ (section.generatedOffset.generatedLine === mapping.generatedLine
1218
+ ? section.generatedOffset.generatedColumn - 1
1219
+ : 0),
1220
+ originalLine: mapping.originalLine,
1221
+ originalColumn: mapping.originalColumn,
1222
+ name: name
1223
+ };
1224
+
1225
+ this.__generatedMappings.push(adjustedMapping);
1226
+ if (typeof adjustedMapping.originalLine === 'number') {
1227
+ this.__originalMappings.push(adjustedMapping);
1228
+ }
1229
+ }
1230
+ }
1231
+
1232
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
1233
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
1234
+ };
1235
+
1236
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;