PageSourceSearch

https://www.mccarthymitsubishi.co.za/chunk-MTQ6TSTX.js

js mccarthymitsubishi.co.za collected 2026-10-07 13:26:43 UTC 2,754 bytes, 1 lines download raw bytes

1import{Aa as u,Mc as v,Nc as y,P as m,T as s,ca as p}from"./chunk-P63SUPO6.js";var w=(()=>{class o{constructor(n,c,a,h){this._document=n,this.apiService=c,this.siteService=h,this.renderer=a.createRenderer(null,null)}loadChat(n){this.siteService.get().then(c=>{this.apiService.get("SiteChatCodes",{Active:1,Deleted:0,PageNumber:1,PageSize:1,OrderBy:"",SiteID_FK:c.SiteID_PK,SitePage:n}).then(a=>{if(a.body.length>0){var h=this.renderer.createElement("div");this.renderer.setAttribute(h,"id","chats"),this.renderer.setAttribute(h,"name","script"),this.renderer.appendChild(this._document.body,h);var i=a.body[0].Snippet,S=JSON.parse(a.body[0].Tokens),_=JSON.parse(a.body[0].TokenValues);i=i.replaceAll("<script>",""),i=i.replaceAll("<\/script>",""),S.forEach(e=>{i=i.replaceAll("$"+e+"$",_[e])});let r=this.renderer.createElement("script");r.id="chat_script",r.text=i,this._document.querySelectorAll("[id=chats]").forEach(e=>{this.renderer.removeChild(e.parentNode,e)}),this._document.getElementsByName("whatsapp-chat-widget").forEach(e=>{this.renderer.removeChild(e.parentNode,e)}),this._document.querySelectorAll("[id=whatsapp-chat-widget]").forEach(e=>{this.renderer.removeChild(e.parentNode,e)}),this._document.getElementById("chat_script")&&this._document.getElementById("chat_script")?.remove(),this._document.querySelectorAll("[id=chat-2-desk-widget-container]").forEach(e=>{this.renderer.removeChild(e.parentNode,e)}),this.renderer.appendChild(this._document.body,r)}else this.apiService.get("SiteChatCodes",{Active:1,Deleted:0,PageNumber:1,PageSize:1,OrderBy:"",SiteID_FK:c.SiteID_PK}).then(r=>{if(r.body.length>0){var e=this.renderer.createElement("div");this.renderer.setAttribute(e,"id","chats"),this.renderer.appendChild(this._document.body,e);var d=r.body[0].Snippet,g=JSON.parse(r.body[0].Tokens),f=JSON.parse(r.body[0].TokenValues);d=d.replaceAll("<script>",""),d=d.replaceAll("<\/script>",""),g.forEach(t=>{d=d.replaceAll("$"+t+"$",f[t])});let l=this.renderer.createElement("script");l.text=d,this._document.getElementsByName("whatsapp-chat-widget").forEach(t=>{this.renderer.removeChild(t.parentNode,t)}),this._document.querySelectorAll("[id=whatsapp-chat-widget]").forEach(t=>{this.renderer.removeChild(t.parentNode,t)}),this._document.getElementById("chat_script")&&this.renderer.removeChild(this._document.body,this._document.getElementById("chat_script")),this._document.querySelectorAll("[id=chat-2-desk-widget-container]").forEach(t=>{this.renderer.removeChild(t.parentNode,t)}),this.renderer.appendChild(this._document.getElementById("chats"),l)}})})})}static{this.\u0275fac=function(c){return new(c||o)(s(p),s(v),s(u),s(y))}}static{this.\u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{w as a};

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.