const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Detail-CcLDU57I.js","./vendor-s2rfM_Vj.js","./t-r-vendor-gn7FMrPE.js","./t-r-vendor-BqYdeEzc.css","./Detail-UzfMliJR.css"])))=>i.map(i=>d[i]);
import{_ as e}from"./constant-Dkm_Y9q1.js";import{r,E as t,z as s}from"./vendor-s2rfM_Vj.js";import{a as n}from"./apis-DdFSvwR4.js";import"./newtab-BWIjnu6l.js";import"./index-Bf7N7lFc.js";import"./t-r-vendor-gn7FMrPE.js";const c=t("div")({name:"WrapUI",class:"w1xz77ti",propsAsIs:!1}),o=t("div")({name:"ContentUI",class:"c13h6wag",propsAsIs:!1}),i=t("i")({name:"IconUI",class:"i1ejh7f8",propsAsIs:!1}),u=r.lazy((()=>e((()=>import("./Detail-CcLDU57I.js")),__vite__mapDeps([0,1,2,3,4]),import.meta.url))),a=({iframe:e})=>{const{idleTime:t}=(({endCb:e})=>{const t=r.useRef(0),[s,c]=r.useState(t.current);let o=r.useRef(null);const i=()=>{t.current=0,c(t.current)},u=()=>{if(e(t.current))return l();t.current=t.current+3,c(t.current)},a=()=>{i()},l=()=>{document.removeEventListener("click",a),document.removeEventListener("keypress",a),clearInterval(o.current),i()};return r.useEffect((()=>(n((()=>{document.addEventListener("click",a),document.addEventListener("keypress",a),o.current=setInterval(u,3e3)}),3e3),()=>l())),[]),{idleTime:s}})({endCb:e=>e>9||f.current}),[a,l]=r.useState(!1),m=r.useRef(!1),[d,p]=r.useState(!1),f=r.useRef(!1),v=(e,r=!1)=>{r&&(f.current=!0,p(!1)),m.current=!0,l(e)};return r.useEffect((()=>{t>6&&setTimeout((()=>{m.current||f.current||(console.info("ovo - chatgpt - prerender"),p(!0),v(!0))}),1500)}),[t]),s.jsxs(c,{children:[s.jsx(o,{onClick:()=>v(!0,!0),children:s.jsx(i,{className:"ovo-color chatgpt"})}),s.jsx(r.Suspense,{children:m.current&&s.jsx(u,{visible:a,handleVisible:v,iframe:e,isPreRender:d,closePreRender:()=>{f.current||n((()=>{v(!1),setTimeout((()=>{p(!1)}),1e3)}),3e3)}})})]})};export{a as default};
