1import{d as m,p as h,c as b,v as d,q as f,o as v}from"./framework.BC69C2Mh.js";const A=m({__name:"Utterances",props:{repo:{},issueTerm:{},theme:{},label:{}},setup(c,{expose:i}){const r=h(null),t=c,s=()=>{if(r.value){const e=document.createElement("script");e.src="https://utteranc.es/client.js",e.setAttribute("repo",t.repo),e.setAttribute("issue-term",t.issueTerm||"pathname"),e.setAttribute("theme",t.theme||"github-light"),e.setAttribute("label",t.label||""),e.setAttribute("crossorigin","anonymous"),e.setAttribute("async","true"),e.onerror=()=>{console.error("Failed to load utterances script.")},r.value.appendChild(e)}},o=()=>{if(r.value){const e=r.value.querySelector(".utterances");e&&e.remove(),s()}};return i({reload:o}),d(()=>{s()}),f(()=>[t.repo,t.issueTerm,t.theme,t.label],([e,a,n,p])=>{var l,u;if(r.value){if(e===t.repo&&a===t.issueTerm&&p===t.label&&n!==t.theme){(u=(l=r.value.querySelector("iframe"))==null?void 0:l.contentWindow)==null||u.postMessage({type:"set-theme",theme:n},"https://utteranc.es");return}o()}}),(e,a)=>(v(),b("div",{class:"utterances-wrapper",ref_key:"utterancesEl",ref:r},null,512))}});export{A as Utterances};
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.