@macrostrat/column-views 2.2.2 → 2.3.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 (267) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/esm/{column-views.b0e6c0b3.js → column-views.04636815.js} +3 -3
  3. package/dist/esm/{column-views.b0e6c0b3.js.map → column-views.04636815.js.map} +1 -1
  4. package/dist/esm/{column-views.54f8b909.js → column-views.052498a6.js} +37 -4
  5. package/dist/esm/column-views.052498a6.js.map +1 -0
  6. package/dist/esm/{column-views.5456a1ee.js → column-views.0da4503a.js} +2 -2
  7. package/dist/esm/{column-views.5456a1ee.js.map → column-views.0da4503a.js.map} +1 -1
  8. package/dist/esm/{column-views.ee525e88.js → column-views.107b47b4.js} +8 -8
  9. package/dist/esm/{column-views.ee525e88.js.map → column-views.107b47b4.js.map} +1 -1
  10. package/dist/esm/column-views.17a70358.js +16 -0
  11. package/dist/esm/column-views.17a70358.js.map +1 -0
  12. package/dist/esm/{column-views.073c42da.js → column-views.1b5bf0c6.js} +3 -3
  13. package/dist/esm/{column-views.073c42da.js.map → column-views.1b5bf0c6.js.map} +1 -1
  14. package/dist/esm/{column-views.52ad973a.js → column-views.2708e176.js} +8 -8
  15. package/dist/esm/column-views.2708e176.js.map +1 -0
  16. package/dist/esm/{column-views.88d63dd0.js → column-views.275ba52b.js} +3 -3
  17. package/dist/esm/{column-views.88d63dd0.js.map → column-views.275ba52b.js.map} +1 -1
  18. package/dist/esm/{column-views.7c95c3d7.js → column-views.2bac03a2.js} +2 -2
  19. package/dist/esm/{column-views.7c95c3d7.js.map → column-views.2bac03a2.js.map} +1 -1
  20. package/dist/esm/column-views.322790f3.js +138 -0
  21. package/dist/esm/column-views.322790f3.js.map +1 -0
  22. package/dist/esm/{column-views.6698b95a.js → column-views.343fc926.js} +9 -18
  23. package/dist/esm/column-views.343fc926.js.map +1 -0
  24. package/dist/esm/column-views.3c9cba65.js +13 -0
  25. package/dist/esm/{column-views.43beafa3.js.map → column-views.3c9cba65.js.map} +1 -1
  26. package/dist/esm/{column-views.aeb61926.js → column-views.3d3e00be.js} +2 -2
  27. package/dist/esm/{column-views.aeb61926.js.map → column-views.3d3e00be.js.map} +1 -1
  28. package/dist/esm/{column-views.7d69838d.js → column-views.40094dd9.js} +3 -3
  29. package/dist/esm/{column-views.7d69838d.js.map → column-views.40094dd9.js.map} +1 -1
  30. package/dist/esm/{column-views.d2214a99.js → column-views.44373a90.js} +8 -7
  31. package/dist/esm/column-views.44373a90.js.map +1 -0
  32. package/dist/esm/{column-views.ad080c0e.js → column-views.488f24b6.js} +2 -2
  33. package/dist/esm/{column-views.ad080c0e.js.map → column-views.488f24b6.js.map} +1 -1
  34. package/dist/esm/{column-views.abf6aedd.js → column-views.4b259f9e.js} +2 -2
  35. package/dist/esm/{column-views.abf6aedd.js.map → column-views.4b259f9e.js.map} +1 -1
  36. package/dist/esm/{column-views.1151416d.css → column-views.54c1f382.css} +6 -5
  37. package/dist/esm/column-views.54c1f382.css.map +1 -0
  38. package/dist/esm/{column-views.729a6728.js → column-views.565b193a.js} +2 -2
  39. package/dist/esm/{column-views.729a6728.js.map → column-views.565b193a.js.map} +1 -1
  40. package/dist/esm/{column-views.058c0083.js → column-views.5ca2b219.js} +5 -5
  41. package/dist/esm/{column-views.058c0083.js.map → column-views.5ca2b219.js.map} +1 -1
  42. package/dist/esm/{column-views.218e8f5d.js → column-views.5eb4e6ff.js} +4 -4
  43. package/dist/esm/{column-views.218e8f5d.js.map → column-views.5eb4e6ff.js.map} +1 -1
  44. package/dist/esm/{column-views.11ae78f7.js → column-views.5fff0716.js} +3 -3
  45. package/dist/esm/{column-views.11ae78f7.js.map → column-views.5fff0716.js.map} +1 -1
  46. package/dist/esm/{column-views.05586d1f.js → column-views.60e97132.js} +2 -4
  47. package/dist/esm/column-views.60e97132.js.map +1 -0
  48. package/dist/esm/{column-views.75e5aebe.js → column-views.63d40878.js} +4 -4
  49. package/dist/esm/{column-views.75e5aebe.js.map → column-views.63d40878.js.map} +1 -1
  50. package/dist/esm/{column-views.d6d6df77.js → column-views.6c9e5069.js} +40 -62
  51. package/dist/esm/column-views.6c9e5069.js.map +1 -0
  52. package/dist/esm/column-views.6df65dab.js +9 -0
  53. package/dist/esm/column-views.6df65dab.js.map +1 -0
  54. package/dist/esm/column-views.7fa0d026.js +62 -0
  55. package/dist/esm/column-views.7fa0d026.js.map +1 -0
  56. package/dist/esm/{column-views.3a7179c4.js → column-views.82eb5026.js} +12 -7
  57. package/dist/esm/column-views.82eb5026.js.map +1 -0
  58. package/dist/esm/{column-views.9dd25b5b.js → column-views.92575b87.js} +3 -3
  59. package/dist/esm/column-views.92575b87.js.map +1 -0
  60. package/dist/esm/{column-views.833c2b74.js → column-views.9d51a5ab.js} +3 -3
  61. package/dist/esm/{column-views.833c2b74.js.map → column-views.9d51a5ab.js.map} +1 -1
  62. package/dist/esm/{column-views.817752b6.js → column-views.9ffc089b.js} +3 -3
  63. package/dist/esm/{column-views.817752b6.js.map → column-views.9ffc089b.js.map} +1 -1
  64. package/dist/esm/{column-views.70164236.js → column-views.aa9ede4d.js} +2 -2
  65. package/dist/esm/{column-views.70164236.js.map → column-views.aa9ede4d.js.map} +1 -1
  66. package/dist/esm/{column-views.6d63971b.js → column-views.ad2fe46c.js} +2 -2
  67. package/dist/esm/{column-views.6d63971b.js.map → column-views.ad2fe46c.js.map} +1 -1
  68. package/dist/esm/{column-views.7b4a1f15.js → column-views.afe0bb48.js} +5 -5
  69. package/dist/esm/{column-views.7b4a1f15.js.map → column-views.afe0bb48.js.map} +1 -1
  70. package/dist/esm/{column-views.aecf25bc.js → column-views.b4e1236d.js} +2 -2
  71. package/dist/esm/{column-views.aecf25bc.js.map → column-views.b4e1236d.js.map} +1 -1
  72. package/dist/esm/{column-views.6ce8cb61.js → column-views.c149f7a5.js} +3 -3
  73. package/dist/esm/{column-views.6ce8cb61.js.map → column-views.c149f7a5.js.map} +1 -1
  74. package/dist/esm/column-views.c3c7901a.js +149 -0
  75. package/dist/esm/column-views.c3c7901a.js.map +1 -0
  76. package/dist/esm/{column-views.b7016f82.css → column-views.cb6fc808.css} +10 -10
  77. package/dist/esm/column-views.cb6fc808.css.map +1 -0
  78. package/dist/esm/{column-views.35efe006.js → column-views.ce3a3ac8.js} +2 -2
  79. package/dist/esm/{column-views.35efe006.js.map → column-views.ce3a3ac8.js.map} +1 -1
  80. package/dist/esm/{column-views.77e22590.js → column-views.d1b49f5c.js} +2 -2
  81. package/dist/esm/{column-views.77e22590.js.map → column-views.d1b49f5c.js.map} +1 -1
  82. package/dist/esm/{column-views.faa4e06d.js → column-views.d524075b.js} +4 -4
  83. package/dist/esm/{column-views.faa4e06d.js.map → column-views.d524075b.js.map} +1 -1
  84. package/dist/esm/column-views.d5e788e8.js +31 -0
  85. package/dist/esm/column-views.d5e788e8.js.map +1 -0
  86. package/dist/esm/{column-views.30950997.js → column-views.d6c0b7bc.js} +2 -2
  87. package/dist/esm/{column-views.30950997.js.map → column-views.d6c0b7bc.js.map} +1 -1
  88. package/dist/esm/{column-views.44d3797a.js → column-views.dc195174.js} +2 -2
  89. package/dist/esm/{column-views.44d3797a.js.map → column-views.dc195174.js.map} +1 -1
  90. package/dist/esm/column-views.de433f18.js +139 -0
  91. package/dist/esm/column-views.de433f18.js.map +1 -0
  92. package/dist/esm/{column-views.ef88c46c.js → column-views.e075af15.js} +2 -2
  93. package/dist/esm/{column-views.ef88c46c.js.map → column-views.e075af15.js.map} +1 -1
  94. package/dist/esm/{column-views.7faf00ed.js → column-views.f7cdf6be.js} +3 -3
  95. package/dist/esm/{column-views.7faf00ed.js.map → column-views.f7cdf6be.js.map} +1 -1
  96. package/dist/esm/{column-views.66ccfc44.js → column-views.faa7e52e.js} +3 -3
  97. package/dist/esm/{column-views.66ccfc44.js.map → column-views.faa7e52e.js.map} +1 -1
  98. package/dist/esm/index.d.ts +39 -19
  99. package/dist/esm/index.d.ts.map +1 -1
  100. package/dist/esm/index.js +12 -12
  101. package/dist/node/column-views.012fa10c.js +2 -0
  102. package/dist/node/column-views.012fa10c.js.map +1 -0
  103. package/dist/node/{column-views.edb4ba54.js → column-views.021a6961.js} +2 -2
  104. package/dist/node/{column-views.edb4ba54.js.map → column-views.021a6961.js.map} +1 -1
  105. package/dist/node/{column-views.a19be00f.js → column-views.08bef1f6.js} +2 -2
  106. package/dist/node/{column-views.a19be00f.js.map → column-views.08bef1f6.js.map} +1 -1
  107. package/dist/node/{column-views.ae22e8b1.js → column-views.0f401891.js} +2 -2
  108. package/dist/node/{column-views.ae22e8b1.js.map → column-views.0f401891.js.map} +1 -1
  109. package/dist/node/column-views.1d064426.js +2 -0
  110. package/dist/node/column-views.1d064426.js.map +1 -0
  111. package/dist/node/{column-views.ae54d3e1.js → column-views.2577dec0.js} +2 -2
  112. package/dist/node/{column-views.ae54d3e1.js.map → column-views.2577dec0.js.map} +1 -1
  113. package/dist/node/{column-views.1ac9e2ed.js → column-views.2fe8feb9.js} +2 -2
  114. package/dist/node/{column-views.1ac9e2ed.js.map → column-views.2fe8feb9.js.map} +1 -1
  115. package/dist/node/{column-views.a281d5bb.js → column-views.42bc66a8.js} +2 -2
  116. package/dist/node/{column-views.a281d5bb.js.map → column-views.42bc66a8.js.map} +1 -1
  117. package/dist/node/{column-views.4ce5f5e4.js → column-views.465e593b.js} +2 -2
  118. package/dist/node/{column-views.4ce5f5e4.js.map → column-views.465e593b.js.map} +1 -1
  119. package/dist/node/{column-views.e1813308.js → column-views.46efb749.js} +2 -2
  120. package/dist/node/{column-views.e1813308.js.map → column-views.46efb749.js.map} +1 -1
  121. package/dist/node/{column-views.61dc64bc.js → column-views.47440961.js} +2 -2
  122. package/dist/node/{column-views.61dc64bc.js.map → column-views.47440961.js.map} +1 -1
  123. package/dist/node/column-views.5361f0e2.js +2 -0
  124. package/dist/node/column-views.5361f0e2.js.map +1 -0
  125. package/dist/node/{column-views.38835c99.js → column-views.5559de6a.js} +2 -2
  126. package/dist/node/{column-views.38835c99.js.map → column-views.5559de6a.js.map} +1 -1
  127. package/dist/node/{column-views.52cc4dd0.js → column-views.56f88b8c.js} +2 -2
  128. package/dist/node/{column-views.52cc4dd0.js.map → column-views.56f88b8c.js.map} +1 -1
  129. package/dist/node/{column-views.0b3a384e.js → column-views.5a9331a9.js} +2 -2
  130. package/dist/node/{column-views.0b3a384e.js.map → column-views.5a9331a9.js.map} +1 -1
  131. package/dist/node/column-views.5fd6e11a.js +2 -0
  132. package/dist/node/column-views.5fd6e11a.js.map +1 -0
  133. package/dist/node/column-views.672b683c.js +2 -0
  134. package/dist/node/column-views.672b683c.js.map +1 -0
  135. package/dist/node/{column-views.a08b0c9f.js → column-views.6c7f9245.js} +2 -2
  136. package/dist/node/{column-views.a08b0c9f.js.map → column-views.6c7f9245.js.map} +1 -1
  137. package/dist/node/{column-views.67fed1f5.js → column-views.75456275.js} +2 -2
  138. package/dist/node/{column-views.67fed1f5.js.map → column-views.75456275.js.map} +1 -1
  139. package/dist/node/column-views.75ba0464.css +2 -0
  140. package/dist/node/column-views.75ba0464.css.map +1 -0
  141. package/dist/node/column-views.777b9bb6.js +2 -0
  142. package/dist/node/column-views.777b9bb6.js.map +1 -0
  143. package/dist/node/{column-views.21a73236.js → column-views.7c322202.js} +2 -2
  144. package/dist/node/{column-views.21a73236.js.map → column-views.7c322202.js.map} +1 -1
  145. package/dist/node/column-views.7cc1a14f.js +2 -0
  146. package/dist/node/column-views.7cc1a14f.js.map +1 -0
  147. package/dist/node/{column-views.7faaf6c8.js → column-views.8e846c57.js} +2 -2
  148. package/dist/node/{column-views.7faaf6c8.js.map → column-views.8e846c57.js.map} +1 -1
  149. package/dist/node/{column-views.003348f6.js → column-views.8ee8469d.js} +2 -2
  150. package/dist/node/{column-views.003348f6.js.map → column-views.8ee8469d.js.map} +1 -1
  151. package/dist/node/{column-views.420b60d2.js → column-views.93bde6c1.js} +2 -2
  152. package/dist/node/{column-views.420b60d2.js.map → column-views.93bde6c1.js.map} +1 -1
  153. package/dist/node/{column-views.f2ee436e.js → column-views.a14f0134.js} +2 -2
  154. package/dist/node/{column-views.f2ee436e.js.map → column-views.a14f0134.js.map} +1 -1
  155. package/dist/node/{column-views.aef76eee.js → column-views.a596b1f5.js} +2 -2
  156. package/dist/node/{column-views.aef76eee.js.map → column-views.a596b1f5.js.map} +1 -1
  157. package/dist/node/column-views.af480651.js +2 -0
  158. package/dist/node/column-views.af480651.js.map +1 -0
  159. package/dist/node/column-views.b103acbc.js +2 -0
  160. package/dist/node/column-views.b103acbc.js.map +1 -0
  161. package/dist/node/{column-views.60b5663d.js → column-views.b40c1b9c.js} +2 -2
  162. package/dist/node/{column-views.60b5663d.js.map → column-views.b40c1b9c.js.map} +1 -1
  163. package/dist/node/column-views.b6e86cf0.js +2 -0
  164. package/dist/node/column-views.b6e86cf0.js.map +1 -0
  165. package/dist/node/{column-views.22c2d45b.js → column-views.c007152b.js} +2 -2
  166. package/dist/node/{column-views.22c2d45b.js.map → column-views.c007152b.js.map} +1 -1
  167. package/dist/node/{column-views.b6943236.js → column-views.c921fa1a.js} +2 -2
  168. package/dist/node/{column-views.b6943236.js.map → column-views.c921fa1a.js.map} +1 -1
  169. package/dist/node/{column-views.05cfc627.js → column-views.c9880a4d.js} +2 -2
  170. package/dist/node/{column-views.05cfc627.js.map → column-views.c9880a4d.js.map} +1 -1
  171. package/dist/node/column-views.ccfb9afb.css +2 -0
  172. package/dist/node/column-views.ccfb9afb.css.map +1 -0
  173. package/dist/node/{column-views.bde2dfa8.js → column-views.cd54f1b1.js} +2 -2
  174. package/dist/node/{column-views.bde2dfa8.js.map → column-views.cd54f1b1.js.map} +1 -1
  175. package/dist/node/{column-views.db47fe3c.js → column-views.d77d260b.js} +2 -2
  176. package/dist/node/{column-views.db47fe3c.js.map → column-views.d77d260b.js.map} +1 -1
  177. package/dist/node/{column-views.105c28fa.js → column-views.d818b387.js} +2 -2
  178. package/dist/node/{column-views.105c28fa.js.map → column-views.d818b387.js.map} +1 -1
  179. package/dist/node/{column-views.2d00d842.js → column-views.d8821a96.js} +2 -2
  180. package/dist/node/{column-views.2d00d842.js.map → column-views.d8821a96.js.map} +1 -1
  181. package/dist/node/column-views.dbb4a46b.js +2 -0
  182. package/dist/node/column-views.dbb4a46b.js.map +1 -0
  183. package/dist/node/{column-views.b12f8c81.js → column-views.e264a767.js} +2 -2
  184. package/dist/node/{column-views.b12f8c81.js.map → column-views.e264a767.js.map} +1 -1
  185. package/dist/node/column-views.e93b3bdb.js +2 -0
  186. package/dist/node/column-views.e93b3bdb.js.map +1 -0
  187. package/dist/node/{column-views.3913cd0f.js → column-views.ec691859.js} +2 -2
  188. package/dist/node/{column-views.3913cd0f.js.map → column-views.ec691859.js.map} +1 -1
  189. package/dist/node/column-views.ec7cc7cc.js +2 -0
  190. package/dist/node/column-views.ec7cc7cc.js.map +1 -0
  191. package/dist/node/{column-views.aae09aca.js → column-views.eecdc727.js} +2 -2
  192. package/dist/node/{column-views.aae09aca.js.map → column-views.eecdc727.js.map} +1 -1
  193. package/dist/node/{column-views.d08e4328.js → column-views.f577d065.js} +2 -2
  194. package/dist/node/{column-views.d08e4328.js.map → column-views.f577d065.js.map} +1 -1
  195. package/dist/node/column-views.fac4baff.js +2 -0
  196. package/dist/node/column-views.fac4baff.js.map +1 -0
  197. package/dist/node/index.js +1 -1
  198. package/dist/node/index.js.map +1 -1
  199. package/package.json +2 -2
  200. package/src/age-axis.ts +1 -1
  201. package/src/column.ts +4 -1
  202. package/src/correlation-chart/stories/correlation-chart.stories.ts +1 -1
  203. package/src/facets/detrital-zircon/index.ts +78 -11
  204. package/src/facets/detrital-zircon/provider.ts +1 -1
  205. package/src/facets/fossils/index.ts +145 -215
  206. package/src/facets/fossils/provider.ts +18 -25
  207. package/src/facets/fossils/taxon-ranges.ts +220 -0
  208. package/src/facets/index.ts +0 -1
  209. package/src/facets/{base-sample-column.module.sass → measurements/base.module.sass} +1 -0
  210. package/src/facets/measurements/base.ts +215 -0
  211. package/src/facets/measurements/index.ts +2 -38
  212. package/src/facets/measurements/sgp.ts +91 -0
  213. package/src/notes.ts +6 -3
  214. package/src/prepare-units/index.ts +8 -2
  215. package/src/prepare-units/utils.ts +55 -9
  216. package/dist/esm/column-views.05586d1f.js.map +0 -1
  217. package/dist/esm/column-views.1151416d.css.map +0 -1
  218. package/dist/esm/column-views.1e579112.js +0 -92
  219. package/dist/esm/column-views.1e579112.js.map +0 -1
  220. package/dist/esm/column-views.3a7179c4.js.map +0 -1
  221. package/dist/esm/column-views.43beafa3.js +0 -15
  222. package/dist/esm/column-views.52ad973a.js.map +0 -1
  223. package/dist/esm/column-views.54f8b909.js.map +0 -1
  224. package/dist/esm/column-views.6698b95a.js.map +0 -1
  225. package/dist/esm/column-views.6e7082db.js +0 -16
  226. package/dist/esm/column-views.6e7082db.js.map +0 -1
  227. package/dist/esm/column-views.7243e77d.js +0 -37
  228. package/dist/esm/column-views.7243e77d.js.map +0 -1
  229. package/dist/esm/column-views.76a220c4.js +0 -95
  230. package/dist/esm/column-views.76a220c4.js.map +0 -1
  231. package/dist/esm/column-views.9dd25b5b.js.map +0 -1
  232. package/dist/esm/column-views.b7016f82.css.map +0 -1
  233. package/dist/esm/column-views.d2214a99.js.map +0 -1
  234. package/dist/esm/column-views.d6d6df77.js.map +0 -1
  235. package/dist/esm/column-views.ea4ebbb7.js +0 -31
  236. package/dist/esm/column-views.ea4ebbb7.js.map +0 -1
  237. package/dist/node/column-views.16f336ee.js +0 -2
  238. package/dist/node/column-views.16f336ee.js.map +0 -1
  239. package/dist/node/column-views.1c567bfd.js +0 -2
  240. package/dist/node/column-views.1c567bfd.js.map +0 -1
  241. package/dist/node/column-views.2901b649.js +0 -2
  242. package/dist/node/column-views.2901b649.js.map +0 -1
  243. package/dist/node/column-views.29eb25bd.css +0 -2
  244. package/dist/node/column-views.29eb25bd.css.map +0 -1
  245. package/dist/node/column-views.39c21f22.js +0 -2
  246. package/dist/node/column-views.39c21f22.js.map +0 -1
  247. package/dist/node/column-views.573cb29d.js +0 -2
  248. package/dist/node/column-views.573cb29d.js.map +0 -1
  249. package/dist/node/column-views.5f3b0b04.js +0 -2
  250. package/dist/node/column-views.5f3b0b04.js.map +0 -1
  251. package/dist/node/column-views.77ace3a2.js +0 -2
  252. package/dist/node/column-views.77ace3a2.js.map +0 -1
  253. package/dist/node/column-views.8f54691f.js +0 -2
  254. package/dist/node/column-views.8f54691f.js.map +0 -1
  255. package/dist/node/column-views.a16cd1f2.js +0 -2
  256. package/dist/node/column-views.a16cd1f2.js.map +0 -1
  257. package/dist/node/column-views.a9576bac.js +0 -2
  258. package/dist/node/column-views.a9576bac.js.map +0 -1
  259. package/dist/node/column-views.c3c15cc2.js +0 -2
  260. package/dist/node/column-views.c3c15cc2.js.map +0 -1
  261. package/dist/node/column-views.cd7b223b.css +0 -2
  262. package/dist/node/column-views.cd7b223b.css.map +0 -1
  263. package/dist/node/column-views.f6ac1161.js +0 -2
  264. package/dist/node/column-views.f6ac1161.js.map +0 -1
  265. package/src/facets/base-sample-column.ts +0 -114
  266. package/src/facets/measurements/provider.ts +0 -80
  267. /package/src/facets/fossils/{index.module.sass → taxon-ranges.module.sass} +0 -0
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,A,O,6C,A,Q,M,mB,A,Q,kB,C,C,O,C,C,W,C,K,+B,A,O,O,A,Q,iB,C,K,6B,C,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,oB,I,G,E,E,mB,I,G,E,E,uB,I,G,E,E,wB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import \"./column-views.e1813308.js\";\nimport \"./column-views.a08b0c9f.js\";\nimport $fXMLu$macrostrathyper from \"@macrostrat/hyper\";\nimport {ColumnContext as $fXMLu$ColumnContext, ColumnAxis as $fXMLu$ColumnAxis, ColumnAxisType as $fXMLu$ColumnAxisType, SVG as $fXMLu$SVG, AgeAxis as $fXMLu$AgeAxis} from \"@macrostrat/column-components\";\nimport {useContext as $fXMLu$useContext} from \"react\";\nimport {Parenthetical as $fXMLu$Parenthetical} from \"@macrostrat/data-components\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $1aa4ef695e55d51d$exports = {};\n\n$parcel$export($1aa4ef695e55d51d$exports, \"VerticalAxisLabel\", () => $1aa4ef695e55d51d$export$64204d5cbb3e8227);\n$parcel$export($1aa4ef695e55d51d$exports, \"CompositeAgeAxis\", () => $1aa4ef695e55d51d$export$40b6b0e4520eeb34);\n$parcel$export($1aa4ef695e55d51d$exports, \"CompositeAgeAxisCore\", () => $1aa4ef695e55d51d$export$ac30ca3cf5df959d);\n$parcel$export($1aa4ef695e55d51d$exports, \"ApproximateHeightAxis\", () => $1aa4ef695e55d51d$export$82731b9607850ca6);\n$parcel$export($1aa4ef695e55d51d$exports, \"AgeCursor\", () => $1aa4ef695e55d51d$export$20d84abfcfa68dfa);\n\n\n\n\nvar $6kMGl = parcelRequire(\"6kMGl\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\n\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\nconst $1aa4ef695e55d51d$var$h = (0, $fXMLu$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($6kMGl))));\nconst $1aa4ef695e55d51d$var$AgeAxisCore = ({ ticks: ticks, tickSpacing: tickSpacing = 40, showDomain: showDomain = false })=>{\n const { pixelHeight: pixelHeight } = (0, $fXMLu$useContext)((0, $fXMLu$ColumnContext));\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n return $1aa4ef695e55d51d$var$h(\"g.axis\", {\n transform: \"translate(20 0)\"\n }, [\n $1aa4ef695e55d51d$var$h((0, $fXMLu$ColumnAxis), {\n ticks: v,\n showDomain: showDomain\n })\n ]);\n};\nfunction $1aa4ef695e55d51d$export$64204d5cbb3e8227(props) {\n const { label: label = \"Age\", unit: unit = \"Ma\", className: className, height: height } = props;\n return $1aa4ef695e55d51d$var$h(\"div.column-axis-label.age-axis-label\", {\n className: className,\n style: {\n height: height\n }\n }, [\n label,\n \" \",\n $1aa4ef695e55d51d$var$h.if(unit)((0, $fXMLu$Parenthetical), {\n className: \"age-axis-unit\"\n }, unit)\n ]);\n}\nfunction $1aa4ef695e55d51d$export$40b6b0e4520eeb34(rest) {\n const { axisType: axisType, sections: sections, totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const packages = sections.map((section)=>{\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo\n };\n });\n return $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$ac30ca3cf5df959d, {\n axisType: axisType,\n packages: packages,\n totalHeight: totalHeight,\n ...rest\n });\n}\nfunction $1aa4ef695e55d51d$export$82731b9607850ca6(rest) {\n /** Axis to show approximate height based on dynamic column scales */ const { axisType: axisType, sections: sections, totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const packages = sections.map((section)=>{\n const { scaleInfo: scaleInfo } = section;\n if (scaleInfo.heightScale == null) throw new Error(\"No height scale available for section\");\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale\n };\n });\n return $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$ac30ca3cf5df959d, {\n axisType: axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages: packages,\n totalHeight: totalHeight,\n ...rest\n });\n}\nfunction $1aa4ef695e55d51d$export$ac30ca3cf5df959d(props) {\n const { axisType: axisType, axisLabel: axisLabel, axisUnit: axisUnit, totalHeight: totalHeight, packages: packages, ...rest } = props;\n if (axisType == (0, $fXMLu$ColumnAxisType).ORDINAL) return null;\n let _axisLabel = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == (0, $fXMLu$ColumnAxisType).DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == (0, $fXMLu$ColumnAxisType).HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n return $1aa4ef695e55d51d$var$h(\"div.composite-age-axis\", rest, [\n $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$64204d5cbb3e8227, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight\n }),\n $1aa4ef695e55d51d$var$h((0, $fXMLu$SVG), {\n className: \"age-axis-column\",\n style: {\n width: `22px`,\n height: `${totalHeight}px`\n },\n width: 22,\n height: totalHeight\n }, packages.map((group, i)=>{\n const { key: key, scale: scale } = group;\n return $1aa4ef695e55d51d$var$h((0, $fXMLu$AgeAxis), {\n key: key,\n className: \"age-axis\",\n scale: scale,\n tickSizeOuter: 3\n });\n }))\n ]);\n}\nfunction $1aa4ef695e55d51d$export$20d84abfcfa68dfa({ age: age }) {\n /** A cursor that shows the age at a specific point on the age axis. */ const scale = (0, $wtIgl.useCompositeScale)();\n const heightPx = scale(age);\n if (age == null || heightPx == null) return null;\n return $1aa4ef695e55d51d$var$h(\"div.age-cursor\", {\n style: {\n top: heightPx\n }\n }, [\n $1aa4ef695e55d51d$var$h(\"div.line\"),\n $1aa4ef695e55d51d$var$h((0, $iYfAq.AgeLabel), {\n age: age,\n className: \"label\"\n })\n ]);\n}\n\n\nexport {$1aa4ef695e55d51d$export$64204d5cbb3e8227 as VerticalAxisLabel, $1aa4ef695e55d51d$export$40b6b0e4520eeb34 as CompositeAgeAxis, $1aa4ef695e55d51d$export$ac30ca3cf5df959d as CompositeAgeAxisCore, $1aa4ef695e55d51d$export$82731b9607850ca6 as ApproximateHeightAxis, $1aa4ef695e55d51d$export$20d84abfcfa68dfa as AgeCursor};\n//# sourceMappingURL=column-views.db47fe3c.js.map\n","import hyper from \"@macrostrat/hyper\";\nimport {\n SVG,\n ColumnAxis,\n ColumnContext,\n ColumnAxisType,\n AgeAxis,\n} from \"@macrostrat/column-components\";\nimport { useContext } from \"react\";\nimport styles from \"./age-axis.module.sass\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport { Parenthetical } from \"@macrostrat/data-components\";\nimport { AgeLabel } from \"./unit-details\";\nimport { PackageScaleLayoutData } from \"./prepare-units/types\";\n\nconst h = hyper.styled(styles);\n\nconst AgeAxisCore = ({ ticks, tickSpacing = 40, showDomain = false }) => {\n const { pixelHeight } = useContext(ColumnContext);\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n\n return h(\"g.axis\", { transform: \"translate(20 0)\" }, [\n h(ColumnAxis, {\n ticks: v,\n showDomain,\n }),\n ]);\n};\n\nexport function VerticalAxisLabel(props) {\n const { label = \"Age\", unit = \"Ma\", className, height } = props;\n return h(\n \"div.column-axis-label.age-axis-label\",\n { className, style: { height } },\n [\n label,\n \" \",\n h.if(unit)(Parenthetical, { className: \"age-axis-unit\" }, unit),\n ],\n );\n}\n\ninterface CompositeAgeAxisProps {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function CompositeAgeAxis(rest: CompositeAgeAxisProps) {\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo,\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport function ApproximateHeightAxis(rest: CompositeAgeAxisProps) {\n /** Axis to show approximate height based on dynamic column scales */\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n const { scaleInfo } = section;\n if (scaleInfo.heightScale == null) {\n throw new Error(\"No height scale available for section\");\n }\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale, // Use height scale instead of age scale\n // This only works with dynamic columns\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport interface CompositeStratigraphicScaleInfo extends CompositeAgeAxisProps {\n axisType: ColumnAxisType;\n axisLabel?: string;\n axisUnit?: string;\n totalHeight: number;\n packages: PackageScaleLayoutData[];\n}\n\nexport function CompositeAgeAxisCore(props: CompositeStratigraphicScaleInfo) {\n const { axisType, axisLabel, axisUnit, totalHeight, packages, ...rest } =\n props;\n\n if (axisType == ColumnAxisType.ORDINAL) {\n return null;\n }\n\n let _axisLabel: string = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == ColumnAxisType.DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == ColumnAxisType.HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n\n return h(\"div.composite-age-axis\", rest, [\n h(VerticalAxisLabel, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight,\n }),\n h(\n SVG,\n {\n className: \"age-axis-column\",\n style: { width: `22px`, height: `${totalHeight}px` },\n width: 22,\n height: totalHeight,\n },\n packages.map((group, i) => {\n const { key, scale } = group;\n\n return h(AgeAxis, {\n key,\n className: \"age-axis\",\n scale,\n tickSizeOuter: 3,\n });\n }),\n ),\n ]);\n}\n\nexport function AgeCursor({ age }) {\n /** A cursor that shows the age at a specific point on the age axis. */\n const scale = useCompositeScale();\n const heightPx = scale(age);\n\n if (age == null || heightPx == null) {\n return null;\n }\n\n return h(\n \"div.age-cursor\",\n {\n style: {\n top: heightPx,\n },\n },\n [h(\"div.line\"), h(AgeLabel, { age, className: \"label\" })],\n );\n}\n"],"names":["$fXMLu$macrostrathyper","ColumnAxisType","$fXMLu$ColumnAxisType","SVG","$fXMLu$SVG","AgeAxis","$fXMLu$AgeAxis","Parenthetical","$fXMLu$Parenthetical","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$1aa4ef695e55d51d$exports","$1aa4ef695e55d51d$export$64204d5cbb3e8227","$1aa4ef695e55d51d$export$40b6b0e4520eeb34","$1aa4ef695e55d51d$export$ac30ca3cf5df959d","$1aa4ef695e55d51d$export$82731b9607850ca6","$1aa4ef695e55d51d$export$20d84abfcfa68dfa","$6kMGl","$wtIgl","$iYfAq","$1aa4ef695e55d51d$var$h","styled","a","__esModule","default","props","label","unit","className","height","style","if","rest","axisType","sections","totalHeight","useMacrostratColumnData","packages","map","section","key","section_id","scaleInfo","axisLabel","axisUnit","heightScale","scale","ORDINAL","_axisLabel","_axisUnit","DEPTH","HEIGHT","width","group","i","tickSizeOuter","age","heightPx","useCompositeScale","top","AgeLabel","VerticalAxisLabel","CompositeAgeAxis","CompositeAgeAxisCore","ApproximateHeightAxis","AgeCursor"],"version":3,"file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AA,IAAE,CAAG,CAAA,MAAE,CAAK,CAAE,CAAG,EAEvB,OAAO,EAAE,EAAS,CAChB,IAAA,EACA,UAAW,WACX,MAAA,EACA,cAAe,CACjB,EACF,IAEH,CACH,CAEO,SAAS,EAAU,CAAA,IAAE,CAAG,CAAE,EAG/B,IAAM,EAAW,AADH,AAAA,CAAA,EAAA,EAAA,iBAAgB,AAAhB,IACS,UAEvB,AAAI,AAAO,MAAP,GAAe,AAAY,MAAZ,EACV,KAGF,EACL,iBACA,CACE,MAAO,CACL,IAAK,CACP,CACF,EACA,CAAC,EAAE,YAAa,EAAE,EAAA,QAAO,CAAG,CAAE,IAAA,EAAK,UAAW,OAAQ,GAAG,CAE7D,Q,K,iB,C,K,gB,C,K,oB,C,K,qB,C,K,S","sources":["<anon>","packages/column-views/src/age-axis.ts"],"sourcesContent":["import \"./column-views.0bd15ee4.js\";\nimport \"./column-views.46efb749.js\";\nimport \"./column-views.6c7f9245.js\";\nimport $fXMLu$macrostrathyper from \"@macrostrat/hyper\";\nimport {ColumnContext as $fXMLu$ColumnContext, ColumnAxis as $fXMLu$ColumnAxis, ColumnAxisType as $fXMLu$ColumnAxisType, SVG as $fXMLu$SVG, AgeAxis as $fXMLu$AgeAxis} from \"@macrostrat/column-components\";\nimport {useContext as $fXMLu$useContext} from \"react\";\nimport {Parenthetical as $fXMLu$Parenthetical} from \"@macrostrat/data-components\";\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $1aa4ef695e55d51d$exports = {};\n\n$parcel$export($1aa4ef695e55d51d$exports, \"VerticalAxisLabel\", () => $1aa4ef695e55d51d$export$64204d5cbb3e8227);\n$parcel$export($1aa4ef695e55d51d$exports, \"CompositeAgeAxis\", () => $1aa4ef695e55d51d$export$40b6b0e4520eeb34);\n$parcel$export($1aa4ef695e55d51d$exports, \"CompositeAgeAxisCore\", () => $1aa4ef695e55d51d$export$ac30ca3cf5df959d);\n$parcel$export($1aa4ef695e55d51d$exports, \"ApproximateHeightAxis\", () => $1aa4ef695e55d51d$export$82731b9607850ca6);\n$parcel$export($1aa4ef695e55d51d$exports, \"AgeCursor\", () => $1aa4ef695e55d51d$export$20d84abfcfa68dfa);\n\n\n\n\nvar $6kMGl = parcelRequire(\"6kMGl\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\n\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\nconst $1aa4ef695e55d51d$var$h = (0, $fXMLu$macrostrathyper).styled((0, (/*@__PURE__*/$parcel$interopDefault($6kMGl))));\nconst $1aa4ef695e55d51d$var$AgeAxisCore = ({ ticks: ticks, tickSpacing: tickSpacing = 40, showDomain: showDomain = false })=>{\n const { pixelHeight: pixelHeight } = (0, $fXMLu$useContext)((0, $fXMLu$ColumnContext));\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n return $1aa4ef695e55d51d$var$h(\"g.axis\", {\n transform: \"translate(20 0)\"\n }, [\n $1aa4ef695e55d51d$var$h((0, $fXMLu$ColumnAxis), {\n ticks: v,\n showDomain: showDomain\n })\n ]);\n};\nfunction $1aa4ef695e55d51d$export$64204d5cbb3e8227(props) {\n const { label: label = \"Age\", unit: unit = \"Ma\", className: className, height: height } = props;\n return $1aa4ef695e55d51d$var$h(\"div.column-axis-label.age-axis-label\", {\n className: className,\n style: {\n height: height\n }\n }, [\n label,\n \" \",\n $1aa4ef695e55d51d$var$h.if(unit)((0, $fXMLu$Parenthetical), {\n className: \"age-axis-unit\"\n }, unit)\n ]);\n}\nfunction $1aa4ef695e55d51d$export$40b6b0e4520eeb34(rest) {\n const { axisType: axisType, sections: sections, totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const packages = sections.map((section)=>{\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo\n };\n });\n return $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$ac30ca3cf5df959d, {\n axisType: axisType,\n packages: packages,\n totalHeight: totalHeight,\n ...rest\n });\n}\nfunction $1aa4ef695e55d51d$export$82731b9607850ca6(rest) {\n /** Axis to show approximate height based on dynamic column scales */ const { axisType: axisType, sections: sections, totalHeight: totalHeight } = (0, $wtIgl.useMacrostratColumnData)();\n const packages = sections.map((section)=>{\n const { scaleInfo: scaleInfo } = section;\n if (scaleInfo.heightScale == null) throw new Error(\"No height scale available for section\");\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale\n };\n });\n return $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$ac30ca3cf5df959d, {\n axisType: axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages: packages,\n totalHeight: totalHeight,\n ...rest\n });\n}\nfunction $1aa4ef695e55d51d$export$ac30ca3cf5df959d(props) {\n const { axisType: axisType, axisLabel: axisLabel, axisUnit: axisUnit, totalHeight: totalHeight, packages: packages, ...rest } = props;\n if (axisType == (0, $fXMLu$ColumnAxisType).ORDINAL) return null;\n let _axisLabel = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == (0, $fXMLu$ColumnAxisType).DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == (0, $fXMLu$ColumnAxisType).HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n return $1aa4ef695e55d51d$var$h(\"div.composite-age-axis\", rest, [\n $1aa4ef695e55d51d$var$h($1aa4ef695e55d51d$export$64204d5cbb3e8227, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight\n }),\n $1aa4ef695e55d51d$var$h((0, $fXMLu$SVG), {\n className: \"age-axis-column\",\n style: {\n width: `22px`,\n height: `${totalHeight}px`\n },\n width: 22,\n height: totalHeight\n }, packages.map((group, i)=>{\n const { key: key, scale: scale } = group;\n return $1aa4ef695e55d51d$var$h((0, $fXMLu$AgeAxis), {\n key: key,\n className: \"age-axis\",\n scale: scale,\n tickSizeOuter: 3\n });\n }))\n ]);\n}\nfunction $1aa4ef695e55d51d$export$20d84abfcfa68dfa({ age: age }) {\n /** A cursor that shows the age at a specific point on the age axis. */ const scale = (0, $wtIgl.useCompositeScale)();\n const heightPx = scale(age);\n if (age == null || heightPx == null) return null;\n return $1aa4ef695e55d51d$var$h(\"div.age-cursor\", {\n style: {\n top: heightPx\n }\n }, [\n $1aa4ef695e55d51d$var$h(\"div.line\"),\n $1aa4ef695e55d51d$var$h((0, $iYfAq.AgeLabel), {\n age: age,\n className: \"label\"\n })\n ]);\n}\n\n\nexport {$1aa4ef695e55d51d$export$64204d5cbb3e8227 as VerticalAxisLabel, $1aa4ef695e55d51d$export$40b6b0e4520eeb34 as CompositeAgeAxis, $1aa4ef695e55d51d$export$ac30ca3cf5df959d as CompositeAgeAxisCore, $1aa4ef695e55d51d$export$82731b9607850ca6 as ApproximateHeightAxis, $1aa4ef695e55d51d$export$20d84abfcfa68dfa as AgeCursor};\n//# sourceMappingURL=column-views.d77d260b.js.map\n","import hyper from \"@macrostrat/hyper\";\nimport {\n SVG,\n ColumnAxis,\n ColumnContext,\n ColumnAxisType,\n AgeAxis,\n} from \"@macrostrat/column-components\";\nimport { useContext } from \"react\";\nimport styles from \"./age-axis.module.sass\";\nimport { useCompositeScale, useMacrostratColumnData } from \"./data-provider\";\nimport { Parenthetical } from \"@macrostrat/data-components\";\nimport { AgeLabel } from \"./unit-details\";\nimport { PackageScaleLayoutData } from \"./prepare-units\";\n\nconst h = hyper.styled(styles);\n\nconst AgeAxisCore = ({ ticks, tickSpacing = 40, showDomain = false }) => {\n const { pixelHeight } = useContext(ColumnContext);\n // A tick roughly every 40 pixels\n let v = Math.max(Math.round(pixelHeight / tickSpacing), 1);\n\n return h(\"g.axis\", { transform: \"translate(20 0)\" }, [\n h(ColumnAxis, {\n ticks: v,\n showDomain,\n }),\n ]);\n};\n\nexport function VerticalAxisLabel(props) {\n const { label = \"Age\", unit = \"Ma\", className, height } = props;\n return h(\n \"div.column-axis-label.age-axis-label\",\n { className, style: { height } },\n [\n label,\n \" \",\n h.if(unit)(Parenthetical, { className: \"age-axis-unit\" }, unit),\n ],\n );\n}\n\ninterface CompositeAgeAxisProps {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function CompositeAgeAxis(rest: CompositeAgeAxisProps) {\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n return {\n key: `section-${section.section_id}`,\n ...section.scaleInfo,\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport function ApproximateHeightAxis(rest: CompositeAgeAxisProps) {\n /** Axis to show approximate height based on dynamic column scales */\n const { axisType, sections, totalHeight } = useMacrostratColumnData();\n\n const packages = sections.map((section) => {\n const { scaleInfo } = section;\n if (scaleInfo.heightScale == null) {\n throw new Error(\"No height scale available for section\");\n }\n return {\n key: `section-${section.section_id}`,\n ...scaleInfo,\n scale: scaleInfo.heightScale, // Use height scale instead of age scale\n // This only works with dynamic columns\n };\n });\n\n return h(CompositeAgeAxisCore, {\n axisType,\n axisLabel: \"Approx. height\",\n axisUnit: \"m\",\n packages,\n totalHeight,\n ...rest,\n });\n}\n\nexport interface CompositeStratigraphicScaleInfo extends CompositeAgeAxisProps {\n axisType: ColumnAxisType;\n axisLabel?: string;\n axisUnit?: string;\n totalHeight: number;\n packages: PackageScaleLayoutData[];\n}\n\nexport function CompositeAgeAxisCore(props: CompositeStratigraphicScaleInfo) {\n const { axisType, axisLabel, axisUnit, totalHeight, packages, ...rest } =\n props;\n\n if (axisType == ColumnAxisType.ORDINAL) {\n return null;\n }\n\n let _axisLabel: string = axisLabel ?? \"Age\";\n let _axisUnit = axisUnit ?? \"Ma\";\n if (axisType == ColumnAxisType.DEPTH) {\n _axisLabel = \"Depth\";\n _axisUnit = \"m\";\n } else if (axisType == ColumnAxisType.HEIGHT) {\n _axisLabel = \"Height\";\n _axisUnit = \"m\";\n }\n\n return h(\"div.composite-age-axis\", rest, [\n h(VerticalAxisLabel, {\n label: _axisLabel,\n unit: _axisUnit,\n height: totalHeight,\n }),\n h(\n SVG,\n {\n className: \"age-axis-column\",\n style: { width: `22px`, height: `${totalHeight}px` },\n width: 22,\n height: totalHeight,\n },\n packages.map((group, i) => {\n const { key, scale } = group;\n\n return h(AgeAxis, {\n key,\n className: \"age-axis\",\n scale,\n tickSizeOuter: 3,\n });\n }),\n ),\n ]);\n}\n\nexport function AgeCursor({ age }) {\n /** A cursor that shows the age at a specific point on the age axis. */\n const scale = useCompositeScale();\n const heightPx = scale(age);\n\n if (age == null || heightPx == null) {\n return null;\n }\n\n return h(\n \"div.age-cursor\",\n {\n style: {\n top: heightPx,\n },\n },\n [h(\"div.line\"), h(AgeLabel, { age, className: \"label\" })],\n );\n}\n"],"names":["$fXMLu$macrostrathyper","ColumnAxisType","$fXMLu$ColumnAxisType","SVG","$fXMLu$SVG","AgeAxis","$fXMLu$AgeAxis","Parenthetical","$fXMLu$Parenthetical","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$1aa4ef695e55d51d$exports","$1aa4ef695e55d51d$export$64204d5cbb3e8227","$1aa4ef695e55d51d$export$40b6b0e4520eeb34","$1aa4ef695e55d51d$export$ac30ca3cf5df959d","$1aa4ef695e55d51d$export$82731b9607850ca6","$1aa4ef695e55d51d$export$20d84abfcfa68dfa","$6kMGl","$wtIgl","$iYfAq","$1aa4ef695e55d51d$var$h","styled","a","__esModule","default","props","label","unit","className","height","style","if","rest","axisType","sections","totalHeight","useMacrostratColumnData","packages","map","section","key","section_id","scaleInfo","axisLabel","axisUnit","heightScale","scale","ORDINAL","_axisLabel","_axisUnit","DEPTH","HEIGHT","width","group","i","tickSizeOuter","age","heightPx","useCompositeScale","top","AgeLabel","VerticalAxisLabel","CompositeAgeAxis","CompositeAgeAxisCore","ApproximateHeightAxis","AgeCursor"],"version":3,"file":"column-views.d77d260b.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.7faaf6c8.js";import"./column-views.139b0855.js";import"./column-views.41876859.js";import{useMapClickHandler as e,useMapStyleOperator as o,useMapEaseTo as r}from"@macrostrat/mapbox-react";import{LngLatBounds as t}from"mapbox-gl";import n from"@macrostrat/hyper";import{useMemo as l}from"react";import{setGeoJSON as s,buildGeoJSONSource as i}from"@macrostrat/mapbox-utils";import{buildCrossSectionLayers as a}from"@macrostrat/map-styles";var c=globalThis,u={},p={},d=c.parcelRequirea149;null==d&&((d=function(e){if(e in u)return u[e].exports;if(e in p){var o=p[e];delete p[e];var r={id:e,exports:{}};return u[e]=r,o.call(r.exports,r,r.exports),r.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,o){p[e]=o},c.parcelRequirea149=d),d.register,Object.defineProperty({},"ColumnCorrelationMap",{get:()=>g,set:void 0,enumerable:!0,configurable:!0});var m=d("gIQRH"),f=d("dETE9"),y=d("4pcLO");function g(e){let{padding:o=50,children:r,columnColor:t,...s}=e,i=l(()=>[(0,f.buildColumnsStyle)(t),M,v],[t]);return n(y.InsetMap,{...s,boxZoom:!1,dragRotate:!1,overlayStyles:i},[n(S),n(C),n(b),n(x,{padding:o}),r])}function b(){let o=(0,m.useCorrelationMapStore)(e=>e.onClickMap);return e(e=>{o(e,{type:"Point",coordinates:e.lngLat.toArray()})},[o]),null}function C(){let e=(0,m.useCorrelationMapStore)(e=>e.focusedColumns);return o(o=>{let r={type:"Feature",geometry:{type:"LineString",coordinates:e.map(e=>e.properties.centroid.geometry.coordinates)},properties:{}};s(o,"selected-columns",{type:"FeatureCollection",features:e}),s(o,"selected-column-centroids",{type:"FeatureCollection",features:[r]})},[e]),null}function S({enabled:e=!0}){let r=(0,m.useCorrelationMapStore)(e=>e.columns);return o(e=>{if(null==r)return;let o={type:"FeatureCollection",features:r};console.log(" columns",o),s(e,"columns",o)},[r,e]),null}let M={version:8,sources:{"selected-columns":i(),"selected-column-centroids":i()},layers:[{id:"selected-columns-fill",type:"fill",source:"selected-columns",paint:{"fill-color":"rgba(255, 0, 0, 0.1)"}},{id:"selected-column-centroids-line",type:"line",source:"selected-column-centroids",paint:{"line-color":"rgba(255, 0, 0, 0.8)","line-width":2,"line-dasharray":[2,2]}},{id:"selected-column-centroids-points",type:"circle",source:"selected-column-centroids",paint:{"circle-radius":4,"circle-color":"rgba(255, 0, 0, 0.8)"}}]},v={version:8,sources:{elevationMarker:i(),crossSectionLine:i(),crossSectionEndpoints:i()},layers:a()};function x({padding:e}){let n=(0,m.useCorrelationMapStore)(e=>e.focusedLine);return o(e=>{null!=n&&(s(e,"crossSectionLine",{type:"FeatureCollection",features:[{type:"Feature",geometry:n,properties:{id:"focusedLine"}}]}),s(e,"crossSectionEndpoints",{type:"FeatureCollection",features:n.coordinates.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:e},properties:{}}))}))},[n]),r({bounds:l(()=>{if(null==n||n?.coordinates.length<2)return null;let e=new t;for(let o of n.coordinates)e.extend(o);return e},[n]),padding:e,trackResize:!0}),null}export{g as ColumnCorrelationMap};
2
- //# sourceMappingURL=column-views.105c28fa.js.map
1
+ import"./column-views.8e846c57.js";import"./column-views.139b0855.js";import"./column-views.41876859.js";import{useMapClickHandler as e,useMapStyleOperator as o,useMapEaseTo as r}from"@macrostrat/mapbox-react";import{LngLatBounds as t}from"mapbox-gl";import n from"@macrostrat/hyper";import{useMemo as l}from"react";import{setGeoJSON as s,buildGeoJSONSource as i}from"@macrostrat/mapbox-utils";import{buildCrossSectionLayers as a}from"@macrostrat/map-styles";var c=globalThis,u={},p={},d=c.parcelRequirea149;null==d&&((d=function(e){if(e in u)return u[e].exports;if(e in p){var o=p[e];delete p[e];var r={id:e,exports:{}};return u[e]=r,o.call(r.exports,r,r.exports),r.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,o){p[e]=o},c.parcelRequirea149=d),d.register,Object.defineProperty({},"ColumnCorrelationMap",{get:()=>g,set:void 0,enumerable:!0,configurable:!0});var m=d("gIQRH"),f=d("dETE9"),y=d("4pcLO");function g(e){let{padding:o=50,children:r,columnColor:t,...s}=e,i=l(()=>[(0,f.buildColumnsStyle)(t),M,v],[t]);return n(y.InsetMap,{...s,boxZoom:!1,dragRotate:!1,overlayStyles:i},[n(S),n(C),n(b),n(x,{padding:o}),r])}function b(){let o=(0,m.useCorrelationMapStore)(e=>e.onClickMap);return e(e=>{o(e,{type:"Point",coordinates:e.lngLat.toArray()})},[o]),null}function C(){let e=(0,m.useCorrelationMapStore)(e=>e.focusedColumns);return o(o=>{let r={type:"Feature",geometry:{type:"LineString",coordinates:e.map(e=>e.properties.centroid.geometry.coordinates)},properties:{}};s(o,"selected-columns",{type:"FeatureCollection",features:e}),s(o,"selected-column-centroids",{type:"FeatureCollection",features:[r]})},[e]),null}function S({enabled:e=!0}){let r=(0,m.useCorrelationMapStore)(e=>e.columns);return o(e=>{if(null==r)return;let o={type:"FeatureCollection",features:r};console.log(" columns",o),s(e,"columns",o)},[r,e]),null}let M={version:8,sources:{"selected-columns":i(),"selected-column-centroids":i()},layers:[{id:"selected-columns-fill",type:"fill",source:"selected-columns",paint:{"fill-color":"rgba(255, 0, 0, 0.1)"}},{id:"selected-column-centroids-line",type:"line",source:"selected-column-centroids",paint:{"line-color":"rgba(255, 0, 0, 0.8)","line-width":2,"line-dasharray":[2,2]}},{id:"selected-column-centroids-points",type:"circle",source:"selected-column-centroids",paint:{"circle-radius":4,"circle-color":"rgba(255, 0, 0, 0.8)"}}]},v={version:8,sources:{elevationMarker:i(),crossSectionLine:i(),crossSectionEndpoints:i()},layers:a()};function x({padding:e}){let n=(0,m.useCorrelationMapStore)(e=>e.focusedLine);return o(e=>{null!=n&&(s(e,"crossSectionLine",{type:"FeatureCollection",features:[{type:"Feature",geometry:n,properties:{id:"focusedLine"}}]}),s(e,"crossSectionEndpoints",{type:"FeatureCollection",features:n.coordinates.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:e},properties:{}}))}))},[n]),r({bounds:l(()=>{if(null==n||n?.coordinates.length<2)return null;let e=new t;for(let o of n.coordinates)e.extend(o);return e},[n]),padding:e,trackResize:!0}),null}export{g as ColumnCorrelationMap};
2
+ //# sourceMappingURL=column-views.d818b387.js.map
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,A,O,6C,A,Q,sB,C,C,uB,C,C,gB,C,K,0B,A,Q,gB,C,K,W,A,Q,M,mB,A,Q,W,C,K,O,A,Q,c,C,C,sB,C,K,0B,A,Q,2B,C,K,wB,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,O,c,C,C,E,uB,C,I,I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ACN,SAAU,EAAY,WAAW,CAAC,GAAG,CAAC,AAAC,GAAW,CAAA,CAChD,KAAM,UACN,SAAU,CAAE,KAAM,QAAS,YAAa,CAAM,EAC9C,WAAY,CAAC,CACf,CAAA,EACF,GACF,EACA,CAAC,EAAY,EAcf,AAAA,EAAa,CAAE,OAXA,AAAA,EAAQ,KACrB,GAAI,AAAe,MAAf,GAAuB,GAAa,YAAY,OAAS,EAC3D,OAAO,KAET,IAAI,EAAS,IAAI,EACjB,IAAK,IAAI,KAAS,EAAY,WAAW,CACvC,EAAO,MAAM,CAAC,GAEhB,OAAO,CACT,EAAG,CAAC,EAAY,EAEO,QAAA,EAAS,YAAa,CAAA,CAAK,GAE3C,IACT,Q,K,oB","sources":["<anon>","packages/column-views/src/maps/column-correlation/core.ts"],"sourcesContent":["import \"./column-views.7faaf6c8.js\";\nimport \"./column-views.139b0855.js\";\nimport \"./column-views.41876859.js\";\nimport {useMapClickHandler as $8s7LP$useMapClickHandler, useMapStyleOperator as $8s7LP$useMapStyleOperator, useMapEaseTo as $8s7LP$useMapEaseTo} from \"@macrostrat/mapbox-react\";\nimport {LngLatBounds as $8s7LP$LngLatBounds} from \"mapbox-gl\";\nimport $8s7LP$macrostrathyper from \"@macrostrat/hyper\";\nimport {useMemo as $8s7LP$useMemo} from \"react\";\nimport {setGeoJSON as $8s7LP$setGeoJSON, buildGeoJSONSource as $8s7LP$buildGeoJSONSource} from \"@macrostrat/mapbox-utils\";\nimport {buildCrossSectionLayers as $8s7LP$buildCrossSectionLayers} from \"@macrostrat/map-styles\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $2e0f3abda6f981c3$exports = {};\n\n$parcel$export($2e0f3abda6f981c3$exports, \"ColumnCorrelationMap\", () => $2e0f3abda6f981c3$export$8e7d97509e84cc49);\n\n\n\n\n\n\nvar $gIQRH = parcelRequire(\"gIQRH\");\n\nvar $dETE9 = parcelRequire(\"dETE9\");\nvar $4pcLO = parcelRequire(\"4pcLO\");\n\nfunction $2e0f3abda6f981c3$export$8e7d97509e84cc49(props) {\n const { padding: padding = 50, children: children, columnColor: columnColor, ...rest } = props;\n const overlayStyles = (0, $8s7LP$useMemo)(()=>{\n return [\n (0, $dETE9.buildColumnsStyle)(columnColor),\n $2e0f3abda6f981c3$var$selectedColumnsStyle,\n $2e0f3abda6f981c3$var$lineOfSectionStyle\n ];\n }, [\n columnColor\n ]);\n return (0, $8s7LP$macrostrathyper)((0, $4pcLO.InsetMap), {\n ...rest,\n boxZoom: false,\n dragRotate: false,\n overlayStyles: overlayStyles\n }, [\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$ColumnsLayer),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$SelectedColumnsLayer),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$MapClickHandler),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$SectionLine, {\n padding: padding\n }),\n children\n ]);\n}\nfunction $2e0f3abda6f981c3$var$MapClickHandler() {\n const onClickMap = (0, $gIQRH.useCorrelationMapStore)((state)=>state.onClickMap);\n (0, $8s7LP$useMapClickHandler)((e)=>{\n onClickMap(e, {\n type: \"Point\",\n coordinates: e.lngLat.toArray()\n });\n }, [\n onClickMap\n ]);\n return null;\n}\nfunction $2e0f3abda6f981c3$var$SelectedColumnsLayer() {\n const focusedColumns = (0, $gIQRH.useCorrelationMapStore)((state)=>state.focusedColumns);\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n let features = focusedColumns;\n const data = {\n type: \"FeatureCollection\",\n features: features\n };\n const columnCentroidLine = {\n type: \"Feature\",\n geometry: {\n type: \"LineString\",\n coordinates: features.map((col)=>col.properties.centroid.geometry.coordinates)\n },\n properties: {}\n };\n (0, $8s7LP$setGeoJSON)(map, \"selected-columns\", data);\n (0, $8s7LP$setGeoJSON)(map, \"selected-column-centroids\", {\n type: \"FeatureCollection\",\n features: [\n columnCentroidLine\n ]\n });\n }, [\n focusedColumns\n ]);\n return null;\n}\nfunction $2e0f3abda6f981c3$var$ColumnsLayer({ enabled: enabled = true }) {\n const columns = (0, $gIQRH.useCorrelationMapStore)((state)=>state.columns);\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n if (columns == null) return;\n const data = {\n type: \"FeatureCollection\",\n features: columns\n };\n console.log(\" columns\", data);\n (0, $8s7LP$setGeoJSON)(map, \"columns\", data);\n }, [\n columns,\n enabled\n ]);\n return null;\n}\nconst $2e0f3abda6f981c3$var$selectedColumnsStyle = {\n version: 8,\n sources: {\n \"selected-columns\": (0, $8s7LP$buildGeoJSONSource)(),\n \"selected-column-centroids\": (0, $8s7LP$buildGeoJSONSource)()\n },\n layers: [\n {\n id: \"selected-columns-fill\",\n type: \"fill\",\n source: \"selected-columns\",\n paint: {\n \"fill-color\": \"rgba(255, 0, 0, 0.1)\"\n }\n },\n {\n id: \"selected-column-centroids-line\",\n type: \"line\",\n source: \"selected-column-centroids\",\n paint: {\n \"line-color\": \"rgba(255, 0, 0, 0.8)\",\n \"line-width\": 2,\n \"line-dasharray\": [\n 2,\n 2\n ]\n }\n },\n {\n id: \"selected-column-centroids-points\",\n type: \"circle\",\n source: \"selected-column-centroids\",\n paint: {\n \"circle-radius\": 4,\n \"circle-color\": \"rgba(255, 0, 0, 0.8)\"\n }\n }\n ]\n};\nconst $2e0f3abda6f981c3$var$lineOfSectionStyle = {\n version: 8,\n sources: {\n elevationMarker: (0, $8s7LP$buildGeoJSONSource)(),\n crossSectionLine: (0, $8s7LP$buildGeoJSONSource)(),\n crossSectionEndpoints: (0, $8s7LP$buildGeoJSONSource)()\n },\n layers: (0, $8s7LP$buildCrossSectionLayers)()\n};\nfunction $2e0f3abda6f981c3$var$SectionLine({ padding: padding }) {\n const focusedLine = (0, $gIQRH.useCorrelationMapStore)((state)=>state.focusedLine);\n // Setup focused line\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n if (focusedLine == null) return;\n const data = {\n type: \"FeatureCollection\",\n features: [\n {\n type: \"Feature\",\n geometry: focusedLine,\n properties: {\n id: \"focusedLine\"\n }\n }\n ]\n };\n (0, $8s7LP$setGeoJSON)(map, \"crossSectionLine\", data);\n (0, $8s7LP$setGeoJSON)(map, \"crossSectionEndpoints\", {\n type: \"FeatureCollection\",\n features: focusedLine.coordinates.map((coord)=>({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: coord\n },\n properties: {}\n }))\n });\n }, [\n focusedLine\n ]);\n const bounds = (0, $8s7LP$useMemo)(()=>{\n if (focusedLine == null || focusedLine?.coordinates.length < 2) return null;\n let bounds = new (0, $8s7LP$LngLatBounds)();\n for (let coord of focusedLine.coordinates)bounds.extend(coord);\n return bounds;\n }, [\n focusedLine\n ]);\n (0, $8s7LP$useMapEaseTo)({\n bounds: bounds,\n padding: padding,\n trackResize: true\n });\n return null;\n}\n\n\nexport {$2e0f3abda6f981c3$export$8e7d97509e84cc49 as ColumnCorrelationMap};\n//# sourceMappingURL=column-views.105c28fa.js.map\n","import {\n useMapClickHandler,\n useMapEaseTo,\n useMapStyleOperator,\n} from \"@macrostrat/mapbox-react\";\nimport { LngLatBounds, Style } from \"mapbox-gl\";\nimport h from \"@macrostrat/hyper\";\nimport { Feature, FeatureCollection } from \"geojson\";\nimport { ReactNode, useMemo } from \"react\";\nimport { setGeoJSON, buildGeoJSONSource } from \"@macrostrat/mapbox-utils\";\n\nimport { useCorrelationMapStore } from \"./state\";\nimport { buildColumnsStyle, InsetMap, InsetMapProps } from \"../_shared\";\nimport { buildCrossSectionLayers } from \"@macrostrat/map-styles\";\n\nexport interface CorrelationMapProps extends InsetMapProps {\n padding?: number;\n children?: ReactNode;\n accessToken?: string;\n columnColor?: string;\n}\n\nexport function ColumnCorrelationMap(props: CorrelationMapProps) {\n const { padding = 50, children, columnColor, ...rest } = props;\n\n const overlayStyles: Partial<Style>[] = useMemo(() => {\n return [\n buildColumnsStyle(columnColor) as Style,\n selectedColumnsStyle as Style,\n lineOfSectionStyle as Style,\n ];\n }, [columnColor]);\n\n return h(\n InsetMap,\n {\n ...rest,\n boxZoom: false,\n dragRotate: false,\n overlayStyles,\n },\n [\n h(ColumnsLayer),\n h(SelectedColumnsLayer),\n h(MapClickHandler),\n h(SectionLine, { padding }),\n children,\n ],\n );\n}\n\nfunction MapClickHandler() {\n const onClickMap = useCorrelationMapStore((state) => state.onClickMap);\n\n useMapClickHandler(\n (e) => {\n onClickMap(e, { type: \"Point\", coordinates: e.lngLat.toArray() });\n },\n [onClickMap],\n );\n\n return null;\n}\n\nfunction SelectedColumnsLayer() {\n const focusedColumns = useCorrelationMapStore(\n (state) => state.focusedColumns,\n );\n\n useMapStyleOperator(\n (map) => {\n let features = focusedColumns;\n\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features,\n };\n\n const columnCentroidLine: Feature = {\n type: \"Feature\",\n geometry: {\n type: \"LineString\",\n coordinates: features.map(\n (col) => col.properties.centroid.geometry.coordinates,\n ),\n },\n properties: {},\n };\n\n setGeoJSON(map, \"selected-columns\", data);\n setGeoJSON(map, \"selected-column-centroids\", {\n type: \"FeatureCollection\",\n features: [columnCentroidLine],\n });\n },\n [focusedColumns],\n );\n return null;\n}\n\nfunction ColumnsLayer({ enabled = true }) {\n const columns = useCorrelationMapStore((state) => state.columns);\n\n useMapStyleOperator(\n (map) => {\n if (columns == null) {\n return;\n }\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features: columns,\n };\n\n console.log(\" columns\", data);\n setGeoJSON(map, \"columns\", data);\n },\n [columns, enabled],\n );\n return null;\n}\n\nconst selectedColumnsStyle: Style = {\n version: 8,\n sources: {\n \"selected-columns\": buildGeoJSONSource(),\n \"selected-column-centroids\": buildGeoJSONSource(),\n },\n layers: [\n {\n id: \"selected-columns-fill\",\n type: \"fill\",\n source: \"selected-columns\",\n paint: {\n \"fill-color\": \"rgba(255, 0, 0, 0.1)\",\n },\n },\n {\n id: \"selected-column-centroids-line\",\n type: \"line\",\n source: \"selected-column-centroids\",\n paint: {\n \"line-color\": \"rgba(255, 0, 0, 0.8)\",\n \"line-width\": 2,\n \"line-dasharray\": [2, 2],\n },\n },\n {\n id: \"selected-column-centroids-points\",\n type: \"circle\",\n source: \"selected-column-centroids\",\n paint: {\n \"circle-radius\": 4,\n \"circle-color\": \"rgba(255, 0, 0, 0.8)\",\n },\n },\n ],\n};\n\nconst lineOfSectionStyle: Style = {\n version: 8,\n sources: {\n elevationMarker: buildGeoJSONSource(),\n crossSectionLine: buildGeoJSONSource(),\n crossSectionEndpoints: buildGeoJSONSource(),\n },\n layers: buildCrossSectionLayers(),\n};\n\nfunction SectionLine({ padding }: { padding: number }) {\n const focusedLine = useCorrelationMapStore((state) => state.focusedLine);\n\n // Setup focused line\n useMapStyleOperator(\n (map) => {\n if (focusedLine == null) {\n return;\n }\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features: [\n {\n type: \"Feature\",\n geometry: focusedLine,\n properties: { id: \"focusedLine\" },\n },\n ],\n };\n\n setGeoJSON(map, \"crossSectionLine\", data);\n setGeoJSON(map, \"crossSectionEndpoints\", {\n type: \"FeatureCollection\",\n features: focusedLine.coordinates.map((coord) => ({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: coord },\n properties: {},\n })),\n });\n },\n [focusedLine],\n );\n\n const bounds = useMemo(() => {\n if (focusedLine == null || focusedLine?.coordinates.length < 2) {\n return null;\n }\n let bounds = new LngLatBounds();\n for (let coord of focusedLine.coordinates) {\n bounds.extend(coord);\n }\n return bounds;\n }, [focusedLine]);\n\n useMapEaseTo({ bounds, padding, trackResize: true });\n\n return null;\n}\n"],"names":["useMapClickHandler","$8s7LP$useMapClickHandler","useMapStyleOperator","$8s7LP$useMapStyleOperator","useMapEaseTo","$8s7LP$useMapEaseTo","LngLatBounds","$8s7LP$LngLatBounds","$8s7LP$macrostrathyper","useMemo","$8s7LP$useMemo","setGeoJSON","$8s7LP$setGeoJSON","buildGeoJSONSource","$8s7LP$buildGeoJSONSource","buildCrossSectionLayers","$8s7LP$buildCrossSectionLayers","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","Object","defineProperty","get","$2e0f3abda6f981c3$export$8e7d97509e84cc49","set","s","enumerable","configurable","$gIQRH","$dETE9","$4pcLO","props","padding","children","columnColor","rest","overlayStyles","buildColumnsStyle","$2e0f3abda6f981c3$var$selectedColumnsStyle","$2e0f3abda6f981c3$var$lineOfSectionStyle","InsetMap","boxZoom","dragRotate","$2e0f3abda6f981c3$var$ColumnsLayer","$2e0f3abda6f981c3$var$SelectedColumnsLayer","$2e0f3abda6f981c3$var$MapClickHandler","$2e0f3abda6f981c3$var$SectionLine","onClickMap","useCorrelationMapStore","state","e","type","coordinates","lngLat","toArray","focusedColumns","map","columnCentroidLine","geometry","features","col","properties","centroid","enabled","columns","data","console","log","version","sources","layers","source","paint","elevationMarker","crossSectionLine","crossSectionEndpoints","focusedLine","coord","bounds","length","extend","trackResize","ColumnCorrelationMap"],"version":3,"file":"column-views.105c28fa.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,M,6C,A,O,6C,A,O,6C,A,Q,sB,C,C,uB,C,C,gB,C,K,0B,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AAA,GACzB,EACA,OAAQ,AAAA,GACV,EAEA,SAAS,EAAY,CAAA,QAAE,CAAO,CAAuB,EACnD,IAAM,EAAc,AAAA,CAAA,EAAA,EAAA,sBAAqB,AAArB,EAAuB,AAAC,GAAU,EAAM,WAAW,EA6CvE,OA1CA,AAAA,EACE,AAAC,IACoB,MAAf,IAcJ,AAAA,EAAW,EAAK,mBAXgB,CAC9B,KAAM,oBACN,SAAU,CACR,CACE,KAAM,UACN,SAAU,EACV,WAAY,CAAE,GAAI,aAAc,CAClC,EACD,AACH,GAGA,AAAA,EAAW,EAAK,wBAAyB,CACvC,KAAM,oBACN,SAAU,EAAY,WAAW,CAAC,GAAG,CAAC,AAAC,GAAW,CAAA,CAChD,KAAM,UACN,SAAU,CAAE,KAAM,QAAS,YAAa,CAAM,EAC9C,WAAY,CAAC,CACf,CAAA,EACF,GACF,EACA,CAAC,EAAY,EAcf,AAAA,EAAa,CAAE,OAXA,AAAA,EAAQ,KACrB,GAAI,AAAe,MAAf,GAAuB,GAAa,YAAY,OAAS,EAC3D,OAAO,KAET,IAAI,EAAS,IAAI,EACjB,IAAK,IAAI,KAAS,EAAY,WAAW,CACvC,EAAO,MAAM,CAAC,GAEhB,OAAO,CACT,EAAG,CAAC,EAAY,EAEO,QAAA,EAAS,YAAa,CAAA,CAAK,GAE3C,IACT,Q,K,oB","sources":["<anon>","packages/column-views/src/maps/column-correlation/core.ts"],"sourcesContent":["import \"./column-views.8e846c57.js\";\nimport \"./column-views.139b0855.js\";\nimport \"./column-views.41876859.js\";\nimport {useMapClickHandler as $8s7LP$useMapClickHandler, useMapStyleOperator as $8s7LP$useMapStyleOperator, useMapEaseTo as $8s7LP$useMapEaseTo} from \"@macrostrat/mapbox-react\";\nimport {LngLatBounds as $8s7LP$LngLatBounds} from \"mapbox-gl\";\nimport $8s7LP$macrostrathyper from \"@macrostrat/hyper\";\nimport {useMemo as $8s7LP$useMemo} from \"react\";\nimport {setGeoJSON as $8s7LP$setGeoJSON, buildGeoJSONSource as $8s7LP$buildGeoJSONSource} from \"@macrostrat/mapbox-utils\";\nimport {buildCrossSectionLayers as $8s7LP$buildCrossSectionLayers} from \"@macrostrat/map-styles\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $2e0f3abda6f981c3$exports = {};\n\n$parcel$export($2e0f3abda6f981c3$exports, \"ColumnCorrelationMap\", () => $2e0f3abda6f981c3$export$8e7d97509e84cc49);\n\n\n\n\n\n\nvar $gIQRH = parcelRequire(\"gIQRH\");\n\nvar $dETE9 = parcelRequire(\"dETE9\");\nvar $4pcLO = parcelRequire(\"4pcLO\");\n\nfunction $2e0f3abda6f981c3$export$8e7d97509e84cc49(props) {\n const { padding: padding = 50, children: children, columnColor: columnColor, ...rest } = props;\n const overlayStyles = (0, $8s7LP$useMemo)(()=>{\n return [\n (0, $dETE9.buildColumnsStyle)(columnColor),\n $2e0f3abda6f981c3$var$selectedColumnsStyle,\n $2e0f3abda6f981c3$var$lineOfSectionStyle\n ];\n }, [\n columnColor\n ]);\n return (0, $8s7LP$macrostrathyper)((0, $4pcLO.InsetMap), {\n ...rest,\n boxZoom: false,\n dragRotate: false,\n overlayStyles: overlayStyles\n }, [\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$ColumnsLayer),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$SelectedColumnsLayer),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$MapClickHandler),\n (0, $8s7LP$macrostrathyper)($2e0f3abda6f981c3$var$SectionLine, {\n padding: padding\n }),\n children\n ]);\n}\nfunction $2e0f3abda6f981c3$var$MapClickHandler() {\n const onClickMap = (0, $gIQRH.useCorrelationMapStore)((state)=>state.onClickMap);\n (0, $8s7LP$useMapClickHandler)((e)=>{\n onClickMap(e, {\n type: \"Point\",\n coordinates: e.lngLat.toArray()\n });\n }, [\n onClickMap\n ]);\n return null;\n}\nfunction $2e0f3abda6f981c3$var$SelectedColumnsLayer() {\n const focusedColumns = (0, $gIQRH.useCorrelationMapStore)((state)=>state.focusedColumns);\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n let features = focusedColumns;\n const data = {\n type: \"FeatureCollection\",\n features: features\n };\n const columnCentroidLine = {\n type: \"Feature\",\n geometry: {\n type: \"LineString\",\n coordinates: features.map((col)=>col.properties.centroid.geometry.coordinates)\n },\n properties: {}\n };\n (0, $8s7LP$setGeoJSON)(map, \"selected-columns\", data);\n (0, $8s7LP$setGeoJSON)(map, \"selected-column-centroids\", {\n type: \"FeatureCollection\",\n features: [\n columnCentroidLine\n ]\n });\n }, [\n focusedColumns\n ]);\n return null;\n}\nfunction $2e0f3abda6f981c3$var$ColumnsLayer({ enabled: enabled = true }) {\n const columns = (0, $gIQRH.useCorrelationMapStore)((state)=>state.columns);\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n if (columns == null) return;\n const data = {\n type: \"FeatureCollection\",\n features: columns\n };\n console.log(\" columns\", data);\n (0, $8s7LP$setGeoJSON)(map, \"columns\", data);\n }, [\n columns,\n enabled\n ]);\n return null;\n}\nconst $2e0f3abda6f981c3$var$selectedColumnsStyle = {\n version: 8,\n sources: {\n \"selected-columns\": (0, $8s7LP$buildGeoJSONSource)(),\n \"selected-column-centroids\": (0, $8s7LP$buildGeoJSONSource)()\n },\n layers: [\n {\n id: \"selected-columns-fill\",\n type: \"fill\",\n source: \"selected-columns\",\n paint: {\n \"fill-color\": \"rgba(255, 0, 0, 0.1)\"\n }\n },\n {\n id: \"selected-column-centroids-line\",\n type: \"line\",\n source: \"selected-column-centroids\",\n paint: {\n \"line-color\": \"rgba(255, 0, 0, 0.8)\",\n \"line-width\": 2,\n \"line-dasharray\": [\n 2,\n 2\n ]\n }\n },\n {\n id: \"selected-column-centroids-points\",\n type: \"circle\",\n source: \"selected-column-centroids\",\n paint: {\n \"circle-radius\": 4,\n \"circle-color\": \"rgba(255, 0, 0, 0.8)\"\n }\n }\n ]\n};\nconst $2e0f3abda6f981c3$var$lineOfSectionStyle = {\n version: 8,\n sources: {\n elevationMarker: (0, $8s7LP$buildGeoJSONSource)(),\n crossSectionLine: (0, $8s7LP$buildGeoJSONSource)(),\n crossSectionEndpoints: (0, $8s7LP$buildGeoJSONSource)()\n },\n layers: (0, $8s7LP$buildCrossSectionLayers)()\n};\nfunction $2e0f3abda6f981c3$var$SectionLine({ padding: padding }) {\n const focusedLine = (0, $gIQRH.useCorrelationMapStore)((state)=>state.focusedLine);\n // Setup focused line\n (0, $8s7LP$useMapStyleOperator)((map)=>{\n if (focusedLine == null) return;\n const data = {\n type: \"FeatureCollection\",\n features: [\n {\n type: \"Feature\",\n geometry: focusedLine,\n properties: {\n id: \"focusedLine\"\n }\n }\n ]\n };\n (0, $8s7LP$setGeoJSON)(map, \"crossSectionLine\", data);\n (0, $8s7LP$setGeoJSON)(map, \"crossSectionEndpoints\", {\n type: \"FeatureCollection\",\n features: focusedLine.coordinates.map((coord)=>({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: coord\n },\n properties: {}\n }))\n });\n }, [\n focusedLine\n ]);\n const bounds = (0, $8s7LP$useMemo)(()=>{\n if (focusedLine == null || focusedLine?.coordinates.length < 2) return null;\n let bounds = new (0, $8s7LP$LngLatBounds)();\n for (let coord of focusedLine.coordinates)bounds.extend(coord);\n return bounds;\n }, [\n focusedLine\n ]);\n (0, $8s7LP$useMapEaseTo)({\n bounds: bounds,\n padding: padding,\n trackResize: true\n });\n return null;\n}\n\n\nexport {$2e0f3abda6f981c3$export$8e7d97509e84cc49 as ColumnCorrelationMap};\n//# sourceMappingURL=column-views.d818b387.js.map\n","import {\n useMapClickHandler,\n useMapEaseTo,\n useMapStyleOperator,\n} from \"@macrostrat/mapbox-react\";\nimport { LngLatBounds, Style } from \"mapbox-gl\";\nimport h from \"@macrostrat/hyper\";\nimport { Feature, FeatureCollection } from \"geojson\";\nimport { ReactNode, useMemo } from \"react\";\nimport { setGeoJSON, buildGeoJSONSource } from \"@macrostrat/mapbox-utils\";\n\nimport { useCorrelationMapStore } from \"./state\";\nimport { buildColumnsStyle, InsetMap, InsetMapProps } from \"../_shared\";\nimport { buildCrossSectionLayers } from \"@macrostrat/map-styles\";\n\nexport interface CorrelationMapProps extends InsetMapProps {\n padding?: number;\n children?: ReactNode;\n accessToken?: string;\n columnColor?: string;\n}\n\nexport function ColumnCorrelationMap(props: CorrelationMapProps) {\n const { padding = 50, children, columnColor, ...rest } = props;\n\n const overlayStyles: Partial<Style>[] = useMemo(() => {\n return [\n buildColumnsStyle(columnColor) as Style,\n selectedColumnsStyle as Style,\n lineOfSectionStyle as Style,\n ];\n }, [columnColor]);\n\n return h(\n InsetMap,\n {\n ...rest,\n boxZoom: false,\n dragRotate: false,\n overlayStyles,\n },\n [\n h(ColumnsLayer),\n h(SelectedColumnsLayer),\n h(MapClickHandler),\n h(SectionLine, { padding }),\n children,\n ],\n );\n}\n\nfunction MapClickHandler() {\n const onClickMap = useCorrelationMapStore((state) => state.onClickMap);\n\n useMapClickHandler(\n (e) => {\n onClickMap(e, { type: \"Point\", coordinates: e.lngLat.toArray() });\n },\n [onClickMap],\n );\n\n return null;\n}\n\nfunction SelectedColumnsLayer() {\n const focusedColumns = useCorrelationMapStore(\n (state) => state.focusedColumns,\n );\n\n useMapStyleOperator(\n (map) => {\n let features = focusedColumns;\n\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features,\n };\n\n const columnCentroidLine: Feature = {\n type: \"Feature\",\n geometry: {\n type: \"LineString\",\n coordinates: features.map(\n (col) => col.properties.centroid.geometry.coordinates,\n ),\n },\n properties: {},\n };\n\n setGeoJSON(map, \"selected-columns\", data);\n setGeoJSON(map, \"selected-column-centroids\", {\n type: \"FeatureCollection\",\n features: [columnCentroidLine],\n });\n },\n [focusedColumns],\n );\n return null;\n}\n\nfunction ColumnsLayer({ enabled = true }) {\n const columns = useCorrelationMapStore((state) => state.columns);\n\n useMapStyleOperator(\n (map) => {\n if (columns == null) {\n return;\n }\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features: columns,\n };\n\n console.log(\" columns\", data);\n setGeoJSON(map, \"columns\", data);\n },\n [columns, enabled],\n );\n return null;\n}\n\nconst selectedColumnsStyle: Style = {\n version: 8,\n sources: {\n \"selected-columns\": buildGeoJSONSource(),\n \"selected-column-centroids\": buildGeoJSONSource(),\n },\n layers: [\n {\n id: \"selected-columns-fill\",\n type: \"fill\",\n source: \"selected-columns\",\n paint: {\n \"fill-color\": \"rgba(255, 0, 0, 0.1)\",\n },\n },\n {\n id: \"selected-column-centroids-line\",\n type: \"line\",\n source: \"selected-column-centroids\",\n paint: {\n \"line-color\": \"rgba(255, 0, 0, 0.8)\",\n \"line-width\": 2,\n \"line-dasharray\": [2, 2],\n },\n },\n {\n id: \"selected-column-centroids-points\",\n type: \"circle\",\n source: \"selected-column-centroids\",\n paint: {\n \"circle-radius\": 4,\n \"circle-color\": \"rgba(255, 0, 0, 0.8)\",\n },\n },\n ],\n};\n\nconst lineOfSectionStyle: Style = {\n version: 8,\n sources: {\n elevationMarker: buildGeoJSONSource(),\n crossSectionLine: buildGeoJSONSource(),\n crossSectionEndpoints: buildGeoJSONSource(),\n },\n layers: buildCrossSectionLayers(),\n};\n\nfunction SectionLine({ padding }: { padding: number }) {\n const focusedLine = useCorrelationMapStore((state) => state.focusedLine);\n\n // Setup focused line\n useMapStyleOperator(\n (map) => {\n if (focusedLine == null) {\n return;\n }\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features: [\n {\n type: \"Feature\",\n geometry: focusedLine,\n properties: { id: \"focusedLine\" },\n },\n ],\n };\n\n setGeoJSON(map, \"crossSectionLine\", data);\n setGeoJSON(map, \"crossSectionEndpoints\", {\n type: \"FeatureCollection\",\n features: focusedLine.coordinates.map((coord) => ({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: coord },\n properties: {},\n })),\n });\n },\n [focusedLine],\n );\n\n const bounds = useMemo(() => {\n if (focusedLine == null || focusedLine?.coordinates.length < 2) {\n return null;\n }\n let bounds = new LngLatBounds();\n for (let coord of focusedLine.coordinates) {\n bounds.extend(coord);\n }\n return bounds;\n }, [focusedLine]);\n\n useMapEaseTo({ bounds, padding, trackResize: true });\n\n return null;\n}\n"],"names":["useMapClickHandler","$8s7LP$useMapClickHandler","useMapStyleOperator","$8s7LP$useMapStyleOperator","useMapEaseTo","$8s7LP$useMapEaseTo","LngLatBounds","$8s7LP$LngLatBounds","$8s7LP$macrostrathyper","useMemo","$8s7LP$useMemo","setGeoJSON","$8s7LP$setGeoJSON","buildGeoJSONSource","$8s7LP$buildGeoJSONSource","buildCrossSectionLayers","$8s7LP$buildCrossSectionLayers","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","Object","defineProperty","get","$2e0f3abda6f981c3$export$8e7d97509e84cc49","set","s","enumerable","configurable","$gIQRH","$dETE9","$4pcLO","props","padding","children","columnColor","rest","overlayStyles","buildColumnsStyle","$2e0f3abda6f981c3$var$selectedColumnsStyle","$2e0f3abda6f981c3$var$lineOfSectionStyle","InsetMap","boxZoom","dragRotate","$2e0f3abda6f981c3$var$ColumnsLayer","$2e0f3abda6f981c3$var$SelectedColumnsLayer","$2e0f3abda6f981c3$var$MapClickHandler","$2e0f3abda6f981c3$var$SectionLine","onClickMap","useCorrelationMapStore","state","e","type","coordinates","lngLat","toArray","focusedColumns","map","columnCentroidLine","geometry","features","col","properties","centroid","enabled","columns","data","console","log","version","sources","layers","source","paint","elevationMarker","crossSectionLine","crossSectionEndpoints","focusedLine","coord","bounds","length","extend","trackResize","ColumnCorrelationMap"],"version":3,"file":"column-views.d818b387.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.a08b0c9f.js";import"./column-views.d08e4328.js";import"./column-views.05cfc627.js";function e(e,a){return Object.keys(a).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),e}var a=globalThis,t={},r={},c=a.parcelRequirea149;null==c&&((c=function(e){if(e in t)return t[e].exports;if(e in r){var a=r[e];delete r[e];var c={id:e,exports:{}};return t[e]=c,a.call(c.exports,c,c.exports),c.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,a){r[e]=a},a.parcelRequirea149=c),c.register;var o={},i=c("iYfAq"),f=c("2KV3o"),n=c("2tdcx");e(o,i),e(o,f),e(o,n);export{$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel,$4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader,$4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature,$4a89f93cd5289383$export$3b11bc38611c5941 as Duration,$4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField,$4a89f93cd5289383$export$989167234458594d as Identifier,$4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel,$4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText,$1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover,$1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover,$a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};
2
- //# sourceMappingURL=column-views.2d00d842.js.map
1
+ import"./column-views.6c7f9245.js";import"./column-views.f577d065.js";import"./column-views.c9880a4d.js";function e(e,a){return Object.keys(a).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),e}var a=globalThis,t={},r={},c=a.parcelRequirea149;null==c&&((c=function(e){if(e in t)return t[e].exports;if(e in r){var a=r[e];delete r[e];var c={id:e,exports:{}};return t[e]=c,a.call(c.exports,c,c.exports),c.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,a){r[e]=a},a.parcelRequirea149=c),c.register;var o={},i=c("iYfAq"),f=c("2KV3o"),n=c("2tdcx");e(o,i),e(o,f),e(o,n);export{$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel,$4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader,$4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature,$4a89f93cd5289383$export$3b11bc38611c5941 as Duration,$4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField,$4a89f93cd5289383$export$989167234458594d as Identifier,$4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel,$4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText,$1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover,$1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover,$a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};
2
+ //# sourceMappingURL=column-views.d8821a96.js.map
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,U,6C,gB,C,6C,iB,C,6C,kB,C,6C,Q,C,6C,e,C,6C,U,C,6C,Q,C,6C,a,C,6C,kB,C,6C,oB,C,6C,8B","sources":["<anon>","packages/column-views/src/unit-details/index.ts"],"sourcesContent":["import \"./column-views.a08b0c9f.js\";\nimport \"./column-views.d08e4328.js\";\nimport \"./column-views.05cfc627.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $af300f8688b62310$exports = {};\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\n\nvar $2KV3o = parcelRequire(\"2KV3o\");\n\nvar $2tdcx = parcelRequire(\"2tdcx\");\n$parcel$exportWildcard($af300f8688b62310$exports, $iYfAq);\n$parcel$exportWildcard($af300f8688b62310$exports, $2KV3o);\n$parcel$exportWildcard($af300f8688b62310$exports, $2tdcx);\n\n\nexport {$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel, $4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader, $4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature, $4a89f93cd5289383$export$3b11bc38611c5941 as Duration, $4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField, $4a89f93cd5289383$export$989167234458594d as Identifier, $4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel, $4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText, $1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover, $1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover, $a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};\n//# sourceMappingURL=column-views.2d00d842.js.map\n","export * from \"./panel\";\nexport * from \"./popover\";\nexport * from \"./modal-panel\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$af300f8688b62310$exports","$iYfAq","$2KV3o","$2tdcx","$4a89f93cd5289383$export$fbd245232df17557","UnitDetailsPanel","$4a89f93cd5289383$export$fc503c39cc5cff43","LegendPanelHeader","$4a89f93cd5289383$export$ec297f6f9a6ccad0","UnitDetailsFeature","$4a89f93cd5289383$export$3b11bc38611c5941","Duration","$4a89f93cd5289383$export$895d4931dd696e25","ReferencesField","$4a89f93cd5289383$export$989167234458594d","Identifier","$4a89f93cd5289383$export$37ebfd237811b1eb","AgeLabel","$4a89f93cd5289383$export$b6867fc5221f9f65","ClickableText","$1c6e0a5d10814cef$export$6716aecc2c9afbe2","UnitDetailsPopover","$1c6e0a5d10814cef$export$db1115efab13710d","UnitSelectionPopover","$a8b0b0b16d1f0073$export$cfdbe8496aa51962","UnitDetailsPanelWithNavigation"],"version":3,"file":"column-views.2d00d842.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,M,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,U,6C,gB,C,6C,iB,C,6C,kB,C,6C,Q,C,6C,e,C,6C,U,C,6C,Q,C,6C,a,C,6C,kB,C,6C,oB,C,6C,8B","sources":["<anon>","packages/column-views/src/unit-details/index.ts"],"sourcesContent":["import \"./column-views.6c7f9245.js\";\nimport \"./column-views.f577d065.js\";\nimport \"./column-views.c9880a4d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $af300f8688b62310$exports = {};\n\nvar $iYfAq = parcelRequire(\"iYfAq\");\n\nvar $2KV3o = parcelRequire(\"2KV3o\");\n\nvar $2tdcx = parcelRequire(\"2tdcx\");\n$parcel$exportWildcard($af300f8688b62310$exports, $iYfAq);\n$parcel$exportWildcard($af300f8688b62310$exports, $2KV3o);\n$parcel$exportWildcard($af300f8688b62310$exports, $2tdcx);\n\n\nexport {$4a89f93cd5289383$export$fbd245232df17557 as UnitDetailsPanel, $4a89f93cd5289383$export$fc503c39cc5cff43 as LegendPanelHeader, $4a89f93cd5289383$export$ec297f6f9a6ccad0 as UnitDetailsFeature, $4a89f93cd5289383$export$3b11bc38611c5941 as Duration, $4a89f93cd5289383$export$895d4931dd696e25 as ReferencesField, $4a89f93cd5289383$export$989167234458594d as Identifier, $4a89f93cd5289383$export$37ebfd237811b1eb as AgeLabel, $4a89f93cd5289383$export$b6867fc5221f9f65 as ClickableText, $1c6e0a5d10814cef$export$6716aecc2c9afbe2 as UnitDetailsPopover, $1c6e0a5d10814cef$export$db1115efab13710d as UnitSelectionPopover, $a8b0b0b16d1f0073$export$cfdbe8496aa51962 as UnitDetailsPanelWithNavigation};\n//# sourceMappingURL=column-views.d8821a96.js.map\n","export * from \"./panel\";\nexport * from \"./popover\";\nexport * from \"./modal-panel\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$af300f8688b62310$exports","$iYfAq","$2KV3o","$2tdcx","$4a89f93cd5289383$export$fbd245232df17557","UnitDetailsPanel","$4a89f93cd5289383$export$fc503c39cc5cff43","LegendPanelHeader","$4a89f93cd5289383$export$ec297f6f9a6ccad0","UnitDetailsFeature","$4a89f93cd5289383$export$3b11bc38611c5941","Duration","$4a89f93cd5289383$export$895d4931dd696e25","ReferencesField","$4a89f93cd5289383$export$989167234458594d","Identifier","$4a89f93cd5289383$export$37ebfd237811b1eb","AgeLabel","$4a89f93cd5289383$export$b6867fc5221f9f65","ClickableText","$1c6e0a5d10814cef$export$6716aecc2c9afbe2","UnitDetailsPopover","$1c6e0a5d10814cef$export$db1115efab13710d","UnitSelectionPopover","$a8b0b0b16d1f0073$export$cfdbe8496aa51962","UnitDetailsPanelWithNavigation"],"version":3,"file":"column-views.d8821a96.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ import{compareAgeRanges as e,AgeRangeRelationship as t}from"@macrostrat/stratigraphy-utils";import{ColumnAxisType as r}from"@macrostrat/column-components";function a(e,t,r,a){Object.defineProperty(e,t,{get:r,set:a,enumerable:!0,configurable:!0})}var n,o={};a(o,"MergeSectionsMode",()=>s),a(o,"unitsOverlap",()=>i),a(o,"getUnitHeightRange",()=>f),a(o,"agesOverlap",()=>c),a(o,"getPositionWithinUnit",()=>p),a(o,"createUnitSorter",()=>u),a(o,"ensureArray",()=>l),a(o,"ensureRealFloat",()=>$);var s=((n={}).ALL="all",n.OVERLAPPING="overlapping",n);let i=function(a,n,o=r.AGE,s=.001){return e(f(a,o),f(n,o),s)!=t.Disjoint};function c(e,t,a=.001){return i(e,t,r.AGE,a)}function f(e,t,a=!0){if(a)switch(t){case r.AGE:return[e.b_clip_pos??e.b_age,e.t_clip_pos??e.t_age];case r.DEPTH:case r.ORDINAL:case r.HEIGHT:return[e.b_clip_pos??e.b_pos,e.t_clip_pos??e.t_pos];default:throw Error(`Unknown axis type: ${t}`)}switch(t){case r.AGE:return[e.b_age,e.t_age];case r.DEPTH:case r.ORDINAL:case r.HEIGHT:return[e.b_pos,e.t_pos];default:throw Error(`Unknown axis type: ${t}`)}}function p(e,t,a){if(e<0||e>1)throw Error(`Position must be between 0 and 1: ${e}`);let[n,o]=f(t,a,!1),s=n+e*(o-n),[i,c]=f(t,a,!0);if(a===r.AGE||a===r.DEPTH){if(s>i||s<c)return null}else if(s<i||s>c)return null;return s}let u=e=>(t,r)=>{let a=f(t,e),n=f(r,e),o=a[1]-n[1];return 0!=o?o:a[0]-n[0]};function l(e){return Array.isArray(e)?e:[e]}function $(e){return("string"==typeof e&&(e=parseFloat(e)),isNaN(e))?null:e}export{s as MergeSectionsMode,i as unitsOverlap,f as getUnitHeightRange,c as agesOverlap,p as getPositionWithinUnit,u as createUnitSorter,l as ensureArray,$ as ensureRealFloat};
2
+ //# sourceMappingURL=column-views.dbb4a46b.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,O,oB,C,C,wB,C,K,gC,A,Q,kB,C,K,+B,C,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,IC4BY,E,E,C,E,E,E,oB,I,G,E,E,e,I,G,E,E,qB,I,G,E,E,c,I,G,E,E,wB,I,G,E,E,mB,I,G,E,E,c,I,G,E,E,kB,I,GAAL,IAAK,G,CAAA,E,C,G,G,C,M,E,W,C,cAAA,GAyBL,IAAM,EAA6B,SACxC,CAAC,CACD,CAAC,CACD,EAA2B,AAAA,EAAe,GAAG,CAC7C,EAAoB,IAAK,EAOzB,OAAO,AALK,AAAA,EACV,EAAmB,EAAG,GACtB,EAAmB,EAAG,GACtB,IAEY,AAAA,EAAqB,QAAQ,AAC7C,EAGO,SAAS,EACd,CAAuB,CACvB,CAAuB,CACvB,EAxD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EAAU,GAAe,EAAU,EACrC,OAAO,IADT,MAIA,GAAI,EAAU,GAAe,EAAU,EACrC,OAAO,KAIX,OAAO,CACT,CAEO,IAAM,EAAmB,AAAC,GACxB,CAAC,EAAa,KACnB,IAAM,EAAQ,EAAmB,EAAG,GAC9B,EAAQ,EAAmB,EAAG,GAC9B,EAAQ,CAAK,CAAC,EAAE,CAAG,CAAK,CAAC,EAAE,QACjC,AAAI,AAAS,GAAT,EACK,EAEF,CAAK,CAAC,EAAE,CAAG,CAAK,CAAC,EAAE,AAC5B,EAGK,SAAS,EAAe,CAAU,SACvC,AAAI,MAAM,OAAO,CAAC,GACT,EAEF,CAAC,EAAE,AACZ,CAEO,SAAS,EAAgB,CAAyB,QAIvD,CAHI,AAAY,UAAZ,OAAO,GACT,CAAA,EAAI,WAAW,EADjB,EAGI,MAAM,IACD,KAEF,CACT,Q,K,iB,C,K,Y,C,K,kB,C,K,W,C,K,qB,C,K,gB,C,K,W,C,K,e","sources":["<anon>","packages/column-views/src/prepare-units/utils.ts"],"sourcesContent":["import {compareAgeRanges as $6wq4o$compareAgeRanges, AgeRangeRelationship as $6wq4o$AgeRangeRelationship} from \"@macrostrat/stratigraphy-utils\";\nimport {ColumnAxisType as $6wq4o$ColumnAxisType} from \"@macrostrat/column-components\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\nvar $f811753598b339f3$exports = {};\n\n$parcel$export($f811753598b339f3$exports, \"MergeSectionsMode\", () => $f811753598b339f3$export$e1644389ce074058);\n$parcel$export($f811753598b339f3$exports, \"unitsOverlap\", () => $f811753598b339f3$export$f1a15f539858307);\n$parcel$export($f811753598b339f3$exports, \"getUnitHeightRange\", () => $f811753598b339f3$export$70e712e2ac0237a);\n$parcel$export($f811753598b339f3$exports, \"agesOverlap\", () => $f811753598b339f3$export$d92a67740c050efb);\n$parcel$export($f811753598b339f3$exports, \"getPositionWithinUnit\", () => $f811753598b339f3$export$441710fb21b4ae09);\n$parcel$export($f811753598b339f3$exports, \"createUnitSorter\", () => $f811753598b339f3$export$ab14c04795685c55);\n$parcel$export($f811753598b339f3$exports, \"ensureArray\", () => $f811753598b339f3$export$d0c8ecbd4ed8940c);\n$parcel$export($f811753598b339f3$exports, \"ensureRealFloat\", () => $f811753598b339f3$export$97de5b0a6b4e4dac);\n\n\nconst $f811753598b339f3$var$dt = 0.001;\nvar $f811753598b339f3$export$e1644389ce074058 = /*#__PURE__*/ function(MergeSectionsMode) {\n MergeSectionsMode[\"ALL\"] = \"all\";\n MergeSectionsMode[\"OVERLAPPING\"] = \"overlapping\";\n return MergeSectionsMode;\n}({});\nconst $f811753598b339f3$export$f1a15f539858307 = function(a, b, axisType = (0, $6wq4o$ColumnAxisType).AGE, tolerance = 0.001) {\n const rel = (0, $6wq4o$compareAgeRanges)($f811753598b339f3$export$70e712e2ac0237a(a, axisType), $f811753598b339f3$export$70e712e2ac0237a(b, axisType), tolerance);\n return rel != (0, $6wq4o$AgeRangeRelationship).Disjoint;\n};\nfunction $f811753598b339f3$export$d92a67740c050efb(a, b, tolerance = $f811753598b339f3$var$dt) {\n return $f811753598b339f3$export$f1a15f539858307(a, b, (0, $6wq4o$ColumnAxisType).AGE, tolerance);\n}\nfunction $f811753598b339f3$export$70e712e2ac0237a(unit, axisType, clipped = true) {\n if (clipped) switch(axisType){\n case (0, $6wq4o$ColumnAxisType).AGE:\n return [\n unit.b_clip_pos ?? unit.b_age,\n unit.t_clip_pos ?? unit.t_age\n ];\n case (0, $6wq4o$ColumnAxisType).DEPTH:\n case (0, $6wq4o$ColumnAxisType).ORDINAL:\n case (0, $6wq4o$ColumnAxisType).HEIGHT:\n return [\n unit.b_clip_pos ?? unit.b_pos,\n unit.t_clip_pos ?? unit.t_pos\n ];\n default:\n throw new Error(`Unknown axis type: ${axisType}`);\n }\n else switch(axisType){\n case (0, $6wq4o$ColumnAxisType).AGE:\n return [\n unit.b_age,\n unit.t_age\n ];\n case (0, $6wq4o$ColumnAxisType).DEPTH:\n case (0, $6wq4o$ColumnAxisType).ORDINAL:\n case (0, $6wq4o$ColumnAxisType).HEIGHT:\n return [\n unit.b_pos,\n unit.t_pos\n ];\n default:\n throw new Error(`Unknown axis type: ${axisType}`);\n }\n}\nfunction $f811753598b339f3$export$441710fb21b4ae09(position, unit, axisType) {\n /** Translate a relative position (0-1) within a unit to an absolute position\n * within the unit's height range. If the unit is clipped, null values will be\n * returned for positions outside the clip range\n */ if (position < 0 || position > 1) throw new Error(`Position must be between 0 and 1: ${position}`);\n const [pos_bottom, pos_top] = $f811753598b339f3$export$70e712e2ac0237a(unit, axisType, false);\n const abs_pos = pos_bottom + position * (pos_top - pos_bottom);\n // If clipped, check if abs_pos is within the clipped range\n const [clip_bottom, clip_top] = $f811753598b339f3$export$70e712e2ac0237a(unit, axisType, true);\n if (axisType === (0, $6wq4o$ColumnAxisType).AGE || axisType === (0, $6wq4o$ColumnAxisType).DEPTH) {\n // Invert for age/depth axes\n if (abs_pos > clip_bottom || abs_pos < clip_top) return null;\n } else {\n if (abs_pos < clip_bottom || abs_pos > clip_top) return null;\n }\n return abs_pos;\n}\nconst $f811753598b339f3$export$ab14c04795685c55 = (axisType)=>{\n return (a, b)=>{\n const a_pos = $f811753598b339f3$export$70e712e2ac0237a(a, axisType);\n const b_pos = $f811753598b339f3$export$70e712e2ac0237a(b, axisType);\n const d_top = a_pos[1] - b_pos[1];\n if (d_top != 0) return d_top;\n return a_pos[0] - b_pos[0];\n };\n};\nfunction $f811753598b339f3$export$d0c8ecbd4ed8940c(x) {\n if (Array.isArray(x)) return x;\n return [\n x\n ];\n}\nfunction $f811753598b339f3$export$97de5b0a6b4e4dac(x) {\n if (typeof x == \"string\") x = parseFloat(x);\n if (isNaN(x)) return null;\n return x;\n}\n\n\nexport {$f811753598b339f3$export$e1644389ce074058 as MergeSectionsMode, $f811753598b339f3$export$f1a15f539858307 as unitsOverlap, $f811753598b339f3$export$70e712e2ac0237a as getUnitHeightRange, $f811753598b339f3$export$d92a67740c050efb as agesOverlap, $f811753598b339f3$export$441710fb21b4ae09 as getPositionWithinUnit, $f811753598b339f3$export$ab14c04795685c55 as createUnitSorter, $f811753598b339f3$export$d0c8ecbd4ed8940c as ensureArray, $f811753598b339f3$export$97de5b0a6b4e4dac as ensureRealFloat};\n//# sourceMappingURL=column-views.dbb4a46b.js.map\n","import type { BaseUnit } from \"@macrostrat/api-types\";\nimport {\n AgeRangeRelationship,\n compareAgeRanges,\n} from \"@macrostrat/stratigraphy-utils\";\nimport { ColumnAxisType } from \"@macrostrat/column-components\";\nimport { ScaleContinuousNumeric } from \"d3-scale\";\nimport type {\n ColumnScaleOptions,\n CompositeColumnData,\n ExtUnit,\n PackageLayoutData,\n StratigraphicPackage,\n} from \"./types\";\n\nconst dt = 0.001;\n\nexport interface PrepareColumnOptions extends ColumnScaleOptions {\n axisType: ColumnAxisType;\n t_age?: number;\n b_age?: number;\n t_pos?: number;\n b_pos?: number;\n mergeSections?: MergeSectionsMode;\n collapseSmallUnconformities?: boolean | number;\n scale?: ScaleContinuousNumeric<any, any>;\n}\n\nexport enum MergeSectionsMode {\n ALL = \"all\",\n OVERLAPPING = \"overlapping\",\n}\n\nexport interface PreparedColumnData extends CompositeColumnData {\n sections: PackageLayoutData[];\n units: ExtUnit[];\n}\n\ninterface UnitsOverlap {\n (\n a: StratigraphicPackage,\n b: StratigraphicPackage,\n axisType?: ColumnAxisType.AGE,\n tolerance?: number,\n ): boolean;\n (\n a: BaseUnit,\n b: BaseUnit,\n axisType: ColumnAxisType,\n tolerance?: number,\n ): boolean;\n}\n\nexport const unitsOverlap: UnitsOverlap = function (\n a,\n b,\n axisType: ColumnAxisType = ColumnAxisType.AGE,\n tolerance: number = 0.001,\n): boolean {\n const rel = compareAgeRanges(\n getUnitHeightRange(a, axisType),\n getUnitHeightRange(b, axisType),\n tolerance,\n );\n return rel != AgeRangeRelationship.Disjoint;\n};\n\n/** A more permissive overlap function in the age space */\nexport function agesOverlap(\n a: StratigraphicPackage,\n b: StratigraphicPackage,\n tolerance: number = dt,\n): boolean {\n return unitsOverlap(a, b, ColumnAxisType.AGE, tolerance);\n}\n\nexport interface PossiblyClippedUnit extends BaseUnit {\n // Internally created clipped positions\n t_clip_pos?: number;\n b_clip_pos?: number;\n}\n\nexport function getUnitHeightRange(\n unit: PossiblyClippedUnit,\n axisType: ColumnAxisType,\n clipped: boolean = true,\n): [number, number] {\n if (clipped) {\n switch (axisType) {\n case ColumnAxisType.AGE:\n return [unit.b_clip_pos ?? unit.b_age, unit.t_clip_pos ?? unit.t_age];\n case ColumnAxisType.DEPTH:\n case ColumnAxisType.ORDINAL:\n case ColumnAxisType.HEIGHT:\n return [unit.b_clip_pos ?? unit.b_pos, unit.t_clip_pos ?? unit.t_pos];\n default:\n throw new Error(`Unknown axis type: ${axisType}`);\n }\n } else {\n switch (axisType) {\n case ColumnAxisType.AGE:\n return [unit.b_age, unit.t_age];\n case ColumnAxisType.DEPTH:\n case ColumnAxisType.ORDINAL:\n case ColumnAxisType.HEIGHT:\n return [unit.b_pos, unit.t_pos];\n default:\n throw new Error(`Unknown axis type: ${axisType}`);\n }\n }\n}\n\nexport function getPositionWithinUnit(\n position: number,\n unit: PossiblyClippedUnit,\n axisType: ColumnAxisType,\n): number | null {\n /** Translate a relative position (0-1) within a unit to an absolute position\n * within the unit's height range. If the unit is clipped, null values will be\n * returned for positions outside the clip range\n */\n if (position < 0 || position > 1) {\n throw new Error(`Position must be between 0 and 1: ${position}`);\n }\n\n const [pos_bottom, pos_top] = getUnitHeightRange(unit, axisType, false);\n const abs_pos = pos_bottom + position * (pos_top - pos_bottom);\n\n // If clipped, check if abs_pos is within the clipped range\n const [clip_bottom, clip_top] = getUnitHeightRange(unit, axisType, true);\n if (axisType === ColumnAxisType.AGE || axisType === ColumnAxisType.DEPTH) {\n // Invert for age/depth axes\n if (abs_pos > clip_bottom || abs_pos < clip_top) {\n return null;\n }\n } else {\n if (abs_pos < clip_bottom || abs_pos > clip_top) {\n return null;\n }\n }\n\n return abs_pos;\n}\n\nexport const createUnitSorter = (axisType: ColumnAxisType) => {\n return (a: BaseUnit, b: BaseUnit) => {\n const a_pos = getUnitHeightRange(a, axisType);\n const b_pos = getUnitHeightRange(b, axisType);\n const d_top = a_pos[1] - b_pos[1];\n if (d_top != 0) {\n return d_top;\n }\n return a_pos[0] - b_pos[0];\n };\n};\n\nexport function ensureArray<T>(x: T | T[]): T[] {\n if (Array.isArray(x)) {\n return x;\n }\n return [x];\n}\n\nexport function ensureRealFloat(x: number | string | null): number | null {\n if (typeof x == \"string\") {\n x = parseFloat(x);\n }\n if (isNaN(x)) {\n return null;\n }\n return x;\n}\n"],"names":["compareAgeRanges","$6wq4o$compareAgeRanges","AgeRangeRelationship","$6wq4o$AgeRangeRelationship","ColumnAxisType","$6wq4o$ColumnAxisType","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","MergeSectionsMode","$f811753598b339f3$exports","$f811753598b339f3$export$e1644389ce074058","$f811753598b339f3$export$f1a15f539858307","$f811753598b339f3$export$70e712e2ac0237a","$f811753598b339f3$export$d92a67740c050efb","$f811753598b339f3$export$441710fb21b4ae09","$f811753598b339f3$export$ab14c04795685c55","$f811753598b339f3$export$d0c8ecbd4ed8940c","$f811753598b339f3$export$97de5b0a6b4e4dac","a","b","axisType","AGE","tolerance","rel","Disjoint","unit","clipped","b_clip_pos","b_age","t_clip_pos","t_age","DEPTH","ORDINAL","HEIGHT","b_pos","t_pos","Error","position","pos_bottom","pos_top","abs_pos","clip_bottom","clip_top","a_pos","d_top","x","Array","isArray","parseFloat","isNaN","unitsOverlap","getUnitHeightRange","agesOverlap","getPositionWithinUnit","createUnitSorter","ensureArray","ensureRealFloat"],"version":3,"file":"column-views.dbb4a46b.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.7425d37b.js";import"./column-views.22c2d45b.js";import"./column-views.95411f1b.js";import"./column-views.e1813308.js";import"./column-views.0beae29d.js";function e(e,a){return Object.keys(a).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),e}var a=globalThis,t={},r={},o=a.parcelRequirea149;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in r){var a=r[e];delete r[e];var o={id:e,exports:{}};return t[e]=o,a.call(o.exports,o,o.exports),o.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,a){r[e]=a},a.parcelRequirea149=o),o.register;var s={},c=o("Piirt"),$=o("lgTAP"),b=o("6W0kE"),f=o("wtIgl"),d=o("5SO8b");e(s,c),e(s,$),e(s,b),e(s,f),e(s,d);export{$482a09479937d1e2$export$45bd78cd093090fa as fetchAllColumns,$482a09479937d1e2$export$e3270a4e30e40ff9 as useColumnFeatures,$482a09479937d1e2$export$1aa679bd5e605f82 as fetchLithologies,$482a09479937d1e2$export$5d2ec2e733dfe6c7 as fetchIntervals,$482a09479937d1e2$export$780b4b253712916c as fetchEnvironments,$482a09479937d1e2$export$cd7bfa0860f58b96 as fetchRefs,$482a09479937d1e2$export$8ea8f45a7ffe4183 as fetchStratNames,$482a09479937d1e2$export$b97b9bdd6a521298 as fetchUnits,$482a09479937d1e2$export$d3d8b0fabcc76c5d as fetchColumnUnits,$8750144f23b92eb9$export$fb98d5bae3a6800 as useMacrostratStore,$8750144f23b92eb9$export$33b1392d23dde04 as useMacrostratBaseURL,$8750144f23b92eb9$export$89dd4e5ae4a82373 as useMacrostratDefs,$8750144f23b92eb9$export$81eaae0b474404fd as useMacrostratColumns,$8750144f23b92eb9$export$b9c9fc603d74a555 as useMacrostratData,$8750144f23b92eb9$export$690613f93cdc5576 as MacrostratDataProvider,$8750144f23b92eb9$export$3098013bc6cc316d as MacrostratAPIProvider,$8750144f23b92eb9$export$9e42f9b6e0d67c7d as MacrostratColumnProvider,$8750144f23b92eb9$export$8492a5cae82b6a70 as LithologiesProvider,$8750144f23b92eb9$export$4d18a90c945d129f as useLithologies,$8750144f23b92eb9$export$c6b216bf4c71b61f as useEnvironments,$d8324406f284950a$export$91cb5ac808759b34 as useColumnNav,$d8324406f284950a$export$36fed9e0f93a8fde as ColumnNavProvider,$91525b65c57a1e5d$export$ef5395089200109b as MacrostratColumnStateProvider,$91525b65c57a1e5d$export$7fec7bd80ff9c10e as MacrostratColumnDataProvider,$91525b65c57a1e5d$export$f8509b7cce386c7d as useMacrostratColumnData,$91525b65c57a1e5d$export$6fb40844db555b2 as useMacrostratUnits,$91525b65c57a1e5d$export$7513be0cfd10d9cc as useColumnUnitsMap,$91525b65c57a1e5d$export$a7fc62995ec4f76 as useCompositeScale,$cfa36458f00f4b0e$export$77a278d5ca56e309 as useUnitSelectionDispatch,$cfa36458f00f4b0e$export$b220b1d3591dc9e5 as useUnitSelectionStore,$cfa36458f00f4b0e$export$f0dd93f90aa8e5da as useSelectedUnit,$cfa36458f00f4b0e$export$f19d75b1d4b676a4 as UnitSelectionProvider,$cfa36458f00f4b0e$export$cbbec12b1451fe7d as useUnitSelectionTarget,$cfa36458f00f4b0e$export$70f5ee19650fc7d1 as UnitKeyboardNavigation};
2
- //# sourceMappingURL=column-views.b12f8c81.js.map
1
+ import"./column-views.7425d37b.js";import"./column-views.c007152b.js";import"./column-views.95411f1b.js";import"./column-views.46efb749.js";import"./column-views.0beae29d.js";function e(e,a){return Object.keys(a).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),e}var a=globalThis,t={},r={},o=a.parcelRequirea149;null==o&&((o=function(e){if(e in t)return t[e].exports;if(e in r){var a=r[e];delete r[e];var o={id:e,exports:{}};return t[e]=o,a.call(o.exports,o,o.exports),o.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,a){r[e]=a},a.parcelRequirea149=o),o.register;var s={},c=o("Piirt"),$=o("lgTAP"),b=o("6W0kE"),f=o("wtIgl"),d=o("5SO8b");e(s,c),e(s,$),e(s,b),e(s,f),e(s,d);export{$482a09479937d1e2$export$45bd78cd093090fa as fetchAllColumns,$482a09479937d1e2$export$e3270a4e30e40ff9 as useColumnFeatures,$482a09479937d1e2$export$1aa679bd5e605f82 as fetchLithologies,$482a09479937d1e2$export$5d2ec2e733dfe6c7 as fetchIntervals,$482a09479937d1e2$export$780b4b253712916c as fetchEnvironments,$482a09479937d1e2$export$cd7bfa0860f58b96 as fetchRefs,$482a09479937d1e2$export$8ea8f45a7ffe4183 as fetchStratNames,$482a09479937d1e2$export$b97b9bdd6a521298 as fetchUnits,$482a09479937d1e2$export$d3d8b0fabcc76c5d as fetchColumnUnits,$8750144f23b92eb9$export$fb98d5bae3a6800 as useMacrostratStore,$8750144f23b92eb9$export$33b1392d23dde04 as useMacrostratBaseURL,$8750144f23b92eb9$export$89dd4e5ae4a82373 as useMacrostratDefs,$8750144f23b92eb9$export$81eaae0b474404fd as useMacrostratColumns,$8750144f23b92eb9$export$b9c9fc603d74a555 as useMacrostratData,$8750144f23b92eb9$export$690613f93cdc5576 as MacrostratDataProvider,$8750144f23b92eb9$export$3098013bc6cc316d as MacrostratAPIProvider,$8750144f23b92eb9$export$9e42f9b6e0d67c7d as MacrostratColumnProvider,$8750144f23b92eb9$export$8492a5cae82b6a70 as LithologiesProvider,$8750144f23b92eb9$export$4d18a90c945d129f as useLithologies,$8750144f23b92eb9$export$c6b216bf4c71b61f as useEnvironments,$d8324406f284950a$export$91cb5ac808759b34 as useColumnNav,$d8324406f284950a$export$36fed9e0f93a8fde as ColumnNavProvider,$91525b65c57a1e5d$export$ef5395089200109b as MacrostratColumnStateProvider,$91525b65c57a1e5d$export$7fec7bd80ff9c10e as MacrostratColumnDataProvider,$91525b65c57a1e5d$export$f8509b7cce386c7d as useMacrostratColumnData,$91525b65c57a1e5d$export$6fb40844db555b2 as useMacrostratUnits,$91525b65c57a1e5d$export$7513be0cfd10d9cc as useColumnUnitsMap,$91525b65c57a1e5d$export$a7fc62995ec4f76 as useCompositeScale,$cfa36458f00f4b0e$export$77a278d5ca56e309 as useUnitSelectionDispatch,$cfa36458f00f4b0e$export$b220b1d3591dc9e5 as useUnitSelectionStore,$cfa36458f00f4b0e$export$f0dd93f90aa8e5da as useSelectedUnit,$cfa36458f00f4b0e$export$f19d75b1d4b676a4 as UnitSelectionProvider,$cfa36458f00f4b0e$export$cbbec12b1451fe7d as useUnitSelectionTarget,$cfa36458f00f4b0e$export$70f5ee19650fc7d1 as UnitKeyboardNavigation};
2
+ //# sourceMappingURL=column-views.e264a767.js.map
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,G,E,E,G,E,E,U,6C,e,C,6C,iB,C,6C,gB,C,6C,c,C,6C,iB,C,6C,S,C,6C,e,C,6C,U,C,6C,gB,C,4C,kB,C,4C,oB,C,6C,iB,C,6C,oB,C,6C,iB,C,6C,sB,C,6C,qB,C,6C,wB,C,6C,mB,C,6C,c,C,6C,e,C,6C,Y,C,6C,iB,C,6C,6B,C,6C,4B,C,6C,uB,C,4C,kB,C,6C,iB,C,4C,iB,C,6C,wB,C,6C,qB,C,6C,e,C,6C,qB,C,6C,sB,C,6C,sB","sources":["<anon>","packages/column-views/src/data-provider/index.ts"],"sourcesContent":["import \"./column-views.7425d37b.js\";\nimport \"./column-views.22c2d45b.js\";\nimport \"./column-views.95411f1b.js\";\nimport \"./column-views.e1813308.js\";\nimport \"./column-views.0beae29d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $6f2fe440dde82d53$exports = {};\n\nvar $Piirt = parcelRequire(\"Piirt\");\n\nvar $lgTAP = parcelRequire(\"lgTAP\");\n\nvar $6W0kE = parcelRequire(\"6W0kE\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\n\nvar $5SO8b = parcelRequire(\"5SO8b\");\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $Piirt);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $lgTAP);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $6W0kE);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $wtIgl);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $5SO8b);\n\n\nexport {$482a09479937d1e2$export$45bd78cd093090fa as fetchAllColumns, $482a09479937d1e2$export$e3270a4e30e40ff9 as useColumnFeatures, $482a09479937d1e2$export$1aa679bd5e605f82 as fetchLithologies, $482a09479937d1e2$export$5d2ec2e733dfe6c7 as fetchIntervals, $482a09479937d1e2$export$780b4b253712916c as fetchEnvironments, $482a09479937d1e2$export$cd7bfa0860f58b96 as fetchRefs, $482a09479937d1e2$export$8ea8f45a7ffe4183 as fetchStratNames, $482a09479937d1e2$export$b97b9bdd6a521298 as fetchUnits, $482a09479937d1e2$export$d3d8b0fabcc76c5d as fetchColumnUnits, $8750144f23b92eb9$export$fb98d5bae3a6800 as useMacrostratStore, $8750144f23b92eb9$export$33b1392d23dde04 as useMacrostratBaseURL, $8750144f23b92eb9$export$89dd4e5ae4a82373 as useMacrostratDefs, $8750144f23b92eb9$export$81eaae0b474404fd as useMacrostratColumns, $8750144f23b92eb9$export$b9c9fc603d74a555 as useMacrostratData, $8750144f23b92eb9$export$690613f93cdc5576 as MacrostratDataProvider, $8750144f23b92eb9$export$3098013bc6cc316d as MacrostratAPIProvider, $8750144f23b92eb9$export$9e42f9b6e0d67c7d as MacrostratColumnProvider, $8750144f23b92eb9$export$8492a5cae82b6a70 as LithologiesProvider, $8750144f23b92eb9$export$4d18a90c945d129f as useLithologies, $8750144f23b92eb9$export$c6b216bf4c71b61f as useEnvironments, $d8324406f284950a$export$91cb5ac808759b34 as useColumnNav, $d8324406f284950a$export$36fed9e0f93a8fde as ColumnNavProvider, $91525b65c57a1e5d$export$ef5395089200109b as MacrostratColumnStateProvider, $91525b65c57a1e5d$export$7fec7bd80ff9c10e as MacrostratColumnDataProvider, $91525b65c57a1e5d$export$f8509b7cce386c7d as useMacrostratColumnData, $91525b65c57a1e5d$export$6fb40844db555b2 as useMacrostratUnits, $91525b65c57a1e5d$export$7513be0cfd10d9cc as useColumnUnitsMap, $91525b65c57a1e5d$export$a7fc62995ec4f76 as useCompositeScale, $cfa36458f00f4b0e$export$77a278d5ca56e309 as useUnitSelectionDispatch, $cfa36458f00f4b0e$export$b220b1d3591dc9e5 as useUnitSelectionStore, $cfa36458f00f4b0e$export$f0dd93f90aa8e5da as useSelectedUnit, $cfa36458f00f4b0e$export$f19d75b1d4b676a4 as UnitSelectionProvider, $cfa36458f00f4b0e$export$cbbec12b1451fe7d as useUnitSelectionTarget, $cfa36458f00f4b0e$export$70f5ee19650fc7d1 as UnitKeyboardNavigation};\n//# sourceMappingURL=column-views.b12f8c81.js.map\n","export * from \"./fetch\";\nexport * from \"./base\";\nexport * from \"./column-nav\";\nexport * from \"./store\";\nexport * from \"./unit-selection\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$6f2fe440dde82d53$exports","$Piirt","$lgTAP","$6W0kE","$wtIgl","$5SO8b","$482a09479937d1e2$export$45bd78cd093090fa","fetchAllColumns","$482a09479937d1e2$export$e3270a4e30e40ff9","useColumnFeatures","$482a09479937d1e2$export$1aa679bd5e605f82","fetchLithologies","$482a09479937d1e2$export$5d2ec2e733dfe6c7","fetchIntervals","$482a09479937d1e2$export$780b4b253712916c","fetchEnvironments","$482a09479937d1e2$export$cd7bfa0860f58b96","fetchRefs","$482a09479937d1e2$export$8ea8f45a7ffe4183","fetchStratNames","$482a09479937d1e2$export$b97b9bdd6a521298","fetchUnits","$482a09479937d1e2$export$d3d8b0fabcc76c5d","fetchColumnUnits","$8750144f23b92eb9$export$fb98d5bae3a6800","useMacrostratStore","$8750144f23b92eb9$export$33b1392d23dde04","useMacrostratBaseURL","$8750144f23b92eb9$export$89dd4e5ae4a82373","useMacrostratDefs","$8750144f23b92eb9$export$81eaae0b474404fd","useMacrostratColumns","$8750144f23b92eb9$export$b9c9fc603d74a555","useMacrostratData","$8750144f23b92eb9$export$690613f93cdc5576","MacrostratDataProvider","$8750144f23b92eb9$export$3098013bc6cc316d","MacrostratAPIProvider","$8750144f23b92eb9$export$9e42f9b6e0d67c7d","MacrostratColumnProvider","$8750144f23b92eb9$export$8492a5cae82b6a70","LithologiesProvider","$8750144f23b92eb9$export$4d18a90c945d129f","useLithologies","$8750144f23b92eb9$export$c6b216bf4c71b61f","useEnvironments","$d8324406f284950a$export$91cb5ac808759b34","useColumnNav","$d8324406f284950a$export$36fed9e0f93a8fde","ColumnNavProvider","$91525b65c57a1e5d$export$ef5395089200109b","MacrostratColumnStateProvider","$91525b65c57a1e5d$export$7fec7bd80ff9c10e","MacrostratColumnDataProvider","$91525b65c57a1e5d$export$f8509b7cce386c7d","useMacrostratColumnData","$91525b65c57a1e5d$export$6fb40844db555b2","useMacrostratUnits","$91525b65c57a1e5d$export$7513be0cfd10d9cc","useColumnUnitsMap","$91525b65c57a1e5d$export$a7fc62995ec4f76","useCompositeScale","$cfa36458f00f4b0e$export$77a278d5ca56e309","useUnitSelectionDispatch","$cfa36458f00f4b0e$export$b220b1d3591dc9e5","useUnitSelectionStore","$cfa36458f00f4b0e$export$f0dd93f90aa8e5da","useSelectedUnit","$cfa36458f00f4b0e$export$f19d75b1d4b676a4","UnitSelectionProvider","$cfa36458f00f4b0e$export$cbbec12b1451fe7d","useUnitSelectionTarget","$cfa36458f00f4b0e$export$70f5ee19650fc7d1","UnitKeyboardNavigation"],"version":3,"file":"column-views.b12f8c81.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,M,6C,A,O,6C,A,O,6C,A,O,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,S,E,E,S,E,E,S,E,E,G,E,E,G,E,E,G,E,E,G,E,E,U,6C,e,C,6C,iB,C,6C,gB,C,6C,c,C,6C,iB,C,6C,S,C,6C,e,C,6C,U,C,6C,gB,C,4C,kB,C,4C,oB,C,6C,iB,C,6C,oB,C,6C,iB,C,6C,sB,C,6C,qB,C,6C,wB,C,6C,mB,C,6C,c,C,6C,e,C,6C,Y,C,6C,iB,C,6C,6B,C,6C,4B,C,6C,uB,C,4C,kB,C,6C,iB,C,4C,iB,C,6C,wB,C,6C,qB,C,6C,e,C,6C,qB,C,6C,sB,C,6C,sB","sources":["<anon>","packages/column-views/src/data-provider/index.ts"],"sourcesContent":["import \"./column-views.7425d37b.js\";\nimport \"./column-views.c007152b.js\";\nimport \"./column-views.95411f1b.js\";\nimport \"./column-views.46efb749.js\";\nimport \"./column-views.0beae29d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $6f2fe440dde82d53$exports = {};\n\nvar $Piirt = parcelRequire(\"Piirt\");\n\nvar $lgTAP = parcelRequire(\"lgTAP\");\n\nvar $6W0kE = parcelRequire(\"6W0kE\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\n\nvar $5SO8b = parcelRequire(\"5SO8b\");\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $Piirt);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $lgTAP);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $6W0kE);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $wtIgl);\n$parcel$exportWildcard($6f2fe440dde82d53$exports, $5SO8b);\n\n\nexport {$482a09479937d1e2$export$45bd78cd093090fa as fetchAllColumns, $482a09479937d1e2$export$e3270a4e30e40ff9 as useColumnFeatures, $482a09479937d1e2$export$1aa679bd5e605f82 as fetchLithologies, $482a09479937d1e2$export$5d2ec2e733dfe6c7 as fetchIntervals, $482a09479937d1e2$export$780b4b253712916c as fetchEnvironments, $482a09479937d1e2$export$cd7bfa0860f58b96 as fetchRefs, $482a09479937d1e2$export$8ea8f45a7ffe4183 as fetchStratNames, $482a09479937d1e2$export$b97b9bdd6a521298 as fetchUnits, $482a09479937d1e2$export$d3d8b0fabcc76c5d as fetchColumnUnits, $8750144f23b92eb9$export$fb98d5bae3a6800 as useMacrostratStore, $8750144f23b92eb9$export$33b1392d23dde04 as useMacrostratBaseURL, $8750144f23b92eb9$export$89dd4e5ae4a82373 as useMacrostratDefs, $8750144f23b92eb9$export$81eaae0b474404fd as useMacrostratColumns, $8750144f23b92eb9$export$b9c9fc603d74a555 as useMacrostratData, $8750144f23b92eb9$export$690613f93cdc5576 as MacrostratDataProvider, $8750144f23b92eb9$export$3098013bc6cc316d as MacrostratAPIProvider, $8750144f23b92eb9$export$9e42f9b6e0d67c7d as MacrostratColumnProvider, $8750144f23b92eb9$export$8492a5cae82b6a70 as LithologiesProvider, $8750144f23b92eb9$export$4d18a90c945d129f as useLithologies, $8750144f23b92eb9$export$c6b216bf4c71b61f as useEnvironments, $d8324406f284950a$export$91cb5ac808759b34 as useColumnNav, $d8324406f284950a$export$36fed9e0f93a8fde as ColumnNavProvider, $91525b65c57a1e5d$export$ef5395089200109b as MacrostratColumnStateProvider, $91525b65c57a1e5d$export$7fec7bd80ff9c10e as MacrostratColumnDataProvider, $91525b65c57a1e5d$export$f8509b7cce386c7d as useMacrostratColumnData, $91525b65c57a1e5d$export$6fb40844db555b2 as useMacrostratUnits, $91525b65c57a1e5d$export$7513be0cfd10d9cc as useColumnUnitsMap, $91525b65c57a1e5d$export$a7fc62995ec4f76 as useCompositeScale, $cfa36458f00f4b0e$export$77a278d5ca56e309 as useUnitSelectionDispatch, $cfa36458f00f4b0e$export$b220b1d3591dc9e5 as useUnitSelectionStore, $cfa36458f00f4b0e$export$f0dd93f90aa8e5da as useSelectedUnit, $cfa36458f00f4b0e$export$f19d75b1d4b676a4 as UnitSelectionProvider, $cfa36458f00f4b0e$export$cbbec12b1451fe7d as useUnitSelectionTarget, $cfa36458f00f4b0e$export$70f5ee19650fc7d1 as UnitKeyboardNavigation};\n//# sourceMappingURL=column-views.e264a767.js.map\n","export * from \"./fetch\";\nexport * from \"./base\";\nexport * from \"./column-nav\";\nexport * from \"./store\";\nexport * from \"./unit-selection\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$6f2fe440dde82d53$exports","$Piirt","$lgTAP","$6W0kE","$wtIgl","$5SO8b","$482a09479937d1e2$export$45bd78cd093090fa","fetchAllColumns","$482a09479937d1e2$export$e3270a4e30e40ff9","useColumnFeatures","$482a09479937d1e2$export$1aa679bd5e605f82","fetchLithologies","$482a09479937d1e2$export$5d2ec2e733dfe6c7","fetchIntervals","$482a09479937d1e2$export$780b4b253712916c","fetchEnvironments","$482a09479937d1e2$export$cd7bfa0860f58b96","fetchRefs","$482a09479937d1e2$export$8ea8f45a7ffe4183","fetchStratNames","$482a09479937d1e2$export$b97b9bdd6a521298","fetchUnits","$482a09479937d1e2$export$d3d8b0fabcc76c5d","fetchColumnUnits","$8750144f23b92eb9$export$fb98d5bae3a6800","useMacrostratStore","$8750144f23b92eb9$export$33b1392d23dde04","useMacrostratBaseURL","$8750144f23b92eb9$export$89dd4e5ae4a82373","useMacrostratDefs","$8750144f23b92eb9$export$81eaae0b474404fd","useMacrostratColumns","$8750144f23b92eb9$export$b9c9fc603d74a555","useMacrostratData","$8750144f23b92eb9$export$690613f93cdc5576","MacrostratDataProvider","$8750144f23b92eb9$export$3098013bc6cc316d","MacrostratAPIProvider","$8750144f23b92eb9$export$9e42f9b6e0d67c7d","MacrostratColumnProvider","$8750144f23b92eb9$export$8492a5cae82b6a70","LithologiesProvider","$8750144f23b92eb9$export$4d18a90c945d129f","useLithologies","$8750144f23b92eb9$export$c6b216bf4c71b61f","useEnvironments","$d8324406f284950a$export$91cb5ac808759b34","useColumnNav","$d8324406f284950a$export$36fed9e0f93a8fde","ColumnNavProvider","$91525b65c57a1e5d$export$ef5395089200109b","MacrostratColumnStateProvider","$91525b65c57a1e5d$export$7fec7bd80ff9c10e","MacrostratColumnDataProvider","$91525b65c57a1e5d$export$f8509b7cce386c7d","useMacrostratColumnData","$91525b65c57a1e5d$export$6fb40844db555b2","useMacrostratUnits","$91525b65c57a1e5d$export$7513be0cfd10d9cc","useColumnUnitsMap","$91525b65c57a1e5d$export$a7fc62995ec4f76","useCompositeScale","$cfa36458f00f4b0e$export$77a278d5ca56e309","useUnitSelectionDispatch","$cfa36458f00f4b0e$export$b220b1d3591dc9e5","useUnitSelectionStore","$cfa36458f00f4b0e$export$f0dd93f90aa8e5da","useSelectedUnit","$cfa36458f00f4b0e$export$f19d75b1d4b676a4","UnitSelectionProvider","$cfa36458f00f4b0e$export$cbbec12b1451fe7d","useUnitSelectionTarget","$cfa36458f00f4b0e$export$70f5ee19650fc7d1","UnitKeyboardNavigation"],"version":3,"file":"column-views.e264a767.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ import{useAPIResult as e}from"@macrostrat/ui-components";function s(s){let r=e("/measurements",{...s,measure_phase:"zircon",response:"long",show_values:!0,measurement:"207Pb-206Pb"},s);return null==r?null:r}export{s as useDetritalMeasurements};
2
+ //# sourceMappingURL=column-views.e93b3bdb.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,O,gB,C,K,2B,CCkCO,SAAS,EAAwB,CAAU,EAShD,IAAM,EAAyB,AAAA,EAC7B,gBATa,CACb,GAAG,CAAU,CACb,cAAe,SACf,SAAU,OACV,YAAa,CAAA,EAEb,YAAa,aACf,EAIE,UAEF,AAAI,AAAO,MAAP,EAAoB,KACjB,CACT,Q,K,uB","sources":["<anon>","packages/column-views/src/facets/detrital-zircon/provider.ts"],"sourcesContent":["import {useAPIResult as $6xKzt$useAPIResult} from \"@macrostrat/ui-components\";\n\n\nfunction $5fbd0235ca2c694c$export$1b0cf9c36f060135(columnArgs) {\n const params = {\n ...columnArgs,\n measure_phase: \"zircon\",\n response: \"long\",\n show_values: true,\n // Other isotope systems are organized separately\n measurement: \"207Pb-206Pb\"\n };\n const res = (0, $6xKzt$useAPIResult)(\"/measurements\", params, columnArgs);\n if (res == null) return null;\n return res;\n}\n\n\nexport {$5fbd0235ca2c694c$export$1b0cf9c36f060135 as useDetritalMeasurements};\n//# sourceMappingURL=column-views.e93b3bdb.js.map\n","import { group } from \"d3-array\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\n\nexport interface MeasurementInfo {\n measurement_id: number;\n measuremeta_id: number;\n measurement: string;\n measure_units: string;\n measure_phase: string;\n method: string;\n n: number;\n ref_id: number;\n sample_name: string;\n geo_unit: string;\n samp_lith: string;\n samp_lith_id: number;\n samp_desc: string;\n samp_age: string;\n lat: number;\n lng: number;\n unit_id: number;\n unit_rel_pos?: any;\n col_id: number;\n strat_name_id: number;\n match_basis: string;\n ref: string;\n measure_value: number[];\n measure_error: number[];\n measure_position: any[];\n measure_n: number[];\n sample_no: string[];\n error_units: string;\n}\n\nexport function useDetritalMeasurements(columnArgs) {\n const params = {\n ...columnArgs,\n measure_phase: \"zircon\",\n response: \"long\",\n show_values: true,\n // Other isotope systems are organized separately\n measurement: \"207Pb-206Pb\",\n };\n const res: MeasurementInfo[] = useAPIResult(\n \"/measurements\",\n params,\n columnArgs,\n );\n if (res == null) return null;\n return res;\n}\n"],"names":["useAPIResult","$6xKzt$useAPIResult","$5fbd0235ca2c694c$export$1b0cf9c36f060135","columnArgs","res","measure_phase","response","show_values","measurement","useDetritalMeasurements"],"version":3,"file":"column-views.e93b3bdb.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.a281d5bb.js";import"./column-views.ebb44b7d.js";function e(e,r){return Object.keys(r).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),e}var r=globalThis,t={},o={},n=r.parcelRequirea149;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in o){var r=o[e];delete o[e];var n={id:e,exports:{}};return t[e]=n,r.call(n.exports,n,n.exports),n.exports}var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,r){o[e]=r},r.parcelRequirea149=n),n.register;var a={},c=n("ccQ40"),i=n("dd0Et");e(a,c),e(a,i);export{$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart,$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString,$7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};
2
- //# sourceMappingURL=column-views.3913cd0f.js.map
1
+ import"./column-views.42bc66a8.js";import"./column-views.ebb44b7d.js";function e(e,r){return Object.keys(r).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),e}var r=globalThis,t={},o={},n=r.parcelRequirea149;null==n&&((n=function(e){if(e in t)return t[e].exports;if(e in o){var r=o[e];delete o[e];var n={id:e,exports:{}};return t[e]=n,r.call(n.exports,n,n.exports),n.exports}var a=Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}).register=function(e,r){o[e]=r},r.parcelRequirea149=n),n.register;var a={},c=n("ccQ40"),i=n("dd0Et");e(a,c),e(a,i);export{$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart,$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString,$7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};
2
+ //# sourceMappingURL=column-views.ec691859.js.map
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,G,E,E,U,6C,gB,C,6C,mB,C,6C,a","sources":["<anon>","packages/column-views/src/correlation-chart/index.ts"],"sourcesContent":["import \"./column-views.a281d5bb.js\";\nimport \"./column-views.ebb44b7d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $53af365ed50b7b69$exports = {};\n\nvar $ccQ40 = parcelRequire(\"ccQ40\");\n\nvar $dd0Et = parcelRequire(\"dd0Et\");\n$parcel$exportWildcard($53af365ed50b7b69$exports, $ccQ40);\n$parcel$exportWildcard($53af365ed50b7b69$exports, $dd0Et);\n\n\nexport {$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart, $7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString, $7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};\n//# sourceMappingURL=column-views.3913cd0f.js.map\n","export * from \"./main\";\nexport * from \"./hash-string\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$53af365ed50b7b69$exports","$ccQ40","$dd0Et","$25f1fcddbe40b91f$export$9ebf875c09445bec","CorrelationChart","$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f","parseLineFromString","$7e37f2a9ef0a1013$export$8c53992169ff5301","stringifyLine"],"version":3,"file":"column-views.3913cd0f.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,M,6C,A,O,6C,C,S,E,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,C,E,E,E,S,E,E,S,E,E,G,E,E,U,6C,gB,C,6C,mB,C,6C,a","sources":["<anon>","packages/column-views/src/correlation-chart/index.ts"],"sourcesContent":["import \"./column-views.42bc66a8.js\";\nimport \"./column-views.ebb44b7d.js\";\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $53af365ed50b7b69$exports = {};\n\nvar $ccQ40 = parcelRequire(\"ccQ40\");\n\nvar $dd0Et = parcelRequire(\"dd0Et\");\n$parcel$exportWildcard($53af365ed50b7b69$exports, $ccQ40);\n$parcel$exportWildcard($53af365ed50b7b69$exports, $dd0Et);\n\n\nexport {$25f1fcddbe40b91f$export$9ebf875c09445bec as CorrelationChart, $7e37f2a9ef0a1013$export$77c3cc7a57c6db5f as parseLineFromString, $7e37f2a9ef0a1013$export$8c53992169ff5301 as stringifyLine};\n//# sourceMappingURL=column-views.ec691859.js.map\n","export * from \"./main\";\nexport * from \"./hash-string\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","$53af365ed50b7b69$exports","$ccQ40","$dd0Et","$25f1fcddbe40b91f$export$9ebf875c09445bec","CorrelationChart","$7e37f2a9ef0a1013$export$77c3cc7a57c6db5f","parseLineFromString","$7e37f2a9ef0a1013$export$8c53992169ff5301","stringifyLine"],"version":3,"file":"column-views.ec691859.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ import"./column-views.1d064426.js";import"./column-views.46efb749.js";import e from"@macrostrat/hyper";import{useAPIResult as t}from"@macrostrat/ui-components";var n=globalThis,r={},a={},o=n.parcelRequirea149;null==o&&((o=function(e){if(e in r)return r[e].exports;if(e in a){var t=a[e];delete a[e];var n={id:e,exports:{}};return r[e]=n,t.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){a[e]=t},n.parcelRequirea149=o),o.register,Object.defineProperty({},"SGPMeasurementsColumn",{get:()=>s,set:void 0,enumerable:!0,configurable:!0});var l=o("kIQUG"),u=o("wtIgl");function s({columnID:n,color:r="magenta"}){let a=function({col_id:e}){return t("https://dev.macrostrat.org/api/pg/sgp_unit_matches",{col_id:`eq.${e}`},e=>e)}({col_id:n}),{axisType:o,units:s}=(0,u.useMacrostratColumnData)(),c=(0,u.useCompositeScale)();if(null==a||null==s||null==c)return null;let m=function(e,t,n,r){let a=e.map(e=>{let t=e.sgp_samples;if(null==t||0===t.length)return null;let a=(0,l.standardizeMeasurementHeight)({unit_id:e.unit_id},n,r);return null==a?null:(t.sort((e,t)=>e.id-t.id),{...a,data:t,id:e.unit_id})}).filter(Boolean);return(0,l.groupNotesByPixelDistance)(a,t,r,5)}(a,c,s,o);return e(l.BaseMeasurementsColumn,{data:m,noteComponent:i,focusedNoteComponent:i})}function i(t){let{note:n,focused:r}=t,a=n?.data;return null==a||0===a.length?null:e(l.TruncatedList,{className:"sgp-samples",data:a,itemRenderer:t=>e("span",t.data.name),maxItems:r?1/0:5})}export{s as SGPMeasurementsColumn};
2
+ //# sourceMappingURL=column-views.ec7cc7cc.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,M,6C,A,O,6C,A,Q,M,mB,A,Q,gB,C,K,2B,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,O,c,C,C,E,wB,C,I,I,E,I,K,E,W,C,E,a,C,C,G,I,E,E,S,E,E,SCiCO,SAAS,EAAsB,CAAA,SAAE,CA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AAA,QAAE,CAAO,CAAE,CAAG,EACpB,EAAc,GAAM,YAE1B,AAAI,AAAe,MAAf,GAAuB,AAAuB,IAAvB,EAAY,MAAM,CAAe,KAErD,AAAA,EAAE,EAAA,aAAY,CAAG,CACtB,UAAW,cACX,KAAM,EACN,aAAc,AAAC,GAAM,AAAA,EAAE,OAAQ,EAAE,IAAI,CAAC,IAAI,EAC1C,SAAU,EAAU,IAAW,CACjC,EACF,Q,K,qB","sources":["<anon>","packages/column-views/src/facets/measurements/sgp.ts"],"sourcesContent":["import \"./column-views.1d064426.js\";\nimport \"./column-views.46efb749.js\";\nimport $lw8jS$macrostrathyper from \"@macrostrat/hyper\";\nimport {useAPIResult as $lw8jS$useAPIResult} from \"@macrostrat/ui-components\";\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\nvar $48680a4cd2abcbe4$exports = {};\n\n$parcel$export($48680a4cd2abcbe4$exports, \"SGPMeasurementsColumn\", () => $48680a4cd2abcbe4$export$c49cf57576706bab);\n\n\n\nvar $kIQUG = parcelRequire(\"kIQUG\");\n\nvar $wtIgl = parcelRequire(\"wtIgl\");\nfunction $48680a4cd2abcbe4$var$useSGPData({ col_id: col_id }) {\n const res = (0, $lw8jS$useAPIResult)(\"https://dev.macrostrat.org/api/pg/sgp_unit_matches\", {\n col_id: `eq.${col_id}`\n }, (d)=>d);\n return res;\n}\nfunction $48680a4cd2abcbe4$export$c49cf57576706bab({ columnID: columnID, color: color = \"magenta\" }) {\n const data = $48680a4cd2abcbe4$var$useSGPData({\n col_id: columnID\n });\n const { axisType: axisType, units: units } = (0, $wtIgl.useMacrostratColumnData)();\n const scale = (0, $wtIgl.useCompositeScale)();\n if (data == null || units == null || scale == null) return null;\n const data1 = $48680a4cd2abcbe4$var$prepareSGPData(data, scale, units, axisType);\n return (0, $lw8jS$macrostrathyper)((0, $kIQUG.BaseMeasurementsColumn), {\n data: data1,\n noteComponent: $48680a4cd2abcbe4$var$SGPSamplesNote,\n focusedNoteComponent: $48680a4cd2abcbe4$var$SGPSamplesNote\n });\n}\nfunction $48680a4cd2abcbe4$var$SGPSamplesNote(props) {\n const { note: note, focused: focused } = props;\n const sgp_samples = note?.data;\n if (sgp_samples == null || sgp_samples.length === 0) return null;\n return (0, $lw8jS$macrostrathyper)((0, $kIQUG.TruncatedList), {\n className: \"sgp-samples\",\n data: sgp_samples,\n itemRenderer: (p)=>(0, $lw8jS$macrostrathyper)(\"span\", p.data.name),\n maxItems: focused ? Infinity : 5\n });\n}\nfunction $48680a4cd2abcbe4$var$prepareSGPData(data, scale, units, axisType) {\n // Find matching units for samples\n const d1 = data.map((sample)=>{\n const data = sample.sgp_samples;\n if (data == null || data.length === 0) return null;\n const heightData = (0, $kIQUG.standardizeMeasurementHeight)({\n unit_id: sample.unit_id\n }, units, axisType);\n if (heightData == null) return null;\n data.sort((a, b)=>a.id - b.id);\n return {\n ...heightData,\n data: data,\n id: sample.unit_id\n };\n }).filter(Boolean);\n return (0, $kIQUG.groupNotesByPixelDistance)(d1, scale, axisType, 5);\n}\n\n\nexport {$48680a4cd2abcbe4$export$c49cf57576706bab as SGPMeasurementsColumn};\n//# sourceMappingURL=column-views.ec7cc7cc.js.map\n","import h from \"@macrostrat/hyper\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport {\n BaseMeasurementsColumn,\n groupNotesByPixelDistance,\n standardizeMeasurementHeight,\n TruncatedList,\n} from \"./base\";\nimport { UnitLong } from \"@macrostrat/api-types\";\nimport { ColumnAxisType } from \"@macrostrat/column-components\";\nimport {\n useCompositeScale,\n useMacrostratColumnData,\n} from \"../../data-provider\";\nimport { CompositeColumnScale } from \"../../prepare-units/composite-scale\";\n\nfunction useSGPData({ col_id }) {\n const res = useAPIResult(\n \"https://dev.macrostrat.org/api/pg/sgp_unit_matches\",\n {\n col_id: `eq.${col_id}`,\n },\n (d) => d,\n );\n return res;\n}\n\ninterface SGPSampleData {\n col_id: number;\n unit_id: number;\n sgp_samples: { name: string; id: number }[];\n}\n\nexport function SGPMeasurementsColumn({ columnID, color = \"magenta\" }) {\n const data: SGPSampleData[] | null = useSGPData({ col_id: columnID });\n const { axisType, units } = useMacrostratColumnData();\n const scale = useCompositeScale();\n\n if (data == null || units == null || scale == null) return null;\n\n const data1 = prepareSGPData(data, scale, units, axisType);\n\n return h(BaseMeasurementsColumn, {\n data: data1,\n noteComponent: SGPSamplesNote,\n focusedNoteComponent: SGPSamplesNote,\n });\n}\n\nfunction SGPSamplesNote(props) {\n const { note, focused } = props;\n const sgp_samples = note?.data;\n\n if (sgp_samples == null || sgp_samples.length === 0) return null;\n\n return h(TruncatedList, {\n className: \"sgp-samples\",\n data: sgp_samples,\n itemRenderer: (p) => h(\"span\", p.data.name),\n maxItems: focused ? Infinity : 5,\n });\n}\n\nfunction prepareSGPData(\n data: SGPSampleData[],\n scale: CompositeColumnScale,\n units: UnitLong[],\n axisType: ColumnAxisType,\n) {\n // Find matching units for samples\n const d1 = data\n .map((sample) => {\n const data = sample.sgp_samples;\n if (data == null || data.length === 0) return null;\n const heightData = standardizeMeasurementHeight(\n { unit_id: sample.unit_id },\n units,\n axisType,\n );\n if (heightData == null) return null;\n data.sort((a, b) => a.id - b.id);\n return {\n ...heightData,\n data,\n id: sample.unit_id,\n };\n })\n .filter(Boolean);\n\n return groupNotesByPixelDistance(d1, scale, axisType, 5);\n}\n"],"names":["$lw8jS$macrostrathyper","useAPIResult","$lw8jS$useAPIResult","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","Object","defineProperty","get","$48680a4cd2abcbe4$export$c49cf57576706bab","set","s","enumerable","configurable","$kIQUG","$wtIgl","columnID","color","data","$48680a4cd2abcbe4$var$useSGPData","col_id","d","axisType","units","useMacrostratColumnData","scale","useCompositeScale","data1","$48680a4cd2abcbe4$var$prepareSGPData","d1","map","sample","sgp_samples","length","heightData","standardizeMeasurementHeight","unit_id","sort","a","b","filter","Boolean","groupNotesByPixelDistance","BaseMeasurementsColumn","noteComponent","$48680a4cd2abcbe4$var$SGPSamplesNote","focusedNoteComponent","props","note","focused","TruncatedList","className","itemRenderer","p","name","maxItems","Infinity","SGPMeasurementsColumn"],"version":3,"file":"column-views.ec7cc7cc.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.5f3b0b04.js";import"./column-views.a16cd1f2.js";import{ColumnAxisType as e}from"@macrostrat/column-components";import{mergeAgeRanges as t}from"@macrostrat/stratigraphy-utils";var n=globalThis,a={},r={},o=n.parcelRequirea149;null==o&&((o=function(e){if(e in a)return a[e].exports;if(e in r){var t=r[e];delete r[e];var n={id:e,exports:{}};return a[e]=n,t.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){r[e]=t},n.parcelRequirea149=o),o.register;var l=o("iWhRv"),i=o("610tc");function s(t,n){console.log(n);let{mergeSections:a=l.MergeSectionsMode.OVERLAPPING,targetUnitHeight:r,...o}=n,s={axisType:e.AGE,targetUnitHeight:r,mergeSections:a,...o};if(0==t.length)return null;let u=t.map(e=>e.units).flat(),c=t.map(e=>e.columnID),{sections:_,totalHeight:p}=(0,i.prepareColumnUnits)(u,s);return{scaleInfo:{axisType:e.AGE,totalHeight:p,packages:_.map(e=>e.scaleInfo)},packages:_.map(t=>(function(t,n){let{units:a,t_age:r,b_age:o}=t;return{columnData:n.map(n=>{let r=a.filter(e=>e.col_id==n);return r.sort((e,t)=>e.t_age-t.t_age),{columnID:n,units:(0,i.preprocessUnits)({...t,units:r},e.AGE)}}),bestPixelScale:t.scaleInfo.pixelScale,t_age:r,b_age:o}})(t,c)),nColumns:c.length}}function u(e){let{columnData:n,b_age:a,t_age:r}=e,o=new Map;for(let e of n){let{units:t}=e;for(let n of t)null!=n.strat_name_id&&(o.has(n.strat_name_id)||o.set(n.strat_name_id,new Map),o.get(n.strat_name_id).set(e.columnID,n))}let l=[];for(let[e,a]of o){let r=n.map(e=>a.get(e.columnID)??null),o=r.filter(e=>null!=e),[i,s]=t(o.map(e=>[e.t_age,e.b_age]));o.length<=1||l.push({b_age:s,t_age:i,strat_name_id:e,strat_name_long:o[0].strat_name_long,units:r})}return l}function c(e){let{strat_name_long:t,strat_name_id:n,units:a}=e,r=[],o=null;for(let e=0;e<a.length;e++){let l=a[e];if(null==l){null!=o&&(r.push(o),o=null);continue}null==o?o={startCol:e,endCol:e,strat_name_id:n,strat_name_long:t,t_age:l.t_age,b_age:l.b_age,units:[]}:o.endCol=e,o.units.push(l)}return r}function _(e){return{col_id:e.properties.col_id,col_name:e.properties.col_name,project_id:e.properties.project_id}}export{s as buildCorrelationChartData,u as findLaterallyExtensiveUnits,c as splitStratIntoBoxes,_ as columnGeoJSONRecordToColumnIdentifier};
2
- //# sourceMappingURL=column-views.aae09aca.js.map
1
+ import"./column-views.dbb4a46b.js";import"./column-views.5fd6e11a.js";import{ColumnAxisType as e}from"@macrostrat/column-components";import{mergeAgeRanges as t}from"@macrostrat/stratigraphy-utils";var n=globalThis,a={},r={},o=n.parcelRequirea149;null==o&&((o=function(e){if(e in a)return a[e].exports;if(e in r){var t=r[e];delete r[e];var n={id:e,exports:{}};return a[e]=n,t.call(n.exports,n,n.exports),n.exports}var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(e,t){r[e]=t},n.parcelRequirea149=o),o.register;var l=o("iWhRv"),i=o("610tc");function s(t,n){console.log(n);let{mergeSections:a=l.MergeSectionsMode.OVERLAPPING,targetUnitHeight:r,...o}=n,s={axisType:e.AGE,targetUnitHeight:r,mergeSections:a,...o};if(0==t.length)return null;let u=t.map(e=>e.units).flat(),c=t.map(e=>e.columnID),{sections:_,totalHeight:p}=(0,i.prepareColumnUnits)(u,s);return{scaleInfo:{axisType:e.AGE,totalHeight:p,packages:_.map(e=>e.scaleInfo)},packages:_.map(t=>(function(t,n){let{units:a,t_age:r,b_age:o}=t;return{columnData:n.map(n=>{let r=a.filter(e=>e.col_id==n);return r.sort((e,t)=>e.t_age-t.t_age),{columnID:n,units:(0,i.preprocessUnits)({...t,units:r},e.AGE)}}),bestPixelScale:t.scaleInfo.pixelScale,t_age:r,b_age:o}})(t,c)),nColumns:c.length}}function u(e){let{columnData:n,b_age:a,t_age:r}=e,o=new Map;for(let e of n){let{units:t}=e;for(let n of t)null!=n.strat_name_id&&(o.has(n.strat_name_id)||o.set(n.strat_name_id,new Map),o.get(n.strat_name_id).set(e.columnID,n))}let l=[];for(let[e,a]of o){let r=n.map(e=>a.get(e.columnID)??null),o=r.filter(e=>null!=e),[i,s]=t(o.map(e=>[e.t_age,e.b_age]));o.length<=1||l.push({b_age:s,t_age:i,strat_name_id:e,strat_name_long:o[0].strat_name_long,units:r})}return l}function c(e){let{strat_name_long:t,strat_name_id:n,units:a}=e,r=[],o=null;for(let e=0;e<a.length;e++){let l=a[e];if(null==l){null!=o&&(r.push(o),o=null);continue}null==o?o={startCol:e,endCol:e,strat_name_id:n,strat_name_long:t,t_age:l.t_age,b_age:l.b_age,units:[]}:o.endCol=e,o.units.push(l)}return r}function _(e){return{col_id:e.properties.col_id,col_name:e.properties.col_name,project_id:e.properties.project_id}}export{s as buildCorrelationChartData,u as findLaterallyExtensiveUnits,c as splitStratIntoBoxes,_ as columnGeoJSONRecordToColumnIdentifier};
2
+ //# sourceMappingURL=column-views.eecdc727.js.map
@@ -1 +1 @@
1
- {"mappings":"A,M,6C,A,O,6C,A,Q,kB,C,K,+B,A,Q,kB,C,K,gC,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,E,SC0CO,SAAS,EACd,CAAqB,CACrB,CAAkC,EAElC,QAAQ,GAAG,CAAC,GACZ,GAAM,CAAA,cACJ,EAAgB,AAAA,EAAA,iBAAgB,CAAE,WAAW,CAAA,iBAC7C,CAAgB,CAChB,GAAG,EACJ,CAAG,EAEE,EAA6B,CACjC,SAAU,AAAA,EAAe,GAAG,CAC5B,iBAAA,EACA,cAAA,EACA,GAAG,CAAI,AACT,EAEA,GAAI,AAAkB,GAAlB,EAAQ,MAAM,CAChB,OAAO,KAIT,IAAM,EAAS,EAAQ,GAAG,CAAC,AAAC,GAAM,EAAE,KAAK,EAAE,IAAI,GAEzC,EAAY,EAAQ,GAAG,CAAC,AAAC,GAAM,EAAE,QAAQ,EAIzC,CAAA,SAAE,CAAQ,CAAA,YAAE,CAAW,CAAE,CAFT,AAAA,CAAA,EAAA,EAAA,kBAAiB,AAAjB,EAAmB,EAAQ,GAcjD,MAAO,CAAE,UAV0C,CACjD,SAAU,AAAA,EAAe,GAAG,CAC5B,YAAA,EACA,SAAU,EAAS,GAAG,CAAC,AAAC,GAAM,EAAE,SAAS,CAC3C,EAMoB,SAJH,EAAS,GAAG,CAAC,AAAC,GACtB,AAs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AG,AAAA,EACrB,EAAc,GAAG,CAAC,AAAC,GAAM,CAAC,EAAE,KAAK,CAAE,EAAE,KAAK,CAAC,EAEzC,CAAA,EAAc,MAAM,EAAI,GAE5B,EAAW,IAAI,CAAC,CACd,MAAA,EACA,MAAA,EACA,cAAA,EACA,gBAAiB,CAAa,CAAC,EAAE,CAAC,eAAe,CACjD,MAAA,CACF,EACF,CAEA,OAAO,CACT,CAEO,SAAS,EAAoB,CAAc,EAChD,GAAM,CAAA,gBAAE,CAAe,CAAA,cAAE,CAAa,CAAA,MAAE,CAAK,CAAE,CAAG,EAC5C,EAAwB,EAAE,CAC5B,EAA2B,KAC/B,IAAK,IAAI,EAAI,EAAG,EAAI,EAAM,MAAM,CAAE,IAAK,CACrC,IAAM,EAAO,CAAK,CAAC,EAAE,CACrB,GAAI,AAAQ,MAAR,EAAc,CACE,MAAd,IACF,EAAM,IAAI,CAAC,GACX,EAAa,MAEf,QACF,CACI,AAAc,MAAd,EACF,EAAa,CACX,SAAU,EACV,OAAQ,EACR,cAAA,EACA,gBAAA,EACA,MAAO,EAAK,KAAK,CACjB,MAAO,EAAK,KAAK,CACjB,MAAO,EAAE,AACX,EAEA,EAAW,MAAM,CAAG,EAEtB,EAAW,KAAK,CAAC,IAAI,CAAC,EACxB,CACA,OAAO,CACT,CA+BO,SAAS,EACd,CAAwB,EAExB,MAAO,CACL,OAAQ,EAAI,UAAU,CAAC,MAAM,CAC7B,SAAU,EAAI,UAAU,CAAC,QAAQ,CACjC,WAAY,EAAI,UAAU,CAAC,UAAU,AACvC,CACF,Q,K,yB,C,K,2B,C,K,mB,C,K,qC","sources":["<anon>","packages/column-views/src/correlation-chart/prepare-data.ts"],"sourcesContent":["import \"./column-views.5f3b0b04.js\";\nimport \"./column-views.a16cd1f2.js\";\nimport {ColumnAxisType as $kr6st$ColumnAxisType} from \"@macrostrat/column-components\";\nimport {mergeAgeRanges as $kr6st$mergeAgeRanges} from \"@macrostrat/stratigraphy-utils\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\nvar $iWhRv = parcelRequire(\"iWhRv\");\nvar $610tc = parcelRequire(\"610tc\");\n\nfunction $1f14b283fe089e83$export$7f21dc14b8199dc0(columns, settings) {\n console.log(settings);\n const { mergeSections: mergeSections = (0, $iWhRv.MergeSectionsMode).OVERLAPPING, targetUnitHeight: targetUnitHeight, ...rest } = settings;\n const opts = {\n axisType: (0, $kr6st$ColumnAxisType).AGE,\n targetUnitHeight: targetUnitHeight,\n mergeSections: mergeSections,\n ...rest\n };\n if (columns.length == 0) return null;\n // Flatten the units array to pretend that all units are in the same column\n const _units = columns.map((d)=>d.units).flat();\n const columnIDs = columns.map((d)=>d.columnID);\n const preparedUnits = (0, $610tc.prepareColumnUnits)(_units, opts);\n const { sections: sections, totalHeight: totalHeight } = preparedUnits;\n const scaleInfo = {\n axisType: (0, $kr6st$ColumnAxisType).AGE,\n totalHeight: totalHeight,\n packages: sections.map((d)=>d.scaleInfo)\n };\n const packages = sections.map((d)=>{\n return $1f14b283fe089e83$var$separateColumns(d, columnIDs);\n });\n return {\n scaleInfo: scaleInfo,\n packages: packages,\n nColumns: columnIDs.length\n };\n}\nfunction $1f14b283fe089e83$export$cc5d9b95e199a6de(pkg) {\n const { columnData: columnData, b_age: b_age, t_age: t_age } = pkg;\n // Group units by strat_name_id\n const unitIndex = new Map();\n for (const column of columnData){\n const { units: units } = column;\n for (const unit of units){\n if (unit.strat_name_id == null) continue;\n if (!unitIndex.has(unit.strat_name_id)) unitIndex.set(unit.strat_name_id, new Map());\n unitIndex.get(unit.strat_name_id).set(column.columnID, unit);\n }\n }\n // Prepare grouped units for rendering\n const unitGroups = [];\n for (const [strat_name_id, unitIndex0] of unitIndex){\n const units = columnData.map((d)=>unitIndex0.get(d.columnID) ?? null);\n const filteredUnits = units.filter((d)=>d != null);\n const [t_age, b_age] = (0, $kr6st$mergeAgeRanges)(filteredUnits.map((d)=>[\n d.t_age,\n d.b_age\n ]));\n if (filteredUnits.length <= 1) continue;\n unitGroups.push({\n b_age: b_age,\n t_age: t_age,\n strat_name_id: strat_name_id,\n strat_name_long: filteredUnits[0].strat_name_long,\n units: units\n });\n }\n return unitGroups;\n}\nfunction $1f14b283fe089e83$export$3e71a3125322d04b(pkg) {\n const { strat_name_long: strat_name_long, strat_name_id: strat_name_id, units: units } = pkg;\n const boxes = [];\n let currentBox = null;\n for(let i = 0; i < units.length; i++){\n const unit = units[i];\n if (unit == null) {\n if (currentBox != null) {\n boxes.push(currentBox);\n currentBox = null;\n }\n continue;\n }\n if (currentBox == null) currentBox = {\n startCol: i,\n endCol: i,\n strat_name_id: strat_name_id,\n strat_name_long: strat_name_long,\n t_age: unit.t_age,\n b_age: unit.b_age,\n units: []\n };\n else currentBox.endCol = i;\n currentBox.units.push(unit);\n }\n return boxes;\n}\nfunction $1f14b283fe089e83$var$separateColumns(pkg, columnIDs) {\n /** Separate columns by col_id */ const { units: units, t_age: t_age, b_age: b_age } = pkg;\n return {\n columnData: columnIDs.map((d)=>{\n const u1 = units.filter((unit)=>unit.col_id == d);\n u1.sort((a, b)=>a.t_age - b.t_age);\n return {\n columnID: d,\n // Ensure that the units correctly show overlap\n units: (0, $610tc.preprocessUnits)({\n ...pkg,\n units: u1\n }, (0, $kr6st$ColumnAxisType).AGE)\n };\n }),\n bestPixelScale: pkg.scaleInfo.pixelScale,\n t_age: t_age,\n b_age: b_age\n };\n}\nfunction $1f14b283fe089e83$export$63b33da9b6dd754c(col) {\n return {\n col_id: col.properties.col_id,\n col_name: col.properties.col_name,\n project_id: col.properties.project_id\n };\n}\n\n\nexport {$1f14b283fe089e83$export$7f21dc14b8199dc0 as buildCorrelationChartData, $1f14b283fe089e83$export$cc5d9b95e199a6de as findLaterallyExtensiveUnits, $1f14b283fe089e83$export$3e71a3125322d04b as splitStratIntoBoxes, $1f14b283fe089e83$export$63b33da9b6dd754c as columnGeoJSONRecordToColumnIdentifier};\n//# sourceMappingURL=column-views.aae09aca.js.map\n","import { CompositeStratigraphicScaleInfo } from \"../age-axis\";\nimport { ColumnAxisType } from \"@macrostrat/column-components\";\nimport { type ColumnGeoJSONRecord, UnitLong } from \"@macrostrat/api-types\";\nimport {\n MergeSectionsMode,\n PrepareColumnOptions,\n prepareColumnUnits,\n preprocessUnits,\n} from \"../prepare-units\";\nimport { mergeAgeRanges } from \"@macrostrat/stratigraphy-utils\";\nimport { PackageLayoutData } from \"../prepare-units/types\";\n\nexport interface ColumnIdentifier {\n col_id: number;\n col_name: string;\n project_id: number;\n}\n\ninterface ColumnData {\n columnID: number;\n units: UnitLong[];\n}\n\nexport interface CorrelationChartSettings extends Omit<\n PrepareColumnOptions,\n \"axisType\"\n> {\n targetUnitHeight?: number;\n}\n\nexport interface CorrelationChartData {\n packages: MultiColumnPackageData[];\n scaleInfo: CompositeStratigraphicScaleInfo;\n nColumns: number;\n}\n\nexport interface ColumnIdentifier {\n col_id: number;\n col_name: string;\n project_id: number;\n}\n\nexport function buildCorrelationChartData(\n columns: ColumnData[],\n settings: CorrelationChartSettings,\n): CorrelationChartData {\n console.log(settings);\n const {\n mergeSections = MergeSectionsMode.OVERLAPPING,\n targetUnitHeight,\n ...rest\n } = settings;\n\n const opts: PrepareColumnOptions = {\n axisType: ColumnAxisType.AGE,\n targetUnitHeight,\n mergeSections,\n ...rest,\n };\n\n if (columns.length == 0) {\n return null;\n }\n\n // Flatten the units array to pretend that all units are in the same column\n const _units = columns.map((d) => d.units).flat();\n\n const columnIDs = columns.map((d) => d.columnID);\n\n const preparedUnits = prepareColumnUnits(_units, opts);\n\n const { sections, totalHeight } = preparedUnits;\n\n const scaleInfo: CompositeStratigraphicScaleInfo = {\n axisType: ColumnAxisType.AGE,\n totalHeight,\n packages: sections.map((d) => d.scaleInfo),\n };\n\n const packages = sections.map((d) => {\n return separateColumns(d, columnIDs);\n });\n\n return { scaleInfo, packages, nColumns: columnIDs.length };\n}\n\ninterface UnitGroup {\n b_age: number;\n t_age: number;\n strat_name_id: number;\n strat_name_long: string;\n units: (UnitLong | null)[];\n}\n\nexport interface UnitGroupBox extends UnitGroup {\n units: UnitLong[];\n startCol: number;\n endCol: number;\n}\n\ninterface ColumnExt {\n columnID: number;\n units: UnitLong[];\n}\n\ninterface MultiColumnPackageData {\n columnData: ColumnExt[];\n bestPixelScale?: number;\n b_age: number;\n t_age: number;\n}\n\nexport function findLaterallyExtensiveUnits(\n pkg: MultiColumnPackageData,\n): UnitGroup[] {\n const { columnData, b_age, t_age } = pkg;\n // Group units by strat_name_id\n const unitIndex = new Map<number, Map<number, UnitLong>>();\n for (const column of columnData) {\n const { units } = column;\n for (const unit of units) {\n if (unit.strat_name_id == null) continue;\n if (!unitIndex.has(unit.strat_name_id)) {\n unitIndex.set(unit.strat_name_id, new Map());\n }\n unitIndex.get(unit.strat_name_id).set(column.columnID, unit);\n }\n }\n\n // Prepare grouped units for rendering\n const unitGroups: UnitGroup[] = [];\n for (const [strat_name_id, unitIndex0] of unitIndex) {\n const units = columnData.map((d) => unitIndex0.get(d.columnID) ?? null);\n const filteredUnits = units.filter((d) => d != null);\n const [t_age, b_age] = mergeAgeRanges(\n filteredUnits.map((d) => [d.t_age, d.b_age]),\n );\n if (filteredUnits.length <= 1) continue;\n\n unitGroups.push({\n b_age,\n t_age,\n strat_name_id,\n strat_name_long: filteredUnits[0].strat_name_long,\n units,\n });\n }\n\n return unitGroups;\n}\n\nexport function splitStratIntoBoxes(pkg: UnitGroup): UnitGroupBox[] {\n const { strat_name_long, strat_name_id, units } = pkg;\n const boxes: UnitGroupBox[] = [];\n let currentBox: UnitGroupBox = null;\n for (let i = 0; i < units.length; i++) {\n const unit = units[i];\n if (unit == null) {\n if (currentBox != null) {\n boxes.push(currentBox);\n currentBox = null;\n }\n continue;\n }\n if (currentBox == null) {\n currentBox = {\n startCol: i,\n endCol: i,\n strat_name_id,\n strat_name_long,\n t_age: unit.t_age,\n b_age: unit.b_age,\n units: [],\n };\n } else {\n currentBox.endCol = i;\n }\n currentBox.units.push(unit);\n }\n return boxes;\n}\n\nfunction separateColumns(\n pkg: PackageLayoutData,\n columnIDs: number[],\n): MultiColumnPackageData {\n /** Separate columns by col_id */\n const { units, t_age, b_age } = pkg;\n\n return {\n columnData: columnIDs.map((d) => {\n const u1 = units.filter((unit) => unit.col_id == d);\n u1.sort((a, b) => a.t_age - b.t_age);\n return {\n columnID: d,\n // Ensure that the units correctly show overlap\n units: preprocessUnits(\n {\n ...pkg,\n units: u1,\n },\n ColumnAxisType.AGE,\n ),\n };\n }),\n bestPixelScale: pkg.scaleInfo.pixelScale,\n t_age,\n b_age,\n };\n}\n\nexport function columnGeoJSONRecordToColumnIdentifier(\n col: ColumnGeoJSONRecord,\n): ColumnIdentifier {\n return {\n col_id: col.properties.col_id,\n col_name: col.properties.col_name,\n project_id: col.properties.project_id,\n };\n}\n"],"names":["ColumnAxisType","$kr6st$ColumnAxisType","mergeAgeRanges","$kr6st$mergeAgeRanges","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$iWhRv","$610tc","$1f14b283fe089e83$export$7f21dc14b8199dc0","columns","settings","console","log","mergeSections","MergeSectionsMode","OVERLAPPING","targetUnitHeight","rest","opts","axisType","AGE","length","_units","map","d","units","flat","columnIDs","columnID","sections","totalHeight","prepareColumnUnits","scaleInfo","packages","$1f14b283fe089e83$var$separateColumns","pkg","t_age","b_age","columnData","u1","filter","unit","col_id","sort","a","b","preprocessUnits","bestPixelScale","pixelScale","nColumns","$1f14b283fe089e83$export$cc5d9b95e199a6de","unitIndex","Map","column","strat_name_id","has","set","get","unitGroups","unitIndex0","filteredUnits","push","strat_name_long","$1f14b283fe089e83$export$3e71a3125322d04b","boxes","currentBox","i","startCol","endCol","$1f14b283fe089e83$export$63b33da9b6dd754c","col","properties","col_name","project_id","buildCorrelationChartData","findLaterallyExtensiveUnits","splitStratIntoBoxes","columnGeoJSONRecordToColumnIdentifier"],"version":3,"file":"column-views.aae09aca.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,M,6C,A,O,6C,A,Q,kB,C,K,+B,A,Q,kB,C,K,gC,C,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,S,E,E,SC0CO,SAAS,EACd,CAAqB,CACrB,CAAkC,EAElC,QAAQ,GAAG,CAAC,GACZ,GAAM,CAAA,cACJ,EAAgB,AAAA,EAAA,iBAAgB,CAAE,WAAW,CAAA,iBAC7C,CAAgB,CAChB,GAAG,EACJ,CAAG,EAEE,EAA6B,CACjC,SAAU,AAAA,EAAe,GAAG,CAC5B,iBAAA,EACA,cAAA,EACA,GAAG,CAAI,AACT,EAEA,GAAI,AAAkB,GAAlB,EAAQ,MAAM,CAChB,OAAO,KAIT,IAAM,EAAS,EAAQ,GAAG,CAAC,AAAC,GAAM,EAAE,KAAK,EAAE,IAAI,GAEzC,EAAY,EAAQ,GAAG,CAAC,AAAC,GAAM,EAAE,Q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UAAU,CAAC,UAAU,AACvC,CACF,Q,K,yB,C,K,2B,C,K,mB,C,K,qC","sources":["<anon>","packages/column-views/src/correlation-chart/prepare-data.ts"],"sourcesContent":["import \"./column-views.dbb4a46b.js\";\nimport \"./column-views.5fd6e11a.js\";\nimport {ColumnAxisType as $kr6st$ColumnAxisType} from \"@macrostrat/column-components\";\nimport {mergeAgeRanges as $kr6st$mergeAgeRanges} from \"@macrostrat/stratigraphy-utils\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\nvar $iWhRv = parcelRequire(\"iWhRv\");\nvar $610tc = parcelRequire(\"610tc\");\n\nfunction $1f14b283fe089e83$export$7f21dc14b8199dc0(columns, settings) {\n console.log(settings);\n const { mergeSections: mergeSections = (0, $iWhRv.MergeSectionsMode).OVERLAPPING, targetUnitHeight: targetUnitHeight, ...rest } = settings;\n const opts = {\n axisType: (0, $kr6st$ColumnAxisType).AGE,\n targetUnitHeight: targetUnitHeight,\n mergeSections: mergeSections,\n ...rest\n };\n if (columns.length == 0) return null;\n // Flatten the units array to pretend that all units are in the same column\n const _units = columns.map((d)=>d.units).flat();\n const columnIDs = columns.map((d)=>d.columnID);\n const preparedUnits = (0, $610tc.prepareColumnUnits)(_units, opts);\n const { sections: sections, totalHeight: totalHeight } = preparedUnits;\n const scaleInfo = {\n axisType: (0, $kr6st$ColumnAxisType).AGE,\n totalHeight: totalHeight,\n packages: sections.map((d)=>d.scaleInfo)\n };\n const packages = sections.map((d)=>{\n return $1f14b283fe089e83$var$separateColumns(d, columnIDs);\n });\n return {\n scaleInfo: scaleInfo,\n packages: packages,\n nColumns: columnIDs.length\n };\n}\nfunction $1f14b283fe089e83$export$cc5d9b95e199a6de(pkg) {\n const { columnData: columnData, b_age: b_age, t_age: t_age } = pkg;\n // Group units by strat_name_id\n const unitIndex = new Map();\n for (const column of columnData){\n const { units: units } = column;\n for (const unit of units){\n if (unit.strat_name_id == null) continue;\n if (!unitIndex.has(unit.strat_name_id)) unitIndex.set(unit.strat_name_id, new Map());\n unitIndex.get(unit.strat_name_id).set(column.columnID, unit);\n }\n }\n // Prepare grouped units for rendering\n const unitGroups = [];\n for (const [strat_name_id, unitIndex0] of unitIndex){\n const units = columnData.map((d)=>unitIndex0.get(d.columnID) ?? null);\n const filteredUnits = units.filter((d)=>d != null);\n const [t_age, b_age] = (0, $kr6st$mergeAgeRanges)(filteredUnits.map((d)=>[\n d.t_age,\n d.b_age\n ]));\n if (filteredUnits.length <= 1) continue;\n unitGroups.push({\n b_age: b_age,\n t_age: t_age,\n strat_name_id: strat_name_id,\n strat_name_long: filteredUnits[0].strat_name_long,\n units: units\n });\n }\n return unitGroups;\n}\nfunction $1f14b283fe089e83$export$3e71a3125322d04b(pkg) {\n const { strat_name_long: strat_name_long, strat_name_id: strat_name_id, units: units } = pkg;\n const boxes = [];\n let currentBox = null;\n for(let i = 0; i < units.length; i++){\n const unit = units[i];\n if (unit == null) {\n if (currentBox != null) {\n boxes.push(currentBox);\n currentBox = null;\n }\n continue;\n }\n if (currentBox == null) currentBox = {\n startCol: i,\n endCol: i,\n strat_name_id: strat_name_id,\n strat_name_long: strat_name_long,\n t_age: unit.t_age,\n b_age: unit.b_age,\n units: []\n };\n else currentBox.endCol = i;\n currentBox.units.push(unit);\n }\n return boxes;\n}\nfunction $1f14b283fe089e83$var$separateColumns(pkg, columnIDs) {\n /** Separate columns by col_id */ const { units: units, t_age: t_age, b_age: b_age } = pkg;\n return {\n columnData: columnIDs.map((d)=>{\n const u1 = units.filter((unit)=>unit.col_id == d);\n u1.sort((a, b)=>a.t_age - b.t_age);\n return {\n columnID: d,\n // Ensure that the units correctly show overlap\n units: (0, $610tc.preprocessUnits)({\n ...pkg,\n units: u1\n }, (0, $kr6st$ColumnAxisType).AGE)\n };\n }),\n bestPixelScale: pkg.scaleInfo.pixelScale,\n t_age: t_age,\n b_age: b_age\n };\n}\nfunction $1f14b283fe089e83$export$63b33da9b6dd754c(col) {\n return {\n col_id: col.properties.col_id,\n col_name: col.properties.col_name,\n project_id: col.properties.project_id\n };\n}\n\n\nexport {$1f14b283fe089e83$export$7f21dc14b8199dc0 as buildCorrelationChartData, $1f14b283fe089e83$export$cc5d9b95e199a6de as findLaterallyExtensiveUnits, $1f14b283fe089e83$export$3e71a3125322d04b as splitStratIntoBoxes, $1f14b283fe089e83$export$63b33da9b6dd754c as columnGeoJSONRecordToColumnIdentifier};\n//# sourceMappingURL=column-views.eecdc727.js.map\n","import { CompositeStratigraphicScaleInfo } from \"../age-axis\";\nimport { ColumnAxisType } from \"@macrostrat/column-components\";\nimport { type ColumnGeoJSONRecord, UnitLong } from \"@macrostrat/api-types\";\nimport {\n MergeSectionsMode,\n PrepareColumnOptions,\n prepareColumnUnits,\n preprocessUnits,\n} from \"../prepare-units\";\nimport { mergeAgeRanges } from \"@macrostrat/stratigraphy-utils\";\nimport { PackageLayoutData } from \"../prepare-units/types\";\n\nexport interface ColumnIdentifier {\n col_id: number;\n col_name: string;\n project_id: number;\n}\n\ninterface ColumnData {\n columnID: number;\n units: UnitLong[];\n}\n\nexport interface CorrelationChartSettings extends Omit<\n PrepareColumnOptions,\n \"axisType\"\n> {\n targetUnitHeight?: number;\n}\n\nexport interface CorrelationChartData {\n packages: MultiColumnPackageData[];\n scaleInfo: CompositeStratigraphicScaleInfo;\n nColumns: number;\n}\n\nexport interface ColumnIdentifier {\n col_id: number;\n col_name: string;\n project_id: number;\n}\n\nexport function buildCorrelationChartData(\n columns: ColumnData[],\n settings: CorrelationChartSettings,\n): CorrelationChartData {\n console.log(settings);\n const {\n mergeSections = MergeSectionsMode.OVERLAPPING,\n targetUnitHeight,\n ...rest\n } = settings;\n\n const opts: PrepareColumnOptions = {\n axisType: ColumnAxisType.AGE,\n targetUnitHeight,\n mergeSections,\n ...rest,\n };\n\n if (columns.length == 0) {\n return null;\n }\n\n // Flatten the units array to pretend that all units are in the same column\n const _units = columns.map((d) => d.units).flat();\n\n const columnIDs = columns.map((d) => d.columnID);\n\n const preparedUnits = prepareColumnUnits(_units, opts);\n\n const { sections, totalHeight } = preparedUnits;\n\n const scaleInfo: CompositeStratigraphicScaleInfo = {\n axisType: ColumnAxisType.AGE,\n totalHeight,\n packages: sections.map((d) => d.scaleInfo),\n };\n\n const packages = sections.map((d) => {\n return separateColumns(d, columnIDs);\n });\n\n return { scaleInfo, packages, nColumns: columnIDs.length };\n}\n\ninterface UnitGroup {\n b_age: number;\n t_age: number;\n strat_name_id: number;\n strat_name_long: string;\n units: (UnitLong | null)[];\n}\n\nexport interface UnitGroupBox extends UnitGroup {\n units: UnitLong[];\n startCol: number;\n endCol: number;\n}\n\ninterface ColumnExt {\n columnID: number;\n units: UnitLong[];\n}\n\ninterface MultiColumnPackageData {\n columnData: ColumnExt[];\n bestPixelScale?: number;\n b_age: number;\n t_age: number;\n}\n\nexport function findLaterallyExtensiveUnits(\n pkg: MultiColumnPackageData,\n): UnitGroup[] {\n const { columnData, b_age, t_age } = pkg;\n // Group units by strat_name_id\n const unitIndex = new Map<number, Map<number, UnitLong>>();\n for (const column of columnData) {\n const { units } = column;\n for (const unit of units) {\n if (unit.strat_name_id == null) continue;\n if (!unitIndex.has(unit.strat_name_id)) {\n unitIndex.set(unit.strat_name_id, new Map());\n }\n unitIndex.get(unit.strat_name_id).set(column.columnID, unit);\n }\n }\n\n // Prepare grouped units for rendering\n const unitGroups: UnitGroup[] = [];\n for (const [strat_name_id, unitIndex0] of unitIndex) {\n const units = columnData.map((d) => unitIndex0.get(d.columnID) ?? null);\n const filteredUnits = units.filter((d) => d != null);\n const [t_age, b_age] = mergeAgeRanges(\n filteredUnits.map((d) => [d.t_age, d.b_age]),\n );\n if (filteredUnits.length <= 1) continue;\n\n unitGroups.push({\n b_age,\n t_age,\n strat_name_id,\n strat_name_long: filteredUnits[0].strat_name_long,\n units,\n });\n }\n\n return unitGroups;\n}\n\nexport function splitStratIntoBoxes(pkg: UnitGroup): UnitGroupBox[] {\n const { strat_name_long, strat_name_id, units } = pkg;\n const boxes: UnitGroupBox[] = [];\n let currentBox: UnitGroupBox = null;\n for (let i = 0; i < units.length; i++) {\n const unit = units[i];\n if (unit == null) {\n if (currentBox != null) {\n boxes.push(currentBox);\n currentBox = null;\n }\n continue;\n }\n if (currentBox == null) {\n currentBox = {\n startCol: i,\n endCol: i,\n strat_name_id,\n strat_name_long,\n t_age: unit.t_age,\n b_age: unit.b_age,\n units: [],\n };\n } else {\n currentBox.endCol = i;\n }\n currentBox.units.push(unit);\n }\n return boxes;\n}\n\nfunction separateColumns(\n pkg: PackageLayoutData,\n columnIDs: number[],\n): MultiColumnPackageData {\n /** Separate columns by col_id */\n const { units, t_age, b_age } = pkg;\n\n return {\n columnData: columnIDs.map((d) => {\n const u1 = units.filter((unit) => unit.col_id == d);\n u1.sort((a, b) => a.t_age - b.t_age);\n return {\n columnID: d,\n // Ensure that the units correctly show overlap\n units: preprocessUnits(\n {\n ...pkg,\n units: u1,\n },\n ColumnAxisType.AGE,\n ),\n };\n }),\n bestPixelScale: pkg.scaleInfo.pixelScale,\n t_age,\n b_age,\n };\n}\n\nexport function columnGeoJSONRecordToColumnIdentifier(\n col: ColumnGeoJSONRecord,\n): ColumnIdentifier {\n return {\n col_id: col.properties.col_id,\n col_name: col.properties.col_name,\n project_id: col.properties.project_id,\n };\n}\n"],"names":["ColumnAxisType","$kr6st$ColumnAxisType","mergeAgeRanges","$kr6st$mergeAgeRanges","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$iWhRv","$610tc","$1f14b283fe089e83$export$7f21dc14b8199dc0","columns","settings","console","log","mergeSections","MergeSectionsMode","OVERLAPPING","targetUnitHeight","rest","opts","axisType","AGE","length","_units","map","d","units","flat","columnIDs","columnID","sections","totalHeight","prepareColumnUnits","scaleInfo","packages","$1f14b283fe089e83$var$separateColumns","pkg","t_age","b_age","columnData","u1","filter","unit","col_id","sort","a","b","preprocessUnits","bestPixelScale","pixelScale","nColumns","$1f14b283fe089e83$export$cc5d9b95e199a6de","unitIndex","Map","column","strat_name_id","has","set","get","unitGroups","unitIndex0","filteredUnits","push","strat_name_long","$1f14b283fe089e83$export$3e71a3125322d04b","boxes","currentBox","i","startCol","endCol","$1f14b283fe089e83$export$63b33da9b6dd754c","col","properties","col_name","project_id","buildCorrelationChartData","findLaterallyExtensiveUnits","splitStratIntoBoxes","columnGeoJSONRecordToColumnIdentifier"],"version":3,"file":"column-views.eecdc727.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- import"./column-views.6a9da051.js";import"./column-views.0beae29d.js";import"./column-views.a08b0c9f.js";import e from"@macrostrat/hyper";import{Popover as t}from"@blueprintjs/core";function o(e,t,o,i){Object.defineProperty(e,t,{get:o,set:i,enumerable:!0,configurable:!0})}var i=globalThis,n={},r={},l=i.parcelRequirea149;null==l&&((l=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},i.parcelRequirea149=l),l.register;var a={};o(a,"UnitDetailsPopover",()=>d),o(a,"UnitSelectionPopover",()=>f);var s=l("bHbph"),c=l("5SO8b"),p=l("iYfAq");let u=e.styled(s&&s.__esModule?s.default:s);function d({style:e,children:o,viewportPadding:i=20}){let n=u(v,o);return u("div.popover-main",{style:e},u(t,{content:n,isOpen:!0,usePortal:!1,position:"right",modifiers:{preventOverflow:{options:{padding:i}}}},u("span.popover-target")))}function v({children:e}){return u("div",{onClick(e){e.stopPropagation()}},e)}function f(){let e=(0,c.useSelectedUnit)(),t=(0,c.useUnitSelectionStore)(e=>e.onUnitSelected),o=(0,c.useUnitSelectionStore)(e=>e.overlayPosition);return null==e?null:u("div.unit-popover-container",u(d,{style:{position:"absolute",top:o?.y??0,width:o?.width??100,left:o?.x??0,height:o?.height??100}},u(p.UnitDetailsPanel,{unit:e,showLithologyProportions:!0,className:"legend-panel",onSelectUnit:e=>{console.log("Selected unit in popover:",e),t(e,null,null)}})))}export{d as UnitDetailsPopover,f as UnitSelectionPopover};
2
- //# sourceMappingURL=column-views.d08e4328.js.map
1
+ import"./column-views.6a9da051.js";import"./column-views.0beae29d.js";import"./column-views.6c7f9245.js";import e from"@macrostrat/hyper";import{Popover as t}from"@blueprintjs/core";function o(e,t,o,i){Object.defineProperty(e,t,{get:o,set:i,enumerable:!0,configurable:!0})}var i=globalThis,n={},r={},l=i.parcelRequirea149;null==l&&((l=function(e){if(e in n)return n[e].exports;if(e in r){var t=r[e];delete r[e];var o={id:e,exports:{}};return n[e]=o,t.call(o.exports,o,o.exports),o.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){r[e]=t},i.parcelRequirea149=l),l.register;var a={};o(a,"UnitDetailsPopover",()=>d),o(a,"UnitSelectionPopover",()=>f);var s=l("bHbph"),c=l("5SO8b"),p=l("iYfAq");let u=e.styled(s&&s.__esModule?s.default:s);function d({style:e,children:o,viewportPadding:i=20}){let n=u(v,o);return u("div.popover-main",{style:e},u(t,{content:n,isOpen:!0,usePortal:!1,position:"right",modifiers:{preventOverflow:{options:{padding:i}}}},u("span.popover-target")))}function v({children:e}){return u("div",{onClick(e){e.stopPropagation()}},e)}function f(){let e=(0,c.useSelectedUnit)(),t=(0,c.useUnitSelectionStore)(e=>e.onUnitSelected),o=(0,c.useUnitSelectionStore)(e=>e.overlayPosition);return null==e?null:u("div.unit-popover-container",u(d,{style:{position:"absolute",top:o?.y??0,width:o?.width??100,left:o?.x??0,height:o?.height??100}},u(p.UnitDetailsPanel,{unit:e,showLithologyProportions:!0,className:"legend-panel",onSelectUnit:e=>{console.log("Selected unit in popover:",e),t(e,null,null)}})))}export{d as UnitDetailsPopover,f as UnitSelectionPopover};
2
+ //# sourceMappingURL=column-views.f577d065.js.map