1(() => { 2 window.USE_COMMONREND = false; 3})(); 4 5 (() => { 6 window.USE_COMMONREND = true; 7 8 let tdChatLoaded = false; 9 let webchat = null; 10 11 const chatConfig = { 12 key: "a3974fc5831646c0ae3afd0742335eca", 13 merchantId: "5728d7ddc601d5eb67b04840" 14 }; 15 16 const initConfig = { 17 tags: ["chat_recordsfinder.com"] }; 18 19 const loadChatWidget = (items) => { 20 if (tdChatLoaded) return; 21 tdChatLoaded = true; 22 23 // Create container (must exist, do not hide) 24 const divContainer = document.createElement("div"); 25 divContainer.id = "tdWebchat"; 26 document.body.appendChild(divContainer); 27 28 // Load V2 SDK 29 const script = document.createElement("script"); 30 script.type = "text/javascript"; 31 script.charset = "UTF-8"; 32 script.async = true; 33 script.id = "tdwebchatscript"; 34 script.src = "https://talkdeskchatsdk.talkdeskapp.com/v2/talkdeskchatsdk.js"; 35 document.head.appendChild(script); 36 37 script.onload = () => { 38 // Initialize Talkdesk V2 39 webchat = TalkdeskChatSDK( 40 "tdWebchat", 41 { 42 touchpointId: items.key, 43 accountId: "", 44 region: "td-us-1" 45 }, 46 { 47 enableValidation: false, 48 enableEmoji: true, 49 enableUserInput: true, 50 enableAttachments: true 51 } 52 ); 53 54 // Init with config 55 webchat.init(initConfig).then(() => { 56 // Manual open for buttons 57 webchat.showTalkdeskChat = () => { 58 webchat.selfHostedApp.open(); 59 }; 60 }); 61 62 // Set context on conversation start 63 webchat.onConversationStart = () => { 64 webchat.setContextParam({"merchantId":"5728d7ddc601d5eb67b04840"}); 65 }; 66 67 window.webchat = webchat; 68 69 // Custom buttons also open chat 70 ["btn-chat", "link"].forEach(id => { 71 const el = document.getElementById(id); 72 if (el) { 73 el.addEventListener("click", () => { 74 webchat?.showTalkdeskChat?.(); 75 }); 76 } 77 }); 78 }; 79 }; 80 81 const safeLoad = () => loadChatWidget(chatConfig); 82 83 // Lazy load 84 setTimeout(safeLoad, 4000); 85 ["scroll", "mousemove", "touchstart"].forEach(evt => { 86 window.addEventListener(evt, safeLoad, {once: true}); 87 }); 88 })(); 89 90
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.