PageSourceSearch

https://www.hyundaifinance.de/wp-content/themes/kiafinance/js/script.calculator.2de41f707bdaf0.js

js hyundaifinance.de collected 2026-10-04 13:34:46 UTC 6,395 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhf_kf_frontend=self.webpackChunkhf_kf_frontend||[]).push([[959],{7480:(t,a,n)=>{n.r(a),n.d(a,{default:()=>c});var e=n(4692),i=n.n(e),l=n(663),s=n(2591),o=n(3386);const c=class{constructor(){this.defaultModel="kia_picanto",this.$container=i()(".bb-calculator"),this.$leasingCalculator=this.$container.find(".bb-calculator__calc.leasing"),this.$leasingCalculated=this.$container.find(".bb-calculator__offer-table.leasing"),this.$financingCalculator=this.$container.find(".bb-calculator__calc.financing"),this.$financingCalculated=this.$container.find(".bb-calculator__offer-table.financing"),this.type=(0,s.eA)().type||"leasing",this.$container.find(".bb-calculator__download-pdf").each(((t,a)=>{i()(a).data("href",i()(a).attr("href"))})),this.$tabnav=i()(".intro-tab-nav"),this.$container.find(".bb-switch-type__tab").on("click",(t=>{this._handleTabClick(t)})),this._bindCalculatorEvents(this.$leasingCalculator),this._bindCalculatorEvents(this.$financingCalculator);const t=this.$container.find(".bb-calculator__emission-short."+this.type);let a=t.find(".bb-emission-model").text()+" "+t.find(".bb-emission-trim").text()+" "+t.find(".bb-emission-motor").text()+" "+t.find(".bb-emission-power").text().replace(":","");a=a.replace(/\s+/g," ");const n="Kraftstoffverbrauch für den "+t.html().replace(/&nbsp;/gi," ")+' Die angegebenen Verbrauchs- und CO<sub class="co2">2</sub>-Emissionswerte wurden nach dem vorgeschriebenen WLTP-Messverfahren ermittelt.';this.dataLeasing={...this.$container.data("leasing"),fahrzeug:a,emission:n},this.dataFinancing={...this.$container.data("financing"),fahrzeug:a,emission:n},this._setPdfDownloadLink("leasing"),this._setPdfDownloadLink("financing"),i()(document.body).on("click",".bb-calculator__header--calculation-container .bb-button",(()=>{this._doCalc()})),i()(document.body).on("click",".bb-calculator__details",(t=>{t.preventDefault();const a=i()(".bb-calculator__offer").offset().top-i()(".bb-header").outerHeight()-6;i()("html,body").animate({scrollTop:a},700)}))}_bindCalculatorEvents(t){t.find("input.down-payment").val(t.find("input.down-payment").attr("value")).bbFormat({defaultValue:t.find("input.down-payment").attr("value"),minValue:0,maxValue:t.data("uvp"),thousendSep:".",decimalSep:",",decimal:0,symbolLeft:!1,symbol:" €"}),t.on("click",".duration",(t=>{this._changeDuration(t)})).on("click",".down-payment",(()=>{t.find(".bb-calculator__error-message").stop().fadeOut()}))}_doCalc(){let t=this.$leasingCalculator;"financing"===this.type&&(t=this.$financingCalculator);const a={api:"kf",format:"json",vehicle_price:t.data("uvp"),vehicle_downPayment:t.find("input.down-payment").bbFormat(),condition_fromMaturity:parseInt(t.find(".bb-duration .duration.active").text(),10),condition_toMaturity:parseInt(t.find(".bb-duration .duration.active").text(),10),condition_key:t.data("con-key"),is_debug:l.A.debug};"leasing"===this.type?(a.calc_mode="l",a.as_string=!0):a.partner_code="kia_calc";let n=l.A.documentRoot+l.A.calculator.apiUrl;l.A.debug&&(n=l.A.proxy+n),i().ajax({url:n,type:"GET",data:a,success:t=>{this._checkResponse(t)},error:t=>{}})}_checkResponse(t){let a;try{a=JSON.parse(t)}catch{a=t}if(a.models)this._setValues(a);else{let t=this.$leasingCalculator;"financing"===this.type&&(t=this.$financingCalculator),t.find(".bb-calculator__error-message").html("Bitte wählen Sie eine Anzahlung kleiner als "+(0,s.cN)(a[0].string,!1)).stop().fadeIn()}}_setValues(t){let a=this.$leasingCalculator,n=this.$leasingCalculated;"financing"===this.type&&(a=this.$financingCalculator,n=this.$financingCalculated);const e=t.models[0],i=e.totalMileage;if("leasing"===this.type&&e.maximumDownPayment&&Math.round(e.downPayment)>=Math.round(e.maximumDownPayment))return void a.find(".bb-calculator__error-message").html("Bitte wählen Sie eine Anzahlung kleiner als "+(0,s.cN)(e.maximumDownPayment,!1)).stop().fadeIn();a.find(".bb-calculator__rate-container .rate.efi").html((0,s.jq)(e.effectiveInterest,",",".",2)+" %"),a.find(".bb-calculator__rate-container .rate.mtl").html((0,s.cN)(Math.round(e.installment))+"<sup>1</sup>");n.find("tbody").fadeOut(250,(()=>{n.find(".down").html((0,s.cN)(Math.round(e.downPayment),!0)),n.find(".maturity").html(e.maturity+" Monate"),n.find(".total-mileage").html((0,s.jq)(i,",",".",0)+" km"),n.find(".next").siblings("td").html(e.maturity+" mtl. Raten à"),n.find(".next").html((0,s.cN)(Math.round(e.installment),!0)),n.find(".total").html((0,s.cN)(Math.round(e.totalAmount),!0)),n.find(".netto").html((0,s.cN)(Math.round(e.creditAmount),!0)),n.find(".end").html((0,s.cN)(Math.ceil(e.lastInstallment),!0)),n.find(".effective").html((0,s.jq)(e.effectiveInterest,",",".",2)+" %"),n.find(".soll").html((0,s.jq)(100*e.interest,",",".",2)+" %"),n.find("tbody").fadeIn(350)})),"leasing"===this.type?this.dataLeasing={...this.dataLeasing,...e,folgerate:e.installment,gesamtlaufleistung:i}:this.dataFinancing={...this.dataFinancing,...e,folgerate:e.installment,gesamtlaufleistung:i},this._setPdfDownloadLink(this.type)}_handleTabClick(t){this.$container.removeClass("show-leasing show-financing").addClass("show-"+i()(t.currentTarget).data("type")),i()(document.body).removeClass("show-leasing show-financing").addClass("show-"+i()(t.currentTarget).data("type")),this.type=i()(t.currentTarget).data("type")}_setPdfDownloadLink(t){const a="leasing"===t?this.dataLeasing:this.dataFinancing,n={model:a.model,fahrzeug:a.fahrzeug,uvp:a.uvp,nettodarlehensbetrag:"financing"!==t?Math.round(100*a.creditAmount)/100:Math.round(a.creditAmount),monatsrate:a.installment,folgerate:a.folgerate,schlussrate:Math.ceil(a.lastInstallment),gesamtlaufleistung:(0,s.jq)(a.gesamtlaufleistung,",",".",0),jahreszins:(0,s.jq)(a.effectiveInterest,",",".",2)+" %",sollzins:(0,s.jq)(100*a.interest,",",".",2)+" %",gesamtbetrag:Math.round(a.totalAmount),anzahlung:Math.round(a.downPayment),laufzeit:a.maturity,additionalLegal:"",doc:a.doc,emission:a.emission},e=(0,s._3)(JSON.stringify(n)),i=(0,o.md5)(e),l=this.$container.find(".bb-calculator__download-pdf."+t);l.attr("href",l.data("href")+"&data="+e+"&hash="+i)}_changeDuration(t){const a=i()(t.currentTarget),n=a.closest(".bb-duration");let e=this.$leasingCalculator;"financing"===this.type&&(e=this.$financingCalculator),n.find(".duration").removeClass("active"),a.addClass("active"),e.find(".bb-calculator__error-message").stop().fadeOut(),this._doCalc()}}}}]);

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.