{"version":3,"sources":["webpack:///./src/views/components/Sensors/CurrentSensorListItem.vue?3c1d","webpack:///./src/views/components/Sensors/CurrentSensorListItem.vue","webpack:///./src/views/components/Sensors/CurrentSensorListItem.vue?3315","webpack:///./src/views/components/Sensors/CurrentSensorListItem.vue?2d30"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","connected","pumpStatus","_t","staticClass","name","params","id","value","attachedDeviceTypeId","_e","_v","on","showCurrentDialog","_s","currentDisplay","model","callback","$$v","expression","staticRenderFns","defineComponent","components","SensorHeader","CurrentDialog","props","type","Object","setup","ref","rawCurrent","computed","alarmStatus","alarm","vSupplies","VSupplies","raw","I1","currentValue","num","parseFloat","isNaN","toFixed","component","VBtn","VCol","VExpansionPanel","VExpansionPanelContent","VImg","VRow"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,oBAAoB,CAACA,EAAG,eAAe,CAACE,MAAM,CAAC,KAAO,QAAQ,WAAaN,EAAIO,UAAU,UAAYP,EAAIO,UAAU,OAASP,EAAIO,UAAaP,EAAIQ,WAAa,KAAO,MAAS,QAAQ,CAACR,EAAIS,GAAG,YAAY,GAAGL,EAAG,4BAA4B,CAACA,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,SAAS,QAAU,WAAW,CAACF,EAAG,QAAQ,CAACM,YAAY,OAAOJ,MAAM,CAAC,KAAO,MAAM,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,MAAQ,SAAS,QAAU,WAAW,CAACF,EAAG,QAAQ,CAACM,YAAY,OAAOJ,MAAM,CAAC,KAAO,MAAM,CAAEN,EAAS,MAAEI,EAAG,cAAc,CAACE,MAAM,CAAC,GAAK,CAAEK,KAAM,UAAWC,OAAQ,CAAEC,GAAIb,EAAIc,MAAMC,yBAA2B,CAACX,EAAG,QAAQ,CAACM,YAAY,eAAeJ,MAAM,CAA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EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,kBAAA,KAAgBC,yBAAA,KAAuBC,OAAA,KAAKC,OAAA","file":"js/chunk-2d0e87e6.b21fd2d5.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-expansion-panel',[_c('SensorHeader',{attrs:{\"icon\":\"bilge\",\"responsive\":_vm.connected,\"connected\":_vm.connected,\"status\":_vm.connected ? (_vm.pumpStatus ? 'On' : 'Off') : 'N/A'}},[_vm._t(\"default\")],2),_c('v-expansion-panel-content',[_c('v-row',{attrs:{\"align\":\"center\",\"justify\":\"center\"}},[_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"8\"}},[_c('v-row',{attrs:{\"align\":\"center\",\"justify\":\"center\"}},[_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"4\"}},[(_vm.value)?_c('router-link',{attrs:{\"to\":{ name: 'history', params: { id: _vm.value.attachedDeviceTypeId } }}},[_c('v-img',{staticClass:\"mx-auto mt-4\",attrs:{\"src\":require(\"@/assets/icons/log.svg\"),\"max-width\":\"40px\",\"width\":\"40px\"}})],1):_vm._e(),_c('div',{staticClass:\"text-center text-caption white--text\"},[_vm._v(\"Sensor Log\")])],1),_c('v-col',{staticClass:\"py-0 text-center\",attrs:{\"cols\":\"4\"}},[_c('v-btn',{staticClass:\"mx-auto mt-4 mb-1 pt-1\",attrs:{\"icon\":\"\"},on:{\"click\":function () { _vm.showCurrentDialog = true; }}},[_c('v-img',{attrs:{\"src\":require(\"@/assets/icons/loading-power.svg\"),\"max-width\":\"40px\",\"width\":\"40px\"}})],1),_c('div',{staticClass:\"text-center text-caption white--text\"},[_vm._v(\"Current\")])],1),_c('v-col',{staticClass:\"py-0\",attrs:{\"cols\":\"4\"}})],1)],1),_c('v-col',{staticClass:\"text-right pr-0\",attrs:{\"cols\":\"4\"}})],1),_c('v-row',{staticClass:\"mt-4\"},[_c('v-col',{staticClass:\"text-center\",attrs:{\"cols\":\"4\",\"align-self\":\"end\"}},[_c('v-img',{attrs:{\"position\":\"bottom left\",\"max-height\":\"150px\",\"height\":\"150px\",\"max-width\":\"150px\",\"contain\":\"\",\"src\":require(\"@/assets/img/bilge.png\")}})],1),_c('v-col',{staticClass:\"text-center\",attrs:{\"cols\":\"4\"}}),_c('v-col',{staticClass:\"text-center\",attrs:{\"cols\":\"4\"}},[_c('div',{staticClass:\"text-center pt-1 text-caption white--text\"},[_vm._v(\"Bilge pump\")]),(_vm.connected)?[(_vm.pumpStatus)?_c('v-img',{staticClass:\"mt-1\",attrs:{\"src\":require(\"@/assets/icons/bilge-pump-off-icon.svg\"),\"max-height\":\"43px\",\"contain\":\"\"}}):_c('v-img',{staticClass:\"mt-1\",attrs:{\"src\":require(\"@/assets/icons/bilge-pump-on-icon.svg\"),\"max-height\":\"43px\",\"contain\":\"\"}}),_c('div',{staticClass:\"text-caption pt-1 white--text\"},[_vm._v(\" Current: \"+_vm._s(_vm.currentDisplay)+\" \")])]:_c('div',{staticClass:\"text-caption pt-3 white--text\"},[_vm._v(\"Disconnected\")])],2)],1),_c('CurrentDialog',{attrs:{\"id\":'Current1',\"subtitle\":'Bilge Pump (Current Sensor)'},model:{value:(_vm.showCurrentDialog),callback:function ($$v) {_vm.showCurrentDialog=$$v},expression:\"showCurrentDialog\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport {\n defineComponent,\n computed,\n ref,\n PropType\n} from \"@vue/composition-api\";\nimport AttachedDeviceModel from \"@/models/AttachedDeviceModel\";\nimport { alarm } from \"@/store\";\n\nexport default defineComponent({\n components: {\n SensorHeader: () =>\n import(/* webpackChunkName: \"components\" */ \"./SensorHeader.vue\"),\n CurrentDialog: () =>\n import(/* webpackChunkName: \"components\" */ \"../Dialogs/CurrentDialog.vue\")\n },\n props: {\n value: { type: Object as PropType }\n },\n setup(props) {\n const showCurrentDialog = ref(false);\n const rawCurrent = computed(() => {\n const alarmStatus = alarm.alarmStatus;\n const vSupplies = alarmStatus && alarmStatus.VSupplies;\n const raw = vSupplies && vSupplies[0] && vSupplies[0].I1;\n return raw != null ? raw : null;\n });\n\n const currentValue = computed(() => {\n const value = rawCurrent.value;\n const num = parseFloat(value != null ? value : \"\");\n return isNaN(num) ? null : num;\n });\n\n const connected = computed(() => {\n // Match alarm module logic: consider connected if current > -50 A\n return currentValue.value !== null && currentValue.value > -50;\n });\n\n const pumpStatus = computed(() => {\n // pumpIsRunning = true means current ≥ 0.1\n return currentValue.value !== null && currentValue.value >= 0.1;\n });\n\n const currentDisplay = computed(() => {\n if (currentValue.value === null || currentValue.value <= -50) return \"—.-- A\";\n return `${currentValue.value.toFixed(2)} A`;\n });\n\n return {\n connected,\n pumpStatus,\n currentDisplay,\n showCurrentDialog\n };\n }\n});\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CurrentSensorListItem.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--13-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CurrentSensorListItem.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CurrentSensorListItem.vue?vue&type=template&id=2d81f900&scoped=true&\"\nimport script from \"./CurrentSensorListItem.vue?vue&type=script&lang=ts&\"\nexport * from \"./CurrentSensorListItem.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2d81f900\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VExpansionPanel } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelContent } from 'vuetify/lib/components/VExpansionPanel';\nimport { VImg } from 'vuetify/lib/components/VImg';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCol,VExpansionPanel,VExpansionPanelContent,VImg,VRow})\n"],"sourceRoot":""}