chaffjs 0.29.0 → 0.31.0

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 (681) hide show
  1. package/dist/announced-count.d.ts +2 -0
  2. package/dist/announced-count.d.ts.map +1 -1
  3. package/dist/announced-count.js +4 -3
  4. package/dist/announced-count.js.map +1 -1
  5. package/dist/contacts/addresses.d.ts +21 -0
  6. package/dist/contacts/addresses.d.ts.map +1 -0
  7. package/dist/contacts/addresses.js +144 -0
  8. package/dist/contacts/addresses.js.map +1 -0
  9. package/dist/contacts/emails.d.ts +11 -0
  10. package/dist/contacts/emails.d.ts.map +1 -0
  11. package/dist/contacts/emails.js +51 -0
  12. package/dist/contacts/emails.js.map +1 -0
  13. package/dist/contacts/variants.d.ts +14 -0
  14. package/dist/contacts/variants.d.ts.map +1 -0
  15. package/dist/contacts/variants.js +25 -0
  16. package/dist/contacts/variants.js.map +1 -0
  17. package/dist/derived/battery-runtime.d.ts +85 -0
  18. package/dist/derived/battery-runtime.d.ts.map +1 -0
  19. package/dist/derived/battery-runtime.js +217 -0
  20. package/dist/derived/battery-runtime.js.map +1 -0
  21. package/dist/derived/period-counts.d.ts +48 -0
  22. package/dist/derived/period-counts.d.ts.map +1 -0
  23. package/dist/derived/period-counts.js +128 -0
  24. package/dist/derived/period-counts.js.map +1 -0
  25. package/dist/derived/session-hours.d.ts +26 -0
  26. package/dist/derived/session-hours.d.ts.map +1 -0
  27. package/dist/derived/session-hours.js +29 -0
  28. package/dist/derived/session-hours.js.map +1 -0
  29. package/dist/derived/time-lengths.d.ts +37 -0
  30. package/dist/derived/time-lengths.d.ts.map +1 -0
  31. package/dist/derived/time-lengths.js +171 -0
  32. package/dist/derived/time-lengths.js.map +1 -0
  33. package/dist/derived/unit-counts.d.ts +7 -0
  34. package/dist/derived/unit-counts.d.ts.map +1 -0
  35. package/dist/derived/unit-counts.js +13 -0
  36. package/dist/derived/unit-counts.js.map +1 -0
  37. package/dist/derived/use-interval.d.ts +33 -0
  38. package/dist/derived/use-interval.d.ts.map +1 -0
  39. package/dist/derived/use-interval.js +93 -0
  40. package/dist/derived/use-interval.js.map +1 -0
  41. package/dist/derived/working-hours.d.ts +36 -0
  42. package/dist/derived/working-hours.d.ts.map +1 -0
  43. package/dist/derived/working-hours.js +55 -0
  44. package/dist/derived/working-hours.js.map +1 -0
  45. package/dist/detectors/acronym-expansion.d.ts +1 -1
  46. package/dist/detectors/acronym-expansion.d.ts.map +1 -1
  47. package/dist/detectors/acronym-expansion.js +46 -2
  48. package/dist/detectors/acronym-expansion.js.map +1 -1
  49. package/dist/detectors/announced-count.d.ts.map +1 -1
  50. package/dist/detectors/announced-count.js +1 -0
  51. package/dist/detectors/announced-count.js.map +1 -1
  52. package/dist/detectors/capacity-runtime.d.ts +7 -0
  53. package/dist/detectors/capacity-runtime.d.ts.map +1 -0
  54. package/dist/detectors/capacity-runtime.js +98 -0
  55. package/dist/detectors/capacity-runtime.js.map +1 -0
  56. package/dist/detectors/capitalised-term.d.ts +44 -0
  57. package/dist/detectors/capitalised-term.d.ts.map +1 -0
  58. package/dist/detectors/capitalised-term.js +101 -0
  59. package/dist/detectors/capitalised-term.js.map +1 -0
  60. package/dist/detectors/contact-variant.d.ts +3 -0
  61. package/dist/detectors/contact-variant.d.ts.map +1 -0
  62. package/dist/detectors/contact-variant.js +21 -0
  63. package/dist/detectors/contact-variant.js.map +1 -0
  64. package/dist/detectors/count-over-capacity.d.ts +4 -0
  65. package/dist/detectors/count-over-capacity.d.ts.map +1 -0
  66. package/dist/detectors/count-over-capacity.js +26 -0
  67. package/dist/detectors/count-over-capacity.js.map +1 -0
  68. package/dist/detectors/date-outside-period.d.ts.map +1 -1
  69. package/dist/detectors/date-outside-period.js +5 -1
  70. package/dist/detectors/date-outside-period.js.map +1 -1
  71. package/dist/detectors/date-stamp-order.d.ts +3 -0
  72. package/dist/detectors/date-stamp-order.d.ts.map +1 -0
  73. package/dist/detectors/date-stamp-order.js +24 -0
  74. package/dist/detectors/date-stamp-order.js.map +1 -0
  75. package/dist/detectors/defined-term-form.d.ts.map +1 -1
  76. package/dist/detectors/defined-term-form.js +57 -7
  77. package/dist/detectors/defined-term-form.js.map +1 -1
  78. package/dist/detectors/definition-use.d.ts +1 -1
  79. package/dist/detectors/definition-use.d.ts.map +1 -1
  80. package/dist/detectors/definition-use.js +4 -2
  81. package/dist/detectors/definition-use.js.map +1 -1
  82. package/dist/detectors/derived-numbers.d.ts +11 -1
  83. package/dist/detectors/derived-numbers.d.ts.map +1 -1
  84. package/dist/detectors/derived-numbers.js +74 -20
  85. package/dist/detectors/derived-numbers.js.map +1 -1
  86. package/dist/detectors/due-date.d.ts.map +1 -1
  87. package/dist/detectors/due-date.js +6 -0
  88. package/dist/detectors/due-date.js.map +1 -1
  89. package/dist/detectors/en-shape.d.ts.map +1 -1
  90. package/dist/detectors/en-shape.js +7 -4
  91. package/dist/detectors/en-shape.js.map +1 -1
  92. package/dist/detectors/event-deadline.d.ts +3 -0
  93. package/dist/detectors/event-deadline.d.ts.map +1 -0
  94. package/dist/detectors/event-deadline.js +24 -0
  95. package/dist/detectors/event-deadline.js.map +1 -0
  96. package/dist/detectors/fact-consistency.d.ts +1 -1
  97. package/dist/detectors/fact-consistency.d.ts.map +1 -1
  98. package/dist/detectors/fact-consistency.js +52 -3
  99. package/dist/detectors/fact-consistency.js.map +1 -1
  100. package/dist/detectors/heading-case.d.ts +5 -2
  101. package/dist/detectors/heading-case.d.ts.map +1 -1
  102. package/dist/detectors/heading-case.js +12 -4
  103. package/dist/detectors/heading-case.js.map +1 -1
  104. package/dist/detectors/heading-echo.d.ts +5 -0
  105. package/dist/detectors/heading-echo.d.ts.map +1 -1
  106. package/dist/detectors/heading-echo.js +14 -1
  107. package/dist/detectors/heading-echo.js.map +1 -1
  108. package/dist/detectors/layout-code.d.ts +5 -0
  109. package/dist/detectors/layout-code.d.ts.map +1 -0
  110. package/dist/detectors/layout-code.js +124 -0
  111. package/dist/detectors/layout-code.js.map +1 -0
  112. package/dist/detectors/measured-facts.d.ts +8 -0
  113. package/dist/detectors/measured-facts.d.ts.map +1 -0
  114. package/dist/detectors/measured-facts.js +18 -0
  115. package/dist/detectors/measured-facts.js.map +1 -0
  116. package/dist/detectors/name-variant-model-codes.d.ts +11 -0
  117. package/dist/detectors/name-variant-model-codes.d.ts.map +1 -0
  118. package/dist/detectors/name-variant-model-codes.js +21 -0
  119. package/dist/detectors/name-variant-model-codes.js.map +1 -0
  120. package/dist/detectors/name-variant.d.ts.map +1 -1
  121. package/dist/detectors/name-variant.js +78 -10
  122. package/dist/detectors/name-variant.js.map +1 -1
  123. package/dist/detectors/orthographic-variant.d.ts.map +1 -1
  124. package/dist/detectors/orthographic-variant.js +62 -7
  125. package/dist/detectors/orthographic-variant.js.map +1 -1
  126. package/dist/detectors/orthography.d.ts.map +1 -1
  127. package/dist/detectors/orthography.js +12 -6
  128. package/dist/detectors/orthography.js.map +1 -1
  129. package/dist/detectors/party-order.d.ts +3 -0
  130. package/dist/detectors/party-order.d.ts.map +1 -0
  131. package/dist/detectors/party-order.js +46 -0
  132. package/dist/detectors/party-order.js.map +1 -0
  133. package/dist/detectors/quantity-range.d.ts +3 -0
  134. package/dist/detectors/quantity-range.d.ts.map +1 -0
  135. package/dist/detectors/quantity-range.js +35 -0
  136. package/dist/detectors/quantity-range.js.map +1 -0
  137. package/dist/detectors/range-band.d.ts +5 -0
  138. package/dist/detectors/range-band.d.ts.map +1 -0
  139. package/dist/detectors/range-band.js +80 -0
  140. package/dist/detectors/range-band.js.map +1 -0
  141. package/dist/detectors/registry/capacity-runtime-mismatch.d.ts +3 -0
  142. package/dist/detectors/registry/capacity-runtime-mismatch.d.ts.map +1 -0
  143. package/dist/detectors/registry/capacity-runtime-mismatch.js +3 -0
  144. package/dist/detectors/registry/capacity-runtime-mismatch.js.map +1 -0
  145. package/dist/detectors/registry/connection-time-short.d.ts +3 -0
  146. package/dist/detectors/registry/connection-time-short.d.ts.map +1 -0
  147. package/dist/detectors/registry/connection-time-short.js +3 -0
  148. package/dist/detectors/registry/connection-time-short.js.map +1 -0
  149. package/dist/detectors/registry/contact-variant.d.ts +3 -0
  150. package/dist/detectors/registry/contact-variant.d.ts.map +1 -0
  151. package/dist/detectors/registry/contact-variant.js +3 -0
  152. package/dist/detectors/registry/contact-variant.js.map +1 -0
  153. package/dist/detectors/registry/count-over-capacity.d.ts +3 -0
  154. package/dist/detectors/registry/count-over-capacity.d.ts.map +1 -0
  155. package/dist/detectors/registry/count-over-capacity.js +3 -0
  156. package/dist/detectors/registry/count-over-capacity.js.map +1 -0
  157. package/dist/detectors/registry/date-stamp-order.d.ts +3 -0
  158. package/dist/detectors/registry/date-stamp-order.d.ts.map +1 -0
  159. package/dist/detectors/registry/date-stamp-order.js +3 -0
  160. package/dist/detectors/registry/date-stamp-order.js.map +1 -0
  161. package/dist/detectors/registry/duration-product-mismatch.d.ts +3 -0
  162. package/dist/detectors/registry/duration-product-mismatch.d.ts.map +1 -0
  163. package/dist/detectors/registry/duration-product-mismatch.js +3 -0
  164. package/dist/detectors/registry/duration-product-mismatch.js.map +1 -0
  165. package/dist/detectors/registry/event-deadline.d.ts +3 -0
  166. package/dist/detectors/registry/event-deadline.d.ts.map +1 -0
  167. package/dist/detectors/registry/event-deadline.js +3 -0
  168. package/dist/detectors/registry/event-deadline.js.map +1 -0
  169. package/dist/detectors/registry/interval-count-mismatch.d.ts +3 -0
  170. package/dist/detectors/registry/interval-count-mismatch.d.ts.map +1 -0
  171. package/dist/detectors/registry/interval-count-mismatch.js +3 -0
  172. package/dist/detectors/registry/interval-count-mismatch.js.map +1 -0
  173. package/dist/detectors/registry/layout-code-mismatch.d.ts +3 -0
  174. package/dist/detectors/registry/layout-code-mismatch.d.ts.map +1 -0
  175. package/dist/detectors/registry/layout-code-mismatch.js +3 -0
  176. package/dist/detectors/registry/layout-code-mismatch.js.map +1 -0
  177. package/dist/detectors/registry/party-order.d.ts +3 -0
  178. package/dist/detectors/registry/party-order.d.ts.map +1 -0
  179. package/dist/detectors/registry/party-order.js +3 -0
  180. package/dist/detectors/registry/party-order.js.map +1 -0
  181. package/dist/detectors/registry/quantity-range.d.ts +3 -0
  182. package/dist/detectors/registry/quantity-range.d.ts.map +1 -0
  183. package/dist/detectors/registry/quantity-range.js +3 -0
  184. package/dist/detectors/registry/quantity-range.js.map +1 -0
  185. package/dist/detectors/registry/range-band-mismatch.d.ts +3 -0
  186. package/dist/detectors/registry/range-band-mismatch.d.ts.map +1 -0
  187. package/dist/detectors/registry/range-band-mismatch.js +3 -0
  188. package/dist/detectors/registry/range-band-mismatch.js.map +1 -0
  189. package/dist/detectors/registry/rent-multiple-mismatch.d.ts +3 -0
  190. package/dist/detectors/registry/rent-multiple-mismatch.d.ts.map +1 -0
  191. package/dist/detectors/registry/rent-multiple-mismatch.js +3 -0
  192. package/dist/detectors/registry/rent-multiple-mismatch.js.map +1 -0
  193. package/dist/detectors/registry/requirement-lists.d.ts +3 -0
  194. package/dist/detectors/registry/requirement-lists.d.ts.map +1 -0
  195. package/dist/detectors/registry/requirement-lists.js +3 -0
  196. package/dist/detectors/registry/requirement-lists.js.map +1 -0
  197. package/dist/detectors/registry/return-type.d.ts +3 -0
  198. package/dist/detectors/registry/return-type.d.ts.map +1 -0
  199. package/dist/detectors/registry/return-type.js +3 -0
  200. package/dist/detectors/registry/return-type.js.map +1 -0
  201. package/dist/detectors/registry/scaled-quantity-mismatch.d.ts +3 -0
  202. package/dist/detectors/registry/scaled-quantity-mismatch.d.ts.map +1 -0
  203. package/dist/detectors/registry/scaled-quantity-mismatch.js +3 -0
  204. package/dist/detectors/registry/scaled-quantity-mismatch.js.map +1 -0
  205. package/dist/detectors/registry/step-time-sum-mismatch.d.ts +3 -0
  206. package/dist/detectors/registry/step-time-sum-mismatch.d.ts.map +1 -0
  207. package/dist/detectors/registry/step-time-sum-mismatch.js +3 -0
  208. package/dist/detectors/registry/step-time-sum-mismatch.js.map +1 -0
  209. package/dist/detectors/registry/time-range-reversed.d.ts +3 -0
  210. package/dist/detectors/registry/time-range-reversed.d.ts.map +1 -0
  211. package/dist/detectors/registry/time-range-reversed.js +3 -0
  212. package/dist/detectors/registry/time-range-reversed.js.map +1 -0
  213. package/dist/detectors/registry/unlisted-item-used.d.ts +3 -0
  214. package/dist/detectors/registry/unlisted-item-used.d.ts.map +1 -0
  215. package/dist/detectors/registry/unlisted-item-used.js +3 -0
  216. package/dist/detectors/registry/unlisted-item-used.js.map +1 -0
  217. package/dist/detectors/registry/walk-time-distance-mismatch.d.ts +3 -0
  218. package/dist/detectors/registry/walk-time-distance-mismatch.d.ts.map +1 -0
  219. package/dist/detectors/registry/walk-time-distance-mismatch.js +3 -0
  220. package/dist/detectors/registry/walk-time-distance-mismatch.js.map +1 -0
  221. package/dist/detectors/rent-multiple-mismatch.d.ts +3 -0
  222. package/dist/detectors/rent-multiple-mismatch.d.ts.map +1 -0
  223. package/dist/detectors/rent-multiple-mismatch.js +39 -0
  224. package/dist/detectors/rent-multiple-mismatch.js.map +1 -0
  225. package/dist/detectors/requirement-lists.d.ts +3 -0
  226. package/dist/detectors/requirement-lists.d.ts.map +1 -0
  227. package/dist/detectors/requirement-lists.js +46 -0
  228. package/dist/detectors/requirement-lists.js.map +1 -0
  229. package/dist/detectors/return-type.d.ts +3 -0
  230. package/dist/detectors/return-type.d.ts.map +1 -0
  231. package/dist/detectors/return-type.js +24 -0
  232. package/dist/detectors/return-type.js.map +1 -0
  233. package/dist/detectors/scaled-quantity.d.ts +3 -0
  234. package/dist/detectors/scaled-quantity.d.ts.map +1 -0
  235. package/dist/detectors/scaled-quantity.js +37 -0
  236. package/dist/detectors/scaled-quantity.js.map +1 -0
  237. package/dist/detectors/signals.d.ts.map +1 -1
  238. package/dist/detectors/signals.js +3 -1
  239. package/dist/detectors/signals.js.map +1 -1
  240. package/dist/detectors/step-time-sum.d.ts +3 -0
  241. package/dist/detectors/step-time-sum.d.ts.map +1 -0
  242. package/dist/detectors/step-time-sum.js +46 -0
  243. package/dist/detectors/step-time-sum.js.map +1 -0
  244. package/dist/detectors/structure-tree.d.ts +2 -0
  245. package/dist/detectors/structure-tree.d.ts.map +1 -1
  246. package/dist/detectors/structure-tree.js +31 -6
  247. package/dist/detectors/structure-tree.js.map +1 -1
  248. package/dist/detectors/structure.js +1 -1
  249. package/dist/detectors/structure.js.map +1 -1
  250. package/dist/detectors/technical-docs.d.ts +5 -0
  251. package/dist/detectors/technical-docs.d.ts.map +1 -1
  252. package/dist/detectors/technical-docs.js +12 -0
  253. package/dist/detectors/technical-docs.js.map +1 -1
  254. package/dist/detectors/time-order.d.ts +2 -0
  255. package/dist/detectors/time-order.d.ts.map +1 -1
  256. package/dist/detectors/time-order.js +33 -5
  257. package/dist/detectors/time-order.js.map +1 -1
  258. package/dist/detectors/undefined-term.d.ts.map +1 -1
  259. package/dist/detectors/undefined-term.js +19 -3
  260. package/dist/detectors/undefined-term.js.map +1 -1
  261. package/dist/detectors/unit-consistency.d.ts +1 -1
  262. package/dist/detectors/unit-consistency.d.ts.map +1 -1
  263. package/dist/detectors/unit-consistency.js +46 -38
  264. package/dist/detectors/unit-consistency.js.map +1 -1
  265. package/dist/detectors/unlisted-items.d.ts +3 -0
  266. package/dist/detectors/unlisted-items.d.ts.map +1 -0
  267. package/dist/detectors/unlisted-items.js +57 -0
  268. package/dist/detectors/unlisted-items.js.map +1 -0
  269. package/dist/detectors/use-count-words.d.ts +8 -0
  270. package/dist/detectors/use-count-words.d.ts.map +1 -0
  271. package/dist/detectors/use-count-words.js +20 -0
  272. package/dist/detectors/use-count-words.js.map +1 -0
  273. package/dist/detectors/use-interval.d.ts +3 -0
  274. package/dist/detectors/use-interval.d.ts.map +1 -0
  275. package/dist/detectors/use-interval.js +39 -0
  276. package/dist/detectors/use-interval.js.map +1 -0
  277. package/dist/detectors/walk-time-distance-mismatch.d.ts +4 -0
  278. package/dist/detectors/walk-time-distance-mismatch.d.ts.map +1 -0
  279. package/dist/detectors/walk-time-distance-mismatch.js +38 -0
  280. package/dist/detectors/walk-time-distance-mismatch.js.map +1 -0
  281. package/dist/document.d.ts.map +1 -1
  282. package/dist/document.js +4 -1
  283. package/dist/document.js.map +1 -1
  284. package/dist/facts/approximate-tolerance.d.ts +7 -0
  285. package/dist/facts/approximate-tolerance.d.ts.map +1 -0
  286. package/dist/facts/approximate-tolerance.js +16 -0
  287. package/dist/facts/approximate-tolerance.js.map +1 -0
  288. package/dist/facts/item-amounts.d.ts +18 -0
  289. package/dist/facts/item-amounts.d.ts.map +1 -0
  290. package/dist/facts/item-amounts.js +67 -0
  291. package/dist/facts/item-amounts.js.map +1 -0
  292. package/dist/facts/labelled-facts.d.ts +4 -0
  293. package/dist/facts/labelled-facts.d.ts.map +1 -1
  294. package/dist/facts/labelled-facts.js +21 -6
  295. package/dist/facts/labelled-facts.js.map +1 -1
  296. package/dist/facts/measure-units.d.ts +5 -0
  297. package/dist/facts/measure-units.d.ts.map +1 -0
  298. package/dist/facts/measure-units.js +28 -0
  299. package/dist/facts/measure-units.js.map +1 -0
  300. package/dist/facts/measures.d.ts +23 -4
  301. package/dist/facts/measures.d.ts.map +1 -1
  302. package/dist/facts/measures.js +68 -19
  303. package/dist/facts/measures.js.map +1 -1
  304. package/dist/facts/retention-periods.d.ts +51 -0
  305. package/dist/facts/retention-periods.d.ts.map +1 -0
  306. package/dist/facts/retention-periods.js +148 -0
  307. package/dist/facts/retention-periods.js.map +1 -0
  308. package/dist/facts/table-facts.d.ts +2 -0
  309. package/dist/facts/table-facts.d.ts.map +1 -1
  310. package/dist/facts/table-facts.js +2 -0
  311. package/dist/facts/table-facts.js.map +1 -1
  312. package/dist/facts/unit-conflicts.d.ts +3 -2
  313. package/dist/facts/unit-conflicts.d.ts.map +1 -1
  314. package/dist/facts/unit-conflicts.js +15 -7
  315. package/dist/facts/unit-conflicts.js.map +1 -1
  316. package/dist/facts/unit-equivalents.d.ts +13 -0
  317. package/dist/facts/unit-equivalents.d.ts.map +1 -0
  318. package/dist/facts/unit-equivalents.js +56 -0
  319. package/dist/facts/unit-equivalents.js.map +1 -0
  320. package/dist/facts/unit-tolerance.d.ts +4 -0
  321. package/dist/facts/unit-tolerance.d.ts.map +1 -0
  322. package/dist/facts/unit-tolerance.js +13 -0
  323. package/dist/facts/unit-tolerance.js.map +1 -0
  324. package/dist/facts/unit-word.d.ts +8 -0
  325. package/dist/facts/unit-word.d.ts.map +1 -0
  326. package/dist/facts/unit-word.js +34 -0
  327. package/dist/facts/unit-word.js.map +1 -0
  328. package/dist/facts/written-precision.d.ts +10 -0
  329. package/dist/facts/written-precision.d.ts.map +1 -0
  330. package/dist/facts/written-precision.js +20 -0
  331. package/dist/facts/written-precision.js.map +1 -0
  332. package/dist/kana-spelling.d.ts +12 -0
  333. package/dist/kana-spelling.d.ts.map +1 -1
  334. package/dist/kana-spelling.js +23 -0
  335. package/dist/kana-spelling.js.map +1 -1
  336. package/dist/model-codes.d.ts +23 -0
  337. package/dist/model-codes.d.ts.map +1 -0
  338. package/dist/model-codes.js +81 -0
  339. package/dist/model-codes.js.map +1 -0
  340. package/dist/name-spelling-chars.d.ts +16 -0
  341. package/dist/name-spelling-chars.d.ts.map +1 -0
  342. package/dist/name-spelling-chars.js +14 -0
  343. package/dist/name-spelling-chars.js.map +1 -0
  344. package/dist/name-variants.d.ts +8 -2
  345. package/dist/name-variants.d.ts.map +1 -1
  346. package/dist/name-variants.js +72 -7
  347. package/dist/name-variants.js.map +1 -1
  348. package/dist/name-word-order.d.ts +49 -0
  349. package/dist/name-word-order.d.ts.map +1 -0
  350. package/dist/name-word-order.js +114 -0
  351. package/dist/name-word-order.js.map +1 -0
  352. package/dist/phone-numbers.d.ts.map +1 -1
  353. package/dist/phone-numbers.js +22 -5
  354. package/dist/phone-numbers.js.map +1 -1
  355. package/dist/place-names.d.ts +12 -5
  356. package/dist/place-names.d.ts.map +1 -1
  357. package/dist/place-names.js +34 -14
  358. package/dist/place-names.js.map +1 -1
  359. package/dist/plugin.d.ts +12 -0
  360. package/dist/plugin.d.ts.map +1 -1
  361. package/dist/preamble-paragraphs.d.ts +2 -1
  362. package/dist/preamble-paragraphs.d.ts.map +1 -1
  363. package/dist/preamble-paragraphs.js +16 -1
  364. package/dist/preamble-paragraphs.js.map +1 -1
  365. package/dist/profile/parse.d.ts.map +1 -1
  366. package/dist/profile/parse.js +11 -0
  367. package/dist/profile/parse.js.map +1 -1
  368. package/dist/return-type.d.ts +33 -0
  369. package/dist/return-type.d.ts.map +1 -0
  370. package/dist/return-type.js +302 -0
  371. package/dist/return-type.js.map +1 -0
  372. package/dist/spacing-code.d.ts +6 -0
  373. package/dist/spacing-code.d.ts.map +1 -0
  374. package/dist/spacing-code.js +16 -0
  375. package/dist/spacing-code.js.map +1 -0
  376. package/dist/structure/amount-range.d.ts +2 -2
  377. package/dist/structure/amount-range.d.ts.map +1 -1
  378. package/dist/structure/amount-range.js +12 -5
  379. package/dist/structure/amount-range.js.map +1 -1
  380. package/dist/structure/capacity-count.d.ts +59 -0
  381. package/dist/structure/capacity-count.d.ts.map +1 -0
  382. package/dist/structure/capacity-count.js +118 -0
  383. package/dist/structure/capacity-count.js.map +1 -0
  384. package/dist/structure/connection-times.d.ts +56 -0
  385. package/dist/structure/connection-times.d.ts.map +1 -0
  386. package/dist/structure/connection-times.js +165 -0
  387. package/dist/structure/connection-times.js.map +1 -0
  388. package/dist/structure/counted-amounts.d.ts +6 -0
  389. package/dist/structure/counted-amounts.d.ts.map +1 -1
  390. package/dist/structure/counted-amounts.js +4 -4
  391. package/dist/structure/counted-amounts.js.map +1 -1
  392. package/dist/structure/date-order-tie.d.ts +13 -0
  393. package/dist/structure/date-order-tie.d.ts.map +1 -0
  394. package/dist/structure/date-order-tie.js +61 -0
  395. package/dist/structure/date-order-tie.js.map +1 -0
  396. package/dist/structure/date-order.d.ts +2 -2
  397. package/dist/structure/date-order.d.ts.map +1 -1
  398. package/dist/structure/date-order.js +26 -9
  399. package/dist/structure/date-order.js.map +1 -1
  400. package/dist/structure/date-outside-period.d.ts +8 -0
  401. package/dist/structure/date-outside-period.d.ts.map +1 -1
  402. package/dist/structure/date-outside-period.js +52 -3
  403. package/dist/structure/date-outside-period.js.map +1 -1
  404. package/dist/structure/date-range.d.ts +6 -2
  405. package/dist/structure/date-range.d.ts.map +1 -1
  406. package/dist/structure/date-range.js +37 -9
  407. package/dist/structure/date-range.js.map +1 -1
  408. package/dist/structure/deadline-after-event.d.ts +23 -0
  409. package/dist/structure/deadline-after-event.d.ts.map +1 -0
  410. package/dist/structure/deadline-after-event.js +42 -0
  411. package/dist/structure/deadline-after-event.js.map +1 -0
  412. package/dist/structure/definition-use.d.ts +1 -1
  413. package/dist/structure/definition-use.d.ts.map +1 -1
  414. package/dist/structure/definition-use.js +55 -2
  415. package/dist/structure/definition-use.js.map +1 -1
  416. package/dist/structure/due-date.d.ts.map +1 -1
  417. package/dist/structure/due-date.js +5 -27
  418. package/dist/structure/due-date.js.map +1 -1
  419. package/dist/structure/labelled-date-order.d.ts +38 -0
  420. package/dist/structure/labelled-date-order.d.ts.map +1 -0
  421. package/dist/structure/labelled-date-order.js +41 -0
  422. package/dist/structure/labelled-date-order.js.map +1 -0
  423. package/dist/structure/layout-codes.d.ts +68 -0
  424. package/dist/structure/layout-codes.d.ts.map +1 -0
  425. package/dist/structure/layout-codes.js +161 -0
  426. package/dist/structure/layout-codes.js.map +1 -0
  427. package/dist/structure/leg-times.d.ts +2 -0
  428. package/dist/structure/leg-times.d.ts.map +1 -1
  429. package/dist/structure/leg-times.js +13 -0
  430. package/dist/structure/leg-times.js.map +1 -1
  431. package/dist/structure/measured-amounts.d.ts +17 -0
  432. package/dist/structure/measured-amounts.d.ts.map +1 -0
  433. package/dist/structure/measured-amounts.js +110 -0
  434. package/dist/structure/measured-amounts.js.map +1 -0
  435. package/dist/structure/party-order.d.ts +33 -0
  436. package/dist/structure/party-order.d.ts.map +1 -0
  437. package/dist/structure/party-order.js +79 -0
  438. package/dist/structure/party-order.js.map +1 -0
  439. package/dist/structure/quantity-range.d.ts +8 -0
  440. package/dist/structure/quantity-range.d.ts.map +1 -0
  441. package/dist/structure/quantity-range.js +36 -0
  442. package/dist/structure/quantity-range.js.map +1 -0
  443. package/dist/structure/range-bands.d.ts +75 -0
  444. package/dist/structure/range-bands.d.ts.map +1 -0
  445. package/dist/structure/range-bands.js +244 -0
  446. package/dist/structure/range-bands.js.map +1 -0
  447. package/dist/structure/rent-multiple.d.ts +76 -0
  448. package/dist/structure/rent-multiple.d.ts.map +1 -0
  449. package/dist/structure/rent-multiple.js +186 -0
  450. package/dist/structure/rent-multiple.js.map +1 -0
  451. package/dist/structure/requirement-lists.d.ts +37 -0
  452. package/dist/structure/requirement-lists.d.ts.map +1 -0
  453. package/dist/structure/requirement-lists.js +89 -0
  454. package/dist/structure/requirement-lists.js.map +1 -0
  455. package/dist/structure/scaled-quantities.d.ts +50 -0
  456. package/dist/structure/scaled-quantities.d.ts.map +1 -0
  457. package/dist/structure/scaled-quantities.js +153 -0
  458. package/dist/structure/scaled-quantities.js.map +1 -0
  459. package/dist/structure/stamp-order.d.ts +16 -0
  460. package/dist/structure/stamp-order.d.ts.map +1 -0
  461. package/dist/structure/stamp-order.js +78 -0
  462. package/dist/structure/stamp-order.js.map +1 -0
  463. package/dist/structure/step-times.d.ts +49 -0
  464. package/dist/structure/step-times.d.ts.map +1 -0
  465. package/dist/structure/step-times.js +128 -0
  466. package/dist/structure/step-times.js.map +1 -0
  467. package/dist/structure/term-deadline.d.ts +19 -0
  468. package/dist/structure/term-deadline.d.ts.map +1 -0
  469. package/dist/structure/term-deadline.js +28 -0
  470. package/dist/structure/term-deadline.js.map +1 -0
  471. package/dist/structure/time-order.d.ts +21 -0
  472. package/dist/structure/time-order.d.ts.map +1 -1
  473. package/dist/structure/time-order.js +5 -6
  474. package/dist/structure/time-order.js.map +1 -1
  475. package/dist/structure/time-range.d.ts +16 -0
  476. package/dist/structure/time-range.d.ts.map +1 -0
  477. package/dist/structure/time-range.js +57 -0
  478. package/dist/structure/time-range.js.map +1 -0
  479. package/dist/structure/total-line.d.ts +16 -0
  480. package/dist/structure/total-line.d.ts.map +1 -0
  481. package/dist/structure/total-line.js +44 -0
  482. package/dist/structure/total-line.js.map +1 -0
  483. package/dist/structure/total.d.ts +7 -1
  484. package/dist/structure/total.d.ts.map +1 -1
  485. package/dist/structure/total.js +28 -5
  486. package/dist/structure/total.js.map +1 -1
  487. package/dist/structure/unlisted-items.d.ts +70 -0
  488. package/dist/structure/unlisted-items.d.ts.map +1 -0
  489. package/dist/structure/unlisted-items.js +152 -0
  490. package/dist/structure/unlisted-items.js.map +1 -0
  491. package/dist/structure/version-order.d.ts +2 -0
  492. package/dist/structure/version-order.d.ts.map +1 -1
  493. package/dist/structure/version-order.js +10 -0
  494. package/dist/structure/version-order.js.map +1 -1
  495. package/dist/structure/walk-time.d.ts +87 -0
  496. package/dist/structure/walk-time.d.ts.map +1 -0
  497. package/dist/structure/walk-time.js +195 -0
  498. package/dist/structure/walk-time.js.map +1 -0
  499. package/dist/surname-near.d.ts +6 -0
  500. package/dist/surname-near.d.ts.map +1 -0
  501. package/dist/surname-near.js +31 -0
  502. package/dist/surname-near.js.map +1 -0
  503. package/dist/table-cells.d.ts +13 -0
  504. package/dist/table-cells.d.ts.map +1 -0
  505. package/dist/table-cells.js +36 -0
  506. package/dist/table-cells.js.map +1 -0
  507. package/dist/table-names.d.ts +42 -0
  508. package/dist/table-names.d.ts.map +1 -0
  509. package/dist/table-names.js +94 -0
  510. package/dist/table-names.js.map +1 -0
  511. package/package.json +3 -3
  512. package/profiles/listing.yaml +20 -0
  513. package/rules/announced-count-mismatch.yaml +2 -2
  514. package/rules/capacity-runtime-mismatch.yaml +66 -0
  515. package/rules/connection-time-short.yaml +52 -0
  516. package/rules/contact-variant.yaml +76 -0
  517. package/rules/count-over-capacity.yaml +55 -0
  518. package/rules/date-outside-period.yaml +4 -4
  519. package/rules/date-stamp-order.yaml +82 -0
  520. package/rules/deadline-after-event.yaml +67 -0
  521. package/rules/defined-name-repeated.yaml +2 -2
  522. package/rules/due-before-issue.yaml +11 -7
  523. package/rules/duration-mismatch.yaml +7 -4
  524. package/rules/duration-product-mismatch.yaml +73 -0
  525. package/rules/fact-conflict.yaml +9 -4
  526. package/rules/heading-echo.yaml +2 -2
  527. package/rules/interval-count-mismatch.yaml +54 -0
  528. package/rules/latin-spacing.yaml +2 -2
  529. package/rules/layout-code-mismatch.yaml +68 -0
  530. package/rules/name-variant.yaml +14 -2
  531. package/rules/no-em-dash.yaml +2 -2
  532. package/rules/party-order.yaml +84 -0
  533. package/rules/preamble-length.yaml +2 -2
  534. package/rules/quantity-range-reversed.yaml +53 -0
  535. package/rules/range-band-mismatch.yaml +70 -0
  536. package/rules/rent-multiple-mismatch.yaml +61 -0
  537. package/rules/required-listed-as-preferred.yaml +102 -0
  538. package/rules/return-type-mismatch.yaml +79 -0
  539. package/rules/scaled-quantity-mismatch.yaml +69 -0
  540. package/rules/step-time-sum-mismatch.yaml +65 -0
  541. package/rules/time-range-reversed.yaml +48 -0
  542. package/rules/title-case-consistency.yaml +2 -2
  543. package/rules/total-mismatch.yaml +2 -2
  544. package/rules/undefined-term.yaml +21 -7
  545. package/rules/unit-mismatch.yaml +12 -4
  546. package/rules/unlisted-item-used.yaml +90 -0
  547. package/rules/unused-definition.yaml +2 -2
  548. package/rules/use-before-definition.yaml +2 -2
  549. package/rules/walk-time-distance-mismatch.yaml +55 -0
  550. package/src/announced-count.ts +6 -3
  551. package/src/contacts/addresses.ts +179 -0
  552. package/src/contacts/emails.ts +63 -0
  553. package/src/contacts/variants.ts +33 -0
  554. package/src/derived/battery-runtime.ts +284 -0
  555. package/src/derived/period-counts.ts +178 -0
  556. package/src/derived/session-hours.ts +62 -0
  557. package/src/derived/time-lengths.ts +229 -0
  558. package/src/derived/unit-counts.ts +18 -0
  559. package/src/derived/use-interval.ts +151 -0
  560. package/src/derived/working-hours.ts +97 -0
  561. package/src/detectors/acronym-expansion.ts +57 -2
  562. package/src/detectors/announced-count.ts +1 -0
  563. package/src/detectors/capacity-runtime.ts +128 -0
  564. package/src/detectors/capitalised-term.ts +147 -0
  565. package/src/detectors/contact-variant.ts +24 -0
  566. package/src/detectors/count-over-capacity.ts +37 -0
  567. package/src/detectors/date-outside-period.ts +5 -1
  568. package/src/detectors/date-stamp-order.ts +28 -0
  569. package/src/detectors/defined-term-form.ts +63 -7
  570. package/src/detectors/definition-use.ts +6 -2
  571. package/src/detectors/derived-numbers.ts +97 -24
  572. package/src/detectors/due-date.ts +10 -2
  573. package/src/detectors/en-shape.ts +11 -4
  574. package/src/detectors/event-deadline.ts +29 -0
  575. package/src/detectors/fact-consistency.ts +64 -3
  576. package/src/detectors/heading-case.ts +13 -4
  577. package/src/detectors/heading-echo.ts +17 -1
  578. package/src/detectors/layout-code.ts +174 -0
  579. package/src/detectors/measured-facts.ts +20 -0
  580. package/src/detectors/name-variant-model-codes.ts +27 -0
  581. package/src/detectors/name-variant.ts +99 -15
  582. package/src/detectors/orthographic-variant.ts +78 -9
  583. package/src/detectors/orthography.ts +16 -6
  584. package/src/detectors/party-order.ts +50 -0
  585. package/src/detectors/quantity-range.ts +47 -0
  586. package/src/detectors/range-band.ts +125 -0
  587. package/src/detectors/registry/capacity-runtime-mismatch.ts +4 -0
  588. package/src/detectors/registry/connection-time-short.ts +4 -0
  589. package/src/detectors/registry/contact-variant.ts +4 -0
  590. package/src/detectors/registry/count-over-capacity.ts +4 -0
  591. package/src/detectors/registry/date-stamp-order.ts +4 -0
  592. package/src/detectors/registry/duration-product-mismatch.ts +4 -0
  593. package/src/detectors/registry/event-deadline.ts +4 -0
  594. package/src/detectors/registry/interval-count-mismatch.ts +4 -0
  595. package/src/detectors/registry/layout-code-mismatch.ts +4 -0
  596. package/src/detectors/registry/party-order.ts +4 -0
  597. package/src/detectors/registry/quantity-range.ts +4 -0
  598. package/src/detectors/registry/range-band-mismatch.ts +4 -0
  599. package/src/detectors/registry/rent-multiple-mismatch.ts +4 -0
  600. package/src/detectors/registry/requirement-lists.ts +4 -0
  601. package/src/detectors/registry/return-type.ts +4 -0
  602. package/src/detectors/registry/scaled-quantity-mismatch.ts +4 -0
  603. package/src/detectors/registry/step-time-sum-mismatch.ts +4 -0
  604. package/src/detectors/registry/time-range-reversed.ts +4 -0
  605. package/src/detectors/registry/unlisted-item-used.ts +4 -0
  606. package/src/detectors/registry/walk-time-distance-mismatch.ts +4 -0
  607. package/src/detectors/rent-multiple-mismatch.ts +56 -0
  608. package/src/detectors/requirement-lists.ts +65 -0
  609. package/src/detectors/return-type.ts +30 -0
  610. package/src/detectors/scaled-quantity.ts +49 -0
  611. package/src/detectors/signals.ts +3 -1
  612. package/src/detectors/step-time-sum.ts +55 -0
  613. package/src/detectors/structure-tree.ts +42 -6
  614. package/src/detectors/structure.ts +1 -1
  615. package/src/detectors/technical-docs.ts +12 -0
  616. package/src/detectors/time-order.ts +45 -6
  617. package/src/detectors/undefined-term.ts +20 -3
  618. package/src/detectors/unit-consistency.ts +50 -38
  619. package/src/detectors/unlisted-items.ts +72 -0
  620. package/src/detectors/use-count-words.ts +32 -0
  621. package/src/detectors/use-interval.ts +51 -0
  622. package/src/detectors/walk-time-distance-mismatch.ts +45 -0
  623. package/src/document.ts +4 -1
  624. package/src/facts/approximate-tolerance.ts +19 -0
  625. package/src/facts/item-amounts.ts +94 -0
  626. package/src/facts/labelled-facts.ts +29 -7
  627. package/src/facts/measure-units.ts +31 -0
  628. package/src/facts/measures.ts +113 -25
  629. package/src/facts/retention-periods.ts +216 -0
  630. package/src/facts/table-facts.ts +3 -0
  631. package/src/facts/unit-conflicts.ts +22 -9
  632. package/src/facts/unit-equivalents.ts +70 -0
  633. package/src/facts/unit-tolerance.ts +17 -0
  634. package/src/facts/unit-word.ts +35 -0
  635. package/src/facts/written-precision.ts +23 -0
  636. package/src/kana-spelling.ts +25 -0
  637. package/src/model-codes.ts +104 -0
  638. package/src/name-spelling-chars.ts +34 -0
  639. package/src/name-variants.ts +83 -7
  640. package/src/name-word-order.ts +149 -0
  641. package/src/phone-numbers.ts +26 -6
  642. package/src/place-names.ts +53 -14
  643. package/src/plugin.ts +7 -0
  644. package/src/preamble-paragraphs.ts +21 -2
  645. package/src/profile/parse.ts +10 -0
  646. package/src/return-type.ts +361 -0
  647. package/src/spacing-code.ts +26 -0
  648. package/src/structure/amount-range.ts +16 -7
  649. package/src/structure/capacity-count.ts +196 -0
  650. package/src/structure/connection-times.ts +226 -0
  651. package/src/structure/counted-amounts.ts +5 -4
  652. package/src/structure/date-order-tie.ts +86 -0
  653. package/src/structure/date-order.ts +41 -14
  654. package/src/structure/date-outside-period.ts +77 -7
  655. package/src/structure/date-range.ts +45 -9
  656. package/src/structure/deadline-after-event.ts +67 -0
  657. package/src/structure/definition-use.ts +59 -2
  658. package/src/structure/due-date.ts +8 -32
  659. package/src/structure/labelled-date-order.ts +84 -0
  660. package/src/structure/layout-codes.ts +210 -0
  661. package/src/structure/leg-times.ts +15 -0
  662. package/src/structure/measured-amounts.ts +138 -0
  663. package/src/structure/party-order.ts +115 -0
  664. package/src/structure/quantity-range.ts +54 -0
  665. package/src/structure/range-bands.ts +316 -0
  666. package/src/structure/rent-multiple.ts +277 -0
  667. package/src/structure/requirement-lists.ts +145 -0
  668. package/src/structure/scaled-quantities.ts +225 -0
  669. package/src/structure/stamp-order.ts +100 -0
  670. package/src/structure/step-times.ts +169 -0
  671. package/src/structure/term-deadline.ts +35 -0
  672. package/src/structure/time-order.ts +8 -7
  673. package/src/structure/time-range.ts +64 -0
  674. package/src/structure/total-line.ts +63 -0
  675. package/src/structure/total.ts +41 -6
  676. package/src/structure/unlisted-items.ts +207 -0
  677. package/src/structure/version-order.ts +10 -0
  678. package/src/structure/walk-time.ts +285 -0
  679. package/src/surname-near.ts +31 -0
  680. package/src/table-cells.ts +41 -0
  681. package/src/table-names.ts +113 -0
@@ -0,0 +1,80 @@
1
+ import { cellsOf, tablesOf } from "../facts/table-facts.js";
2
+ import { linesOf } from "../structure/lines.js";
3
+ import { bandSlips, headingOf, parseBand, runKindOf, } from "../structure/range-bands.js";
4
+ import { quoteAt } from "./structure-tree.js";
5
+ const MARKER_GROUPS = {
6
+ "lower-inclusive": { side: "low", kind: "inclusive" },
7
+ "lower-exclusive": { side: "low", kind: "exclusive" },
8
+ "upper-inclusive": { side: "high", kind: "inclusive" },
9
+ "upper-exclusive": { side: "high", kind: "exclusive" },
10
+ };
11
+ const isUnitKind = (group) => group === "integer" || group === "continuous";
12
+ export const bandWordsOf = (lexicons) => {
13
+ const words = lexicons["range-band-word"] ?? [];
14
+ const patterns = (group) => words.filter((entry) => entry.group === group).map((entry) => entry.pattern);
15
+ return {
16
+ connectors: patterns("connector"),
17
+ openers: words.filter((entry) => entry.group === "connector" && entry.position === "before").map((entry) => entry.pattern),
18
+ leads: patterns("lead"),
19
+ markers: words.flatMap((entry) => {
20
+ const marker = MARKER_GROUPS[entry.group ?? ""];
21
+ return marker === undefined ? [] : [{ pattern: entry.pattern, ...marker, position: entry.position ?? "after" }];
22
+ }),
23
+ units: (lexicons["range-band-unit"] ?? []).flatMap((entry) => isUnitKind(entry.group) ? [{ pattern: entry.pattern, kind: entry.group, position: entry.position ?? "after" }] : []),
24
+ headings: (lexicons["range-band-heading"] ?? []).flatMap((entry) => (isUnitKind(entry.group) ? [{ pattern: entry.pattern, kind: entry.group }] : [])),
25
+ };
26
+ };
27
+ /** Runs of consecutive slots that each state a band. A slot that is not one (合計, a blank) ends the run. */
28
+ const bandRuns = (slots, words) => slots
29
+ .reduce((runs, slot) => {
30
+ const band = slot === undefined ? undefined : parseBand(slot.text, words);
31
+ if (slot === undefined || band === undefined)
32
+ return [...runs, []];
33
+ const last = runs.at(-1) ?? [];
34
+ return [...runs.slice(0, -1), [...last, { band, start: slot.start, end: slot.end, text: slot.text.trim() }]];
35
+ }, [[]])
36
+ .filter((run) => run.length > 1);
37
+ const slipsOfRuns = (runs, heading, words) => runs.flatMap((run) => {
38
+ const kind = runKindOf(run.map((placed) => placed.band), heading, words);
39
+ return kind === undefined ? [] : bandSlips(run, kind);
40
+ });
41
+ const trimmedSlot = (text, start) => {
42
+ const lead = text.length - text.trimStart().length;
43
+ return { text: text.trim(), start: start + lead, end: start + lead + text.trim().length };
44
+ };
45
+ const tableSlips = (source, words) => tablesOf(linesOf(source)).flatMap((table) => {
46
+ const headings = cellsOf(table.header);
47
+ const rows = table.rows.map(cellsOf);
48
+ return headings.flatMap((heading, column) => slipsOfRuns(bandRuns(rows.map((cells) => {
49
+ const cell = cells[column];
50
+ return cell === undefined ? undefined : trimmedSlot(cell.text, cell.start);
51
+ }), words), headingOf(heading.text, words), words));
52
+ });
53
+ const LIST_MARKER = /^\s*(?:[-*+]|\d+[.)])\s+/u;
54
+ /** Where the band at the head of a list item ends: a colon, a comma, a bracket, or a dash set off by spaces. */
55
+ const ITEM_HEAD_END = /[::、,,((]|\s[-–—]\s|\t/u;
56
+ const listSlips = (doc, words) => doc.lists.flatMap((list) => {
57
+ const heads = list.itemSpans.map((span) => {
58
+ const item = doc.source.slice(span.start, span.end).split("\n")[0] ?? "";
59
+ const marker = LIST_MARKER.exec(item)?.[0];
60
+ if (marker === undefined)
61
+ return undefined;
62
+ const body = item.slice(marker.length);
63
+ const end = ITEM_HEAD_END.exec(body)?.index ?? body.length;
64
+ return trimmedSlot(body.slice(0, end), span.start + marker.length);
65
+ });
66
+ return slipsOfRuns(bandRuns(heads, words), undefined, words);
67
+ });
68
+ export const rangeBand = (doc) => {
69
+ const words = bandWordsOf(doc.lexicons);
70
+ return [...tableSlips(doc.source, words), ...listSlips(doc, words)].map((slip) => ({
71
+ rule: "range-band-mismatch",
72
+ severity: "warning",
73
+ line: 0,
74
+ column: 0,
75
+ quote: quoteAt(doc.source, slip.later.start),
76
+ ...(slip.kind === "gap" ? { variant: "gap" } : {}),
77
+ values: { earlier: slip.earlier.text, later: slip.later.text, offset: slip.later.start },
78
+ }));
79
+ };
80
+ //# sourceMappingURL=range-band.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-band.js","sourceRoot":"","sources":["../../src/det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GAAG,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACjF,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC5C,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;KACzF,CAAC,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=capacity-runtime-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity-runtime-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/capacity-runtime-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { capacityRuntime } from "../capacity-runtime.js";
2
+ export const detector = capacityRuntime;
3
+ //# sourceMappingURL=capacity-runtime-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity-runtime-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/capacity-runtime-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,MAAM,QAAQ,GAAa,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=connection-time-short.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-time-short.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/connection-time-short.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA8B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { connectionTimeShort } from "../time-order.js";
2
+ export const detector = connectionTimeShort;
3
+ //# sourceMappingURL=connection-time-short.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-time-short.js","sourceRoot":"","sources":["../../../src/detectors/registry/connection-time-short.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAa,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=contact-variant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-variant.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/contact-variant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { contactVariant } from "../contact-variant.js";
2
+ export const detector = contactVariant;
3
+ //# sourceMappingURL=contact-variant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-variant.js","sourceRoot":"","sources":["../../../src/detectors/registry/contact-variant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAa,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=count-over-capacity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-over-capacity.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/count-over-capacity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA4B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { countOverCapacity } from "../count-over-capacity.js";
2
+ export const detector = countOverCapacity;
3
+ //# sourceMappingURL=count-over-capacity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-over-capacity.js","sourceRoot":"","sources":["../../../src/detectors/registry/count-over-capacity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,QAAQ,GAAa,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=date-stamp-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-stamp-order.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/date-stamp-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { dateStampOrder } from "../date-stamp-order.js";
2
+ export const detector = dateStampOrder;
3
+ //# sourceMappingURL=date-stamp-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-stamp-order.js","sourceRoot":"","sources":["../../../src/detectors/registry/date-stamp-order.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAa,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=duration-product-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration-product-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/duration-product-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAkC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { durationProductMismatch } from "../derived-numbers.js";
2
+ export const detector = durationProductMismatch;
3
+ //# sourceMappingURL=duration-product-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration-product-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/duration-product-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAa,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=event-deadline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-deadline.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/event-deadline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { eventDeadline } from "../event-deadline.js";
2
+ export const detector = eventDeadline;
3
+ //# sourceMappingURL=event-deadline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-deadline.js","sourceRoot":"","sources":["../../../src/detectors/registry/event-deadline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAa,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=interval-count-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interval-count-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/interval-count-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAgC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { intervalCountMismatch } from "../use-interval.js";
2
+ export const detector = intervalCountMismatch;
3
+ //# sourceMappingURL=interval-count-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interval-count-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/interval-count-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAa,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=layout-code-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-code-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/layout-code-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { layoutCode } from "../layout-code.js";
2
+ export const detector = layoutCode;
3
+ //# sourceMappingURL=layout-code-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-code-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/layout-code-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,QAAQ,GAAa,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=party-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"party-order.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/party-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { partyOrder } from "../party-order.js";
2
+ export const detector = partyOrder;
3
+ //# sourceMappingURL=party-order.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"party-order.js","sourceRoot":"","sources":["../../../src/detectors/registry/party-order.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,QAAQ,GAAa,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=quantity-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quantity-range.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/quantity-range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { quantityRange } from "../quantity-range.js";
2
+ export const detector = quantityRange;
3
+ //# sourceMappingURL=quantity-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quantity-range.js","sourceRoot":"","sources":["../../../src/detectors/registry/quantity-range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAa,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=range-band-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-band-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/range-band-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { rangeBand } from "../range-band.js";
2
+ export const detector = rangeBand;
3
+ //# sourceMappingURL=range-band-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-band-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/range-band-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,CAAC,MAAM,QAAQ,GAAa,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=rent-multiple-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rent-multiple-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/rent-multiple-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA+B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { rentMultipleMismatch } from "../rent-multiple-mismatch.js";
2
+ export const detector = rentMultipleMismatch;
3
+ //# sourceMappingURL=rent-multiple-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rent-multiple-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/rent-multiple-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,CAAC,MAAM,QAAQ,GAAa,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=requirement-lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-lists.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/requirement-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { requirementLists } from "../requirement-lists.js";
2
+ export const detector = requirementLists;
3
+ //# sourceMappingURL=requirement-lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-lists.js","sourceRoot":"","sources":["../../../src/detectors/registry/requirement-lists.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,QAAQ,GAAa,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=return-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"return-type.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/return-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { returnType } from "../return-type.js";
2
+ export const detector = returnType;
3
+ //# sourceMappingURL=return-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"return-type.js","sourceRoot":"","sources":["../../../src/detectors/registry/return-type.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,MAAM,QAAQ,GAAa,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=scaled-quantity-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaled-quantity-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/scaled-quantity-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAiC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { scaledQuantityMismatch } from "../scaled-quantity.js";
2
+ export const detector = scaledQuantityMismatch;
3
+ //# sourceMappingURL=scaled-quantity-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaled-quantity-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/scaled-quantity-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,QAAQ,GAAa,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=step-time-sum-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-time-sum-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/step-time-sum-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA8B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { stepTimeSumMismatch } from "../step-time-sum.js";
2
+ export const detector = stepTimeSumMismatch;
3
+ //# sourceMappingURL=step-time-sum-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-time-sum-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/step-time-sum-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,QAAQ,GAAa,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=time-range-reversed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-range-reversed.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/time-range-reversed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA4B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { timeRangeReversed } from "../time-order.js";
2
+ export const detector = timeRangeReversed;
3
+ //# sourceMappingURL=time-range-reversed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-range-reversed.js","sourceRoot":"","sources":["../../../src/detectors/registry/time-range-reversed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAa,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=unlisted-item-used.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlisted-item-used.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/unlisted-item-used.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAA2B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { unlistedItemUsed } from "../unlisted-items.js";
2
+ export const detector = unlistedItemUsed;
3
+ //# sourceMappingURL=unlisted-item-used.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlisted-item-used.js","sourceRoot":"","sources":["../../../src/detectors/registry/unlisted-item-used.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,MAAM,QAAQ,GAAa,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../../plugin.ts";
2
+ export declare const detector: Detector;
3
+ //# sourceMappingURL=walk-time-distance-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walk-time-distance-mismatch.d.ts","sourceRoot":"","sources":["../../../src/detectors/registry/walk-time-distance-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,eAAO,MAAM,QAAQ,EAAE,QAAmC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { walkTimeDistanceMismatch } from "../walk-time-distance-mismatch.js";
2
+ export const detector = walkTimeDistanceMismatch;
3
+ //# sourceMappingURL=walk-time-distance-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walk-time-distance-mismatch.js","sourceRoot":"","sources":["../../../src/detectors/registry/walk-time-distance-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,MAAM,CAAC,MAAM,QAAQ,GAAa,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../plugin.ts";
2
+ export declare const rentMultipleMismatch: Detector;
3
+ //# sourceMappingURL=rent-multiple-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rent-multiple-mismatch.d.ts","sourceRoot":"","sources":["../../src/detectors/rent-multiple-mismatch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAA0B,MAAM,cAAc,CAAC;AAyCrE,eAAO,MAAM,oBAAoB,EAAE,QAUlC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { rentMultipleMismatches } from "../structure/rent-multiple.js";
2
+ import { scaledAmountOf, scaleWordsOf } from "./amount-scale.js";
3
+ import { amountsIn, formsOf } from "./currency-notation.js";
4
+ import { proseAndTablesOf } from "../table-text.js";
5
+ import { quoteAround } from "./quote-around.js";
6
+ const patternsOf = (doc, lexicon, group) => (doc.lexicons[lexicon] ?? []).filter((entry) => group === undefined || entry.group === group).map((entry) => entry.pattern);
7
+ const numberWordsOf = (doc) => (doc.lexicons["number-word"] ?? []).flatMap((entry) => entry.group === "digit" && entry.weight !== undefined ? [{ word: entry.pattern, value: entry.weight }] : []);
8
+ const wordsOf = (doc) => ({
9
+ rents: patternsOf(doc, "rent-label", "rent"),
10
+ fees: patternsOf(doc, "rent-label", "fee"),
11
+ multiples: patternsOf(doc, "rent-multiple-label"),
12
+ months: patternsOf(doc, "rent-multiple-word", "month"),
13
+ links: patternsOf(doc, "rent-multiple-word", "link"),
14
+ periods: patternsOf(doc, "rent-multiple-word", "period"),
15
+ skips: patternsOf(doc, "rent-multiple-word", "skip"),
16
+ connectors: [...patternsOf(doc, "range-connector"), ...patternsOf(doc, "amount-range-word")],
17
+ numberWords: numberWordsOf(doc),
18
+ });
19
+ const amountsOf = (text, doc) => {
20
+ const scales = scaleWordsOf(doc);
21
+ return amountsIn(text, formsOf(doc), scales.map((scale) => scale.word)).flatMap((amount) => {
22
+ const read = scaledAmountOf(text, amount, scales);
23
+ return read === undefined
24
+ ? []
25
+ : [{ offset: read.offset, end: amount.offset + amount.written.length, currency: read.currency, value: read.value, scale: read.unit }];
26
+ });
27
+ };
28
+ export const rentMultipleMismatch = (doc) => {
29
+ const text = proseAndTablesOf(doc);
30
+ return rentMultipleMismatches(text, amountsOf(text, doc), wordsOf(doc)).map((issue) => ({
31
+ rule: "rent-multiple-mismatch",
32
+ severity: "warning",
33
+ line: 0,
34
+ column: 0,
35
+ quote: quoteAround(text, issue.offset),
36
+ values: { ...issue.values, offset: issue.offset },
37
+ }));
38
+ };
39
+ //# sourceMappingURL=rent-multiple-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rent-multiple-mismatch.js","sourceRoot":"","sources":["../../src/detectors/rent-multiple-mismatch.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAA2C,MAAM,+BAA+B,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,GAAG,CAAC,GAAkB,EAAE,OAAe,EAAE,KAAc,EAAY,EAAE,CACnF,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAE9H,MAAM,aAAa,GAAG,CAAC,GAAkB,EAAoC,EAAE,CAC7E,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CA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AE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1I,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa,CAAC,GAAG,EAAa,EAAE;IAC/D,MAAM,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACtF,IAAI,EAAE,wBAAwB;QAC9B,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACtC,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;KAClD,CAAC,CAAC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Detector } from "../plugin.ts";
2
+ export declare const requirementLists: Detector;
3
+ //# sourceMappingURL=requirement-lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-lists.d.ts","sourceRoot":"","sources":["../../src/detectors/requirement-lists.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAgC,MAAM,cAAc,CAAC;AAmD3E,eAAO,MAAM,gBAAgB,EAAE,QAU9B,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { requiredListedAsPreferred } from "../structure/requirement-lists.js";
2
+ import { quoteAround } from "./quote-around.js";
3
+ const patternsOf = (doc, lexicon, group) => (doc.lexicons[lexicon] ?? []).filter((entry) => group === undefined || entry.group === group).map((entry) => entry.pattern);
4
+ const valuedOf = (doc, lexicon, group) => (doc.lexicons[lexicon] ?? []).flatMap((entry) => entry.weight === undefined || (group !== undefined && entry.group !== group) ? [] : [{ word: entry.pattern, value: entry.weight }]);
5
+ const wordsOf = (doc) => ({
6
+ required: patternsOf(doc, "requirement-heading", "required"),
7
+ preferred: patternsOf(doc, "requirement-heading", "preferred"),
8
+ units: valuedOf(doc, "requirement-length-unit"),
9
+ before: patternsOf(doc, "requirement-length-word", "before"),
10
+ after: patternsOf(doc, "requirement-length-word", "after"),
11
+ numbers: valuedOf(doc, "number-word", "digit"),
12
+ endings: patternsOf(doc, "requirement-item-ending"),
13
+ });
14
+ const LIST_MARKER = /^\s*(?:[-*+・•]|\d+[.).)])\s+(?:\[[ xX]\]\s+)?/u;
15
+ const headingsOf = (doc) => doc.sections
16
+ .filter((section) => section.depth > 0)
17
+ .map((section) => ({ kind: "heading", depth: section.depth, text: section.heading, offset: section.span.start }));
18
+ /** An item's own lines, joined, without its marker: the lines it wraps onto, up to a nested item. */
19
+ const itemText = (written) => {
20
+ const [first = "", ...rest] = written.split("\n");
21
+ const nested = rest.findIndex((line) => LIST_MARKER.test(line));
22
+ return [first.replace(LIST_MARKER, ""), ...(nested === -1 ? rest : rest.slice(0, nested))].map((line) => line.trim()).join(" ");
23
+ };
24
+ const itemsOf = (doc) => doc.lists.flatMap((list) => list.itemSpans.map((span) => ({ kind: "item", text: itemText(doc.source.slice(span.start, span.end)), offset: span.start })));
25
+ const inside = (offset, spans) => spans.some((span) => offset >= span.start && offset < span.end);
26
+ /** The lines outside lists, with code, headings and emphasis marks blanked out: the places a label (必須:) stands alone. */
27
+ const linesOf = (doc) => {
28
+ const prose = doc.prose ?? doc.source;
29
+ const starts = [0, ...[...prose.matchAll(/\n/gu)].map((match) => match.index + 1)];
30
+ return starts.flatMap((start) => {
31
+ const line = prose.slice(start, prose.indexOf("\n", start) === -1 ? prose.length : prose.indexOf("\n", start));
32
+ return line.trim() === "" || inside(start, doc.listSpans) ? [] : [{ kind: "line", text: line, offset: start }];
33
+ });
34
+ };
35
+ export const requirementLists = (doc) => {
36
+ const blocks = [...headingsOf(doc), ...linesOf(doc), ...itemsOf(doc)].toSorted((left, right) => left.offset - right.offset);
37
+ return requiredListedAsPreferred(blocks, wordsOf(doc)).map((issue) => ({
38
+ rule: "required-listed-as-preferred",
39
+ severity: "warning",
40
+ line: 0,
41
+ column: 0,
42
+ quote: quoteAround(doc.source, issue.offset),
43
+ values: { ...issue.values, offset: issue.offset },
44
+ }));
45
+ };
46
+ //# sourceMappingURL=requirement-lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-lists.js","sourceRoot":"","sources":["../../src/detectors/requirement-lists.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAiE,MAAM,mCAAmC,CAAC;AAC7I,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,GAAG,CAAC,GAAkB,EAAE,OAAe,EAAE,KAAc,EAAY,EAAE,CACnF,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAE9H,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,OAAe,EAAE,KAAc,EAAgB,EAAE,CACrF,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAC9C,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,KAAK,K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