Created At: 2026-06-14T13:52:25Z
Completed At: 2026-06-14T13:52:25Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4581
Total Bytes: 193572
Showing lines 4420 to 4460
The following code has been modified to include a line number before every line, in the format: <line_number>: <original_line>. Please note that any changes targeting the original code should remove the line number, colon, and leading space.
4420:         
4421:         parsedRows.push(row);
4422:       }
4423:       return parsedRows;
4424:     }
4425: 
4426:     // Event listener for CSV file selection
4427:     document.addEventListener('change', function(e) {
4428:       if (e.target && e.target.id === 'futureSetCsvFile') {
4429:         const file = e.target.files[0];
4430:         const indicator = document.getElementById('csvStatusIndicator');
4431:         const hiddenInput = document.getElementById('futureSetCsvData');
4432:         
4433:         if (!file) {
4434:           if (hiddenInput) hiddenInput.value = '';
4435:           if (indicator) indicator.innerText = '';
4436:           return;
4437:         }
4438:         
4439:         const reader = new FileReader();
4440:         reader.onload = function(evt) {
4441:           const text = evt.target.result;
4442:           const rows = parseCsvText(text);
4443:           if (rows.length > 0) {
4444:             if (hiddenInput) {
4445:               hiddenInput.value = JSON.stringify(rows);
4446:               updateSettingsChartPreview(); // Trigger real-time settings preview
4447:             }
4448:             const years = rows.map(r => r.year).filter(y => !isNaN(y));
4449:             const minYear = Math.min(...years);
4450:             const maxYear = Math.max(...years);
4451:             if (indicator) {
4452:               indicator.innerText = `CSV Terdeteksi: ${rows.length} baris data (${minYear} - ${maxYear}).`;
4453:               indicator.style.color = '#16a34a';
4454:             }
4455:           } else {
4456:             alert('Gagal mendeteksi data valid di file CSV. Pastikan file memiliki kolom Tahun/Year.');
4457:             e.target.value = '';
4458:             if (hiddenInput) {
4459:               hiddenInput.value = '';
4460:               updateSettingsChartPreview();
The above content does NOT show the entire file contents. If you need to view any lines of the file which were not shown to complete your task, call this tool again to view those lines.
