Spaces:
Sleeping
Sleeping
Update index.html
Browse files- index.html +309 -513
index.html
CHANGED
|
@@ -1,521 +1,317 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
.
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
.
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
}
|
| 59 |
-
.
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
.
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
.
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
.
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
.
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
}
|
| 219 |
-
.
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
border-radius:8px;
|
| 230 |
-
border:1px solid rgba(255,215,0,0.2);
|
| 231 |
-
background:#1a1a1a;
|
| 232 |
-
color:#fff;
|
| 233 |
-
font-size:16px;
|
| 234 |
-
outline:none;
|
| 235 |
-
}
|
| 236 |
-
.login-input:focus{
|
| 237 |
-
border-color:#FFD700;
|
| 238 |
-
}
|
| 239 |
-
.login-btn{
|
| 240 |
-
width:100%;
|
| 241 |
-
padding:12px;
|
| 242 |
-
background:#FFD700;
|
| 243 |
-
color:#000;
|
| 244 |
-
font-weight:700;
|
| 245 |
-
font-size:16px;
|
| 246 |
-
border:none;
|
| 247 |
-
border-radius:8px;
|
| 248 |
-
cursor:pointer;
|
| 249 |
-
transition:0.2s;
|
| 250 |
-
}
|
| 251 |
-
.login-btn:active{
|
| 252 |
-
transform:scale(0.98);
|
| 253 |
-
}
|
| 254 |
-
.error-msg{
|
| 255 |
-
color:#f44336;
|
| 256 |
-
font-size:0.85rem;
|
| 257 |
-
margin-top:10px;
|
| 258 |
-
display:none;
|
| 259 |
-
}
|
| 260 |
-
.telegram-link {
|
| 261 |
-
display: inline-block;
|
| 262 |
-
margin-top: 20px;
|
| 263 |
-
color: #4caf50;
|
| 264 |
-
text-decoration: none;
|
| 265 |
-
font-weight: 600;
|
| 266 |
-
font-size: 0.95rem;
|
| 267 |
-
border-bottom: 1px solid #4caf50;
|
| 268 |
-
padding-bottom: 2px;
|
| 269 |
-
}
|
| 270 |
-
</style>
|
| 271 |
</head>
|
| 272 |
-
|
| 273 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
|
| 275 |
-
<div
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
</
|
| 291 |
-
|
| 292 |
-
<
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
</div>
|
| 297 |
-
|
| 298 |
-
<
|
| 299 |
-
|
| 300 |
-
<
|
| 301 |
-
|
| 302 |
-
<
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
</div>
|
| 308 |
-
<div id="timer" style="text-align:center;font-size:1.2rem;font-weight:700;margin-bottom:8px;">00:30</div>
|
| 309 |
-
<div id="innerAlert" class="inner-alert"></div>
|
| 310 |
-
<div id="mainPred" class="result-text">--</div>
|
| 311 |
-
<table>
|
| 312 |
-
<thead>
|
| 313 |
-
<tr><th>Period</th><th>Number</th><th>Result</th></tr>
|
| 314 |
-
</thead>
|
| 315 |
-
<tbody id="histBody"></tbody>
|
| 316 |
-
</table>
|
| 317 |
-
</div>
|
| 318 |
</div>
|
| 319 |
-
|
| 320 |
-
<script>
|
| 321 |
-
// --- Simple Login Logic ---
|
| 322 |
-
function checkLogin() {
|
| 323 |
-
const pass = document.getElementById("passInput").value.trim();
|
| 324 |
-
const errorMsg = document.getElementById("errorMsg");
|
| 325 |
-
|
| 326 |
-
// Password ကို admin113224 သို့ ပြောင်းလဲထားပါသည်
|
| 327 |
-
if (pass === "admin113224") {
|
| 328 |
-
// Login အောင်မြင်ပါက
|
| 329 |
-
document.getElementById("loginOverlay").style.display = "none";
|
| 330 |
-
document.getElementById("floatBtn").style.display = "block";
|
| 331 |
-
document.getElementById("inGameMarquee").style.display = "block";
|
| 332 |
-
} else {
|
| 333 |
-
// Password မှားယွင်းပါက
|
| 334 |
-
errorMsg.style.display = "block";
|
| 335 |
-
errorMsg.innerText = "Incorrect Password!";
|
| 336 |
-
}
|
| 337 |
-
}
|
| 338 |
-
|
| 339 |
-
// --- Drag Function for SHOW PANEL button ---
|
| 340 |
-
const floatBtn = document.getElementById("floatBtn");
|
| 341 |
-
let isDragging = false;
|
| 342 |
-
let hasMoved = false;
|
| 343 |
-
let offsetX, offsetY;
|
| 344 |
-
|
| 345 |
-
floatBtn.addEventListener('mousedown', function(e) {
|
| 346 |
-
isDragging = true;
|
| 347 |
-
hasMoved = false;
|
| 348 |
-
offsetX = e.clientX - floatBtn.getBoundingClientRect().left;
|
| 349 |
-
offsetY = e.clientY - floatBtn.getBoundingClientRect().top;
|
| 350 |
-
});
|
| 351 |
-
|
| 352 |
-
document.addEventListener('mousemove', function(e) {
|
| 353 |
-
if (isDragging) {
|
| 354 |
-
hasMoved = true;
|
| 355 |
-
let left = e.clientX - offsetX;
|
| 356 |
-
let top = e.clientY - offsetY;
|
| 357 |
-
|
| 358 |
-
if (left < 0) left = 0;
|
| 359 |
-
if (top < 0) top = 0;
|
| 360 |
-
if (left + floatBtn.offsetWidth > window.innerWidth) left = window.innerWidth - floatBtn.offsetWidth;
|
| 361 |
-
if (top + floatBtn.offsetHeight > window.innerHeight) top = window.innerHeight - floatBtn.offsetHeight;
|
| 362 |
-
|
| 363 |
-
floatBtn.style.left = left + 'px';
|
| 364 |
-
floatBtn.style.top = top + 'px';
|
| 365 |
-
floatBtn.style.bottom = 'auto';
|
| 366 |
-
floatBtn.style.right = 'auto';
|
| 367 |
-
}
|
| 368 |
-
});
|
| 369 |
-
|
| 370 |
-
document.addEventListener('mouseup', function() {
|
| 371 |
-
isDragging = false;
|
| 372 |
-
});
|
| 373 |
-
|
| 374 |
-
floatBtn.addEventListener('touchstart', function(e) {
|
| 375 |
-
isDragging = true;
|
| 376 |
-
hasMoved = false;
|
| 377 |
-
const touch = e.touches[0];
|
| 378 |
-
offsetX = touch.clientX - floatBtn.getBoundingClientRect().left;
|
| 379 |
-
offsetY = touch.clientY - floatBtn.getBoundingClientRect().top;
|
| 380 |
-
});
|
| 381 |
-
|
| 382 |
-
document.addEventListener('touchmove', function(e) {
|
| 383 |
-
if (isDragging) {
|
| 384 |
-
hasMoved = true;
|
| 385 |
-
const touch = e.touches[0];
|
| 386 |
-
let left = touch.clientX - offsetX;
|
| 387 |
-
let top = touch.clientY - offsetY;
|
| 388 |
-
|
| 389 |
-
if (left < 0) left = 0;
|
| 390 |
-
if (top < 0) top = 0;
|
| 391 |
-
if (left + floatBtn.offsetWidth > window.innerWidth) left = window.innerWidth - floatBtn.offsetWidth;
|
| 392 |
-
if (top + floatBtn.offsetHeight > window.innerHeight) top = window.innerHeight - floatBtn.offsetHeight;
|
| 393 |
-
|
| 394 |
-
floatBtn.style.left = left + 'px';
|
| 395 |
-
floatBtn.style.top = top + 'px';
|
| 396 |
-
floatBtn.style.bottom = 'auto';
|
| 397 |
-
floatBtn.style.right = 'auto';
|
| 398 |
-
}
|
| 399 |
-
});
|
| 400 |
-
|
| 401 |
-
document.addEventListener('touchend', function() {
|
| 402 |
-
isDragging = false;
|
| 403 |
-
});
|
| 404 |
-
|
| 405 |
-
floatBtn.addEventListener('click', function() {
|
| 406 |
-
if (!hasMoved) {
|
| 407 |
-
panelWrap.classList.add("show");
|
| 408 |
-
}
|
| 409 |
-
});
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
// --- Original Hack Logic ---
|
| 413 |
-
const panelWrap=document.getElementById("panelWrap");
|
| 414 |
-
const martingaleLevel=document.getElementById("martingaleLevel");
|
| 415 |
-
|
| 416 |
-
let martingale=1;
|
| 417 |
-
let lossCount=0;
|
| 418 |
-
|
| 419 |
-
function updateMartingale(isWin){
|
| 420 |
-
if(isWin){
|
| 421 |
-
martingale=1;
|
| 422 |
-
lossCount=0;
|
| 423 |
-
}else{
|
| 424 |
-
lossCount++;
|
| 425 |
-
martingale=Math.pow(3,lossCount);
|
| 426 |
-
}
|
| 427 |
-
martingaleLevel.innerText = (martingale * 100) + " ထိုးပါ";
|
| 428 |
-
}
|
| 429 |
-
|
| 430 |
-
function showResult(isWin){
|
| 431 |
-
const innerAlert=document.getElementById("innerAlert");
|
| 432 |
-
innerAlert.className="inner-alert "+(isWin?"win":"lose");
|
| 433 |
-
innerAlert.innerHTML=isWin?"YOU WIN<br><span style='font-size:0.9rem;'>(သင်နိုင်ပါသည်)</span>":"YOU LOSS<br><span style='font-size:0.9rem;'>(သင်ရှုံးပါသည်)</span>";
|
| 434 |
-
updateMartingale(isWin);
|
| 435 |
-
|
| 436 |
-
setTimeout(()=>{
|
| 437 |
-
innerAlert.className="inner-alert";
|
| 438 |
-
},3000);
|
| 439 |
-
}
|
| 440 |
-
|
| 441 |
-
const API="https://api.bigwinqaz.com/api/webapi/GetNoaverageEmerdList";
|
| 442 |
-
|
| 443 |
-
async function getData(){
|
| 444 |
-
try{
|
| 445 |
-
const res=await fetch(API,{
|
| 446 |
-
method:"POST",
|
| 447 |
-
headers:{"Content-Type":"application/json;charset=UTF-8"},
|
| 448 |
-
body:JSON.stringify({
|
| 449 |
-
pageSize:10,
|
| 450 |
-
pageNo:1,
|
| 451 |
-
typeId:30,
|
| 452 |
-
language:7,
|
| 453 |
-
random:"af4891107ce347699396d1f61b3f8780",
|
| 454 |
-
signature:"397E8F97C9D82D26A6D97A833666071A",
|
| 455 |
-
timestamp:Math.floor(Date.now()/1000)
|
| 456 |
-
})
|
| 457 |
-
});
|
| 458 |
-
const d=await res.json();
|
| 459 |
-
return d.data?.list||[];
|
| 460 |
-
}catch{return [];}
|
| 461 |
-
}
|
| 462 |
-
|
| 463 |
-
function predict(results){
|
| 464 |
-
if(!results.length) return "--";
|
| 465 |
-
return results[0];
|
| 466 |
-
}
|
| 467 |
-
|
| 468 |
-
function render(list){
|
| 469 |
-
if(!list.length) return;
|
| 470 |
-
|
| 471 |
-
const results=list.map(r=>Number(r.number)>=5?"BIG":"SMALL");
|
| 472 |
-
const pred=predict(results);
|
| 473 |
-
|
| 474 |
-
const prev=localStorage.getItem("pred");
|
| 475 |
-
if(prev && prev!=="SKIP"){
|
| 476 |
-
showResult(prev===results[0]);
|
| 477 |
-
}
|
| 478 |
-
localStorage.removeItem("pred");
|
| 479 |
-
|
| 480 |
-
localStorage.setItem("pred",pred);
|
| 481 |
-
|
| 482 |
-
const el=document.getElementById("mainPred");
|
| 483 |
-
|
| 484 |
-
if (lossCount === 0) {
|
| 485 |
-
el.innerText = pred + " ပြန်ထိုးပါ";
|
| 486 |
-
} else {
|
| 487 |
-
el.innerText = pred + " " + martingale + "ဆ ထိုးပေးပါ";
|
| 488 |
-
}
|
| 489 |
-
|
| 490 |
-
if(pred==="BIG") el.className="result-text big-res";
|
| 491 |
-
else if(pred==="SMALL") el.className="result-text small-res";
|
| 492 |
-
else el.className="result-text skip-res";
|
| 493 |
-
|
| 494 |
-
const tbody=document.getElementById("histBody");
|
| 495 |
-
tbody.innerHTML=list.slice(0,7).map(r=>{
|
| 496 |
-
const n=Number(r.number);
|
| 497 |
-
const bs=n>=5?"BIG":"SMALL";
|
| 498 |
-
const cls=n>=5?"bg-g":"bg-r";
|
| 499 |
-
return `<tr>
|
| 500 |
-
<td>${r.issueNumber}</td>
|
| 501 |
-
<td><div class="res-circle ${cls}">${n}</div></td>
|
| 502 |
-
<td class="${bs==="BIG"?"big-res":"small-res"}">${bs}</td>
|
| 503 |
-
</tr>`;
|
| 504 |
-
}).join("");
|
| 505 |
-
}
|
| 506 |
-
|
| 507 |
-
setInterval(()=>{
|
| 508 |
-
const t=30-(Math.floor(Date.now()/1000)%30);
|
| 509 |
-
document.getElementById("timer").innerText="00:"+(t<10?"0"+t:t);
|
| 510 |
-
if(t===30) getData().then(render);
|
| 511 |
-
},1000);
|
| 512 |
-
|
| 513 |
-
panelWrap.addEventListener('click', function(e) {
|
| 514 |
-
if (e.target === panelWrap) {
|
| 515 |
-
panelWrap.classList.remove('show');
|
| 516 |
-
}
|
| 517 |
-
});
|
| 518 |
-
</script>
|
| 519 |
-
|
| 520 |
</body>
|
| 521 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="my">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>Recap Maker - Secure Mode</title>
|
| 7 |
+
|
| 8 |
+
<style>
|
| 9 |
+
:root {
|
| 10 |
+
--bg-color: #0f172a; --card-bg: #1e293b; --text-main: #e2e8f0;
|
| 11 |
+
--text-muted: #94a3b8; --accent: #f43f5e; --border: #334155;
|
| 12 |
+
--danger: #ef4444; --success: #22c55e;
|
| 13 |
+
}
|
| 14 |
+
body { background-color: var(--bg-color); color: var(--text-main); font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; padding: 15px; overscroll-behavior: none; }
|
| 15 |
+
.container { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }
|
| 16 |
+
h2 { text-align: center; color: var(--accent); letter-spacing: 2px; margin-bottom: 5px; font-weight: 900; text-transform: uppercase; }
|
| 17 |
+
.user-badge { text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 20px; display: block; }
|
| 18 |
+
.card { background: var(--card-bg); border-radius: 16px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border); }
|
| 19 |
+
.card-title { font-size: 14px; font-weight: bold; color: var(--text-muted); margin-bottom: 10px; display: block; text-transform: uppercase; }
|
| 20 |
+
input[type="text"], textarea, select { width: 100%; padding: 14px; background: #020617; border: 1px solid var(--border); border-radius: 10px; color: white; font-size: 16px; outline: none; box-sizing: border-box; margin-bottom: 10px; }
|
| 21 |
+
.btn { width: 100%; padding: 16px; border: none; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; transition: 0.2s;}
|
| 22 |
+
.btn-primary { background: var(--accent); color: white; }
|
| 23 |
+
.btn-success { background: var(--success); color: #000; }
|
| 24 |
+
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-muted); }
|
| 25 |
+
.btn-outline.active { border-color: var(--accent); color: var(--accent); background: rgba(244, 63, 94, 0.1); }
|
| 26 |
+
|
| 27 |
+
.video-box { width: 100%; background: #000; border-radius: 12px; border: 2px dashed var(--border); position: relative; overflow: hidden; margin-top: 15px; min-height: 150px; display: flex; justify-content: center; align-items: center; }
|
| 28 |
+
video { width: 100%; height: auto; display: block; }
|
| 29 |
+
.placeholder-text { position: absolute; color: var(--text-muted); font-size: 14px; pointer-events: none; }
|
| 30 |
+
.drag-box { position: absolute; display: none; z-index: 50; touch-action: none; }
|
| 31 |
+
.resize-handle { width: 30px; height: 30px; background: white; position: absolute; bottom: -10px; right: -10px; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.5); z-index: 60;}
|
| 32 |
+
|
| 33 |
+
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
|
| 34 |
+
.checkbox-wrapper { display: flex; align-items: center; background: #020617; padding: 12px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
|
| 35 |
+
.checkbox-wrapper input { width: auto; margin-right: 10px; accent-color: var(--accent); }
|
| 36 |
+
.switch-group { display: flex; justify-content: space-between; align-items: center; background: #020617; padding: 15px; border-radius: 10px; border: 1px solid var(--accent); }
|
| 37 |
+
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
|
| 38 |
+
.switch input { opacity: 0; width: 0; height: 0; }
|
| 39 |
+
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 34px; }
|
| 40 |
+
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
|
| 41 |
+
input:checked + .slider { background-color: var(--accent); }
|
| 42 |
+
input:checked + .slider:before { transform: translateX(24px); }
|
| 43 |
+
#result-section { display: none; border-color: var(--success); }
|
| 44 |
+
#loader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); z-index: 9999; text-align: center; padding-top: 35vh; color: var(--accent); font-size: 1.2rem; }
|
| 45 |
+
</style>
|
| 46 |
+
|
| 47 |
+
<script>
|
| 48 |
+
function switchSource(type) {
|
| 49 |
+
document.getElementById('src-link').style.display = 'none'; document.getElementById('src-file').style.display = 'none';
|
| 50 |
+
document.getElementById('btnSrcLink').classList.remove('active'); document.getElementById('btnSrcFile').classList.remove('active');
|
| 51 |
+
if(type === 'link') { document.getElementById('src-link').style.display = 'block'; document.getElementById('btnSrcLink').classList.add('active'); }
|
| 52 |
+
else { document.getElementById('src-file').style.display = 'block'; document.getElementById('btnSrcFile').classList.add('active'); }
|
| 53 |
+
}
|
| 54 |
+
function loader(show, msg="Processing...") {
|
| 55 |
+
const el = document.getElementById('loader');
|
| 56 |
+
el.innerHTML = `<div>${msg}</div><div style="font-size:14px; color:#94a3b8; margin-top:10px;">(Do not close this page)</div>`;
|
| 57 |
+
el.style.display = show ? 'block' : 'none';
|
| 58 |
+
}
|
| 59 |
+
function statusMsg(text) { const el = document.getElementById('statusMsg'); el.innerText = text; el.style.display = text ? 'block' : 'none'; }
|
| 60 |
+
|
| 61 |
+
async function showResult(serverUrl) {
|
| 62 |
+
loader(true, "📥 Saving to Browser Memory...");
|
| 63 |
+
try {
|
| 64 |
+
const response = await fetch(serverUrl);
|
| 65 |
+
if (!response.ok) throw new Error("File transfer failed.");
|
| 66 |
+
const blob = await response.blob();
|
| 67 |
+
const objectUrl = URL.createObjectURL(blob);
|
| 68 |
+
const section = document.getElementById('result-section');
|
| 69 |
+
const player = document.getElementById('resultVideo');
|
| 70 |
+
const dlBtn = document.getElementById('downloadBtn');
|
| 71 |
+
player.src = objectUrl; dlBtn.href = objectUrl; dlBtn.download = "recap_" + new Date().getTime() + ".mp4";
|
| 72 |
+
section.style.display = 'block'; section.scrollIntoView({behavior: "smooth"});
|
| 73 |
+
statusMsg("✅ Video Ready!");
|
| 74 |
+
} catch (e) { alert("Error: " + e); } finally { loader(false); }
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
async function downloadVideo() {
|
| 78 |
+
const u = document.getElementById('videoUrl').value; if(!u) return alert("Enter URL");
|
| 79 |
+
statusMsg("Downloading Video..."); loader(true, "Downloading...");
|
| 80 |
+
try {
|
| 81 |
+
const res = await fetch('/download-video', {method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify({url:u})});
|
| 82 |
+
handleRes(await res.json());
|
| 83 |
+
} catch(e) { alert("Error: " + e); } loader(false);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
async function uploadVideoFile() {
|
| 87 |
+
const f = document.getElementById('videoFileInput').files[0]; if(!f) return alert("Select File");
|
| 88 |
+
const fd = new FormData(); fd.append('video_file', f);
|
| 89 |
+
statusMsg("Uploading..."); loader(true, "Uploading...");
|
| 90 |
+
try {
|
| 91 |
+
const res = await fetch('/upload-video', {method:'POST', body:fd});
|
| 92 |
+
handleRes(await res.json());
|
| 93 |
+
} catch(e) { alert("Error"); } loader(false);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
function handleRes(d) {
|
| 97 |
+
if(d.status === 'success') {
|
| 98 |
+
document.getElementById('videoFilename').value = d.filename;
|
| 99 |
+
document.querySelector('.placeholder-text').style.display = 'none';
|
| 100 |
+
const old = document.getElementById('mainVideo'); if(old) old.remove();
|
| 101 |
+
const v = document.createElement('video');
|
| 102 |
+
v.id = 'mainVideo'; v.src = d.path; v.controls = true; v.style.width = '100%';
|
| 103 |
+
document.getElementById('videoContainer').prepend(v);
|
| 104 |
+
|
| 105 |
+
v.onloadedmetadata = () => {
|
| 106 |
+
updateCoords('blurBox'); updateCoords('logoBox');
|
| 107 |
+
};
|
| 108 |
+
|
| 109 |
+
statusMsg("✅ Video Uploaded! Checking AI...");
|
| 110 |
+
if(!d.translated_text) reloadTranslation(); else document.querySelector('textarea[name="ai_text"]').value = d.translated_text;
|
| 111 |
+
} else { alert(d.message); }
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
async function reloadTranslation() {
|
| 115 |
+
const fname = document.getElementById('videoFilename').value;
|
| 116 |
+
if(!fname) return;
|
| 117 |
+
const btn = document.getElementById('btnReloadAI'); btn.innerHTML = "⏳ Fixing..."; btn.disabled = true;
|
| 118 |
+
document.querySelector('textarea[name="ai_text"]').value = "⏳ AI Analyzing...";
|
| 119 |
+
try {
|
| 120 |
+
const fd = new FormData(); fd.append('filename', fname);
|
| 121 |
+
const res = await fetch('/re-analyze', {method:'POST', body:fd});
|
| 122 |
+
const d = await res.json();
|
| 123 |
+
document.querySelector('textarea[name="ai_text"]').value = d.translated_text || d.message;
|
| 124 |
+
} catch(e) { alert("Connection Error"); }
|
| 125 |
+
btn.innerHTML = "↻ Retry AI"; btn.disabled = false;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
async function startProcessing() {
|
| 129 |
+
if(!document.getElementById('videoFilename').value) return alert("No Video!");
|
| 130 |
+
document.getElementById('result-section').style.display = 'none'; loader(true, "Joining Queue...");
|
| 131 |
+
const fd = new FormData(document.getElementById('processForm'));
|
| 132 |
+
try {
|
| 133 |
+
const res = await fetch('/process', {method:'POST', body:fd});
|
| 134 |
+
const d = await res.json();
|
| 135 |
+
if(d.status === 'queued') checkStatus(d.job_id); else { alert(d.message); loader(false); }
|
| 136 |
+
} catch(e) { alert("Error"); loader(false); }
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
function checkStatus(jobId) {
|
| 140 |
+
const interval = setInterval(async () => {
|
| 141 |
+
try {
|
| 142 |
+
const res = await fetch('/status/' + jobId);
|
| 143 |
+
const d = await res.json();
|
| 144 |
+
if(d.status === 'success') { clearInterval(interval); loader(false); showResult(d.url); }
|
| 145 |
+
else if(d.status === 'failed') { clearInterval(interval); loader(false); alert("Failed: " + d.message); }
|
| 146 |
+
} catch(e) {}
|
| 147 |
+
}, 3000);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
function toggleBox(id, show) {
|
| 151 |
+
const el = document.getElementById(id); if(el) { el.style.display = show ? 'block' : 'none'; if(show) updateCoords(id); }
|
| 152 |
+
}
|
| 153 |
+
function loadLogo(e) {
|
| 154 |
+
if(e.target.files[0]) {
|
| 155 |
+
const r = new FileReader();
|
| 156 |
+
r.onload = function(ev) { document.getElementById('previewLogo').src=ev.target.result; toggleBox('logoBox', true); };
|
| 157 |
+
r.readAsDataURL(e.target.files[0]);
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
function updateCoords(id) {
|
| 162 |
+
const v = document.getElementById('mainVideo');
|
| 163 |
+
const box = document.getElementById(id);
|
| 164 |
+
if(!v || !box || v.videoWidth === 0) return;
|
| 165 |
+
|
| 166 |
+
const vr = v.getBoundingClientRect();
|
| 167 |
+
const br = box.getBoundingClientRect();
|
| 168 |
+
|
| 169 |
+
const scaleX = v.videoWidth / vr.width;
|
| 170 |
+
const scaleY = v.videoHeight / vr.height;
|
| 171 |
+
|
| 172 |
+
const x = Math.round((br.left - vr.left) * scaleX);
|
| 173 |
+
const y = Math.round((br.top - vr.top) * scaleY);
|
| 174 |
+
const w = Math.round(br.width * scaleX);
|
| 175 |
+
const h = Math.round(br.height * scaleY);
|
| 176 |
+
|
| 177 |
+
if(id==='blurBox') {
|
| 178 |
+
document.getElementById('blur_x').value=x; document.getElementById('blur_y').value=y;
|
| 179 |
+
document.getElementById('blur_w').value=w; document.getElementById('blur_h').value=h;
|
| 180 |
+
} else {
|
| 181 |
+
document.getElementById('logo_x').value=x; document.getElementById('logo_y').value=y;
|
| 182 |
+
document.getElementById('logo_w').value=w; document.getElementById('logo_h').value=h;
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
function makeInteractive(id) {
|
| 187 |
+
const box = document.getElementById(id);
|
| 188 |
+
const handle = box.querySelector('.resize-handle');
|
| 189 |
+
if(!box || !handle) return;
|
| 190 |
+
let isDrag=false, isResize=false, startX, startY, sl, st, sw, sh;
|
| 191 |
+
const start = (e) => {
|
| 192 |
+
if(e.target === handle) return;
|
| 193 |
+
isDrag = true; const p = e.type.includes('mouse') ? e : e.touches[0];
|
| 194 |
+
startX = p.clientX; startY = p.clientY; sl = box.offsetLeft; st = box.offsetTop;
|
| 195 |
+
};
|
| 196 |
+
const resizeStart = (e) => {
|
| 197 |
+
e.stopPropagation(); isResize = true; const p = e.type.includes('mouse') ? e : e.touches[0];
|
| 198 |
+
startX = p.clientX; startY = p.clientY; sw = box.offsetWidth; sh = box.offsetHeight;
|
| 199 |
+
};
|
| 200 |
+
const move = (e) => {
|
| 201 |
+
const c = document.getElementById('videoContainer');
|
| 202 |
+
if(!isDrag && !isResize) return;
|
| 203 |
+
if(e.cancelable) e.preventDefault();
|
| 204 |
+
const p = e.type.includes('mouse') ? e : e.touches[0];
|
| 205 |
+
if(isDrag) {
|
| 206 |
+
let nl = sl + (p.clientX - startX); let nt = st + (p.clientY - startY);
|
| 207 |
+
nl = Math.max(0, Math.min(nl, c.clientWidth - box.offsetWidth));
|
| 208 |
+
nt = Math.max(0, Math.min(nt, c.clientHeight - box.offsetHeight));
|
| 209 |
+
box.style.left = nl + 'px'; box.style.top = nt + 'px'; updateCoords(id);
|
| 210 |
+
}
|
| 211 |
+
if(isResize) {
|
| 212 |
+
let nw = sw + (p.clientX - startX); let nh = sh + (p.clientY - startY);
|
| 213 |
+
nw = Math.max(30, nw); nh = Math.max(30, nh);
|
| 214 |
+
box.style.width = nw + 'px'; box.style.height = nh + 'px'; updateCoords(id);
|
| 215 |
+
}
|
| 216 |
+
};
|
| 217 |
+
const end = () => { isDrag = false; isResize = false; };
|
| 218 |
+
box.addEventListener('mousedown', start); box.addEventListener('touchstart', start, {passive: false});
|
| 219 |
+
handle.addEventListener('mousedown', resizeStart); handle.addEventListener('touchstart', resizeStart, {passive: false});
|
| 220 |
+
window.addEventListener('mousemove', move); window.addEventListener('touchmove', move, {passive: false});
|
| 221 |
+
window.addEventListener('mouseup', end); window.addEventListener('touchend', end);
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 225 |
+
makeInteractive('blurBox'); makeInteractive('logoBox');
|
| 226 |
+
window.addEventListener('resize', () => { updateCoords('blurBox'); updateCoords('logoBox'); });
|
| 227 |
+
});
|
| 228 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
</head>
|
|
|
|
| 230 |
<body>
|
| 231 |
+
<div id="loader">Processing...</div>
|
| 232 |
+
<div class="container">
|
| 233 |
+
<h2>Recap Maker</h2>
|
| 234 |
+
<span class="user-badge">User Session: {{ user_id }}</span>
|
| 235 |
+
|
| 236 |
+
<div id="result-section" class="card" style="border: 2px solid var(--success);">
|
| 237 |
+
<span class="card-title" style="color:var(--success);">✅ Result Video</span>
|
| 238 |
+
<div class="video-box" style="border-color:var(--success);">
|
| 239 |
+
<video id="resultVideo" controls style="width:100%; height:auto;"></video>
|
| 240 |
+
</div>
|
| 241 |
+
<br>
|
| 242 |
+
<a id="downloadBtn" href="#" download class="btn btn-success" style="color:white; font-weight:bold;">⬇️ Download Video</a>
|
| 243 |
+
</div>
|
| 244 |
|
| 245 |
+
<div id="view-editor">
|
| 246 |
+
<div class="card">
|
| 247 |
+
<span class="card-title">Video Source</span>
|
| 248 |
+
<div class="grid-2">
|
| 249 |
+
<button id="btnSrcLink" class="btn btn-outline active" onclick="switchSource('link')">🔗 URL Link</button>
|
| 250 |
+
<button id="btnSrcFile" class="btn btn-outline" onclick="switchSource('file')">📂 Upload File</button>
|
| 251 |
+
</div>
|
| 252 |
+
<div id="src-link" style="margin-top:15px;">
|
| 253 |
+
<input type="text" id="videoUrl" placeholder="https://youtube.com/...">
|
| 254 |
+
<button onclick="downloadVideo()" class="btn btn-primary">⬇️ Fetch Video</button>
|
| 255 |
+
</div>
|
| 256 |
+
<div id="src-file" style="margin-top:15px; display:none;">
|
| 257 |
+
<input type="file" id="videoFileInput" style="margin-bottom:10px;">
|
| 258 |
+
<button onclick="uploadVideoFile()" class="btn btn-primary">⬆️ Upload Video</button>
|
| 259 |
+
</div>
|
| 260 |
+
<p id="statusMsg" style="text-align:center; color:var(--accent); margin-top:10px; display:none;"></p>
|
| 261 |
+
<div class="video-box" id="videoContainer">
|
| 262 |
+
<span class="placeholder-text">Video Preview Area</span>
|
| 263 |
+
<div id="blurBox" class="drag-box" style="width:100px; height:50px; background:rgba(239, 68, 68, 0.4); border:2px solid var(--danger);"><div class="resize-handle"></div></div>
|
| 264 |
+
<div id="logoBox" class="drag-box" style="width:80px; height:80px; border:2px dashed var(--success);"><img id="previewLogo" style="width:100%; height:100%; object-fit:contain; pointer-events:none;"><div class="resize-handle"></div></div>
|
| 265 |
+
</div>
|
| 266 |
+
</div>
|
| 267 |
+
|
| 268 |
+
<form id="processForm">
|
| 269 |
+
<input type="hidden" name="video_filename" id="videoFilename">
|
| 270 |
+
<input type="hidden" name="blur_x" id="blur_x" value="0"><input type="hidden" name="blur_y" id="blur_y" value="0">
|
| 271 |
+
<input type="hidden" name="blur_w" id="blur_w" value="0"><input type="hidden" name="blur_h" id="blur_h" value="0">
|
| 272 |
+
<input type="hidden" name="logo_x" id="logo_x" value="0"><input type="hidden" name="logo_y" id="logo_y" value="0">
|
| 273 |
+
<input type="hidden" name="logo_w" id="logo_w" value="100"><input type="hidden" name="logo_h" id="logo_h" value="100">
|
| 274 |
+
|
| 275 |
+
<div class="card">
|
| 276 |
+
<span class="card-title">🛡️ Copyright Bypass Tools</span>
|
| 277 |
+
<div class="grid-2">
|
| 278 |
+
<label class="checkbox-wrapper"><input type="checkbox" name="bypass_flip"> Flip</label>
|
| 279 |
+
<label class="checkbox-wrapper"><input type="checkbox" name="bypass_zoom"> Zoom</label>
|
| 280 |
+
<label class="checkbox-wrapper"><input type="checkbox" name="bypass_speed"> Speed</label>
|
| 281 |
+
<label class="checkbox-wrapper"><input type="checkbox" name="bypass_color"> Color</label>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<div class="switch-group">
|
| 286 |
+
<div style="display:flex; align-items:center; gap:10px;">
|
| 287 |
+
<span style="font-size:20px;">💰</span>
|
| 288 |
+
<div><strong style="color:white;">Monezlation Mode</strong><small style="color:var(--text-muted); display:block;">Sync & Loop (1:10 min)</small></div>
|
| 289 |
+
</div>
|
| 290 |
+
<label class="switch"><input type="checkbox" name="monezlation"><span class="slider"></span></label>
|
| 291 |
+
</div>
|
| 292 |
+
<br>
|
| 293 |
+
<div class="card">
|
| 294 |
+
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;">
|
| 295 |
+
<span class="card-title" style="margin:0;">AI Dubbing</span>
|
| 296 |
+
<button type="button" id="btnReloadAI" onclick="reloadTranslation()" class="btn btn-outline" style="padding:6px 12px; font-size:12px; width:auto;">↻ Retry AI</button>
|
| 297 |
+
</div>
|
| 298 |
+
<textarea name="ai_text" rows="4" placeholder="Translated Burmese script..."></textarea>
|
| 299 |
+
<select name="voice_gender"><option value="male">Male Voice</option><option value="female">Female Voice</option></select>
|
| 300 |
+
</div>
|
| 301 |
+
<div class="card">
|
| 302 |
+
<span class="card-title">Overlays</span>
|
| 303 |
+
<div style="position:relative; margin-bottom:10px;">
|
| 304 |
+
<label style="color:var(--text-muted); font-size:12px; display:block;">Text Watermark</label>
|
| 305 |
+
<input type="text" name="text_watermark" value="Shine Movie Recap" readonly style="color:var(--accent); background:#1e293b; font-weight:bold;">
|
| 306 |
+
<span style="position:absolute; right:15px; top:35px; font-size:12px; color:var(--accent);">🔒 LOCKED</span>
|
| 307 |
+
</div>
|
| 308 |
+
<label class="checkbox-wrapper" style="margin-bottom:10px;"><input type="checkbox" onclick="toggleBox('blurBox', this.checked)" name="blur_enabled"> Enable Blur Mask (Red Box)</label>
|
| 309 |
+
<label style="color:var(--text-muted); font-size:14px;">Logo Overlay:</label>
|
| 310 |
+
<input type="file" name="logo_file" accept="image/*" onchange="loadLogo(event)">
|
| 311 |
+
</div>
|
| 312 |
+
<button type="button" onclick="startProcessing()" class="btn btn-primary">🚀 START PROCESSING</button>
|
| 313 |
+
</form>
|
| 314 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
</body>
|
| 317 |
+
</html>
|