1(function (Drupal, once) { 2 3 let webchatLoaded = false; 4 5 function loadWebChat() { 6 if (webchatLoaded) return; 7 webchatLoaded = true; 8 9 const script = document.createElement('script'); 10 script.src = 'https://cdn.botframework.com/botframework-webchat/latest/webchat.js'; 11 script.async = true; 12 13 script.onload = function () { 14 if (window.initWebChat) { 15 window.initWebChat(); 16 } else { 17 console.error('initWebChat not found'); 18 } 19 }; 20 21 document.body.appendChild(script); 22 } 23 24 Drupal.behaviors.aiWebchatLoader = { 25 attach(context) { 26 once('ai-webchat-loader', '#chatbotOpen', context).forEach(button => { 27 button.addEventListener('click', loadWebChat); 28 }); 29 } 30 }; 31 32})(Drupal, once); 33 34//# sourceMappingURL=../map/components/ai-webchat-loader.js.map
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.