PageSourceSearch

https://www.flirtingwithmodels.com/_nuxt/chat.e6134056.js

js flirtingwithmodels.com collected 2026-09-25 02:32:20 UTC 14,535 bytes, 1 lines download raw bytes

1import{T as le,H as re,_ as de}from"./DefaultUserIcon.cba25011.js";import{_ as ce}from"./nuxt-link.03bac8b4.js";import{_ as ue}from"./Markdown.810ea33a.js";import{_ as me}from"./PButton.2996a87f.js";import{d as ge,u as he,a as fe,r as pe,b as h,o as xe,c as _e,e as ve,f as C,g as ye,h as n,i,j as l,w as u,k as g,t as m,l as t,m as e,F as T,n as K,p as B,q as b,s as D,v as q,x as Y,y as Q,z as be,$ as we,A as ke}from"./entry.17b5fbb9.js";import{r as Ce}from"./ChevronLeftIcon.c9b045eb.js";import{r as W,a as Ue,b as Se,c as Me,d as Ie,U as Ne,h as X,G as $e,e as Ae,V as Le,S as Te}from"./SpeakerXMarkIcon.28075f3a.js";const Be={class:"overflow-hidden bg-white dark:bg-neutral-100/10 text-gray-600 dark:text-neutral-400 shadow sm:rounded-md sm:mx-0 absolute inset-x-0 sm:inset-x-6 top-0 sm:top-6 bottom-0 sm:bottom-6"},De={class:"px-4 sm:px-6 py-3"},je={class:"flex"},Re={"aria-label":"Back"},Ve={key:0,class:"flex-shrink-0 ml-auto"},Ee={class:"flex -space-x-1 justify-center"},Oe=["src","alt"],ze=e("div",{class:"w-full border-t border-gray-300 dark:border-neutral-100/10"},null,-1),Pe={class:"px-4 sm:px-6 py-4 sm:py-6"},Ge={class:"min-w-0 flex-1"},He={class:"flex gap-x-3 -mt-1 sm:-mt-2 sm:-mb-1 text-lg sm:text-xl md:text-2xl leading-tight tracking-tight text-gray-900 dark:text-white"},Fe={class:"font-bold"},Je={key:0,class:"mt-2 text-sm sm:text-base text-gray-600 dark:text-neutral-400 text-left"},Ke={key:1,class:"mt-2 text-xs text-gray-600 dark:text-neutral-400 text-left"},qe=e("div",{class:"w-full border-t border-gray-300 dark:border-neutral-100/10"},null,-1),Ye={class:"px-4 sm:px-6 pt-6"},Qe={key:0},We={class:"flex-shrink-0 mr-3 relative"},Xe=["src"],Ze={class:"text-xs font-medium leading-none text-white unselectable"},et={key:3,class:"absolute right-0 -bottom-2 inline-flex items-center rounded-md bg-gray-500 px-1 py-0.5 text-xs font-medium text-white ring-2 ring-white dark:ring-neutral-800"},tt={class:"min-w-0 flex-1"},st={key:0,class:"font-medium text-gray-900 dark:text-white"},at={key:1,class:"font-medium text-gray-900 dark:text-white"},nt={class:"text-sm text-gray-600 dark:text-neutral-400 ml-1.5"},ot={class:"font-normal text-gray-900 dark:text-white"},it={key:2,class:"flex font-normal text-[11px] text-rose-600 dar
1k:text-rose-400"},lt=e("span",{class:"self-center"},"Couldn't send.",-1),rt={class:"flex items-start space-x-3 absolute inset-x-4 sm:inset-x-6 bottom-6"},dt={class:"flex-shrink-0 mt-12"},ct={class:"relative inline-block"},ut={class:"text-xs font-medium leading-none text-white unselectable"},mt={class:"absolute bottom-0 right-0 block translate-y-1 translate-x-1 transform rounded-full border-2 border-white dark:border-neutral-800"},gt={class:"mt-3 text-center"},ht={class:"min-w-0 flex-1"},ft={class:"relative w-full bg-indigo-600/10 dark:bg-indigo-400/10 dark:text-white/80 -bottom-2 h-12 rounded-t-lg px-3 py-2.5 text-sm"},pt=e("span",{class:"font-medium"},"AI hosts",-1),xt={class:"hidden sm:inline-block"},_t={class:"font-medium"},vt={class:"relative w-full"},yt={class:"overflow-hidden rounded-lg shadow-sm bg-white dark:bg-neutral-800 ring-1 ring-inset ring-gray-300 dark:ring-neutral-100/10 focus-within:ring-2 focus-within:ring-indigo-600"},bt=e("label",{for:"message-field",class:"sr-only"},"Message",-1),wt=["placeholder"],kt=e("div",{class:"py-2","aria-hidden":"true"},[e("div",{class:"py-px"},[e("div",{class:"h-9"})])],-1),Ct={class:"absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2"},Ut={class:"flex-shrink-0 ml-auto"},St=["disabled"],Mt={key:0,class:"absolute left-[13px] mt-[3px] flex items-start space-x-4 text-gray-600 dark:text-neutral-400 text-[11px]"},It=e("div",null,[g("An "),e("span",{class:"font-semibold"},"AI host"),g(" is responding")],-1),Nt=[It],$t=e("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"},null,-1),At={class:"fixed inset-0 z-10 overflow-y-auto"},Lt={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},Tt={class:"bg-white dark:bg-neutral-900 px-4 pb-4 pt-5 sm:p-6 sm:pb-4"},Bt={class:"sm:flex sm:items-start"},Dt={class:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-neutral-800 sm:mx-0 sm:h-10 sm:w-10"},jt={class:"mt-3 mb-1 text-center sm:ml-4 sm:mt-0 sm:text-left"},Rt=e("div",{class:"mt-2"},[e("p",{class:"text-sm text-gray-600 dark:text-neutral-400"},"Personalize your settings.")],-1),Vt={class:"mt-4 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-6"},Et={class:"sm:col-span-4"},Ot=e("label",{for:"new-host-name",class:"block text-sm font-medium leading-6 text-gray-900 dark:text-white"},"Name",-1),zt={class:"mt-2"},Pt={class:"bg-gray-50 dark:bg-neutral-800 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6 sm:gap-x-2"},Gt=["disabled"],Ht="This statement, developed through thorough consideration of medical literature and clinical experience, represents the consensus of a Canadian panel of multidisciplinary experts. The recommendations provide a practical approach to care for specialists and allied health professionals, aiming for optimal patient and family care. These guidelines may change as scientific knowledge, technology, and practice patterns evolve. They are not a substitute for individual physician judgment in managing clinical care in consultation with patients, considering all individual circumstances, diagnostic and treatment options, and available resources. Adherence to these recommendations will not guarantee successful outcomes in every case.",Zt=ge({__name:"chat",setup(Ft){he();const o=fe();let z=o.value.hosts;const w=pe([]),c=h("Guest"),U=h(!1),_=h(!1),j=h(),P=h();xe(()=>{P.value.focus(),U.value=window.navigator.onLine,window.addEventListener("online",()=>S(!0)),window.addEventListener("offline",()=>S(!1)),c.value=localStorage.getItem("portalUserName")??"Guest"}),_e(()=>{window.removeEventListener("online",()=>S(!0)),window.removeEventListener("offline",()=>S(!1))}),ve(()=>{j.value.scrollTop=j.value.scrollHeight});const S=d=>{d.value=d.value},G=d=>{var s=d.split(" "),v=s[0].substring(0,1).toUpperCase();return s.length>1&&(v+=s[s.length-1].substring(0,1).toUpperCase()),v},Z=d=>d.toLocaleTimeString([],{timeStyle:"short"}),ee=C(()=>{if(o.value.slug==="ccs")return"Message AI hosts from "+o.value.title+"."}),te=d=>o.value.slug==="twist"||o.value.slug==="allin"||o.value.slug==="liquidity"||o.value.slug==="timferriss"?d+" Bot":d+" AI";let M=null;const p=h(""),k=h(""),se=C(()=>k.value!==""),R=C(()=>p.value.length>0&&U.value),H=async()=>
1{if(!R)return;const d=JSON.parse(JSON.stringify(w));d.forEach((r,x)=>{r.failed&&d.splice(x,1)});let s={id:crypto.randomUUID(),timestamp:new Date,host:null,message:p.value.trim(),failed:!1};w.push(s),k.value=s.id;const v=p.value.trim();p.value="";function O(r){var x=/【\d+:\d+†[^】]+】/g;return r.replace(x,"")}const I={userName:c.value==="Guest"?null:c.value,history:JSON.stringify(d),message:v,includeAudio:_.value};M&&(I.threadID=M),await we("/portal/shows/"+o.value.slug+"/chat",{method:"POST",body:I}).then(r=>{if(k.value===s.id){M||(M=r.data.threadID);const x={id:crypto.randomUUID(),timestamp:new Date,host:r.data.host,message:r.data.message,messageNoCitations:O(r.data.message),failed:!1};if(w.push(x),_&&r.data.audio){let N=window.atob(r.data.audio),a=N.length,y=new Uint8Array(a);for(let L=0;L<a;L++)y[L]=N.charCodeAt(L);const $=new Blob([y.buffer],{type:"audio/mpeg"}),A=URL.createObjectURL($);new Audio(A).play()}}},r=>{console.log(r),s.failed=!0}),k.value===s.id&&(k.value="")},ae=()=>{_.value=!_.value},f=h(""),V=h(!1),F=()=>{f.value=c.value,V.value=!0},E=()=>{V.value=!1},ne=C(()=>f.value.length>=1&&f.value.length<=64&&f.value!==c.value),J=C(()=>!0),oe=async()=>{c.value=f.value,localStorage.setItem("portalUserName",c.value),E()};return ye({title:"Chat - PodcastAI",meta:[{name:"description",content:"Chat with the hosts of "+o.value.title+"."},{name:"og:title",content:"Chat - "+o.value.title},{name:"og:description",content:"Chat with the hosts of "+o.value.title+"."},{name:"og:image",content:o.value.imageURL??"/favicon.png"}],bodyAttrs:{class:"bg-gray-100 dark:bg-neutral-950"}}),(d,s)=>{const v=le,O=re,I=ce,r=de,x=ue,N=me;return n(),i(T,null,[l(O,null,{default:u(()=>[l(v,null,{default:u(()=>[g("Chat - "+m(t(o).title),1)]),_:1})]),_:1}),e("div",Be,[e("div",De,[e("header",je,[e("nav",Re,[l(I,{to:"/",class:"flex items-center leading-6 text-sm font-medium text-gray-600 dark:text-neutral-400 hover:text-gray-700 dark:hover:text-neutral-300"},{default:u(()=>[l(t(Ce),{class:"-ml-1 mr-1 h-5 w-5 flex-shrink-0 text-gray-400 dark:text-neutral-500","aria-hidden":"true"}),g(" Back ")]),_:1})]),t(z).length>0?(n(),i("div",Ve,[e("div",Ee,[(n(!0),i(T,null,K(t(z),(a,y)=>(n(),i(T,{key:y},[a.imageURL?(n(),i("img",{key:0,class:"inline-block h-6 w-6 rounded-full ring-2 ring-white dark:ring-neutral-800",src:a.imageURL,alt:a.name},null,8,Oe)):(n(),B(r,{key:1,class:"inline-block h-6 w-6 rounded-full ring-2 ring-gray-100 dark:ring-neutral-900"}))],64))),128))])])):b("",!0)])]),ze,e("div",{ref_key:"conversationView",ref:j,class:"overflow-y-auto absolute top-[49px] bottom-[210px] sm:bottom-[215px]"},[e("div",Pe,[e("div",Ge,[e("h1",He,[e("span",Fe,m(t(o).title?t(o).title:"Untitled Show"),1)]),t(o).description?(n(),i("p",Je,m(t(o).description),1)):b("",!0),(n(),i("p",Ke,m(Ht)))])]),qe,e("div",Ye,[t(w).length>0?(n(),i("div",Qe,[(n(!0),i(T,null,K(t(w),(a,y)=>{var $,A;return n(),i("div",{key:y,class:"flex items-start my-6 first:mt-0 last:mb-0"},[e("div",We,[($=a.host)!=null&&$.imageURL?(n(),i("img",{key:0,class:"h-10 w-10 rounded-full",src:(A=a.host)==null?void 0:A.imageURL,alt:""},null,8,Xe)):a.host?(n(),B(r,{key:2,class:"inline-block h-10 w-10 rounded-full"})):(n(),i("span",{key:1,onClick:s[0]||(s[0]=ie=>F()),class:"inline-flex h-10 w-10 rounded-full items-center justify-center bg-gray-500 cursor-pointer"},[e("span",Ze,m(G(t(c))),1)])),a.host?(n(),i("span",et,"AI")):b("",!0)]),e("div",tt,[a.host?(n(),i("span",st,[g(m(te(a.host.name)),1),l(t(W),{class:"inline-block w-3 h-3 ml-1 -mt-1 text-indigo-600 dark:text-indigo-400"})])):(n(),i("span",at,m(t(c)),1)),e("span",nt,m(Z(a.timestamp)),1),e("div",ot,[l(x,{markdown:a.messageNoCitations??a.message},null,8,["markdown"])]),a.failed?(n(),i("div",it,[l(t(Ue),{class:"self
1-center inline-block h-3 w-3 mr-0.5","aria-hidden":"true"}),lt])):b("",!0)])])}),128))])):b("",!0)])],512),e("div",rt,[e("div",dt,[e("span",ct,[e("span",{class:"inline-flex h-10 w-10 rounded-full items-center justify-center bg-gray-500 cursor-pointer",onClick:s[1]||(s[1]=a=>F())},[e("span",ut,m(G(t(c))),1)]),e("span",mt,[e("span",{class:D(["block h-2.5 w-2.5 rounded-full",{"bg-green-400":t(U),"bg-rose-400":!t(U)}])},null,2)])]),e("div",gt,[e("span",{onClick:s[2]||(s[2]=a=>ae()),class:D([t(_)?"bg-indigo-200 dark:bg-indigo-400":"bg-gray-100 dark:bg-neutral-100/10","inline-block items-center rounded-full px-1 py-1 text-xs font-medium"])},[t(_)?(n(),B(t(Se),{key:0,class:"text-indigo-600 dark:text-neutral-800 h-4 w-4","aria-hidden":"true"})):(n(),B(t(Me),{key:1,class:"text-gray-600 dark:text-neutral-100/40 h-4 w-4","aria-hidden":"true"}))],2)])]),e("div",ht,[e("div",ft,[g(" You're chatting with "),l(t(W),{class:"inline-block w-3 h-3 mr-1 -mt-1 text-indigo-600 dark:text-indigo-400"}),pt,e("span",xt,[g(" from "),e("span",_t,m(t(o).title),1)]),g(". ")]),e("div",vt,[e("div",yt,[bt,q(e("textarea",{ref_key:"messageField",ref:P,"onUpdate:modelValue":s[3]||(s[3]=a=>Q(p)?p.value=a:null),onKeydown:s[4]||(s[4]=be(ke(a=>H(),["prevent"]),["enter"])),rows:"3",name:"message-field",id:"message-field",class:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-neutral-500 focus:ring-0 sm:text-sm sm:leading-6",placeholder:t(ee)},null,40,wt),[[Y,t(p)]]),kt]),e("div",Ct,[e("div",Ut,[e("button",{onClick:s[5]||(s[5]=a=>H()),disabled:!t(R),type:"button",class:D([t(R)?"hover:bg-indigo-500":"opacity-50 disabled","inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"])},[l(t(Ie),{class:"inline w-4 h-4"})],10,St)])]),t(se)?(n(),i("div",Mt,Nt)):b("",!0)])])])]),l(t(Te),{as:"template",show:t(V)},{default:u(()=>[l(t(Ne),{as:"div",class:"relative z-10",onClose:s[9]||(s[9]=a=>E())},{default:u(()=>[l(t(X),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:u(()=>[$t]),_:1}),e("div",At,[e("div",Lt,[l(t(X),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:u(()=>[l(t($e),{class:"relative w-full transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"},{default:u(()=>[e("div",Tt,[e("div",Bt,[e("div",Dt,[l(t(Ae),{class:"h-6 w-6 text-gray-600 dark:text-neutral-400","aria-hidden":"true"})]),e("div",jt,[l(t(Le),{as:"h3",class:"text-base font-semibold leading-6 text-gray-900 dark:text-white"},{default:u(()=>[g("Settings")]),_:1}),Rt,e("div",Vt,[e("div",Et,[Ot,e("div",zt,[q(e("input",{"onUpdate:modelValue":s[6]||(s[6]=a=>Q(f)?f.value=a:null),type:"text",name:"new-host-name",id:"new-host-name",class:"block w-full rounded-md border-0 py-1.5 dark:bg-white/5 text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-white/10 placeholder:text-gray-400 dark:placeholder:text-neutral-500 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",placeholder:"John Smith"},null,512),[[Y,t(f)]])])])])])])]),e("div",Pt,[l(N,{class:"w-full sm:w-auto",onClick:s[7]||(s[7]=a=>oe()),disabled:!t(ne)},{default:u(()=>[g(" OK ")]),_:1},8,["disabled"]),e("button",{type:"button",class:D([t(J)?"hover:bg-gray-50 dark:hover:bg-neutral-700":"opacity-50 disabled","mt-3 inline-flex w-full justify-center rounded-md bg-white dark:bg-neutral-800 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-neutral-700 sm:mt-0 sm:w-auto"]),onClick:s[8]||(s[8]=a=>E()),ref:"cancelButtonRef",disabled:!t(J)}," Cancel ",10,Gt)])]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"])],64)}}});
1export{Zt as default};

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.