1import{P as p}from"./CMDGPggm.js";let r=null,s=!1,i=null,o=null;function u(e){return e.replace(/\/+$/g,"")}function c(){const e=u(p);return e?e.includes("/c/")?e+"/":`https://captcha.digitalwave.hu/c/${e.replace(/^https?:\/\/captcha\.digitalwave\.hu\/?/i,"")}/`:""}function d(){return window.Cap?Promise.resolve():o||(o=new Promise((e,t)=>{const a=document.querySelector('script[data-capjs="1"]');if(a){a.addEventListener("load",()=>e(),{once:!0}),a.addEventListener("error",()=>t(new Error("Cap.js script failed to load")),{once:!0});return}const n=document.createElement("script");n.src="https://captcha.digitalwave.hu/assets/cap.min.js",n.async=!0,n.dataset.capjs="1",n.onload=()=>e(),n.onerror=()=>t(new Error("Cap.js script failed to load")),document.head.appendChild(n)}),o)}function f(e=3e4){return new Promise((t,a)=>{const n=Date.now(),l=()=>{if(window.Cap){t(window.Cap);return}if(Date.now()-n>=e){a(new Error("Cap.js script failed to load"));return}window.setTimeout(l,50)};l()})}async function w(){if(s&&r)return;if(i)return i;const e=c();if(!e){console.warn("PUBLIC_CAPTCHA_API_URL is not configured â captcha disabled in dev");return}return i=(async()=>{try{await d();const t=await f();r=new t({apiEndpoint:e}),s=!0}catch(t){throw console.error("Failed to initialize Cap.js:",t),s=!1,r=null,t}finally{i=null}})(),i}function h(){return s&&r!==null}async function j(){if(!c())return null;if(r||await w(),!r)throw new Error("A biztonsági ellenÅrzés nem indult el. Kérjük, töltse újra az oldalt és próbálja újra.");try{const t=await r.solve();return t&&typeof t=="object"&&"token"in t?t.token??null:typeof t=="string"?t:null}catch(t){throw console.error("Cap.js challenge failed:",t),new Error("A biztonsági ellenÅrzés sikertelen. Kérjük, töltse újra az oldalt és próbálja újra.")}}export{h as a,j as g,w as i};
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.