1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8615],{8615:function(t,e,a){a(4423);var i=a(1132);e.default=class extends i.xI{static targets=["amountToClear","quantity","quantityFees","quantityToClear","boxSingle","boxMulti","text"];connect(){window.addEventListener("load",function(){this.calculateAmountAndReceipt()}.bind(this))}amountForm(t){let e=t.currentTarget.value.replace(/[^0-9\.]/g,"");t.currentTarget.value=parseInt(e)||"",t.currentTarget.dataset.productTarget.includes("amountToClear")&&this.amountToClearTargets.forEach(function(e,a){this.amountToClearTargets[a].name!==t.currentTarget.name&&(this.amountToClearTargets[a].value="")}.bind(this)),this.setQuantity(t)}amountFormReservation(t){let e=t.currentTarget.value.replace(/[^0-9\.]/g,"");t.currentTarget.value=parseInt(e)||"",t.currentTarget.dataset.productTarget.includes("amountToClear")&&this.amountToClearTargets.forEach(function(e,a){this.amountToClearTargets[a].name!==t.currentTarget.name&&(this.amountToClearTargets[a].value="")}.bind(this)),e>0?this.setQuantity(t):this.unsetQuantity(t)}setQuantity(t){let e=document.getElementById("form_order_model_items_product_quantity_"+t.currentTarget.dataset.id);e.value=1,e.dataset.productTarget.includes("quantityToClear")&&this.quantityToClearTargets.forEach(function(t,a){this.quantityToClearTargets[a].name!==e.name&&(this.quantityToClearTargets[a].value=0)}.bind(this)),this.calculateAmountAndReceipt(),this.dispatch("updated:quantity")}updateAriaChecked(t){document.querySelectorAll('[role="radio"][data-id]').forEach(t=>{t.setAttribute("aria-checked","false")}),t.currentTarget.setAttribute("aria-checked","true")}unsetQuantity(t){let e=document.getElementById("form_order_model_items_product_quantity_"+t.currentTarget.dataset.id);e.value=0,e.dataset.productTarget.includes("quantityToClear")&&this.quantityToClearTargets.forEach(function(t,a){this.quantityToClearTargets[a].name!==e.name&&(this.quantityToClearTargets[a].value=0)}.bind(this)),this.calculateAmountAndReceipt(),this.dispatch("updated:quantity")}selectRadio(t){document.getElementById("item-radio-"+t.currentTarget.dataset.id).checked=!0}removeQuantity(t){document.getElementById("form_order_model_items_product_quantity_"+t.currentTarget.dataset.id).value=0,this.calculateAmountAndReceipt()}monthlyCheckbox(t){this.amountToClearTargets.forEach(function(t,e){this.amountToClearTargets[e].value=""}.bind(this)),this.displayMonthlyBlock(t)}
1displayMonthlyBlock(t){t.currentTarget.checked?(this.boxSingleTargets[0].style.display="none",this.boxMultiTargets[0].style.display="block"):(this.boxSingleTargets[0].style.display="block",this.boxMultiTargets[0].style.display="none")}calculateAmountAndReceipt(){let t=0,e=0,a="P",i="D",r=0,s=0;this.quantityTargets.forEach(function(n,u){this.quantityTargets[u].value>0&&("0"===this.quantityTargets[u].dataset.free?(t+=this.quantityTargets[u].value*this.quantityTargets[u].dataset.amount,e+=this.quantityTargets[u].value*this.quantityTargets[u].dataset.receipt,s+=parseInt(this.quantityTargets[u].value)):(t+=this.quantityTargets[u].value*document.getElementById("form_order_model_items_product_amount_"+this.quantityTargets[u].dataset.id).value,e+=this.quantityTargets[u].value*document.getElementById("form_order_model_items_product_amount_"+this.quantityTargets[u].dataset.id).value),"M"===this.quantityTargets[u].dataset.type&&(a="R"),i=this.quantityTargets[u].dataset.purpose,r=parseInt(this.quantityTargets[u].dataset.free))}.bind(this)),this.quantityFeesTargets.forEach(function(a,i){if(this.quantityFeesTargets[i].value>0&&t>0){let a=parseFloat(this.quantityFeesTargets[i].dataset.fixed)+parseFloat(t/100*parseFloat(this.quantityFeesTargets[i].dataset.percent));t+=a,e+=a}}.bind(this)),this.dispatch("updated:amountOrQuantity",{detail:{amount:t,receipt:e,type:a,quantity:s}}),"R"===a&&this.dispatch("updated:checkAmount",{detail:{amount:t,purpose:i,free:r}})}updatePeriodicity(t){this.textTargets.forEach(function(e){e.innerHTML=t.detail.text})}}}}]);
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.