@farisabid/foliokit 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +151 -2
- package/bin/foliokit.js +476 -0
- package/package.json +46 -4
- package/public/css/main.css +915 -0
- package/public/css/tokens.css +29 -0
- package/public/favicon.svg +17 -0
- package/public/index.html +747 -0
- package/public/js/core/pdf-engine.js +69 -0
- package/public/js/core/state.js +365 -0
- package/public/js/tools/dev-tools.js +1508 -0
- package/public/js/tools/edit-pdf.js +1618 -0
- package/public/js/tools/office-tools.js +221 -0
- package/public/js/tools/pdf-ops.js +949 -0
- package/public/js/tools/sign-pdf.js +198 -0
- package/public/manifest.json +26 -0
- package/public/sw.js +88 -0
- package/public/vendor/fonts/inter-1.woff2 +0 -0
- package/public/vendor/fonts/inter-2.woff2 +0 -0
- package/public/vendor/fonts/inter-3.woff2 +0 -0
- package/public/vendor/fonts/inter-4.woff2 +0 -0
- package/public/vendor/fonts/inter-5.woff2 +0 -0
- package/public/vendor/fonts/inter-6.woff2 +0 -0
- package/public/vendor/fonts/inter-7.woff2 +0 -0
- package/public/vendor/fonts/inter.css +316 -0
- package/public/vendor/fonts/jbmono-1.woff2 +0 -0
- package/public/vendor/fonts/jbmono-2.woff2 +0 -0
- package/public/vendor/fonts/jbmono-3.woff2 +0 -0
- package/public/vendor/fonts/jbmono-4.woff2 +0 -0
- package/public/vendor/fonts/jbmono-5.woff2 +0 -0
- package/public/vendor/fonts/jbmono-6.woff2 +0 -0
- package/public/vendor/fonts/jbmono.css +109 -0
- package/public/vendor/jszip.min.js +13 -0
- package/public/vendor/pdf-lib.min.js +16 -0
- package/public/vendor/pdf.min.js +22 -0
- package/public/vendor/pdf.worker.min.js +22 -0
- package/public/vendor/qrcode.min.js +1 -0
- package/server.js +125 -0
- package/start.bat +19 -0
- package/start.sh +12 -0
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="id">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Foliokit — Local Document & Developer Toolkit</title>
|
|
7
|
+
<meta name="theme-color" content="#0F172A">
|
|
8
|
+
<meta name="description" content="Foliokit — 30 alat PDF, administrasi & developer 100% client-side, zero upload. Local-first document toolkit.">
|
|
9
|
+
<link rel="icon" href="./favicon.svg" type="image/svg+xml">
|
|
10
|
+
<link rel="apple-touch-icon" href="./favicon.svg">
|
|
11
|
+
<link rel="manifest" href="./manifest.json">
|
|
12
|
+
<!-- Font lokal (100% offline, tanpa CDN) -->
|
|
13
|
+
<link rel="stylesheet" href="./vendor/fonts/inter.css">
|
|
14
|
+
<link rel="stylesheet" href="./vendor/fonts/jbmono.css">
|
|
15
|
+
<!-- Gaya modular (zero-build): token lalu komponen -->
|
|
16
|
+
<link rel="stylesheet" href="./css/tokens.css">
|
|
17
|
+
<link rel="stylesheet" href="./css/main.css">
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
|
|
21
|
+
<!-- ===== HEADER ===== -->
|
|
22
|
+
<header class="app-header">
|
|
23
|
+
<div class="container header-inner">
|
|
24
|
+
<a class="brand" onclick="switchView('dashboard')">
|
|
25
|
+
<div class="brand-mark">
|
|
26
|
+
<svg viewBox="0 0 64 64" fill="none" role="img" aria-label="Foliokit">
|
|
27
|
+
<defs>
|
|
28
|
+
<linearGradient id="fk-a-bg" x1="6" y1="4" x2="58" y2="60" gradientUnits="userSpaceOnUse">
|
|
29
|
+
<stop offset="0%" stop-color="#18181B"/>
|
|
30
|
+
<stop offset="100%" stop-color="#09090B"/>
|
|
31
|
+
</linearGradient>
|
|
32
|
+
<linearGradient id="fk-a-accent" x1="18" y1="16" x2="48" y2="34" gradientUnits="userSpaceOnUse">
|
|
33
|
+
<stop offset="0%" stop-color="#F43F5E"/>
|
|
34
|
+
<stop offset="100%" stop-color="#6366F1"/>
|
|
35
|
+
</linearGradient>
|
|
36
|
+
</defs>
|
|
37
|
+
<rect width="64" height="64" rx="16" fill="url(#fk-a-bg)"/>
|
|
38
|
+
<rect x="0.75" y="0.75" width="62.5" height="62.5" rx="15.25" stroke="#FFFFFF" stroke-opacity="0.12" stroke-width="1.5"/>
|
|
39
|
+
<path d="M18 16H41L47 22V25H18V16Z" fill="url(#fk-a-accent)"/>
|
|
40
|
+
<path d="M18 28H39V36H27V48H18V28Z" fill="#FFFFFF"/>
|
|
41
|
+
<rect x="35" y="40" width="11" height="8" rx="2.5" fill="#FFFFFF" fill-opacity="0.22"/>
|
|
42
|
+
</svg>
|
|
43
|
+
</div>
|
|
44
|
+
<span class="brand-name">Foliokit</span>
|
|
45
|
+
<span class="brand-divider"></span>
|
|
46
|
+
<span class="status-pill"><span class="status-dot"></span>100% Client-Side • Zero Upload</span>
|
|
47
|
+
</a>
|
|
48
|
+
<div class="header-actions">
|
|
49
|
+
<div class="search-wrap">
|
|
50
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
51
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
|
|
52
|
+
</svg>
|
|
53
|
+
<input type="text" class="header-search" id="global-search" placeholder="Cari alat..." oninput="handleSearch(this.value)">
|
|
54
|
+
<span class="kbd">⌘K</span>
|
|
55
|
+
</div>
|
|
56
|
+
<button class="btn-cta" onclick="openTool('edit-pdf')">
|
|
57
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4"/></svg>
|
|
58
|
+
Edit PDF
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</header>
|
|
63
|
+
|
|
64
|
+
<!-- ===== DASHBOARD ===== -->
|
|
65
|
+
<div id="view-dashboard" class="workspace active">
|
|
66
|
+
<div class="dash">
|
|
67
|
+
<div class="hero-card">
|
|
68
|
+
<div class="hero-card-copy">
|
|
69
|
+
<span class="hero-eyebrow">Ruang Kerja Lokal</span>
|
|
70
|
+
<h1 class="hero-title">Ruang kerja dokumen lokal.</h1>
|
|
71
|
+
<p class="hero-sub">Olah berkas PDF, tanda tangan, dan administrasi kantor tanpa mengunggah data ke internet.</p>
|
|
72
|
+
<div class="trust-pills">
|
|
73
|
+
<span class="trust-pill"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.4"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>Tanpa Upload Cloud</span>
|
|
74
|
+
<span class="trust-pill"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.4"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>Tanpa Batas Kuota</span>
|
|
75
|
+
<span class="trust-pill"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.4"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg>Bisa Jalan Tanpa Internet</span>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="hero-dropzone" id="main-dropzone"
|
|
79
|
+
ondragover="event.preventDefault(); this.classList.add('drag-over')"
|
|
80
|
+
ondragleave="this.classList.remove('drag-over')"
|
|
81
|
+
ondrop="handleDrop(event)"
|
|
82
|
+
onclick="document.getElementById('quick-file').click()">
|
|
83
|
+
<div class="dropzone-glyph">
|
|
84
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.75">
|
|
85
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/>
|
|
86
|
+
</svg>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="dropzone-text">Tarik berkas ke sini<span>atau klik untuk memilih dari komputer</span></div>
|
|
89
|
+
<div class="format-chips"><span>PDF</span><span>JPG / PNG</span><span>TXT / DOC</span></div>
|
|
90
|
+
<input type="file" id="quick-file" class="hidden" onchange="handleQuickFile(this.files[0])">
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div class="filter-bar" id="filter-bar"></div>
|
|
95
|
+
|
|
96
|
+
<div class="section" data-section="pdf">
|
|
97
|
+
<div class="section-head">
|
|
98
|
+
<span class="section-title">PDF Operations</span>
|
|
99
|
+
<span class="section-count" id="count-pdf">13 Tools</span>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="tool-grid" id="grid-pdf"></div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="section" data-section="office">
|
|
105
|
+
<div class="section-head">
|
|
106
|
+
<span class="section-title">Office & Administration</span>
|
|
107
|
+
<span class="section-count" id="count-office">6 Tools</span>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="tool-grid" id="grid-office"></div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div class="section" data-section="dev">
|
|
113
|
+
<div class="section-head">
|
|
114
|
+
<span class="section-title">Developer Tools</span>
|
|
115
|
+
<span class="section-count" id="count-dev">11 Tools</span>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="dev-privacy-banner">
|
|
118
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.9"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3l7 3v5.5c0 4.5-3 8-7 9.5-4-1.5-7-5-7-9.5V6l7-3z"/><path stroke-linecap="round" stroke-linejoin="round" d="M9.5 12l1.7 1.8L15 10"/></svg>
|
|
119
|
+
Aman untuk Bearer Token, API Secret, Payload Produksi, & Query SQL — 100% di memori browser.
|
|
120
|
+
</div>
|
|
121
|
+
<div class="tool-grid" id="grid-dev"></div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="dash-footer">
|
|
125
|
+
<p>Semua pemrosesan dilakukan di komputer Anda. Tidak ada data yang dikirim ke internet.</p>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<!-- ===== WORKSPACE: SIGN PDF (Figma artboard 02) ===== -->
|
|
131
|
+
<div id="view-sign" class="workspace">
|
|
132
|
+
<div class="ws-subheader">
|
|
133
|
+
<div class="breadcrumb">
|
|
134
|
+
<button onclick="switchView('dashboard')">
|
|
135
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
136
|
+
Beranda
|
|
137
|
+
</button>
|
|
138
|
+
<span class="sep">/</span>
|
|
139
|
+
<span class="crumb-title">Tanda Tangan Dokumen</span>
|
|
140
|
+
<span class="crumb-file" id="sign-file-name">Kontrak_Kemitraan_2026.pdf</span>
|
|
141
|
+
</div>
|
|
142
|
+
<button class="btn-primary" onclick="signDownload()">
|
|
143
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/></svg>
|
|
144
|
+
Simpan & Unduh
|
|
145
|
+
</button>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="studio-body">
|
|
148
|
+
<div class="studio">
|
|
149
|
+
<div class="page-nav">
|
|
150
|
+
<button onclick="signPrevPage()">←</button>
|
|
151
|
+
<span class="font-mono" id="sign-page-label">Hal 1 / 1</span>
|
|
152
|
+
<button onclick="signNextPage()">→</button>
|
|
153
|
+
<span class="divider"></span>
|
|
154
|
+
<span class="font-mono">100%</span>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="studio-stage">
|
|
157
|
+
<div class="studio-paper" id="sign-paper">
|
|
158
|
+
<div class="studio-empty" id="sign-empty">
|
|
159
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.4"><path stroke-linecap="round" stroke-linejoin="round" d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
|
|
160
|
+
<div class="t">Belum ada dokumen</div>
|
|
161
|
+
<div class="s">Pilih berkas PDF untuk mulai menandatangani</div>
|
|
162
|
+
</div>
|
|
163
|
+
<canvas id="sign-preview" class="hidden"></canvas>
|
|
164
|
+
<div id="sign-stamp-layer" class="hidden" style="position:absolute;inset:0;pointer-events:none;"></div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<span class="studio-caption" id="sign-caption">A4 Portrait • 210 × 297 mm</span>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="inspector">
|
|
170
|
+
<div class="inspector-top">
|
|
171
|
+
<div>
|
|
172
|
+
<div class="inspector-label" style="margin-bottom:8px;">Berkas Dokumen</div>
|
|
173
|
+
<label class="btn-outline" style="width:100%;cursor:pointer;">
|
|
174
|
+
Pilih Berkas PDF
|
|
175
|
+
<input type="file" accept="application/pdf" class="hidden" id="sign-file-input" onchange="loadSignFile(this.files[0])">
|
|
176
|
+
</label>
|
|
177
|
+
</div>
|
|
178
|
+
<div>
|
|
179
|
+
<div class="inspector-label" style="margin-bottom:8px;">Sumber Tanda Tangan</div>
|
|
180
|
+
<div class="segmented">
|
|
181
|
+
<button class="active" id="sign-src-draw" onclick="setSignSource('draw')">Gambar Langsung</button>
|
|
182
|
+
<button id="sign-src-upload" onclick="setSignSource('upload')">Unggah File</button>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div id="sign-pane-draw">
|
|
186
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
|
|
187
|
+
<span class="inspector-label">Kanvas Tanda Tangan</span>
|
|
188
|
+
<button class="btn-ghost" onclick="clearSignPad()">Bersihkan</button>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="draw-box">
|
|
191
|
+
<canvas id="sign-draw-canvas" width="320" height="150"></canvas>
|
|
192
|
+
</div>
|
|
193
|
+
<div style="margin-top:14px;">
|
|
194
|
+
<span class="inspector-label">Warna Tinta</span>
|
|
195
|
+
<div class="ink-dots" style="margin-top:8px;">
|
|
196
|
+
<button class="ink-dot active" style="background:#18181B" onclick="setSignInk('#18181B',this)"></button>
|
|
197
|
+
<button class="ink-dot" style="background:#1E3A8A" onclick="setSignInk('#1E3A8A',this)"></button>
|
|
198
|
+
<button class="ink-dot" style="background:#71717A" onclick="setSignInk('#71717A',this)"></button>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
<div id="sign-pane-upload" class="hidden">
|
|
203
|
+
<div class="inspector-label" style="margin-bottom:8px;">Unggah Gambar Tanda Tangan</div>
|
|
204
|
+
<label class="btn-outline" style="width:100%;cursor:pointer;">
|
|
205
|
+
Pilih Gambar PNG
|
|
206
|
+
<input type="file" accept="image/png,image/jpeg" class="hidden" id="sign-upload-input" onchange="loadSignStamp(this.files[0])">
|
|
207
|
+
</label>
|
|
208
|
+
<div class="form-hint">Gunakan PNG transparan agar hasil lebih bersih.</div>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
<button class="btn-outline" style="width:100%;" onclick="stampSignatureToDoc()">Tempelkan ke Halaman <span id="sign-stamp-page">1</span></button>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<!-- ===== WORKSPACE: RECEIPT (Figma artboard 03) ===== -->
|
|
217
|
+
<div id="view-receipt" class="workspace">
|
|
218
|
+
<div class="ws-subheader">
|
|
219
|
+
<div class="breadcrumb">
|
|
220
|
+
<button onclick="switchView('dashboard')">
|
|
221
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
222
|
+
Beranda
|
|
223
|
+
</button>
|
|
224
|
+
<span class="sep">/</span>
|
|
225
|
+
<span class="crumb-title">Generator Kwitansi</span>
|
|
226
|
+
</div>
|
|
227
|
+
<button class="btn-primary" onclick="window.print()">
|
|
228
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"/></svg>
|
|
229
|
+
Cetak / Simpan PDF
|
|
230
|
+
</button>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="receipt-body">
|
|
233
|
+
<div class="receipt-form">
|
|
234
|
+
<div class="form-group">
|
|
235
|
+
<label class="form-label">Nomor Kwitansi</label>
|
|
236
|
+
<input type="text" class="form-input mono" id="rec-in-no" value="KW/2026/XI/089" oninput="renderReceipt()">
|
|
237
|
+
</div>
|
|
238
|
+
<div class="form-group">
|
|
239
|
+
<label class="form-label">Telah Diterima Dari</label>
|
|
240
|
+
<input type="text" class="form-input" id="rec-in-from" value="PT Nusantara Artha Sejahtera" oninput="renderReceipt()">
|
|
241
|
+
</div>
|
|
242
|
+
<div class="form-group">
|
|
243
|
+
<label class="form-label">Jumlah Nominal (Rp)</label>
|
|
244
|
+
<input type="number" class="form-input mono" id="rec-in-amount" value="8750000" oninput="renderReceipt()">
|
|
245
|
+
</div>
|
|
246
|
+
<div class="form-group">
|
|
247
|
+
<label class="form-label">Uang Sejumlah (terbilang otomatis)</label>
|
|
248
|
+
<div class="panel-note" id="rec-in-words">—</div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="form-group">
|
|
251
|
+
<label class="form-label">Untuk Pembayaran</label>
|
|
252
|
+
<textarea class="form-input" id="rec-in-desc" rows="2" oninput="renderReceipt()">Pengadaan perangkat operasional ruang kerja kuartal IV</textarea>
|
|
253
|
+
</div>
|
|
254
|
+
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;">
|
|
255
|
+
<div class="form-group">
|
|
256
|
+
<label class="form-label">Kota</label>
|
|
257
|
+
<input type="text" class="form-input" id="rec-in-city" value="Jakarta" oninput="renderReceipt()">
|
|
258
|
+
</div>
|
|
259
|
+
<div class="form-group">
|
|
260
|
+
<label class="form-label">Jabatan Penerima</label>
|
|
261
|
+
<input type="text" class="form-input" id="rec-in-signer" value="Bagian Keuangan" oninput="renderReceipt()">
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="receipt-preview-area">
|
|
266
|
+
<div class="receipt-paper">
|
|
267
|
+
<div class="receipt-head">
|
|
268
|
+
<div>
|
|
269
|
+
<h2>Kwitansi Pembayaran</h2>
|
|
270
|
+
<div class="no">No. <span id="rec-out-no">KW/2026/XI/089</span></div>
|
|
271
|
+
</div>
|
|
272
|
+
<span class="receipt-badge">Lunas</span>
|
|
273
|
+
</div>
|
|
274
|
+
<div>
|
|
275
|
+
<div class="receipt-row">
|
|
276
|
+
<span class="k">Telah diterima dari</span>
|
|
277
|
+
<span class="v" id="rec-out-from">PT Nusantara Artha Sejahtera</span>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="receipt-row">
|
|
280
|
+
<span class="k">Uang sejumlah</span>
|
|
281
|
+
<span class="v italic" id="rec-out-words">Delapan Juta Tujuh Ratus Lima Puluh Ribu Rupiah</span>
|
|
282
|
+
</div>
|
|
283
|
+
<div class="receipt-row">
|
|
284
|
+
<span class="k">Untuk pembayaran</span>
|
|
285
|
+
<span class="v" id="rec-out-desc">Pengadaan perangkat operasional ruang kerja kuartal IV</span>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
<div class="receipt-foot">
|
|
289
|
+
<div class="receipt-amount"><span id="rec-out-amount">Rp 8.750.000,-</span></div>
|
|
290
|
+
<div class="receipt-sign">
|
|
291
|
+
<div class="date" id="rec-out-city-date">Jakarta, 28 November 2026</div>
|
|
292
|
+
<div class="who" id="rec-out-signer">Bagian Keuangan</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
<!-- ===== WORKSPACE: SHARED PDF TOOL ===== -->
|
|
301
|
+
<div id="view-pdf" class="workspace">
|
|
302
|
+
<div class="ws-subheader">
|
|
303
|
+
<div class="breadcrumb">
|
|
304
|
+
<button onclick="switchView('dashboard')">
|
|
305
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
306
|
+
Beranda
|
|
307
|
+
</button>
|
|
308
|
+
<span class="sep">/</span>
|
|
309
|
+
<span class="crumb-title" id="pdf-title">Alat PDF</span>
|
|
310
|
+
<span class="crumb-file" id="pdf-file-name"></span>
|
|
311
|
+
</div>
|
|
312
|
+
<button class="btn-primary" id="pdf-action-btn">Proses</button>
|
|
313
|
+
</div>
|
|
314
|
+
<div class="studio-body">
|
|
315
|
+
<div class="studio" id="pdf-studio">
|
|
316
|
+
<div class="page-nav">
|
|
317
|
+
<button onclick="pdfPrevPage()">←</button>
|
|
318
|
+
<span class="font-mono" id="pdf-page-label">Hal 1 / 1</span>
|
|
319
|
+
<button onclick="pdfNextPage()">→</button>
|
|
320
|
+
<span class="divider"></span>
|
|
321
|
+
<span class="font-mono">100%</span>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="studio-stage">
|
|
324
|
+
<div class="studio-paper" id="pdf-paper">
|
|
325
|
+
<div class="studio-empty" id="pdf-empty">
|
|
326
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.4"><path stroke-linecap="round" stroke-linejoin="round" d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
|
|
327
|
+
<div class="t">Belum ada dokumen</div>
|
|
328
|
+
<div class="s">Pilih berkas untuk mulai</div>
|
|
329
|
+
</div>
|
|
330
|
+
<canvas id="pdf-preview" class="hidden"></canvas>
|
|
331
|
+
<div id="pdf-extra" class="hidden" style="width:100%;"></div>
|
|
332
|
+
</div>
|
|
333
|
+
</div>
|
|
334
|
+
<span class="studio-caption" id="pdf-caption">A4 Portrait • 210 × 297 mm</span>
|
|
335
|
+
</div>
|
|
336
|
+
<div class="inspector" id="pdf-inspector"></div>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
<!-- ===== WORKSPACE: QR CODE ===== -->
|
|
341
|
+
<div id="view-qr" class="workspace">
|
|
342
|
+
<div class="ws-subheader">
|
|
343
|
+
<div class="breadcrumb">
|
|
344
|
+
<button onclick="switchView('dashboard')">
|
|
345
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
346
|
+
Beranda
|
|
347
|
+
</button>
|
|
348
|
+
<span class="sep">/</span>
|
|
349
|
+
<span class="crumb-title">QR Code Studio</span>
|
|
350
|
+
</div>
|
|
351
|
+
<button class="btn-primary" onclick="downloadQr()">Unduh PNG</button>
|
|
352
|
+
</div>
|
|
353
|
+
<div class="ws-panel-wrap">
|
|
354
|
+
<div class="ws-grid-2">
|
|
355
|
+
<div class="panel">
|
|
356
|
+
<div class="form-group">
|
|
357
|
+
<label class="form-label">Tipe QR</label>
|
|
358
|
+
<div class="radio-row">
|
|
359
|
+
<label><input type="radio" name="qr-type" value="link" checked onchange="toggleQrFields()"> Tautan</label>
|
|
360
|
+
<label><input type="radio" name="qr-type" value="wa" onchange="toggleQrFields()"> WhatsApp</label>
|
|
361
|
+
<label><input type="radio" name="qr-type" value="wifi" onchange="toggleQrFields()"> Wi-Fi</label>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
<div id="qr-fields-link">
|
|
365
|
+
<div class="form-group">
|
|
366
|
+
<label class="form-label">URL / Tautan</label>
|
|
367
|
+
<input type="text" class="form-input mono" id="qr-input-link" value="https://drive.google.com/drive/folders/berkas-2026" oninput="generateQrCode()">
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
<div id="qr-fields-wa" class="hidden">
|
|
371
|
+
<div class="form-group">
|
|
372
|
+
<label class="form-label">Nomor WhatsApp</label>
|
|
373
|
+
<input type="text" class="form-input mono" id="qr-wa-phone" placeholder="6281234567890" oninput="generateQrCode()">
|
|
374
|
+
</div>
|
|
375
|
+
<div class="form-group">
|
|
376
|
+
<label class="form-label">Template Pesan</label>
|
|
377
|
+
<input type="text" class="form-input" id="qr-wa-msg" value="Halo, saya ingin bertanya." oninput="generateQrCode()">
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
<div id="qr-fields-wifi" class="hidden">
|
|
381
|
+
<div class="form-group">
|
|
382
|
+
<label class="form-label">Nama Jaringan (SSID)</label>
|
|
383
|
+
<input type="text" class="form-input" id="qr-wifi-ssid" value="Office-WiFi" oninput="generateQrCode()">
|
|
384
|
+
</div>
|
|
385
|
+
<div class="form-group">
|
|
386
|
+
<label class="form-label">Kata Sandi</label>
|
|
387
|
+
<input type="text" class="form-input mono" id="qr-wifi-pass" placeholder="Kata sandi Wi-Fi" oninput="generateQrCode()">
|
|
388
|
+
</div>
|
|
389
|
+
<div class="form-group">
|
|
390
|
+
<label class="form-label">Enkripsi</label>
|
|
391
|
+
<select class="form-input" id="qr-wifi-auth" onchange="generateQrCode()">
|
|
392
|
+
<option value="WPA">WPA / WPA2</option>
|
|
393
|
+
<option value="WEP">WEP</option>
|
|
394
|
+
<option value="nopass">Tanpa Kata Sandi</option>
|
|
395
|
+
</select>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
<button class="btn-outline" style="width:100%;" onclick="generateQrCode()">Perbarui QR</button>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="panel" style="display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--canvas);min-height:340px;">
|
|
401
|
+
<div id="qr-result-box" style="padding:16px;background:#fff;border:1px solid var(--border-2);border-radius:12px;"></div>
|
|
402
|
+
<div id="qr-text-preview" class="font-mono" style="font-size:10px;color:var(--muted);margin-top:12px;max-width:260px;text-align:center;word-break:break-all;"></div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
<!-- ===== WORKSPACE: DIFF CHECKER ===== -->
|
|
409
|
+
<div id="view-diff" class="workspace">
|
|
410
|
+
<div class="ws-subheader">
|
|
411
|
+
<div class="breadcrumb">
|
|
412
|
+
<button onclick="switchView('dashboard')">
|
|
413
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
414
|
+
Beranda
|
|
415
|
+
</button>
|
|
416
|
+
<span class="sep">/</span>
|
|
417
|
+
<span class="crumb-title">Pembanding Naskah</span>
|
|
418
|
+
</div>
|
|
419
|
+
<button class="btn-primary" onclick="compareTexts()">Bandingkan</button>
|
|
420
|
+
</div>
|
|
421
|
+
<div class="ws-panel-wrap">
|
|
422
|
+
<div class="ws-grid-2">
|
|
423
|
+
<div class="panel">
|
|
424
|
+
<div class="form-group" style="margin:0;">
|
|
425
|
+
<label class="form-label">Draf Awal</label>
|
|
426
|
+
<textarea class="form-input mono" id="diff-text-1" rows="8" style="font-size:12px;">Pihak Pertama wajib membayar uang kompensasi sebesar Rp 10.000.000 paling lambat tanggal 5 setiap bulan.</textarea>
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
<div class="panel">
|
|
430
|
+
<div class="form-group" style="margin:0;">
|
|
431
|
+
<label class="form-label">Draf Revisi</label>
|
|
432
|
+
<textarea class="form-input mono" id="diff-text-2" rows="8" style="font-size:12px;">Pihak Pertama wajib mentransfer uang kompensasi sebesar Rp 12.500.000 paling lambat tanggal 10 setiap bulan kerja.</textarea>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
<div class="panel" style="margin-top:16px;">
|
|
437
|
+
<div class="inspector-label" style="margin-bottom:12px;">Hasil Analisis</div>
|
|
438
|
+
<div id="diff-result-box" style="padding:16px;border-radius:10px;background:var(--canvas);border:1px solid var(--border);font-size:13px;line-height:1.9;">
|
|
439
|
+
<span style="color:var(--muted);">Klik "Bandingkan" untuk melihat perbedaan.</span>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
</div>
|
|
444
|
+
|
|
445
|
+
<!-- ===== WORKSPACE: SIGNATURE STUDIO ===== -->
|
|
446
|
+
<div id="view-sig-studio" class="workspace">
|
|
447
|
+
<div class="ws-subheader">
|
|
448
|
+
<div class="breadcrumb">
|
|
449
|
+
<button onclick="switchView('dashboard')">
|
|
450
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
451
|
+
Beranda
|
|
452
|
+
</button>
|
|
453
|
+
<span class="sep">/</span>
|
|
454
|
+
<span class="crumb-title">Studio Tanda Tangan</span>
|
|
455
|
+
</div>
|
|
456
|
+
<button class="btn-primary" onclick="downloadStudioSig()">Unduh PNG</button>
|
|
457
|
+
</div>
|
|
458
|
+
<div class="ws-panel-wrap">
|
|
459
|
+
<div class="panel">
|
|
460
|
+
<div class="draw-box checkerboard" style="border-radius:10px;">
|
|
461
|
+
<canvas id="studio-sig-canvas" width="800" height="260"></canvas>
|
|
462
|
+
</div>
|
|
463
|
+
<div style="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-top:16px;">
|
|
464
|
+
<div style="display:flex;align-items:center;gap:20px;flex-wrap:wrap;">
|
|
465
|
+
<div class="ink-dots">
|
|
466
|
+
<span class="inspector-label">Warna</span>
|
|
467
|
+
<button class="ink-dot active" style="background:#18181B" onclick="setStudioColor('#18181B',this)"></button>
|
|
468
|
+
<button class="ink-dot" style="background:#1E3A8A" onclick="setStudioColor('#1E3A8A',this)"></button>
|
|
469
|
+
<button class="ink-dot" style="background:#991B1B" onclick="setStudioColor('#991B1B',this)"></button>
|
|
470
|
+
</div>
|
|
471
|
+
<div style="display:flex;align-items:center;gap:10px;">
|
|
472
|
+
<span class="inspector-label">Tebal</span>
|
|
473
|
+
<input type="range" min="1" max="6" value="3" oninput="setStudioWidth(this.value)" style="width:100px;">
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
<button class="btn-ghost" onclick="clearStudioSig()">Bersihkan Kanvas</button>
|
|
477
|
+
</div>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
</div>
|
|
481
|
+
|
|
482
|
+
<!-- ===== WORKSPACE: IMAGE TOOLS ===== -->
|
|
483
|
+
<div id="view-img-tools" class="workspace">
|
|
484
|
+
<div class="ws-subheader">
|
|
485
|
+
<div class="breadcrumb">
|
|
486
|
+
<button onclick="switchView('dashboard')">
|
|
487
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
488
|
+
Beranda
|
|
489
|
+
</button>
|
|
490
|
+
<span class="sep">/</span>
|
|
491
|
+
<span class="crumb-title">Kompresor Foto</span>
|
|
492
|
+
</div>
|
|
493
|
+
<button class="btn-primary" onclick="processImageTool()">Kompres & Simpan</button>
|
|
494
|
+
</div>
|
|
495
|
+
<div class="ws-panel-wrap">
|
|
496
|
+
<div class="ws-grid-2">
|
|
497
|
+
<div class="panel">
|
|
498
|
+
<div class="form-group">
|
|
499
|
+
<label class="form-label">Berkas Gambar</label>
|
|
500
|
+
<input type="file" accept="image/*" class="form-input" onchange="handleImgSelect(event)">
|
|
501
|
+
</div>
|
|
502
|
+
<div class="form-group">
|
|
503
|
+
<label class="form-label">Kualitas Kompresi</label>
|
|
504
|
+
<input type="range" id="img-quality-slider" min="0.1" max="1.0" step="0.05" value="0.75">
|
|
505
|
+
<div style="display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-top:4px;">
|
|
506
|
+
<span>Ukuran kecil</span><span>Kualitas tinggi</span>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
<div class="form-group">
|
|
510
|
+
<label class="form-label">Format Tujuan</label>
|
|
511
|
+
<select class="form-input" id="img-target-format">
|
|
512
|
+
<option value="image/jpeg">JPG / JPEG</option>
|
|
513
|
+
<option value="image/png">PNG</option>
|
|
514
|
+
<option value="image/webp">WebP</option>
|
|
515
|
+
</select>
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
<div class="panel" style="display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--canvas);min-height:260px;">
|
|
519
|
+
<img id="img-source-preview" class="hidden" style="max-height:200px;border-radius:8px;border:1px solid var(--border-2);" alt="Pratinjau">
|
|
520
|
+
<div id="img-source-info" class="font-mono" style="font-size:11px;color:var(--muted);margin-top:10px;">Belum ada gambar dipilih</div>
|
|
521
|
+
</div>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
<!-- ===== WORKSPACE: TEXT TOOLS ===== -->
|
|
527
|
+
<div id="view-text-tools" class="workspace">
|
|
528
|
+
<div class="ws-subheader">
|
|
529
|
+
<div class="breadcrumb">
|
|
530
|
+
<button onclick="switchView('dashboard')">
|
|
531
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
532
|
+
Beranda
|
|
533
|
+
</button>
|
|
534
|
+
<span class="sep">/</span>
|
|
535
|
+
<span class="crumb-title">Utilitas Teks</span>
|
|
536
|
+
</div>
|
|
537
|
+
<button class="btn-primary" onclick="copyAnalyzedText()">Salin Teks</button>
|
|
538
|
+
</div>
|
|
539
|
+
<div class="ws-panel-wrap">
|
|
540
|
+
<div class="panel">
|
|
541
|
+
<div class="form-group">
|
|
542
|
+
<label class="form-label">Masukkan Teks</label>
|
|
543
|
+
<textarea class="form-input" id="text-tool-input" rows="7" oninput="analyzeText()" placeholder="Tempelkan teks dari Word, email, atau sumber lain..."></textarea>
|
|
544
|
+
</div>
|
|
545
|
+
<div class="stat-grid" style="margin-bottom:16px;">
|
|
546
|
+
<div class="stat-card"><div class="stat-value" id="stat-words">0</div><div class="stat-label">Kata</div></div>
|
|
547
|
+
<div class="stat-card"><div class="stat-value" id="stat-chars">0</div><div class="stat-label">Karakter</div></div>
|
|
548
|
+
<div class="stat-card"><div class="stat-value" id="stat-chars-nospace">0</div><div class="stat-label">Tanpa Spasi</div></div>
|
|
549
|
+
<div class="stat-card"><div class="stat-value" id="stat-lines">0</div><div class="stat-label">Baris</div></div>
|
|
550
|
+
<div class="stat-card"><div class="stat-value" id="stat-readtime">~0 mnt</div><div class="stat-label">Baca</div></div>
|
|
551
|
+
</div>
|
|
552
|
+
<div class="chip-row">
|
|
553
|
+
<button class="chip" onclick="transformText('upper')">UPPERCASE</button>
|
|
554
|
+
<button class="chip" onclick="transformText('lower')">lowercase</button>
|
|
555
|
+
<button class="chip" onclick="transformText('title')">Title Case</button>
|
|
556
|
+
<button class="chip" onclick="transformText('clean-spaces')">Bersihkan Spasi</button>
|
|
557
|
+
<button class="chip" onclick="transformText('clean-lines')">Hapus Baris Kosong</button>
|
|
558
|
+
</div>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
|
|
563
|
+
<!-- ===== WORKSPACE: EDIT PDF STUDIO (v2.0) ===== -->
|
|
564
|
+
<div id="view-edit-pdf" class="workspace">
|
|
565
|
+
<div class="edit-shell">
|
|
566
|
+
<!-- Studio Header -->
|
|
567
|
+
<div class="edit-header">
|
|
568
|
+
<div class="edit-header-left">
|
|
569
|
+
<button class="edit-back" onclick="editPdfGoHome()">
|
|
570
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
571
|
+
Beranda
|
|
572
|
+
</button>
|
|
573
|
+
<span class="brand-mark" style="width:22px;height:22px;border-radius:6px;">
|
|
574
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" style="width:13px;height:13px;color:#fff;"><path stroke-linecap="round" stroke-linejoin="round" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/></svg>
|
|
575
|
+
</span>
|
|
576
|
+
<span class="edit-file-name" id="edit-file-name">Belum ada berkas</span>
|
|
577
|
+
<span class="edit-file-meta" id="edit-file-meta"></span>
|
|
578
|
+
</div>
|
|
579
|
+
<div class="edit-header-center">
|
|
580
|
+
<button class="edit-ico-btn" id="edit-undo" onclick="editPdfUndo()" title="Undo (Ctrl+Z)">
|
|
581
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M9 14L4 9l5-5M4 9h11a5 5 0 010 10h-3"/></svg>
|
|
582
|
+
</button>
|
|
583
|
+
<button class="edit-ico-btn" id="edit-redo" onclick="editPdfRedo()" title="Redo (Ctrl+Shift+Z)">
|
|
584
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M15 14l5-5-5-5M20 9H9a5 5 0 000 10h3"/></svg>
|
|
585
|
+
</button>
|
|
586
|
+
<span class="edit-tool-sep"></span>
|
|
587
|
+
<button class="edit-ico-btn" onclick="editPdfZoom(-0.1)" title="Zoom keluar">
|
|
588
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M5 12h14"/></svg>
|
|
589
|
+
</button>
|
|
590
|
+
<span class="edit-zoom-label" id="edit-zoom-label">100%</span>
|
|
591
|
+
<button class="edit-ico-btn" onclick="editPdfZoom(0.1)" title="Zoom masuk">
|
|
592
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" d="M12 5v14M5 12h14"/></svg>
|
|
593
|
+
</button>
|
|
594
|
+
<button class="edit-btn" onclick="editPdfFit()">Fit</button>
|
|
595
|
+
</div>
|
|
596
|
+
<div class="edit-header-right">
|
|
597
|
+
<label class="edit-btn" style="cursor:pointer;">
|
|
598
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M4 4v6h6M20 20v-6h-6M20 8V4h-6M4 16v4h6"/></svg>
|
|
599
|
+
Ganti File
|
|
600
|
+
<input type="file" accept="application/pdf" class="hidden" id="edit-file-input" onchange="loadEditPdfFile(this.files[0])">
|
|
601
|
+
</label>
|
|
602
|
+
<button class="edit-btn primary" id="edit-btn-export" onclick="exportEditedPdf()">
|
|
603
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/></svg>
|
|
604
|
+
Simpan & Unduh PDF
|
|
605
|
+
</button>
|
|
606
|
+
</div>
|
|
607
|
+
</div>
|
|
608
|
+
|
|
609
|
+
<!-- Contextual Annotation Toolbar -->
|
|
610
|
+
<div class="edit-toolbar" id="edit-toolbar">
|
|
611
|
+
<button class="edit-tool active" data-tool="select"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M4 4l7.5 15.5 2.2-6.3 6.3-2.2z"/></svg>Pilih<kbd>V</kbd></button>
|
|
612
|
+
<button class="edit-tool" data-tool="text"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M4 7V5h16v2M9 19h6M12 5v14"/></svg>Teks<kbd>T</kbd></button>
|
|
613
|
+
<button class="edit-tool" data-tool="highlight"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M9 11l-4 4v3h3l4-4M14 6l4 4-6 6-4-4z M4 21h9"/></svg>Stabilo<kbd>H</kbd></button>
|
|
614
|
+
<button class="edit-tool" data-tool="draw"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"/></svg>Coret<kbd>D</kbd></button>
|
|
615
|
+
<button class="edit-tool" data-tool="shape"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M4 4h9v9H4zM21 16a5 5 0 11-10 0 5 5 0 0110 0z"/></svg>Bentuk<kbd>R</kbd></button>
|
|
616
|
+
<span class="edit-tool-sep"></span>
|
|
617
|
+
<button class="edit-tool danger" data-tool="redact"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M5 5h14v14H5zM9 9l6 6M15 9l-6 6"/></svg>Sensor<kbd>X</kbd></button>
|
|
618
|
+
<button class="edit-tool" data-tool="image"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>Gambar<kbd>I</kbd></button>
|
|
619
|
+
<button class="edit-tool" data-tool="stamp"><svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M5 21h14M6 17h12v-2.5H6zM9 14.5V9a3 3 0 116 0v5.5"/></svg>Stempel<kbd>S</kbd></button>
|
|
620
|
+
</div>
|
|
621
|
+
|
|
622
|
+
<!-- 3-Pane Body -->
|
|
623
|
+
<div class="edit-body">
|
|
624
|
+
<!-- Left: thumbnails -->
|
|
625
|
+
<aside class="edit-rail" id="edit-rail">
|
|
626
|
+
<div class="edit-rail-head"><span>Halaman</span><span class="edit-file-meta" id="edit-page-count">0</span></div>
|
|
627
|
+
<div class="edit-thumbs" id="edit-thumbs"></div>
|
|
628
|
+
<button class="edit-add-page" id="edit-add-page" onclick="editPdfAddBlankPage()">+ Sisip halaman kosong</button>
|
|
629
|
+
</aside>
|
|
630
|
+
|
|
631
|
+
<!-- Center: canvas stage -->
|
|
632
|
+
<main class="edit-stage" id="edit-stage">
|
|
633
|
+
<div class="edit-empty" id="edit-empty"
|
|
634
|
+
ondragover="event.preventDefault(); this.classList.add('drag-over')"
|
|
635
|
+
ondragleave="this.classList.remove('drag-over')"
|
|
636
|
+
ondrop="editPdfDrop(event)"
|
|
637
|
+
onclick="document.getElementById('edit-file-input').click()">
|
|
638
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.4"><path stroke-linecap="round" stroke-linejoin="round" d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
|
|
639
|
+
<div class="t">Pilih atau tarik berkas PDF</div>
|
|
640
|
+
<div class="s">mulai mengedit — tambah teks, stabilo, sensor, bentuk, gambar & stempel. Semua diproses di komputer Anda.</div>
|
|
641
|
+
</div>
|
|
642
|
+
<div class="edit-stage-scroll hidden" id="edit-stage-scroll">
|
|
643
|
+
<div class="edit-stage-wrap tool-select" id="edit-stage-wrap">
|
|
644
|
+
<canvas id="edit-pdf-canvas"></canvas>
|
|
645
|
+
<canvas id="edit-annot-canvas"></canvas>
|
|
646
|
+
<textarea id="edit-text-inline" class="hidden" spellcheck="false"></textarea>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
<div class="edit-pager hidden" id="edit-pager">
|
|
650
|
+
<button id="edit-prev" onclick="editPdfPage(-1)">‹</button>
|
|
651
|
+
<span class="mono" id="edit-pager-label">Hal 1 / 1</span>
|
|
652
|
+
<button id="edit-next" onclick="editPdfPage(1)">›</button>
|
|
653
|
+
</div>
|
|
654
|
+
</main>
|
|
655
|
+
|
|
656
|
+
<!-- Right: inspector -->
|
|
657
|
+
<aside class="edit-inspector" id="edit-inspector">
|
|
658
|
+
<div class="edit-props" id="edit-props-panel"></div>
|
|
659
|
+
<div class="edit-layers">
|
|
660
|
+
<div class="edit-sec-title">Layer Anotasi</div>
|
|
661
|
+
<div id="edit-layers-list" style="display:flex;flex-direction:column;gap:6px;"></div>
|
|
662
|
+
</div>
|
|
663
|
+
<div class="edit-export">
|
|
664
|
+
<div class="ttl">Opsi Export</div>
|
|
665
|
+
<label class="edit-check">
|
|
666
|
+
<input type="checkbox" id="edit-flatten" checked onchange="editPdfToggleFlatten(this.checked)">
|
|
667
|
+
<span>Flatten anotasi (permanen & aman untuk sensor).</span>
|
|
668
|
+
</label>
|
|
669
|
+
<div class="edit-note" style="margin-top:10px;">Halaman tanpa anotasi tetap vektor. Dokumen tidak pernah dikirim ke internet.</div>
|
|
670
|
+
</div>
|
|
671
|
+
</aside>
|
|
672
|
+
</div>
|
|
673
|
+
</div>
|
|
674
|
+
</div>
|
|
675
|
+
|
|
676
|
+
<!-- ===== WORKSPACE: DEVELOPER TOOLS (v2.1) ===== -->
|
|
677
|
+
<div id="view-dev" class="workspace">
|
|
678
|
+
<div class="dev-shell">
|
|
679
|
+
<div class="dev-header">
|
|
680
|
+
<nav class="dev-crumbs" aria-label="Breadcrumb">
|
|
681
|
+
<button class="dev-back" onclick="switchView('dashboard')">
|
|
682
|
+
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
|
|
683
|
+
Beranda
|
|
684
|
+
</button>
|
|
685
|
+
<span class="dev-crumb-sep" aria-hidden="true">/</span>
|
|
686
|
+
<span class="dev-crumb-root">Developer Tools</span>
|
|
687
|
+
<span class="dev-crumb-sep" aria-hidden="true">/</span>
|
|
688
|
+
<div class="dev-switch" id="dev-switch">
|
|
689
|
+
<button type="button" class="dev-switch-btn" id="dev-switch-btn"
|
|
690
|
+
aria-haspopup="listbox" aria-expanded="false" aria-controls="dev-menu"
|
|
691
|
+
onclick="devToggleMenu()" onkeydown="devSwitchKeydown(event)">
|
|
692
|
+
<span class="dev-tool-icon" id="dev-tool-icon"></span>
|
|
693
|
+
<span class="dev-switch-label">
|
|
694
|
+
<span class="dev-switch-name" id="dev-tool-title">Developer Tools</span>
|
|
695
|
+
<span class="dev-switch-tag" id="dev-tool-tag">LOCAL · ZERO UPLOAD</span>
|
|
696
|
+
</span>
|
|
697
|
+
<svg class="dev-switch-caret" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 9l6 6 6-6"/></svg>
|
|
698
|
+
</button>
|
|
699
|
+
<div class="dev-menu hidden" id="dev-menu" role="listbox" aria-label="Pilih Developer Tool"></div>
|
|
700
|
+
</div>
|
|
701
|
+
</nav>
|
|
702
|
+
<span class="dev-secure">Token tidak dikirim ke server</span>
|
|
703
|
+
<div class="dev-actions">
|
|
704
|
+
<button class="dev-btn" id="dev-btn-sample" onclick="devLoadSample()">Muat Contoh</button>
|
|
705
|
+
<button class="dev-btn" id="dev-btn-clear" onclick="devClear()">Bersihkan</button>
|
|
706
|
+
<button class="dev-btn primary" id="dev-btn-copy" onclick="devCopyOutput()">Salin Output</button>
|
|
707
|
+
</div>
|
|
708
|
+
</div>
|
|
709
|
+
<div class="dev-body">
|
|
710
|
+
<main class="dev-stage" id="dev-stage"></main>
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
714
|
+
|
|
715
|
+
<!-- ===== TOAST ===== -->
|
|
716
|
+
<div id="toast" class="toast">
|
|
717
|
+
<span class="toast-dot"></span>
|
|
718
|
+
<span id="toast-msg">Notifikasi</span>
|
|
719
|
+
</div>
|
|
720
|
+
|
|
721
|
+
<script src="./vendor/pdf-lib.min.js"></script>
|
|
722
|
+
<script src="./vendor/pdf.min.js"></script>
|
|
723
|
+
<script src="./vendor/qrcode.min.js"></script>
|
|
724
|
+
<script src="./vendor/jszip.min.js"></script>
|
|
725
|
+
<script src="./js/core/state.js"></script>
|
|
726
|
+
<script src="./js/core/pdf-engine.js"></script>
|
|
727
|
+
<script src="./js/tools/office-tools.js"></script>
|
|
728
|
+
<script src="./js/tools/pdf-ops.js"></script>
|
|
729
|
+
<script src="./js/tools/sign-pdf.js"></script>
|
|
730
|
+
<script src="./js/tools/edit-pdf.js"></script>
|
|
731
|
+
<script src="./js/tools/dev-tools.js"></script>
|
|
732
|
+
<script>
|
|
733
|
+
// Global error boundary ringan — tampilkan toast alih-alih gagal diam-diam.
|
|
734
|
+
window.addEventListener('unhandledrejection', function (e) {
|
|
735
|
+
console.warn('[Foliokit] Unhandled promise rejection:', e.reason);
|
|
736
|
+
if (typeof showToast === 'function') showToast('Terjadi kendala tak terduga. Silakan coba lagi.', false);
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
// Service Worker (offline app shell). Gagal senyap bila tidak didukung.
|
|
740
|
+
if ('serviceWorker' in navigator && /^https?:$/.test(location.protocol)) {
|
|
741
|
+
window.addEventListener('load', function () {
|
|
742
|
+
navigator.serviceWorker.register('./sw.js').catch(function () {});
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
</script>
|
|
746
|
+
</body>
|
|
747
|
+
</html>
|