1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1892],{32342:function(t,e,i){i.r(e),i.d(e,{default:function(){return r}});var a={name:"BunpIndicator6-3-1",data:function(){return{totalProjectsNearTrees:0,projectsWithMitigation:0,calculationOptions:["Basic Calculation A","Basic Calculation B","Advanced Calculation"],calculationMethod:null,calculationDescription:""}},methods:{calculateBunpIndicator:function(){var t=0,e="";if("Basic Calculation A"==this.calculationMethod&&(this.totalProjectsNearTrees?t=this.totalProjectsNearTrees:alert("Please fill in all the required fields")),"Basic Calculation B"==this.calculationMethod&&(this.totalProjectsNearTrees?t=this.totalProjectsNearTrees:alert("Please fill in all the required fields")),"Advanced Calculation"==this.calculationMethod){if(this.projectsWithMitigation>this.totalProjectsNearTrees)return void alert("The number of construction projects with soil compaction mitigation measures can not be bigger than the total number of construction projects near urban trees.");if(this.projectsWithMitigation&&this.totalProjectsNearTrees){var i=this.projectsWithMitigation/this.totalProjectsNearTrees*100;t=Math.round(10*i)/10,e="%"}else alert("Please fill in all the required fields")}this.$emit("calculate",{points:t,unit:e,inputValues:{calculationMethod:this.calculationMethod,calculationDescription:this.calculationDescription,totalProjectsNearTrees:this.totalProjectsNearTrees,projectsWithMitigation:this.projectsWithMitigation}})},reset:function(){this.totalProjectsNearTrees=0,this.projectsWithMitigation=0},isNumber:function(t){var e=(t=t||window.event).which?t.which:t.keyCode;if(!(e>31&&(e<48||e>57)&&46!==e))return!0;t.preventDefault()}},watch:{calculationMethod:function(t,e){this.reset()}}},o=(0,i(51900).Z)(a,(function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"mb-6"}
1,[e("input-select",{attrs:{label:"Choose your calculation method",rules:"required",options:t.calculationOptions},model:{value:t.calculationMethod,callback:function(e){t.calculationMethod=e},expression:"calculationMethod"}})],1),t._v(" "),"Basic Calculation A"==t.calculationMethod?e("div",[e("div",{staticClass:"mb-6"},[e("label",{staticClass:"d-block font_16_21 text-cbi-700 font-weight-600 mb-2"},[t._v("Count of distinct technical, regulatory, or educational measures implemented to reduce soil compaction near urban trees")]),t._v(" "),e("div",{staticClass:"c-cbi-input u-position-relative"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.totalProjectsNearTrees,expression:"totalProjectsNearTrees",modifiers:{number:!0}}],staticClass:"c-cbi-input__field",attrs:{type:"number"},domProps:{value:t.totalProjectsNearTrees},on:{keypress:function(e){return t.isNumber(e)},input:function(e){e.target.composing||(t.totalProjectsNearTrees=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}})])])]):t._e(),t._v(" "),"Basic Calculation B"==t.calculationMethod?e("div",[e("div",{staticClass:"mb-6"},[e("label",{staticClass:"d-block font_16_21 text-cbi-700 font-weight-600 mb-2"},[t._v("Count of distinct technical, policy, or educational measures implemented to reduce soil compaction on agricultural land")]),t._v(" "),e("div",{staticClass:"c-cbi-input u-position-relative"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.totalProjectsNearTrees,expression:"totalProjectsNearTrees",modifiers:{number:!0}}],staticClass:"c-cbi-input__field",attrs:{type:"number"},domProps:{value:t.totalProjectsNearTrees},on:{keypress:function(e){return t.isNumber(e)},input:function(e){e.target.composing||(t.totalProjectsNearTrees=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}})])])]):t._e(),t._v(" "),"Advanced Calculation"==t.calculationMethod?e("div",[e("div",{staticClass:"mb-6"},[e("label",{staticClass:"d-block font_16_21 text-cbi-700 font-weight-600 mb-2"},[t._v("Total number of construction projects near urban trees")]),t._v(" "),e("div",{staticClass:"c-cbi-input u-position-relative"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.totalProjectsNearTrees,expression:"totalProjectsNearTrees",modifiers:{number:!0}}],staticClass:"c-cbi-input__field",attrs:{type:"number"},domProps:{value:t.totalProjectsNearTrees},on:{keypress:function(e){return t.isNumber(e)},input:function(e){e.target.composing||(t.totalProjectsNearTrees=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}})])]),t._v(" "),e("div",{staticClass:"mb-6"},[e("label",{staticClass:"d-block font_16_21 text-cbi-700 font-weight-600 mb-2"},[t._v("Number of construction projects with soil compaction mitigation measures")]),t._v(" "),e("div",{staticClass:"c-cbi-input u-position-relative flex-grow-1 mr-2"},[e("input",{directives:[{name:"model",rawName:"v-model.number",value:t.projectsWithMitigation,expression:"projectsWithMitigation",modifiers:{number:!0}}],staticClass:"c-cbi-input__field",attrs:{type:"number"},domProps:{value:t.projectsWithMitigation},on:{keypress:function(e){return t.isNumber(e)},input:function(e){e.target.composing||(t.projectsWithMitigation=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}})])])]):t._e(),t._v(" "),t.calculationMethod?e("div",{staticClass:"mb-6"},[e("input-textarea",{attrs:{label:"Provide a description of how you made your calculation and arrived at your data (optional)",placeholder:"Description..."},model:{value:t.calculationDescription,callback:function(e){t.calculationDescription=e},expression:"calculationDescription"}})],1):t._e(),t._v(" "),t.calculationMethod?e("a",{staticClass:"c-button c-button--cbi mb-8",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.calculateBunpIndicator.apply(null,arguments)}}},[t._v("Calculate")]):t._e()])}),[],!1,null,null,null),r=o.exports}}]); 2//# sourceMappingURL=vue-components-bunp-calculators-BunpIndicator6-3-1.1eb9ad7a4cd998e2.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.