@nasa-terra/components 0.0.52 → 0.0.53

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 (395) hide show
  1. package/cdn/assets/data-subsetter/download_subset_files.py.txt +66 -0
  2. package/cdn/chunks/{chunk.AZDOQAD2.js → chunk.223WZP6H.js} +23 -6
  3. package/cdn/chunks/{chunk.XU3NXPIM.js → chunk.23M4SIVO.js} +1 -1
  4. package/cdn/chunks/{chunk.WA7VSQ63.js → chunk.25HVLP5F.js} +3 -3
  5. package/cdn/chunks/{chunk.CUGOTRF4.js → chunk.2TPQ7A7J.js} +18 -5
  6. package/cdn/chunks/chunk.2UDWV64G.js +269 -0
  7. package/cdn/chunks/{chunk.3C36QKV5.js → chunk.32W6J6AF.js} +1 -1
  8. package/cdn/chunks/{chunk.43R5EAVL.js → chunk.3EMZ7G5B.js} +1 -1
  9. package/cdn/chunks/chunk.3R6XYEOH.js +11 -0
  10. package/{dist/chunks/chunk.GUGDC67O.js → cdn/chunks/chunk.4YQZGKJ7.js} +1 -1
  11. package/cdn/chunks/{chunk.6NEMJOXS.js → chunk.5BO2XAMO.js} +4 -4
  12. package/{dist/chunks/chunk.E7WQN374.js → cdn/chunks/chunk.5DKQRBZN.js} +1 -1
  13. package/cdn/chunks/{chunk.6QZW2ION.js → chunk.5IE6WY2F.js} +1 -1
  14. package/cdn/chunks/{chunk.UR52WPUB.js → chunk.66O6GDYQ.js} +9 -9
  15. package/cdn/chunks/{chunk.YNUC7HOB.js → chunk.6HMN7UIZ.js} +1 -1
  16. package/cdn/chunks/chunk.6OAPBJRP.js +49 -0
  17. package/cdn/chunks/{chunk.QIVBQSS7.js → chunk.6RS64LSV.js} +11 -11
  18. package/cdn/chunks/chunk.7LR3A5ZW.js +77 -0
  19. package/{dist/chunks/chunk.H6VZTFOA.js → cdn/chunks/chunk.7S5AAIY4.js} +1 -1
  20. package/{dist/chunks/chunk.CVHBTAL2.js → cdn/chunks/chunk.AOKWX7Z7.js} +1 -1
  21. package/{dist/chunks/chunk.E2A2V2YS.js → cdn/chunks/chunk.AVVGDACI.js} +1 -1
  22. package/cdn/chunks/{chunk.KQ335BKK.js → chunk.AZZ2NMUW.js} +1 -1
  23. package/{dist/chunks/chunk.3REGQAFA.js → cdn/chunks/chunk.B44THGJN.js} +1 -1
  24. package/cdn/chunks/{chunk.M7Y4QNCN.js → chunk.B6YTTGSP.js} +1 -1
  25. package/{dist/chunks/chunk.BGIZ44PS.js → cdn/chunks/chunk.C3ZO2T4M.js} +1 -1
  26. package/cdn/chunks/chunk.CMFROAGD.js +11 -0
  27. package/cdn/chunks/chunk.CPHER7LT.js +61 -0
  28. package/cdn/chunks/{chunk.ALXMBVVZ.js → chunk.DPC5A37S.js} +1 -1
  29. package/cdn/chunks/{chunk.6H77QHJW.js → chunk.DRO43W2Q.js} +1 -1
  30. package/cdn/chunks/{chunk.VAWFQPRW.js → chunk.DXUHDNR2.js} +1 -1
  31. package/cdn/chunks/{chunk.UVCDVWWN.js → chunk.ECXWQIDQ.js} +1 -1
  32. package/cdn/chunks/{chunk.YIABHSHN.js → chunk.EZMKGB3F.js} +5 -2
  33. package/cdn/chunks/{chunk.K6GAF43H.js → chunk.FCGFGTMF.js} +1 -1
  34. package/cdn/chunks/{chunk.6IMVZQLW.js → chunk.FOR62X7R.js} +2 -2
  35. package/cdn/chunks/{chunk.6LGRNEZ7.js → chunk.FS3ZYOYJ.js} +1 -1
  36. package/cdn/chunks/{chunk.LOCO37M5.js → chunk.FVNQDVSU.js} +438 -438
  37. package/cdn/chunks/chunk.FYWRHDMM.js +1314 -0
  38. package/cdn/chunks/{chunk.XO3SOVHY.js → chunk.G3K475WP.js} +1 -1
  39. package/cdn/chunks/{chunk.TJW5I73A.js → chunk.G6DIOURT.js} +1 -1
  40. package/{dist/chunks/chunk.MWJRQKMV.js → cdn/chunks/chunk.GQZQZ2HS.js} +1 -1
  41. package/{dist/chunks/chunk.ETRG47HH.js → cdn/chunks/chunk.HDUTNK76.js} +1 -1
  42. package/cdn/chunks/chunk.HWY63TSF.js +27 -0
  43. package/{dist/chunks/chunk.WMLL6DYO.js → cdn/chunks/chunk.I5WLJ5L3.js} +1 -1
  44. package/cdn/chunks/{chunk.VRGU3JD2.js → chunk.IR66XQLB.js} +11 -11
  45. package/cdn/chunks/chunk.IW5LSMO4.js +928 -0
  46. package/cdn/chunks/chunk.IX3FU7LW.js +21 -0
  47. package/cdn/chunks/chunk.K5CSW352.js +418 -0
  48. package/{dist/chunks/chunk.RW6R4LFF.js → cdn/chunks/chunk.KMFGKZ5A.js} +1 -1
  49. package/cdn/chunks/{chunk.YWXZHRQQ.js → chunk.KX3Z3J5J.js} +1 -1
  50. package/cdn/chunks/{chunk.TKZC2SRM.js → chunk.L7N566HD.js} +1 -1
  51. package/{dist/chunks/chunk.KMNSIF7V.js → cdn/chunks/chunk.LCPWWHRW.js} +1 -1
  52. package/cdn/chunks/chunk.LIGYFBVJ.js +21 -0
  53. package/{dist/chunks/chunk.ESISTPRD.js → cdn/chunks/chunk.MJOS7DJT.js} +1 -1
  54. package/cdn/chunks/{chunk.56BIFKWQ.js → chunk.ODSJ642O.js} +9 -9
  55. package/cdn/chunks/{chunk.4UYNOT7W.js → chunk.P5PLRHF4.js} +1 -1
  56. package/{dist/chunks/chunk.EM2KEB67.js → cdn/chunks/chunk.P7YVDGTI.js} +1 -1
  57. package/cdn/chunks/{chunk.5NU43HNV.js → chunk.PNYTGKX5.js} +1 -1
  58. package/cdn/chunks/{chunk.XHHFBPQM.js → chunk.PSAJO4PE.js} +8 -7
  59. package/cdn/chunks/{chunk.NCUMG4CT.js → chunk.PYENVYVD.js} +1 -1
  60. package/cdn/chunks/{chunk.4L2C3E3Z.js → chunk.QCGNAB7F.js} +1 -1
  61. package/cdn/chunks/chunk.QIVU3UVU.js +150 -0
  62. package/cdn/chunks/{chunk.KHIKTIEM.js → chunk.QLE3NTPL.js} +11 -11
  63. package/cdn/chunks/{chunk.7ZVIGV6V.js → chunk.R24K6QI4.js} +17 -9
  64. package/cdn/chunks/chunk.SF6MBAEP.js +20 -0
  65. package/cdn/chunks/{chunk.TEUZXQBU.js → chunk.SFG6BGI6.js} +4 -4
  66. package/cdn/chunks/{chunk.2UNF3BIO.js → chunk.SRTZLLQ5.js} +10 -10
  67. package/cdn/chunks/{chunk.H5LB4MBT.js → chunk.SSTISPFD.js} +1 -1
  68. package/cdn/chunks/{chunk.IQ7B6HFH.js → chunk.SXNVHR5M.js} +1 -1
  69. package/cdn/chunks/{chunk.SZAZG4YK.js → chunk.U3NYXUF6.js} +1 -1
  70. package/{dist/chunks/chunk.7KC6YXWL.js → cdn/chunks/chunk.UA5HHAYZ.js} +1 -1
  71. package/cdn/chunks/chunk.UBW72CYZ.js +11 -0
  72. package/cdn/chunks/{chunk.JE2FCOKF.js → chunk.UKQCOWLU.js} +1 -1
  73. package/{dist/chunks/chunk.775IHQR2.js → cdn/chunks/chunk.UOCDT7HQ.js} +13 -13
  74. package/cdn/chunks/{chunk.2NCB6JXM.js → chunk.VE5TVT6L.js} +1 -1
  75. package/cdn/chunks/{chunk.PNDWOMP6.js → chunk.VH6TLJG7.js} +2 -2
  76. package/cdn/chunks/{chunk.YCRGAL67.js → chunk.VZ3MBFKG.js} +1 -1
  77. package/cdn/chunks/{chunk.WRON76NZ.js → chunk.XAJZNITQ.js} +1 -1
  78. package/{dist/chunks/chunk.QUYMT5VP.js → cdn/chunks/chunk.XQK25A5Y.js} +1 -1
  79. package/cdn/chunks/{chunk.X2ZY3YLL.js → chunk.XUPAIJOR.js} +1 -1
  80. package/cdn/chunks/{chunk.H7IOI7PF.js → chunk.XYM7DLPS.js} +9 -9
  81. package/cdn/chunks/{chunk.ZLY7XE2R.js → chunk.YIPEL4RB.js} +1 -1
  82. package/{dist/chunks/chunk.S3TUAB7V.js → cdn/chunks/chunk.YKNGZO6V.js} +1 -1
  83. package/cdn/chunks/{chunk.BUKXWTWP.js → chunk.YTH6FKWR.js} +1 -1
  84. package/cdn/chunks/{chunk.4OS3WNGB.js → chunk.ZQDMMP6X.js} +34 -77
  85. package/cdn/components/accordion/accordion.component.d.ts +35 -0
  86. package/cdn/components/accordion/accordion.component.js +21 -0
  87. package/cdn/components/accordion/accordion.d.ts +8 -0
  88. package/cdn/components/accordion/accordion.js +22 -0
  89. package/cdn/components/accordion/accordion.styles.d.ts +2 -0
  90. package/cdn/components/accordion/accordion.styles.js +9 -0
  91. package/cdn/components/alert/alert.component.d.ts +74 -0
  92. package/cdn/components/alert/alert.component.js +16 -0
  93. package/cdn/components/alert/alert.d.ts +8 -0
  94. package/cdn/components/alert/alert.js +17 -0
  95. package/cdn/components/alert/alert.styles.d.ts +2 -0
  96. package/cdn/components/alert/alert.styles.js +9 -0
  97. package/cdn/components/browse-variables/browse-variables.component.js +27 -26
  98. package/cdn/components/browse-variables/browse-variables.controller.js +4 -4
  99. package/cdn/components/browse-variables/browse-variables.js +28 -27
  100. package/cdn/components/button/button.component.js +5 -4
  101. package/cdn/components/button/button.js +6 -5
  102. package/cdn/components/chip/chip.component.js +2 -2
  103. package/cdn/components/chip/chip.js +3 -3
  104. package/cdn/components/combobox/combobox.component.js +7 -7
  105. package/cdn/components/combobox/combobox.js +8 -8
  106. package/cdn/components/data-rods/data-rods.component.js +42 -41
  107. package/cdn/components/data-rods/data-rods.js +43 -42
  108. package/cdn/components/data-subsetter/data-subsetter.component.d.ts +46 -0
  109. package/cdn/components/data-subsetter/data-subsetter.component.js +48 -0
  110. package/cdn/components/data-subsetter/data-subsetter.controller.d.ts +15 -0
  111. package/cdn/components/data-subsetter/data-subsetter.controller.js +11 -0
  112. package/cdn/components/data-subsetter/data-subsetter.d.ts +8 -0
  113. package/cdn/components/data-subsetter/data-subsetter.js +49 -0
  114. package/cdn/components/data-subsetter/data-subsetter.styles.d.ts +2 -0
  115. package/cdn/components/data-subsetter/data-subsetter.styles.js +9 -0
  116. package/cdn/components/date-picker/date-picker.component.d.ts +6 -0
  117. package/cdn/components/date-picker/date-picker.component.js +11 -3
  118. package/cdn/components/date-picker/date-picker.js +12 -4
  119. package/cdn/components/date-picker/date-picker.styles.js +1 -1
  120. package/cdn/components/date-range-slider/date-range-slider.component.js +4 -4
  121. package/cdn/components/date-range-slider/date-range-slider.js +5 -5
  122. package/cdn/components/dialog/dialog.component.js +2 -2
  123. package/cdn/components/dialog/dialog.js +3 -3
  124. package/cdn/components/icon/icon.component.js +5 -5
  125. package/cdn/components/icon/icon.js +6 -6
  126. package/cdn/components/icon/library.default.js +1 -1
  127. package/cdn/components/icon/library.js +2 -2
  128. package/cdn/components/loader/loader.component.js +2 -2
  129. package/cdn/components/loader/loader.js +3 -3
  130. package/cdn/components/login/login.component.js +18 -17
  131. package/cdn/components/login/login.js +19 -18
  132. package/cdn/components/map/leaflet-utils.d.ts +4 -6
  133. package/cdn/components/map/leaflet-utils.js +1 -1
  134. package/cdn/components/map/map.component.d.ts +2 -0
  135. package/cdn/components/map/map.component.js +7 -7
  136. package/cdn/components/map/map.js +8 -8
  137. package/cdn/components/map/type.d.ts +1 -1
  138. package/cdn/components/plot/plot.component.js +2 -2
  139. package/cdn/components/plot/plot.js +3 -3
  140. package/cdn/components/skeleton/skeleton.component.js +7 -7
  141. package/cdn/components/skeleton/skeleton.js +8 -8
  142. package/cdn/components/spatial-picker/spatial-picker.component.d.ts +2 -0
  143. package/cdn/components/spatial-picker/spatial-picker.component.js +8 -8
  144. package/cdn/components/spatial-picker/spatial-picker.js +9 -9
  145. package/cdn/components/time-series/time-series.component.js +21 -20
  146. package/cdn/components/time-series/time-series.controller.js +3 -3
  147. package/cdn/components/time-series/time-series.js +22 -21
  148. package/cdn/components/variable-combobox/lib.js +3 -3
  149. package/cdn/components/variable-combobox/variable-combobox.component.js +22 -21
  150. package/cdn/components/variable-combobox/variable-combobox.controller.js +4 -4
  151. package/cdn/components/variable-combobox/variable-combobox.js +23 -22
  152. package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +22 -21
  153. package/cdn/components/variable-keyword-search/variable-keyword-search.controller.js +4 -4
  154. package/cdn/components/variable-keyword-search/variable-keyword-search.js +23 -22
  155. package/cdn/custom-elements.json +2032 -971
  156. package/cdn/data-services/harmony-data-service.d.ts +12 -0
  157. package/cdn/data-services/queries.d.ts +4 -0
  158. package/cdn/data-services/types.d.ts +125 -0
  159. package/cdn/events/events.d.ts +2 -0
  160. package/cdn/events/terra-after-hide.d.ts +6 -0
  161. package/cdn/events/terra-after-show.d.ts +6 -0
  162. package/cdn/react/accordion/index.d.ts +19 -0
  163. package/cdn/react/accordion/index.js +22 -0
  164. package/cdn/react/alert/index.d.ts +37 -0
  165. package/cdn/react/alert/index.js +17 -0
  166. package/cdn/react/browse-variables/index.js +28 -27
  167. package/cdn/react/button/index.js +6 -5
  168. package/cdn/react/chip/index.js +3 -3
  169. package/cdn/react/combobox/index.js +8 -8
  170. package/cdn/react/data-rods/index.js +43 -42
  171. package/cdn/react/data-subsetter/index.d.ts +18 -0
  172. package/cdn/react/data-subsetter/index.js +49 -0
  173. package/cdn/react/date-picker/index.js +12 -4
  174. package/cdn/react/date-range-slider/index.js +5 -5
  175. package/cdn/react/dialog/index.js +3 -3
  176. package/cdn/react/icon/index.js +6 -6
  177. package/cdn/react/index.d.ts +3 -0
  178. package/cdn/react/index.js +105 -84
  179. package/cdn/react/loader/index.js +3 -3
  180. package/cdn/react/login/index.js +19 -18
  181. package/cdn/react/map/index.js +8 -8
  182. package/cdn/react/plot/index.js +3 -3
  183. package/cdn/react/skeleton/index.js +8 -8
  184. package/cdn/react/spatial-picker/index.js +9 -9
  185. package/cdn/react/time-series/index.js +22 -21
  186. package/cdn/react/variable-combobox/index.js +23 -22
  187. package/cdn/react/variable-keyword-search/index.js +23 -22
  188. package/cdn/terra-ui-components.d.ts +3 -0
  189. package/cdn/terra-ui-components.js +107 -86
  190. package/cdn/types/vue/index.d.ts +211 -71
  191. package/cdn/utilities/animation.js +5 -5
  192. package/cdn/utilities/date.d.ts +1 -1
  193. package/cdn/utilities/date.js +1 -1
  194. package/cdn/utilities/icon-library.js +2 -2
  195. package/cdn/utilities/mimetypes.d.ts +2 -0
  196. package/cdn/utilities/mimetypes.js +9 -0
  197. package/cdn/vscode.html-custom-data.json +88 -0
  198. package/cdn/web-types.json +352 -114
  199. package/dist/assets/data-subsetter/download_subset_files.py.txt +66 -0
  200. package/dist/chunks/{chunk.FOHGUYVS.js → chunk.2RKHDDU2.js} +1 -1
  201. package/dist/chunks/{chunk.XLJ7TVUS.js → chunk.2XANNG2B.js} +1 -1
  202. package/dist/chunks/{chunk.AY7TGBWI.js → chunk.3IQ5IBBM.js} +1 -1
  203. package/dist/chunks/{chunk.R3YZ7KJF.js → chunk.3L2XDJOH.js} +1 -1
  204. package/dist/chunks/{chunk.MZK7WRKF.js → chunk.43S45WWI.js} +1 -1
  205. package/{cdn/chunks/chunk.OJGOBLIU.js → dist/chunks/chunk.5KLM57QY.js} +1 -1
  206. package/dist/chunks/{chunk.HR67OJ25.js → chunk.5NA7WX55.js} +1 -1
  207. package/dist/chunks/{chunk.4BU4Y56M.js → chunk.5SHIUY5G.js} +6 -6
  208. package/dist/chunks/{chunk.UYRZ6XBT.js → chunk.5VVBRICA.js} +1 -1
  209. package/dist/chunks/chunk.6OAPBJRP.js +49 -0
  210. package/dist/chunks/{chunk.KZZM5DIH.js → chunk.6QIHYJP5.js} +1 -1
  211. package/dist/chunks/{chunk.AONG4JL6.js → chunk.7F2DLFLG.js} +2 -2
  212. package/dist/chunks/{chunk.GB2BB7RB.js → chunk.7NFT5ART.js} +1 -1
  213. package/dist/chunks/chunk.7NTMVXIC.js +925 -0
  214. package/dist/chunks/{chunk.O5JIPX5F.js → chunk.A2QLZY2M.js} +9 -9
  215. package/dist/chunks/{chunk.U5ORWUDI.js → chunk.A7OKAATM.js} +1 -1
  216. package/dist/chunks/chunk.BAKHMLBF.js +11 -0
  217. package/dist/chunks/{chunk.LPSLYYX7.js → chunk.BH6T35XA.js} +1 -1
  218. package/dist/chunks/chunk.BLS652FJ.js +21 -0
  219. package/dist/chunks/chunk.BMXRPN3G.js +27 -0
  220. package/dist/chunks/chunk.BQ62RLR7.js +11 -0
  221. package/{cdn/chunks/chunk.2TA36AD4.js → dist/chunks/chunk.BWS7VIBN.js} +1 -1
  222. package/{cdn/chunks/chunk.L5N5757Y.js → dist/chunks/chunk.CQZQUK25.js} +1 -1
  223. package/{cdn/chunks/chunk.XR376PMT.js → dist/chunks/chunk.CRZR5BJI.js} +1 -1
  224. package/{cdn/chunks/chunk.RLI6ON2C.js → dist/chunks/chunk.DGDGO4B7.js} +1 -1
  225. package/dist/chunks/chunk.DLY7WEID.js +263 -0
  226. package/dist/chunks/{chunk.H55GDBVS.js → chunk.DNVFMGDI.js} +2 -2
  227. package/dist/chunks/{chunk.RHT75OOW.js → chunk.E27YXBMX.js} +3 -3
  228. package/{cdn/chunks/chunk.KCZLV65J.js → dist/chunks/chunk.ECA2Y7HR.js} +1 -1
  229. package/dist/chunks/{chunk.WVAXV6VX.js → chunk.EZDSFP5I.js} +1 -1
  230. package/dist/chunks/{chunk.OJHJP7K2.js → chunk.FV3CJUU7.js} +1 -1
  231. package/dist/chunks/{chunk.EXZP753L.js → chunk.FWZVCL6J.js} +1 -1
  232. package/dist/chunks/chunk.GGUB2JVZ.js +73 -0
  233. package/dist/chunks/{chunk.K2RM2IR7.js → chunk.GSJX5TID.js} +16 -8
  234. package/{cdn/chunks/chunk.F7E3OXW3.js → dist/chunks/chunk.GVEKK7CF.js} +1 -1
  235. package/dist/chunks/chunk.HDDKRXZX.js +1308 -0
  236. package/dist/chunks/{chunk.TFI3UXXB.js → chunk.HFD6TPE6.js} +1 -1
  237. package/{cdn/chunks/chunk.TPNEBQDW.js → dist/chunks/chunk.HM3ZTCTP.js} +1 -1
  238. package/dist/chunks/{chunk.2LQ62YDQ.js → chunk.I533JNF6.js} +1 -1
  239. package/dist/chunks/{chunk.34UGHNQ2.js → chunk.IKDCFYUH.js} +23 -6
  240. package/dist/chunks/{chunk.33MT36PS.js → chunk.IU5SV56O.js} +1 -1
  241. package/dist/chunks/chunk.JDQC6NXM.js +418 -0
  242. package/{cdn/chunks/chunk.KTVGWBMV.js → dist/chunks/chunk.K6JJQ4SX.js} +1 -1
  243. package/dist/chunks/{chunk.7JBFBZ5C.js → chunk.KMN7L6QZ.js} +5 -2
  244. package/dist/chunks/chunk.KRQ4AG3O.js +11 -0
  245. package/dist/chunks/chunk.MNJWY2UW.js +21 -0
  246. package/{cdn/chunks/chunk.WLC45QMC.js → dist/chunks/chunk.N25BS4ZB.js} +1 -1
  247. package/{cdn/chunks/chunk.RGI5ZEXR.js → dist/chunks/chunk.NJIZMOG7.js} +1 -1
  248. package/dist/chunks/{chunk.TBBYOYJ7.js → chunk.O27IYL4H.js} +1 -1
  249. package/dist/chunks/{chunk.XZXT5MBD.js → chunk.OF2CXRSX.js} +1 -1
  250. package/dist/chunks/{chunk.UBJGRBUX.js → chunk.OYPYQ42W.js} +1 -1
  251. package/dist/chunks/{chunk.NFHX7J4A.js → chunk.QQRC2LRM.js} +11 -11
  252. package/dist/chunks/chunk.QVAN2K7E.js +147 -0
  253. package/dist/chunks/{chunk.WSGVJC5A.js → chunk.QVZCOSQG.js} +4 -4
  254. package/dist/chunks/{chunk.5LNGPR44.js → chunk.R44HGSGT.js} +1 -1
  255. package/dist/chunks/{chunk.3B622XLR.js → chunk.RLNWDA4W.js} +4 -4
  256. package/dist/chunks/{chunk.3W53HERF.js → chunk.RQ5ZXHVZ.js} +1 -1
  257. package/dist/chunks/chunk.SF6MBAEP.js +20 -0
  258. package/dist/chunks/{chunk.LNC5EYCJ.js → chunk.SLXHKQQV.js} +7 -52
  259. package/dist/chunks/{chunk.WJV65UWS.js → chunk.SXWW6H7G.js} +1 -1
  260. package/dist/chunks/{chunk.RROJPL2A.js → chunk.TF5MPUEH.js} +1 -1
  261. package/dist/chunks/{chunk.T2K2FVDX.js → chunk.TO2LNCEQ.js} +1 -1
  262. package/dist/chunks/{chunk.5W3SNZBC.js → chunk.TQWLVZHQ.js} +8 -7
  263. package/dist/chunks/{chunk.CPEM43Y5.js → chunk.U6Y5XC7Y.js} +1 -1
  264. package/{cdn/chunks/chunk.7KC6YXWL.js → dist/chunks/chunk.UA5HHAYZ.js} +1 -1
  265. package/dist/chunks/{chunk.Z5E25XLP.js → chunk.UATKNBZS.js} +9 -9
  266. package/{cdn/chunks/chunk.775IHQR2.js → dist/chunks/chunk.UOCDT7HQ.js} +13 -13
  267. package/{cdn/chunks/chunk.4TXEYAPR.js → dist/chunks/chunk.UOGBFLVH.js} +1 -1
  268. package/{cdn/chunks/chunk.2NMZMEIL.js → dist/chunks/chunk.VE3COXRN.js} +1 -1
  269. package/dist/chunks/{chunk.ZRI4D77S.js → chunk.VKOQTQOM.js} +4 -4
  270. package/dist/chunks/{chunk.QAXYS5OA.js → chunk.WLHYNUHM.js} +1 -1
  271. package/dist/chunks/{chunk.RPLQHZS6.js → chunk.WYF3PXVO.js} +18 -5
  272. package/dist/chunks/{chunk.UTDJAXDL.js → chunk.YEIAGN3D.js} +1 -1
  273. package/dist/chunks/chunk.Z3GLEDYM.js +58 -0
  274. package/dist/chunks/{chunk.2TZUQC72.js → chunk.Z6VGIT4W.js} +1 -1
  275. package/{cdn/chunks/chunk.BOEWKIKL.js → dist/chunks/chunk.ZAE4U4Y7.js} +1 -1
  276. package/{cdn/chunks/chunk.MSGOYUSX.js → dist/chunks/chunk.ZAFEQXY3.js} +1 -1
  277. package/dist/chunks/{chunk.2IUOMVRJ.js → chunk.ZI3DJGWN.js} +1 -1
  278. package/{cdn/chunks/chunk.I5ZDFQF3.js → dist/chunks/chunk.ZRD3ZNCG.js} +1 -1
  279. package/dist/components/accordion/accordion.component.d.ts +35 -0
  280. package/dist/components/accordion/accordion.component.js +16 -0
  281. package/dist/components/accordion/accordion.d.ts +8 -0
  282. package/dist/components/accordion/accordion.js +17 -0
  283. package/dist/components/accordion/accordion.styles.d.ts +2 -0
  284. package/dist/components/accordion/accordion.styles.js +7 -0
  285. package/dist/components/alert/alert.component.d.ts +74 -0
  286. package/dist/components/alert/alert.component.js +11 -0
  287. package/dist/components/alert/alert.d.ts +8 -0
  288. package/dist/components/alert/alert.js +12 -0
  289. package/dist/components/alert/alert.styles.d.ts +2 -0
  290. package/dist/components/alert/alert.styles.js +7 -0
  291. package/dist/components/browse-variables/browse-variables.component.js +19 -18
  292. package/dist/components/browse-variables/browse-variables.controller.js +3 -3
  293. package/dist/components/browse-variables/browse-variables.js +20 -19
  294. package/dist/components/button/button.component.js +4 -3
  295. package/dist/components/button/button.js +5 -4
  296. package/dist/components/chip/chip.component.js +2 -2
  297. package/dist/components/chip/chip.js +3 -3
  298. package/dist/components/combobox/combobox.component.js +3 -3
  299. package/dist/components/combobox/combobox.js +4 -4
  300. package/dist/components/data-rods/data-rods.component.js +30 -29
  301. package/dist/components/data-rods/data-rods.js +31 -30
  302. package/dist/components/data-subsetter/data-subsetter.component.d.ts +46 -0
  303. package/dist/components/data-subsetter/data-subsetter.component.js +37 -0
  304. package/dist/components/data-subsetter/data-subsetter.controller.d.ts +15 -0
  305. package/dist/components/data-subsetter/data-subsetter.controller.js +9 -0
  306. package/dist/components/data-subsetter/data-subsetter.d.ts +8 -0
  307. package/dist/components/data-subsetter/data-subsetter.js +38 -0
  308. package/dist/components/data-subsetter/data-subsetter.styles.d.ts +2 -0
  309. package/dist/components/data-subsetter/data-subsetter.styles.js +7 -0
  310. package/dist/components/date-picker/date-picker.component.d.ts +6 -0
  311. package/dist/components/date-picker/date-picker.component.js +8 -3
  312. package/dist/components/date-picker/date-picker.js +9 -4
  313. package/dist/components/date-picker/date-picker.styles.js +1 -1
  314. package/dist/components/date-range-slider/date-range-slider.component.js +3 -3
  315. package/dist/components/date-range-slider/date-range-slider.js +4 -4
  316. package/dist/components/dialog/dialog.component.js +2 -2
  317. package/dist/components/dialog/dialog.js +3 -3
  318. package/dist/components/icon/icon.component.js +5 -5
  319. package/dist/components/icon/icon.js +6 -6
  320. package/dist/components/icon/library.default.js +1 -1
  321. package/dist/components/icon/library.js +2 -2
  322. package/dist/components/loader/loader.component.js +2 -2
  323. package/dist/components/loader/loader.js +3 -3
  324. package/dist/components/login/login.component.js +14 -13
  325. package/dist/components/login/login.js +15 -14
  326. package/dist/components/map/leaflet-utils.d.ts +4 -6
  327. package/dist/components/map/leaflet-utils.js +1 -1
  328. package/dist/components/map/map.component.d.ts +2 -0
  329. package/dist/components/map/map.component.js +5 -5
  330. package/dist/components/map/map.js +6 -6
  331. package/dist/components/map/type.d.ts +1 -1
  332. package/dist/components/plot/plot.component.js +2 -2
  333. package/dist/components/plot/plot.js +3 -3
  334. package/dist/components/skeleton/skeleton.component.js +2 -2
  335. package/dist/components/skeleton/skeleton.js +3 -3
  336. package/dist/components/spatial-picker/spatial-picker.component.d.ts +2 -0
  337. package/dist/components/spatial-picker/spatial-picker.component.js +6 -6
  338. package/dist/components/spatial-picker/spatial-picker.js +7 -7
  339. package/dist/components/time-series/time-series.component.js +15 -14
  340. package/dist/components/time-series/time-series.controller.js +2 -2
  341. package/dist/components/time-series/time-series.js +16 -15
  342. package/dist/components/variable-combobox/variable-combobox.component.js +12 -11
  343. package/dist/components/variable-combobox/variable-combobox.js +13 -12
  344. package/dist/components/variable-keyword-search/variable-keyword-search.component.js +15 -14
  345. package/dist/components/variable-keyword-search/variable-keyword-search.controller.js +3 -3
  346. package/dist/components/variable-keyword-search/variable-keyword-search.js +16 -15
  347. package/dist/custom-elements.json +2032 -971
  348. package/dist/data-services/harmony-data-service.d.ts +12 -0
  349. package/dist/data-services/queries.d.ts +4 -0
  350. package/dist/data-services/types.d.ts +125 -0
  351. package/dist/events/events.d.ts +2 -0
  352. package/dist/events/terra-after-hide.d.ts +6 -0
  353. package/dist/events/terra-after-show.d.ts +6 -0
  354. package/dist/react/accordion/index.d.ts +19 -0
  355. package/dist/react/accordion/index.js +17 -0
  356. package/dist/react/alert/index.d.ts +37 -0
  357. package/dist/react/alert/index.js +12 -0
  358. package/dist/react/browse-variables/index.js +20 -19
  359. package/dist/react/button/index.js +5 -4
  360. package/dist/react/chip/index.js +3 -3
  361. package/dist/react/combobox/index.js +4 -4
  362. package/dist/react/data-rods/index.js +31 -30
  363. package/dist/react/data-subsetter/index.d.ts +18 -0
  364. package/dist/react/data-subsetter/index.js +38 -0
  365. package/dist/react/date-picker/index.js +9 -4
  366. package/dist/react/date-range-slider/index.js +4 -4
  367. package/dist/react/dialog/index.js +3 -3
  368. package/dist/react/icon/index.js +6 -6
  369. package/dist/react/index.d.ts +3 -0
  370. package/dist/react/index.js +92 -71
  371. package/dist/react/loader/index.js +3 -3
  372. package/dist/react/login/index.js +15 -14
  373. package/dist/react/map/index.js +6 -6
  374. package/dist/react/plot/index.js +3 -3
  375. package/dist/react/skeleton/index.js +3 -3
  376. package/dist/react/spatial-picker/index.js +7 -7
  377. package/dist/react/time-series/index.js +16 -15
  378. package/dist/react/variable-combobox/index.js +13 -12
  379. package/dist/react/variable-keyword-search/index.js +16 -15
  380. package/dist/terra-ui-components.d.ts +3 -0
  381. package/dist/terra-ui-components.js +95 -74
  382. package/dist/{terra_ui_components-0.0.52-py3-none-any.whl → terra_ui_components-0.0.53-py3-none-any.whl} +0 -0
  383. package/dist/{terra_ui_components-0.0.52.tar.gz → terra_ui_components-0.0.53.tar.gz} +0 -0
  384. package/dist/types/vue/index.d.ts +211 -71
  385. package/dist/utilities/date.d.ts +1 -1
  386. package/dist/utilities/date.js +1 -1
  387. package/dist/utilities/icon-library.js +2 -2
  388. package/dist/utilities/mimetypes.d.ts +2 -0
  389. package/dist/utilities/mimetypes.js +9 -0
  390. package/dist/vscode.html-custom-data.json +88 -0
  391. package/dist/web-types.json +352 -114
  392. package/package.json +1 -1
  393. package/cdn/chunks/{chunk.2XCNCXGV.js → chunk.262RZKG2.js} +3 -3
  394. package/cdn/chunks/{chunk.PZRCJWJ4.js → chunk.6WMXHA2J.js} +5 -5
  395. package/cdn/chunks/{chunk.QB5SASDL.js → chunk.FKLQEDIX.js} +4 -4
@@ -0,0 +1,1308 @@
1
+ import {
2
+ defaultSubsetFileMimeType,
3
+ getFriendlyNameForMimeType
4
+ } from "./chunk.SF6MBAEP.js";
5
+ import {
6
+ TerraSpatialPicker
7
+ } from "./chunk.WYF3PXVO.js";
8
+ import {
9
+ TerraDatePicker
10
+ } from "./chunk.IKDCFYUH.js";
11
+ import {
12
+ DataSubsetterController
13
+ } from "./chunk.JDQC6NXM.js";
14
+ import {
15
+ data_subsetter_styles_default
16
+ } from "./chunk.7NTMVXIC.js";
17
+ import {
18
+ TerraAccordion
19
+ } from "./chunk.GGUB2JVZ.js";
20
+ import {
21
+ TerraIcon
22
+ } from "./chunk.DNVFMGDI.js";
23
+ import {
24
+ watch
25
+ } from "./chunk.SK7IZCKP.js";
26
+ import {
27
+ TerraElement,
28
+ component_styles_default
29
+ } from "./chunk.R44HGSGT.js";
30
+ import {
31
+ getBasePath
32
+ } from "./chunk.NQKBKXPW.js";
33
+ import {
34
+ __decorateClass,
35
+ __privateAdd,
36
+ __privateGet,
37
+ __privateMethod,
38
+ __spreadProps,
39
+ __spreadValues
40
+ } from "./chunk.TVFCHGU3.js";
41
+
42
+ // src/components/data-subsetter/data-subsetter.component.ts
43
+ import { html, nothing } from "lit";
44
+ import { property, state } from "lit/decorators.js";
45
+ var _controller, _renderSubsetOptions, renderSubsetOptions_fn, _renderSearchForCollection, renderSearchForCollection_fn, _renderOutputFormatSelection, renderOutputFormatSelection_fn, _renderDateRangeSelection, renderDateRangeSelection_fn, _handleStartDateChange, _handleEndDateChange, _resetDateRangeSelection, _resetFormatSelection, _getCollectionDateRange, getCollectionDateRange_fn, _renderSpatialSelection, renderSpatialSelection_fn, _handleSpatialChange, _resetSpatialSelection, _renderVariableSelection, renderVariableSelection_fn, _buildVariableTree, buildVariableTree_fn, _renderVariableTree, renderVariableTree_fn, _getAllGroupPaths, getAllGroupPaths_fn, _toggleGroupExpand, toggleGroupExpand_fn, _toggleExpandCollapseAll, toggleExpandCollapseAll_fn, _toggleVariableSelection, toggleVariableSelection_fn, _markFieldTouched, markFieldTouched_fn, _resetVariableSelection, _renderJobStatus, renderJobStatus_fn, _renderSelectedParams, renderSelectedParams_fn, _cancelJob, cancelJob_fn, _getData, getData_fn, _touchAllFields, touchAllFields_fn, _numberOfFilesFoundEstimate, numberOfFilesFoundEstimate_fn, _getDocumentationLinks, getDocumentationLinks_fn, _getDataLinks, getDataLinks_fn, _hasAtLeastOneSubsetOption, hasAtLeastOneSubsetOption_fn, _hasSpatialSubset, hasSpatialSubset_fn, _renderJobMessage, renderJobMessage_fn, _estimateJobSize, estimateJobSize_fn, _refineParameters, refineParameters_fn, _toggleDownloadMenu, toggleDownloadMenu_fn, _downloadLinksAsTxt, downloadLinksAsTxt_fn, _downloadPythonScript, downloadPythonScript_fn, _downloadEarthdataDownload, downloadEarthdataDownload_fn, _handleClickOutside, handleClickOutside_fn;
46
+ var TerraDataSubsetter = class extends TerraElement {
47
+ constructor() {
48
+ super(...arguments);
49
+ __privateAdd(this, _renderSubsetOptions);
50
+ __privateAdd(this, _renderSearchForCollection);
51
+ __privateAdd(this, _renderOutputFormatSelection);
52
+ __privateAdd(this, _renderDateRangeSelection);
53
+ __privateAdd(this, _getCollectionDateRange);
54
+ __privateAdd(this, _renderSpatialSelection);
55
+ __privateAdd(this, _renderVariableSelection);
56
+ __privateAdd(this, _buildVariableTree);
57
+ __privateAdd(this, _renderVariableTree);
58
+ __privateAdd(this, _getAllGroupPaths);
59
+ __privateAdd(this, _toggleGroupExpand);
60
+ __privateAdd(this, _toggleExpandCollapseAll);
61
+ __privateAdd(this, _toggleVariableSelection);
62
+ __privateAdd(this, _markFieldTouched);
63
+ __privateAdd(this, _renderJobStatus);
64
+ __privateAdd(this, _renderSelectedParams);
65
+ __privateAdd(this, _cancelJob);
66
+ __privateAdd(this, _getData);
67
+ __privateAdd(this, _touchAllFields);
68
+ __privateAdd(this, _numberOfFilesFoundEstimate);
69
+ __privateAdd(this, _getDocumentationLinks);
70
+ __privateAdd(this, _getDataLinks);
71
+ __privateAdd(this, _hasAtLeastOneSubsetOption);
72
+ __privateAdd(this, _hasSpatialSubset);
73
+ __privateAdd(this, _renderJobMessage);
74
+ __privateAdd(this, _estimateJobSize);
75
+ __privateAdd(this, _refineParameters);
76
+ __privateAdd(this, _toggleDownloadMenu);
77
+ __privateAdd(this, _downloadLinksAsTxt);
78
+ __privateAdd(this, _downloadPythonScript);
79
+ __privateAdd(this, _downloadEarthdataDownload);
80
+ __privateAdd(this, _handleClickOutside);
81
+ this.showCollectionSearch = true;
82
+ this.selectedVariables = [];
83
+ this.expandedVariableGroups = /* @__PURE__ */ new Set();
84
+ this.touchedFields = /* @__PURE__ */ new Set();
85
+ this.spatialSelection = null;
86
+ this.selectedDateRange = {
87
+ startDate: null,
88
+ endDate: null
89
+ };
90
+ this.selectedFormat = defaultSubsetFileMimeType;
91
+ this.cancelingGetData = false;
92
+ this.selectedTab = "web-links";
93
+ this.refineParameters = false;
94
+ this.showDownloadMenu = false;
95
+ __privateAdd(this, _controller, new DataSubsetterController(this));
96
+ __privateAdd(this, _handleStartDateChange, (e) => {
97
+ __privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "date");
98
+ const datePicker = e.currentTarget;
99
+ this.selectedDateRange = __spreadProps(__spreadValues({}, this.selectedDateRange), {
100
+ startDate: datePicker.selectedDates.startDate
101
+ });
102
+ });
103
+ __privateAdd(this, _handleEndDateChange, (e) => {
104
+ __privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "date");
105
+ const datePicker = e.currentTarget;
106
+ this.selectedDateRange = __spreadProps(__spreadValues({}, this.selectedDateRange), {
107
+ endDate: datePicker.selectedDates.startDate
108
+ });
109
+ });
110
+ __privateAdd(this, _resetDateRangeSelection, () => {
111
+ this.selectedDateRange = { startDate: null, endDate: null };
112
+ });
113
+ __privateAdd(this, _resetFormatSelection, () => {
114
+ this.selectedFormat = defaultSubsetFileMimeType;
115
+ });
116
+ __privateAdd(this, _handleSpatialChange, (e) => {
117
+ var _a, _b;
118
+ __privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "spatial");
119
+ const round2 = (n) => parseFloat(Number(n).toFixed(2));
120
+ if ((_a = e.detail) == null ? void 0 : _a.bounds) {
121
+ this.spatialSelection = {
122
+ e: round2(e.detail.bounds._northEast.lng),
123
+ n: round2(e.detail.bounds._northEast.lat),
124
+ w: round2(e.detail.bounds._southWest.lng),
125
+ s: round2(e.detail.bounds._southWest.lat)
126
+ };
127
+ } else if ((_b = e.detail) == null ? void 0 : _b.latLng) {
128
+ this.spatialSelection = e.detail.latLng;
129
+ } else {
130
+ this.spatialSelection = null;
131
+ }
132
+ });
133
+ __privateAdd(this, _resetSpatialSelection, () => {
134
+ this.spatialSelection = null;
135
+ });
136
+ __privateAdd(this, _resetVariableSelection, () => {
137
+ this.selectedVariables = [];
138
+ });
139
+ }
140
+ firstUpdated() {
141
+ if (this.collectionEntryId) {
142
+ this.showCollectionSearch = false;
143
+ }
144
+ if (this.jobId) {
145
+ __privateGet(this, _controller).fetchJobByID(this.jobId);
146
+ }
147
+ document.addEventListener("click", __privateMethod(this, _handleClickOutside, handleClickOutside_fn).bind(this));
148
+ }
149
+ disconnectedCallback() {
150
+ super.disconnectedCallback();
151
+ document.removeEventListener("click", __privateMethod(this, _handleClickOutside, handleClickOutside_fn).bind(this));
152
+ }
153
+ collectionChanged() {
154
+ const { startDate, endDate } = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
155
+ if (startDate && endDate) {
156
+ const end = new Date(endDate);
157
+ const start = new Date(startDate);
158
+ const sevenDaysAgo = new Date(end);
159
+ sevenDaysAgo.setDate(end.getDate() - 6);
160
+ const defaultStart = sevenDaysAgo > start ? sevenDaysAgo : start;
161
+ this.selectedDateRange = {
162
+ startDate: defaultStart.toISOString().slice(0, 10),
163
+ endDate
164
+ };
165
+ } else {
166
+ this.selectedDateRange = { startDate, endDate };
167
+ }
168
+ }
169
+ render() {
170
+ var _a, _b, _c;
171
+ return html`
172
+ <div class="container">
173
+ <div class="header">
174
+ <h1>
175
+ <svg
176
+ class="download-icon"
177
+ viewBox="0 0 24 24"
178
+ fill="currentColor"
179
+ >
180
+ <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" />
181
+ </svg>
182
+ ${(_c = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.EntryTitle) != null ? _c : html`Download Data`}
183
+ </h1>
184
+ <button class="close-btn" onclick="closeDialog()">×</button>
185
+ </div>
186
+
187
+ ${__privateGet(this, _controller).currentJob && !this.refineParameters ? __privateMethod(this, _renderJobStatus, renderJobStatus_fn).call(this) : __privateMethod(this, _renderSubsetOptions, renderSubsetOptions_fn).call(this)}
188
+ </div>
189
+ `;
190
+ }
191
+ };
192
+ _controller = new WeakMap();
193
+ _renderSubsetOptions = new WeakSet();
194
+ renderSubsetOptions_fn = function() {
195
+ var _a, _b, _c, _d;
196
+ const estimates = __privateMethod(this, _estimateJobSize, estimateJobSize_fn).call(this);
197
+ return html`
198
+ ${estimates ? html`<div
199
+ class="size-info ${estimates.links >= 150 ? "warning" : "neutral"}"
200
+ >
201
+ <h2>Estimated size of results</h2>
202
+ <div class="size-stats">
203
+ ${estimates.days.toLocaleString()} days,
204
+ ${estimates.links.toLocaleString()} links
205
+ </div>
206
+ ${estimates.links >= 150 ? html`<div class="size-warning">
207
+ You are about to retrieve
208
+ ${estimates.links.toLocaleString()} file links from
209
+ the archive. You may
210
+ <strong>speed up the request</strong> by limiting the
211
+ scope of your search.
212
+ </div>` : nothing}
213
+ </div>` : nothing}
214
+ ${this.showCollectionSearch ? html`
215
+ <div class="section">
216
+ <h2 class="section-title">
217
+ Select Data Collection
218
+ <span class="help-icon">?</span>
219
+ </h2>
220
+
221
+ ${__privateMethod(this, _renderSearchForCollection, renderSearchForCollection_fn).call(this)}
222
+ </div>
223
+ ` : nothing}
224
+ ${__privateMethod(this, _hasAtLeastOneSubsetOption, hasAtLeastOneSubsetOption_fn).call(this) ? html`
225
+ <div class="section">
226
+ <h2 class="section-title">
227
+ Method Options
228
+ <span class="help-icon">?</span>
229
+ </h2>
230
+
231
+ ${((_a = this.collectionWithServices) == null ? void 0 : _a.temporalSubset) ? __privateMethod(this, _renderDateRangeSelection, renderDateRangeSelection_fn).call(this) : nothing}
232
+ ${__privateMethod(this, _hasSpatialSubset, hasSpatialSubset_fn).call(this) ? __privateMethod(this, _renderSpatialSelection, renderSpatialSelection_fn).call(this) : nothing}
233
+ ${((_b = this.collectionWithServices) == null ? void 0 : _b.variableSubset) ? __privateMethod(this, _renderVariableSelection, renderVariableSelection_fn).call(this) : nothing}
234
+ </div>
235
+ ` : nothing}
236
+ ${((_d = (_c = this.collectionWithServices) == null ? void 0 : _c.outputFormats) == null ? void 0 : _d.length) ? html`
237
+ <div class="section">
238
+ <h2 class="section-title">
239
+ Output Format
240
+ <span class="help-icon">?</span>
241
+ </h2>
242
+
243
+ ${__privateMethod(this, _renderOutputFormatSelection, renderOutputFormatSelection_fn).call(this)}
244
+ </div>
245
+ ` : nothing}
246
+
247
+ <div class="footer">
248
+ <button class="btn btn-secondary">Reset All</button>
249
+ <button class="btn btn-primary" @click=${__privateMethod(this, _getData, getData_fn)}>
250
+ Get Data
251
+ </button>
252
+ </div>
253
+ `;
254
+ };
255
+ _renderSearchForCollection = new WeakSet();
256
+ renderSearchForCollection_fn = function() {
257
+ return html`
258
+ <terra-accordion open>
259
+ <div slot="summary">
260
+ <span class="accordion-title">Data Collection:</span>
261
+ </div>
262
+
263
+ <div
264
+ slot="summary-right"
265
+ style="display: flex; align-items: center; gap: 10px"
266
+ >
267
+ <span class="accordion-value" id="selected-collection-display"
268
+ >Please select a collection</span
269
+ >
270
+ <button class="reset-btn">Reset</button>
271
+ </div>
272
+
273
+ <!--
274
+ <div class="search-tabs-mini">
275
+ <button
276
+ class="search-tab-mini active"
277
+ onclick="switchSearchType('all')"
278
+ >
279
+ All
280
+ </button>
281
+ <button
282
+ class="search-tab-mini"
283
+ onclick="switchSearchType('collections')"
284
+ >
285
+ Collections
286
+ </button>
287
+ <button
288
+ class="search-tab-mini"
289
+ onclick="switchSearchType('variables')"
290
+ >
291
+ Variables
292
+ </button>
293
+ </div>
294
+ -->
295
+
296
+ <div class="search-container-mini">
297
+ <input
298
+ type="text"
299
+ class="search-input-mini"
300
+ id="search-input"
301
+ placeholder="Search all types of resources"
302
+ onkeypress="handleSearchKeypress(event)"
303
+ />
304
+ <button class="search-button-mini" onclick="performSearch()">
305
+ <svg
306
+ class="search-icon-mini"
307
+ viewBox="0 0 24 24"
308
+ fill="currentColor"
309
+ >
310
+ <path
311
+ d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
312
+ />
313
+ </svg>
314
+ Search
315
+ </button>
316
+ </div>
317
+
318
+ <!--
319
+ <div class="quick-links-mini">
320
+ <a
321
+ href="#"
322
+ class="quick-link-mini"
323
+ onclick="quickSearch('GPM')"
324
+ >GPM Precipitation</a
325
+ >
326
+ <a
327
+ href="#"
328
+ class="quick-link-mini"
329
+ onclick="quickSearch('MODIS')"
330
+ >MODIS Data</a
331
+ >
332
+ <a
333
+ href="#"
334
+ class="quick-link-mini"
335
+ onclick="quickSearch('Landsat')"
336
+ >Landsat Imagery</a
337
+ >
338
+ <a
339
+ href="#"
340
+ class="quick-link-mini"
341
+ onclick="quickSearch('AIRS')"
342
+ >Atmospheric Data</a
343
+ >
344
+ </div>
345
+ -->
346
+
347
+ <div
348
+ id="search-results-section"
349
+ class="search-results-section"
350
+ style="display: none"
351
+ >
352
+ <div class="results-header-mini">
353
+ <div class="results-count-mini" id="results-count">
354
+ Found 0 results
355
+ </div>
356
+ </div>
357
+
358
+ <div id="results-container-mini" class="results-container-mini">
359
+ <!-- Results will be populated here -->
360
+ </div>
361
+
362
+ <div id="loading-mini" class="loading-mini" style="display: none">
363
+ <div class="spinner-mini"></div>
364
+ <div>Searching NASA CMR...</div>
365
+ </div>
366
+
367
+ <div
368
+ id="no-results-mini"
369
+ class="no-results-mini"
370
+ style="display: none"
371
+ >
372
+ <p>
373
+ No results found. Try adjusting your search terms or
374
+ browse the quick links above.
375
+ </p>
376
+ </div>
377
+ </div>
378
+ </terra-accordion>
379
+ `;
380
+ };
381
+ _renderOutputFormatSelection = new WeakSet();
382
+ renderOutputFormatSelection_fn = function() {
383
+ return html`
384
+ <terra-accordion>
385
+ <div slot="summary">
386
+ <span class="accordion-title">File Format:</span>
387
+ </div>
388
+
389
+ <div
390
+ slot="summary-right"
391
+ style="display: flex; align-items: center; gap: 10px;"
392
+ >
393
+ <span>${getFriendlyNameForMimeType(this.selectedFormat)}</span>
394
+
395
+ <button class="reset-btn" @click=${__privateGet(this, _resetFormatSelection)}>
396
+ Reset
397
+ </button>
398
+ </div>
399
+
400
+ <div class="accordion-content" style="margin-top: 12px;">
401
+ ${(() => {
402
+ var _a;
403
+ const uniqueFormats = Array.from(
404
+ new Set(((_a = this.collectionWithServices) == null ? void 0 : _a.outputFormats) || [])
405
+ );
406
+ return uniqueFormats.map(
407
+ (format) => html`
408
+ <label
409
+ style="display: flex; align-items: center; gap: 8px; padding: 5px;"
410
+ >
411
+ <input
412
+ type="radio"
413
+ name="output-format"
414
+ value="${format}"
415
+ .checked=${this.selectedFormat === format}
416
+ @change=${() => this.selectedFormat = format}
417
+ />
418
+ ${getFriendlyNameForMimeType(format)}
419
+ </label>
420
+ `
421
+ );
422
+ })()}
423
+ </div>
424
+ </terra-accordion>
425
+ `;
426
+ };
427
+ _renderDateRangeSelection = new WeakSet();
428
+ renderDateRangeSelection_fn = function() {
429
+ var _a, _b;
430
+ const { startDate: defaultStartDate, endDate: defaultEndDate } = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
431
+ const startDate = (_a = this.selectedDateRange.startDate) != null ? _a : defaultStartDate;
432
+ const endDate = (_b = this.selectedDateRange.endDate) != null ? _b : defaultEndDate;
433
+ const showError = this.touchedFields.has("date") && (!this.selectedDateRange.startDate || !this.selectedDateRange.endDate);
434
+ return html`
435
+ <terra-accordion>
436
+ <div slot="summary">
437
+ <span class="accordion-title">Refine Date Range:</span>
438
+ </div>
439
+
440
+ <div
441
+ slot="summary-right"
442
+ style="display: flex; align-items: center; gap: 10px;"
443
+ >
444
+ ${showError ? html`<span class="accordion-value error"
445
+ >Please select a date range</span
446
+ >` : this.touchedFields.has("date") && startDate && endDate ? html`<span class="accordion-value"
447
+ >${startDate} to ${endDate}</span
448
+ >` : nothing}
449
+ <button class="reset-btn" @click=${__privateGet(this, _resetDateRangeSelection)}>
450
+ Reset
451
+ </button>
452
+ </div>
453
+
454
+ <div style="display: flex; gap: 16px;">
455
+ <terra-date-picker
456
+ label="Start Date"
457
+ allow-input
458
+ class="w-full"
459
+ .minDate=${defaultStartDate}
460
+ .maxDate=${endDate}
461
+ .defaultDate=${startDate}
462
+ @terra-change=${__privateGet(this, _handleStartDateChange)}
463
+ ></terra-date-picker>
464
+ <terra-date-picker
465
+ label="End Date"
466
+ allow-input
467
+ class="w-full"
468
+ .minDate=${startDate}
469
+ .maxDate=${defaultEndDate}
470
+ .defaultDate=${endDate}
471
+ @terra-change=${__privateGet(this, _handleEndDateChange)}
472
+ ></terra-date-picker>
473
+ </div>
474
+
475
+ <div
476
+ style="display: flex; gap: 16px; margin-top: 15px; color: #31708f;"
477
+ >
478
+ <span
479
+ ><strong>Available Range:</strong> ${defaultStartDate} to
480
+ ${defaultEndDate}</span
481
+ >
482
+ <span
483
+ ><strong>Note:</strong> All dates and times are in UTC.</span
484
+ >
485
+ </div>
486
+ </terra-accordion>
487
+ `;
488
+ };
489
+ _handleStartDateChange = new WeakMap();
490
+ _handleEndDateChange = new WeakMap();
491
+ _resetDateRangeSelection = new WeakMap();
492
+ _resetFormatSelection = new WeakMap();
493
+ _getCollectionDateRange = new WeakSet();
494
+ getCollectionDateRange_fn = function() {
495
+ var _a, _b;
496
+ const temporalExtents = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.TemporalExtents;
497
+ if (!temporalExtents || !temporalExtents.length)
498
+ return {
499
+ startDate: null,
500
+ endDate: null
501
+ };
502
+ let minStart = null;
503
+ let maxEnd = null;
504
+ const today = /* @__PURE__ */ new Date();
505
+ for (const temporal of temporalExtents) {
506
+ for (const range of temporal.RangeDateTimes) {
507
+ const start = new Date(range.BeginningDateTime);
508
+ let end;
509
+ if (temporal.EndsAtPresentFlag || !range.EndingDateTime) {
510
+ end = today;
511
+ } else {
512
+ end = new Date(range.EndingDateTime);
513
+ }
514
+ if (!minStart || start < minStart)
515
+ minStart = start;
516
+ if (!maxEnd || end > maxEnd)
517
+ maxEnd = end;
518
+ }
519
+ }
520
+ return {
521
+ startDate: minStart ? minStart.toISOString().slice(0, 10) : null,
522
+ endDate: maxEnd ? maxEnd.toISOString().slice(0, 10) : null
523
+ };
524
+ };
525
+ _renderSpatialSelection = new WeakSet();
526
+ renderSpatialSelection_fn = function() {
527
+ var _a, _b, _c, _d, _e, _f;
528
+ const showError = this.touchedFields.has("spatial") && !this.spatialSelection;
529
+ let boundingRects = (_e = (_d = (_c = (_b = (_a = this.collectionWithServices) == null ? void 0 : _a.collection) == null ? void 0 : _b.SpatialExtent) == null ? void 0 : _c.HorizontalSpatialDomain) == null ? void 0 : _d.Geometry) == null ? void 0 : _e.BoundingRectangles;
530
+ if (boundingRects && !Array.isArray(boundingRects)) {
531
+ boundingRects = [boundingRects];
532
+ }
533
+ return html`
534
+ <terra-accordion>
535
+ <div slot="summary">
536
+ <span class="accordion-title">Refine Region:</span>
537
+ </div>
538
+
539
+ <div
540
+ slot="summary-right"
541
+ style="display: flex; align-items: center; gap: 10px;"
542
+ >
543
+ ${showError ? html`<span class="accordion-value error"
544
+ >Please select a region</span
545
+ >` : this.spatialSelection && "w" in this.spatialSelection ? html`<span class="accordion-value"
546
+ >${this.spatialSelection.w},${this.spatialSelection.s},${this.spatialSelection.e},${this.spatialSelection.n}</span
547
+ >` : this.spatialSelection && "lat" in this.spatialSelection && "lng" in this.spatialSelection ? html`<span class="accordion-value"
548
+ >${this.spatialSelection.lat},${this.spatialSelection.lng}</span
549
+ >` : nothing}
550
+ <button class="reset-btn" @click=${__privateGet(this, _resetSpatialSelection)}>
551
+ Reset
552
+ </button>
553
+ </div>
554
+ <div class="accordion-content">
555
+ <terra-spatial-picker
556
+ inline
557
+ hide-label
558
+ has-shape-selector
559
+ hide-point-selection
560
+ .initialValue=${(_f = this.spatialSelection) != null ? _f : ""}
561
+ @terra-map-change=${__privateGet(this, _handleSpatialChange)}
562
+ ></terra-spatial-picker>
563
+ ${boundingRects && Array.isArray(boundingRects) && boundingRects.length ? html`<div
564
+ style="display: flex; gap: 16px; margin-top: 15px; color: #31708f;"
565
+ >
566
+ ${boundingRects.map(
567
+ (rect) => html`<div>
568
+ <strong>Available Range:</strong>
569
+ ${rect.WestBoundingCoordinate},
570
+ ${rect.SouthBoundingCoordinate},
571
+ ${rect.EastBoundingCoordinate},
572
+ ${rect.NorthBoundingCoordinate}
573
+ </div>`
574
+ )}
575
+ </div>` : nothing}
576
+ </div>
577
+ </terra-accordion>
578
+ `;
579
+ };
580
+ _handleSpatialChange = new WeakMap();
581
+ _resetSpatialSelection = new WeakMap();
582
+ _renderVariableSelection = new WeakSet();
583
+ renderVariableSelection_fn = function() {
584
+ var _a;
585
+ const variables = ((_a = this.collectionWithServices) == null ? void 0 : _a.variables) || [];
586
+ const showError = this.touchedFields.has("variables") && this.selectedVariables.length === 0;
587
+ const tree = __privateMethod(this, _buildVariableTree, buildVariableTree_fn).call(this, variables);
588
+ const allGroups = __privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, tree);
589
+ const allExpanded = allGroups.length > 0 && allGroups.every((g) => this.expandedVariableGroups.has(g));
590
+ return html`
591
+ <terra-accordion>
592
+ <div slot="summary">
593
+ <span class="accordion-title">Select Variables:</span>
594
+ </div>
595
+ <div
596
+ slot="summary-right"
597
+ style="display: flex; align-items: center; gap: 10px;"
598
+ >
599
+ ${showError ? html`<span class="accordion-value error"
600
+ >Please select at least one variable</span
601
+ >` : this.selectedVariables.length ? html`<span class="accordion-value"
602
+ >${this.selectedVariables.length} selected</span
603
+ >` : nothing}
604
+
605
+ <button class="reset-btn" @click=${__privateGet(this, _resetVariableSelection)}>
606
+ Reset
607
+ </button>
608
+ </div>
609
+ <div class="accordion-content">
610
+ <button
611
+ class="reset-btn"
612
+ style="margin-bottom: 10px;"
613
+ @click=${() => __privateMethod(this, _toggleExpandCollapseAll, toggleExpandCollapseAll_fn).call(this, tree)}
614
+ >
615
+ ${allExpanded ? "Collapse Tree" : "Expand Tree"}
616
+ </button>
617
+ ${variables.length === 0 ? html`<p style="color: #666; font-style: italic;">
618
+ No variables available for this collection.
619
+ </p>` : __privateMethod(this, _renderVariableTree, renderVariableTree_fn).call(this, tree, [])}
620
+ </div>
621
+ </terra-accordion>
622
+ `;
623
+ };
624
+ _buildVariableTree = new WeakSet();
625
+ buildVariableTree_fn = function(variables) {
626
+ const root = {};
627
+ for (const v of variables) {
628
+ const parts = v.name.split("/");
629
+ let node = root;
630
+ for (let i = 0; i < parts.length; i++) {
631
+ const part = parts[i];
632
+ if (!node[part])
633
+ node[part] = { __children: {}, __isLeaf: false };
634
+ if (i === parts.length - 1) {
635
+ node[part].__isLeaf = true;
636
+ node[part].__variable = v;
637
+ }
638
+ node = node[part].__children;
639
+ }
640
+ }
641
+ return root;
642
+ };
643
+ _renderVariableTree = new WeakSet();
644
+ renderVariableTree_fn = function(node, path) {
645
+ return html`
646
+ <div style="margin-left: ${path.length * 20}px;">
647
+ ${Object.entries(node).map(([key, value]) => {
648
+ const groupPath = [...path, key].join("/");
649
+ if (value.__isLeaf) {
650
+ return html`
651
+ <div class="option-row">
652
+ <label class="checkbox-option">
653
+ <input
654
+ type="checkbox"
655
+ .checked=${this.selectedVariables.some(
656
+ (v) => v.name === value.__variable.name
657
+ )}
658
+ @change=${(e) => __privateMethod(this, _toggleVariableSelection, toggleVariableSelection_fn).call(this, e, value.__variable)}
659
+ />
660
+ <span>${key}</span>
661
+ </label>
662
+ </div>
663
+ `;
664
+ } else {
665
+ const expanded = this.expandedVariableGroups.has(groupPath);
666
+ return html`
667
+ <div class="option-row" style="align-items: flex-start;">
668
+ <span
669
+ style="cursor: pointer; display: flex; align-items: center;"
670
+ @click=${() => __privateMethod(this, _toggleGroupExpand, toggleGroupExpand_fn).call(this, groupPath)}
671
+ >
672
+ <terra-icon
673
+ library="heroicons"
674
+ name="${expanded ? "outline-minus-circle" : "outline-plus-circle"}"
675
+ style="margin-right: 4px;"
676
+ ></terra-icon>
677
+ <span style="font-weight: 500;">${key}</span>
678
+ </span>
679
+ </div>
680
+ ${expanded ? __privateMethod(this, _renderVariableTree, renderVariableTree_fn).call(this, value.__children, [
681
+ ...path,
682
+ key
683
+ ]) : ""}
684
+ `;
685
+ }
686
+ })}
687
+ </div>
688
+ `;
689
+ };
690
+ _getAllGroupPaths = new WeakSet();
691
+ getAllGroupPaths_fn = function(node, path = []) {
692
+ let groups = [];
693
+ for (const [key, value] of Object.entries(node)) {
694
+ if (!value.__isLeaf) {
695
+ const groupPath = [...path, key].join("/");
696
+ groups.push(groupPath);
697
+ groups = groups.concat(
698
+ __privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, value.__children, [...path, key])
699
+ );
700
+ }
701
+ }
702
+ return groups;
703
+ };
704
+ _toggleGroupExpand = new WeakSet();
705
+ toggleGroupExpand_fn = function(groupPath) {
706
+ const set = new Set(this.expandedVariableGroups);
707
+ if (set.has(groupPath)) {
708
+ set.delete(groupPath);
709
+ } else {
710
+ set.add(groupPath);
711
+ }
712
+ this.expandedVariableGroups = set;
713
+ };
714
+ _toggleExpandCollapseAll = new WeakSet();
715
+ toggleExpandCollapseAll_fn = function(tree) {
716
+ const allGroups = __privateMethod(this, _getAllGroupPaths, getAllGroupPaths_fn).call(this, tree);
717
+ const allExpanded = allGroups.length > 0 && allGroups.every((g) => this.expandedVariableGroups.has(g));
718
+ if (allExpanded) {
719
+ this.expandedVariableGroups = /* @__PURE__ */ new Set();
720
+ } else {
721
+ this.expandedVariableGroups = new Set(allGroups);
722
+ }
723
+ };
724
+ _toggleVariableSelection = new WeakSet();
725
+ toggleVariableSelection_fn = function(e, variable) {
726
+ __privateMethod(this, _markFieldTouched, markFieldTouched_fn).call(this, "variables");
727
+ const checked = e.target.checked;
728
+ if (checked) {
729
+ if (!this.selectedVariables.some((v) => v.name === variable.name)) {
730
+ this.selectedVariables = [...this.selectedVariables, variable];
731
+ }
732
+ } else {
733
+ this.selectedVariables = this.selectedVariables.filter(
734
+ (v) => v.name !== variable.name
735
+ );
736
+ }
737
+ };
738
+ _markFieldTouched = new WeakSet();
739
+ markFieldTouched_fn = function(field) {
740
+ this.touchedFields = new Set(this.touchedFields).add(field);
741
+ };
742
+ _resetVariableSelection = new WeakMap();
743
+ _renderJobStatus = new WeakSet();
744
+ renderJobStatus_fn = function() {
745
+ var _a, _b;
746
+ if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.jobID)) {
747
+ return html`<div class="results-section" id="job-status-section">
748
+ <h2 class="results-title">Results:</h2>
749
+
750
+ <div class="progress-container">
751
+ <div class="progress-text">
752
+ <span class="spinner"></span>
753
+ <span class="status-running">Searching for data...</span>
754
+ </div>
755
+
756
+ <div class="progress-bar">
757
+ <div class="progress-fill" style="width: 0%"></div>
758
+ </div>
759
+ </div>
760
+
761
+ ${__privateMethod(this, _renderJobMessage, renderJobMessage_fn).call(this)}
762
+ </div>`;
763
+ }
764
+ return html`
765
+ <div class="results-section" id="job-status-section">
766
+ <h2 class="results-title">Results:</h2>
767
+
768
+ ${__privateGet(this, _controller).currentJob.status !== "canceled" && __privateGet(this, _controller).currentJob.status !== "failed" ? html` <div class="progress-container">
769
+ <div class="progress-text">
770
+ ${__privateGet(this, _controller).currentJob.progress >= 100 ? html`
771
+ <span class="status-complete"
772
+ >✓ Search complete</span
773
+ >
774
+ ` : html`
775
+ <span class="spinner"></span>
776
+ <span class="status-running"
777
+ >Searching for data...
778
+ (${__privateGet(this, _controller).currentJob.progress}%)</span
779
+ >
780
+ `}
781
+ </div>
782
+
783
+ <div class="progress-bar">
784
+ <div
785
+ class="progress-fill"
786
+ style="width: ${__privateGet(this, _controller).currentJob.progress}%"
787
+ ></div>
788
+ </div>
789
+ </div>` : nothing}
790
+
791
+ <div class="search-status">
792
+ <span class="file-count"
793
+ >Found ${__privateMethod(this, _numberOfFilesFoundEstimate, numberOfFilesFoundEstimate_fn).call(this)} files</span
794
+ >
795
+ out of estimated
796
+ <span class="estimated-total"
797
+ >${__privateGet(this, _controller).currentJob.numInputGranules.toLocaleString()}</span
798
+ >
799
+ </div>
800
+
801
+ ${__privateMethod(this, _renderJobMessage, renderJobMessage_fn).call(this)}
802
+ ${((_b = __privateGet(this, _controller).currentJob.errors) == null ? void 0 : _b.length) ? html`
803
+ <terra-accordion>
804
+ <div slot="summary">
805
+ <span
806
+ class="accordion-title"
807
+ style="color: #dc3545;"
808
+ >Errors
809
+ (${__privateGet(this, _controller).currentJob.errors.length})</span
810
+ >
811
+ </div>
812
+ <div class="accordion-content">
813
+ <ul
814
+ style="color: #dc3545; font-size: 14px; padding-left: 20px;"
815
+ >
816
+ ${__privateGet(this, _controller).currentJob.errors.map(
817
+ (err) => html`
818
+ <li style="margin-bottom: 12px;">
819
+ <a
820
+ href="${err.url}"
821
+ target="_blank"
822
+ style="word-break: break-all; color: #dc3545; text-decoration: underline;"
823
+ >
824
+ ${err.url}
825
+ </a>
826
+ <div style="margin-top: 2px;">
827
+ ${err.message}
828
+ </div>
829
+ </li>
830
+ `
831
+ )}
832
+ </ul>
833
+ </div>
834
+ </terra-accordion>
835
+ ` : nothing}
836
+
837
+ <div class="tabs">
838
+ <button
839
+ class="tab ${this.selectedTab === "web-links" ? "active" : ""}"
840
+ @click=${() => this.selectedTab = "web-links"}
841
+ >
842
+ Web Links
843
+ </button>
844
+
845
+ <button
846
+ class="tab ${this.selectedTab === "selected-params" ? "active" : ""}"
847
+ @click=${() => this.selectedTab = "selected-params"}
848
+ >
849
+ Selected Parameters
850
+ </button>
851
+ </div>
852
+ <div
853
+ id="web-links"
854
+ class="tab-content ${this.selectedTab === "web-links" ? "active" : ""}"
855
+ >
856
+ ${__privateMethod(this, _getDocumentationLinks, getDocumentationLinks_fn).call(this).length ? html`
857
+ <div class="documentation-links">
858
+ ${__privateMethod(this, _getDocumentationLinks, getDocumentationLinks_fn).call(this).map(
859
+ (link) => html`
860
+ <a href="${link.href}" class="doc-link"
861
+ >${link.title}</a
862
+ >
863
+ `
864
+ )}
865
+ </div>
866
+ ` : nothing}
867
+
868
+ <ul class="file-list">
869
+ ${__privateMethod(this, _getDataLinks, getDataLinks_fn).call(this).map(
870
+ (link) => html`
871
+ <li class="file-item">
872
+ <a
873
+ href="${link.href}"
874
+ class="file-link"
875
+ target="_blank"
876
+ >
877
+ ${link.title}
878
+ </a>
879
+ </li>
880
+ `
881
+ )}
882
+ </ul>
883
+ </div>
884
+
885
+ <div
886
+ id="selected-params"
887
+ class="tab-content ${this.selectedTab === "selected-params" ? "active" : ""}"
888
+ >
889
+ ${__privateMethod(this, _renderSelectedParams, renderSelectedParams_fn).call(this)}
890
+ </div>
891
+ </div>
892
+
893
+ <div class="footer">
894
+ ${__privateGet(this, _controller).currentJob.status === "successful" /* SUCCESSFUL */ || __privateGet(this, _controller).currentJob.status === "complete_with_errors" /* COMPLETE_WITH_ERRORS */ ? html`
895
+ <div
896
+ class="download-dropdown ${this.showDownloadMenu ? "open" : ""}"
897
+ >
898
+ <button
899
+ class="download-btn"
900
+ @click=${(e) => __privateMethod(this, _toggleDownloadMenu, toggleDownloadMenu_fn).call(this, e)}
901
+ >
902
+ <svg
903
+ class="download-icon-small"
904
+ viewBox="0 0 24 24"
905
+ fill="currentColor"
906
+ >
907
+ <path
908
+ d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"
909
+ />
910
+ </svg>
911
+ Download Options
912
+ <svg
913
+ class="dropdown-arrow"
914
+ viewBox="0 0 24 24"
915
+ fill="currentColor"
916
+ >
917
+ <path d="M7 10l5 5 5-5z" />
918
+ </svg>
919
+ </button>
920
+
921
+ <div
922
+ class="download-menu ${this.showDownloadMenu ? "open" : ""}"
923
+ >
924
+ <button
925
+ class="download-option"
926
+ @click=${(e) => __privateMethod(this, _downloadLinksAsTxt, downloadLinksAsTxt_fn).call(this, e)}
927
+ >
928
+ <svg
929
+ class="file-icon"
930
+ viewBox="0 0 24 24"
931
+ fill="currentColor"
932
+ >
933
+ <path
934
+ d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"
935
+ />
936
+ </svg>
937
+ File List
938
+ </button>
939
+ <button
940
+ class="download-option"
941
+ @click=${(e) => __privateMethod(this, _downloadPythonScript, downloadPythonScript_fn).call(this, e)}
942
+ >
943
+ <svg
944
+ class="file-icon"
945
+ viewBox="0 0 128 128"
946
+ width="16"
947
+ height="16"
948
+ >
949
+ <path
950
+ fill="currentColor"
951
+ d="M49.33 62h29.159C86.606 62 93 55.132 93 46.981V19.183c0-7.912-6.632-13.856-14.555-15.176-5.014-.835-10.195-1.215-15.187-1.191-4.99.023-9.612.448-13.805 1.191C37.098 6.188 35 10.758 35 19.183V30h29v4H23.776c-8.484 0-15.914 5.108-18.237 14.811-2.681 11.12-2.8 17.919 0 29.53C7.614 86.983 12.569 93 21.054 93H31V79.952C31 70.315 39.428 62 49.33 62zm-1.838-39.11c-3.026 0-5.478-2.479-5.478-5.545 0-3.079 2.451-5.581 5.478-5.581 3.015 0 5.479 2.502 5.479 5.581-.001 3.066-2.465 5.545-5.479 5.545zm74.789 25.921C120.183 40.363 116.178 34 107.682 34H97v12.981C97 57.031 88.206 65 78.489 65H49.33C41.342 65 35 72.326 35 80.326v27.8c0 7.91 6.745 12.564 14.462 14.834 9.242 2.717 17.994 3.208 29.051 0C85.862 120.831 93 116.549 93 108.126V97H64v-4h43.682c8.484 0 11.647-5.776 14.599-14.66 3.047-9.145 2.916-17.799 0-29.529zm-41.955 55.606c3.027 0 5.479 2.479 5.479 5.547 0 3.076-2.451 5.579-5.479 5.579-3.015 0-5.478-2.502-5.478-5.579 0-3.068 2.463-5.547 5.478-5.547z"
952
+ ></path>
953
+ </svg>
954
+ Python Script
955
+ </button>
956
+ <button
957
+ class="download-option"
958
+ @click=${(e) => __privateMethod(this, _downloadEarthdataDownload, downloadEarthdataDownload_fn).call(this, e)}
959
+ >
960
+ <svg
961
+ class="file-icon"
962
+ viewBox="0 0 64 64"
963
+ fill="none"
964
+ width="16"
965
+ height="16"
966
+ >
967
+ <circle
968
+ cx="32"
969
+ cy="32"
970
+ r="28"
971
+ fill="currentColor"
972
+ />
973
+ <path
974
+ d="M32 14v26M32 40l-9-9M32 40l9-9"
975
+ stroke="#fff"
976
+ stroke-width="4"
977
+ stroke-linecap="round"
978
+ stroke-linejoin="round"
979
+ fill="none"
980
+ />
981
+ </svg>
982
+ Earthdata Download
983
+ </button>
984
+ </div>
985
+ </div>
986
+ ` : nothing}
987
+ ${__privateGet(this, _controller).currentJob.status === "running" ? html`<button
988
+ class="btn btn-success"
989
+ @click=${__privateMethod(this, _cancelJob, cancelJob_fn)}
990
+ ?disabled=${this.cancelingGetData}
991
+ >
992
+ ${this.cancelingGetData ? "Canceling..." : "Cancel request"}
993
+ </button>` : nothing}
994
+
995
+ <div class="job-info">
996
+ Job ID:
997
+ <span class="job-id"
998
+ ><a
999
+ href="https://harmony.earthdata.nasa.gov/jobs/${__privateGet(this, _controller).currentJob.jobID}"
1000
+ target="_blank"
1001
+ >${__privateGet(this, _controller).currentJob.jobID}</a
1002
+ ></span
1003
+ >
1004
+ <span class="info-icon">?</span>
1005
+ </div>
1006
+ </div>
1007
+ `;
1008
+ };
1009
+ _renderSelectedParams = new WeakSet();
1010
+ renderSelectedParams_fn = function() {
1011
+ var _a, _b;
1012
+ const collection = (_a = this.collectionWithServices) == null ? void 0 : _a.collection;
1013
+ const variables = this.selectedVariables.length ? this.selectedVariables.map((v) => v.name) : ["All"];
1014
+ const dateRange = this.selectedDateRange.startDate && this.selectedDateRange.endDate ? `${this.selectedDateRange.startDate} to ${this.selectedDateRange.endDate}` : "\u2014";
1015
+ let spatial = "\u2014";
1016
+ if (this.spatialSelection) {
1017
+ if ("w" in this.spatialSelection) {
1018
+ spatial = `Bounding Box: ${this.spatialSelection.w}, ${this.spatialSelection.s}, ${this.spatialSelection.e}, ${this.spatialSelection.n}`;
1019
+ } else if ("lat" in this.spatialSelection && "lng" in this.spatialSelection) {
1020
+ spatial = `Point: ${this.spatialSelection.lat}, ${this.spatialSelection.lng}`;
1021
+ }
1022
+ }
1023
+ return html`
1024
+ <dl class="params-summary">
1025
+ <div>
1026
+ <dt><strong>Dataset</strong></dt>
1027
+ <dd>${(_b = collection == null ? void 0 : collection.EntryTitle) != null ? _b : "\u2014"}</dd>
1028
+ </div>
1029
+ <div>
1030
+ <dt><strong>Variables</strong></dt>
1031
+ <dd>${variables.map((v) => html`<div>${v}</div>`)}</dd>
1032
+ </div>
1033
+ <div>
1034
+ <dt><strong>Date Range</strong></dt>
1035
+ <dd>${dateRange}</dd>
1036
+ </div>
1037
+ <div>
1038
+ <dt><strong>Spatial</strong></dt>
1039
+ <dd>${spatial}</dd>
1040
+ </div>
1041
+ </dl>
1042
+
1043
+ <terra-button @click=${__privateMethod(this, _refineParameters, refineParameters_fn)}
1044
+ >Refine Parameters</terra-button
1045
+ >
1046
+ `;
1047
+ };
1048
+ _cancelJob = new WeakSet();
1049
+ cancelJob_fn = function() {
1050
+ this.cancelingGetData = true;
1051
+ __privateGet(this, _controller).cancelCurrentJob();
1052
+ };
1053
+ _getData = new WeakSet();
1054
+ getData_fn = function() {
1055
+ this.cancelingGetData = false;
1056
+ __privateMethod(this, _touchAllFields, touchAllFields_fn).call(this);
1057
+ __privateGet(this, _controller).cancelCurrentJob();
1058
+ __privateGet(this, _controller).currentJob = null;
1059
+ __privateGet(this, _controller).jobStatusTask.run();
1060
+ setTimeout(() => {
1061
+ const el = this.renderRoot.querySelector("#job-status-section");
1062
+ el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
1063
+ }, 100);
1064
+ this.refineParameters = false;
1065
+ };
1066
+ _touchAllFields = new WeakSet();
1067
+ touchAllFields_fn = function() {
1068
+ this.touchedFields = /* @__PURE__ */ new Set(["variables", "spatial"]);
1069
+ };
1070
+ _numberOfFilesFoundEstimate = new WeakSet();
1071
+ numberOfFilesFoundEstimate_fn = function() {
1072
+ return Math.floor(
1073
+ __privateGet(this, _controller).currentJob.numInputGranules * __privateGet(this, _controller).currentJob.progress / 100
1074
+ );
1075
+ };
1076
+ _getDocumentationLinks = new WeakSet();
1077
+ getDocumentationLinks_fn = function() {
1078
+ return __privateGet(this, _controller).currentJob.links.filter(
1079
+ (link) => link.rel === "stac-catalog-json"
1080
+ );
1081
+ };
1082
+ _getDataLinks = new WeakSet();
1083
+ getDataLinks_fn = function() {
1084
+ return __privateGet(this, _controller).currentJob.links.filter((link) => link.rel === "data");
1085
+ };
1086
+ _hasAtLeastOneSubsetOption = new WeakSet();
1087
+ hasAtLeastOneSubsetOption_fn = function() {
1088
+ var _a, _b, _c, _d;
1089
+ return ((_a = this.collectionWithServices) == null ? void 0 : _a.bboxSubset) || ((_b = this.collectionWithServices) == null ? void 0 : _b.shapeSubset) || ((_c = this.collectionWithServices) == null ? void 0 : _c.variableSubset) || ((_d = this.collectionWithServices) == null ? void 0 : _d.temporalSubset);
1090
+ };
1091
+ _hasSpatialSubset = new WeakSet();
1092
+ hasSpatialSubset_fn = function() {
1093
+ var _a, _b;
1094
+ return ((_a = this.collectionWithServices) == null ? void 0 : _a.bboxSubset) || ((_b = this.collectionWithServices) == null ? void 0 : _b.shapeSubset);
1095
+ };
1096
+ _renderJobMessage = new WeakSet();
1097
+ renderJobMessage_fn = function() {
1098
+ const warningStatuses = [
1099
+ "canceled" /* CANCELED */,
1100
+ "complete_with_errors" /* COMPLETE_WITH_ERRORS */,
1101
+ "running_with_errors" /* RUNNING_WITH_ERRORS */
1102
+ ];
1103
+ const errorStatuses = ["failed" /* FAILED */];
1104
+ let type = "normal";
1105
+ if (warningStatuses.includes(__privateGet(this, _controller).currentJob.status)) {
1106
+ type = "warning";
1107
+ } else if (errorStatuses.includes(__privateGet(this, _controller).currentJob.status)) {
1108
+ type = "error";
1109
+ }
1110
+ let color, bg;
1111
+ if (type === "error") {
1112
+ color = "#dc3545";
1113
+ bg = "#f8d7da";
1114
+ } else if (type === "warning") {
1115
+ color = "#856404";
1116
+ bg = "#fff3cd";
1117
+ } else {
1118
+ color = "#555";
1119
+ bg = "#f8f9fa";
1120
+ }
1121
+ return html`
1122
+ <div
1123
+ style="
1124
+ margin: 24px 0 16px 0;
1125
+ padding: 16px 20px;
1126
+ border-radius: 6px;
1127
+ background: ${bg};
1128
+ color: ${color};
1129
+ border: 1px solid ${color}22;
1130
+ "
1131
+ >
1132
+ ${__privateGet(this, _controller).currentJob.message}
1133
+ </div>
1134
+ `;
1135
+ };
1136
+ _estimateJobSize = new WeakSet();
1137
+ estimateJobSize_fn = function() {
1138
+ var _a, _b;
1139
+ const collection = (_a = this.collectionWithServices) == null ? void 0 : _a.collection;
1140
+ if (!collection)
1141
+ return;
1142
+ const range = __privateMethod(this, _getCollectionDateRange, getCollectionDateRange_fn).call(this);
1143
+ let startDate;
1144
+ let endDate;
1145
+ let links = (_b = collection.granuleCount) != null ? _b : 0;
1146
+ if (this.selectedDateRange.startDate && this.selectedDateRange.endDate) {
1147
+ startDate = this.selectedDateRange.startDate;
1148
+ endDate = this.selectedDateRange.endDate;
1149
+ } else {
1150
+ startDate = range.startDate;
1151
+ endDate = range.endDate;
1152
+ }
1153
+ if (!startDate || !endDate)
1154
+ return;
1155
+ const start = new Date(startDate);
1156
+ const end = new Date(endDate);
1157
+ const days = Math.floor((end.getTime() - start.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
1158
+ if (range.startDate && range.endDate) {
1159
+ const availableDaysInCollection = Math.floor(
1160
+ (new Date(range.endDate).getTime() - new Date(range.startDate).getTime()) / (1e3 * 60 * 60 * 24)
1161
+ ) + 1;
1162
+ const granulesPerDay = links / availableDaysInCollection;
1163
+ links = Math.ceil(days * granulesPerDay);
1164
+ }
1165
+ return { days, links };
1166
+ };
1167
+ _refineParameters = new WeakSet();
1168
+ refineParameters_fn = function() {
1169
+ this.refineParameters = true;
1170
+ };
1171
+ _toggleDownloadMenu = new WeakSet();
1172
+ toggleDownloadMenu_fn = function(event) {
1173
+ event.stopPropagation();
1174
+ this.showDownloadMenu = !this.showDownloadMenu;
1175
+ };
1176
+ _downloadLinksAsTxt = new WeakSet();
1177
+ downloadLinksAsTxt_fn = function(event) {
1178
+ var _a;
1179
+ event.stopPropagation();
1180
+ if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
1181
+ return;
1182
+ }
1183
+ const dataLinks = __privateMethod(this, _getDataLinks, getDataLinks_fn).call(this);
1184
+ if (dataLinks.length === 0) {
1185
+ return;
1186
+ }
1187
+ const content = dataLinks.map((link) => link.href).join("\n");
1188
+ const blob = new Blob([content], { type: "text/plain" });
1189
+ const url = URL.createObjectURL(blob);
1190
+ const a = document.createElement("a");
1191
+ a.href = url;
1192
+ a.download = `subset_links_${__privateGet(this, _controller).currentJob.jobID}.txt`;
1193
+ document.body.appendChild(a);
1194
+ a.click();
1195
+ document.body.removeChild(a);
1196
+ URL.revokeObjectURL(url);
1197
+ this.showDownloadMenu = false;
1198
+ };
1199
+ _downloadPythonScript = new WeakSet();
1200
+ downloadPythonScript_fn = async function(event) {
1201
+ var _a;
1202
+ event.stopPropagation();
1203
+ if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
1204
+ return;
1205
+ }
1206
+ const response = await fetch(
1207
+ getBasePath("assets/data-subsetter/download_subset_files.py.txt")
1208
+ );
1209
+ if (!response.ok) {
1210
+ alert(
1211
+ "Sorry, there was a problem generating the Python script. We are investigating the issue.\nYou could try using the Jupyter Notebook in the meantime"
1212
+ );
1213
+ }
1214
+ const content = (await response.text()).replace(
1215
+ /{{jobId}}/gi,
1216
+ __privateGet(this, _controller).currentJob.jobID
1217
+ );
1218
+ const blob = new Blob([content], { type: "text/plain" });
1219
+ const url = URL.createObjectURL(blob);
1220
+ const a = document.createElement("a");
1221
+ a.href = url;
1222
+ a.download = `download_subset_files_${__privateGet(this, _controller).currentJob.jobID}.py`;
1223
+ document.body.appendChild(a);
1224
+ a.click();
1225
+ document.body.removeChild(a);
1226
+ URL.revokeObjectURL(url);
1227
+ this.showDownloadMenu = false;
1228
+ };
1229
+ _downloadEarthdataDownload = new WeakSet();
1230
+ downloadEarthdataDownload_fn = async function(event) {
1231
+ var _a;
1232
+ event.stopPropagation();
1233
+ if (!((_a = __privateGet(this, _controller).currentJob) == null ? void 0 : _a.links)) {
1234
+ return;
1235
+ }
1236
+ alert("Sorry, Earthdata Download is not currently supported");
1237
+ this.showDownloadMenu = false;
1238
+ };
1239
+ _handleClickOutside = new WeakSet();
1240
+ handleClickOutside_fn = function(event) {
1241
+ if (!this.showDownloadMenu) {
1242
+ return;
1243
+ }
1244
+ const target = event.target;
1245
+ const downloadDropdown = this.renderRoot.querySelector(".download-dropdown");
1246
+ if (downloadDropdown && !downloadDropdown.contains(target)) {
1247
+ this.showDownloadMenu = false;
1248
+ }
1249
+ };
1250
+ TerraDataSubsetter.styles = [component_styles_default, data_subsetter_styles_default];
1251
+ TerraDataSubsetter.dependencies = {
1252
+ "terra-accordion": TerraAccordion,
1253
+ "terra-date-picker": TerraDatePicker,
1254
+ "terra-icon": TerraIcon,
1255
+ "terra-spatial-picker": TerraSpatialPicker
1256
+ };
1257
+ __decorateClass([
1258
+ property({ reflect: true, attribute: "collection-entry-id" })
1259
+ ], TerraDataSubsetter.prototype, "collectionEntryId", 2);
1260
+ __decorateClass([
1261
+ property({ reflect: true, type: Boolean, attribute: "show-collection-search" })
1262
+ ], TerraDataSubsetter.prototype, "showCollectionSearch", 2);
1263
+ __decorateClass([
1264
+ property({ reflect: true, attribute: "job-id" })
1265
+ ], TerraDataSubsetter.prototype, "jobId", 2);
1266
+ __decorateClass([
1267
+ property({ attribute: "bearer-token" })
1268
+ ], TerraDataSubsetter.prototype, "bearerToken", 2);
1269
+ __decorateClass([
1270
+ state()
1271
+ ], TerraDataSubsetter.prototype, "collectionWithServices", 2);
1272
+ __decorateClass([
1273
+ state()
1274
+ ], TerraDataSubsetter.prototype, "selectedVariables", 2);
1275
+ __decorateClass([
1276
+ state()
1277
+ ], TerraDataSubsetter.prototype, "expandedVariableGroups", 2);
1278
+ __decorateClass([
1279
+ state()
1280
+ ], TerraDataSubsetter.prototype, "touchedFields", 2);
1281
+ __decorateClass([
1282
+ state()
1283
+ ], TerraDataSubsetter.prototype, "spatialSelection", 2);
1284
+ __decorateClass([
1285
+ state()
1286
+ ], TerraDataSubsetter.prototype, "selectedDateRange", 2);
1287
+ __decorateClass([
1288
+ state()
1289
+ ], TerraDataSubsetter.prototype, "selectedFormat", 2);
1290
+ __decorateClass([
1291
+ state()
1292
+ ], TerraDataSubsetter.prototype, "cancelingGetData", 2);
1293
+ __decorateClass([
1294
+ state()
1295
+ ], TerraDataSubsetter.prototype, "selectedTab", 2);
1296
+ __decorateClass([
1297
+ state()
1298
+ ], TerraDataSubsetter.prototype, "refineParameters", 2);
1299
+ __decorateClass([
1300
+ state()
1301
+ ], TerraDataSubsetter.prototype, "showDownloadMenu", 2);
1302
+ __decorateClass([
1303
+ watch(["collectionWithServices"])
1304
+ ], TerraDataSubsetter.prototype, "collectionChanged", 1);
1305
+
1306
+ export {
1307
+ TerraDataSubsetter
1308
+ };