1import{k as e}from"./BCUdMxRn.js";import{C as t}from"./DtSZKRQB.js";import{t as n}from"./A80HvjHR.js";import{r,t as i}from"./D8j6wX6n.js";import{t as a}from"./CoCYiIwR.js";import{t as o}from"./bWvotRXc.js";var s=e({useEPay:()=>l}),c=`https://seedance.com.ai/streamApi`;function l(){let e=a(),s=t(!1),l=n(),u;return{loading:s,useEPay:async(t,n)=>{try{s.value=!0,u=new AbortController,o(`${c}/finance/useepay/getCheckoutUrl?comboId=${t}&code=${i()}`,{method:`GET`,openWhenHidden:!0,headers:{Authorization:`Bearer ${r()}`,clientId:`e5cd7e4891bf95d1d19206ce24a7b32e`},signal:u.signal,async onopen(e){e.ok?console.log(`EPay SSE connection opened successfully`):console.log(`EPay SSE connection failed`)},onmessage(t){let n=JSON.parse(t.data);if(n.code===401){e.value=!0,u.abort(),s.value=!1;return}n.status===`success`?(setTimeout(()=>{s.value=!1,n.url&&(n.url.includes(`success`)||n.url.includes(`paysuccess`))?location.href=l(`/paysuccess`):n.url?location.href=n.url:location.href=l(`/paysuccess`)},500),u.abort()):(n.status===`failed`||n.status===`error`||n.code!==200)&&(setTimeout(()=>{s.value=!1,location.href=l(`/payfailed`)},500),u.abort())},onclose(){console.log(`EPay SSE connection closed`),s.value=!1},onerror(e){console.error(`EPay SSE error:`,e),u.abort(),s.value=!1}})}catch(e){console.error(`Error initiating EPay:`,e),s.value=!1}}}}export{s as n,l as t};
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.