(function () { if (window.__linkkfListInitialized === true) { return; } window.__linkkfListInitialized = true; let currentData = null; const escapeHtml = (value) => String(value ?? "") .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); function getFormData() { return $("#form_search").serialize(); } function normalizeObject(value) { if (value && typeof value === "object") { return value; } if (typeof value === "string" && value.trim() !== "") { try { return JSON.parse(value); } catch (e) { return {}; } } return {}; } function openJsonModal(item) { $("#modal_title").text("JSON"); $("#modal_body").html(`
${escapeHtml(JSON.stringify(item, null, 2))}`);
$("#large_modal").modal("show");
}
function makeActionButton(id, label, attrs = {}, klass = "btn btn-sm btn-primary mr-1 mb-1") {
const extra = Object.entries(attrs)
.map(([key, value]) => ` data-${key}="${escapeHtml(value)}"`)
.join("");
return ``;
}
function getStatusLabel(item) {
if (item.status === "completed") {
return "완료";
}
if (item.status === "error") {
return "실패";
}
if (item.status === "canceled") {
return "취소";
}
if (item.status === "downloading") {
return "진행중";
}
return "대기";
}
function renderPagination(paging) {
if (!paging) {
$("#page1").html("");
$("#page2").html("");
return;
}
let html = `