@welldot/core 0.3.0 → 0.4.0-next.20261015.d7c7365
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.
- package/README.md +288 -75
- package/dist/index.cjs +2342 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14060 -4206
- package/dist/index.d.ts +14060 -4206
- package/dist/index.js +2220 -43
- package/dist/index.js.map +1 -1
- package/docs/schema/v2/well.schema.json +1043 -17
- package/docs/spec/v2/format-reference.md +507 -41
- package/docs/spec/v2/interoperability.md +44 -27
- package/docs/spec/v2/object-schemas.md +983 -113
- package/docs/spec/v2/overview.md +122 -6
- package/docs/spec/v2/water-quality.md +483 -0
- package/examples/README.md +83 -0
- package/examples/belem-pa-condominio-outorga.well +961 -0
- package/examples/belem-pa-monitoramento-posto.well +1141 -0
- package/examples/belem-pa-pirabas-abastecimento.well +1751 -0
- package/examples/belem-pa-poco-colmatado.well +496 -0
- package/examples/belem-pa-poco-raso-abandonado.well +388 -0
- package/examples/belem-pa-qualidade-agua-acida.well +895 -0
- package/examples/colatina-es-gnaisse-rural.well +1047 -0
- package/examples/coluna-mg-cristalino-abastecimento.well +1437 -0
- package/examples/estrela-doeste-sp-bauru-serra-geral.well +919 -0
- package/examples/extremoz-rn-barreiras-raso.well +623 -0
- package/examples/gastao-vidigal-sp-dados-inconsistentes.well +222 -0
- package/examples/index.json +452 -0
- package/examples/irece-ba-carste-bambui.well +861 -0
- package/examples/lagoa-santa-mg-carste-abastecimento.well +1087 -0
- package/examples/minas-novas-mg-cadastro-incompleto.well +157 -0
- package/examples/quixeramobim-ce-cristalino-salobro.well +989 -0
- package/examples/rinopolis-sp-estratigrafico-guarani.well +287 -0
- package/examples/santarem-pa-jorrante-alter-do-chao.well +554 -0
- package/examples/sao-gabriel-rs-cacimba.well +360 -0
- package/examples/sete-lagoas-mg-carste-industrial.well +410 -0
- package/examples/thumbs/belem-pa-condominio-outorga.svg +1 -0
- package/examples/thumbs/belem-pa-monitoramento-posto.svg +1 -0
- package/examples/thumbs/belem-pa-pirabas-abastecimento.svg +1 -0
- package/examples/thumbs/belem-pa-poco-colmatado.svg +1 -0
- package/examples/thumbs/belem-pa-poco-raso-abandonado.svg +1 -0
- package/examples/thumbs/belem-pa-qualidade-agua-acida.svg +1 -0
- package/examples/thumbs/colatina-es-gnaisse-rural.svg +1 -0
- package/examples/thumbs/coluna-mg-cristalino-abastecimento.svg +1 -0
- package/examples/thumbs/estrela-doeste-sp-bauru-serra-geral.svg +1 -0
- package/examples/thumbs/extremoz-rn-barreiras-raso.svg +1 -0
- package/examples/thumbs/gastao-vidigal-sp-dados-inconsistentes.svg +1 -0
- package/examples/thumbs/irece-ba-carste-bambui.svg +1 -0
- package/examples/thumbs/lagoa-santa-mg-carste-abastecimento.svg +1 -0
- package/examples/thumbs/minas-novas-mg-cadastro-incompleto.svg +1 -0
- package/examples/thumbs/quixeramobim-ce-cristalino-salobro.svg +1 -0
- package/examples/thumbs/rinopolis-sp-estratigrafico-guarani.svg +1 -0
- package/examples/thumbs/santarem-pa-jorrante-alter-do-chao.svg +1 -0
- package/examples/thumbs/sao-gabriel-rs-cacimba.svg +1 -0
- package/examples/thumbs/sete-lagoas-mg-carste-industrial.svg +1 -0
- package/package.json +5 -3
package/dist/index.cjs
CHANGED
|
@@ -20,63 +20,184 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
AQUIFER_ANALYSIS_METHODS: () => AQUIFER_ANALYSIS_METHODS,
|
|
23
24
|
AirliftEventSchema: () => AirliftEventSchema,
|
|
24
25
|
AquiferAnalysisSchema: () => AquiferAnalysisSchema,
|
|
25
26
|
AttachmentSchema: () => AttachmentSchema,
|
|
27
|
+
BLANK_SAMPLE_TYPES: () => BLANK_SAMPLE_TYPES,
|
|
28
|
+
BR_GM_MS_888_2021: () => BR_GM_MS_888_2021,
|
|
26
29
|
BoreHoleSchema: () => BoreHoleSchema,
|
|
30
|
+
CEMENT_PAD_TYPES: () => CEMENT_PAD_TYPES,
|
|
31
|
+
CENTRALIZER_TYPES: () => CENTRALIZER_TYPES,
|
|
32
|
+
CONDITION_CATEGORIES: () => CONDITION_CATEGORIES,
|
|
33
|
+
CONSTRUCTION_MATERIALS: () => CONSTRUCTION_MATERIALS,
|
|
27
34
|
CaveSchema: () => CaveSchema,
|
|
28
35
|
CementPadSchema: () => CementPadSchema,
|
|
29
36
|
CentralizerSchema: () => CentralizerSchema,
|
|
37
|
+
ConditionFulfillmentSchema: () => ConditionFulfillmentSchema,
|
|
30
38
|
ConstantRateEventSchema: () => ConstantRateEventSchema,
|
|
39
|
+
DOCUMENT_TYPES: () => DOCUMENT_TYPES,
|
|
40
|
+
DOCUMENT_TYPE_SUGGESTIONS: () => DOCUMENT_TYPE_SUGGESTIONS,
|
|
41
|
+
DRILLING_METHODS: () => DRILLING_METHODS,
|
|
42
|
+
ESTIMATION_METHODS: () => ESTIMATION_METHODS,
|
|
43
|
+
EU_2020_2184: () => EU_2020_2184,
|
|
44
|
+
EstimatedVolumeSchema: () => EstimatedVolumeSchema,
|
|
31
45
|
FGDC_TEXTURES_OPTIONS: () => FGDC_TEXTURES_OPTIONS,
|
|
46
|
+
FILTRATION_LOCATION_VALUES: () => FILTRATION_LOCATION_VALUES,
|
|
47
|
+
FRACTION_VALUES: () => FRACTION_VALUES,
|
|
48
|
+
FiltrationSchema: () => FiltrationSchema,
|
|
32
49
|
FractureSchema: () => FractureSchema,
|
|
50
|
+
HISTORY_LOG_CATEGORIES: () => HISTORY_LOG_CATEGORIES,
|
|
51
|
+
HISTORY_LOG_SEVERITIES: () => HISTORY_LOG_SEVERITIES,
|
|
52
|
+
HYDRODYNAMIC_EVENT_TYPES: () => HYDRODYNAMIC_EVENT_TYPES,
|
|
33
53
|
HistoryLogEntrySchema: () => HistoryLogEntrySchema,
|
|
34
54
|
HoleFillSchema: () => HoleFillSchema,
|
|
35
55
|
HydrodynamicEventBaseSchema: () => HydrodynamicEventBaseSchema,
|
|
36
56
|
HydrodynamicEventSchema: () => HydrodynamicEventSchema,
|
|
57
|
+
LaboratorySchema: () => LaboratorySchema,
|
|
37
58
|
LevelReadingSchema: () => LevelReadingSchema,
|
|
38
59
|
LithologySchema: () => LithologySchema,
|
|
39
60
|
LocationPropertiesSchema: () => LocationPropertiesSchema,
|
|
40
61
|
LocationSchema: () => LocationSchema,
|
|
62
|
+
MAINTENANCE_TYPES: () => MAINTENANCE_TYPES,
|
|
63
|
+
MEASURED_IN_VALUES: () => MEASURED_IN_VALUES,
|
|
64
|
+
MEASUREMENT_LOCATIONS: () => MEASUREMENT_LOCATIONS,
|
|
65
|
+
MEASUREMENT_METHODS: () => MEASUREMENT_METHODS,
|
|
66
|
+
METER_TYPES: () => METER_TYPES,
|
|
67
|
+
MeterReadingSchema: () => MeterReadingSchema,
|
|
68
|
+
MeterSchema: () => MeterSchema,
|
|
69
|
+
MonthlyGrantSchema: () => MonthlyGrantSchema,
|
|
70
|
+
NEPHELOMETRIC_TURBIDITY_CODES: () => NEPHELOMETRIC_TURBIDITY_CODES,
|
|
71
|
+
NUMERIC_QUALIFIERS: () => NUMERIC_QUALIFIERS,
|
|
72
|
+
OperatingRegimeSchema: () => OperatingRegimeSchema,
|
|
73
|
+
PARAMETER_GROUPS: () => PARAMETER_GROUPS,
|
|
74
|
+
PARAMETER_GROUP_VALUES: () => PARAMETER_GROUP_VALUES,
|
|
75
|
+
PARENT_SAMPLE_TYPES: () => PARENT_SAMPLE_TYPES,
|
|
76
|
+
PERMIT_ADMINISTRATIVE_STATUSES: () => PERMIT_ADMINISTRATIVE_STATUSES,
|
|
77
|
+
PERMIT_ADMINISTRATIVE_STATUS_VALUES: () => PERMIT_ADMINISTRATIVE_STATUS_VALUES,
|
|
78
|
+
PERMIT_HISTORY_TYPES: () => PERMIT_HISTORY_TYPES,
|
|
79
|
+
PERMIT_TYPES: () => PERMIT_TYPES,
|
|
80
|
+
POWER_SOURCES: () => POWER_SOURCES,
|
|
81
|
+
PRODUCTION_ENTRY_TYPES: () => PRODUCTION_ENTRY_TYPES,
|
|
82
|
+
PUMP_TYPES: () => PUMP_TYPES,
|
|
83
|
+
ParameterSchema: () => ParameterSchema,
|
|
84
|
+
PermitAdministrativeStatusSchema: () => PermitAdministrativeStatusSchema,
|
|
85
|
+
PermitConditionSchema: () => PermitConditionSchema,
|
|
86
|
+
PermitHistoryEntrySchema: () => PermitHistoryEntrySchema,
|
|
87
|
+
PermitSchema: () => PermitSchema,
|
|
88
|
+
ProductionEntryBaseSchema: () => ProductionEntryBaseSchema,
|
|
89
|
+
ProductionEntrySchema: () => ProductionEntrySchema,
|
|
90
|
+
PumpElectricalSchema: () => PumpElectricalSchema,
|
|
91
|
+
PumpInstallationSchema: () => PumpInstallationSchema,
|
|
41
92
|
PumpingStepSchema: () => PumpingStepSchema,
|
|
93
|
+
PurgeReadingSchema: () => PurgeReadingSchema,
|
|
94
|
+
PurgeSchema: () => PurgeSchema,
|
|
95
|
+
QUALIFIER_VALUES: () => QUALIFIER_VALUES,
|
|
96
|
+
READING_SOURCES: () => READING_SOURCES,
|
|
97
|
+
RESULT_FRACTIONS: () => RESULT_FRACTIONS,
|
|
98
|
+
RESULT_QUALIFIERS: () => RESULT_QUALIFIERS,
|
|
42
99
|
RecoveryOnlyEventSchema: () => RecoveryOnlyEventSchema,
|
|
43
100
|
RecoveryPhaseSchema: () => RecoveryPhaseSchema,
|
|
44
101
|
ReductionSchema: () => ReductionSchema,
|
|
102
|
+
ResultQualifierSchema: () => ResultQualifierSchema,
|
|
103
|
+
ResultValidationSchema: () => ResultValidationSchema,
|
|
104
|
+
SAMPLE_TYPES: () => SAMPLE_TYPES,
|
|
105
|
+
SAMPLING_DEVICES: () => SAMPLING_DEVICES,
|
|
106
|
+
SAMPLING_METHODS: () => SAMPLING_METHODS,
|
|
107
|
+
SAMPLING_POINT_TYPES: () => SAMPLING_POINT_TYPES,
|
|
108
|
+
SCREEN_SLOT_TYPES: () => SCREEN_SLOT_TYPES,
|
|
45
109
|
SECTION_KEYS: () => SECTION_KEYS,
|
|
110
|
+
SamplingPointSchema: () => SamplingPointSchema,
|
|
46
111
|
SpotMeasurementEventSchema: () => SpotMeasurementEventSchema,
|
|
47
112
|
StepDrawdownEventSchema: () => StepDrawdownEventSchema,
|
|
48
113
|
SurfaceCaseSchema: () => SurfaceCaseSchema,
|
|
49
114
|
TextureSchema: () => TextureSchema,
|
|
115
|
+
TimeResolutionSchema: () => TimeResolutionSchema,
|
|
116
|
+
VALIDATION_STATUSES: () => VALIDATION_STATUSES,
|
|
117
|
+
VALIDATION_STATUS_VALUES: () => VALIDATION_STATUS_VALUES,
|
|
118
|
+
VISIBILITY_LEAF_KEYS: () => VISIBILITY_LEAF_KEYS,
|
|
119
|
+
VISIBILITY_TREE: () => VISIBILITY_TREE,
|
|
120
|
+
VOLUME_LIMIT_PERIODS: () => VOLUME_LIMIT_PERIODS,
|
|
121
|
+
VolumeLimitSchema: () => VolumeLimitSchema,
|
|
122
|
+
WATER_QUALITY_LIMIT_SETS: () => WATER_QUALITY_LIMIT_SETS,
|
|
123
|
+
WATER_QUALITY_PARAMETERS: () => WATER_QUALITY_PARAMETERS,
|
|
124
|
+
WATER_QUALITY_UNITS: () => WATER_QUALITY_UNITS,
|
|
125
|
+
WATER_QUALITY_VOCABULARY_VERSION: () => WATER_QUALITY_VOCABULARY_VERSION,
|
|
126
|
+
WATER_USES: () => WATER_USES,
|
|
127
|
+
WELL_PURPOSES: () => WELL_PURPOSES,
|
|
128
|
+
WELL_STATUSES: () => WELL_STATUSES,
|
|
129
|
+
WELL_STATUS_VALUES: () => WELL_STATUS_VALUES,
|
|
130
|
+
WELL_TYPES: () => WELL_TYPES,
|
|
131
|
+
WHO_GDWQ_2022: () => WHO_GDWQ_2022,
|
|
132
|
+
WaterQualityResultSchema: () => WaterQualityResultSchema,
|
|
133
|
+
WaterSampleSchema: () => WaterSampleSchema,
|
|
50
134
|
WellCaseSchema: () => WellCaseSchema,
|
|
51
135
|
WellIdSchema: () => WellIdSchema,
|
|
52
136
|
WellSchema: () => WellSchema,
|
|
53
137
|
WellScreenSchema: () => WellScreenSchema,
|
|
138
|
+
WellStatusSchema: () => WellStatusSchema,
|
|
139
|
+
calculatedWellDepth: () => calculatedWellDepth,
|
|
54
140
|
checkIfProfileIsEmpty: () => checkIfProfileIsEmpty,
|
|
141
|
+
concentrationFromCanonical: () => concentrationFromCanonical,
|
|
142
|
+
concentrationToCanonical: () => concentrationToCanonical,
|
|
55
143
|
convertProfileFromJSON: () => convertProfileFromJSON,
|
|
144
|
+
cubicFeetToCubicMeters: () => cubicFeetToCubicMeters,
|
|
56
145
|
cubicMeterPerHourToLitersPerSecond: () => cubicMeterPerHourToLitersPerSecond,
|
|
57
146
|
cubicMeterPerHourToUsGallonsPerMinute: () => cubicMeterPerHourToUsGallonsPerMinute,
|
|
147
|
+
cubicMetersToCubicFeet: () => cubicMetersToCubicFeet,
|
|
148
|
+
cubicMetersToLiters: () => cubicMetersToLiters,
|
|
149
|
+
cubicMetersToUsGallons: () => cubicMetersToUsGallons,
|
|
150
|
+
cvToKilowatts: () => cvToKilowatts,
|
|
58
151
|
decimalDegreesToDms: () => decimalDegreesToDms,
|
|
59
152
|
deserializeWell: () => deserializeWell,
|
|
60
153
|
dmsToDecimalDegrees: () => dmsToDecimalDegrees,
|
|
154
|
+
expandedToStandardUncertainty: () => expandedToStandardUncertainty,
|
|
61
155
|
feetToMeters: () => feetToMeters,
|
|
156
|
+
flowFromCanonical: () => flowFromCanonical,
|
|
157
|
+
flowToCanonical: () => flowToCanonical,
|
|
158
|
+
formatVocabList: () => formatVocabList,
|
|
159
|
+
getLimitSet: () => getLimitSet,
|
|
160
|
+
getParameterDefinition: () => getParameterDefinition,
|
|
161
|
+
getParameterLabel: () => getParameterLabel,
|
|
162
|
+
getVocabEntry: () => getVocabEntry,
|
|
163
|
+
getVocabLabel: () => getVocabLabel,
|
|
164
|
+
hasWellData: () => hasWellData,
|
|
62
165
|
hoursToMinutes: () => hoursToMinutes,
|
|
166
|
+
hpToKilowatts: () => hpToKilowatts,
|
|
63
167
|
inchesToMm: () => inchesToMm,
|
|
168
|
+
isKnownParameter: () => isKnownParameter,
|
|
169
|
+
isVocabValue: () => isVocabValue,
|
|
64
170
|
isWellEmpty: () => isWellEmpty,
|
|
65
171
|
kilopascalToPsi: () => kilopascalToPsi,
|
|
172
|
+
kilowattsToCv: () => kilowattsToCv,
|
|
173
|
+
kilowattsToHp: () => kilowattsToHp,
|
|
66
174
|
litersPerSecondToCubicMeterPerHour: () => litersPerSecondToCubicMeterPerHour,
|
|
175
|
+
litersToCubicMeters: () => litersToCubicMeters,
|
|
67
176
|
metersToFeet: () => metersToFeet,
|
|
177
|
+
milliSiemensPerCmToMicroSiemensPerCm: () => milliSiemensPerCmToMicroSiemensPerCm,
|
|
178
|
+
milliSiemensPerMeterToMicroSiemensPerCm: () => milliSiemensPerMeterToMicroSiemensPerCm,
|
|
68
179
|
minutesToHours: () => minutesToHours,
|
|
69
180
|
mmToInches: () => mmToInches,
|
|
70
181
|
mmToSlotNumber: () => mmToSlotNumber,
|
|
182
|
+
normalizeColorUnit: () => normalizeColorUnit,
|
|
183
|
+
parameterKey: () => parameterKey,
|
|
71
184
|
parseWell: () => parseWell,
|
|
185
|
+
powerFromCanonical: () => powerFromCanonical,
|
|
186
|
+
powerToCanonical: () => powerToCanonical,
|
|
72
187
|
profileToWell: () => profileToWell,
|
|
73
188
|
psiToKilopascal: () => psiToKilopascal,
|
|
74
189
|
redactWell: () => redactWell,
|
|
190
|
+
resolveLanguageText: () => resolveLanguageText,
|
|
75
191
|
serializeWell: () => serializeWell,
|
|
76
192
|
slotNumberToMm: () => slotNumberToMm,
|
|
77
193
|
squareMeterPerDayToSquareMeterPerSecond: () => squareMeterPerDayToSquareMeterPerSecond,
|
|
78
194
|
squareMeterPerSecondToSquareMeterPerDay: () => squareMeterPerSecondToSquareMeterPerDay,
|
|
79
|
-
|
|
195
|
+
turbidityCodeForUnit: () => turbidityCodeForUnit,
|
|
196
|
+
usGallonsPerMinuteToCubicMeterPerHour: () => usGallonsPerMinuteToCubicMeterPerHour,
|
|
197
|
+
usGallonsToCubicMeters: () => usGallonsToCubicMeters,
|
|
198
|
+
vocabValues: () => vocabValues,
|
|
199
|
+
volumeFromCanonical: () => volumeFromCanonical,
|
|
200
|
+
volumeToCanonical: () => volumeToCanonical
|
|
80
201
|
});
|
|
81
202
|
module.exports = __toCommonJS(index_exports);
|
|
82
203
|
|
|
@@ -89,8 +210,31 @@ var mergeWell = (0, import_defu.createDefu)((obj, key, value) => {
|
|
|
89
210
|
return true;
|
|
90
211
|
}
|
|
91
212
|
});
|
|
213
|
+
var isPlainObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
214
|
+
var mergeParsed = (0, import_defu.createDefu)((obj, key, value) => {
|
|
215
|
+
if (Array.isArray(value)) {
|
|
216
|
+
const raw = obj[key];
|
|
217
|
+
obj[key] = Array.isArray(raw) && raw.length === value.length ? value.map(
|
|
218
|
+
(item, i) => isPlainObject(item) && isPlainObject(raw[i]) ? mergeParsed(item, raw[i]) : item
|
|
219
|
+
) : value;
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
92
223
|
var RFC3339_WITH_OFFSET = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
|
|
93
224
|
var rfc3339 = () => import_zod.z.string().regex(RFC3339_WITH_OFFSET, "datetime must be RFC 3339 with UTC offset");
|
|
225
|
+
var CALENDAR_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
226
|
+
var calendarDate = () => import_zod.z.string().regex(CALENDAR_DATE, "date must be YYYY-MM-DD");
|
|
227
|
+
var DATE_DURATION = /^P(?=\d)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?$/;
|
|
228
|
+
var dateDuration = () => import_zod.z.string().regex(DATE_DURATION, "duration must be an ISO 8601 date duration");
|
|
229
|
+
var AttachmentSchema = import_zod.z.object({
|
|
230
|
+
id: import_zod.z.string(),
|
|
231
|
+
uri: import_zod.z.string().url(),
|
|
232
|
+
media_type: import_zod.z.string(),
|
|
233
|
+
document_type: import_zod.z.string().optional(),
|
|
234
|
+
filename: import_zod.z.string().optional(),
|
|
235
|
+
description: import_zod.z.string().optional(),
|
|
236
|
+
sha256: import_zod.z.string().optional()
|
|
237
|
+
});
|
|
94
238
|
var WellIdSchema = import_zod.z.object({
|
|
95
239
|
authority: import_zod.z.string(),
|
|
96
240
|
id: import_zod.z.string(),
|
|
@@ -134,7 +278,8 @@ var WellScreenSchema = import_zod.z.object({
|
|
|
134
278
|
to: import_zod.z.number(),
|
|
135
279
|
type: import_zod.z.string(),
|
|
136
280
|
diameter: import_zod.z.number(),
|
|
137
|
-
screen_slot: import_zod.z.number()
|
|
281
|
+
screen_slot: import_zod.z.number(),
|
|
282
|
+
slot_type: import_zod.z.string().optional()
|
|
138
283
|
});
|
|
139
284
|
var HoleFillSchema = import_zod.z.object({
|
|
140
285
|
from: import_zod.z.number(),
|
|
@@ -212,7 +357,9 @@ var HydrodynamicEventBaseSchema = import_zod.z.object({
|
|
|
212
357
|
sequence: import_zod.z.number().int().optional(),
|
|
213
358
|
operator: import_zod.z.string().optional(),
|
|
214
359
|
equipment: import_zod.z.string().optional(),
|
|
215
|
-
notes: import_zod.z.string().optional()
|
|
360
|
+
notes: import_zod.z.string().optional(),
|
|
361
|
+
corrects: import_zod.z.string().optional(),
|
|
362
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
216
363
|
});
|
|
217
364
|
var SpotMeasurementEventSchema = HydrodynamicEventBaseSchema.extend({
|
|
218
365
|
type: import_zod.z.literal("spot_measurement"),
|
|
@@ -254,14 +401,13 @@ var HydrodynamicEventSchema = import_zod.z.discriminatedUnion("type", [
|
|
|
254
401
|
AirliftEventSchema,
|
|
255
402
|
RecoveryOnlyEventSchema
|
|
256
403
|
]).or(HydrodynamicEventBaseSchema.passthrough());
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
});
|
|
404
|
+
var WellStatusSchema = import_zod.z.enum([
|
|
405
|
+
"active",
|
|
406
|
+
"maintenance",
|
|
407
|
+
"inactive",
|
|
408
|
+
"decommissioned",
|
|
409
|
+
"abandoned"
|
|
410
|
+
]);
|
|
265
411
|
var HistoryLogEntrySchema = import_zod.z.object({
|
|
266
412
|
id: import_zod.z.string(),
|
|
267
413
|
datetime: rfc3339(),
|
|
@@ -270,7 +416,13 @@ var HistoryLogEntrySchema = import_zod.z.object({
|
|
|
270
416
|
description: import_zod.z.string(),
|
|
271
417
|
author: import_zod.z.string().optional(),
|
|
272
418
|
severity: import_zod.z.string().optional(),
|
|
273
|
-
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
419
|
+
attachments: import_zod.z.array(AttachmentSchema).optional(),
|
|
420
|
+
hydrodynamic_event_ids: import_zod.z.array(import_zod.z.string()).optional(),
|
|
421
|
+
sample_ids: import_zod.z.array(import_zod.z.string()).optional(),
|
|
422
|
+
maintenance_type: import_zod.z.string().optional(),
|
|
423
|
+
pump_installation_id: import_zod.z.string().optional(),
|
|
424
|
+
meter_id: import_zod.z.string().optional(),
|
|
425
|
+
status: WellStatusSchema.optional()
|
|
274
426
|
});
|
|
275
427
|
var AquiferAnalysisSchema = import_zod.z.object({
|
|
276
428
|
id: import_zod.z.string(),
|
|
@@ -296,8 +448,297 @@ var AquiferAnalysisSchema = import_zod.z.object({
|
|
|
296
448
|
jacob_b: import_zod.z.number().optional(),
|
|
297
449
|
jacob_c: import_zod.z.number().optional(),
|
|
298
450
|
well_efficiency_pct: import_zod.z.number().optional(),
|
|
451
|
+
notes: import_zod.z.string().optional(),
|
|
452
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
453
|
+
});
|
|
454
|
+
var PumpElectricalSchema = import_zod.z.object({
|
|
455
|
+
voltage: import_zod.z.number().nonnegative().optional(),
|
|
456
|
+
phases: import_zod.z.union([import_zod.z.literal(1), import_zod.z.literal(3)]).optional(),
|
|
457
|
+
cable_section: import_zod.z.number().nonnegative().optional(),
|
|
458
|
+
cable_length: import_zod.z.number().nonnegative().optional()
|
|
459
|
+
});
|
|
460
|
+
var PumpInstallationSchema = import_zod.z.object({
|
|
461
|
+
id: import_zod.z.string(),
|
|
462
|
+
installed_at: rfc3339(),
|
|
463
|
+
removed_at: rfc3339().optional(),
|
|
464
|
+
installed_by: import_zod.z.string().optional(),
|
|
465
|
+
removed_by: import_zod.z.string().optional(),
|
|
466
|
+
type: import_zod.z.string(),
|
|
467
|
+
power_source: import_zod.z.string().optional(),
|
|
468
|
+
manufacturer: import_zod.z.string().optional(),
|
|
469
|
+
model: import_zod.z.string().optional(),
|
|
470
|
+
serial: import_zod.z.string().optional(),
|
|
471
|
+
intake_depth: import_zod.z.number().nonnegative().optional(),
|
|
472
|
+
rated_flow_rate: import_zod.z.number().nonnegative().optional(),
|
|
473
|
+
rated_head: import_zod.z.number().nonnegative().optional(),
|
|
474
|
+
rated_power: import_zod.z.number().nonnegative().optional(),
|
|
475
|
+
stages: import_zod.z.number().int().positive().optional(),
|
|
476
|
+
riser_diameter: import_zod.z.number().nonnegative().optional(),
|
|
477
|
+
riser_material: import_zod.z.string().optional(),
|
|
478
|
+
check_valve: import_zod.z.boolean().optional(),
|
|
479
|
+
electrical: PumpElectricalSchema.optional(),
|
|
480
|
+
notes: import_zod.z.string().optional(),
|
|
481
|
+
updated_at: rfc3339().optional(),
|
|
482
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
483
|
+
});
|
|
484
|
+
var VolumeLimitSchema = import_zod.z.object({
|
|
485
|
+
period: import_zod.z.enum(["daily", "monthly", "annual"]),
|
|
486
|
+
volume: import_zod.z.number().nonnegative()
|
|
487
|
+
});
|
|
488
|
+
var MonthlyGrantSchema = import_zod.z.object({
|
|
489
|
+
month: import_zod.z.number().int().min(1).max(12),
|
|
490
|
+
flow_rate: import_zod.z.number().nonnegative().optional(),
|
|
491
|
+
daily_operating_time: import_zod.z.number().nonnegative().optional(),
|
|
492
|
+
days: import_zod.z.number().int().min(0).max(31).optional()
|
|
493
|
+
});
|
|
494
|
+
var ConditionFulfillmentSchema = import_zod.z.object({
|
|
495
|
+
id: import_zod.z.string(),
|
|
496
|
+
datetime: rfc3339(),
|
|
497
|
+
due_date: calendarDate().optional(),
|
|
498
|
+
description: import_zod.z.string().optional(),
|
|
499
|
+
author: import_zod.z.string().optional(),
|
|
500
|
+
event_id: import_zod.z.string().optional(),
|
|
501
|
+
sample_id: import_zod.z.string().optional(),
|
|
502
|
+
updated_at: rfc3339().optional(),
|
|
503
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
504
|
+
});
|
|
505
|
+
var PermitConditionSchema = import_zod.z.object({
|
|
506
|
+
id: import_zod.z.string(),
|
|
507
|
+
description: import_zod.z.string(),
|
|
508
|
+
category: import_zod.z.string().optional(),
|
|
509
|
+
first_due: calendarDate().optional(),
|
|
510
|
+
due_after: dateDuration().optional(),
|
|
511
|
+
recurrence: dateDuration().optional(),
|
|
512
|
+
last_due: calendarDate().optional(),
|
|
513
|
+
occurrences: import_zod.z.number().int().positive().optional(),
|
|
514
|
+
responsible: import_zod.z.string().optional(),
|
|
515
|
+
fulfillments: import_zod.z.array(ConditionFulfillmentSchema).optional()
|
|
516
|
+
});
|
|
517
|
+
var PermitAdministrativeStatusSchema = import_zod.z.enum([
|
|
518
|
+
"requested",
|
|
519
|
+
"granted",
|
|
520
|
+
"suspended",
|
|
521
|
+
"revoked",
|
|
522
|
+
"denied",
|
|
523
|
+
"withdrawn"
|
|
524
|
+
]);
|
|
525
|
+
var PermitHistoryEntrySchema = import_zod.z.object({
|
|
526
|
+
id: import_zod.z.string(),
|
|
527
|
+
date: calendarDate(),
|
|
528
|
+
type: import_zod.z.string().optional(),
|
|
529
|
+
description: import_zod.z.string(),
|
|
530
|
+
done: import_zod.z.boolean().optional(),
|
|
531
|
+
due_date: calendarDate().optional(),
|
|
532
|
+
updated_at: rfc3339().optional(),
|
|
533
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
534
|
+
});
|
|
535
|
+
var PermitSchema = import_zod.z.object({
|
|
536
|
+
id: import_zod.z.string(),
|
|
537
|
+
type: import_zod.z.string(),
|
|
538
|
+
authority: import_zod.z.string(),
|
|
539
|
+
identifier: import_zod.z.string().optional(),
|
|
540
|
+
request_identifier: import_zod.z.string().optional(),
|
|
541
|
+
status: PermitAdministrativeStatusSchema.optional(),
|
|
542
|
+
issued_at: calendarDate().optional(),
|
|
543
|
+
valid_from: calendarDate().optional(),
|
|
544
|
+
valid_until: calendarDate().optional(),
|
|
545
|
+
renewal_requested_at: calendarDate().optional(),
|
|
546
|
+
water_use: import_zod.z.array(import_zod.z.string()).optional(),
|
|
547
|
+
flow_rate: import_zod.z.number().nonnegative().optional(),
|
|
548
|
+
daily_operating_time: import_zod.z.number().nonnegative().optional(),
|
|
549
|
+
volume_limits: import_zod.z.array(VolumeLimitSchema).optional(),
|
|
550
|
+
monthly_schedule: import_zod.z.array(MonthlyGrantSchema).optional(),
|
|
551
|
+
conditions: import_zod.z.array(PermitConditionSchema).optional(),
|
|
552
|
+
history: import_zod.z.array(PermitHistoryEntrySchema).optional(),
|
|
553
|
+
supersedes: import_zod.z.string().optional(),
|
|
554
|
+
notes: import_zod.z.string().optional(),
|
|
555
|
+
updated_at: rfc3339().optional(),
|
|
556
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
557
|
+
});
|
|
558
|
+
var MeterSchema = import_zod.z.object({
|
|
559
|
+
id: import_zod.z.string(),
|
|
560
|
+
installed_at: rfc3339(),
|
|
561
|
+
removed_at: rfc3339().optional(),
|
|
562
|
+
installed_by: import_zod.z.string().optional(),
|
|
563
|
+
removed_by: import_zod.z.string().optional(),
|
|
564
|
+
type: import_zod.z.string().optional(),
|
|
565
|
+
manufacturer: import_zod.z.string().optional(),
|
|
566
|
+
model: import_zod.z.string().optional(),
|
|
567
|
+
serial: import_zod.z.string().optional(),
|
|
568
|
+
nominal_diameter: import_zod.z.number().nonnegative().optional(),
|
|
569
|
+
max_reading: import_zod.z.number().positive().optional(),
|
|
570
|
+
notes: import_zod.z.string().optional(),
|
|
571
|
+
updated_at: rfc3339().optional(),
|
|
572
|
+
attachments: import_zod.z.array(AttachmentSchema).optional()
|
|
573
|
+
});
|
|
574
|
+
var ProductionEntryBaseSchema = import_zod.z.object({
|
|
575
|
+
id: import_zod.z.string(),
|
|
576
|
+
type: import_zod.z.string(),
|
|
577
|
+
corrects: import_zod.z.string().optional(),
|
|
578
|
+
sequence: import_zod.z.number().int().optional(),
|
|
299
579
|
notes: import_zod.z.string().optional()
|
|
300
580
|
});
|
|
581
|
+
var MeterReadingSchema = ProductionEntryBaseSchema.extend({
|
|
582
|
+
type: import_zod.z.literal("meter_reading"),
|
|
583
|
+
datetime: rfc3339(),
|
|
584
|
+
meter_id: import_zod.z.string(),
|
|
585
|
+
reading: import_zod.z.number().nonnegative(),
|
|
586
|
+
source: import_zod.z.string().optional()
|
|
587
|
+
});
|
|
588
|
+
var EstimatedVolumeSchema = ProductionEntryBaseSchema.extend({
|
|
589
|
+
type: import_zod.z.literal("estimated_volume"),
|
|
590
|
+
period_start: rfc3339(),
|
|
591
|
+
period_end: rfc3339(),
|
|
592
|
+
volume: import_zod.z.number().nonnegative(),
|
|
593
|
+
method: import_zod.z.string().optional()
|
|
594
|
+
});
|
|
595
|
+
var PRODUCTION_TYPES = ["meter_reading", "estimated_volume"];
|
|
596
|
+
var ProductionEntrySchema = import_zod.z.discriminatedUnion("type", [MeterReadingSchema, EstimatedVolumeSchema]).or(
|
|
597
|
+
ProductionEntryBaseSchema.passthrough().refine(
|
|
598
|
+
(e) => !PRODUCTION_TYPES.includes(e.type),
|
|
599
|
+
{ message: "malformed production entry" }
|
|
600
|
+
)
|
|
601
|
+
);
|
|
602
|
+
var OperatingRegimeSchema = import_zod.z.object({
|
|
603
|
+
id: import_zod.z.string(),
|
|
604
|
+
effective_from: rfc3339(),
|
|
605
|
+
flow_rate: import_zod.z.number().nonnegative().optional(),
|
|
606
|
+
daily_operating_time: import_zod.z.number().min(0).max(24).optional(),
|
|
607
|
+
days_per_week: import_zod.z.number().int().min(1).max(7).optional(),
|
|
608
|
+
notes: import_zod.z.string().optional(),
|
|
609
|
+
updated_at: rfc3339().optional()
|
|
610
|
+
});
|
|
611
|
+
var PARAMETER_VOCABULARY = /^(welldot|cas|x-.+)$/;
|
|
612
|
+
var ParameterSchema = import_zod.z.object({
|
|
613
|
+
code: import_zod.z.string().min(1),
|
|
614
|
+
vocabulary: import_zod.z.string().regex(PARAMETER_VOCABULARY, "vocabulary must be welldot, cas or x-\u2026")
|
|
615
|
+
});
|
|
616
|
+
var TimeResolutionSchema = import_zod.z.literal("day");
|
|
617
|
+
var SamplingPointSchema = import_zod.z.object({
|
|
618
|
+
type: import_zod.z.string(),
|
|
619
|
+
depth: import_zod.z.number().nonnegative().optional(),
|
|
620
|
+
depth_precision: import_zod.z.number().nonnegative().optional(),
|
|
621
|
+
from: import_zod.z.number().nonnegative().optional(),
|
|
622
|
+
to: import_zod.z.number().nonnegative().optional(),
|
|
623
|
+
device: import_zod.z.string().optional(),
|
|
624
|
+
pump_installation_id: import_zod.z.string().optional()
|
|
625
|
+
}).refine(
|
|
626
|
+
(p) => !(p.depth !== void 0 && (p.from !== void 0 || p.to !== void 0)),
|
|
627
|
+
{ message: "depth and from/to are mutually exclusive" }
|
|
628
|
+
);
|
|
629
|
+
var PurgeReadingSchema = import_zod.z.object({
|
|
630
|
+
elapsed: import_zod.z.number().nonnegative(),
|
|
631
|
+
parameter: ParameterSchema,
|
|
632
|
+
value: import_zod.z.number()
|
|
633
|
+
});
|
|
634
|
+
var PurgeSchema = import_zod.z.object({
|
|
635
|
+
duration: import_zod.z.number().nonnegative().optional(),
|
|
636
|
+
volume: import_zod.z.number().nonnegative().optional(),
|
|
637
|
+
flow_rate: import_zod.z.number().nonnegative().optional(),
|
|
638
|
+
stabilized: import_zod.z.boolean().optional(),
|
|
639
|
+
readings: import_zod.z.array(PurgeReadingSchema).optional()
|
|
640
|
+
});
|
|
641
|
+
var LaboratorySchema = import_zod.z.object({
|
|
642
|
+
name: import_zod.z.string(),
|
|
643
|
+
accreditation: import_zod.z.string().optional(),
|
|
644
|
+
report_number: import_zod.z.string().optional(),
|
|
645
|
+
batch_id: import_zod.z.string().optional(),
|
|
646
|
+
sample_id: import_zod.z.string().optional(),
|
|
647
|
+
received_at: rfc3339().optional(),
|
|
648
|
+
received_at_resolution: TimeResolutionSchema.optional(),
|
|
649
|
+
received_temperature: import_zod.z.number().optional()
|
|
650
|
+
});
|
|
651
|
+
var FiltrationSchema = import_zod.z.object({
|
|
652
|
+
pore_size: import_zod.z.number().positive().optional(),
|
|
653
|
+
location: import_zod.z.enum(["field", "lab"]).optional()
|
|
654
|
+
});
|
|
655
|
+
var ResultValidationSchema = import_zod.z.object({
|
|
656
|
+
status: import_zod.z.enum(["unvalidated", "validated", "qualified", "rejected"]),
|
|
657
|
+
qualifier: import_zod.z.string().optional(),
|
|
658
|
+
guideline: import_zod.z.string().optional(),
|
|
659
|
+
validated_by: import_zod.z.string().optional(),
|
|
660
|
+
validated_at: rfc3339().optional()
|
|
661
|
+
});
|
|
662
|
+
var ResultQualifierSchema = import_zod.z.enum([
|
|
663
|
+
"<",
|
|
664
|
+
">",
|
|
665
|
+
"not_detected",
|
|
666
|
+
"estimated"
|
|
667
|
+
]);
|
|
668
|
+
var WaterQualityResultSchema = import_zod.z.object({
|
|
669
|
+
parameter: ParameterSchema,
|
|
670
|
+
value: import_zod.z.number().optional(),
|
|
671
|
+
presence: import_zod.z.boolean().optional(),
|
|
672
|
+
text: import_zod.z.string().optional(),
|
|
673
|
+
qualifier: ResultQualifierSchema.optional(),
|
|
674
|
+
unit: import_zod.z.string().min(1).optional(),
|
|
675
|
+
detection_limit: import_zod.z.number().nonnegative().optional(),
|
|
676
|
+
quantification_limit: import_zod.z.number().nonnegative().optional(),
|
|
677
|
+
value_precision: import_zod.z.number().nonnegative().optional(),
|
|
678
|
+
fraction: import_zod.z.enum(["total", "dissolved", "suspended"]).optional(),
|
|
679
|
+
filtration: FiltrationSchema.optional(),
|
|
680
|
+
measured_in: import_zod.z.enum(["field", "lab"]).optional(),
|
|
681
|
+
method: import_zod.z.string().optional(),
|
|
682
|
+
analyzed_at: rfc3339().optional(),
|
|
683
|
+
analyzed_at_resolution: TimeResolutionSchema.optional(),
|
|
684
|
+
lab_flags: import_zod.z.array(import_zod.z.string()).optional(),
|
|
685
|
+
validation: ResultValidationSchema.optional(),
|
|
686
|
+
notes: import_zod.z.string().optional()
|
|
687
|
+
}).superRefine((r, ctx) => {
|
|
688
|
+
const forms = [r.value, r.presence, r.text].filter(
|
|
689
|
+
(v) => v !== void 0
|
|
690
|
+
).length;
|
|
691
|
+
if (r.qualifier === "not_detected") {
|
|
692
|
+
if (forms !== 0)
|
|
693
|
+
ctx.addIssue({
|
|
694
|
+
code: import_zod.z.ZodIssueCode.custom,
|
|
695
|
+
message: "not_detected results carry no value form"
|
|
696
|
+
});
|
|
697
|
+
} else if (forms !== 1) {
|
|
698
|
+
ctx.addIssue({
|
|
699
|
+
code: import_zod.z.ZodIssueCode.custom,
|
|
700
|
+
message: "result must have exactly one of value, presence or text"
|
|
701
|
+
});
|
|
702
|
+
} else if (r.qualifier !== void 0 && r.value === void 0) {
|
|
703
|
+
ctx.addIssue({
|
|
704
|
+
code: import_zod.z.ZodIssueCode.custom,
|
|
705
|
+
message: `qualifier ${r.qualifier} requires a numeric value`
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
const custom = r.parameter.vocabulary.startsWith("x-");
|
|
709
|
+
if (custom && r.unit === void 0)
|
|
710
|
+
ctx.addIssue({
|
|
711
|
+
code: import_zod.z.ZodIssueCode.custom,
|
|
712
|
+
path: ["unit"],
|
|
713
|
+
message: "unit is required for x- vocabularies"
|
|
714
|
+
});
|
|
715
|
+
if (!custom && r.unit !== void 0)
|
|
716
|
+
ctx.addIssue({
|
|
717
|
+
code: import_zod.z.ZodIssueCode.custom,
|
|
718
|
+
path: ["unit"],
|
|
719
|
+
message: "unit is forbidden for welldot and cas parameters"
|
|
720
|
+
});
|
|
721
|
+
});
|
|
722
|
+
var WaterSampleSchema = import_zod.z.object({
|
|
723
|
+
id: import_zod.z.string(),
|
|
724
|
+
datetime: rfc3339(),
|
|
725
|
+
sample_type: import_zod.z.string(),
|
|
726
|
+
parent_sample_id: import_zod.z.string().optional(),
|
|
727
|
+
sequence: import_zod.z.number().int().optional(),
|
|
728
|
+
campaign: import_zod.z.string().optional(),
|
|
729
|
+
sampling_method: import_zod.z.string().optional(),
|
|
730
|
+
sampling_point: SamplingPointSchema.optional(),
|
|
731
|
+
purge: PurgeSchema.optional(),
|
|
732
|
+
static_level_event_id: import_zod.z.string().optional(),
|
|
733
|
+
collected_by: import_zod.z.string().optional(),
|
|
734
|
+
preservation: import_zod.z.string().optional(),
|
|
735
|
+
chain_of_custody: import_zod.z.string().optional(),
|
|
736
|
+
laboratory: LaboratorySchema.optional(),
|
|
737
|
+
corrects: import_zod.z.string().optional(),
|
|
738
|
+
notes: import_zod.z.string().optional(),
|
|
739
|
+
attachments: import_zod.z.array(AttachmentSchema).optional(),
|
|
740
|
+
results: import_zod.z.array(WaterQualityResultSchema).min(1)
|
|
741
|
+
});
|
|
301
742
|
var WellSchema = import_zod.z.object({
|
|
302
743
|
version: import_zod.z.number().int(),
|
|
303
744
|
"@context": import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.unknown()), import_zod.z.record(import_zod.z.unknown())]).optional(),
|
|
@@ -312,7 +753,7 @@ var WellSchema = import_zod.z.object({
|
|
|
312
753
|
well_purpose: import_zod.z.array(import_zod.z.string()).optional(),
|
|
313
754
|
name: import_zod.z.string().optional(),
|
|
314
755
|
well_driller: import_zod.z.string().optional(),
|
|
315
|
-
construction_date: import_zod.z.string().regex(
|
|
756
|
+
construction_date: import_zod.z.string().regex(CALENDAR_DATE, "construction_date must be YYYY-MM-DD").optional(),
|
|
316
757
|
obs: import_zod.z.string().optional(),
|
|
317
758
|
lat: import_zod.z.number().optional(),
|
|
318
759
|
lng: import_zod.z.number().optional(),
|
|
@@ -331,7 +772,14 @@ var WellSchema = import_zod.z.object({
|
|
|
331
772
|
caves: import_zod.z.array(CaveSchema),
|
|
332
773
|
hydrodynamic_events: import_zod.z.array(HydrodynamicEventSchema).optional(),
|
|
333
774
|
aquifer_analysis: import_zod.z.array(AquiferAnalysisSchema).optional(),
|
|
334
|
-
history_logs: import_zod.z.array(HistoryLogEntrySchema).optional()
|
|
775
|
+
history_logs: import_zod.z.array(HistoryLogEntrySchema).optional(),
|
|
776
|
+
attachments: import_zod.z.array(AttachmentSchema).optional(),
|
|
777
|
+
pump_installations: import_zod.z.array(PumpInstallationSchema).optional(),
|
|
778
|
+
permits: import_zod.z.array(PermitSchema).optional(),
|
|
779
|
+
meters: import_zod.z.array(MeterSchema).optional(),
|
|
780
|
+
production: import_zod.z.array(ProductionEntrySchema).optional(),
|
|
781
|
+
operating_regime: import_zod.z.array(OperatingRegimeSchema).optional(),
|
|
782
|
+
water_samples: import_zod.z.array(WaterSampleSchema).optional()
|
|
335
783
|
}).passthrough();
|
|
336
784
|
function normalizeV1Fields(raw) {
|
|
337
785
|
const out = { ...raw };
|
|
@@ -403,7 +851,7 @@ function parseWell(json) {
|
|
|
403
851
|
}
|
|
404
852
|
if (version === 1) {
|
|
405
853
|
const normalized = normalizeV1Fields(raw);
|
|
406
|
-
return
|
|
854
|
+
return mergeParsed(
|
|
407
855
|
WellSchema.parse(normalized),
|
|
408
856
|
normalized
|
|
409
857
|
);
|
|
@@ -413,19 +861,56 @@ function parseWell(json) {
|
|
|
413
861
|
} else {
|
|
414
862
|
raw.version = 2;
|
|
415
863
|
}
|
|
416
|
-
return
|
|
864
|
+
return mergeParsed(WellSchema.parse(raw), raw);
|
|
417
865
|
}
|
|
418
866
|
|
|
419
867
|
// src/utils/well.utils.ts
|
|
420
868
|
var WELL_FORMAT_VERSION = 2;
|
|
421
869
|
var INCHES_TO_MM = 25.4;
|
|
870
|
+
var LEGACY_ROOT_KEYS = /* @__PURE__ */ new Set([
|
|
871
|
+
"lat",
|
|
872
|
+
"lng",
|
|
873
|
+
"elevation",
|
|
874
|
+
"bole_hole",
|
|
875
|
+
"constructive",
|
|
876
|
+
"geologic"
|
|
877
|
+
]);
|
|
422
878
|
var SECTION_KEYS = [
|
|
423
879
|
"general",
|
|
424
880
|
"constructive",
|
|
425
881
|
"geology",
|
|
426
882
|
"hydrodynamic",
|
|
427
|
-
"history"
|
|
883
|
+
"history",
|
|
884
|
+
"operation",
|
|
885
|
+
"water_quality"
|
|
428
886
|
];
|
|
887
|
+
var VISIBILITY_TREE = {
|
|
888
|
+
general: ["identification", "location", "obs", "attachments"],
|
|
889
|
+
constructive: [
|
|
890
|
+
"bore_hole",
|
|
891
|
+
"surface_case",
|
|
892
|
+
"well_case",
|
|
893
|
+
"reduction",
|
|
894
|
+
"well_screen",
|
|
895
|
+
"hole_fill",
|
|
896
|
+
"centralizers",
|
|
897
|
+
"cement_pad"
|
|
898
|
+
],
|
|
899
|
+
geology: ["lithology", "fractures", "caves"],
|
|
900
|
+
hydrodynamic: ["hydrodynamic_events", "aquifer_analysis"],
|
|
901
|
+
history: [],
|
|
902
|
+
operation: [
|
|
903
|
+
"pump_installations",
|
|
904
|
+
"meters",
|
|
905
|
+
"operating_regime",
|
|
906
|
+
"production",
|
|
907
|
+
"permits"
|
|
908
|
+
],
|
|
909
|
+
water_quality: []
|
|
910
|
+
};
|
|
911
|
+
var VISIBILITY_LEAF_KEYS = SECTION_KEYS.flatMap(
|
|
912
|
+
(section) => VISIBILITY_TREE[section].length ? VISIBILITY_TREE[section] : [section]
|
|
913
|
+
);
|
|
429
914
|
var EMPTY_WELL = {
|
|
430
915
|
version: 2,
|
|
431
916
|
bore_hole: [],
|
|
@@ -572,6 +1057,27 @@ function decodeV2Well(raw) {
|
|
|
572
1057
|
},
|
|
573
1058
|
...raw.history_logs !== void 0 && {
|
|
574
1059
|
history_logs: raw.history_logs
|
|
1060
|
+
},
|
|
1061
|
+
...raw.attachments !== void 0 && {
|
|
1062
|
+
attachments: raw.attachments
|
|
1063
|
+
},
|
|
1064
|
+
...raw.pump_installations !== void 0 && {
|
|
1065
|
+
pump_installations: raw.pump_installations
|
|
1066
|
+
},
|
|
1067
|
+
...raw.permits !== void 0 && {
|
|
1068
|
+
permits: raw.permits
|
|
1069
|
+
},
|
|
1070
|
+
...raw.meters !== void 0 && {
|
|
1071
|
+
meters: raw.meters
|
|
1072
|
+
},
|
|
1073
|
+
...raw.production !== void 0 && {
|
|
1074
|
+
production: raw.production
|
|
1075
|
+
},
|
|
1076
|
+
...raw.operating_regime !== void 0 && {
|
|
1077
|
+
operating_regime: raw.operating_regime
|
|
1078
|
+
},
|
|
1079
|
+
...raw.water_samples !== void 0 && {
|
|
1080
|
+
water_samples: raw.water_samples
|
|
575
1081
|
}
|
|
576
1082
|
};
|
|
577
1083
|
return mergeWell(decoded, raw);
|
|
@@ -613,6 +1119,11 @@ function normalizeGeologic(raw) {
|
|
|
613
1119
|
caves: raw.caves ?? []
|
|
614
1120
|
};
|
|
615
1121
|
}
|
|
1122
|
+
function unknownRootKeys(well) {
|
|
1123
|
+
return Object.keys(well).filter(
|
|
1124
|
+
(key) => !(key in WellSchema.shape) && !LEGACY_ROOT_KEYS.has(key)
|
|
1125
|
+
);
|
|
1126
|
+
}
|
|
616
1127
|
function serializeWell(well) {
|
|
617
1128
|
const payload = {
|
|
618
1129
|
version: WELL_FORMAT_VERSION,
|
|
@@ -650,8 +1161,25 @@ function serializeWell(well) {
|
|
|
650
1161
|
...well.aquifer_analysis !== void 0 && {
|
|
651
1162
|
aquifer_analysis: well.aquifer_analysis
|
|
652
1163
|
},
|
|
653
|
-
...well.history_logs !== void 0 && { history_logs: well.history_logs }
|
|
1164
|
+
...well.history_logs !== void 0 && { history_logs: well.history_logs },
|
|
1165
|
+
...well.attachments !== void 0 && { attachments: well.attachments },
|
|
1166
|
+
...well.pump_installations !== void 0 && {
|
|
1167
|
+
pump_installations: well.pump_installations
|
|
1168
|
+
},
|
|
1169
|
+
...well.permits !== void 0 && { permits: well.permits },
|
|
1170
|
+
...well.meters !== void 0 && { meters: well.meters },
|
|
1171
|
+
...well.production !== void 0 && { production: well.production },
|
|
1172
|
+
...well.operating_regime !== void 0 && {
|
|
1173
|
+
operating_regime: well.operating_regime
|
|
1174
|
+
},
|
|
1175
|
+
...well.water_samples !== void 0 && {
|
|
1176
|
+
water_samples: well.water_samples
|
|
1177
|
+
}
|
|
654
1178
|
};
|
|
1179
|
+
for (const key of unknownRootKeys(well)) {
|
|
1180
|
+
const value = well[key];
|
|
1181
|
+
if (value !== void 0) payload[key] = value;
|
|
1182
|
+
}
|
|
655
1183
|
return JSON.stringify(payload);
|
|
656
1184
|
}
|
|
657
1185
|
function isWellEmpty(well) {
|
|
@@ -660,43 +1188,68 @@ function isWellEmpty(well) {
|
|
|
660
1188
|
if (raw.constructive || raw.geologic) return false;
|
|
661
1189
|
return well.lithology?.length === 0 && well.fractures?.length === 0 && well.caves?.length === 0 && well.bore_hole?.length === 0 && well.hole_fill?.length === 0 && well.well_case?.length === 0 && well.well_screen?.length === 0;
|
|
662
1190
|
}
|
|
1191
|
+
function isFilled(value) {
|
|
1192
|
+
if (value === void 0 || value === null) return false;
|
|
1193
|
+
if (typeof value === "string") return value.trim() !== "";
|
|
1194
|
+
if (typeof value === "number") return value !== 0;
|
|
1195
|
+
if (Array.isArray(value)) return value.length > 0;
|
|
1196
|
+
if (typeof value === "object") return Object.values(value).some(isFilled);
|
|
1197
|
+
return true;
|
|
1198
|
+
}
|
|
1199
|
+
var NON_DATA_ROOT_KEYS = /* @__PURE__ */ new Set(["version", "$schema", "@context"]);
|
|
1200
|
+
function hasWellData(well) {
|
|
1201
|
+
if (!well) return false;
|
|
1202
|
+
if (!isWellEmpty(well)) return true;
|
|
1203
|
+
return Object.entries(well).some(
|
|
1204
|
+
([key, value]) => !NON_DATA_ROOT_KEYS.has(key) && isFilled(value)
|
|
1205
|
+
);
|
|
1206
|
+
}
|
|
663
1207
|
function redactWell(well, visibility) {
|
|
1208
|
+
const v = visibility;
|
|
664
1209
|
const redacted = { ...well };
|
|
665
|
-
|
|
1210
|
+
const sectionOf = (field) => SECTION_KEYS.find((s) => VISIBILITY_TREE[s].includes(field));
|
|
1211
|
+
const hidden = (key) => v[key] === false || !SECTION_KEYS.includes(key) && v[sectionOf(key)] === false;
|
|
1212
|
+
const sectionHidden = (section) => v[section] === false || VISIBILITY_TREE[section].length > 0 && VISIBILITY_TREE[section].every((f) => v[f] === false);
|
|
1213
|
+
if (hidden("identification")) {
|
|
666
1214
|
delete redacted.well_id;
|
|
667
|
-
delete redacted.location;
|
|
668
1215
|
delete redacted.well_type;
|
|
669
1216
|
delete redacted.well_purpose;
|
|
670
1217
|
delete redacted.name;
|
|
671
1218
|
delete redacted.well_driller;
|
|
672
1219
|
delete redacted.construction_date;
|
|
673
|
-
|
|
1220
|
+
}
|
|
1221
|
+
if (hidden("location")) {
|
|
1222
|
+
delete redacted.location;
|
|
674
1223
|
delete redacted.lat;
|
|
675
1224
|
delete redacted.lng;
|
|
676
1225
|
delete redacted.elevation;
|
|
677
1226
|
}
|
|
678
|
-
if (
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
if (
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
if (
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
if (
|
|
699
|
-
|
|
1227
|
+
if (hidden("obs")) delete redacted.obs;
|
|
1228
|
+
if (hidden("attachments")) delete redacted.attachments;
|
|
1229
|
+
if (hidden("bore_hole")) redacted.bore_hole = [];
|
|
1230
|
+
if (hidden("surface_case")) redacted.surface_case = [];
|
|
1231
|
+
if (hidden("well_case")) redacted.well_case = [];
|
|
1232
|
+
if (hidden("reduction")) redacted.reduction = [];
|
|
1233
|
+
if (hidden("well_screen")) redacted.well_screen = [];
|
|
1234
|
+
if (hidden("hole_fill")) redacted.hole_fill = [];
|
|
1235
|
+
if (hidden("centralizers")) delete redacted.centralizers;
|
|
1236
|
+
if (hidden("cement_pad")) delete redacted.cement_pad;
|
|
1237
|
+
if (sectionHidden("constructive")) delete redacted.well_depth;
|
|
1238
|
+
if (hidden("lithology")) redacted.lithology = [];
|
|
1239
|
+
if (hidden("fractures")) redacted.fractures = [];
|
|
1240
|
+
if (hidden("caves")) redacted.caves = [];
|
|
1241
|
+
if (hidden("hydrodynamic_events")) redacted.hydrodynamic_events = [];
|
|
1242
|
+
if (hidden("aquifer_analysis")) redacted.aquifer_analysis = [];
|
|
1243
|
+
if (hidden("history")) redacted.history_logs = [];
|
|
1244
|
+
if (hidden("pump_installations")) delete redacted.pump_installations;
|
|
1245
|
+
if (hidden("meters")) delete redacted.meters;
|
|
1246
|
+
if (hidden("operating_regime")) delete redacted.operating_regime;
|
|
1247
|
+
if (hidden("production")) delete redacted.production;
|
|
1248
|
+
if (hidden("permits")) delete redacted.permits;
|
|
1249
|
+
if (hidden("water_quality")) delete redacted.water_samples;
|
|
1250
|
+
if (Object.values(v).some((shown) => shown === false)) {
|
|
1251
|
+
for (const key of unknownRootKeys(redacted))
|
|
1252
|
+
delete redacted[key];
|
|
700
1253
|
}
|
|
701
1254
|
return redacted;
|
|
702
1255
|
}
|
|
@@ -1051,6 +1604,1521 @@ var FGDC_TEXTURES_OPTIONS = [
|
|
|
1051
1604
|
{ code: 733, label: "Ore" }
|
|
1052
1605
|
];
|
|
1053
1606
|
|
|
1607
|
+
// src/vocab/waterQuality.limits.ts
|
|
1608
|
+
var NEPHELOMETRIC_TURBIDITY_CODES = [
|
|
1609
|
+
"turbidity",
|
|
1610
|
+
"turbidity_ntu",
|
|
1611
|
+
"turbidity_fnu"
|
|
1612
|
+
];
|
|
1613
|
+
var WHO_GDWQ_2022 = {
|
|
1614
|
+
id: "who_gdwq_2022",
|
|
1615
|
+
name: "WHO Guidelines for Drinking-water Quality (2022)",
|
|
1616
|
+
jurisdiction: "INT",
|
|
1617
|
+
source: "WHO, Guidelines for drinking-water quality: 4th edition incorporating the first and second addenda, 2022",
|
|
1618
|
+
limits: [
|
|
1619
|
+
{ code: "antimony", max: 0.02, basis: "health" },
|
|
1620
|
+
{ code: "arsenic", max: 0.01, basis: "health", note: "provisional" },
|
|
1621
|
+
{ code: "barium", max: 1.3, basis: "health" },
|
|
1622
|
+
{ code: "boron", max: 2.4, basis: "health" },
|
|
1623
|
+
{ code: "cadmium", max: 3e-3, basis: "health" },
|
|
1624
|
+
{ code: "chromium", max: 0.05, basis: "health", note: "provisional" },
|
|
1625
|
+
{ code: "copper", max: 2, basis: "health" },
|
|
1626
|
+
{ code: "fluoride", max: 1.5, basis: "health" },
|
|
1627
|
+
{ code: "lead", max: 0.01, basis: "health", note: "provisional" },
|
|
1628
|
+
{ code: "manganese", max: 0.08, basis: "health", note: "provisional" },
|
|
1629
|
+
{ code: "mercury", max: 6e-3, basis: "health", note: "inorganic mercury" },
|
|
1630
|
+
{ code: "nickel", max: 0.07, basis: "health" },
|
|
1631
|
+
{ code: "nitrate_as_no3", max: 50, basis: "health" },
|
|
1632
|
+
{ code: "nitrite_as_no2", max: 3, basis: "health" },
|
|
1633
|
+
{ code: "selenium", max: 0.04, basis: "health", note: "provisional" },
|
|
1634
|
+
{ code: "uranium", max: 0.03, basis: "health", note: "provisional" },
|
|
1635
|
+
{ code: "e_coli", presence_allowed: false, basis: "health" },
|
|
1636
|
+
{
|
|
1637
|
+
code: "thermotolerant_coliforms",
|
|
1638
|
+
presence_allowed: false,
|
|
1639
|
+
basis: "health"
|
|
1640
|
+
},
|
|
1641
|
+
{ code: "gross_alpha", max: 0.5, basis: "health", note: "screening level" },
|
|
1642
|
+
{ code: "gross_beta", max: 1, basis: "health", note: "screening level" }
|
|
1643
|
+
]
|
|
1644
|
+
};
|
|
1645
|
+
var BR_GM_MS_888_2021 = {
|
|
1646
|
+
id: "br_gm_ms_888_2021",
|
|
1647
|
+
name: "Brasil \u2014 Portaria GM/MS 888/2021",
|
|
1648
|
+
jurisdiction: "BR",
|
|
1649
|
+
source: "Minist\xE9rio da Sa\xFAde, Portaria GM/MS n\xBA 888, de 4 de maio de 2021",
|
|
1650
|
+
limits: [
|
|
1651
|
+
// Inorganic substances (health)
|
|
1652
|
+
{ code: "antimony", max: 6e-3, basis: "health" },
|
|
1653
|
+
{ code: "arsenic", max: 0.01, basis: "health" },
|
|
1654
|
+
{ code: "barium", max: 0.7, basis: "health" },
|
|
1655
|
+
{ code: "cadmium", max: 3e-3, basis: "health" },
|
|
1656
|
+
{ code: "lead", max: 0.01, basis: "health" },
|
|
1657
|
+
{ code: "cyanide_total_as_cn", max: 0.07, basis: "health" },
|
|
1658
|
+
{ code: "copper", max: 2, basis: "health" },
|
|
1659
|
+
{ code: "chromium", max: 0.05, basis: "health" },
|
|
1660
|
+
{ code: "fluoride", max: 1.5, basis: "health" },
|
|
1661
|
+
{ code: "mercury", max: 1e-3, basis: "health" },
|
|
1662
|
+
{ code: "nickel", max: 0.07, basis: "health" },
|
|
1663
|
+
{ code: "nitrate_as_n", max: 10, basis: "health" },
|
|
1664
|
+
{ code: "nitrite_as_n", max: 1, basis: "health" },
|
|
1665
|
+
{ code: "selenium", max: 0.04, basis: "health" },
|
|
1666
|
+
{ code: "uranium", max: 0.03, basis: "health" },
|
|
1667
|
+
// Organoleptic standard
|
|
1668
|
+
{ code: "aluminum", max: 0.2, basis: "aesthetic" },
|
|
1669
|
+
{ code: "ammonia_as_nh3", max: 1.2, basis: "aesthetic" },
|
|
1670
|
+
{ code: "chloride", max: 250, basis: "aesthetic" },
|
|
1671
|
+
{ code: "apparent_color", max: 15, basis: "aesthetic" },
|
|
1672
|
+
{ code: "hardness_total_as_caco3", max: 300, basis: "aesthetic" },
|
|
1673
|
+
{ code: "iron", max: 0.3, basis: "aesthetic" },
|
|
1674
|
+
{ code: "manganese", max: 0.1, basis: "aesthetic" },
|
|
1675
|
+
{ code: "sodium", max: 200, basis: "aesthetic" },
|
|
1676
|
+
{ code: "total_dissolved_solids", max: 500, basis: "aesthetic" },
|
|
1677
|
+
{ code: "sulfate", max: 250, basis: "aesthetic" },
|
|
1678
|
+
{
|
|
1679
|
+
code: "turbidity",
|
|
1680
|
+
max: 5,
|
|
1681
|
+
basis: "aesthetic",
|
|
1682
|
+
note: "organoleptic standard (uT)"
|
|
1683
|
+
},
|
|
1684
|
+
// Operational
|
|
1685
|
+
{
|
|
1686
|
+
code: "ph",
|
|
1687
|
+
min: 6,
|
|
1688
|
+
max: 9,
|
|
1689
|
+
basis: "operational",
|
|
1690
|
+
note: "recommended range"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
code: "free_chlorine",
|
|
1694
|
+
min: 0.2,
|
|
1695
|
+
max: 5,
|
|
1696
|
+
basis: "operational",
|
|
1697
|
+
note: "residual in the distribution system"
|
|
1698
|
+
},
|
|
1699
|
+
// Microbiological
|
|
1700
|
+
{ code: "e_coli", presence_allowed: false, basis: "health" },
|
|
1701
|
+
{
|
|
1702
|
+
code: "total_coliforms",
|
|
1703
|
+
presence_allowed: false,
|
|
1704
|
+
basis: "indicator",
|
|
1705
|
+
note: "tolerances apply by system size and sampling point"
|
|
1706
|
+
},
|
|
1707
|
+
// Radioactivity
|
|
1708
|
+
{ code: "gross_alpha", max: 0.5, basis: "health", note: "screening level" },
|
|
1709
|
+
{ code: "gross_beta", max: 1, basis: "health", note: "screening level" },
|
|
1710
|
+
{ code: "radium_226", max: 1, basis: "health" },
|
|
1711
|
+
{ code: "radium_228", max: 0.1, basis: "health" }
|
|
1712
|
+
]
|
|
1713
|
+
};
|
|
1714
|
+
var EU_2020_2184 = {
|
|
1715
|
+
id: "eu_2020_2184",
|
|
1716
|
+
name: "EU Drinking Water Directive 2020/2184",
|
|
1717
|
+
jurisdiction: "EU",
|
|
1718
|
+
source: "Directive (EU) 2020/2184 of the European Parliament and of the Council, Annex I",
|
|
1719
|
+
limits: [
|
|
1720
|
+
// Part A — microbiological
|
|
1721
|
+
{ code: "e_coli", presence_allowed: false, basis: "health" },
|
|
1722
|
+
// Part B — chemical
|
|
1723
|
+
{ code: "antimony", max: 0.01, basis: "health" },
|
|
1724
|
+
{ code: "arsenic", max: 0.01, basis: "health" },
|
|
1725
|
+
{
|
|
1726
|
+
code: "boron",
|
|
1727
|
+
max: 1.5,
|
|
1728
|
+
basis: "health",
|
|
1729
|
+
note: "2.4 mg/L where desalinated water is the predominant source"
|
|
1730
|
+
},
|
|
1731
|
+
{ code: "cadmium", max: 5e-3, basis: "health" },
|
|
1732
|
+
{
|
|
1733
|
+
code: "chromium",
|
|
1734
|
+
max: 0.05,
|
|
1735
|
+
basis: "health",
|
|
1736
|
+
note: "0.025 mg/L from 12 January 2036"
|
|
1737
|
+
},
|
|
1738
|
+
{ code: "copper", max: 2, basis: "health" },
|
|
1739
|
+
{ code: "cyanide_total_as_cn", max: 0.05, basis: "health" },
|
|
1740
|
+
{ code: "fluoride", max: 1.5, basis: "health" },
|
|
1741
|
+
{
|
|
1742
|
+
code: "lead",
|
|
1743
|
+
max: 0.01,
|
|
1744
|
+
basis: "health",
|
|
1745
|
+
note: "0.005 mg/L from 12 January 2036"
|
|
1746
|
+
},
|
|
1747
|
+
{ code: "mercury", max: 1e-3, basis: "health" },
|
|
1748
|
+
{ code: "nickel", max: 0.02, basis: "health" },
|
|
1749
|
+
{ code: "nitrate_as_no3", max: 50, basis: "health" },
|
|
1750
|
+
{ code: "nitrite_as_no2", max: 0.5, basis: "health", note: "at the tap" },
|
|
1751
|
+
{ code: "selenium", max: 0.02, basis: "health" },
|
|
1752
|
+
{ code: "uranium", max: 0.03, basis: "health" },
|
|
1753
|
+
// Part C — indicator parameters
|
|
1754
|
+
{ code: "aluminum", max: 0.2, basis: "indicator" },
|
|
1755
|
+
{ code: "chloride", max: 250, basis: "indicator" },
|
|
1756
|
+
{
|
|
1757
|
+
code: "specific_conductance",
|
|
1758
|
+
max: 2500,
|
|
1759
|
+
basis: "indicator",
|
|
1760
|
+
note: "directive value is at 20 \xB0C"
|
|
1761
|
+
},
|
|
1762
|
+
{ code: "ph", min: 6.5, max: 9.5, basis: "indicator" },
|
|
1763
|
+
{ code: "iron", max: 0.2, basis: "indicator" },
|
|
1764
|
+
{ code: "manganese", max: 0.05, basis: "indicator" },
|
|
1765
|
+
{ code: "sodium", max: 200, basis: "indicator" },
|
|
1766
|
+
{ code: "sulfate", max: 250, basis: "indicator" },
|
|
1767
|
+
{ code: "total_coliforms", presence_allowed: false, basis: "indicator" }
|
|
1768
|
+
]
|
|
1769
|
+
};
|
|
1770
|
+
var WATER_QUALITY_LIMIT_SETS = [
|
|
1771
|
+
WHO_GDWQ_2022,
|
|
1772
|
+
BR_GM_MS_888_2021,
|
|
1773
|
+
EU_2020_2184
|
|
1774
|
+
];
|
|
1775
|
+
function getLimitSet(id) {
|
|
1776
|
+
return WATER_QUALITY_LIMIT_SETS.find((s) => s.id === id);
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
// src/utils/language.utils.ts
|
|
1780
|
+
function parseLanguageTextJson(value) {
|
|
1781
|
+
const trimmed = value.trim();
|
|
1782
|
+
if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return void 0;
|
|
1783
|
+
let parsed;
|
|
1784
|
+
try {
|
|
1785
|
+
parsed = JSON.parse(trimmed);
|
|
1786
|
+
} catch {
|
|
1787
|
+
return void 0;
|
|
1788
|
+
}
|
|
1789
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
1790
|
+
return void 0;
|
|
1791
|
+
}
|
|
1792
|
+
const entries = Object.entries(parsed).filter(
|
|
1793
|
+
(entry) => typeof entry[1] === "string" && entry[1].trim() !== ""
|
|
1794
|
+
);
|
|
1795
|
+
return Object.fromEntries(entries);
|
|
1796
|
+
}
|
|
1797
|
+
function resolveLanguageText(text, locale, fallback = "en") {
|
|
1798
|
+
if (text == null) return "";
|
|
1799
|
+
const labels = typeof text === "string" ? parseLanguageTextJson(text) : text;
|
|
1800
|
+
if (labels === void 0) return text;
|
|
1801
|
+
const base = locale.split("-")[0];
|
|
1802
|
+
const usable = (key) => {
|
|
1803
|
+
const value = labels[key];
|
|
1804
|
+
return typeof value === "string" && value.trim() !== "" ? value : void 0;
|
|
1805
|
+
};
|
|
1806
|
+
return usable(locale) ?? usable(base) ?? usable(fallback) ?? Object.keys(labels).map(usable).find((v) => v !== void 0) ?? "";
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// src/vocab/waterQuality.vocab.ts
|
|
1810
|
+
var WATER_QUALITY_VOCABULARY_VERSION = "1.0.0";
|
|
1811
|
+
var WATER_QUALITY_UNITS = {
|
|
1812
|
+
mg_l: { symbol: "mg/L", ucum: "mg/L" },
|
|
1813
|
+
us_cm: { symbol: "\xB5S/cm", ucum: "uS/cm" },
|
|
1814
|
+
celsius: { symbol: "\xB0C", ucum: "Cel" },
|
|
1815
|
+
mv: { symbol: "mV", ucum: "mV" },
|
|
1816
|
+
ph: { symbol: "", ucum: "[pH]" },
|
|
1817
|
+
ftu: { symbol: "FTU" },
|
|
1818
|
+
ntu: { symbol: "NTU" },
|
|
1819
|
+
fnu: { symbol: "FNU" },
|
|
1820
|
+
fau: { symbol: "FAU" },
|
|
1821
|
+
hazen: { symbol: "uH" },
|
|
1822
|
+
mpn_100ml: { symbol: "MPN/100 mL", ucum: "{MPN}/(100.mL)" },
|
|
1823
|
+
cfu_100ml: { symbol: "CFU/100 mL", ucum: "{CFU}/(100.mL)" },
|
|
1824
|
+
cfu_ml: { symbol: "CFU/mL", ucum: "{CFU}/mL" },
|
|
1825
|
+
bq_l: { symbol: "Bq/L", ucum: "Bq/L" },
|
|
1826
|
+
none: { symbol: "" }
|
|
1827
|
+
};
|
|
1828
|
+
var U = WATER_QUALITY_UNITS;
|
|
1829
|
+
function defineParameter(code, group, label, pt, unit, extra = {}) {
|
|
1830
|
+
return {
|
|
1831
|
+
code,
|
|
1832
|
+
group,
|
|
1833
|
+
label,
|
|
1834
|
+
labels: { pt },
|
|
1835
|
+
unit,
|
|
1836
|
+
form: extra.form ?? "value",
|
|
1837
|
+
...extra.cas !== void 0 && { cas: extra.cas },
|
|
1838
|
+
...extra.molar_mass !== void 0 && { molar_mass: extra.molar_mass },
|
|
1839
|
+
...extra.charge !== void 0 && { charge: extra.charge }
|
|
1840
|
+
};
|
|
1841
|
+
}
|
|
1842
|
+
var WATER_QUALITY_PARAMETERS = [
|
|
1843
|
+
// Physical / field
|
|
1844
|
+
defineParameter(
|
|
1845
|
+
"temperature",
|
|
1846
|
+
"physical",
|
|
1847
|
+
"Temperature",
|
|
1848
|
+
"Temperatura",
|
|
1849
|
+
U.celsius
|
|
1850
|
+
),
|
|
1851
|
+
defineParameter("ph", "physical", "pH", "pH", U.ph),
|
|
1852
|
+
defineParameter(
|
|
1853
|
+
"specific_conductance",
|
|
1854
|
+
"physical",
|
|
1855
|
+
"Specific conductance at 25 \xB0C",
|
|
1856
|
+
"Condutividade el\xE9trica a 25 \xB0C",
|
|
1857
|
+
U.us_cm
|
|
1858
|
+
),
|
|
1859
|
+
defineParameter(
|
|
1860
|
+
"conductivity_uncompensated",
|
|
1861
|
+
"physical",
|
|
1862
|
+
"Electrical conductivity, uncompensated",
|
|
1863
|
+
"Condutividade sem compensa\xE7\xE3o",
|
|
1864
|
+
U.us_cm
|
|
1865
|
+
),
|
|
1866
|
+
defineParameter(
|
|
1867
|
+
"dissolved_oxygen",
|
|
1868
|
+
"physical",
|
|
1869
|
+
"Dissolved oxygen",
|
|
1870
|
+
"Oxig\xEAnio dissolvido",
|
|
1871
|
+
U.mg_l
|
|
1872
|
+
),
|
|
1873
|
+
defineParameter(
|
|
1874
|
+
"orp",
|
|
1875
|
+
"physical",
|
|
1876
|
+
"Oxidation-reduction potential vs. reference electrode",
|
|
1877
|
+
"Potencial redox vs. eletrodo de refer\xEAncia",
|
|
1878
|
+
U.mv
|
|
1879
|
+
),
|
|
1880
|
+
defineParameter(
|
|
1881
|
+
"eh",
|
|
1882
|
+
"physical",
|
|
1883
|
+
"Redox potential vs. SHE",
|
|
1884
|
+
"Potencial redox corrigido vs. EPH",
|
|
1885
|
+
U.mv
|
|
1886
|
+
),
|
|
1887
|
+
defineParameter(
|
|
1888
|
+
"turbidity",
|
|
1889
|
+
"physical",
|
|
1890
|
+
"Turbidity, formazin, method unspecified",
|
|
1891
|
+
"Turbidez, formazina sem m\xE9todo identificado",
|
|
1892
|
+
U.ftu
|
|
1893
|
+
),
|
|
1894
|
+
defineParameter(
|
|
1895
|
+
"turbidity_ntu",
|
|
1896
|
+
"physical",
|
|
1897
|
+
"Turbidity, nephelometric white light",
|
|
1898
|
+
"Turbidez nefelom\xE9trica, luz branca",
|
|
1899
|
+
U.ntu
|
|
1900
|
+
),
|
|
1901
|
+
defineParameter(
|
|
1902
|
+
"turbidity_fnu",
|
|
1903
|
+
"physical",
|
|
1904
|
+
"Turbidity, nephelometric infrared (ISO 7027)",
|
|
1905
|
+
"Turbidez nefelom\xE9trica, infravermelho",
|
|
1906
|
+
U.fnu
|
|
1907
|
+
),
|
|
1908
|
+
defineParameter(
|
|
1909
|
+
"turbidity_fau",
|
|
1910
|
+
"physical",
|
|
1911
|
+
"Turbidity, attenuation (ISO 7027)",
|
|
1912
|
+
"Turbidez por atenua\xE7\xE3o",
|
|
1913
|
+
U.fau
|
|
1914
|
+
),
|
|
1915
|
+
defineParameter(
|
|
1916
|
+
"apparent_color",
|
|
1917
|
+
"physical",
|
|
1918
|
+
"Apparent color",
|
|
1919
|
+
"Cor aparente",
|
|
1920
|
+
U.hazen
|
|
1921
|
+
),
|
|
1922
|
+
defineParameter(
|
|
1923
|
+
"true_color",
|
|
1924
|
+
"physical",
|
|
1925
|
+
"True color",
|
|
1926
|
+
"Cor verdadeira",
|
|
1927
|
+
U.hazen
|
|
1928
|
+
),
|
|
1929
|
+
defineParameter("odor", "physical", "Odor", "Odor", U.none, { form: "text" }),
|
|
1930
|
+
defineParameter("taste", "physical", "Taste", "Gosto", U.none, {
|
|
1931
|
+
form: "text"
|
|
1932
|
+
}),
|
|
1933
|
+
defineParameter(
|
|
1934
|
+
"total_dissolved_solids",
|
|
1935
|
+
"physical",
|
|
1936
|
+
"Total dissolved solids",
|
|
1937
|
+
"S\xF3lidos totais dissolvidos",
|
|
1938
|
+
U.mg_l
|
|
1939
|
+
),
|
|
1940
|
+
defineParameter(
|
|
1941
|
+
"total_suspended_solids",
|
|
1942
|
+
"physical",
|
|
1943
|
+
"Total suspended solids",
|
|
1944
|
+
"S\xF3lidos suspensos totais",
|
|
1945
|
+
U.mg_l
|
|
1946
|
+
),
|
|
1947
|
+
defineParameter(
|
|
1948
|
+
"total_solids",
|
|
1949
|
+
"physical",
|
|
1950
|
+
"Total solids",
|
|
1951
|
+
"S\xF3lidos totais",
|
|
1952
|
+
U.mg_l
|
|
1953
|
+
),
|
|
1954
|
+
defineParameter(
|
|
1955
|
+
"free_co2",
|
|
1956
|
+
"physical",
|
|
1957
|
+
"Free carbon dioxide",
|
|
1958
|
+
"G\xE1s carb\xF4nico livre",
|
|
1959
|
+
U.mg_l
|
|
1960
|
+
),
|
|
1961
|
+
// Aggregate (expressed as CaCO₃: 100.087 g/mol, divalent → 50.04 mg/meq)
|
|
1962
|
+
defineParameter(
|
|
1963
|
+
"alkalinity_total_as_caco3",
|
|
1964
|
+
"aggregate",
|
|
1965
|
+
"Total alkalinity as CaCO\u2083",
|
|
1966
|
+
"Alcalinidade total como CaCO\u2083",
|
|
1967
|
+
U.mg_l,
|
|
1968
|
+
{ molar_mass: 100.087, charge: -2 }
|
|
1969
|
+
),
|
|
1970
|
+
defineParameter(
|
|
1971
|
+
"alkalinity_bicarbonate_as_caco3",
|
|
1972
|
+
"aggregate",
|
|
1973
|
+
"Bicarbonate alkalinity as CaCO\u2083",
|
|
1974
|
+
"Alcalinidade de bicarbonatos como CaCO\u2083",
|
|
1975
|
+
U.mg_l,
|
|
1976
|
+
{ molar_mass: 100.087, charge: -2 }
|
|
1977
|
+
),
|
|
1978
|
+
defineParameter(
|
|
1979
|
+
"alkalinity_carbonate_as_caco3",
|
|
1980
|
+
"aggregate",
|
|
1981
|
+
"Carbonate alkalinity as CaCO\u2083",
|
|
1982
|
+
"Alcalinidade de carbonatos como CaCO\u2083",
|
|
1983
|
+
U.mg_l,
|
|
1984
|
+
{ molar_mass: 100.087, charge: -2 }
|
|
1985
|
+
),
|
|
1986
|
+
defineParameter(
|
|
1987
|
+
"alkalinity_hydroxide_as_caco3",
|
|
1988
|
+
"aggregate",
|
|
1989
|
+
"Hydroxide alkalinity as CaCO\u2083",
|
|
1990
|
+
"Alcalinidade de hidr\xF3xidos como CaCO\u2083",
|
|
1991
|
+
U.mg_l,
|
|
1992
|
+
{ molar_mass: 100.087, charge: -2 }
|
|
1993
|
+
),
|
|
1994
|
+
defineParameter(
|
|
1995
|
+
"acidity_total_as_caco3",
|
|
1996
|
+
"aggregate",
|
|
1997
|
+
"Total acidity as CaCO\u2083",
|
|
1998
|
+
"Acidez total como CaCO\u2083",
|
|
1999
|
+
U.mg_l,
|
|
2000
|
+
{ molar_mass: 100.087, charge: 2 }
|
|
2001
|
+
),
|
|
2002
|
+
defineParameter(
|
|
2003
|
+
"hardness_total_as_caco3",
|
|
2004
|
+
"aggregate",
|
|
2005
|
+
"Total hardness as CaCO\u2083",
|
|
2006
|
+
"Dureza total como CaCO\u2083",
|
|
2007
|
+
U.mg_l,
|
|
2008
|
+
{ molar_mass: 100.087, charge: 2 }
|
|
2009
|
+
),
|
|
2010
|
+
defineParameter(
|
|
2011
|
+
"hardness_calcium_as_caco3",
|
|
2012
|
+
"aggregate",
|
|
2013
|
+
"Calcium hardness as CaCO\u2083",
|
|
2014
|
+
"Dureza de c\xE1lcio como CaCO\u2083",
|
|
2015
|
+
U.mg_l,
|
|
2016
|
+
{ molar_mass: 100.087, charge: 2 }
|
|
2017
|
+
),
|
|
2018
|
+
// Major ions
|
|
2019
|
+
defineParameter("calcium", "major_ion", "Calcium", "C\xE1lcio", U.mg_l, {
|
|
2020
|
+
cas: "7440-70-2",
|
|
2021
|
+
molar_mass: 40.078,
|
|
2022
|
+
charge: 2
|
|
2023
|
+
}),
|
|
2024
|
+
defineParameter("magnesium", "major_ion", "Magnesium", "Magn\xE9sio", U.mg_l, {
|
|
2025
|
+
cas: "7439-95-4",
|
|
2026
|
+
molar_mass: 24.305,
|
|
2027
|
+
charge: 2
|
|
2028
|
+
}),
|
|
2029
|
+
defineParameter("sodium", "major_ion", "Sodium", "S\xF3dio", U.mg_l, {
|
|
2030
|
+
cas: "7440-23-5",
|
|
2031
|
+
molar_mass: 22.99,
|
|
2032
|
+
charge: 1
|
|
2033
|
+
}),
|
|
2034
|
+
defineParameter("potassium", "major_ion", "Potassium", "Pot\xE1ssio", U.mg_l, {
|
|
2035
|
+
cas: "7440-09-7",
|
|
2036
|
+
molar_mass: 39.098,
|
|
2037
|
+
charge: 1
|
|
2038
|
+
}),
|
|
2039
|
+
defineParameter(
|
|
2040
|
+
"bicarbonate",
|
|
2041
|
+
"major_ion",
|
|
2042
|
+
"Bicarbonate as HCO\u2083\u207B",
|
|
2043
|
+
"Bicarbonato como HCO\u2083\u207B",
|
|
2044
|
+
U.mg_l,
|
|
2045
|
+
{ cas: "71-52-3", molar_mass: 61.017, charge: -1 }
|
|
2046
|
+
),
|
|
2047
|
+
defineParameter(
|
|
2048
|
+
"carbonate",
|
|
2049
|
+
"major_ion",
|
|
2050
|
+
"Carbonate as CO\u2083\xB2\u207B",
|
|
2051
|
+
"Carbonato como CO\u2083\xB2\u207B",
|
|
2052
|
+
U.mg_l,
|
|
2053
|
+
{ cas: "3812-32-6", molar_mass: 60.009, charge: -2 }
|
|
2054
|
+
),
|
|
2055
|
+
defineParameter("chloride", "major_ion", "Chloride", "Cloreto", U.mg_l, {
|
|
2056
|
+
cas: "16887-00-6",
|
|
2057
|
+
molar_mass: 35.453,
|
|
2058
|
+
charge: -1
|
|
2059
|
+
}),
|
|
2060
|
+
defineParameter("sulfate", "major_ion", "Sulfate", "Sulfato", U.mg_l, {
|
|
2061
|
+
cas: "14808-79-8",
|
|
2062
|
+
molar_mass: 96.06,
|
|
2063
|
+
charge: -2
|
|
2064
|
+
}),
|
|
2065
|
+
defineParameter("fluoride", "major_ion", "Fluoride", "Fluoreto", U.mg_l, {
|
|
2066
|
+
cas: "16984-48-8",
|
|
2067
|
+
molar_mass: 18.998,
|
|
2068
|
+
charge: -1
|
|
2069
|
+
}),
|
|
2070
|
+
defineParameter(
|
|
2071
|
+
"silica_as_sio2",
|
|
2072
|
+
"major_ion",
|
|
2073
|
+
"Silica as SiO\u2082",
|
|
2074
|
+
"S\xEDlica como SiO\u2082",
|
|
2075
|
+
U.mg_l,
|
|
2076
|
+
{ cas: "7631-86-9" }
|
|
2077
|
+
),
|
|
2078
|
+
// Nutrients
|
|
2079
|
+
defineParameter(
|
|
2080
|
+
"nitrate_as_n",
|
|
2081
|
+
"nutrient",
|
|
2082
|
+
"Nitrate as N",
|
|
2083
|
+
"Nitrato como N",
|
|
2084
|
+
U.mg_l,
|
|
2085
|
+
{
|
|
2086
|
+
molar_mass: 14.007,
|
|
2087
|
+
charge: -1
|
|
2088
|
+
}
|
|
2089
|
+
),
|
|
2090
|
+
defineParameter(
|
|
2091
|
+
"nitrate_as_no3",
|
|
2092
|
+
"nutrient",
|
|
2093
|
+
"Nitrate as NO\u2083\u207B",
|
|
2094
|
+
"Nitrato como NO\u2083\u207B",
|
|
2095
|
+
U.mg_l,
|
|
2096
|
+
{ cas: "14797-55-8", molar_mass: 62.004, charge: -1 }
|
|
2097
|
+
),
|
|
2098
|
+
defineParameter(
|
|
2099
|
+
"nitrite_as_n",
|
|
2100
|
+
"nutrient",
|
|
2101
|
+
"Nitrite as N",
|
|
2102
|
+
"Nitrito como N",
|
|
2103
|
+
U.mg_l,
|
|
2104
|
+
{
|
|
2105
|
+
molar_mass: 14.007,
|
|
2106
|
+
charge: -1
|
|
2107
|
+
}
|
|
2108
|
+
),
|
|
2109
|
+
defineParameter(
|
|
2110
|
+
"nitrite_as_no2",
|
|
2111
|
+
"nutrient",
|
|
2112
|
+
"Nitrite as NO\u2082\u207B",
|
|
2113
|
+
"Nitrito como NO\u2082\u207B",
|
|
2114
|
+
U.mg_l,
|
|
2115
|
+
{ cas: "14797-65-0", molar_mass: 46.005, charge: -1 }
|
|
2116
|
+
),
|
|
2117
|
+
defineParameter(
|
|
2118
|
+
"ammonia_as_n",
|
|
2119
|
+
"nutrient",
|
|
2120
|
+
"Ammonia nitrogen as N",
|
|
2121
|
+
"Nitrog\xEAnio amoniacal como N",
|
|
2122
|
+
U.mg_l,
|
|
2123
|
+
{ molar_mass: 14.007, charge: 1 }
|
|
2124
|
+
),
|
|
2125
|
+
defineParameter(
|
|
2126
|
+
"ammonia_as_nh3",
|
|
2127
|
+
"nutrient",
|
|
2128
|
+
"Ammonia as NH\u2083",
|
|
2129
|
+
"Am\xF4nia como NH\u2083",
|
|
2130
|
+
U.mg_l,
|
|
2131
|
+
{
|
|
2132
|
+
cas: "7664-41-7"
|
|
2133
|
+
}
|
|
2134
|
+
),
|
|
2135
|
+
defineParameter(
|
|
2136
|
+
"kjeldahl_nitrogen_as_n",
|
|
2137
|
+
"nutrient",
|
|
2138
|
+
"Total Kjeldahl nitrogen as N",
|
|
2139
|
+
"Nitrog\xEAnio Kjeldahl total como N",
|
|
2140
|
+
U.mg_l
|
|
2141
|
+
),
|
|
2142
|
+
defineParameter(
|
|
2143
|
+
"phosphorus_total_as_p",
|
|
2144
|
+
"nutrient",
|
|
2145
|
+
"Total phosphorus as P",
|
|
2146
|
+
"F\xF3sforo total como P",
|
|
2147
|
+
U.mg_l
|
|
2148
|
+
),
|
|
2149
|
+
defineParameter(
|
|
2150
|
+
"orthophosphate_as_po4",
|
|
2151
|
+
"nutrient",
|
|
2152
|
+
"Orthophosphate as PO\u2084\xB3\u207B",
|
|
2153
|
+
"Ortofosfato como PO\u2084\xB3\u207B",
|
|
2154
|
+
U.mg_l,
|
|
2155
|
+
{ molar_mass: 94.971, charge: -3 }
|
|
2156
|
+
),
|
|
2157
|
+
// Organic
|
|
2158
|
+
defineParameter(
|
|
2159
|
+
"total_organic_carbon",
|
|
2160
|
+
"organic",
|
|
2161
|
+
"Total organic carbon",
|
|
2162
|
+
"Carbono org\xE2nico total",
|
|
2163
|
+
U.mg_l
|
|
2164
|
+
),
|
|
2165
|
+
defineParameter(
|
|
2166
|
+
"cod",
|
|
2167
|
+
"organic",
|
|
2168
|
+
"Chemical oxygen demand",
|
|
2169
|
+
"Demanda qu\xEDmica de oxig\xEAnio (DQO)",
|
|
2170
|
+
U.mg_l
|
|
2171
|
+
),
|
|
2172
|
+
defineParameter(
|
|
2173
|
+
"bod5",
|
|
2174
|
+
"organic",
|
|
2175
|
+
"Biochemical oxygen demand, 5-day",
|
|
2176
|
+
"Demanda bioqu\xEDmica de oxig\xEAnio (DBO\u2085)",
|
|
2177
|
+
U.mg_l
|
|
2178
|
+
),
|
|
2179
|
+
defineParameter(
|
|
2180
|
+
"total_petroleum_hydrocarbons",
|
|
2181
|
+
"organic",
|
|
2182
|
+
"Total petroleum hydrocarbons (range per method)",
|
|
2183
|
+
"Hidrocarbonetos totais de petr\xF3leo",
|
|
2184
|
+
U.mg_l
|
|
2185
|
+
),
|
|
2186
|
+
defineParameter(
|
|
2187
|
+
"oil_and_grease",
|
|
2188
|
+
"organic",
|
|
2189
|
+
"Oil and grease",
|
|
2190
|
+
"\xD3leos e graxas",
|
|
2191
|
+
U.mg_l
|
|
2192
|
+
),
|
|
2193
|
+
// Disinfection
|
|
2194
|
+
defineParameter(
|
|
2195
|
+
"free_chlorine",
|
|
2196
|
+
"disinfection",
|
|
2197
|
+
"Free chlorine residual",
|
|
2198
|
+
"Cloro residual livre",
|
|
2199
|
+
U.mg_l
|
|
2200
|
+
),
|
|
2201
|
+
defineParameter(
|
|
2202
|
+
"total_chlorine",
|
|
2203
|
+
"disinfection",
|
|
2204
|
+
"Total chlorine residual",
|
|
2205
|
+
"Cloro residual total",
|
|
2206
|
+
U.mg_l
|
|
2207
|
+
),
|
|
2208
|
+
// Mining and redox
|
|
2209
|
+
defineParameter(
|
|
2210
|
+
"ferrous_iron",
|
|
2211
|
+
"mining_redox",
|
|
2212
|
+
"Ferrous iron (Fe\xB2\u207A)",
|
|
2213
|
+
"Ferro ferroso (Fe\xB2\u207A)",
|
|
2214
|
+
U.mg_l
|
|
2215
|
+
),
|
|
2216
|
+
defineParameter(
|
|
2217
|
+
"chromium_hexavalent",
|
|
2218
|
+
"mining_redox",
|
|
2219
|
+
"Hexavalent chromium",
|
|
2220
|
+
"Cromo hexavalente",
|
|
2221
|
+
U.mg_l,
|
|
2222
|
+
{ cas: "18540-29-9" }
|
|
2223
|
+
),
|
|
2224
|
+
defineParameter(
|
|
2225
|
+
"cyanide_total_as_cn",
|
|
2226
|
+
"mining_redox",
|
|
2227
|
+
"Total cyanide as CN\u207B",
|
|
2228
|
+
"Cianeto total como CN\u207B",
|
|
2229
|
+
U.mg_l
|
|
2230
|
+
),
|
|
2231
|
+
defineParameter(
|
|
2232
|
+
"cyanide_wad_as_cn",
|
|
2233
|
+
"mining_redox",
|
|
2234
|
+
"Weak acid dissociable cyanide as CN\u207B",
|
|
2235
|
+
"Cianeto WAD como CN\u207B",
|
|
2236
|
+
U.mg_l
|
|
2237
|
+
),
|
|
2238
|
+
defineParameter(
|
|
2239
|
+
"cyanide_free_as_cn",
|
|
2240
|
+
"mining_redox",
|
|
2241
|
+
"Free cyanide as CN\u207B",
|
|
2242
|
+
"Cianeto livre como CN\u207B",
|
|
2243
|
+
U.mg_l
|
|
2244
|
+
),
|
|
2245
|
+
defineParameter(
|
|
2246
|
+
"thiocyanate",
|
|
2247
|
+
"mining_redox",
|
|
2248
|
+
"Thiocyanate",
|
|
2249
|
+
"Tiocianato",
|
|
2250
|
+
U.mg_l,
|
|
2251
|
+
{
|
|
2252
|
+
cas: "302-04-5"
|
|
2253
|
+
}
|
|
2254
|
+
),
|
|
2255
|
+
defineParameter(
|
|
2256
|
+
"sulfide_total_as_s",
|
|
2257
|
+
"mining_redox",
|
|
2258
|
+
"Total sulfide as S",
|
|
2259
|
+
"Sulfeto total como S",
|
|
2260
|
+
U.mg_l
|
|
2261
|
+
),
|
|
2262
|
+
// Metals / trace
|
|
2263
|
+
defineParameter("iron", "metal", "Iron", "Ferro", U.mg_l, {
|
|
2264
|
+
cas: "7439-89-6",
|
|
2265
|
+
molar_mass: 55.845,
|
|
2266
|
+
charge: 2
|
|
2267
|
+
}),
|
|
2268
|
+
defineParameter("manganese", "metal", "Manganese", "Mangan\xEAs", U.mg_l, {
|
|
2269
|
+
cas: "7439-96-5",
|
|
2270
|
+
molar_mass: 54.938,
|
|
2271
|
+
charge: 2
|
|
2272
|
+
}),
|
|
2273
|
+
defineParameter("aluminum", "metal", "Aluminium", "Alum\xEDnio", U.mg_l, {
|
|
2274
|
+
cas: "7429-90-5"
|
|
2275
|
+
}),
|
|
2276
|
+
defineParameter("antimony", "metal", "Antimony", "Antim\xF4nio", U.mg_l, {
|
|
2277
|
+
cas: "7440-36-0"
|
|
2278
|
+
}),
|
|
2279
|
+
defineParameter("arsenic", "metal", "Arsenic", "Ars\xEAnio", U.mg_l, {
|
|
2280
|
+
cas: "7440-38-2"
|
|
2281
|
+
}),
|
|
2282
|
+
defineParameter("barium", "metal", "Barium", "B\xE1rio", U.mg_l, {
|
|
2283
|
+
cas: "7440-39-3"
|
|
2284
|
+
}),
|
|
2285
|
+
defineParameter("beryllium", "metal", "Beryllium", "Ber\xEDlio", U.mg_l, {
|
|
2286
|
+
cas: "7440-41-7"
|
|
2287
|
+
}),
|
|
2288
|
+
defineParameter("boron", "metal", "Boron", "Boro", U.mg_l, {
|
|
2289
|
+
cas: "7440-42-8"
|
|
2290
|
+
}),
|
|
2291
|
+
defineParameter("cadmium", "metal", "Cadmium", "C\xE1dmio", U.mg_l, {
|
|
2292
|
+
cas: "7440-43-9"
|
|
2293
|
+
}),
|
|
2294
|
+
defineParameter(
|
|
2295
|
+
"chromium",
|
|
2296
|
+
"metal",
|
|
2297
|
+
"Chromium, total",
|
|
2298
|
+
"Cromo total",
|
|
2299
|
+
U.mg_l,
|
|
2300
|
+
{
|
|
2301
|
+
cas: "7440-47-3"
|
|
2302
|
+
}
|
|
2303
|
+
),
|
|
2304
|
+
defineParameter("cobalt", "metal", "Cobalt", "Cobalto", U.mg_l, {
|
|
2305
|
+
cas: "7440-48-4"
|
|
2306
|
+
}),
|
|
2307
|
+
defineParameter("copper", "metal", "Copper", "Cobre", U.mg_l, {
|
|
2308
|
+
cas: "7440-50-8"
|
|
2309
|
+
}),
|
|
2310
|
+
defineParameter("lead", "metal", "Lead", "Chumbo", U.mg_l, {
|
|
2311
|
+
cas: "7439-92-1"
|
|
2312
|
+
}),
|
|
2313
|
+
defineParameter("lithium", "metal", "Lithium", "L\xEDtio", U.mg_l, {
|
|
2314
|
+
cas: "7439-93-2",
|
|
2315
|
+
molar_mass: 6.94,
|
|
2316
|
+
charge: 1
|
|
2317
|
+
}),
|
|
2318
|
+
defineParameter("mercury", "metal", "Mercury", "Merc\xFArio", U.mg_l, {
|
|
2319
|
+
cas: "7439-97-6"
|
|
2320
|
+
}),
|
|
2321
|
+
defineParameter("molybdenum", "metal", "Molybdenum", "Molibd\xEAnio", U.mg_l, {
|
|
2322
|
+
cas: "7439-98-7"
|
|
2323
|
+
}),
|
|
2324
|
+
defineParameter("nickel", "metal", "Nickel", "N\xEDquel", U.mg_l, {
|
|
2325
|
+
cas: "7440-02-0"
|
|
2326
|
+
}),
|
|
2327
|
+
defineParameter("selenium", "metal", "Selenium", "Sel\xEAnio", U.mg_l, {
|
|
2328
|
+
cas: "7782-49-2"
|
|
2329
|
+
}),
|
|
2330
|
+
defineParameter("silver", "metal", "Silver", "Prata", U.mg_l, {
|
|
2331
|
+
cas: "7440-22-4"
|
|
2332
|
+
}),
|
|
2333
|
+
defineParameter("strontium", "metal", "Strontium", "Estr\xF4ncio", U.mg_l, {
|
|
2334
|
+
cas: "7440-24-6",
|
|
2335
|
+
molar_mass: 87.62,
|
|
2336
|
+
charge: 2
|
|
2337
|
+
}),
|
|
2338
|
+
defineParameter("thallium", "metal", "Thallium", "T\xE1lio", U.mg_l, {
|
|
2339
|
+
cas: "7440-28-0"
|
|
2340
|
+
}),
|
|
2341
|
+
defineParameter("uranium", "metal", "Uranium", "Ur\xE2nio", U.mg_l, {
|
|
2342
|
+
cas: "7440-61-1"
|
|
2343
|
+
}),
|
|
2344
|
+
defineParameter("vanadium", "metal", "Vanadium", "Van\xE1dio", U.mg_l, {
|
|
2345
|
+
cas: "7440-62-2"
|
|
2346
|
+
}),
|
|
2347
|
+
defineParameter("zinc", "metal", "Zinc", "Zinco", U.mg_l, {
|
|
2348
|
+
cas: "7440-66-6"
|
|
2349
|
+
}),
|
|
2350
|
+
// Microbiology
|
|
2351
|
+
defineParameter(
|
|
2352
|
+
"total_coliforms",
|
|
2353
|
+
"microbiology",
|
|
2354
|
+
"Total coliforms in 100 mL",
|
|
2355
|
+
"Coliformes totais em 100 mL",
|
|
2356
|
+
U.none,
|
|
2357
|
+
{ form: "presence" }
|
|
2358
|
+
),
|
|
2359
|
+
defineParameter(
|
|
2360
|
+
"total_coliforms_mpn",
|
|
2361
|
+
"microbiology",
|
|
2362
|
+
"Total coliforms, count",
|
|
2363
|
+
"Coliformes totais, contagem",
|
|
2364
|
+
U.mpn_100ml
|
|
2365
|
+
),
|
|
2366
|
+
defineParameter(
|
|
2367
|
+
"total_coliforms_cfu",
|
|
2368
|
+
"microbiology",
|
|
2369
|
+
"Total coliforms, count",
|
|
2370
|
+
"Coliformes totais, contagem",
|
|
2371
|
+
U.cfu_100ml
|
|
2372
|
+
),
|
|
2373
|
+
defineParameter(
|
|
2374
|
+
"e_coli",
|
|
2375
|
+
"microbiology",
|
|
2376
|
+
"E. coli in 100 mL",
|
|
2377
|
+
"E. coli em 100 mL",
|
|
2378
|
+
U.none,
|
|
2379
|
+
{ form: "presence" }
|
|
2380
|
+
),
|
|
2381
|
+
defineParameter(
|
|
2382
|
+
"e_coli_mpn",
|
|
2383
|
+
"microbiology",
|
|
2384
|
+
"E. coli, count",
|
|
2385
|
+
"E. coli, contagem",
|
|
2386
|
+
U.mpn_100ml
|
|
2387
|
+
),
|
|
2388
|
+
defineParameter(
|
|
2389
|
+
"e_coli_cfu",
|
|
2390
|
+
"microbiology",
|
|
2391
|
+
"E. coli, count",
|
|
2392
|
+
"E. coli, contagem",
|
|
2393
|
+
U.cfu_100ml
|
|
2394
|
+
),
|
|
2395
|
+
defineParameter(
|
|
2396
|
+
"thermotolerant_coliforms",
|
|
2397
|
+
"microbiology",
|
|
2398
|
+
"Thermotolerant coliforms in 100 mL",
|
|
2399
|
+
"Coliformes termotolerantes em 100 mL",
|
|
2400
|
+
U.none,
|
|
2401
|
+
{ form: "presence" }
|
|
2402
|
+
),
|
|
2403
|
+
defineParameter(
|
|
2404
|
+
"thermotolerant_coliforms_mpn",
|
|
2405
|
+
"microbiology",
|
|
2406
|
+
"Thermotolerant coliforms, count",
|
|
2407
|
+
"Coliformes termotolerantes, contagem",
|
|
2408
|
+
U.mpn_100ml
|
|
2409
|
+
),
|
|
2410
|
+
defineParameter(
|
|
2411
|
+
"thermotolerant_coliforms_cfu",
|
|
2412
|
+
"microbiology",
|
|
2413
|
+
"Thermotolerant coliforms, count",
|
|
2414
|
+
"Coliformes termotolerantes, contagem",
|
|
2415
|
+
U.cfu_100ml
|
|
2416
|
+
),
|
|
2417
|
+
defineParameter(
|
|
2418
|
+
"heterotrophic_plate_count",
|
|
2419
|
+
"microbiology",
|
|
2420
|
+
"Heterotrophic plate count",
|
|
2421
|
+
"Bact\xE9rias heterotr\xF3ficas",
|
|
2422
|
+
U.cfu_ml
|
|
2423
|
+
),
|
|
2424
|
+
// Radioactivity (Bq/L even where a CAS exists)
|
|
2425
|
+
defineParameter(
|
|
2426
|
+
"gross_alpha",
|
|
2427
|
+
"radioactivity",
|
|
2428
|
+
"Gross alpha activity",
|
|
2429
|
+
"Atividade alfa total",
|
|
2430
|
+
U.bq_l
|
|
2431
|
+
),
|
|
2432
|
+
defineParameter(
|
|
2433
|
+
"gross_beta",
|
|
2434
|
+
"radioactivity",
|
|
2435
|
+
"Gross beta activity",
|
|
2436
|
+
"Atividade beta total",
|
|
2437
|
+
U.bq_l
|
|
2438
|
+
),
|
|
2439
|
+
defineParameter(
|
|
2440
|
+
"radium_226",
|
|
2441
|
+
"radioactivity",
|
|
2442
|
+
"Radium-226",
|
|
2443
|
+
"R\xE1dio-226",
|
|
2444
|
+
U.bq_l,
|
|
2445
|
+
{
|
|
2446
|
+
cas: "13982-63-3"
|
|
2447
|
+
}
|
|
2448
|
+
),
|
|
2449
|
+
defineParameter(
|
|
2450
|
+
"radium_228",
|
|
2451
|
+
"radioactivity",
|
|
2452
|
+
"Radium-228",
|
|
2453
|
+
"R\xE1dio-228",
|
|
2454
|
+
U.bq_l,
|
|
2455
|
+
{
|
|
2456
|
+
cas: "15262-20-1"
|
|
2457
|
+
}
|
|
2458
|
+
),
|
|
2459
|
+
defineParameter(
|
|
2460
|
+
"radon_222",
|
|
2461
|
+
"radioactivity",
|
|
2462
|
+
"Radon-222",
|
|
2463
|
+
"Rad\xF4nio-222",
|
|
2464
|
+
U.bq_l,
|
|
2465
|
+
{
|
|
2466
|
+
cas: "14859-67-7"
|
|
2467
|
+
}
|
|
2468
|
+
)
|
|
2469
|
+
];
|
|
2470
|
+
var BY_CODE = new Map(WATER_QUALITY_PARAMETERS.map((d) => [d.code, d]));
|
|
2471
|
+
var BY_CAS = new Map(
|
|
2472
|
+
WATER_QUALITY_PARAMETERS.filter((d) => d.cas).map((d) => [d.cas, d])
|
|
2473
|
+
);
|
|
2474
|
+
function getParameterDefinition(parameter) {
|
|
2475
|
+
if (parameter.vocabulary === "welldot") return BY_CODE.get(parameter.code);
|
|
2476
|
+
if (parameter.vocabulary === "cas") return BY_CAS.get(parameter.code);
|
|
2477
|
+
return void 0;
|
|
2478
|
+
}
|
|
2479
|
+
function getParameterLabel(parameter, locale) {
|
|
2480
|
+
const def = getParameterDefinition(parameter);
|
|
2481
|
+
if (!def) return parameter.code;
|
|
2482
|
+
return resolveLanguageText({ ...def.labels, en: def.label }, locale, "en");
|
|
2483
|
+
}
|
|
2484
|
+
function parameterKey(parameter) {
|
|
2485
|
+
const def = getParameterDefinition(parameter);
|
|
2486
|
+
if (def) return def.code;
|
|
2487
|
+
return `${parameter.vocabulary}:${parameter.code}`;
|
|
2488
|
+
}
|
|
2489
|
+
function isKnownParameter(parameter) {
|
|
2490
|
+
if (parameter.vocabulary !== "welldot") return true;
|
|
2491
|
+
return BY_CODE.has(parameter.code);
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
// src/vocab/attachment.vocab.ts
|
|
2495
|
+
var DOCUMENT_TYPES = [
|
|
2496
|
+
{
|
|
2497
|
+
value: "drilling_report",
|
|
2498
|
+
label: { en: "Drilling report", pt: "Relat\xF3rio de perfura\xE7\xE3o" }
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
value: "as_built_drawing",
|
|
2502
|
+
label: { en: "As-built drawing", pt: "Perfil construtivo as-built" }
|
|
2503
|
+
},
|
|
2504
|
+
{
|
|
2505
|
+
value: "registry_record",
|
|
2506
|
+
label: { en: "Registry record", pt: "Ficha cadastral" }
|
|
2507
|
+
},
|
|
2508
|
+
{ value: "photo", label: { en: "Photo", pt: "Fotografia" } },
|
|
2509
|
+
{
|
|
2510
|
+
value: "permit_document",
|
|
2511
|
+
label: { en: "Permit document", pt: "Portaria / outorga" }
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
value: "condition_evidence",
|
|
2515
|
+
label: { en: "Condition evidence", pt: "Comprovante de condicionante" }
|
|
2516
|
+
},
|
|
2517
|
+
{ value: "pump_curve", label: { en: "Pump curve", pt: "Curva da bomba" } },
|
|
2518
|
+
{
|
|
2519
|
+
value: "field_sheet",
|
|
2520
|
+
label: { en: "Field sheet", pt: "Planilha de campo" }
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
value: "test_report",
|
|
2524
|
+
label: {
|
|
2525
|
+
en: "Pumping test report",
|
|
2526
|
+
pt: "Relat\xF3rio de teste de bombeamento"
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
value: "lab_report",
|
|
2531
|
+
label: { en: "Lab report", pt: "Laudo laboratorial" }
|
|
2532
|
+
},
|
|
2533
|
+
{ value: "invoice", label: { en: "Invoice", pt: "Nota fiscal" } }
|
|
2534
|
+
];
|
|
2535
|
+
var DOCUMENT_TYPE_SUGGESTIONS = {
|
|
2536
|
+
root: ["drilling_report", "as_built_drawing", "registry_record", "photo"],
|
|
2537
|
+
pump: ["pump_curve", "invoice", "photo"],
|
|
2538
|
+
meter: ["photo", "invoice", "condition_evidence"],
|
|
2539
|
+
permit: ["permit_document", "photo"],
|
|
2540
|
+
condition: ["condition_evidence", "photo"],
|
|
2541
|
+
permit_history: ["permit_document", "invoice", "photo"],
|
|
2542
|
+
event: ["field_sheet", "photo"],
|
|
2543
|
+
history: ["condition_evidence", "photo", "invoice"],
|
|
2544
|
+
sample: ["lab_report", "field_sheet", "photo", "condition_evidence"]
|
|
2545
|
+
};
|
|
2546
|
+
|
|
2547
|
+
// src/vocab/construction.vocab.ts
|
|
2548
|
+
var DRILLING_METHODS = [
|
|
2549
|
+
{ value: "rotary", label: { en: "Rotary", pt: "Rotativo" } },
|
|
2550
|
+
{ value: "percussion", label: { en: "Percussion", pt: "Percuss\xE3o" } },
|
|
2551
|
+
{ value: "cable_tool", label: { en: "Cable tool", pt: "Percuss\xE3o a cabo" } },
|
|
2552
|
+
{ value: "auger", label: { en: "Auger", pt: "Trado" } },
|
|
2553
|
+
{
|
|
2554
|
+
value: "air_hammer",
|
|
2555
|
+
label: { en: "Air hammer", pt: "Martelo pneum\xE1tico" }
|
|
2556
|
+
}
|
|
2557
|
+
];
|
|
2558
|
+
var CONSTRUCTION_MATERIALS = [
|
|
2559
|
+
{ value: "pvc", label: { en: "PVC", pt: "PVC" } },
|
|
2560
|
+
{
|
|
2561
|
+
value: "geomechanical_pvc",
|
|
2562
|
+
label: { en: "Geomechanical PVC", pt: "PVC geomec\xE2nico" }
|
|
2563
|
+
},
|
|
2564
|
+
{ value: "carbon_steel", label: { en: "Carbon steel", pt: "A\xE7o carbono" } },
|
|
2565
|
+
{
|
|
2566
|
+
value: "galvanized_steel",
|
|
2567
|
+
label: { en: "Galvanized steel", pt: "A\xE7o galvanizado" }
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
value: "stainless_steel",
|
|
2571
|
+
label: { en: "Stainless steel", pt: "A\xE7o inox" }
|
|
2572
|
+
},
|
|
2573
|
+
{ value: "fiberglass", label: { en: "Fiberglass", pt: "Fibra de vidro" } }
|
|
2574
|
+
];
|
|
2575
|
+
var SCREEN_SLOT_TYPES = [
|
|
2576
|
+
{
|
|
2577
|
+
value: "continuous_slot",
|
|
2578
|
+
label: { en: "Continuous slot", pt: "Espiralado (tipo Johnson)" }
|
|
2579
|
+
},
|
|
2580
|
+
{ value: "slotted", label: { en: "Slotted", pt: "Ranhurado" } },
|
|
2581
|
+
{ value: "bridge_slot", label: { en: "Bridge slot", pt: "Tipo ponte" } },
|
|
2582
|
+
{ value: "louver", label: { en: "Louver", pt: "Veneziana" } },
|
|
2583
|
+
{ value: "perforated", label: { en: "Perforated", pt: "Perfurado" } },
|
|
2584
|
+
{ value: "nold", label: { en: "Nold type", pt: "Tipo Nold" } }
|
|
2585
|
+
];
|
|
2586
|
+
var CENTRALIZER_TYPES = [
|
|
2587
|
+
{ value: "spring_bow", label: { en: "Spring bow", pt: "Mola (spring bow)" } },
|
|
2588
|
+
{ value: "rigid", label: { en: "Rigid", pt: "R\xEDgido" } },
|
|
2589
|
+
{ value: "semi_rigid", label: { en: "Semi-rigid", pt: "Semirr\xEDgido" } },
|
|
2590
|
+
{ value: "polymer", label: { en: "Polymer", pt: "Polim\xE9rico" } },
|
|
2591
|
+
{ value: "carbon_steel", label: { en: "Carbon steel", pt: "A\xE7o carbono" } },
|
|
2592
|
+
{
|
|
2593
|
+
value: "galvanized_steel",
|
|
2594
|
+
label: { en: "Galvanized steel", pt: "A\xE7o galvanizado" }
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
value: "stainless_steel",
|
|
2598
|
+
label: { en: "Stainless steel", pt: "A\xE7o inox" }
|
|
2599
|
+
}
|
|
2600
|
+
];
|
|
2601
|
+
var CEMENT_PAD_TYPES = [
|
|
2602
|
+
{ value: "concrete", label: { en: "Concrete", pt: "Concreto" } },
|
|
2603
|
+
{
|
|
2604
|
+
value: "reinforced_concrete",
|
|
2605
|
+
label: { en: "Reinforced concrete", pt: "Concreto armado" }
|
|
2606
|
+
},
|
|
2607
|
+
{ value: "cement", label: { en: "Cement", pt: "Cimento" } },
|
|
2608
|
+
{ value: "mortar", label: { en: "Mortar", pt: "Argamassa" } }
|
|
2609
|
+
];
|
|
2610
|
+
|
|
2611
|
+
// src/vocab/general.vocab.ts
|
|
2612
|
+
var WELL_TYPES = [
|
|
2613
|
+
{ value: "tubular", label: { en: "Tubular", pt: "Tubular" } },
|
|
2614
|
+
{
|
|
2615
|
+
value: "hand_dug",
|
|
2616
|
+
label: { en: "Hand dug", pt: "Cacimba / po\xE7o escavado" }
|
|
2617
|
+
},
|
|
2618
|
+
{ value: "horizontal", label: { en: "Horizontal", pt: "Horizontal" } },
|
|
2619
|
+
{
|
|
2620
|
+
value: "infiltration_gallery",
|
|
2621
|
+
label: { en: "Infiltration gallery", pt: "Galeria de infiltra\xE7\xE3o" }
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
value: "artesian",
|
|
2625
|
+
label: { en: "Artesian (deprecated)", pt: "Artesiano (obsoleto)" },
|
|
2626
|
+
deprecated: true
|
|
2627
|
+
}
|
|
2628
|
+
];
|
|
2629
|
+
var WELL_PURPOSES = [
|
|
2630
|
+
{
|
|
2631
|
+
value: "production",
|
|
2632
|
+
label: { en: "Production", pt: "Produ\xE7\xE3o / capta\xE7\xE3o" }
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
value: "monitoring",
|
|
2636
|
+
label: { en: "Monitoring well", pt: "Po\xE7o de monitoramento" }
|
|
2637
|
+
},
|
|
2638
|
+
{ value: "piezometer", label: { en: "Piezometer", pt: "Piez\xF4metro" } },
|
|
2639
|
+
{
|
|
2640
|
+
value: "water_level_indicator",
|
|
2641
|
+
label: {
|
|
2642
|
+
en: "Water level indicator",
|
|
2643
|
+
pt: "INA \u2014 indicador de n\xEDvel d'\xE1gua"
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
{
|
|
2647
|
+
value: "observation",
|
|
2648
|
+
label: { en: "Observation well", pt: "Po\xE7o de observa\xE7\xE3o" }
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
value: "exploration",
|
|
2652
|
+
label: { en: "Exploration", pt: "Pesquisa / explorat\xF3rio" }
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
value: "injection",
|
|
2656
|
+
label: { en: "Injection / recharge", pt: "Inje\xE7\xE3o / recarga" }
|
|
2657
|
+
},
|
|
2658
|
+
{ value: "dewatering", label: { en: "Dewatering", pt: "Rebaixamento" } }
|
|
2659
|
+
];
|
|
2660
|
+
|
|
2661
|
+
// src/vocab/history.vocab.ts
|
|
2662
|
+
var HISTORY_LOG_CATEGORIES = [
|
|
2663
|
+
{ value: "maintenance", label: { en: "Maintenance", pt: "Manuten\xE7\xE3o" } },
|
|
2664
|
+
{ value: "inspection", label: { en: "Inspection", pt: "Inspe\xE7\xE3o" } },
|
|
2665
|
+
{ value: "incident", label: { en: "Incident", pt: "Incidente" } },
|
|
2666
|
+
{ value: "event", label: { en: "Event", pt: "Evento" } },
|
|
2667
|
+
{
|
|
2668
|
+
value: "status_change",
|
|
2669
|
+
label: { en: "Status change", pt: "Mudan\xE7a de situa\xE7\xE3o" }
|
|
2670
|
+
}
|
|
2671
|
+
];
|
|
2672
|
+
var HISTORY_LOG_SEVERITIES = [
|
|
2673
|
+
{ value: "low", label: { en: "Low", pt: "Baixa" } },
|
|
2674
|
+
{ value: "medium", label: { en: "Medium", pt: "M\xE9dia" } },
|
|
2675
|
+
{ value: "high", label: { en: "High", pt: "Alta" } },
|
|
2676
|
+
{ value: "critical", label: { en: "Critical", pt: "Cr\xEDtica" } }
|
|
2677
|
+
];
|
|
2678
|
+
|
|
2679
|
+
// src/vocab/hydrodynamic.vocab.ts
|
|
2680
|
+
var HYDRODYNAMIC_EVENT_TYPES = [
|
|
2681
|
+
{
|
|
2682
|
+
value: "spot_measurement",
|
|
2683
|
+
label: { en: "Spot measurement", pt: "Medi\xE7\xE3o pontual" }
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
value: "constant_rate",
|
|
2687
|
+
label: { en: "Constant rate", pt: "Vaz\xE3o constante" }
|
|
2688
|
+
},
|
|
2689
|
+
{ value: "step_drawdown", label: { en: "Step drawdown", pt: "Escalonada" } },
|
|
2690
|
+
{ value: "airlift", label: { en: "Air-lift", pt: "Air-lift" } },
|
|
2691
|
+
{
|
|
2692
|
+
value: "recovery_only",
|
|
2693
|
+
label: { en: "Recovery only", pt: "Recupera\xE7\xE3o" }
|
|
2694
|
+
}
|
|
2695
|
+
];
|
|
2696
|
+
var MEASUREMENT_METHODS = [
|
|
2697
|
+
{
|
|
2698
|
+
value: "electric_probe",
|
|
2699
|
+
label: { en: "Electric probe", pt: "Sonda el\xE9trica" }
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
value: "pressure_transducer",
|
|
2703
|
+
label: { en: "Pressure transducer", pt: "Transdutor de press\xE3o" }
|
|
2704
|
+
},
|
|
2705
|
+
{ value: "air_line", label: { en: "Air line", pt: "Linha de ar" } },
|
|
2706
|
+
{ value: "tape", label: { en: "Tape", pt: "Trena" } }
|
|
2707
|
+
];
|
|
2708
|
+
var AQUIFER_ANALYSIS_METHODS = [
|
|
2709
|
+
{ value: "cooper_jacob", label: { en: "Cooper-Jacob", pt: "Cooper-Jacob" } },
|
|
2710
|
+
{ value: "theis", label: { en: "Theis", pt: "Theis" } },
|
|
2711
|
+
{ value: "neuman", label: { en: "Neuman", pt: "Neuman" } },
|
|
2712
|
+
{ value: "hantush", label: { en: "Hantush", pt: "Hantush" } },
|
|
2713
|
+
{
|
|
2714
|
+
value: "birsoy_summers",
|
|
2715
|
+
label: { en: "Birsoy-Summers", pt: "Birsoy-Summers" }
|
|
2716
|
+
},
|
|
2717
|
+
{ value: "eden_hazel", label: { en: "Eden-Hazel", pt: "Eden-Hazel" } },
|
|
2718
|
+
{
|
|
2719
|
+
value: "visual_inspection",
|
|
2720
|
+
label: { en: "Visual inspection", pt: "Inspe\xE7\xE3o visual" }
|
|
2721
|
+
}
|
|
2722
|
+
];
|
|
2723
|
+
|
|
2724
|
+
// src/vocab/operation.vocab.ts
|
|
2725
|
+
var PUMP_TYPES = [
|
|
2726
|
+
{
|
|
2727
|
+
value: "submersible",
|
|
2728
|
+
label: { en: "Submersible pump", pt: "Bomba submersa" }
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
value: "vertical_turbine",
|
|
2732
|
+
label: { en: "Vertical turbine pump", pt: "Bomba de eixo vertical" }
|
|
2733
|
+
},
|
|
2734
|
+
{ value: "jet", label: { en: "Jet pump", pt: "Bomba injetora" } },
|
|
2735
|
+
{
|
|
2736
|
+
value: "progressive_cavity",
|
|
2737
|
+
label: { en: "Progressive cavity pump", pt: "Bomba helicoidal" }
|
|
2738
|
+
},
|
|
2739
|
+
{ value: "hand_pump", label: { en: "Hand pump", pt: "Bomba manual" } },
|
|
2740
|
+
{
|
|
2741
|
+
value: "compressor_airlift",
|
|
2742
|
+
label: { en: "Compressor (air-lift)", pt: "Compressor (air-lift)" }
|
|
2743
|
+
}
|
|
2744
|
+
];
|
|
2745
|
+
var POWER_SOURCES = [
|
|
2746
|
+
{ value: "grid", label: { en: "Grid", pt: "Rede el\xE9trica" } },
|
|
2747
|
+
{ value: "solar", label: { en: "Solar", pt: "Solar" } },
|
|
2748
|
+
{ value: "diesel", label: { en: "Diesel", pt: "Diesel" } },
|
|
2749
|
+
{ value: "hybrid", label: { en: "Hybrid", pt: "H\xEDbrido" } }
|
|
2750
|
+
];
|
|
2751
|
+
var METER_TYPES = [
|
|
2752
|
+
{ value: "mechanical", label: { en: "Mechanical", pt: "Mec\xE2nico" } },
|
|
2753
|
+
{
|
|
2754
|
+
value: "electromagnetic",
|
|
2755
|
+
label: { en: "Electromagnetic", pt: "Eletromagn\xE9tico" }
|
|
2756
|
+
},
|
|
2757
|
+
{ value: "ultrasonic", label: { en: "Ultrasonic", pt: "Ultrass\xF4nico" } }
|
|
2758
|
+
];
|
|
2759
|
+
var READING_SOURCES = [
|
|
2760
|
+
{ value: "manual", label: { en: "Manual", pt: "Manual" } },
|
|
2761
|
+
{ value: "telemetry", label: { en: "Telemetry", pt: "Telemetria" } }
|
|
2762
|
+
];
|
|
2763
|
+
var ESTIMATION_METHODS = [
|
|
2764
|
+
{
|
|
2765
|
+
value: "flow_time",
|
|
2766
|
+
label: { en: "Flow \xD7 operating time", pt: "Vaz\xE3o \xD7 tempo de opera\xE7\xE3o" }
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
value: "energy",
|
|
2770
|
+
label: { en: "Energy consumption", pt: "Consumo de energia" }
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
value: "user_statement",
|
|
2774
|
+
label: { en: "User statement", pt: "Informado pelo usu\xE1rio" }
|
|
2775
|
+
}
|
|
2776
|
+
];
|
|
2777
|
+
var MAINTENANCE_TYPES = [
|
|
2778
|
+
{ value: "inspection", label: { en: "Inspection", pt: "Inspe\xE7\xE3o" } },
|
|
2779
|
+
{ value: "cleaning", label: { en: "Cleaning", pt: "Limpeza" } },
|
|
2780
|
+
{
|
|
2781
|
+
value: "redevelopment",
|
|
2782
|
+
label: { en: "Redevelopment", pt: "Redesenvolvimento" }
|
|
2783
|
+
},
|
|
2784
|
+
{ value: "disinfection", label: { en: "Disinfection", pt: "Desinfec\xE7\xE3o" } },
|
|
2785
|
+
{
|
|
2786
|
+
value: "pump_service",
|
|
2787
|
+
label: { en: "Pump service", pt: "Manuten\xE7\xE3o da bomba" }
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
value: "meter_calibration",
|
|
2791
|
+
label: { en: "Meter calibration", pt: "Aferi\xE7\xE3o do hidr\xF4metro" }
|
|
2792
|
+
},
|
|
2793
|
+
{
|
|
2794
|
+
value: "video_inspection",
|
|
2795
|
+
label: {
|
|
2796
|
+
en: "Video inspection / optical logging",
|
|
2797
|
+
pt: "Filmagem / perfilagem \xF3tica"
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
value: "level_measurement",
|
|
2802
|
+
label: { en: "Level measurement", pt: "Medi\xE7\xE3o de n\xEDvel" }
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
value: "pump_test",
|
|
2806
|
+
label: { en: "Pumping test", pt: "Teste de bombeamento" }
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
value: "water_sampling",
|
|
2810
|
+
label: { en: "Water sampling", pt: "Coleta de \xE1gua" }
|
|
2811
|
+
}
|
|
2812
|
+
];
|
|
2813
|
+
|
|
2814
|
+
// src/vocab/permit.vocab.ts
|
|
2815
|
+
var PERMIT_TYPES = [
|
|
2816
|
+
{
|
|
2817
|
+
value: "abstraction_permit",
|
|
2818
|
+
label: { en: "Abstraction permit", pt: "Outorga de direito de uso" }
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
value: "preliminary_permit",
|
|
2822
|
+
label: { en: "Preliminary permit", pt: "Outorga pr\xE9via" }
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
value: "exemption",
|
|
2826
|
+
label: { en: "Exemption", pt: "Dispensa / uso insignificante" }
|
|
2827
|
+
},
|
|
2828
|
+
{ value: "registration", label: { en: "Registration", pt: "Cadastro" } },
|
|
2829
|
+
{
|
|
2830
|
+
value: "dewatering_permit",
|
|
2831
|
+
label: { en: "Dewatering permit", pt: "Outorga para rebaixamento" }
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
value: "drilling_permit",
|
|
2835
|
+
label: { en: "Drilling permit", pt: "Autoriza\xE7\xE3o de perfura\xE7\xE3o" }
|
|
2836
|
+
}
|
|
2837
|
+
];
|
|
2838
|
+
var WATER_USES = [
|
|
2839
|
+
{
|
|
2840
|
+
value: "human_supply",
|
|
2841
|
+
label: { en: "Human supply", pt: "Abastecimento humano" }
|
|
2842
|
+
},
|
|
2843
|
+
{ value: "industrial", label: { en: "Industrial", pt: "Industrial" } },
|
|
2844
|
+
{ value: "mining", label: { en: "Mining", pt: "Minera\xE7\xE3o" } },
|
|
2845
|
+
{ value: "irrigation", label: { en: "Irrigation", pt: "Irriga\xE7\xE3o" } },
|
|
2846
|
+
{
|
|
2847
|
+
value: "livestock",
|
|
2848
|
+
label: { en: "Livestock", pt: "Dessedenta\xE7\xE3o animal" }
|
|
2849
|
+
},
|
|
2850
|
+
{
|
|
2851
|
+
value: "commercial",
|
|
2852
|
+
label: { en: "Commercial", pt: "Comercial / servi\xE7os" }
|
|
2853
|
+
}
|
|
2854
|
+
];
|
|
2855
|
+
var CONDITION_CATEGORIES = [
|
|
2856
|
+
{
|
|
2857
|
+
value: "monitoring",
|
|
2858
|
+
label: { en: "Monitoring", pt: "Monitoramento" },
|
|
2859
|
+
description: {
|
|
2860
|
+
en: "Water level, flow, abstracted volume and water quality monitoring/sampling",
|
|
2861
|
+
pt: "Monitoramento/amostragem de n\xEDvel, vaz\xE3o, volume captado e qualidade da \xE1gua"
|
|
2862
|
+
}
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
value: "reporting",
|
|
2866
|
+
label: { en: "Reporting", pt: "Relat\xF3rios e declara\xE7\xF5es" },
|
|
2867
|
+
description: {
|
|
2868
|
+
en: "Periodic reports and volume/flow declarations submitted to the authority",
|
|
2869
|
+
pt: "Relat\xF3rios peri\xF3dicos e declara\xE7\xF5es de volume/vaz\xE3o entregues ao \xF3rg\xE3o"
|
|
2870
|
+
}
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
value: "equipment_installation",
|
|
2874
|
+
label: { en: "Equipment installation", pt: "Instala\xE7\xE3o de equipamentos" },
|
|
2875
|
+
description: {
|
|
2876
|
+
en: "Meters (hidr\xF4metro), level gauges, sampling taps, telemetry",
|
|
2877
|
+
pt: "Hidr\xF4metro, medidor de n\xEDvel, torneira de amostragem, telemetria"
|
|
2878
|
+
}
|
|
2879
|
+
},
|
|
2880
|
+
{
|
|
2881
|
+
value: "well_protection",
|
|
2882
|
+
label: { en: "Well protection", pt: "Prote\xE7\xE3o do po\xE7o" },
|
|
2883
|
+
description: {
|
|
2884
|
+
en: "Sanitary slab, seal, protection perimeter, wellhead closure",
|
|
2885
|
+
pt: "Laje de prote\xE7\xE3o, selo sanit\xE1rio, per\xEDmetro de prote\xE7\xE3o, tampa do po\xE7o"
|
|
2886
|
+
}
|
|
2887
|
+
},
|
|
2888
|
+
{
|
|
2889
|
+
value: "environmental",
|
|
2890
|
+
label: { en: "Environmental", pt: "Ambiental" },
|
|
2891
|
+
description: {
|
|
2892
|
+
en: "Environmental measures, compensation, licensing of the activity",
|
|
2893
|
+
pt: "Medidas ambientais, compensa\xE7\xE3o, licenciamento da atividade"
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2896
|
+
{
|
|
2897
|
+
value: "legal",
|
|
2898
|
+
label: { en: "Legal / administrative", pt: "Legal / administrativo" },
|
|
2899
|
+
description: {
|
|
2900
|
+
en: "Renewal request, fees, registrations, document submissions",
|
|
2901
|
+
pt: "Pedido de renova\xE7\xE3o, taxas, cadastros, entrega de documentos"
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
];
|
|
2905
|
+
var PERMIT_HISTORY_TYPES = [
|
|
2906
|
+
{ value: "filing", label: { en: "Filing", pt: "Protocolo" } },
|
|
2907
|
+
{ value: "process", label: { en: "Process", pt: "Andamento" } },
|
|
2908
|
+
{ value: "notification", label: { en: "Notification", pt: "Notifica\xE7\xE3o" } },
|
|
2909
|
+
{ value: "fee", label: { en: "Fee", pt: "Taxa" } },
|
|
2910
|
+
{ value: "inspection", label: { en: "Inspection", pt: "Vistoria" } },
|
|
2911
|
+
{ value: "decision", label: { en: "Decision", pt: "Decis\xE3o" } },
|
|
2912
|
+
{ value: "renewal", label: { en: "Renewal", pt: "Renova\xE7\xE3o" } }
|
|
2913
|
+
];
|
|
2914
|
+
|
|
2915
|
+
// src/vocab/vocab.ts
|
|
2916
|
+
function getVocabEntry(vocab, value) {
|
|
2917
|
+
if (value === void 0) return void 0;
|
|
2918
|
+
return vocab.find((entry) => entry.value === value);
|
|
2919
|
+
}
|
|
2920
|
+
function isVocabValue(vocab, value) {
|
|
2921
|
+
return getVocabEntry(vocab, value) !== void 0;
|
|
2922
|
+
}
|
|
2923
|
+
function getVocabLabel(vocab, value, locale) {
|
|
2924
|
+
const entry = getVocabEntry(vocab, value);
|
|
2925
|
+
return entry ? resolveLanguageText(entry.label, locale) : value;
|
|
2926
|
+
}
|
|
2927
|
+
function formatVocabList(vocab, values, locale) {
|
|
2928
|
+
return (values ?? []).map((v) => getVocabLabel(vocab, v, locale)).join(", ");
|
|
2929
|
+
}
|
|
2930
|
+
function vocabValues(vocab, { includeDeprecated = false } = {}) {
|
|
2931
|
+
return vocab.filter((entry) => includeDeprecated || !entry.deprecated).map((entry) => entry.value);
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
// src/vocab/closed.vocab.ts
|
|
2935
|
+
function closedVocab() {
|
|
2936
|
+
return (entries) => entries;
|
|
2937
|
+
}
|
|
2938
|
+
var valuesOf = (vocab) => vocab.map((entry) => entry.value);
|
|
2939
|
+
var WELL_STATUSES = closedVocab()([
|
|
2940
|
+
{ value: "active", label: { en: "Active", pt: "Ativo" } },
|
|
2941
|
+
{
|
|
2942
|
+
value: "maintenance",
|
|
2943
|
+
label: { en: "Under maintenance", pt: "Em manuten\xE7\xE3o" }
|
|
2944
|
+
},
|
|
2945
|
+
{ value: "inactive", label: { en: "Inactive", pt: "Paralisado" } },
|
|
2946
|
+
{
|
|
2947
|
+
value: "decommissioned",
|
|
2948
|
+
label: { en: "Decommissioned", pt: "Desativado" }
|
|
2949
|
+
},
|
|
2950
|
+
{ value: "abandoned", label: { en: "Abandoned", pt: "Abandonado" } }
|
|
2951
|
+
]);
|
|
2952
|
+
var PERMIT_ADMINISTRATIVE_STATUSES = closedVocab()([
|
|
2953
|
+
{ value: "requested", label: { en: "Requested", pt: "Requerida" } },
|
|
2954
|
+
{ value: "granted", label: { en: "Granted", pt: "Concedida" } },
|
|
2955
|
+
{ value: "suspended", label: { en: "Suspended", pt: "Suspensa" } },
|
|
2956
|
+
{ value: "revoked", label: { en: "Revoked", pt: "Revogada" } },
|
|
2957
|
+
{ value: "denied", label: { en: "Denied", pt: "Indeferida" } },
|
|
2958
|
+
{ value: "withdrawn", label: { en: "Withdrawn", pt: "Cancelada" } }
|
|
2959
|
+
]);
|
|
2960
|
+
var VOLUME_LIMIT_PERIODS = closedVocab()([
|
|
2961
|
+
{ value: "daily", label: { en: "Daily", pt: "Di\xE1rio" } },
|
|
2962
|
+
{ value: "monthly", label: { en: "Monthly", pt: "Mensal" } },
|
|
2963
|
+
{ value: "annual", label: { en: "Annual", pt: "Anual" } }
|
|
2964
|
+
]);
|
|
2965
|
+
var PRODUCTION_ENTRY_TYPES = closedVocab()([
|
|
2966
|
+
{
|
|
2967
|
+
value: "meter_reading",
|
|
2968
|
+
label: { en: "Meter reading", pt: "Leitura de hidr\xF4metro" }
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
value: "estimated_volume",
|
|
2972
|
+
label: { en: "Estimated volume", pt: "Volume estimado" }
|
|
2973
|
+
}
|
|
2974
|
+
]);
|
|
2975
|
+
var RESULT_QUALIFIERS = closedVocab()([
|
|
2976
|
+
{ value: "<", label: { en: "< less than", pt: "< menor que" } },
|
|
2977
|
+
{ value: ">", label: { en: "> greater than", pt: "> maior que" } },
|
|
2978
|
+
{ value: "not_detected", label: { en: "Not detected", pt: "N\xE3o detectado" } },
|
|
2979
|
+
{ value: "estimated", label: { en: "Estimated", pt: "Estimado" } }
|
|
2980
|
+
]);
|
|
2981
|
+
var RESULT_FRACTIONS = closedVocab()([
|
|
2982
|
+
{ value: "total", label: { en: "Total", pt: "Total" } },
|
|
2983
|
+
{ value: "dissolved", label: { en: "Dissolved", pt: "Dissolvida" } },
|
|
2984
|
+
{ value: "suspended", label: { en: "Suspended", pt: "Suspensa" } }
|
|
2985
|
+
]);
|
|
2986
|
+
var MEASUREMENT_LOCATIONS = closedVocab()([
|
|
2987
|
+
{ value: "field", label: { en: "Field", pt: "Campo" } },
|
|
2988
|
+
{ value: "lab", label: { en: "Lab", pt: "Laborat\xF3rio" } }
|
|
2989
|
+
]);
|
|
2990
|
+
var VALIDATION_STATUSES = closedVocab()([
|
|
2991
|
+
{ value: "unvalidated", label: { en: "Unvalidated", pt: "N\xE3o validado" } },
|
|
2992
|
+
{ value: "validated", label: { en: "Validated", pt: "Validado" } },
|
|
2993
|
+
{ value: "qualified", label: { en: "Qualified", pt: "Qualificado" } },
|
|
2994
|
+
{ value: "rejected", label: { en: "Rejected", pt: "Rejeitado" } }
|
|
2995
|
+
]);
|
|
2996
|
+
var PARAMETER_GROUPS = closedVocab()([
|
|
2997
|
+
{
|
|
2998
|
+
value: "physical",
|
|
2999
|
+
label: { en: "Physical / field", pt: "F\xEDsico / campo" }
|
|
3000
|
+
},
|
|
3001
|
+
{ value: "aggregate", label: { en: "Aggregate", pt: "Agregados" } },
|
|
3002
|
+
{ value: "major_ion", label: { en: "Major ions", pt: "\xCDons maiores" } },
|
|
3003
|
+
{ value: "nutrient", label: { en: "Nutrients", pt: "Nutrientes" } },
|
|
3004
|
+
{ value: "organic", label: { en: "Organic", pt: "Org\xE2nicos" } },
|
|
3005
|
+
{ value: "disinfection", label: { en: "Disinfection", pt: "Desinfec\xE7\xE3o" } },
|
|
3006
|
+
{
|
|
3007
|
+
value: "mining_redox",
|
|
3008
|
+
label: { en: "Mining and redox", pt: "Minera\xE7\xE3o e redox" }
|
|
3009
|
+
},
|
|
3010
|
+
{ value: "metal", label: { en: "Metals / trace", pt: "Metais / tra\xE7o" } },
|
|
3011
|
+
{ value: "microbiology", label: { en: "Microbiology", pt: "Microbiologia" } },
|
|
3012
|
+
{
|
|
3013
|
+
value: "radioactivity",
|
|
3014
|
+
label: { en: "Radioactivity", pt: "Radioatividade" }
|
|
3015
|
+
}
|
|
3016
|
+
]);
|
|
3017
|
+
var WELL_STATUS_VALUES = valuesOf(WELL_STATUSES);
|
|
3018
|
+
var PERMIT_ADMINISTRATIVE_STATUS_VALUES = valuesOf(
|
|
3019
|
+
PERMIT_ADMINISTRATIVE_STATUSES
|
|
3020
|
+
);
|
|
3021
|
+
var QUALIFIER_VALUES = valuesOf(RESULT_QUALIFIERS);
|
|
3022
|
+
var FRACTION_VALUES = valuesOf(RESULT_FRACTIONS);
|
|
3023
|
+
var MEASURED_IN_VALUES = valuesOf(MEASUREMENT_LOCATIONS);
|
|
3024
|
+
var FILTRATION_LOCATION_VALUES = valuesOf(MEASUREMENT_LOCATIONS);
|
|
3025
|
+
var VALIDATION_STATUS_VALUES = valuesOf(VALIDATION_STATUSES);
|
|
3026
|
+
var PARAMETER_GROUP_VALUES = valuesOf(PARAMETER_GROUPS);
|
|
3027
|
+
var NUMERIC_QUALIFIERS = [
|
|
3028
|
+
"<",
|
|
3029
|
+
">",
|
|
3030
|
+
"estimated"
|
|
3031
|
+
];
|
|
3032
|
+
var PARENT_SAMPLE_TYPES = [
|
|
3033
|
+
"field_duplicate",
|
|
3034
|
+
"split_sample"
|
|
3035
|
+
];
|
|
3036
|
+
var BLANK_SAMPLE_TYPES = [
|
|
3037
|
+
"field_blank",
|
|
3038
|
+
"trip_blank",
|
|
3039
|
+
"equipment_blank"
|
|
3040
|
+
];
|
|
3041
|
+
|
|
3042
|
+
// src/vocab/waterSample.vocab.ts
|
|
3043
|
+
var SAMPLE_TYPES = [
|
|
3044
|
+
{ value: "routine", label: { en: "Routine", pt: "Rotina" } },
|
|
3045
|
+
{
|
|
3046
|
+
value: "field_duplicate",
|
|
3047
|
+
label: { en: "Field duplicate", pt: "Duplicata de campo" }
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
value: "split_sample",
|
|
3051
|
+
label: { en: "Split sample", pt: "Amostra dividida (split)" }
|
|
3052
|
+
},
|
|
3053
|
+
{ value: "field_blank", label: { en: "Field blank", pt: "Branco de campo" } },
|
|
3054
|
+
{
|
|
3055
|
+
value: "trip_blank",
|
|
3056
|
+
label: { en: "Trip blank", pt: "Branco de transporte" }
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
value: "equipment_blank",
|
|
3060
|
+
label: { en: "Equipment blank", pt: "Branco de equipamento" }
|
|
3061
|
+
}
|
|
3062
|
+
];
|
|
3063
|
+
var SAMPLING_METHODS = [
|
|
3064
|
+
{
|
|
3065
|
+
value: "low_flow",
|
|
3066
|
+
label: { en: "Low flow", pt: "Purga de baixa vaz\xE3o (micropurga)" }
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
value: "volumetric_purge",
|
|
3070
|
+
label: { en: "Volumetric purge", pt: "Purga de volume determinado" }
|
|
3071
|
+
},
|
|
3072
|
+
{ value: "no_purge", label: { en: "No purge", pt: "Amostragem sem purga" } },
|
|
3073
|
+
{
|
|
3074
|
+
value: "pump_discharge",
|
|
3075
|
+
label: { en: "Pump discharge", pt: "Bomba de produ\xE7\xE3o em opera\xE7\xE3o" }
|
|
3076
|
+
}
|
|
3077
|
+
];
|
|
3078
|
+
var SAMPLING_POINT_TYPES = [
|
|
3079
|
+
{
|
|
3080
|
+
value: "pump_discharge",
|
|
3081
|
+
label: { en: "Pump discharge", pt: "Sa\xEDda da bomba de produ\xE7\xE3o" }
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
value: "wellhead_tap",
|
|
3085
|
+
label: { en: "Wellhead tap", pt: "Torneira do cavalete" }
|
|
3086
|
+
},
|
|
3087
|
+
{ value: "in_well", label: { en: "In well", pt: "Dentro do po\xE7o" } }
|
|
3088
|
+
];
|
|
3089
|
+
var SAMPLING_DEVICES = [
|
|
3090
|
+
{
|
|
3091
|
+
value: "bailer",
|
|
3092
|
+
label: { en: "Bailer", pt: "Bailer (amostrador de reten\xE7\xE3o)" }
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
value: "discrete_depth_sampler",
|
|
3096
|
+
label: {
|
|
3097
|
+
en: "Discrete depth sampler",
|
|
3098
|
+
pt: "Amostrador pontual de profundidade"
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
value: "passive_diffusion_bag",
|
|
3103
|
+
label: { en: "Passive diffusion bag", pt: "Bolsa de difus\xE3o passiva" }
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
value: "grab_sleeve",
|
|
3107
|
+
label: {
|
|
3108
|
+
en: "Grab sleeve (HydraSleeve)",
|
|
3109
|
+
pt: "Amostrador passivo tipo luva (HydraSleeve)"
|
|
3110
|
+
}
|
|
3111
|
+
},
|
|
3112
|
+
{
|
|
3113
|
+
value: "low_flow_pump",
|
|
3114
|
+
label: { en: "Low-flow pump", pt: "Bomba de baixa vaz\xE3o" }
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
value: "packer_pump",
|
|
3118
|
+
label: { en: "Packer pump", pt: "Bomba com obturador (packer)" }
|
|
3119
|
+
}
|
|
3120
|
+
];
|
|
3121
|
+
|
|
1054
3122
|
// src/utils/units.ts
|
|
1055
3123
|
var FEET_PER_METER = 3.280839895;
|
|
1056
3124
|
var METERS_PER_FOOT = 0.3048;
|
|
@@ -1060,6 +3128,11 @@ var M3H_TO_USGPM = 4.402867361;
|
|
|
1060
3128
|
var M2S_TO_M2D = 86400;
|
|
1061
3129
|
var PSI_PER_KPA = 0.145037738;
|
|
1062
3130
|
var SLOT_MM = 0.0254;
|
|
3131
|
+
var KW_PER_CV = 0.73549875;
|
|
3132
|
+
var KW_PER_HP = 0.745699872;
|
|
3133
|
+
var LITERS_PER_M3 = 1e3;
|
|
3134
|
+
var FT3_PER_M3 = 35.314666721;
|
|
3135
|
+
var USGAL_PER_M3 = 264.172052358;
|
|
1063
3136
|
function metersToFeet(m) {
|
|
1064
3137
|
return m * FEET_PER_METER;
|
|
1065
3138
|
}
|
|
@@ -1084,6 +3157,68 @@ function cubicMeterPerHourToUsGallonsPerMinute(q) {
|
|
|
1084
3157
|
function usGallonsPerMinuteToCubicMeterPerHour(q) {
|
|
1085
3158
|
return q / M3H_TO_USGPM;
|
|
1086
3159
|
}
|
|
3160
|
+
function litersToCubicMeters(l) {
|
|
3161
|
+
return l / LITERS_PER_M3;
|
|
3162
|
+
}
|
|
3163
|
+
function cubicMetersToLiters(m3) {
|
|
3164
|
+
return m3 * LITERS_PER_M3;
|
|
3165
|
+
}
|
|
3166
|
+
function cubicMetersToCubicFeet(m3) {
|
|
3167
|
+
return m3 * FT3_PER_M3;
|
|
3168
|
+
}
|
|
3169
|
+
function cubicFeetToCubicMeters(ft3) {
|
|
3170
|
+
return ft3 / FT3_PER_M3;
|
|
3171
|
+
}
|
|
3172
|
+
function cubicMetersToUsGallons(m3) {
|
|
3173
|
+
return m3 * USGAL_PER_M3;
|
|
3174
|
+
}
|
|
3175
|
+
function usGallonsToCubicMeters(gal) {
|
|
3176
|
+
return gal / USGAL_PER_M3;
|
|
3177
|
+
}
|
|
3178
|
+
function cvToKilowatts(cv) {
|
|
3179
|
+
return cv * KW_PER_CV;
|
|
3180
|
+
}
|
|
3181
|
+
function kilowattsToCv(kw) {
|
|
3182
|
+
return kw / KW_PER_CV;
|
|
3183
|
+
}
|
|
3184
|
+
function hpToKilowatts(hp) {
|
|
3185
|
+
return hp * KW_PER_HP;
|
|
3186
|
+
}
|
|
3187
|
+
function kilowattsToHp(kw) {
|
|
3188
|
+
return kw / KW_PER_HP;
|
|
3189
|
+
}
|
|
3190
|
+
function flowFromCanonical(m3h, unit) {
|
|
3191
|
+
if (unit === "L/s") return cubicMeterPerHourToLitersPerSecond(m3h);
|
|
3192
|
+
if (unit === "gpm") return cubicMeterPerHourToUsGallonsPerMinute(m3h);
|
|
3193
|
+
return m3h;
|
|
3194
|
+
}
|
|
3195
|
+
function flowToCanonical(value, unit) {
|
|
3196
|
+
if (unit === "L/s") return litersPerSecondToCubicMeterPerHour(value);
|
|
3197
|
+
if (unit === "gpm") return usGallonsPerMinuteToCubicMeterPerHour(value);
|
|
3198
|
+
return value;
|
|
3199
|
+
}
|
|
3200
|
+
function powerFromCanonical(kw, unit) {
|
|
3201
|
+
if (unit === "cv") return kilowattsToCv(kw);
|
|
3202
|
+
if (unit === "hp") return kilowattsToHp(kw);
|
|
3203
|
+
return kw;
|
|
3204
|
+
}
|
|
3205
|
+
function powerToCanonical(value, unit) {
|
|
3206
|
+
if (unit === "cv") return cvToKilowatts(value);
|
|
3207
|
+
if (unit === "hp") return hpToKilowatts(value);
|
|
3208
|
+
return value;
|
|
3209
|
+
}
|
|
3210
|
+
function volumeFromCanonical(m3, unit) {
|
|
3211
|
+
if (unit === "L") return cubicMetersToLiters(m3);
|
|
3212
|
+
if (unit === "ft3") return cubicMetersToCubicFeet(m3);
|
|
3213
|
+
if (unit === "gal") return cubicMetersToUsGallons(m3);
|
|
3214
|
+
return m3;
|
|
3215
|
+
}
|
|
3216
|
+
function volumeToCanonical(value, unit) {
|
|
3217
|
+
if (unit === "L") return litersToCubicMeters(value);
|
|
3218
|
+
if (unit === "ft3") return cubicFeetToCubicMeters(value);
|
|
3219
|
+
if (unit === "gal") return usGallonsToCubicMeters(value);
|
|
3220
|
+
return value;
|
|
3221
|
+
}
|
|
1087
3222
|
function squareMeterPerSecondToSquareMeterPerDay(t) {
|
|
1088
3223
|
return t * M2S_TO_M2D;
|
|
1089
3224
|
}
|
|
@@ -1121,64 +3256,227 @@ function minutesToHours(min) {
|
|
|
1121
3256
|
function hoursToMinutes(h) {
|
|
1122
3257
|
return h * 60;
|
|
1123
3258
|
}
|
|
3259
|
+
var MG_L_PER_UNIT = {
|
|
3260
|
+
"g/L": 1e3,
|
|
3261
|
+
"mg/L": 1,
|
|
3262
|
+
"ug/L": 1e-3,
|
|
3263
|
+
"ng/L": 1e-6
|
|
3264
|
+
};
|
|
3265
|
+
function concentrationToCanonical(value, unit) {
|
|
3266
|
+
return value * MG_L_PER_UNIT[unit];
|
|
3267
|
+
}
|
|
3268
|
+
function concentrationFromCanonical(mgL, unit) {
|
|
3269
|
+
return mgL / MG_L_PER_UNIT[unit];
|
|
3270
|
+
}
|
|
3271
|
+
function milliSiemensPerMeterToMicroSiemensPerCm(mSm) {
|
|
3272
|
+
return mSm * 10;
|
|
3273
|
+
}
|
|
3274
|
+
function milliSiemensPerCmToMicroSiemensPerCm(mScm) {
|
|
3275
|
+
return mScm * 1e3;
|
|
3276
|
+
}
|
|
3277
|
+
function normalizeColorUnit(unit) {
|
|
3278
|
+
const u = unit.trim().toLowerCase().replace(/\s+/g, "");
|
|
3279
|
+
return ["uh", "hazen", "mgpt-co/l", "mgpt/l", "pt-co", "pcu", "tcu"].includes(
|
|
3280
|
+
u
|
|
3281
|
+
) ? "uH" : void 0;
|
|
3282
|
+
}
|
|
3283
|
+
function turbidityCodeForUnit(unit) {
|
|
3284
|
+
switch (unit.trim().toUpperCase()) {
|
|
3285
|
+
case "NTU":
|
|
3286
|
+
return "turbidity_ntu";
|
|
3287
|
+
case "FNU":
|
|
3288
|
+
return "turbidity_fnu";
|
|
3289
|
+
case "FAU":
|
|
3290
|
+
return "turbidity_fau";
|
|
3291
|
+
case "FTU":
|
|
3292
|
+
case "UT":
|
|
3293
|
+
return "turbidity";
|
|
3294
|
+
default:
|
|
3295
|
+
return void 0;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
function expandedToStandardUncertainty(expanded, coverageFactor = 2) {
|
|
3299
|
+
return expanded / coverageFactor;
|
|
3300
|
+
}
|
|
1124
3301
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1125
3302
|
0 && (module.exports = {
|
|
3303
|
+
AQUIFER_ANALYSIS_METHODS,
|
|
1126
3304
|
AirliftEventSchema,
|
|
1127
3305
|
AquiferAnalysisSchema,
|
|
1128
3306
|
AttachmentSchema,
|
|
3307
|
+
BLANK_SAMPLE_TYPES,
|
|
3308
|
+
BR_GM_MS_888_2021,
|
|
1129
3309
|
BoreHoleSchema,
|
|
3310
|
+
CEMENT_PAD_TYPES,
|
|
3311
|
+
CENTRALIZER_TYPES,
|
|
3312
|
+
CONDITION_CATEGORIES,
|
|
3313
|
+
CONSTRUCTION_MATERIALS,
|
|
1130
3314
|
CaveSchema,
|
|
1131
3315
|
CementPadSchema,
|
|
1132
3316
|
CentralizerSchema,
|
|
3317
|
+
ConditionFulfillmentSchema,
|
|
1133
3318
|
ConstantRateEventSchema,
|
|
3319
|
+
DOCUMENT_TYPES,
|
|
3320
|
+
DOCUMENT_TYPE_SUGGESTIONS,
|
|
3321
|
+
DRILLING_METHODS,
|
|
3322
|
+
ESTIMATION_METHODS,
|
|
3323
|
+
EU_2020_2184,
|
|
3324
|
+
EstimatedVolumeSchema,
|
|
1134
3325
|
FGDC_TEXTURES_OPTIONS,
|
|
3326
|
+
FILTRATION_LOCATION_VALUES,
|
|
3327
|
+
FRACTION_VALUES,
|
|
3328
|
+
FiltrationSchema,
|
|
1135
3329
|
FractureSchema,
|
|
3330
|
+
HISTORY_LOG_CATEGORIES,
|
|
3331
|
+
HISTORY_LOG_SEVERITIES,
|
|
3332
|
+
HYDRODYNAMIC_EVENT_TYPES,
|
|
1136
3333
|
HistoryLogEntrySchema,
|
|
1137
3334
|
HoleFillSchema,
|
|
1138
3335
|
HydrodynamicEventBaseSchema,
|
|
1139
3336
|
HydrodynamicEventSchema,
|
|
3337
|
+
LaboratorySchema,
|
|
1140
3338
|
LevelReadingSchema,
|
|
1141
3339
|
LithologySchema,
|
|
1142
3340
|
LocationPropertiesSchema,
|
|
1143
3341
|
LocationSchema,
|
|
3342
|
+
MAINTENANCE_TYPES,
|
|
3343
|
+
MEASURED_IN_VALUES,
|
|
3344
|
+
MEASUREMENT_LOCATIONS,
|
|
3345
|
+
MEASUREMENT_METHODS,
|
|
3346
|
+
METER_TYPES,
|
|
3347
|
+
MeterReadingSchema,
|
|
3348
|
+
MeterSchema,
|
|
3349
|
+
MonthlyGrantSchema,
|
|
3350
|
+
NEPHELOMETRIC_TURBIDITY_CODES,
|
|
3351
|
+
NUMERIC_QUALIFIERS,
|
|
3352
|
+
OperatingRegimeSchema,
|
|
3353
|
+
PARAMETER_GROUPS,
|
|
3354
|
+
PARAMETER_GROUP_VALUES,
|
|
3355
|
+
PARENT_SAMPLE_TYPES,
|
|
3356
|
+
PERMIT_ADMINISTRATIVE_STATUSES,
|
|
3357
|
+
PERMIT_ADMINISTRATIVE_STATUS_VALUES,
|
|
3358
|
+
PERMIT_HISTORY_TYPES,
|
|
3359
|
+
PERMIT_TYPES,
|
|
3360
|
+
POWER_SOURCES,
|
|
3361
|
+
PRODUCTION_ENTRY_TYPES,
|
|
3362
|
+
PUMP_TYPES,
|
|
3363
|
+
ParameterSchema,
|
|
3364
|
+
PermitAdministrativeStatusSchema,
|
|
3365
|
+
PermitConditionSchema,
|
|
3366
|
+
PermitHistoryEntrySchema,
|
|
3367
|
+
PermitSchema,
|
|
3368
|
+
ProductionEntryBaseSchema,
|
|
3369
|
+
ProductionEntrySchema,
|
|
3370
|
+
PumpElectricalSchema,
|
|
3371
|
+
PumpInstallationSchema,
|
|
1144
3372
|
PumpingStepSchema,
|
|
3373
|
+
PurgeReadingSchema,
|
|
3374
|
+
PurgeSchema,
|
|
3375
|
+
QUALIFIER_VALUES,
|
|
3376
|
+
READING_SOURCES,
|
|
3377
|
+
RESULT_FRACTIONS,
|
|
3378
|
+
RESULT_QUALIFIERS,
|
|
1145
3379
|
RecoveryOnlyEventSchema,
|
|
1146
3380
|
RecoveryPhaseSchema,
|
|
1147
3381
|
ReductionSchema,
|
|
3382
|
+
ResultQualifierSchema,
|
|
3383
|
+
ResultValidationSchema,
|
|
3384
|
+
SAMPLE_TYPES,
|
|
3385
|
+
SAMPLING_DEVICES,
|
|
3386
|
+
SAMPLING_METHODS,
|
|
3387
|
+
SAMPLING_POINT_TYPES,
|
|
3388
|
+
SCREEN_SLOT_TYPES,
|
|
1148
3389
|
SECTION_KEYS,
|
|
3390
|
+
SamplingPointSchema,
|
|
1149
3391
|
SpotMeasurementEventSchema,
|
|
1150
3392
|
StepDrawdownEventSchema,
|
|
1151
3393
|
SurfaceCaseSchema,
|
|
1152
3394
|
TextureSchema,
|
|
3395
|
+
TimeResolutionSchema,
|
|
3396
|
+
VALIDATION_STATUSES,
|
|
3397
|
+
VALIDATION_STATUS_VALUES,
|
|
3398
|
+
VISIBILITY_LEAF_KEYS,
|
|
3399
|
+
VISIBILITY_TREE,
|
|
3400
|
+
VOLUME_LIMIT_PERIODS,
|
|
3401
|
+
VolumeLimitSchema,
|
|
3402
|
+
WATER_QUALITY_LIMIT_SETS,
|
|
3403
|
+
WATER_QUALITY_PARAMETERS,
|
|
3404
|
+
WATER_QUALITY_UNITS,
|
|
3405
|
+
WATER_QUALITY_VOCABULARY_VERSION,
|
|
3406
|
+
WATER_USES,
|
|
3407
|
+
WELL_PURPOSES,
|
|
3408
|
+
WELL_STATUSES,
|
|
3409
|
+
WELL_STATUS_VALUES,
|
|
3410
|
+
WELL_TYPES,
|
|
3411
|
+
WHO_GDWQ_2022,
|
|
3412
|
+
WaterQualityResultSchema,
|
|
3413
|
+
WaterSampleSchema,
|
|
1153
3414
|
WellCaseSchema,
|
|
1154
3415
|
WellIdSchema,
|
|
1155
3416
|
WellSchema,
|
|
1156
3417
|
WellScreenSchema,
|
|
3418
|
+
WellStatusSchema,
|
|
3419
|
+
calculatedWellDepth,
|
|
1157
3420
|
checkIfProfileIsEmpty,
|
|
3421
|
+
concentrationFromCanonical,
|
|
3422
|
+
concentrationToCanonical,
|
|
1158
3423
|
convertProfileFromJSON,
|
|
3424
|
+
cubicFeetToCubicMeters,
|
|
1159
3425
|
cubicMeterPerHourToLitersPerSecond,
|
|
1160
3426
|
cubicMeterPerHourToUsGallonsPerMinute,
|
|
3427
|
+
cubicMetersToCubicFeet,
|
|
3428
|
+
cubicMetersToLiters,
|
|
3429
|
+
cubicMetersToUsGallons,
|
|
3430
|
+
cvToKilowatts,
|
|
1161
3431
|
decimalDegreesToDms,
|
|
1162
3432
|
deserializeWell,
|
|
1163
3433
|
dmsToDecimalDegrees,
|
|
3434
|
+
expandedToStandardUncertainty,
|
|
1164
3435
|
feetToMeters,
|
|
3436
|
+
flowFromCanonical,
|
|
3437
|
+
flowToCanonical,
|
|
3438
|
+
formatVocabList,
|
|
3439
|
+
getLimitSet,
|
|
3440
|
+
getParameterDefinition,
|
|
3441
|
+
getParameterLabel,
|
|
3442
|
+
getVocabEntry,
|
|
3443
|
+
getVocabLabel,
|
|
3444
|
+
hasWellData,
|
|
1165
3445
|
hoursToMinutes,
|
|
3446
|
+
hpToKilowatts,
|
|
1166
3447
|
inchesToMm,
|
|
3448
|
+
isKnownParameter,
|
|
3449
|
+
isVocabValue,
|
|
1167
3450
|
isWellEmpty,
|
|
1168
3451
|
kilopascalToPsi,
|
|
3452
|
+
kilowattsToCv,
|
|
3453
|
+
kilowattsToHp,
|
|
1169
3454
|
litersPerSecondToCubicMeterPerHour,
|
|
3455
|
+
litersToCubicMeters,
|
|
1170
3456
|
metersToFeet,
|
|
3457
|
+
milliSiemensPerCmToMicroSiemensPerCm,
|
|
3458
|
+
milliSiemensPerMeterToMicroSiemensPerCm,
|
|
1171
3459
|
minutesToHours,
|
|
1172
3460
|
mmToInches,
|
|
1173
3461
|
mmToSlotNumber,
|
|
3462
|
+
normalizeColorUnit,
|
|
3463
|
+
parameterKey,
|
|
1174
3464
|
parseWell,
|
|
3465
|
+
powerFromCanonical,
|
|
3466
|
+
powerToCanonical,
|
|
1175
3467
|
profileToWell,
|
|
1176
3468
|
psiToKilopascal,
|
|
1177
3469
|
redactWell,
|
|
3470
|
+
resolveLanguageText,
|
|
1178
3471
|
serializeWell,
|
|
1179
3472
|
slotNumberToMm,
|
|
1180
3473
|
squareMeterPerDayToSquareMeterPerSecond,
|
|
1181
3474
|
squareMeterPerSecondToSquareMeterPerDay,
|
|
1182
|
-
|
|
3475
|
+
turbidityCodeForUnit,
|
|
3476
|
+
usGallonsPerMinuteToCubicMeterPerHour,
|
|
3477
|
+
usGallonsToCubicMeters,
|
|
3478
|
+
vocabValues,
|
|
3479
|
+
volumeFromCanonical,
|
|
3480
|
+
volumeToCanonical
|
|
1183
3481
|
});
|
|
1184
3482
|
//# sourceMappingURL=index.cjs.map
|