PageSourceSearch

https://www.landrover.at/etc.clientlibs/jlr/clientlibs/clientlib-d…lesConnect_rcAPI_js.8a59be4afd70caa56b09.js

js landrover.at collected 2026-10-06 09:23:20 UTC 19,049 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["src_main_webpack_middleware_rulesConnect_rcAPI_js"],{37380:function(e,t,n){n.d(t,{I:function(){return _}});var r=n(71221),i=n(6839),o=n(40443),u=n(59067);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof a?r:a,c=Object.create(l.prototype);return v(c,"_invoke",function(n,r,i){var o,a,l,c=0,s=i||[],f=!1,v={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,a=0,l=e,v.n=n,u}};function d(n,r){for(a=n,l=r,t=0;!f&&c&&!i&&t<s.length;t++){var i,o=s[t],d=v.p,h=o[2];n>3?(i=h===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(a=0,v.v=r,v.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,v.n=h,a=0))}if(i||n>1)return u;throw f=!0,r}return function(i,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,h),a=s,l=h;(t=a<2?e:l)||!f;){o||(a?a<3?(a>1&&(v.n=-1),d(a,l)):v.n=l:v.v=l);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(f=v.n<0)?l:n.call(r,v))!==u)break}catch(t){o=e,a=1,l=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),c}var u={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(v(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(s);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,v(d,"constructor",c),v(c,"constructor",l),l.displayName="GeneratorFunction",v(c,i,"GeneratorFunction"),v(d),v(d,i,"Generator"),v(d,r,function(){return this}),v(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:h}})()}function v(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}v=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){v(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}},v(e,t,n,r)}function d(e,t,n,r,i,o,u){try{var a=e[o](u),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function u(e){d(o,r,i,u,a,"next",e)}function a(e){d(o,r,i,u,a,"throw",e)}u(void 0)})}}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function b(e,t,n){w(e,t),t.set(e,n)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function k(e,t){return e.get(O(e,t))}function O(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var P=new WeakMap,S=new WeakSet,D=new WeakMap,_=function(){return e=function e(){var t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),w(t=this,n=S),n.add(t),b(this,P,void 0),b(this,D,function(e){var t=e.app,n=e.locale,r=e.options,i=e.prefix,o=e.product,a=e.protocol,l=e.queryArray,c=void 0===l?[]:l,s=e.queryString,f=void 0===s?"":s,v=e.sub,d=void 0===v?"":v,h=e.vehicle,y=e.version,g=e.view,m=void 0===g?"":g,b=e.ipr,w=void 0===b?"":b,k=[].concat(p(c),p((0,u.Mx)(f))),O=[a,i,t,n,h,y,o,r,w,m,d].reduce(function(e,t,n){return 0===n&&t?"".concat(a,"//"):t?"".concat(e).concat(t,"/"):e},"");return"".concat(O).concat((0,u.gL)(p(k)))}),function(e,t,n){e.set(O(e,t),n)}(P,this,new r.W),this.apiError=!1,this.brand=void 0,this.locale=void 0,this.nameplate_code=void 0,this.base_url=void 0,this.configBaseUrl=void 0,this.getDocumentFunc=i},t=[{key:"getRulesConnect",value:function(){return k(P,this)}},{key:"loadResources",value:(y=h(f().m(function e(){var t,n;return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,u.$m)(this.getRulesConnect().loadResources(this.brand,this.locale,this.base_url));case 1:t=e.v,(n=null==t?void 0:t.error)&&console.error(n),O(S,this,F).call(this,t);case 2:return e.a(2)}},e,this)})),function(){return y.apply(this,arguments)})},{key:"getResources",value:(d=h(f().m(function e(){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.loadResources();case 1:return e.a(2)}},e,this)})),function(){return d.apply(this,arguments)})},{key:"getClientResources",value:function(){var e;return null===(e=this.resources)||void 0===e?void 0:e["resource-bundle"]["client-resources"]}},{key:"loadJsonp",value:(v=h(f().m(function e(t){var n,r,i,o,a,l,s,v,d,h,p,y,g,m,b=arguments;return f().w(function(e){for(;;)switch(e.n){case 0:if(r=!(b.length>1&&void 0!==b[1])||b[1],i=b.length>2&&void 0!==b[2]&&b[2],o=null==t?void 0:t.trim(),!t||this.base_url&&this.brand&&this.locale||(a=(0,u.f1)(t),l=a.baseUrl,s=a.app,v=a.locale,d=a.vehicle,l&&(this.base_url=l),this.brand=s,this.locale=v,this.nameplate_code=d),h=o?"".concat(this.base_url).concat((0,u.Sw)(o)):"".concat(this.base_url,"/rc/").concat(this.brand,"/").concat(this.locale,"/").concat(this.nameplate_code,"/.jsonp?view=personalise"),this.resources){e.n=1;break}return e.n=1,this.getResources();case 1:return e.n=2,(0,u.$m)(this.getRulesConnect().loadJsonp(h));case 2:if((p=e.v)&&!((null===(n=p.error)||void 0===n?void 0:n.length)>0)){e.n=3;break}
1throw new Error((null==p||null===(y=p.error)||void 0===y||null===(y=y[0])||void 0===y?void 0:y.text)||"An error occurred while loading the vehicle data.");case 3:if(!p["conflict-resolution"]){e.n=4;break}return e.a(2,O(S,this,j).call(this,p["conflict-resolution"].accept,r,!0,new URL(h).origin));case 4:if(!this.getDocumentFunc&&r&&O(S,this,C).call(this,p),!this.bodystyleId){e.n=6;break}if(m=this.getBodyStyle(this.bodystyleId),this.bodystyleId=null,null!=m&&m.query){e.n=5;break}return e.a(2,p);case 5:return e.a(2,O(S,this,j).call(this,null==m||null===(g=m.query[0])||void 0===g?void 0:g.href,r));case 6:if(!i){e.n=7;break}return e.a(2,c(c({},p),{},{conflictResolution:i}));case 7:return e.a(2,p)}},e,this)})),function(e){return v.apply(this,arguments)})},{key:"getFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{feature:o.A.getFeature(e,null!=t?t:this.getDocument())}}},{key:"getSelectedFeature",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return o.A.getSelectedFeature(e,null!=t?t:this.getDocument())}},{key:"getVehicles",value:function(){var e;return null===(e=this.getDocument())||void 0===e?void 0:e["vehicle-list"]}},{key:"getDocument",value:function(){var e,t;return null!==(e=null===(t=this.getDocumentFunc)||void 0===t?void 0:t.call(this))&&void 0!==e?e:this.document}},{key:"getVehicleDetails",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return null===(e=null!=t?t:this.getDocument())||void 0===e||null===(e=e["feature-dictionary"])||void 0===e?void 0:e.vehicle}},{key:"getBodyStyles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return o.A.getFeature("BODYSTYLE",this.getDocument(),e)}},{key:"getBodyStyle",value:function(e){return o.A.getFeatureById("BODYSTYLE",this.getDocument(),e)}},{key:"getCompatibleModels",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r="MODEL",i=this.getFeature(r),o=O(S,this,R).call(this,e,r),u=n.map(function(e){return e.toLowerCase()});return(null==i||null===(t=i.feature)||void 0===t?void 0:t.filter(function(e){return o.split(" ").some(function(t){return e.id===t})&&(!u.length||u.includes(e.id.toLowerCase()))}))||{}}},{key:"getModel",value:function(e){return o.A.getFeatureById("MODEL",this.getDocument(),e)}},{key:"getAllModels",value:(s=h(f().m(function e(){var t,n,r,i,u,a=this,l=arguments;return f().w(function(e){for(;;)switch(e.n){case 0:return t=l.length>0&&void 0!==l[0]?l[0]:[],n=o.A.getModels(this.getDocument()),t.length>0&&(n=n.filter(function(e){return t.map(function(e){return e.toLowerCase()}).includes(e.id.toLowerCase())})),r=n.map(function(e){var t;if("selected"===e.availability||"included"===e.availability||"default"===e.availability)return Promise.resolve(a.getDocument());var n=null===(t=e.query)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.href;return a.loadJsonp(n,!1)}),e.n=1,Promise.allSettled(r);case 1:return i=e.v,u=i.filter(function(e){return"fulfilled"===e.status}).map(function(e){return e.value}),e.a(2,u)}},e,this)})),function(){return s.apply(this,arguments)})},{key:"getEngineSpecs",value:(l=h(f().m(function e(t,n){var r,i;return f().w(function(e){for(;;)switch(e.n){case 0:return r="".concat(this.base_url,"/ipr/api/personalise/engines/").concat(this.brand,"/").concat(this.locale,"/").concat(n,"/_/").concat(t,".jsonp"),e.n=1,this.loadJsonp(r,!1);case 1:return i=e.v,e.a(2,i)}},e,this)})),function(e,t){return l.apply(this,arguments)})},{key:"getVehicleURL",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"engine",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;"string"!=typeof r&&(n=r,r="engine");var o=c(c({},(0,u.f1)(null===(t=null!=e?e:this.getDocument())||void 0===t?void 0:t.metadata.url,2)),{},{prefix:"",protocol:"",queryArray:[],queryString:"",view:"personalise",sub:r,ipr:"ipr"});n&&(o=c(c({},o),{},{vehicle:n})),i&&(o=c(c({},o),{},{product:i}));var a=k(D,this).call(this,o);return"".concat(this.configBaseUrl,"/").concat(a)}},{key:"getPdfUrl",value:function(e){var t,n=c(c({},(0,u.f1)(null===(t=null!=e?e:this.getDocument())||void 0===t?void 0:t.metadata.url,2)),{},{prefix:"",protocol:"",queryArray:[],queryString:"",view:void 0}),r=k(D,this).call(this,n);return"/".concat(r)}},{key:"getExteriorColours",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return o.A.getFeature("PAINT_COLOUR",null!=e?e:this.getDocument())}},{key:"getInteriorColours",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return o.A.getFeature("TRIM",null!=e?e:this.getDocument())}},{key:"getWheels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return o.A.getFeature("WHEEL",null!=e?e:this.getDocument())}},{key:"getProducts",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return o.A.getFeature("PRODUCT",e)||{}}},{key:"getSelectedProductLeadTimeLabel",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=o.A.getFeature("PRODUCT",this.getDocument()),i=null==r?void 0:r.find(function(e){return"selected"===e.availability||"default"===e.availability}),u=null==i||null===(e=i.property)||void 0===e?void 0:e.LEADTIME_CODE,a=this.getClientResources(),l=null==a||null===(t=a["leadtime.filters.exclude"])||void 0===t?void 0:t.split(",");return!n&&null!=l&&l.includes(u)?null==a?void 0:a["leadtime.excluded"]:null==a?void 0:a["leadtime.code.".concat(u)]}},{key:"getDescription",value:function(e){var t;return e?"string"==typeof e?e:e[null===(t=Object.keys(e))||void 0===t?void 0:t[0]]:""}},{key:"getPaintType",value:function(e){var t,n="ipr.group.PAINT_COLOUR.".concat(e);return null===(t=this.getClientResources())||void 0===t?void 0:t[n]}},{key:"getFuelTypeLabel",value:function(e){var t,n="ipr.engine.filters.FuelType.".concat(e);return null===(t=this.getClientResources())||void 0===t?void 0:t[n]}},{key:"getAllSupportedLeadTimeCodes",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getClientResources();if(!n)return[];var r=Object.keys(n).filter(function(e){return e.startsWith("leadtime.code")}).map(function(e){return e.replace("leadtime.code.","")}).filter(function(e){return 1===e.length});if(t)return r;var i=null===(e=n["leadtime.filters.exclude"])||void 0===e?void 0:e.split(",");return r.filter(function(e){return!i.includes(e)})}},{key:"isHidden",value:function(e){return o.A.isHidden(e)}},{key:"getCurrentYearVehicles",value:function(e){return e.filter(function(t,n){var r,i,o,u,a=e[n+1];if(!a)return!0;var l=null!==(r=null===(i=t["feature-dictionary"])||void 0===i?void 0:i.vehicle)&&void 0!==r?r:t,c=null!==(o=null===(u=a["feature-dictionary"])||void 0===u?void 0:u.vehicle)&&void 0!==o?o:a;if(l.id!==c.id)return!0;var s=l.modelyear.match(/(\d{2})(\d*)/),f=c.modelyear.match(/(\d{2})(\d*)/),v=parseInt(s[1],10),d=parseInt(f[1],10),h=parseInt(s[2]||"0",10),p=
1parseInt(f[2]||"0",10);return v>d||v===d&&h>=p})}},{key:"getOptionsPrice",value:function(e){var t;return null===(t=null!=e?e:this.getDocument())||void 0===t||null===(t=t.configuration)||void 0===t||null===(t=t.summary)||void 0===t||null===(t=t.price)||void 0===t?void 0:t.OPTIONS_GROSS}},{key:"getPrice",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return o.A.getPrice(this.getDocument(),e)}},{key:"getFormattedPrice",value:function(e,t){return this.getRulesConnect().getFormattedPrice(e,t)}},{key:"getFormattedFromPrice",value:function(e,t,n){var r=this.getFormattedPrice(e,t);return n?n.replace("$$0$$","<span class='price-value'>".concat(r,"</span>")):this.getClientResources()["ipr.frompricetext"].replace("$$0$$","<span class='price-value'>".concat(r,"</span>"))}},{key:"getLocalisedPrice",value:function(e){if(!e||!e.hasOwnProperty("value")||!e.hasOwnProperty("currency"))return"";var t=this.locale.replace("_","-").toUpperCase();return new Intl.NumberFormat(t,{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:0}).format(Number(e.value))}},{key:"getDisclaimerCaveat",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"**",n=this.getClientResources(),r=this.getVehicleDetails(),i=null==n?void 0:n["ipr.footer.disclaimer.copyright"];if(i){var o=(0,u.m_)(i,t);if(o)return o}if(!r)return null;var l=null==r||null===(e=r.property)||void 0===e?void 0:e["ipr.footer.disclaimer.body"];return"string"==typeof l?i=l:"object"===a(l)&&(i=l[this.locale.split("_")[0]]||i),i?(0,u.m_)(i,t):null}},{key:"addDefenderBodystylesAsVehicles",value:(i=h(f().m(function e(){var t,n,r,i,u,a,l,s=this,v=arguments;return f().w(function(e){for(;;)switch(e.n){case 0:if(n=(t=v.length>0&&void 0!==v[0]?v[0]:[]).filter(function(e){return"defender"===e.property.BrandFamily}),r=t.filter(function(e){return"defender"!==e.property.BrandFamily}),0!==n.length){e.n=1;break}return e.a(2,[]);case 1:return i=function(){var e=h(f().m(function e(t,n){var r;return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.allSettled(n.map(function(){var e=h(f().m(function e(n){var r,i,u;return f().w(function(e){for(;;)switch(e.n){case 0:return r=o.A.buildHrefWithSelections(t,{BODYSTYLE:n.id}),e.n=1,s.loadJsonp(r,!1);case 1:return i=e.v,u=o.A.getSelectedFeature("MODEL",i),e.a(2,c(c({},t),{},{bodystyle:n.id,href:r,model:u.id}))}},e)}));return function(t){return e.apply(this,arguments)}}()));case 1:return r=e.v,e.a(2,r.filter(function(e){return"fulfilled"===e.status}).map(function(e){return e.value}))}},e)}));return function(t,n){return e.apply(this,arguments)}}(),e.n=2,Promise.allSettled(n.map(function(){var e=h(f().m(function e(t){var n,r,u;return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,s.loadJsonp(null==t?void 0:t.href,!1);case 1:return n=e.v,r=o.A.getBodystyles(n),e.n=2,i(t,r);case 2:return u=e.v,e.a(2,u)}},e)}));return function(t){return e.apply(this,arguments)}}()));case 2:return u=e.v,a=u.filter(function(e){return"fulfilled"===e.status}).map(function(e){return e.value}),l=[],a.map(function(e){e.length>0&&l.push.apply(l,p(e))}),e.a(2,[].concat(p(r),l))}},e)})),function(){return i.apply(this,arguments)})},{key:"stripModelYearFromURL",value:function(e){var t=new URL(e),n=t.pathname.split("/"),r=n.findIndex(function(e){return/_k\d+$/.test(e)});return-1!==r&&(n[r]=n[r].replace(/_k\d+$/,"")),t.pathname=n.join("/"),t.toString()}},{key:"getFullModelYear",value:function(){var e,t=null===(e=this.getDocument())||void 0===e||null===(e=e["feature-dictionary"])||void 0===e||null===(e=e.vehicle)||void 0===e?void 0:e.modelyear;if(!t)return"";var n=t.slice(1,3);return"20".concat(n)}}],t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,i,l,s,v,d,y}();function j(e){return A.apply(this,arguments)}function A(){return A=h(f().m(function e(t){var n,r,o,u,a=arguments;return f().w(function(e){for(;;)if(0===e.n)return n=!(a.length>1&&void 0!==a[1])||a[1],r=a.length>2&&void 0!==a[2]&&a[2],o=a.length>3&&void 0!==a[3]?a[3]:"",u=(0,i.A)(t)?t:"".concat(o).concat(t),e.a(2,this.loadJsonp(u,n,r))},e,this)})),A.apply(this,arguments)}function F(e){this.resources=e}function C(e){this.document=e}function R(e,t){var n=e.findIndex(function(e){return e["definer-name"]===t});return e[n].refs}t.A=new _}}]);

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.