https://www.rededorsaoluiz.com.br/paciente/marcar-exame/assets/chat-nice-injection.entry-d8e1ef0d.js
1import{ai as c,aj as i,al as d}from"./index-7b0891a0.js";import{c as s}from"./utils-8d7a6bad-2a88a9a4.js";const h=class{constructor(e){c(this,e),this.isMobile=void 0,this.token=void 0,this.displayNewDesktopChatIcon=!0,this.isLandingPage=!1}async componentDidLoad(){!!!document.querySelector("nice-chat")&&!window.isNiceChatInjected&&(await this.loadImport(),this.loadScript())}async loadImport(){if(!document.getElementById("nice-chat-loader"))return new Promise((e,o)=>{const t=document.createElement("script");t.id="nice-chat-loader",t.type="module",t.src="https://cdn.jsdelivr.net/npm/@rededor/[email protected]/dist/loader/index.js",t.onload=()=>{const n=document.createElement("script");n.type="module",n.innerHTML=` 2 import { defineCustomElements } from 'https://cdn.jsdelivr.net/npm/@rededor/[email protected]/dist/loader/index.js' 3 defineCustomElements() 4 `,document.head.appendChild(n),e()},t.onerror=o,document.head.appendChild(t)})}loadScript(){if(document.querySelector("nice-chat"))return;const e=document.createElement("nice-chat");e.setAttribute("is-lazy","false"),e.setAttribute("token",this.token),e.isMobile=this.isMobile,e.hasFirstAutomatedMessageContent="Olá",e.isSendFirstMessageAutomatically=!0,e.shouldDisplayIcon=!this.displayNewDesktopChatIcon,document.body.appendChild(e),window.isNiceChatInjected=!0}getComponentToBeRendered(){const e=window.location.pathname,o=s.noChatIcon.pathName.includes(e);if(!this.displayNewDesktopChatIcon||o)return null;if(!this.isMobile)return i("chat-nice-desktop-icon",{isLandingPage:this.isLandingPage});const t=s.displayMobileIcon.pathName.some(a=>e.includes(a)),n=s.displayMobileIconWithMargin.pathName.some(a=>e===a);return t||n?i("chat-nice-mobile-icon",{hasMargin:n}):null}render(){return i(d,{onClick:()=>window._handleOpenNice()},this.getComponentToBeRendered(),i("slot",null))}};export{h as chat_nice_injection};
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.