@esri/solutions-components 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
  2. package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
  4. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
  5. package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
  6. package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
  7. package/dist/cjs/layer-table.cjs.entry.js +3 -3
  8. package/dist/cjs/map-card.cjs.entry.js +1 -1
  9. package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
  10. package/dist/cjs/public-notification.cjs.entry.js +16 -10
  11. package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
  12. package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
  13. package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
  14. package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
  15. package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
  16. package/dist/collection/components/public-notification/public-notification.js +14 -8
  17. package/dist/collection/components/refine-selection/refine-selection.js +4 -2
  18. package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
  19. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
  20. package/dist/collection/demos/new-public-notification.html +2 -1
  21. package/dist/collection/utils/interfaces.js +1 -1
  22. package/dist/collection/utils/interfaces.ts +2 -2
  23. package/dist/components/interfaces3.js +1 -1
  24. package/dist/components/map-draw-tools2.js +2 -1
  25. package/dist/components/public-notification.js +14 -8
  26. package/dist/components/refine-selection-tools2.js +4 -2
  27. package/dist/components/refine-selection2.js +4 -2
  28. package/dist/esm/buffer-tools_6.entry.js +8 -5
  29. package/dist/esm/calcite-combobox_3.entry.js +2 -2
  30. package/dist/esm/calcite-input-message_5.entry.js +6 -4
  31. package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
  32. package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
  33. package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
  34. package/dist/esm/layer-table.entry.js +3 -3
  35. package/dist/esm/map-card.entry.js +1 -1
  36. package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
  37. package/dist/esm/public-notification.entry.js +16 -10
  38. package/dist/esm/solution-configuration.entry.js +2 -2
  39. package/dist/esm/solution-contents_3.entry.js +2 -2
  40. package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
  41. package/dist/solutions-components/demos/new-public-notification.html +2 -1
  42. package/dist/solutions-components/p-05e64bd1.js +498 -2
  43. package/dist/solutions-components/p-08a95b33.entry.js +138 -0
  44. package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
  45. package/dist/solutions-components/p-0ef91144.entry.js +913 -0
  46. package/dist/solutions-components/p-0f523243.entry.js +1916 -0
  47. package/dist/solutions-components/p-11b9510e.entry.js +173 -0
  48. package/dist/solutions-components/p-1b875d94.entry.js +58 -0
  49. package/dist/solutions-components/p-1c567f3a.js +23 -16
  50. package/dist/solutions-components/p-1c883db9.entry.js +43 -0
  51. package/dist/solutions-components/p-1f225056.js +322 -0
  52. package/dist/solutions-components/p-1f499e67.entry.js +72 -0
  53. package/dist/solutions-components/p-20d3d758.entry.js +881 -0
  54. package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
  55. package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
  56. package/dist/solutions-components/p-2447798c.entry.js +155 -0
  57. package/dist/solutions-components/p-2525e691.entry.js +432 -0
  58. package/dist/solutions-components/p-2561f5b5.js +4092 -0
  59. package/dist/solutions-components/p-29f887c0.entry.js +234 -0
  60. package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
  61. package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
  62. package/dist/solutions-components/p-2e9ed892.js +46 -1
  63. package/dist/solutions-components/p-316f56db.js +219 -2
  64. package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
  65. package/dist/solutions-components/p-356f8b54.entry.js +138 -0
  66. package/dist/solutions-components/p-359c58de.entry.js +172 -0
  67. package/dist/solutions-components/p-37336c0d.entry.js +116 -0
  68. package/dist/solutions-components/p-374a5031.js +105 -2
  69. package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
  70. package/dist/solutions-components/p-3b010ce1.js +17 -1
  71. package/dist/solutions-components/p-4307dacd.js +194 -1
  72. package/dist/solutions-components/p-44da2507.js +405 -14
  73. package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
  74. package/dist/solutions-components/p-4894bbeb.js +53 -2
  75. package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
  76. package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
  77. package/dist/solutions-components/p-4e32bf8c.js +482 -1
  78. package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
  79. package/dist/solutions-components/p-508317b3.js +13 -2
  80. package/dist/solutions-components/p-54697d58.entry.js +198 -0
  81. package/dist/solutions-components/p-55c79103.entry.js +311 -0
  82. package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
  83. package/dist/solutions-components/p-59b48fde.entry.js +443 -0
  84. package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
  85. package/dist/solutions-components/p-621d0534.entry.js +123 -0
  86. package/dist/solutions-components/p-63f6e8f1.js +14 -1
  87. package/dist/solutions-components/p-66aeec57.entry.js +61 -0
  88. package/dist/solutions-components/p-69834f46.entry.js +618 -0
  89. package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
  90. package/dist/solutions-components/p-6e0da576.js +13 -1
  91. package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
  92. package/dist/solutions-components/p-6fe17794.js +9 -1
  93. package/dist/solutions-components/p-7024cb16.entry.js +72 -0
  94. package/dist/solutions-components/p-70535506.entry.js +226 -0
  95. package/dist/solutions-components/p-708a63a8.js +12 -1
  96. package/dist/solutions-components/p-729708a3.js +14 -1
  97. package/dist/solutions-components/p-73e23995.js +6 -1
  98. package/dist/solutions-components/p-74b29d75.entry.js +231 -0
  99. package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
  100. package/dist/solutions-components/p-77182c3a.js +3015 -1
  101. package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
  102. package/dist/solutions-components/p-79709c19.js +60 -3
  103. package/dist/solutions-components/p-7a46ef97.js +181 -2
  104. package/dist/solutions-components/p-7be159e6.entry.js +175 -0
  105. package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
  106. package/dist/solutions-components/p-7daea1df.js +41 -1
  107. package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
  108. package/dist/solutions-components/p-7fb45059.entry.js +43 -0
  109. package/dist/solutions-components/p-815533de.js +306 -3
  110. package/dist/solutions-components/p-816622ca.entry.js +248 -0
  111. package/dist/solutions-components/p-83166522.js +205 -2
  112. package/dist/solutions-components/p-83bd1991.entry.js +36 -0
  113. package/dist/solutions-components/p-856464d7.entry.js +572 -0
  114. package/dist/solutions-components/p-8c349bad.entry.js +347 -0
  115. package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
  116. package/dist/solutions-components/p-904c185a.entry.js +228 -0
  117. package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
  118. package/dist/solutions-components/p-9371145a.entry.js +477 -0
  119. package/dist/solutions-components/p-93d3119d.js +1948 -1
  120. package/dist/solutions-components/p-95ec8062.entry.js +173 -0
  121. package/dist/solutions-components/p-991ee695.js +109 -1
  122. package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
  123. package/dist/solutions-components/p-9a9955db.js +41 -1
  124. package/dist/solutions-components/p-9c1ebc90.js +35 -16
  125. package/dist/solutions-components/p-9eba5c66.js +399 -3
  126. package/dist/solutions-components/p-a033a507.entry.js +252 -0
  127. package/dist/solutions-components/p-a3773415.entry.js +1132 -0
  128. package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
  129. package/dist/solutions-components/p-a5b1ab03.js +33 -3
  130. package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
  131. package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
  132. package/dist/solutions-components/p-a8005026.entry.js +565 -0
  133. package/dist/solutions-components/p-a80b3880.js +14 -1
  134. package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
  135. package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
  136. package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
  137. package/dist/solutions-components/p-ae1fd76b.js +11 -1
  138. package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
  139. package/dist/solutions-components/p-b359dc78.js +41 -1
  140. package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
  141. package/dist/solutions-components/p-b75cc407.entry.js +145 -0
  142. package/dist/solutions-components/p-b911cb75.entry.js +71 -0
  143. package/dist/solutions-components/p-b965e177.entry.js +335 -0
  144. package/dist/solutions-components/p-b978636e.js +14 -1
  145. package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
  146. package/dist/solutions-components/p-bd67334c.js +122 -2
  147. package/dist/solutions-components/p-bde20dba.entry.js +212 -0
  148. package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
  149. package/dist/solutions-components/p-c023e6a1.js +2028 -2
  150. package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
  151. package/dist/solutions-components/p-c579ed60.entry.js +447 -0
  152. package/dist/solutions-components/p-c92bc231.js +101 -2
  153. package/dist/solutions-components/p-cc815aca.js +839 -16
  154. package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
  155. package/dist/solutions-components/p-cdc46c0c.js +1751 -2
  156. package/dist/solutions-components/p-d12e6992.entry.js +118 -0
  157. package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
  158. package/dist/solutions-components/p-d48a24e6.js +754 -2
  159. package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
  160. package/dist/solutions-components/p-dbc9a5a8.js +80 -0
  161. package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
  162. package/dist/solutions-components/p-de39206f.entry.js +113 -0
  163. package/dist/solutions-components/p-de5416e8.js +28 -1
  164. package/dist/solutions-components/p-df420d54.entry.js +213 -0
  165. package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
  166. package/dist/solutions-components/p-e4845fec.entry.js +152 -0
  167. package/dist/solutions-components/p-e611d8c8.js +28 -1
  168. package/dist/solutions-components/p-e947d3b0.js +5 -1
  169. package/dist/solutions-components/p-ea534300.js +41 -2
  170. package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
  171. package/dist/solutions-components/p-ed36c637.entry.js +85 -0
  172. package/dist/solutions-components/p-f0add71c.js +74 -0
  173. package/dist/solutions-components/p-f42e014b.js +171 -2
  174. package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
  175. package/dist/solutions-components/p-fc884dd6.js +28 -16
  176. package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
  177. package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
  178. package/dist/solutions-components/solutions-components.esm.js +20 -1
  179. package/dist/solutions-components/utils/interfaces.ts +2 -2
  180. package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
  181. package/dist/types/components/public-notification/public-notification.d.ts +9 -1
  182. package/dist/types/components.d.ts +2 -2
  183. package/package.json +1 -1
  184. package/dist/solutions-components/p-021432b8.entry.js +0 -12
  185. package/dist/solutions-components/p-03440b1e.entry.js +0 -11
  186. package/dist/solutions-components/p-0512635b.entry.js +0 -6
  187. package/dist/solutions-components/p-086ef115.entry.js +0 -29
  188. package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
  189. package/dist/solutions-components/p-0c088725.entry.js +0 -6
  190. package/dist/solutions-components/p-0f820c08.entry.js +0 -6
  191. package/dist/solutions-components/p-164780a0.entry.js +0 -6
  192. package/dist/solutions-components/p-179a68a0.entry.js +0 -6
  193. package/dist/solutions-components/p-184b5005.entry.js +0 -11
  194. package/dist/solutions-components/p-1d082fee.entry.js +0 -11
  195. package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
  196. package/dist/solutions-components/p-20a58e62.entry.js +0 -17
  197. package/dist/solutions-components/p-20b2458c.entry.js +0 -11
  198. package/dist/solutions-components/p-245d47c1.entry.js +0 -6
  199. package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
  200. package/dist/solutions-components/p-2cc72806.entry.js +0 -23
  201. package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
  202. package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
  203. package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
  204. package/dist/solutions-components/p-3109d940.entry.js +0 -6
  205. package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
  206. package/dist/solutions-components/p-3649acb3.entry.js +0 -18
  207. package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
  208. package/dist/solutions-components/p-3fa9b3c8.js +0 -36
  209. package/dist/solutions-components/p-40c41709.entry.js +0 -6
  210. package/dist/solutions-components/p-40e963c7.entry.js +0 -11
  211. package/dist/solutions-components/p-40f480da.entry.js +0 -11
  212. package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
  213. package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
  214. package/dist/solutions-components/p-506e4d78.entry.js +0 -6
  215. package/dist/solutions-components/p-576fdcab.entry.js +0 -6
  216. package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
  217. package/dist/solutions-components/p-65e177f1.entry.js +0 -6
  218. package/dist/solutions-components/p-67d710c2.entry.js +0 -6
  219. package/dist/solutions-components/p-7268b445.entry.js +0 -11
  220. package/dist/solutions-components/p-75ea4667.entry.js +0 -6
  221. package/dist/solutions-components/p-778c0a36.entry.js +0 -17
  222. package/dist/solutions-components/p-7a22509b.entry.js +0 -12
  223. package/dist/solutions-components/p-7bff51db.entry.js +0 -6
  224. package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
  225. package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
  226. package/dist/solutions-components/p-8060fb94.entry.js +0 -6
  227. package/dist/solutions-components/p-80a1b305.entry.js +0 -6
  228. package/dist/solutions-components/p-81eae877.entry.js +0 -12
  229. package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
  230. package/dist/solutions-components/p-851e04ae.entry.js +0 -6
  231. package/dist/solutions-components/p-9106950a.entry.js +0 -11
  232. package/dist/solutions-components/p-979804a4.entry.js +0 -11
  233. package/dist/solutions-components/p-9862baa8.entry.js +0 -11
  234. package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
  235. package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
  236. package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
  237. package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
  238. package/dist/solutions-components/p-a33c044e.entry.js +0 -6
  239. package/dist/solutions-components/p-a516c658.entry.js +0 -6
  240. package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
  241. package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
  242. package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
  243. package/dist/solutions-components/p-ad469b92.entry.js +0 -11
  244. package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
  245. package/dist/solutions-components/p-addc1156.entry.js +0 -11
  246. package/dist/solutions-components/p-ae846934.entry.js +0 -11
  247. package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
  248. package/dist/solutions-components/p-b4e476b7.js +0 -257
  249. package/dist/solutions-components/p-b668daf8.js +0 -21
  250. package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
  251. package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
  252. package/dist/solutions-components/p-be41429f.js +0 -21
  253. package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
  254. package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
  255. package/dist/solutions-components/p-c4afae53.entry.js +0 -12
  256. package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
  257. package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
  258. package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
  259. package/dist/solutions-components/p-d09a168c.entry.js +0 -6
  260. package/dist/solutions-components/p-d377f913.entry.js +0 -11
  261. package/dist/solutions-components/p-d4cefead.entry.js +0 -37
  262. package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
  263. package/dist/solutions-components/p-d8968487.entry.js +0 -11
  264. package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
  265. package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
  266. package/dist/solutions-components/p-ec27e493.entry.js +0 -11
  267. package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
  268. package/dist/solutions-components/p-ef21e195.entry.js +0 -23
  269. package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
  270. package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
  271. package/dist/solutions-components/p-f847291f.entry.js +0 -6
  272. package/dist/solutions-components/p-f90fd262.entry.js +0 -11
  273. package/dist/solutions-components/p-fc973005.entry.js +0 -6
  274. package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -3,19 +3,842 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- /** @license
7
- * Copyright 2022 Esri
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
- var e,n;function t(t,o,c,r=!1){const u=parseInt(t),s=e[o],D=parseFloat(c.toString());if(Number.isNaN(D)||0===D)return"";const H=!0===r||"true"===r.toString().toLowerCase();let M;switch(u){case n.ALLIGATOR_CRACKING:M=i;break;case n.BLEEDING:M=l;break;case n.BLOCK_CRACKING:M=f;break;case n.BUMPS_SAGS:M=d;break;case n.CORRUGATION:M=b;break;case n.DEPRESSION:M=I;break;case n.EDGE_CRACKING:M=$;break;case n.REFLECTION_CRACKING:M=A;break;case n.LANE_SHOULDER_DROP_OFF:M=C;break;case n.LONG_TRANS_CRACKING:M=G;break;case n.PATCHING_UTIL_CUT_PATCHING:M=R;break;case n.POLISHED_AGGREGATE:M=N;break;case n.POTHOLES:M=h;break;case n.RAILROAD_CROSSING:M=p;break;case n.RUTTING:M=E;break;case n.SHOVING:M=O;break;case n.SLIPPAGE_CRACKING:M=k;break;case n.SWELL:M=L;break;case n.RAVELING:M=v;break;case n.WEATHERING:M=_}const S=M(s,Math.log10(D)),T=a(S),m=`${t}|${o}|${T}|${D}`;return H&&(console.log(`Deduct value: ${S}`),console.log(`Rounded deduct value: ${T}`),console.log(`Formatted devduct value (type|severity|roundedDV|density): ${m}`)),m}function o(e,n=!1){let t=e.indexOf("|")>-1?function(e,n){const t={},o=function(e){return e.split(",").reduce(((e,n)=>{const t=n.split("|"),o=t[0],c=t[1],r=parseFloat(t[2]),u=parseFloat(t[3]);return e[o]||(e[o]={}),e[o][c]={deductValue:r,density:u},e}),{})}(e),u=Object.keys(o).filter((e=>Object.keys(o[e]).length>1));return u.length>0&&u.forEach((e=>{let u,s,a,i,l,f;Object.keys(o[e]).forEach((n=>{"H"===n?(u=o[e][n].deductValue,i=o[e][n].density):"M"===n?(s=o[e][n].deductValue,l=o[e][n].density):(a=o[e][n].deductValue,f=o[e][n].density)}));const d=(i&&l&&f?c:r)(e,u,s,a,i,l,f,n);d&&(t[e]=d,n&&(console.log("updates"),console.log(t)))})),function(e,n){const t=[];return e.split(",").reduce(((e,o)=>{const c=o.split("|"),r=c[0],u=parseFloat(c[2]);return Object.keys(n).length>0&&n[r]?(t.push(r),e.push(...n[r]),delete n[r]):t.indexOf(r)<0&&e.push(u),e}),[])}(e,t)}(e,n):e.split(",").map((e=>parseFloat(e)));const o=!0===n||"true"===n.toString().toLowerCase();let u=0;if(t=t.filter((e=>Math.abs(e)>0)),t.length>0){const e=function(e,n){let t;const o=e.filter((e=>e>2));if(o.length<=1)t=o.reduce(((e,n)=>e+n),0),n&&(console.log("If none or only one individual deduct value is greater"),console.log("than two, the total value is used in place of the maximum CD"),console.log(`Max CDV: ${t}`));else{const o=e.sort(((e,n)=>n-e)),c=o[0],r=1+9/98*(100-c);if(n&&(console.log(`Deduct values sorted in descending order: ${o}`),console.log(`Highest deduct value: ${c}`),console.log(`Allowable number of deducts including fractions: ${r}`)),r<=10){const e=function(e,n){const t=n-Math.floor(n);return e.length<n?e:e.reduce(((e,o,c)=>(c+1<n?e.push(o):t>0&&e.push(a(o*t)),e)),[])}(o,r);n&&console.log(`Reduce deduct values to the m largest including the fractional part: ${e}`);const c=function(e,n){let t=e.length;const o=[];for(;t>=1;)n&&console.log(`vals: ${e}`),o.push(D(e,n)),t-=1,e.splice(t,1,2);return o}(e,n);t=Math.max(...c),n&&console.log(`Max CDV: ${t}`)}else n&&console.log("Allowable number of deducts including fractions (must be less than or equal to ten)")}return t}(t,o);u=100-a(e)}return u}function c(e,n,t,c,r,s,a,i){const l=o(`${n},${t},${c}`,!0);i&&(console.log("pci1"),console.log(l));const f=u(e,"M",(a+s).toString(),n,i),d=u(e,"H",(s+r).toString(),c,i),b=u(e,"H",(a+r).toString(),t,i),I=u(e,"H",(a+s+r).toString(),0,i);i&&(console.log("low med pci2"),console.log(f.pci),console.log("med high pci2"),console.log(d.pci),console.log("low high pci2"),console.log(b.pci),console.log("low med high pci2"),console.log(I.pci));const $=[f,d,b,I].reduce(((e,n)=>n.pci>l&&(!e||n.pci>e.pci)?n:e),void 0);return $?$.dv:void 0}function r(e,n,t,c,r,s,a,i){const l=o(`${n||t},${c||t}`,!0);i&&(console.log("pci1"),console.log(l));const f=r||s,d=u(e,f===r?"H":"M",(f+(a||s)).toString(),0,i);return i&&(console.log("pci2"),console.log(d.pci)),d.pci>l?d.dv:void 0}function u(e,n,c,r,u){const s=t(e,n,c).split("|"),a=parseFloat(s[2]);return{pci:o(`${s[2]},${r}`,u),dv:r?[a,r]:[a]}}function s(e,n){return n.reduce(((n,t,o)=>n+(0===o?t:1===o?t*e:t*Math.pow(e,o))),0)}function a(e){return Math.round(10*e)/10}function i(n,t){return s(t,n===e.H?[30.71,29.22,9.407,-6.981,-2.158,3.047,-.6578]:n===e.M?[21.62,21.32,5.194,-1.343,.2341]:[11.31,16.05,7.572,-1.471])}function l(n,t){return s(t,n===e.H?[5.343,6.927,7.926,4.265,-.7582]:n===e.M?[2.38,5.483,4.128,.8366,.03659,.1052]:[.01391,.5079,1.576,1.191,.1329,.03823])}function f(n,t){return s(t,n===e.H?[7.926,11.93,8.826,3.432,-1.382]:n===e.M?[2.587,9.142,6.647,-.455,-.2439,.1107]:[.646,4.002,4.2,.4987,-.06269])}function d(n,t){return s(t,n===e.H?[52.77,38.07,8.964,-.4148,-1.589,2.478]:n===e.M?[24.66,27.86,15.73,3.295,-5.27,5.921,7.959]:[8.768,13.79,7.064,7.455,6.041,-1.739,-1.371])}function b(n,t){return s(t,n===e.H?[34.21,21.59,1.863,6.141,-.687,-1.885,.4916]:n===e.M?[15.78,19.69,6.276,-2.124,.5868,.06045]:[2.173,5.609,5.976,-.7348,-.2172,1.494,-.5659])}function I(n,t){return s(t,n===e.H?[17.84,5.904,9.406,18.28,-2.753,-7.798,2.402]:n===e.M?[8.471,3.171,10.25,12.2,-.9687,-4.601,1.079]:[4.836,-.7572,4.786,12.39,1.233,-4.871,.9749])}function $(n,t){return s(t,n===e.H?[14.99,13.5,10.62,5.15,-1.792,-2.826]:n===e.M?[9.177,10.26,5.704,-.6812,-.8588,.2123]:[3.049,4.802,4.058,-.3556,-1.55,1.02])}function A(n,t){return s(t,n===e.H?[14.99,17.21,27.63,31.13,-20.94,-18.82,9.985]:n===e.M?[9.9193,10.88,8.073,14.8,-3.792,-9.583,3.651]:[2.356,6.664,3.717,-1.393,1.94,1.785,-.9707])}function C(n,t){return s(t,n===e.H?[7.549,6.907,7.284,9.304,2.064]:n===e.M?[4.02,1.744,14.36,15.92,-40.22,23.6]:[2.004,1.065,9.706,11.75,-27.52,15.04])}function G(n,t){return s(t,n===e.H?[19.56,24.06,12.12,9.336,1.532,-4.396]:n===e.M?[9.751,15.53,4.719,1.369,1.206,-1.164]:[2.347,9.074,8.424,-1.338,-1.873,1.144])}function R(n,t){return s(t,n===e.H?[20.15,16.55,5.415,10.77,3.257,-4.502]:n===e.M?[10.28,12.71,6.174,1.928,.6923,-.4673]:[2.523,6.892,5.702,2.407,.2185,-.8722])}function N(e,n){return s(n,"H"===e||"M"===e||"L"===e?[3.417,-26.82,71.15,-76.22,38.52,-6.904]:[])}function h(n,t){return s(t,n===e.H?[110.7,60.66,2.378,-2.664]:n===e.M?[90.47,60.41,-.1123,-4.746]:[58.19,40.53,2.884,-1.443,.1195])}function p(n,t){return s(t,n===e.H?[20,38.64,-62.82,193.6,-162.7,41.22]:n===e.M?[6.994,23.47,-52.3,167.3,-143.6,37.64]:[1.998,-.7488,13.8,-.7917,-1.981])}function E(n,t){return s(t,n===e.H?[27.61,25.19,8.557,1.65,-2.203]:n===e.M?[18.47,20.77,6.617,-1.13,-2.286]:[8.833,14.84,3.129,.1451,2.438,-1.279])}function O(n,t){return s(t,n===e.H?[18.7,20.17,10.3,4.694,1.331,-2.61]:n===e.M?[10.39,14.78,5.488,4.001,3.23,-2.387]:[4.002,10.66,6.332,-.5226,-.1923])}function k(n,t){return s(t,n===e.H?[19.73,32.21,25.87,-2.871,-10.55,1.496,.7393]:n===e.M?[11.38,18.55,18.38,1.628,-7.596,.5841,.5946]:[5.144,12.95,11.95,-.833,-2.995,1.325,-.2113])}function L(n,t){return s(t,n===e.H?[34,16.84,-23.09,41.17,-14.84]:n===e.M?[12,15.67,20.59,-28.33,21,-5.508]:[1.995,11.9,-12.83,16.74,-5.361])}function v(n,t){return s(t,n===e.H?[16.77,10.67,5.758,12.9,-.0633,-5.659,1.48]:n===e.M?[8.512,5.106,1.63,3.469,1.028,-1.211,.1938]:[])}function _(n,t){return s(t,n===e.H?[3.673,3.349,2.598,-1.233,2.754,2.434,-1.485]:n===e.M?[1.12,.9769,.93,-.5955,1.041,1.111,-.614]:[-.0386,-.0736,.834,1.63,-.0287,-.639,.1515])}function D(e,n){return function(e,n,t){const o=s(e,{7:[-9.482,.6045,3563e-7,-5448e-9],6:[-8.165,.5724,4266e-7,-4254e-9],5:[-7.932,.6091,3464e-7,-4265e-9],4:[-6.78,.6301,7376e-7,-6357e-9],3:[-5.015,.7546,-43e-5,-3075e-9],2:[-1.668,.7992,-3013e-7,-5214e-9],1:[1651e-18,1,-4249e-21,1149e-22]}[n>=7?7:n]);return t&&(console.log(`totalDV: ${e}`),console.log(`q: ${n}`),console.log(`CDV: ${o}`)),o}(e.reduce(((e,n)=>e+n),0),e.reduce(((e,n)=>n>2?e+1:e),0),n)}!function(e){e.H="H",e.M="M",e.L="L"}(e||(e={})),function(e){e[e.ALLIGATOR_CRACKING=1]="ALLIGATOR_CRACKING",e[e.BLEEDING=2]="BLEEDING",e[e.BLOCK_CRACKING=3]="BLOCK_CRACKING",e[e.BUMPS_SAGS=4]="BUMPS_SAGS",e[e.CORRUGATION=5]="CORRUGATION",e[e.DEPRESSION=6]="DEPRESSION",e[e.EDGE_CRACKING=7]="EDGE_CRACKING",e[e.REFLECTION_CRACKING=8]="REFLECTION_CRACKING",e[e.LANE_SHOULDER_DROP_OFF=9]="LANE_SHOULDER_DROP_OFF",e[e.LONG_TRANS_CRACKING=10]="LONG_TRANS_CRACKING",e[e.PATCHING_UTIL_CUT_PATCHING=11]="PATCHING_UTIL_CUT_PATCHING",e[e.POLISHED_AGGREGATE=12]="POLISHED_AGGREGATE",e[e.POTHOLES=13]="POTHOLES",e[e.RAILROAD_CROSSING=14]="RAILROAD_CROSSING",e[e.RUTTING=15]="RUTTING",e[e.SHOVING=16]="SHOVING",e[e.SLIPPAGE_CRACKING=17]="SLIPPAGE_CRACKING",e[e.SWELL=18]="SWELL",e[e.RAVELING=19]="RAVELING",e[e.WEATHERING=20]="WEATHERING"}(n||(n={}));export{n as E,e as a,t as b,o as c}
6
+ /** @license
7
+ * Copyright 2022 Esri
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+ /**
22
+ * Effect of the distresses on ride quality.
23
+ *
24
+ * L - Low. Individual bumps or settlements, or both, cause the vehicle to bounce slightly,
25
+ * but create little discomfort.
26
+ *
27
+ * M - Medium. Individual bumps or settlements, or both, cause the vehicle to bounce significantly,
28
+ * creating some discomfort.
29
+ *
30
+ * H - High. Individual bumps or settlements, or both, cause the vehicle to bounce excessively,
31
+ * creating substantial discomfort, safety hazard, or high potential vehicle damage.
32
+ *
33
+ * @returns Promise resolving when function is done
34
+ *
35
+ */
36
+ var ESeverity;
37
+ (function (ESeverity) {
38
+ ESeverity["H"] = "H";
39
+ ESeverity["M"] = "M";
40
+ ESeverity["L"] = "L";
41
+ })(ESeverity || (ESeverity = {}));
42
+ /**
43
+ * Type of distress as defined by ASTM standard
44
+ *
45
+ */
46
+ var EDistressType;
47
+ (function (EDistressType) {
48
+ EDistressType[EDistressType["ALLIGATOR_CRACKING"] = 1] = "ALLIGATOR_CRACKING";
49
+ EDistressType[EDistressType["BLEEDING"] = 2] = "BLEEDING";
50
+ EDistressType[EDistressType["BLOCK_CRACKING"] = 3] = "BLOCK_CRACKING";
51
+ EDistressType[EDistressType["BUMPS_SAGS"] = 4] = "BUMPS_SAGS";
52
+ EDistressType[EDistressType["CORRUGATION"] = 5] = "CORRUGATION";
53
+ EDistressType[EDistressType["DEPRESSION"] = 6] = "DEPRESSION";
54
+ EDistressType[EDistressType["EDGE_CRACKING"] = 7] = "EDGE_CRACKING";
55
+ EDistressType[EDistressType["REFLECTION_CRACKING"] = 8] = "REFLECTION_CRACKING";
56
+ EDistressType[EDistressType["LANE_SHOULDER_DROP_OFF"] = 9] = "LANE_SHOULDER_DROP_OFF";
57
+ EDistressType[EDistressType["LONG_TRANS_CRACKING"] = 10] = "LONG_TRANS_CRACKING";
58
+ EDistressType[EDistressType["PATCHING_UTIL_CUT_PATCHING"] = 11] = "PATCHING_UTIL_CUT_PATCHING";
59
+ EDistressType[EDistressType["POLISHED_AGGREGATE"] = 12] = "POLISHED_AGGREGATE";
60
+ EDistressType[EDistressType["POTHOLES"] = 13] = "POTHOLES";
61
+ EDistressType[EDistressType["RAILROAD_CROSSING"] = 14] = "RAILROAD_CROSSING";
62
+ EDistressType[EDistressType["RUTTING"] = 15] = "RUTTING";
63
+ EDistressType[EDistressType["SHOVING"] = 16] = "SHOVING";
64
+ EDistressType[EDistressType["SLIPPAGE_CRACKING"] = 17] = "SLIPPAGE_CRACKING";
65
+ EDistressType[EDistressType["SWELL"] = 18] = "SWELL";
66
+ EDistressType[EDistressType["RAVELING"] = 19] = "RAVELING";
67
+ EDistressType[EDistressType["WEATHERING"] = 20] = "WEATHERING";
68
+ })(EDistressType || (EDistressType = {}));
69
+ /**
70
+ * Calculate the deduct value for the given distress.
71
+ *
72
+ * @param type expects 1-19 as a string
73
+ * @param severity expects "H" | "M" | "L"
74
+ * @param density the calculated percent density ralative to the total sample area
75
+ * @param showDebugging used to control debugging messages to show the various
76
+ * calculations a required steps along the way.
77
+ * The main reason this is optional is that it provides no value when used within
78
+ * Survey123 as we have nowhere to see the messages and I wasn't sure if writing to a
79
+ * console in that context could have any negative side effects.
80
+ *
81
+ * @returns pipe delimited string: type|severity|roundedDeductValue|density
82
+ */
83
+ function calculateDeductValue(type, severity, density, showDebugging = false) {
84
+ // When called from survey123 we will get the args as strings
85
+ // not sure if they could be numbers so a little extra conversion to make sure with the density
86
+ const _type = parseInt(type);
87
+ const _severity = ESeverity[severity];
88
+ const _density = parseFloat(density.toString());
89
+ // When called from survey123 all distress types and severities will be passed in
90
+ // We only need to calculate the deduct value if we have a valid density
91
+ if (Number.isNaN(_density) || _density === 0) {
92
+ return "";
93
+ }
94
+ const _showDebugging = showDebugging === true || showDebugging.toString().toLowerCase() === "true";
95
+ let calc;
96
+ switch (_type) {
97
+ case EDistressType.ALLIGATOR_CRACKING:
98
+ calc = _calcAlligator;
99
+ break;
100
+ case EDistressType.BLEEDING:
101
+ calc = _calcBleeding;
102
+ break;
103
+ case EDistressType.BLOCK_CRACKING:
104
+ calc = _calcBlockCracking;
105
+ break;
106
+ case EDistressType.BUMPS_SAGS:
107
+ calc = _calcBumpsSags;
108
+ break;
109
+ case EDistressType.CORRUGATION:
110
+ calc = _calcCorrugation;
111
+ break;
112
+ case EDistressType.DEPRESSION:
113
+ calc = _calcDepression;
114
+ break;
115
+ case EDistressType.EDGE_CRACKING:
116
+ calc = _calcEdgeCracking;
117
+ break;
118
+ case EDistressType.REFLECTION_CRACKING:
119
+ calc = _calcReflectionCracking;
120
+ break;
121
+ case EDistressType.LANE_SHOULDER_DROP_OFF:
122
+ calc = _calcLaneShoulderDropOff;
123
+ break;
124
+ case EDistressType.LONG_TRANS_CRACKING:
125
+ calc = _calcLongTransCracking;
126
+ break;
127
+ case EDistressType.PATCHING_UTIL_CUT_PATCHING:
128
+ calc = _calcPatchingUtilCutPatching;
129
+ break;
130
+ case EDistressType.POLISHED_AGGREGATE:
131
+ calc = _calcPolishedAggregate;
132
+ break;
133
+ case EDistressType.POTHOLES:
134
+ calc = _calcPotholes;
135
+ break;
136
+ case EDistressType.RAILROAD_CROSSING:
137
+ calc = _calcRailroadCrossing;
138
+ break;
139
+ case EDistressType.RUTTING:
140
+ calc = _calcRutting;
141
+ break;
142
+ case EDistressType.SHOVING:
143
+ calc = _calcShoving;
144
+ break;
145
+ case EDistressType.SLIPPAGE_CRACKING:
146
+ calc = _calcSlippageCracking;
147
+ break;
148
+ case EDistressType.SWELL:
149
+ calc = _calcSwell;
150
+ break;
151
+ case EDistressType.RAVELING:
152
+ calc = _calcRaveling;
153
+ break;
154
+ case EDistressType.WEATHERING:
155
+ calc = _calcWeathering;
156
+ break;
157
+ }
158
+ const dv = calc(_severity, Math.log10(_density));
159
+ const roundedDV = _round(dv);
160
+ const formattedDV = `${type}|${severity}|${roundedDV}|${_density}`;
161
+ if (_showDebugging) {
162
+ console.log(`Deduct value: ${dv}`);
163
+ console.log(`Rounded deduct value: ${roundedDV}`);
164
+ console.log(`Formatted devduct value (type|severity|roundedDV|density): ${formattedDV}`);
165
+ }
166
+ return formattedDV;
167
+ }
168
+ /**
169
+ * Calculate the pavement condition index (PCI)
170
+ *
171
+ * @param deductValues string of comma delimited values
172
+ * @param showDebugging used to control debugging messages to show the various
173
+ * calculations a required steps along the way.
174
+ * The main reason this is optional is that it provides no value when used within
175
+ * Survey123 as we have nowhere to see the messages and I wasn't sure if writing to a
176
+ * console in that context could have any negative side effects.
177
+ *
178
+ * @returns the calculated PCI
179
+ */
180
+ function calculatePCI(deductValues, showDebugging = false) {
181
+ // When called from survey123 we will get the args as strings
182
+ // When comparing multi-severities calculatePCI will be called multiple times
183
+ // When called from _evaluateMultiSeverity we will just recieve a comma delimited string
184
+ // When its just comma delimited we don't need to re-evaluate the multiple severities
185
+ let _deductValues = deductValues.indexOf("|") > -1 ?
186
+ _evaluateMultiSeverity(deductValues, showDebugging) :
187
+ deductValues.split(",").map(dv => parseFloat(dv));
188
+ const _showDebugging = showDebugging === true || showDebugging.toString().toLowerCase() === "true";
189
+ let pci = 0;
190
+ // filter out non-numbers
191
+ _deductValues = _deductValues.filter(dv => Math.abs(dv) > 0);
192
+ if (_deductValues.length > 0) {
193
+ const maxCDV = _getMaxCDV(_deductValues, _showDebugging);
194
+ pci = 100 - _round(maxCDV);
195
+ }
196
+ return pci;
197
+ }
198
+ /**
199
+ * Determine if corrections are required when we have multiple severities of a single distress type.
200
+ *
201
+ * @param deductValues string of comma delimited values e.g. "1|L|10|0.52,1|H|7|0.58"
202
+ * @param showDebugging used to control debugging messages to show the various
203
+ * calculations a required steps along the way.
204
+ *
205
+ * @returns an object that will contain any corrections for the current distress type
206
+ */
207
+ function _evaluateMultiSeverity(deductValues, showDebugging) {
208
+ const updates = {};
209
+ const _dvObject = _parseDeductValues(deductValues);
210
+ const multiSeverityKeys = Object.keys(_dvObject).filter(k => Object.keys(_dvObject[k]).length > 1);
211
+ if (multiSeverityKeys.length > 0) {
212
+ multiSeverityKeys.forEach(k => {
213
+ let hDeductValue;
214
+ let mDeductValue;
215
+ let lDeductValue;
216
+ let hDensity;
217
+ let mDensity;
218
+ let lDensity;
219
+ // need to know if 2 or 3 severity case
220
+ Object.keys(_dvObject[k]).forEach(_k => {
221
+ if (_k === "H") {
222
+ hDeductValue = _dvObject[k][_k].deductValue;
223
+ hDensity = _dvObject[k][_k].density;
224
+ }
225
+ else if (_k === "M") {
226
+ mDeductValue = _dvObject[k][_k].deductValue;
227
+ mDensity = _dvObject[k][_k].density;
228
+ }
229
+ else {
230
+ lDeductValue = _dvObject[k][_k].deductValue;
231
+ lDensity = _dvObject[k][_k].density;
232
+ }
233
+ });
234
+ const func = (hDensity && mDensity && lDensity) ?
235
+ _getThreeSeverityCaseUpdates : _getTwoSeverityCaseUpdates;
236
+ const update = func(k, hDeductValue, mDeductValue, lDeductValue, hDensity, mDensity, lDensity, showDebugging);
237
+ if (update) {
238
+ updates[k] = update;
239
+ if (showDebugging) {
240
+ console.log("updates");
241
+ console.log(updates);
242
+ }
243
+ }
244
+ });
245
+ }
246
+ return _getFinalDeductValues(deductValues, updates);
247
+ }
248
+ /**
249
+ * Determine if corrections are required when we have 3 severities of a single distress type.
250
+ *
251
+ * @param type the distress type 1-19 as a string
252
+ * @param hDeductValue high severity deduct value
253
+ * @param mDeductValue med severity deduct value
254
+ * @param lDeductValue low severity deduct value
255
+ * @param hDensity high severity density
256
+ * @param mDensity med severity density
257
+ * @param lDensity low severity density
258
+ * @param showDebugging used to control debugging messages to show the various
259
+ * calculations a required steps along the way.
260
+ *
261
+ * @returns undefined or an object that will contain any corrections for the current distress type
262
+ */
263
+ function _getThreeSeverityCaseUpdates(type, hDeductValue, mDeductValue, lDeductValue, hDensity, mDensity, lDensity, showDebugging) {
264
+ const pci1 = calculatePCI(`${hDeductValue},${mDeductValue},${lDeductValue}`, true);
265
+ if (showDebugging) {
266
+ console.log("pci1");
267
+ console.log(pci1);
268
+ }
269
+ const lm = lDensity + mDensity;
270
+ const lmPCI2 = _getPCI2(type, "M", lm.toString(), hDeductValue, showDebugging);
271
+ const mh = mDensity + hDensity;
272
+ const mhPCI2 = _getPCI2(type, "H", mh.toString(), lDeductValue, showDebugging);
273
+ const lh = lDensity + hDensity;
274
+ const lhPCI2 = _getPCI2(type, "H", lh.toString(), mDeductValue, showDebugging);
275
+ const lmh = lDensity + mDensity + hDensity;
276
+ const lmhPCI2 = _getPCI2(type, "H", lmh.toString(), 0, showDebugging);
277
+ if (showDebugging) {
278
+ console.log("low med pci2");
279
+ console.log(lmPCI2.pci);
280
+ console.log("med high pci2");
281
+ console.log(mhPCI2.pci);
282
+ console.log("low high pci2");
283
+ console.log(lhPCI2.pci);
284
+ console.log("low med high pci2");
285
+ console.log(lmhPCI2.pci);
286
+ }
287
+ const pcis = [lmPCI2, mhPCI2, lhPCI2, lmhPCI2];
288
+ const highest = pcis.reduce((prev, cur) => {
289
+ return cur.pci > pci1 && (!prev || cur.pci > prev.pci) ? cur : prev;
290
+ }, undefined);
291
+ return highest ? highest.dv : undefined;
292
+ }
293
+ /**
294
+ * Determine if corrections are required when we have 2 severities of a single distress type.
295
+ *
296
+ * @param type the distress type 1-19 as a string
297
+ * @param hDeductValue high severity deduct value
298
+ * @param mDeductValue med severity deduct value
299
+ * @param lDeductValue low severity deduct value
300
+ * @param hDensity high severity density
301
+ * @param mDensity med severity density
302
+ * @param lDensity low severity density
303
+ * @param showDebugging used to control debugging messages to show the various
304
+ * calculations a required steps along the way.
305
+ *
306
+ * @returns undefined or an object that will contain any corrections for the current distress type
307
+ */
308
+ function _getTwoSeverityCaseUpdates(type, hDeductValue, mDeductValue, lDeductValue, hDensity, mDensity, lDensity, showDebugging) {
309
+ const hDV = hDeductValue || mDeductValue;
310
+ const lDV = lDeductValue || mDeductValue;
311
+ const pci1 = calculatePCI(`${hDV},${lDV}`, true);
312
+ if (showDebugging) {
313
+ console.log("pci1");
314
+ console.log(pci1);
315
+ }
316
+ const hDen = hDensity || mDensity;
317
+ const lDen = lDensity || mDensity;
318
+ const sumDen = hDen + lDen;
319
+ const highestSeverity = hDen === hDensity ? "H" : "M";
320
+ const pci2 = _getPCI2(type, highestSeverity, sumDen.toString(), 0, showDebugging);
321
+ if (showDebugging) {
322
+ console.log("pci2");
323
+ console.log(pci2.pci);
324
+ }
325
+ return pci2.pci > pci1 ? pci2.dv : undefined;
326
+ }
327
+ /**
328
+ * Used to test for highest PCI when we have multiple severity cases for a single distress type.
329
+ *
330
+ * @param type the distress type 1-19 as a string
331
+ * @param severity expects "H" | "M" | "L"
332
+ * @param density the calculated percent density ralative to the total sample area
333
+ * @param secondDeductValue optional deduct value will be 0 for all 2 severity cases and will be a non 0 number for 3 severity cases
334
+ * @param showDebugging used to control debugging messages to show the various
335
+ * calculations a required steps along the way.
336
+ *
337
+ * @returns ICorrection that contains the new PCI as well as the deduct values that should be used for corrections
338
+ */
339
+ function _getPCI2(type, severity, density, secondDeductValue, showDebugging) {
340
+ const deductValue = calculateDeductValue(type, severity, density);
341
+ const splitVal = deductValue.split("|");
342
+ const newDV = parseFloat(splitVal[2]);
343
+ return {
344
+ pci: calculatePCI(`${splitVal[2]},${secondDeductValue}`, showDebugging),
345
+ dv: secondDeductValue ? [newDV, secondDeductValue] : [newDV]
346
+ };
347
+ }
348
+ /**
349
+ * Parse the deduct value string into individual values for type, severity, deduct value, and density
350
+ *
351
+ * @param deductValues string of comma delimited values for type, severity, deduct value, and density
352
+ *
353
+ * @returns an object with the parsed values
354
+ */
355
+ function _parseDeductValues(deductValues) {
356
+ return deductValues.split(",").reduce((prev, cur) => {
357
+ const splitVal = cur.split("|");
358
+ const type = splitVal[0];
359
+ const severity = splitVal[1];
360
+ const deductValue = parseFloat(splitVal[2]);
361
+ const density = parseFloat(splitVal[3]);
362
+ if (!prev[type]) {
363
+ prev[type] = {};
364
+ }
365
+ prev[type][severity] = {
366
+ deductValue,
367
+ density
368
+ };
369
+ return prev;
370
+ }, {});
371
+ }
372
+ /**
373
+ * Replace any deduct values for the given distress types when it is determined that corrections
374
+ * are required for a multi-severity case
375
+ *
376
+ * @param deductValues string of comma delimited values for type, severity, deduct value, and density
377
+ * @param updates will contain the new corrected deduct value(s) that should be substituted for the original deduct value
378
+ *
379
+ * @returns an object with the parsed and updated deduct values to use for final PCI calculation
380
+ */
381
+ function _getFinalDeductValues(deductValues, updates) {
382
+ const skipAdditionalTypes = [];
383
+ return deductValues.split(",").reduce((prev, cur) => {
384
+ //0: type, 1: severity, 2: deductValue, 3: density
385
+ const splitVal = cur.split("|");
386
+ const type = splitVal[0];
387
+ const deductValue = parseFloat(splitVal[2]);
388
+ if (Object.keys(updates).length > 0 && updates[type]) {
389
+ skipAdditionalTypes.push(type);
390
+ prev.push(...updates[type]);
391
+ delete (updates[type]);
392
+ }
393
+ else if (skipAdditionalTypes.indexOf(type) < 0) {
394
+ prev.push(deductValue);
395
+ }
396
+ return prev;
397
+ }, []);
398
+ }
399
+ /**
400
+ * Executes the polynomial equation using the provided values and density.
401
+ * In the ASTM standard this is the step represented by finding the values
402
+ * on the plotted graphs.
403
+ *
404
+ * @returns the calculated deduct value
405
+ */
406
+ function _calc(density, vals) {
407
+ return vals.reduce((prev, cur, i) => {
408
+ return prev += i === 0 ? cur :
409
+ i === 1 ? (cur * density) :
410
+ (cur * Math.pow(density, i));
411
+ }, 0);
412
+ }
413
+ /**
414
+ * Round to the nerest decimal in the 10ths place
415
+ */
416
+ function _round(v) {
417
+ return Math.round(v * 10) / 10;
418
+ }
419
+ /**
420
+ * Execute the deduct value calculation for the distress type
421
+ *
422
+ * @param severity The severity of the distress type
423
+ * @param density percent density of the distress type
424
+ *
425
+ * @returns the calculated deduct value
426
+ */
427
+ function _calcAlligator(severity, density) {
428
+ const vals = severity === ESeverity.H ? [30.71, 29.22, 9.407, -6.981, -2.158, 3.047, -0.6578] :
429
+ severity === ESeverity.M ? [21.62, 21.32, 5.194, -1.343, 0.2341] :
430
+ [11.31, 16.05, 7.572, -1.471];
431
+ return _calc(density, vals);
432
+ }
433
+ /**
434
+ * Execute the deduct value calculation for the distress type
435
+ *
436
+ * @param severity The severity of the distress type
437
+ * @param density percent density of the distress type
438
+ *
439
+ * @returns the calculated deduct value
440
+ */
441
+ function _calcBleeding(severity, density) {
442
+ const vals = severity === ESeverity.H ? [5.343, 6.927, 7.926, 4.265, -0.7582] :
443
+ severity === ESeverity.M ? [2.38, 5.483, 4.128, 0.8366, 0.03659, 0.1052] :
444
+ [0.01391, 0.5079, 1.576, 1.191, 0.1329, 0.03823];
445
+ return _calc(density, vals);
446
+ }
447
+ /**
448
+ * Execute the deduct value calculation for the distress type
449
+ *
450
+ * @param severity The severity of the distress type
451
+ * @param density percent density of the distress type
452
+ *
453
+ * @returns the calculated deduct value
454
+ */
455
+ function _calcBlockCracking(severity, density) {
456
+ const vals = severity === ESeverity.H ? [7.926, 11.93, 8.826, 3.432, -1.382] :
457
+ severity === ESeverity.M ? [2.587, 9.142, 6.647, -0.455, -0.2439, 0.1107] :
458
+ [0.646, 4.002, 4.2, 0.4987, -0.06269];
459
+ return _calc(density, vals);
460
+ }
461
+ /**
462
+ * Execute the deduct value calculation for the distress type
463
+ *
464
+ * @param severity The severity of the distress type
465
+ * @param density percent density of the distress type
466
+ *
467
+ * @returns the calculated deduct value
468
+ */
469
+ function _calcBumpsSags(severity, density) {
470
+ const vals = severity === ESeverity.H ? [52.77, 38.07, 8.964, -0.4148, -1.589, 2.478] :
471
+ severity === ESeverity.M ? [24.66, 27.86, 15.73, 3.295, -5.27, 5.921, 7.959] :
472
+ [8.768, 13.79, 7.064, 7.455, 6.041, -1.739, -1.371];
473
+ return _calc(density, vals);
474
+ }
475
+ /**
476
+ * Execute the deduct value calculation for the distress type
477
+ *
478
+ * @param severity The severity of the distress type
479
+ * @param density percent density of the distress type
480
+ *
481
+ * @returns the calculated deduct value
482
+ */
483
+ function _calcCorrugation(severity, density) {
484
+ const vals = severity === ESeverity.H ? [34.21, 21.59, 1.863, 6.1410, -0.687, -1.885, 0.4916] :
485
+ severity === ESeverity.M ? [15.78, 19.69, 6.276, -2.124, 0.5868, 0.06045] :
486
+ [2.173, 5.609, 5.976, -0.7348, -0.2172, 1.494, -0.5659];
487
+ return _calc(density, vals);
488
+ }
489
+ /**
490
+ * Execute the deduct value calculation for the distress type
491
+ *
492
+ * @param severity The severity of the distress type
493
+ * @param density percent density of the distress type
494
+ *
495
+ * @returns the calculated deduct value
496
+ */
497
+ function _calcDepression(severity, density) {
498
+ const vals = severity === ESeverity.H ? [17.84, 5.904, 9.406, 18.28, -2.753, -7.798, 2.402] :
499
+ severity === ESeverity.M ? [8.471, 3.171, 10.25, 12.2, -0.9687, -4.601, 1.079] :
500
+ [4.836, -0.7572, 4.786, 12.39, 1.233, -4.871, 0.9749];
501
+ return _calc(density, vals);
502
+ }
503
+ /**
504
+ * Execute the deduct value calculation for the distress type
505
+ *
506
+ * @param severity The severity of the distress type
507
+ * @param density percent density of the distress type
508
+ *
509
+ * @returns the calculated deduct value
510
+ */
511
+ function _calcEdgeCracking(severity, density) {
512
+ const vals = severity === ESeverity.H ? [14.99, 13.5, 10.62, 5.15, -1.792, -2.826] :
513
+ severity === ESeverity.M ? [9.177, 10.26, 5.704, -0.6812, -0.8588, 0.2123] :
514
+ [3.049, 4.802, 4.058, -0.3556, -1.55, 1.02];
515
+ return _calc(density, vals);
516
+ }
517
+ /**
518
+ * Execute the deduct value calculation for the distress type
519
+ *
520
+ * @param severity The severity of the distress type
521
+ * @param density percent density of the distress type
522
+ *
523
+ * @returns the calculated deduct value
524
+ */
525
+ function _calcReflectionCracking(severity, density) {
526
+ const vals = severity === ESeverity.H ? [14.99, 17.21, 27.63, 31.13, -20.94, -18.82, 9.985] :
527
+ severity === ESeverity.M ? [9.9193, 10.88, 8.073, 14.8, -3.792, -9.583, 3.651] :
528
+ [2.356, 6.664, 3.717, -1.393, 1.94, 1.785, -0.9707];
529
+ return _calc(density, vals);
530
+ }
531
+ /**
532
+ * Execute the deduct value calculation for the distress type
533
+ *
534
+ * @param severity The severity of the distress type
535
+ * @param density percent density of the distress type
536
+ *
537
+ * @returns the calculated deduct value
538
+ */
539
+ function _calcLaneShoulderDropOff(severity, density) {
540
+ const vals = severity === ESeverity.H ? [7.549, 6.907, 7.284, 9.304, 2.064] :
541
+ severity === ESeverity.M ? [4.02, 1.744, 14.36, 15.92, -40.22, 23.6] :
542
+ [2.004, 1.065, 9.706, 11.75, -27.52, 15.04];
543
+ return _calc(density, vals);
544
+ }
545
+ /**
546
+ * Execute the deduct value calculation for the distress type
547
+ *
548
+ * @param severity The severity of the distress type
549
+ * @param density percent density of the distress type
550
+ *
551
+ * @returns the calculated deduct value
552
+ */
553
+ function _calcLongTransCracking(severity, density) {
554
+ const vals = severity === ESeverity.H ? [19.56, 24.06, 12.12, 9.336, 1.532, -4.396] :
555
+ severity === ESeverity.M ? [9.751, 15.53, 4.719, 1.369, 1.206, -1.164] :
556
+ [2.347, 9.074, 8.424, -1.338, -1.873, 1.144];
557
+ return _calc(density, vals);
558
+ }
559
+ /**
560
+ * Execute the deduct value calculation for the distress type
561
+ *
562
+ * @param severity The severity of the distress type
563
+ * @param density percent density of the distress type
564
+ *
565
+ * @returns the calculated deduct value
566
+ */
567
+ function _calcPatchingUtilCutPatching(severity, density) {
568
+ const vals = severity === ESeverity.H ? [20.15, 16.55, 5.415, 10.77, 3.257, -4.502] :
569
+ severity === ESeverity.M ? [10.28, 12.71, 6.174, 1.928, 0.6923, -0.4673] :
570
+ [2.523, 6.892, 5.702, 2.407, 0.2185, -0.8722];
571
+ return _calc(density, vals);
572
+ }
573
+ /**
574
+ * Execute the deduct value calculation for the distress type
575
+ *
576
+ * @param severity The severity of the distress type
577
+ * @param density percent density of the distress type
578
+ *
579
+ * @returns the calculated deduct value
580
+ */
581
+ function _calcPolishedAggregate(severity, density) {
582
+ const vals = severity === "H" || severity === "M" || severity === "L" ?
583
+ [3.417, -26.82, 71.15, -76.22, 38.52, -6.904] : [];
584
+ return _calc(density, vals);
585
+ }
586
+ /**
587
+ * Execute the deduct value calculation for the distress type
588
+ *
589
+ * @param severity The severity of the distress type
590
+ * @param density percent density of the distress type
591
+ *
592
+ * @returns the calculated deduct value
593
+ */
594
+ function _calcPotholes(severity, density) {
595
+ const vals = severity === ESeverity.H ? [110.7, 60.66, 2.378, -2.664] :
596
+ severity === ESeverity.M ? [90.47, 60.41, -0.1123, -4.746] :
597
+ [58.19, 40.53, 2.884, -1.443, 0.1195];
598
+ return _calc(density, vals);
599
+ }
600
+ /**
601
+ * Execute the deduct value calculation for the distress type
602
+ *
603
+ * @param severity The severity of the distress type
604
+ * @param density percent density of the distress type
605
+ *
606
+ * @returns the calculated deduct value
607
+ */
608
+ function _calcRailroadCrossing(severity, density) {
609
+ const vals = severity === ESeverity.H ? [20, 38.64, -62.82, 193.6, -162.7, 41.22] :
610
+ severity === ESeverity.M ? [6.994, 23.47, -52.3, 167.3, -143.6, 37.64] :
611
+ [1.998, -0.7488, 13.8, -0.7917, -1.981];
612
+ return _calc(density, vals);
613
+ }
614
+ /**
615
+ * Execute the deduct value calculation for the distress type
616
+ *
617
+ * @param severity The severity of the distress type
618
+ * @param density percent density of the distress type
619
+ *
620
+ * @returns the calculated deduct value
621
+ */
622
+ function _calcRutting(severity, density) {
623
+ const vals = severity === ESeverity.H ? [27.61, 25.19, 8.557, 1.65, -2.2030] :
624
+ severity === ESeverity.M ? [18.47, 20.77, 6.617, -1.13, -2.286] :
625
+ [8.833, 14.84, 3.129, 0.1451, 2.438, -1.279];
626
+ return _calc(density, vals);
627
+ }
628
+ /**
629
+ * Execute the deduct value calculation for the distress type
630
+ *
631
+ * @param severity The severity of the distress type
632
+ * @param density percent density of the distress type
633
+ *
634
+ * @returns the calculated deduct value
635
+ */
636
+ function _calcShoving(severity, density) {
637
+ const vals = severity === ESeverity.H ? [18.7, 20.17, 10.3, 4.694, 1.331, -2.61] :
638
+ severity === ESeverity.M ? [10.39, 14.78, 5.488, 4.001, 3.23, -2.387] :
639
+ [4.002, 10.66, 6.332, -0.5226, -0.1923];
640
+ return _calc(density, vals);
641
+ }
642
+ /**
643
+ * Execute the deduct value calculation for the distress type
644
+ *
645
+ * @param severity The severity of the distress type
646
+ * @param density percent density of the distress type
647
+ *
648
+ * @returns the calculated deduct value
649
+ */
650
+ function _calcSlippageCracking(severity, density) {
651
+ const vals = severity === ESeverity.H ? [19.73, 32.21, 25.87, -2.871, -10.55, 1.496, 0.7393] :
652
+ severity === ESeverity.M ? [11.38, 18.55, 18.38, 1.628, -7.596, 0.5841, 0.5946] :
653
+ [5.144, 12.95, 11.95, -0.833, -2.995, 1.325, -0.2113];
654
+ return _calc(density, vals);
655
+ }
656
+ /**
657
+ * Execute the deduct value calculation for the distress type
658
+ *
659
+ * @param severity The severity of the distress type
660
+ * @param density percent density of the distress type
661
+ *
662
+ * @returns the calculated deduct value
663
+ */
664
+ function _calcSwell(severity, density) {
665
+ const vals = severity === ESeverity.H ? [34, 16.84, -23.09, 41.17, -14.84] :
666
+ severity === ESeverity.M ? [12, 15.67, 20.59, -28.33, 21, -5.508] :
667
+ [1.995, 11.9, -12.83, 16.74, -5.361];
668
+ return _calc(density, vals);
669
+ }
670
+ /**
671
+ * Execute the deduct value calculation for the distress type
672
+ *
673
+ * @param severity The severity of the distress type
674
+ * @param density percent density of the distress type
675
+ *
676
+ * @returns the calculated deduct value
677
+ */
678
+ function _calcRaveling(severity, density) {
679
+ const vals = severity === ESeverity.H ? [16.77, 10.67, 5.758, 12.9, -0.0633, -5.659, 1.48] :
680
+ severity === ESeverity.M ? [8.512, 5.106, 1.63, 3.469, 1.028, -1.211, 0.1938] :
681
+ [];
682
+ return _calc(density, vals);
683
+ }
684
+ /**
685
+ * Execute the deduct value calculation for the distress type
686
+ *
687
+ * @param severity The severity of the distress type
688
+ * @param density percent density of the distress type
689
+ *
690
+ * @returns the calculated deduct value
691
+ */
692
+ function _calcWeathering(severity, density) {
693
+ const vals = severity === ESeverity.H ? [3.673, 3.349, 2.598, -1.233, 2.754, 2.434, -1.485] :
694
+ severity === ESeverity.M ? [1.12, 0.9769, 0.93, -0.5955, 1.041, 1.111, -0.614] :
695
+ [-0.0386, -0.0736, 0.834, 1.63, -0.0287, -0.639, 0.1515];
696
+ return _calc(density, vals);
697
+ }
698
+ /**
699
+ * Determine maximum Corrected Deduct Value (CDV) iteratively
700
+ *
701
+ * @param deductValues The calculated deduct values that will be used to determine max CDV
702
+ * @param showDebugging used to optionally show debugging messages
703
+ *
704
+ * @returns the max CDV value
705
+ */
706
+ function _getMaxCDV(deductValues, showDebugging) {
707
+ let maxCDV;
708
+ // If none or only one individual deduct value is greater
709
+ // than two, the total value is used in place of the maximum CD
710
+ const valuesGreaterThan2 = deductValues.filter(deductValue => deductValue > 2);
711
+ if (valuesGreaterThan2.length <= 1) {
712
+ maxCDV = valuesGreaterThan2.reduce((prev, cur) => {
713
+ prev += cur;
714
+ return prev;
715
+ }, 0);
716
+ if (showDebugging) {
717
+ console.log("If none or only one individual deduct value is greater");
718
+ console.log("than two, the total value is used in place of the maximum CD");
719
+ console.log(`Max CDV: ${maxCDV}`);
720
+ }
721
+ }
722
+ else {
723
+ // sort in descending order (section 9.5.2 in ASTM doc)
724
+ const sortedDVs = deductValues.sort((a, b) => b - a);
725
+ // Determine the allowable number of deducts, m (section 9.5.3 in ASTM doc)
726
+ const highestDV = sortedDVs[0];
727
+ // m = allowable number of deducts including fractions (must be less than or equal to ten)
728
+ const m = 1 + (9 / 98) * (100 - highestDV);
729
+ if (showDebugging) {
730
+ console.log(`Deduct values sorted in descending order: ${sortedDVs}`);
731
+ console.log(`Highest deduct value: ${highestDV}`);
732
+ console.log(`Allowable number of deducts including fractions: ${m}`);
733
+ }
734
+ // TODO they mention (must be less than or equal to ten) but don't say what happens if its over
735
+ if (m <= 10) {
736
+ const vals = _reduceDeductValues(sortedDVs, m);
737
+ if (showDebugging) {
738
+ console.log(`Reduce deduct values to the m largest including the fractional part: ${vals}`);
739
+ }
740
+ // iteratively determined cdv values
741
+ const cdvs = _getCDVs(vals, showDebugging);
742
+ maxCDV = Math.max(...cdvs);
743
+ if (showDebugging) {
744
+ console.log(`Max CDV: ${maxCDV}`);
745
+ }
746
+ }
747
+ else {
748
+ if (showDebugging) {
749
+ console.log("Allowable number of deducts including fractions (must be less than or equal to ten)");
750
+ }
751
+ }
752
+ }
753
+ return maxCDV;
754
+ }
755
+ /**
756
+ * Reduce deduct values to the m largest including the fractional part
757
+ *
758
+ * @param sortedDVs individual deduct values in descending order
759
+ * @param m allowable number of deducts (9.5.3 in ASTM standard)
760
+ *
761
+ * @returns updated deduct values
762
+ */
763
+ function _reduceDeductValues(sortedDVs, m) {
764
+ const fractionalPart = m - Math.floor(m);
765
+ // If less than m deduct values are available, all of the deduct values are used
766
+ return sortedDVs.length < m ? sortedDVs :
767
+ sortedDVs.reduce((prev, cur, i) => {
768
+ if (i + 1 < m) {
769
+ prev.push(cur);
770
+ }
771
+ else if (fractionalPart > 0) {
772
+ prev.push(_round(cur * fractionalPart));
773
+ }
774
+ return prev;
775
+ }, []);
776
+ }
777
+ /**
778
+ * Reduce the smallest individual deduct value greater to 2.0 and repeat
779
+ *
780
+ * @param vals the list of deduct values
781
+ * @param showDebugging optionally show debugging messages
782
+ *
783
+ * @returns array of CDV values
784
+ */
785
+ function _getCDVs(vals, showDebugging) {
786
+ let len = vals.length;
787
+ const cdvs = [];
788
+ while (len >= 1) {
789
+ if (showDebugging) {
790
+ console.log(`vals: ${vals}`);
791
+ }
792
+ cdvs.push(_getCDV(vals, showDebugging));
793
+ len -= 1;
794
+ vals.splice(len, 1, 2);
795
+ }
796
+ return cdvs;
797
+ }
798
+ /**
799
+ * Determine the total and max number deducts higher than two and calculate the CDV
800
+ *
801
+ * @param vals the list of deduct values
802
+ * @param showDebugging optionally show debugging messages
803
+ *
804
+ * @returns the calculated CDV
805
+ */
806
+ function _getCDV(vals, showDebugging) {
807
+ // section 9.5.5.1 in ASTM doc
808
+ const totalDV = vals.reduce((prev, cur) => prev += cur, 0);
809
+ // section 9.5.5.2 in ASTM doc
810
+ // the number of deducts with a value greater than 2.0
811
+ const q = vals.reduce((prev, cur) => cur > 2 ? prev + 1 : prev, 0);
812
+ // section 9.5.5.3 in ASTM doc
813
+ return _calcCDV(totalDV, q, showDebugging);
814
+ }
815
+ /**
816
+ * Determine the total and max number deducts higher than two and calculate the CDV
817
+ *
818
+ * @param total the sum of all deduct values
819
+ * @param q the number of deducts with a value greater than 2.0
820
+ * @param showDebugging optionally show debugging messages
821
+ *
822
+ * @returns the calculated CDV
823
+ */
824
+ function _calcCDV(total, q, showDebugging) {
825
+ // Determine the CDV from total deduct value and q
826
+ const vals2 = {
827
+ 7: [-9.482, 0.6045, 0.0003563, -5.448e-06],
828
+ 6: [-8.165, 0.5724, 0.0004266, -4.254e-06],
829
+ 5: [-7.932, 0.6091, 0.0003464, -4.265e-06],
830
+ 4: [-6.78, 0.6301, 0.0007376, -6.357e-06],
831
+ 3: [-5.015, 0.7546, -0.00043, -3.075e-06],
832
+ 2: [-1.668, 0.7992, -0.0003013, -5.214e-06],
833
+ 1: [1.651e-15, 1, -4.249e-18, 1.149e-19]
834
+ };
835
+ const cdv = _calc(total, vals2[q >= 7 ? 7 : q]);
836
+ if (showDebugging) {
837
+ console.log(`totalDV: ${total}`);
838
+ console.log(`q: ${q}`);
839
+ console.log(`CDV: ${cdv}`);
840
+ }
841
+ return cdv;
842
+ }
843
+
844
+ export { EDistressType as E, ESeverity as a, calculateDeductValue as b, calculatePCI as c };