PageSourceSearch

https://www.lexus.ua/var/dxp/scripts/T1-injection-components.js

js lexus.ua collected 2026-09-29 15:59:35 UTC 4,175 bytes, 1 lines download raw bytes

1!function(e,t){e.T1||(e.T1={}),e.T1.injection||(e.T1.injection={}),"function"==typeof define&&define.amd?(requirejs.config({map:{"*":{css:"//www.toyota-europe.com/external.scripts/requireCss.min.js"}}}),define(["jquery","lodash","postal"],function(n,a,o){return e.T1.injection.components||(e.T1.injection.components=t(n,a,o))})):e.T1.injection.components||(e.T1.injection.components=t($,_,postal))}(this,function(e,t,n){e.loadCss||(e.loadCss=function(t,n){if(Array.isArray(t)){for(var a=[],o=0;o<t.length;o++)if("string"==typeof t[o]){var c=e('<link rel="stylesheet">');if(n){var r=e.Deferred();c.on("load error",r.resolve),a.push(r)}c.attr("href",t[o]).appendTo(e("head"))}n&&e.when.apply(e,a).done(n)}});var a={settings:{},contract:{channel:"com.toyota.tme.t1.injection",evtInject:"component.inject",evtInjected:"component.injected"},init:function(){n.subscribe({channel:a.contract.channel,topic:a.contract.evtInject,callback:a.inject}),n&&T1.constants&&(n.subscribe({channel:T1.constants.CHANNEL_DIALOG,topic:T1.constants.PAGEOVERLAYER_LOAD,callback:a.scanInjectionContainers}),n.subscribe({channel:T1.constants.CHANNEL_DIALOG,topic:T1.constants.MATERIALBOX_OPENED,callback:a.scanInjectionContainers}),n.subscribe({channel:T1.constants.CHANNEL_DIALOG,topic:T1.constants.OVERLAY_DROP_OPENED,callback:a.scanInjectionContainers}),n.subscribe({channel:T1.constants.CHANNEL_GLOBAL,topic:T1.constants.COMPONENTS_BUILD,callback:a.scanInjectionContainers})),a.scanInjectionContainers(),a.settings=a.getSettings()},scanInjectionContainers:function(n){n||(n={}),e(n.container||n.el||"body").find(".inject").add("head style[data-url]").each(function(a,c){var r=t.cloneDeep(n),s=e(c).data();r.target=e(s.targetId).length&&e(s.targetId)||c,r.url=s.url||n.url,o.inject(r)})},getSettings:function(){return{serviceUrl:T1.settings?T1.settings.servicesServer:"//t1-prod-services.herokuapp.com",language:T1.settings?T1.settings.language:"en",country:T1.settings?T1.settings.country:"eu"}},inject:function(t){(t=a.getData(t)).target.length&&a.getContentAjax(t).done(function(o){if(o.html){var c=function(){t.target.html(o.html)};t.cssLinks?e.loadCss(t.cssLinks,c):c()}else t.target.is("style")&&Array.isArray(t.response)&&(e.loadCss(t.response),t.target.remove());t.callback&&t.callback(t),n.publish({channel:a.contract.channel,topic:a.contract.evtInjected,data:t})})},getContentAjax:function(t){var n=e.Deferred(),a=Object.resolve&&Object.resolve("require.s.contexts._.config.paths"),o=t.component&&a[t.component]||/\.js\s*$/.test(t.url)&&t.url;if(o)requirejs([o],function(e){e||(e={}),t.module=e,e.render&&e.render(t),n.resolve(t)});else{var c={url:t.url};c.method=t.method||(t.payload||t.data?"POST":"GET"),t.contentType&&(c.contentType=t.contentType),t.dataType&&(c.dataType=t.dataType),t.headers&&(c.headers=t.headers),"POST"===c.method.toUpperCase()&&(c.data=t.payload||t.data||t),e.ajax(c).done(function(e){"string"==typeof e?t.html=e:e&&e.component&&"string"==typeof e.component?t.html=e.component:t.response=e,n.resolve(t)})}return n},getData:function(t){t||(t={});var n={};return(t instanceof HTMLElement||"string"==typeof t)&&(t=e(t)),t instanceof e&&t.length&&t.data?n.target||(n.target=t):n=t,n.target||(n.target="body"),n.target=e(n.target),"function"==typeof n.target.data&&e.extend(n,n.target.data()),"string"==typeof n.component&&(n.servicesServer=t.servicesServer||a.settings.serviceUrl,n.url||(n.url=n.servicesServer.replace(/\/\s*$/,"")+"/%country%/%language%/"+n.component),a.componentMixinData[n.component]&&(n=a.componentMixinData[n.component](n))),n.url&&(n.url=n.url.replace(/%language%/i,t.language||a.settings.language).replace(/%country%/i,t.country||a.settings.country)),e.extend({},n)},componentMixinData:{energyefficiency:function(e){var t=document.querySelector("[data-bt--model-modelid]");return e.model=e.model||(T1.ctx&&T1.ctx.model?T1.ctx.model:null)||(t?t.attributes["data-bt--model-modelid"].value:null)||"aygo",e.url+="/"+e.model+"/"+(e.submodel||"null")+"/"+(e.grade||"null")+"/"+(e.engine||"null"),e}}},o={inject:function(e){n.publish({channel:a.contract.channel,topic:a.contract.evtInject,data:e})},contract:a.contract,postal:n};return a.init(),o});

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.