Leon4gr45 commited on
Commit
03bd533
·
verified ·
1 Parent(s): eda8dc6

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .hfignore +18 -0
  2. .well-known/funding-manifest-urls +1 -0
  3. 404.html +177 -0
  4. Agent.md +55 -0
  5. CCLA.md +140 -0
  6. CODE_OF_CONDUCT.md +65 -0
  7. CONTRIBUTING.md +153 -0
  8. Dockerfile +72 -0
  9. Dockerfile.nonroot +78 -0
  10. ICLA.md +100 -0
  11. LICENSE +661 -0
  12. README.md +1090 -6
  13. RELEASE.md +317 -0
  14. SECURITY.md +110 -0
  15. SIMPLE_MODE.md +244 -0
  16. STATIC-HOSTING.md +63 -0
  17. TRANSLATION.md +606 -0
  18. about.html +315 -0
  19. chart/.helmignore +23 -0
  20. chart/Chart.yaml +16 -0
  21. chart/README.md +100 -0
  22. chart/templates/NOTES.txt +47 -0
  23. chart/templates/_helpers.tpl +52 -0
  24. chart/templates/deployment.yaml +51 -0
  25. chart/templates/gateway.yaml +22 -0
  26. chart/templates/httproute.yaml +66 -0
  27. chart/templates/ingress.yaml +43 -0
  28. chart/templates/service.yaml +15 -0
  29. chart/templates/serviceaccount.yaml +4 -0
  30. chart/templates/tests/test-connection.yaml +15 -0
  31. chart/values.yaml +76 -0
  32. cloudflare/WASM-PROXY.md +104 -0
  33. cloudflare/cors-proxy-worker.js +351 -0
  34. cloudflare/wasm-proxy-worker.js +356 -0
  35. cloudflare/wasm-wrangler.toml +69 -0
  36. cloudflare/wrangler.toml +45 -0
  37. contact.html +130 -0
  38. docker-compose.dev.yml +14 -0
  39. docker-compose.yml +16 -0
  40. docs/.vitepress/cache/deps/@theme_index.js +275 -0
  41. docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
  42. docs/.vitepress/cache/deps/_metadata.json +58 -0
  43. docs/.vitepress/cache/deps/chunk-2CLQ7TTZ.js +0 -0
  44. docs/.vitepress/cache/deps/chunk-2CLQ7TTZ.js.map +0 -0
  45. docs/.vitepress/cache/deps/chunk-LE5NDSFD.js +0 -0
  46. docs/.vitepress/cache/deps/chunk-LE5NDSFD.js.map +0 -0
  47. docs/.vitepress/cache/deps/package.json +3 -0
  48. docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -0
  49. docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -0
  50. docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +583 -0
.hfignore ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ node_modules
2
+ .git
3
+ .github
4
+ dist
5
+ build
6
+ .DS_Store
7
+ *.log
8
+ .env
9
+ .env.local
10
+ .husky
11
+ .well-known
12
+ chart
13
+ cloudflare
14
+ docs
15
+ scripts
16
+ signatures
17
+ vendor
18
+ public/coherentpdf.browser.min.js
.well-known/funding-manifest-urls ADDED
@@ -0,0 +1 @@
 
 
1
+ https://www.bentopdf.com/funding.json
404.html ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+
7
+ <!-- Primary Meta Tags -->
8
+ <title>404 - Page Not Found | BentoPDF</title>
9
+ <meta
10
+ name="description"
11
+ content="Oops! The page you're looking for doesn't exist. Return to BentoPDF's homepage to access our free PDF tools."
12
+ />
13
+ <meta name="robots" content="noindex, follow" />
14
+
15
+ <!-- Canonical URL -->
16
+ <link rel="canonical" href="https://www.bentopdf.com/404.html" />
17
+
18
+ <!-- Open Graph -->
19
+ <meta property="og:type" content="website" />
20
+ <meta property="og:url" content="https://www.bentopdf.com/404" />
21
+ <meta property="og:title" content="404 - Page Not Found | BentoPDF" />
22
+ <meta
23
+ property="og:description"
24
+ content="The page you're looking for doesn't exist."
25
+ />
26
+ <meta property="og:site_name" content="BentoPDF" />
27
+
28
+ <!-- Twitter Card -->
29
+ <meta name="twitter:card" content="summary" />
30
+ <meta name="twitter:title" content="404 - Page Not Found" />
31
+ <meta
32
+ name="twitter:description"
33
+ content="The page you're looking for doesn't exist."
34
+ />
35
+ <meta name="twitter:site" content="@BentoPDF" />
36
+
37
+ <link href="/src/css/styles.css" rel="stylesheet" />
38
+
39
+ <!-- Web App Manifest -->
40
+ <link rel="manifest" href="/site.webmanifest" />
41
+
42
+ <!-- Favicons -->
43
+ <link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
44
+ <link
45
+ rel="icon"
46
+ type="image/png"
47
+ sizes="192x192"
48
+ href="/images/favicon-192x192.png"
49
+ />
50
+ <link
51
+ rel="icon"
52
+ type="image/png"
53
+ sizes="512x512"
54
+ href="/images/favicon-512x512.png"
55
+ />
56
+ <link
57
+ rel="apple-touch-icon"
58
+ sizes="180x180"
59
+ href="/images/apple-touch-icon.png"
60
+ />
61
+ <link rel="icon" href="/favicon.ico" sizes="32x32" />
62
+ </head>
63
+
64
+ <body class="antialiased bg-gray-900 text-gray-300">
65
+ {{> navbar }}
66
+
67
+ <div id="app" class="min-h-screen container mx-auto p-4 md:p-8">
68
+ <section id="404-content" class="text-center py-20 md:py-32">
69
+ <!-- 404 Number -->
70
+ <div class="mb-8">
71
+ <h1
72
+ class="text-9xl md:text-[12rem] font-bold text-indigo-500 leading-none"
73
+ >
74
+ 404
75
+ </h1>
76
+ </div>
77
+
78
+ <!-- Main heading -->
79
+ <h2 class="text-3xl md:text-5xl font-bold text-white mb-4">
80
+ Page Not Found
81
+ </h2>
82
+
83
+ <!-- Description -->
84
+ <p class="text-lg md:text-xl text-gray-400 mb-8 max-w-2xl mx-auto">
85
+ Oops! The page you're looking for seems to have wandered off into the
86
+ digital void. Don't worry though, our PDF tools are still right where
87
+ you left them.
88
+ </p>
89
+
90
+ <!-- Action buttons -->
91
+ <div
92
+ class="flex flex-col sm:flex-row gap-4 justify-center items-center"
93
+ >
94
+ <a
95
+ href="index.html"
96
+ class="inline-flex items-center gap-3 pl-8 pr-2 py-2 rounded-full bg-gradient-to-b from-indigo-500 to-indigo-600 text-white font-semibold focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-900 focus:ring-indigo-400 hover:shadow-xl hover:shadow-indigo-500/30 transition-all duration-200 transform hover:-translate-y-1"
97
+ >
98
+ <span>Back to Home</span>
99
+ <span class="bg-white text-indigo-600 rounded-full p-2">
100
+ <svg
101
+ xmlns="http://www.w3.org/2000/svg"
102
+ width="16"
103
+ height="16"
104
+ viewBox="0 0 24 24"
105
+ fill="none"
106
+ stroke="currentColor"
107
+ stroke-width="2.5"
108
+ stroke-linecap="round"
109
+ stroke-linejoin="round"
110
+ class="w-4 h-4"
111
+ >
112
+ <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
113
+ <polyline points="9 22 9 12 15 12 15 22" />
114
+ </svg>
115
+ </span>
116
+ </a>
117
+
118
+ <a
119
+ href="/index.html#tools-header"
120
+ class="inline-block px-8 py-3 rounded-full bg-gray-800 text-white font-semibold border border-gray-700 hover:bg-gray-700 focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-900 focus:ring-gray-700 transition-all duration-200"
121
+ >
122
+ Browse All Tools
123
+ </a>
124
+ </div>
125
+
126
+ <!-- Helpful links -->
127
+ <div class="mt-16">
128
+ <p class="text-gray-500 mb-4">Or try these popular tools:</p>
129
+ <div class="flex flex-wrap justify-center gap-3">
130
+ <a
131
+ href="/src/pages/merge-pdf.html"
132
+ class="px-4 py-2 bg-gray-800 text-gray-300 rounded-lg hover:bg-gray-700 hover:text-white transition-colors text-sm"
133
+ >
134
+ Merge PDF
135
+ </a>
136
+ <a
137
+ href="/src/pages/split-pdf.html"
138
+ class="px-4 py-2 bg-gray-800 text-gray-300 rounded-lg hover:bg-gray-700 hover:text-white transition-colors text-sm"
139
+ >
140
+ Split PDF
141
+ </a>
142
+ <a
143
+ href="/src/pages/compress-pdf.html"
144
+ class="px-4 py-2 bg-gray-800 text-gray-300 rounded-lg hover:bg-gray-700 hover:text-white transition-colors text-sm"
145
+ >
146
+ Compress PDF
147
+ </a>
148
+ <a
149
+ href="/src/pages/edit-pdf.html"
150
+ class="px-4 py-2 bg-gray-800 text-gray-300 rounded-lg hover:bg-gray-700 hover:text-white transition-colors text-sm"
151
+ >
152
+ Edit PDF
153
+ </a>
154
+ </div>
155
+ </div>
156
+ </section>
157
+ </div>
158
+
159
+ {{> footer }}
160
+
161
+ <script type="module" src="src/js/utils/lucide-init.ts"></script>
162
+ <script type="module" src="src/version.ts"></script>
163
+ <script type="module" src="src/js/main.ts"></script>
164
+ <script type="module" src="src/js/mobileMenu.ts"></script>
165
+
166
+ <!-- JSON-LD Schema -->
167
+ <script type="application/ld+json">
168
+ {
169
+ "@context": "https://schema.org",
170
+ "@type": "WebPage",
171
+ "name": "404 - Page Not Found",
172
+ "description": "The page you're looking for doesn't exist on BentoPDF.",
173
+ "url": "https://www.bentopdf.com/404"
174
+ }
175
+ </script>
176
+ </body>
177
+ </html>
Agent.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Agent.md
2
+
3
+ ## 1. Deployment Configuration
4
+
5
+ ### Target Space
6
+ - **Profile:** `Leon4gr45`
7
+ - **Space:** `Leon4gr45/termix`
8
+ - **Full Identifier:** `Leon4gr45/Leon4gr45/termix`
9
+ - **Frontend Port:** `7860` (mandatory for all Hugging Face Spaces)
10
+
11
+ ### Deployment Method
12
+ - **Docker SDK**
13
+
14
+ ### HF Token
15
+ - Environment variable: `HF_TOKEN`
16
+ - Use the token provided in the environment.
17
+
18
+ ### Required Files
19
+ - `Dockerfile`
20
+ - `README.md` (with HF YAML frontmatter)
21
+ - `.hfignore`
22
+ - `Agent.md`
23
+
24
+ ---
25
+
26
+ ## 2. API Exposure and Documentation
27
+
28
+ ### Mandatory Endpoints
29
+ - **`/health`**: Returns HTTP 200 when the app is ready.
30
+ - **`/api-docs`**: Documents all available API endpoints.
31
+
32
+ ### Functional Endpoints
33
+ - Client-side application: Most processing happens in the browser via WASM.
34
+ - **`/health`**: GET - Health check.
35
+ - **`/api-docs`**: GET - API Documentation.
36
+
37
+ ---
38
+
39
+ ## 3. Deployment Workflow
40
+
41
+ ### Standard Deployment Command
42
+ ```bash
43
+ huggingface-cli upload Leon4gr45/Leon4gr45/termix . --repo-type=space
44
+ ```
45
+
46
+ ### Monitoring Logs
47
+ Build Logs:
48
+ ```bash
49
+ curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/Leon4gr45/termix/logs/build"
50
+ ```
51
+
52
+ Run Logs:
53
+ ```bash
54
+ curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/Leon4gr45/Leon4gr45/termix/logs/run"
55
+ ```
CCLA.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BentoPDF Corporate Contributor License Agreement (CCLA)
2
+
3
+ Thank you for your organization's interest in contributing to BentoPDF. This Corporate Contributor License Agreement ("Agreement") documents the rights granted by corporate contributors to the Project.
4
+
5
+ By signing this Agreement, you accept and agree to the following terms and conditions for your organization's present and future Contributions submitted to the Project.
6
+
7
+ ## 1. Definitions
8
+
9
+ **"You" (or "Your")** means the legal entity on behalf of which this Agreement is being entered into.
10
+
11
+ **"Contributor"** means any employee, contractor, or authorized agent of You who submits Contributions on Your behalf.
12
+
13
+ **"Contribution"** means any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You or any of Your Contributors to the Project for inclusion in, or documentation of, the Project. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Project or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving the Project.
14
+
15
+ **"Project"** means the BentoPDF software project and all associated repositories, documentation, and related materials maintained at https://github.com/alam00000/bentopdf.
16
+
17
+ **"Project Owner"** means the owners and maintainers of the Project.
18
+
19
+ ## 2. Grant of Copyright License
20
+
21
+ Subject to the terms and conditions of this Agreement, You hereby grant to the Project Owner and to recipients of software distributed by the Project Owner a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to:
22
+
23
+ - Reproduce, prepare derivative works of, publicly display, publicly perform, and distribute Contributions made by You and Your Contributors, and such derivative works
24
+ - Sublicense any or all of the foregoing rights to third parties
25
+ - **Relicense Contributions under any license**, including but not limited to proprietary licenses, commercial licenses, or any other open source license
26
+
27
+ This grant specifically enables the Project Owner to offer commercial licenses of the Project incorporating Your Contributions, consistent with the Project's dual licensing model (AGPL-3.0 for open source use, and a separate commercial license for proprietary use).
28
+
29
+ ## 3. Grant of Patent License
30
+
31
+ Subject to the terms and conditions of this Agreement, You hereby grant to the Project Owner and to recipients of software distributed by the Project Owner a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Contribution, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Project to which such Contribution(s) was submitted.
32
+
33
+ If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Project to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Project shall terminate as of the date such litigation is filed.
34
+
35
+ ## 4. Authorized Contributors
36
+
37
+ You are responsible for:
38
+
39
+ a) Identifying the initial list of Contributors authorized to submit Contributions on Your behalf by listing them in Schedule A below
40
+
41
+ b) Keeping the list of authorized Contributors current by notifying the Project Owner when Contributors should be added or removed
42
+
43
+ c) Ensuring that all authorized Contributors are aware of and comply with the terms of this Agreement
44
+
45
+ All Contributions made by Your authorized Contributors shall be deemed to be made on Your behalf and subject to this Agreement.
46
+
47
+ ## 5. Representations and Warranties
48
+
49
+ You represent and warrant that:
50
+
51
+ a) **Authority**: You are legally entitled to grant the above licenses and have the authority to bind the legal entity You represent. You have taken all necessary corporate action to authorize the execution of this Agreement.
52
+
53
+ b) **Contributor Authorization**: Each Contributor identified by You is authorized to submit Contributions on Your behalf.
54
+
55
+ c) **Originality**: Each Contribution is Your organization's original creation, or You have sufficient rights to submit the Contribution on behalf of the original authors.
56
+
57
+ d) **Third-Party Rights**: Your Contributions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are aware and which are associated with any part of Your Contributions.
58
+
59
+ e) **No Conflicting Obligations**: Your Contributions do not violate any agreement or obligation You have with any third party.
60
+
61
+ f) **Accuracy**: All information You provide in connection with this Agreement and Your Contributions is accurate and complete.
62
+
63
+ ## 6. Moral Rights Waiver
64
+
65
+ To the fullest extent permitted under applicable law, You hereby waive, and agree to cause Your Contributors to waive, any and all moral rights in or relating to Contributions, including without limitation:
66
+
67
+ - The right of attribution
68
+ - The right of integrity
69
+ - The right to object to derogatory treatment
70
+ - Any similar rights existing under the laws of any jurisdiction
71
+
72
+ You acknowledge that the Project Owner may modify, adapt, translate, or otherwise change Contributions without consent and without attribution.
73
+
74
+ ## 7. No Revocation
75
+
76
+ **This license grant is irrevocable.** Once a Contribution has been submitted under this Agreement, You may not revoke or withdraw the licenses granted herein. The Project Owner and all downstream recipients may continue to use, distribute, modify, and sublicense Contributions indefinitely.
77
+
78
+ ## 8. Retention of Copyright
79
+
80
+ You retain all right, title, and interest in and to the copyright of Your Contributions. Nothing in this Agreement is intended to transfer ownership of Your Contributions to the Project Owner. You are free to use Your Contributions for any other purpose.
81
+
82
+ ## 9. No Obligation
83
+
84
+ You understand that the decision to include any Contribution in any project or source repository is entirely at the discretion of the Project Owner. The Project Owner is under no obligation to accept, use, or include any Contribution.
85
+
86
+ ## 10. Support and Warranty Disclaimer
87
+
88
+ Unless required by applicable law or agreed to in writing, You provide Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
89
+
90
+ You are not expected to provide support for Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all.
91
+
92
+ ## 11. Notification
93
+
94
+ You agree to notify the Project Owner of any facts or circumstances of which You become aware that would make any of Your representations in this Agreement inaccurate in any respect.
95
+
96
+ ## 12. Governing Law
97
+
98
+ This Agreement shall be governed by and construed in accordance with the laws of India, without regard to its conflict of law provisions.
99
+
100
+ ---
101
+
102
+ ## Signature
103
+
104
+ By signing this Agreement, You confirm that You have the authority to bind the legal entity named below, and that entity agrees to the terms of this Corporate Contributor License Agreement.
105
+
106
+ **Legal Entity Name:** ___________________________
107
+
108
+ **Address:** ___________________________
109
+
110
+ **Point of Contact Name:** ___________________________
111
+
112
+ **Point of Contact Email:** ___________________________
113
+
114
+ **Point of Contact Phone:** ___________________________
115
+
116
+ **Signature:** ___________________________
117
+
118
+ **Title:** ___________________________
119
+
120
+ **Date:** ___________________________
121
+
122
+ ---
123
+
124
+ ## Schedule A: Authorized Contributors
125
+
126
+ The following individuals are authorized to submit Contributions to the Project on behalf of the above-named legal entity:
127
+
128
+ | Full Name | GitHub Username | Email Address | Date Added |
129
+ |-----------|-----------------|---------------|------------|
130
+ | | | | |
131
+ | | | | |
132
+ | | | | |
133
+ | | | | |
134
+ | | | | |
135
+
136
+ *Add additional rows as needed. To update this list, contact the Project Owner at contact@bentopdf.com*
137
+
138
+ ---
139
+
140
+ *This CLA is based on the Apache Corporate Contributor License Agreement and has been adapted for BentoPDF's dual licensing model.*
CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers of **BentoPDF** pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ---
10
+
11
+ ## Our Standards
12
+
13
+ Examples of behavior that contributes to a positive environment for our community include:
14
+
15
+ - Using welcoming and inclusive language
16
+ - Being respectful of differing viewpoints and experiences
17
+ - Gracefully accepting constructive criticism
18
+ - Focusing on what is best for the community
19
+ - Showing empathy toward other community members
20
+
21
+ Examples of unacceptable behavior include:
22
+
23
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
24
+ - Trolling, insulting or derogatory comments, and personal or political attacks
25
+ - Public or private harassment
26
+ - Publishing others’ private information, such as a physical or electronic address, without explicit permission
27
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
28
+
29
+ ---
30
+
31
+ ## Enforcement Responsibilities
32
+
33
+ Project maintainers of **BentoPDF** are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
34
+
35
+ Maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36
+
37
+ ---
38
+
39
+ ## Reporting Guidelines
40
+
41
+ If you are subject to or witness unacceptable behavior, or have any other concerns, please report it by contacting the project team at:
42
+
43
+ **Email:** `contact@bentopdf.com`
44
+
45
+ All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
46
+
47
+ ---
48
+
49
+ ## Scope
50
+
51
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing the project include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
52
+
53
+ ---
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at the email above. All complaints will be reviewed and investigated promptly and fairly.
58
+
59
+ Maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent consequences as determined by other members of the project's leadership.
60
+
61
+ ---
62
+
63
+ ## Attribution
64
+
65
+ This Code of Conduct is adapted from the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html), available at https://www.contributor-covenant.org.
CONTRIBUTING.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to BentoPDF
2
+
3
+ First off, thank you for considering contributing to **BentoPDF**! Your help makes this project better for everyone.
4
+
5
+ This document outlines how to contribute, report issues, and get involved in the project.
6
+
7
+ ---
8
+
9
+ ## Contributor License Agreement (CLA)
10
+
11
+ Before we can accept your contributions, you must sign our Contributor License Agreement (CLA). This is required because BentoPDF uses a dual licensing model:
12
+
13
+ - **AGPL-3.0** for open source use
14
+ - **Commercial license** for proprietary use
15
+
16
+ The CLA ensures we can include your contributions in both versions of the project.
17
+
18
+ ### For Individual Contributors
19
+
20
+ Sign our [Individual Contributor License Agreement (ICLA)](ICLA.md). When you submit your first pull request, the CLA Assistant bot will automatically ask you to sign by commenting on the PR.
21
+
22
+ ### For Corporate Contributors
23
+
24
+ If you are contributing on behalf of your employer, your organization needs to sign our [Corporate Contributor License Agreement (CCLA)](CCLA.md). Please contact us at [contact@bentopdf.com](mailto:contact@bentopdf.com) to arrange corporate CLA signing.
25
+
26
+ ### What the CLA Grants
27
+
28
+ By signing the CLA, you:
29
+
30
+ - Grant us a broad copyright license to use, modify, and relicense your contributions (including for commercial use)
31
+ - Grant a patent license for any patents covering your contribution
32
+ - Represent that you have the authority to make the contribution
33
+ - Retain full copyright ownership of your contributions
34
+
35
+ ---
36
+
37
+ ## 1. How to Contribute
38
+
39
+ You can contribute in several ways:
40
+
41
+ - **Reporting Bugs:** If you find a bug or unexpected behavior, please open an issue. Include steps to reproduce and any relevant screenshots or logs.
42
+ - **Feature Requests:** Suggest new features or improvements by opening an issue and describing your idea clearly.
43
+ - **Code Contributions:** Submit a pull request with new features, bug fixes, or improvements.
44
+ - **Documentation:** Help improve the README, usage examples, or guides.
45
+ - **Testing:** Help test new releases or changes to ensure stability.
46
+
47
+ ---
48
+
49
+ ### Issue Template
50
+
51
+ When reporting bugs, requesting features, or asking questions, please use our [issue template](.github/ISSUE_TEMPLATE/bug_feature_question.md). The template will automatically appear when you create a new issue.
52
+
53
+ **Our issue template helps you provide:**
54
+
55
+ - Clear categorization (Bug, Feature Request, or Question)
56
+ - Steps to reproduce (for bugs)
57
+ - Expected vs actual behavior
58
+ - Environment details
59
+ - Screenshots or logs
60
+
61
+ **Title Format Examples:**
62
+
63
+ - `(Bug) Text alignment incorrect on multi-line paragraphs`
64
+ - `(Feature) Add support for custom PDF metadata`
65
+ - `(Question) How to embed custom fonts?`
66
+
67
+ ### Pull Request Template
68
+
69
+ When submitting code contributions, please use our [pull request template](.github/pull_request_template.md). The template will automatically appear when you create a new PR.
70
+
71
+ **Key requirements:**
72
+
73
+ - Link to the related issue (e.g., `Fixes #123`)
74
+ - Describe the type of change (bug fix, feature, breaking change)
75
+ - Explain how you tested your changes
76
+ - Complete the checklist before submitting
77
+
78
+ ## 2. Getting Started with Code Contributions
79
+
80
+ 1. **Fork the Repository**
81
+
82
+ ```bash
83
+ git clone https://github.com/alam00000/bentopdf.git
84
+ cd bento-pdf
85
+ npm install
86
+ ```
87
+
88
+ 2. **Create a New Branch**
89
+
90
+ ```bash
91
+ git checkout -b feature/my-new-feature
92
+ ```
93
+
94
+ 3. **Make Your Changes**
95
+ - Follow the code style and conventions used in the project.
96
+ - Add comments where necessary.
97
+ - Update or add tests if applicable.
98
+
99
+ 4. **Run Tests**
100
+
101
+ ```bash
102
+ npm run test
103
+ ```
104
+
105
+ 5. **Commit Your Changes**
106
+
107
+ ```bash
108
+ git add .
109
+ git commit -m "Add a meaningful commit message"
110
+ ```
111
+
112
+ 6. **Push and Submit a Pull Request**
113
+
114
+ ```bash
115
+ git push origin feature/my-new-feature
116
+ ```
117
+
118
+ - Open a pull request on GitHub and provide a clear description of your changes.
119
+
120
+ ---
121
+
122
+ ## 3. Code Style
123
+
124
+ - Follow the existing TypeScript and JavaScript conventions.
125
+ - Use `camelCase` for variables and functions.
126
+ - Keep lines reasonably short and readable.
127
+ - Comment complex logic for clarity.
128
+
129
+ ---
130
+
131
+ ## 4. Issues and Pull Requests
132
+
133
+ - Make sure your PR is focused and addresses a single issue or feature.
134
+ - Reference related issues in your PR description (e.g., `Closes #12`).
135
+ - Be responsive to feedback and make requested changes promptly.
136
+
137
+ ---
138
+
139
+ ## 5. Reporting Security Issues
140
+
141
+ If you discover a security vulnerability, please **do not** open a public issue. Instead, contact the project maintainer directly at:
142
+
143
+ **Email:** [contact@bentopdf.com](mailto:contact@bentopdf.com)
144
+
145
+ ---
146
+
147
+ ## 6. Code of Conduct
148
+
149
+ All contributors are expected to follow the Code of Conduct. Be respectful and considerate in all communications.
150
+
151
+ ---
152
+
153
+ Thank you for helping make **BentoPDF** a better library for everyone!
Dockerfile ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Global variable declaration:
2
+ # Build to serve under Subdirectory BASE_URL if provided, eg: "ARG BASE_URL=/pdf/", otherwise leave blank: "ARG BASE_URL="
3
+ ARG BASE_URL=
4
+
5
+ # Build stage
6
+ FROM public.ecr.aws/docker/library/node:20-alpine AS builder
7
+ WORKDIR /app
8
+ COPY package*.json ./
9
+ COPY vendor ./vendor
10
+ ENV HUSKY=0
11
+ RUN npm config set fetch-retries 5 && \
12
+ npm config set fetch-retry-mintimeout 60000 && \
13
+ npm config set fetch-retry-maxtimeout 300000 && \
14
+ npm config set fetch-timeout 600000 && \
15
+ npm ci
16
+ COPY . .
17
+
18
+ # Build without type checking (vite build only)
19
+ # Pass SIMPLE_MODE environment variable if provided
20
+ ARG SIMPLE_MODE=false
21
+ ENV SIMPLE_MODE=$SIMPLE_MODE
22
+ ARG COMPRESSION_MODE=all
23
+ ENV COMPRESSION_MODE=$COMPRESSION_MODE
24
+
25
+ # global arg to local arg - BASE_URL is read from env by vite.config.ts
26
+ ARG BASE_URL
27
+ ENV BASE_URL=$BASE_URL
28
+
29
+ # WASM module URLs (pre-configured defaults)
30
+ # Override these for air-gapped or self-hosted WASM deployments
31
+ ARG VITE_WASM_PYMUPDF_URL
32
+ ARG VITE_WASM_GS_URL
33
+ ARG VITE_WASM_CPDF_URL
34
+ ENV VITE_WASM_PYMUPDF_URL=$VITE_WASM_PYMUPDF_URL
35
+ ENV VITE_WASM_GS_URL=$VITE_WASM_GS_URL
36
+ ENV VITE_WASM_CPDF_URL=$VITE_WASM_CPDF_URL
37
+
38
+ # Default UI language (e.g. en, fr, de, es, zh, ar)
39
+ ARG VITE_DEFAULT_LANGUAGE
40
+ ENV VITE_DEFAULT_LANGUAGE=$VITE_DEFAULT_LANGUAGE
41
+
42
+ # Custom branding (e.g. VITE_BRAND_NAME=MyCompany VITE_BRAND_LOGO=my-logo.svg)
43
+ ARG VITE_BRAND_NAME
44
+ ARG VITE_BRAND_LOGO
45
+ ARG VITE_FOOTER_TEXT
46
+ ENV VITE_BRAND_NAME=$VITE_BRAND_NAME
47
+ ENV VITE_BRAND_LOGO=$VITE_BRAND_LOGO
48
+ ENV VITE_FOOTER_TEXT=$VITE_FOOTER_TEXT
49
+
50
+ ENV NODE_OPTIONS="--max-old-space-size=3072"
51
+
52
+ RUN npm run build:with-docs
53
+
54
+ # Production stage
55
+ FROM quay.io/nginx/nginx-unprivileged:stable-alpine-slim
56
+
57
+ LABEL org.opencontainers.image.source="https://github.com/alam00000/bentopdf"
58
+ LABEL org.opencontainers.image.url="https://github.com/alam00000/bentopdf"
59
+
60
+ # global arg to local arg
61
+ ARG BASE_URL
62
+
63
+ # Set this to "true" to disable Nginx listening on IPv6
64
+ ENV DISABLE_IPV6=false
65
+
66
+ COPY --chown=nginx:nginx --from=builder /app/dist /usr/share/nginx/html${BASE_URL%/}
67
+ COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
68
+ COPY --chown=nginx:nginx --chmod=755 nginx-ipv6.sh /docker-entrypoint.d/99-disable-ipv6.sh
69
+ RUN mkdir -p /etc/nginx/tmp && chown -R nginx:nginx /etc/nginx/tmp
70
+
71
+ EXPOSE 7860
72
+ CMD ["nginx", "-g", "daemon off;"]
Dockerfile.nonroot ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Non-root Dockerfile — supports PUID/PGID environment variables (LSIO-style)
2
+ # Usage: docker build -f Dockerfile.nonroot -t bentopdf .
3
+ # docker run -d -p 3000:8080 -e PUID=1000 -e PGID=1000 bentopdf
4
+
5
+ ARG BASE_URL=
6
+
7
+ # Build stage (identical to main Dockerfile)
8
+ FROM public.ecr.aws/docker/library/node:20-alpine AS builder
9
+ WORKDIR /app
10
+ COPY package*.json ./
11
+ COPY vendor ./vendor
12
+ ENV HUSKY=0
13
+ RUN npm config set fetch-retries 5 && \
14
+ npm config set fetch-retry-mintimeout 60000 && \
15
+ npm config set fetch-retry-maxtimeout 300000 && \
16
+ npm config set fetch-timeout 600000 && \
17
+ npm ci
18
+ COPY . .
19
+
20
+ ARG SIMPLE_MODE=false
21
+ ENV SIMPLE_MODE=$SIMPLE_MODE
22
+ ARG COMPRESSION_MODE=all
23
+ ENV COMPRESSION_MODE=$COMPRESSION_MODE
24
+
25
+ ARG BASE_URL
26
+ ENV BASE_URL=$BASE_URL
27
+
28
+ ARG VITE_WASM_PYMUPDF_URL
29
+ ARG VITE_WASM_GS_URL
30
+ ARG VITE_WASM_CPDF_URL
31
+ ENV VITE_WASM_PYMUPDF_URL=$VITE_WASM_PYMUPDF_URL
32
+ ENV VITE_WASM_GS_URL=$VITE_WASM_GS_URL
33
+ ENV VITE_WASM_CPDF_URL=$VITE_WASM_CPDF_URL
34
+
35
+ # Default UI language (e.g. en, fr, de, es, zh, ar)
36
+ ARG VITE_DEFAULT_LANGUAGE
37
+ ENV VITE_DEFAULT_LANGUAGE=$VITE_DEFAULT_LANGUAGE
38
+
39
+ # Custom branding (e.g. VITE_BRAND_NAME=MyCompany VITE_BRAND_LOGO=my-logo.svg)
40
+ ARG VITE_BRAND_NAME
41
+ ARG VITE_BRAND_LOGO
42
+ ARG VITE_FOOTER_TEXT
43
+ ENV VITE_BRAND_NAME=$VITE_BRAND_NAME
44
+ ENV VITE_BRAND_LOGO=$VITE_BRAND_LOGO
45
+ ENV VITE_FOOTER_TEXT=$VITE_FOOTER_TEXT
46
+
47
+ ENV NODE_OPTIONS="--max-old-space-size=3072"
48
+
49
+ RUN npm run build:with-docs
50
+
51
+ # Production stage — uses standard nginx (starts as root, drops to PUID/PGID)
52
+ FROM nginx:stable-alpine-slim
53
+
54
+ LABEL org.opencontainers.image.source="https://github.com/alam00000/bentopdf"
55
+ LABEL org.opencontainers.image.url="https://github.com/alam00000/bentopdf"
56
+
57
+ ARG BASE_URL
58
+
59
+ ENV PUID=1000
60
+ ENV PGID=1000
61
+ ENV DISABLE_IPV6=false
62
+
63
+ RUN apk add --no-cache su-exec
64
+
65
+ COPY --from=builder /app/dist /usr/share/nginx/html${BASE_URL%/}
66
+ COPY nginx.conf /etc/nginx/nginx.conf
67
+ COPY --chmod=755 entrypoint.sh /entrypoint.sh
68
+
69
+ RUN mkdir -p /etc/nginx/tmp \
70
+ /var/cache/nginx/client_temp \
71
+ /var/cache/nginx/proxy_temp \
72
+ /var/cache/nginx/fastcgi_temp \
73
+ /var/cache/nginx/uwsgi_temp \
74
+ /var/cache/nginx/scgi_temp
75
+
76
+ EXPOSE 8080
77
+ ENTRYPOINT ["/entrypoint.sh"]
78
+ CMD ["nginx", "-g", "daemon off;"]
ICLA.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BentoPDF Individual Contributor License Agreement (ICLA)
2
+
3
+ Thank you for your interest in contributing to BentoPDF. This Individual Contributor License Agreement ("Agreement") documents the rights granted by contributors to the Project.
4
+
5
+ By signing this Agreement, you accept and agree to the following terms and conditions for your present and future Contributions submitted to the Project.
6
+
7
+ ## 1. Definitions
8
+
9
+ **"You" (or "Your")** means the individual who is signing this Agreement and submitting Contributions to the Project.
10
+
11
+ **"Contribution"** means any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Project for inclusion in, or documentation of, the Project. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Project or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving the Project.
12
+
13
+ **"Project"** means the BentoPDF software project and all associated repositories, documentation, and related materials maintained at https://github.com/alam00000/bentopdf.
14
+
15
+ **"Project Owner"** means the owners and maintainers of the Project.
16
+
17
+ ## 2. Grant of Copyright License
18
+
19
+ Subject to the terms and conditions of this Agreement, You hereby grant to the Project Owner and to recipients of software distributed by the Project Owner a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to:
20
+
21
+ - Reproduce, prepare derivative works of, publicly display, publicly perform, and distribute Your Contributions and such derivative works
22
+ - Sublicense any or all of the foregoing rights to third parties
23
+ - **Relicense Your Contributions under any license**, including but not limited to proprietary licenses, commercial licenses, or any other open source license
24
+
25
+ This grant specifically enables the Project Owner to offer commercial licenses of the Project incorporating Your Contributions, consistent with the Project's dual licensing model (AGPL-3.0 for open source use, and a separate commercial license for proprietary use).
26
+
27
+ ## 3. Grant of Patent License
28
+
29
+ Subject to the terms and conditions of this Agreement, You hereby grant to the Project Owner and to recipients of software distributed by the Project Owner a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Contribution, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Project to which such Contribution(s) was submitted.
30
+
31
+ If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Project to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Project shall terminate as of the date such litigation is filed.
32
+
33
+ ## 4. Representations and Warranties
34
+
35
+ You represent and warrant that:
36
+
37
+ a) **Authority**: You are legally entitled to grant the above licenses. If Your employer(s) has rights to intellectual property that You create, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions, or that Your employer has executed a separate Corporate CLA with the Project.
38
+
39
+ b) **Originality**: Each of Your Contributions is Your original creation. You represent that Your Contributions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are aware and which are associated with any part of Your Contributions.
40
+
41
+ c) **No Conflicting Obligations**: Your Contribution does not violate any agreement or obligation You have with any third party.
42
+
43
+ d) **Accuracy**: All information You provide in connection with this Agreement and Your Contributions is accurate and complete.
44
+
45
+ ## 5. Moral Rights Waiver
46
+
47
+ To the fullest extent permitted under applicable law, You hereby waive, and agree not to assert, any and all moral rights You may have in or relating to Your Contributions, including without limitation:
48
+
49
+ - The right of attribution
50
+ - The right of integrity
51
+ - The right to object to derogatory treatment
52
+ - Any similar rights existing under the laws of any jurisdiction
53
+
54
+ You acknowledge that the Project Owner may modify, adapt, translate, or otherwise change Your Contributions without Your consent and without attribution.
55
+
56
+ ## 6. No Revocation
57
+
58
+ **This license grant is irrevocable.** Once You have submitted a Contribution under this Agreement, You may not revoke or withdraw the licenses granted herein. The Project Owner and all downstream recipients may continue to use, distribute, modify, and sublicense Your Contribution indefinitely.
59
+
60
+ ## 7. Retention of Copyright
61
+
62
+ You retain all right, title, and interest in and to the copyright of Your Contributions. Nothing in this Agreement is intended to transfer ownership of Your Contributions to the Project Owner. You are free to use Your Contributions for any other purpose.
63
+
64
+ ## 8. No Obligation
65
+
66
+ You understand that the decision to include Your Contribution in any project or source repository is entirely at the discretion of the Project Owner. The Project Owner is under no obligation to accept, use, or include any Contribution.
67
+
68
+ ## 9. Support and Warranty Disclaimer
69
+
70
+ Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
71
+
72
+ You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all.
73
+
74
+ ## 10. Notification
75
+
76
+ You agree to notify the Project Owner of any facts or circumstances of which You become aware that would make any of Your representations in this Agreement inaccurate in any respect.
77
+
78
+ ## 11. Governing Law
79
+
80
+ This Agreement shall be governed by and construed in accordance with the laws of India, without regard to its conflict of law provisions.
81
+
82
+ ---
83
+
84
+ ## Signature
85
+
86
+ By submitting a pull request or other Contribution to the Project, and by typing your name and date below (or by signing electronically via CLA Assistant), you agree to the terms of this Individual Contributor License Agreement.
87
+
88
+ **Full Legal Name:** Stephan Paternotte
89
+
90
+ **GitHub Username:** Stephan-P
91
+
92
+ **Email Address:** stephan@paternottes.net
93
+
94
+ **Date:** 20-12-2025
95
+
96
+ **Signature:** ___________________________
97
+
98
+ ---
99
+
100
+ *This CLA is based on the Apache Individual Contributor License Agreement and has been adapted for BentoPDF's dual licensing model.*
LICENSE ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
19
+
20
+ When we speak of free software, we are referring to freedom, not
21
+ price. Our General Public Licenses are designed to make sure that you
22
+ have the freedom to distribute copies of free software (and charge for
23
+ them if you wish), that you receive source code or can get it if you
24
+ want it, that you can change the software or use pieces of it in new
25
+ free programs, and that you know you can do these things.
26
+
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ TERMS AND CONDITIONS
60
+
61
+ 0. Definitions.
62
+
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
+
65
+ "Copyright" also means copyright-like laws that apply to other kinds of
66
+ works, such as semiconductor masks.
67
+
68
+ "The Program" refers to any copyrightable work licensed under this
69
+ License. Each licensee is addressed as "you". "Licensees" and
70
+ "recipients" may be individuals or organizations.
71
+
72
+ To "modify" a work means to copy from or adapt all or part of the work
73
+ in a fashion requiring copyright permission, other than the making of an
74
+ exact copy. The resulting work is called a "modified version" of the
75
+ earlier work or a work "based on" the earlier work.
76
+
77
+ A "covered work" means either the unmodified Program or a work based
78
+ on the Program.
79
+
80
+ To "propagate" a work means to do anything with it that, without
81
+ permission, would make you directly or secondarily liable for
82
+ infringement under applicable copyright law, except executing it on a
83
+ computer or modifying a private copy. Propagation includes copying,
84
+ distribution (with or without modification), making available to the
85
+ public, and in some countries other activities as well.
86
+
87
+ To "convey" a work means any kind of propagation that enables other
88
+ parties to make or receive copies. Mere interaction with a user through
89
+ a computer network, with no transfer of a copy, is not conveying.
90
+
91
+ An interactive user interface displays "Appropriate Legal Notices"
92
+ to the extent that it includes a convenient and prominently visible
93
+ feature that (1) displays an appropriate copyright notice, and (2)
94
+ tells the user that there is no warranty for the work (except to the
95
+ extent that warranties are provided), that licensees may convey the
96
+ work under this License, and how to view a copy of this License. If
97
+ the interface presents a list of user commands or options, such as a
98
+ menu, a prominent item in the list meets this criterion.
99
+
100
+ 1. Source Code.
101
+
102
+ The "source code" for a work means the preferred form of the work
103
+ for making modifications to it. "Object code" means any non-source
104
+ form of a work.
105
+
106
+ A "Standard Interface" means an interface that either is an official
107
+ standard defined by a recognized standards body, or, in the case of
108
+ interfaces specified for a particular programming language, one that
109
+ is widely used among developers working in that language.
110
+
111
+ The "System Libraries" of an executable work include anything, other
112
+ than the work as a whole, that (a) is included in the normal form of
113
+ packaging a Major Component, but which is not part of that Major
114
+ Component, and (b) serves only to enable use of the work with that
115
+ Major Component, or to implement a Standard Interface for which an
116
+ implementation is available to the public in source code form. A
117
+ "Major Component", in this context, means a major essential component
118
+ (kernel, window system, and so on) of the specific operating system
119
+ (if any) on which the executable work runs, or a compiler used to
120
+ produce the work, or an object code interpreter used to run it.
121
+
122
+ The "Corresponding Source" for a work in object code form means all
123
+ the source code needed to generate, install, and (for an executable
124
+ work) run the object code and to modify the work, including scripts to
125
+ control those activities. However, it does not include the work's
126
+ System Libraries, or general-purpose tools or generally available free
127
+ programs which are used unmodified in performing those activities but
128
+ which are not part of the work. For example, Corresponding Source
129
+ includes interface definition files associated with source files for
130
+ the work, and the source code for shared libraries and dynamically
131
+ linked subprograms that the work is specifically designed to require,
132
+ such as by intimate data communication or control flow between those
133
+ subprograms and other parts of the work.
134
+
135
+ The Corresponding Source need not include anything that users
136
+ can regenerate automatically from other parts of the Corresponding
137
+ Source.
138
+
139
+ The Corresponding Source for a work in source code form is that
140
+ same work.
141
+
142
+ 2. Basic Permissions.
143
+
144
+ All rights granted under this License are granted for the term of
145
+ copyright on the Program, and are irrevocable provided the stated
146
+ conditions are met. This License explicitly affirms your unlimited
147
+ permission to run the unmodified Program. The output from running a
148
+ covered work is covered by this License only if the output, given its
149
+ content, constitutes a covered work. This License acknowledges your
150
+ rights of fair use or other equivalent, as provided by copyright law.
151
+
152
+ You may make, run and propagate covered works that you do not
153
+ convey, without conditions so long as your license otherwise remains
154
+ in force. You may convey covered works to others for the sole purpose
155
+ of having them make modifications exclusively for you, or provide you
156
+ with facilities for running those works, provided that you comply with
157
+ the terms of this License in conveying all material for which you do
158
+ not control copyright. Those thus making or running the covered works
159
+ for you must do so exclusively on your behalf, under your direction
160
+ and control, on terms that prohibit them from making any copies of
161
+ your copyrighted material outside their relationship with you.
162
+
163
+ Conveying under any other circumstances is permitted solely under
164
+ the conditions stated below. Sublicensing is not allowed; section 10
165
+ makes it unnecessary.
166
+
167
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168
+
169
+ No covered work shall be deemed part of an effective technological
170
+ measure under any applicable law fulfilling obligations under article
171
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172
+ similar laws prohibiting or restricting circumvention of such
173
+ measures.
174
+
175
+ When you convey a covered work, you waive any legal power to forbid
176
+ circumvention of technological measures to the extent such circumvention
177
+ is effected by exercising rights under this License with respect to
178
+ the covered work, and you disclaim any intention to limit operation or
179
+ modification of the work as a means of enforcing, against the work's
180
+ users, your or third parties' legal rights to forbid circumvention of
181
+ technological measures.
182
+
183
+ 4. Conveying Verbatim Copies.
184
+
185
+ You may convey verbatim copies of the Program's source code as you
186
+ receive it, in any medium, provided that you conspicuously and
187
+ appropriately publish on each copy an appropriate copyright notice;
188
+ keep intact all notices stating that this License and any
189
+ non-permissive terms added in accord with section 7 apply to the code;
190
+ keep intact all notices of the absence of any warranty; and give all
191
+ recipients a copy of this License along with the Program.
192
+
193
+ You may charge any price or no price for each copy that you convey,
194
+ and you may offer support or warranty protection for a fee.
195
+
196
+ 5. Conveying Modified Source Versions.
197
+
198
+ You may convey a work based on the Program, or the modifications to
199
+ produce it from the Program, in the form of source code under the
200
+ terms of section 4, provided that you also meet all of these conditions:
201
+
202
+ a) The work must carry prominent notices stating that you modified
203
+ it, and giving a relevant date.
204
+
205
+ b) The work must carry prominent notices stating that it is
206
+ released under this License and any conditions added under section
207
+ 7. This requirement modifies the requirement in section 4 to
208
+ "keep intact all notices".
209
+
210
+ c) You must license the entire work, as a whole, under this
211
+ License to anyone who comes into possession of a copy. This
212
+ License will therefore apply, along with any applicable section 7
213
+ additional terms, to the whole of the work, and all its parts,
214
+ regardless of how they are packaged. This License gives no
215
+ permission to license the work in any other way, but it does not
216
+ invalidate such permission if you have separately received it.
217
+
218
+ d) If the work has interactive user interfaces, each must display
219
+ Appropriate Legal Notices; however, if the Program has interactive
220
+ interfaces that do not display Appropriate Legal Notices, your
221
+ work need not make them do so.
222
+
223
+ A compilation of a covered work with other separate and independent
224
+ works, which are not by their nature extensions of the covered work,
225
+ and which are not combined with it such as to form a larger program,
226
+ in or on a volume of a storage or distribution medium, is called an
227
+ "aggregate" if the compilation and its resulting copyright are not
228
+ used to limit the access or legal rights of the compilation's users
229
+ beyond what the individual works permit. Inclusion of a covered work
230
+ in an aggregate does not cause this License to apply to the other
231
+ parts of the aggregate.
232
+
233
+ 6. Conveying Non-Source Forms.
234
+
235
+ You may convey a covered work in object code form under the terms
236
+ of sections 4 and 5, provided that you also convey the
237
+ machine-readable Corresponding Source under the terms of this License,
238
+ in one of these ways:
239
+
240
+ a) Convey the object code in, or embodied in, a physical product
241
+ (including a physical distribution medium), accompanied by the
242
+ Corresponding Source fixed on a durable physical medium
243
+ customarily used for software interchange.
244
+
245
+ b) Convey the object code in, or embodied in, a physical product
246
+ (including a physical distribution medium), accompanied by a
247
+ written offer, valid for at least three years and valid for as
248
+ long as you offer spare parts or customer support for that product
249
+ model, to give anyone who possesses the object code either (1) a
250
+ copy of the Corresponding Source for all the software in the
251
+ product that is covered by this License, on a durable physical
252
+ medium customarily used for software interchange, for a price no
253
+ more than your reasonable cost of physically performing this
254
+ conveying of source, or (2) access to copy the
255
+ Corresponding Source from a network server at no charge.
256
+
257
+ c) Convey individual copies of the object code with a copy of the
258
+ written offer to provide the Corresponding Source. This
259
+ alternative is allowed only occasionally and noncommercially, and
260
+ only if you received the object code with such an offer, in accord
261
+ with subsection 6b.
262
+
263
+ d) Convey the object code by offering access from a designated
264
+ place (gratis or for a charge), and offer equivalent access to the
265
+ Corresponding Source in the same way through the same place at no
266
+ further charge. You need not require recipients to copy the
267
+ Corresponding Source along with the object code. If the place to
268
+ copy the object code is a network server, the Corresponding Source
269
+ may be on a different server (operated by you or a third party)
270
+ that supports equivalent copying facilities, provided you maintain
271
+ clear directions next to the object code saying where to find the
272
+ Corresponding Source. Regardless of what server hosts the
273
+ Corresponding Source, you remain obligated to ensure that it is
274
+ available for as long as needed to satisfy these requirements.
275
+
276
+ e) Convey the object code using peer-to-peer transmission, provided
277
+ you inform other peers where the object code and Corresponding
278
+ Source of the work are being offered to the general public at no
279
+ charge under subsection 6d.
280
+
281
+ A separable portion of the object code, whose source code is excluded
282
+ from the Corresponding Source as a System Library, need not be
283
+ included in conveying the object code work.
284
+
285
+ A "User Product" is either (1) a "consumer product", which means any
286
+ tangible personal property which is normally used for personal, family,
287
+ or household purposes, or (2) anything designed or sold for incorporation
288
+ into a dwelling. In determining whether a product is a consumer product,
289
+ doubtful cases shall be resolved in favor of coverage. For a particular
290
+ product received by a particular user, "normally used" refers to a
291
+ typical or common use of that class of product, regardless of the status
292
+ of the particular user or of the way in which the particular user
293
+ actually uses, or expects or is expected to use, the product. A product
294
+ is a consumer product regardless of whether the product has substantial
295
+ commercial, industrial or non-consumer uses, unless such uses represent
296
+ the only significant mode of use of the product.
297
+
298
+ "Installation Information" for a User Product means any methods,
299
+ procedures, authorization keys, or other information required to install
300
+ and execute modified versions of a covered work in that User Product from
301
+ a modified version of its Corresponding Source. The information must
302
+ suffice to ensure that the continued functioning of the modified object
303
+ code is in no case prevented or interfered with solely because
304
+ modification has been made.
305
+
306
+ If you convey an object code work under this section in, or with, or
307
+ specifically for use in, a User Product, and the conveying occurs as
308
+ part of a transaction in which the right of possession and use of the
309
+ User Product is transferred to the recipient in perpetuity or for a
310
+ fixed term (regardless of how the transaction is characterized), the
311
+ Corresponding Source conveyed under this section must be accompanied
312
+ by the Installation Information. But this requirement does not apply
313
+ if neither you nor any third party retains the ability to install
314
+ modified object code on the User Product (for example, the work has
315
+ been installed in ROM).
316
+
317
+ The requirement to provide Installation Information does not include a
318
+ requirement to continue to provide support service, warranty, or updates
319
+ for a work that has been modified or installed by the recipient, or for
320
+ the User Product in which it has been modified or installed. Access to a
321
+ network may be denied when the modification itself materially and
322
+ adversely affects the operation of the network or violates the rules and
323
+ protocols for communication across the network.
324
+
325
+ Corresponding Source conveyed, and Installation Information provided,
326
+ in accord with this section must be in a format that is publicly
327
+ documented (and with an implementation available to the public in
328
+ source code form), and must require no special password or key for
329
+ unpacking, reading or copying.
330
+
331
+ 7. Additional Terms.
332
+
333
+ "Additional permissions" are terms that supplement the terms of this
334
+ License by making exceptions from one or more of its conditions.
335
+ Additional permissions that are applicable to the entire Program shall
336
+ be treated as though they were included in this License, to the extent
337
+ that they are valid under applicable law. If additional permissions
338
+ apply only to part of the Program, that part may be used separately
339
+ under those permissions, but the entire Program remains governed by
340
+ this License without regard to the additional permissions.
341
+
342
+ When you convey a copy of a covered work, you may at your option
343
+ remove any additional permissions from that copy, or from any part of
344
+ it. (Additional permissions may be written to require their own
345
+ removal in certain cases when you modify the work.) You may place
346
+ additional permissions on material, added by you to a covered work,
347
+ for which you have or can give appropriate copyright permission.
348
+
349
+ Notwithstanding any other provision of this License, for material you
350
+ add to a covered work, you may (if authorized by the copyright holders of
351
+ that material) supplement the terms of this License with terms:
352
+
353
+ a) Disclaiming warranty or limiting liability differently from the
354
+ terms of sections 15 and 16 of this License; or
355
+
356
+ b) Requiring preservation of specified reasonable legal notices or
357
+ author attributions in that material or in the Appropriate Legal
358
+ Notices displayed by works containing it; or
359
+
360
+ c) Prohibiting misrepresentation of the origin of that material, or
361
+ requiring that modified versions of such material be marked in
362
+ reasonable ways as different from the original version; or
363
+
364
+ d) Limiting the use for publicity purposes of names of licensors or
365
+ authors of the material; or
366
+
367
+ e) Declining to grant rights under trademark law for use of some
368
+ trade names, trademarks, or service marks; or
369
+
370
+ f) Requiring indemnification of licensors and authors of that
371
+ material by anyone who conveys the material (or modified versions of
372
+ it) with contractual assumptions of liability to the recipient, for
373
+ any liability that these contractual assumptions directly impose on
374
+ those licensors and authors.
375
+
376
+ All other non-permissive additional terms are considered "further
377
+ restrictions" within the meaning of section 10. If the Program as you
378
+ received it, or any part of it, contains a notice stating that it is
379
+ governed by this License along with a term that is a further
380
+ restriction, you may remove that term. If a license document contains
381
+ a further restriction but permits relicensing or conveying under this
382
+ License, you may add to a covered work material governed by the terms
383
+ of that license document, provided that the further restriction does
384
+ not survive such relicensing or conveying.
385
+
386
+ If you add terms to a covered work in accord with this section, you
387
+ must place, in the relevant source files, a statement of the
388
+ additional terms that apply to those files, or a notice indicating
389
+ where to find the applicable terms.
390
+
391
+ Additional terms, permissive or non-permissive, may be stated in the
392
+ form of a separately written license, or stated as exceptions;
393
+ the above requirements apply either way.
394
+
395
+ 8. Termination.
396
+
397
+ You may not propagate or modify a covered work except as expressly
398
+ provided under this License. Any attempt otherwise to propagate or
399
+ modify it is void, and will automatically terminate your rights under
400
+ this License (including any patent licenses granted under the third
401
+ paragraph of section 11).
402
+
403
+ However, if you cease all violation of this License, then your
404
+ license from a particular copyright holder is reinstated (a)
405
+ provisionally, unless and until the copyright holder explicitly and
406
+ finally terminates your license, and (b) permanently, if the copyright
407
+ holder fails to notify you of the violation by some reasonable means
408
+ prior to 60 days after the cessation.
409
+
410
+ Moreover, your license from a particular copyright holder is
411
+ reinstated permanently if the copyright holder notifies you of the
412
+ violation by some reasonable means, this is the first time you have
413
+ received notice of violation of this License (for any work) from that
414
+ copyright holder, and you cure the violation prior to 30 days after
415
+ your receipt of the notice.
416
+
417
+ Termination of your rights under this section does not terminate the
418
+ licenses of parties who have received copies or rights from you under
419
+ this License. If your rights have been terminated and not permanently
420
+ reinstated, you do not qualify to receive new licenses for the same
421
+ material under section 10.
422
+
423
+ 9. Acceptance Not Required for Having Copies.
424
+
425
+ You are not required to accept this License in order to receive or
426
+ run a copy of the Program. Ancillary propagation of a covered work
427
+ occurring solely as a consequence of using peer-to-peer transmission
428
+ to receive a copy likewise does not require acceptance. However,
429
+ nothing other than this License grants you permission to propagate or
430
+ modify any covered work. These actions infringe copyright if you do
431
+ not accept this License. Therefore, by modifying or propagating a
432
+ covered work, you indicate your acceptance of this License to do so.
433
+
434
+ 10. Automatic Licensing of Downstream Recipients.
435
+
436
+ Each time you convey a covered work, the recipient automatically
437
+ receives a license from the original licensors, to run, modify and
438
+ propagate that work, subject to this License. You are not responsible
439
+ for enforcing compliance by third parties with this License.
440
+
441
+ An "entity transaction" is a transaction transferring control of an
442
+ organization, or substantially all assets of one, or subdividing an
443
+ organization, or merging organizations. If propagation of a covered
444
+ work results from an entity transaction, each party to that
445
+ transaction who receives a copy of the work also receives whatever
446
+ licenses to the work the party's predecessor in interest had or could
447
+ give under the previous paragraph, plus a right to possession of the
448
+ Corresponding Source of the work from the predecessor in interest, if
449
+ the predecessor has it or can get it with reasonable efforts.
450
+
451
+ You may not impose any further restrictions on the exercise of the
452
+ rights granted or affirmed under this License. For example, you may
453
+ not impose a license fee, royalty, or other charge for exercise of
454
+ rights granted under this License, and you may not initiate litigation
455
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
456
+ any patent claim is infringed by making, using, selling, offering for
457
+ sale, or importing the Program or any portion of it.
458
+
459
+ 11. Patents.
460
+
461
+ A "contributor" is a copyright holder who authorizes use under this
462
+ License of the Program or a work on which the Program is based. The
463
+ work thus licensed is called the contributor's "contributor version".
464
+
465
+ A contributor's "essential patent claims" are all patent claims
466
+ owned or controlled by the contributor, whether already acquired or
467
+ hereafter acquired, that would be infringed by some manner, permitted
468
+ by this License, of making, using, or selling its contributor version,
469
+ but do not include claims that would be infringed only as a
470
+ consequence of further modification of the contributor version. For
471
+ purposes of this definition, "control" includes the right to grant
472
+ patent sublicenses in a manner consistent with the requirements of
473
+ this License.
474
+
475
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
476
+ patent license under the contributor's essential patent claims, to
477
+ make, use, sell, offer for sale, import and otherwise run, modify and
478
+ propagate the contents of its contributor version.
479
+
480
+ In the following three paragraphs, a "patent license" is any express
481
+ agreement or commitment, however denominated, not to enforce a patent
482
+ (such as an express permission to practice a patent or covenant not to
483
+ sue for patent infringement). To "grant" such a patent license to a
484
+ party means to make such an agreement or commitment not to enforce a
485
+ patent against the party.
486
+
487
+ If you convey a covered work, knowingly relying on a patent license,
488
+ and the Corresponding Source of the work is not available for anyone
489
+ to copy, free of charge and under the terms of this License, through a
490
+ publicly available network server or other readily accessible means,
491
+ then you must either (1) cause the Corresponding Source to be so
492
+ available, or (2) arrange to deprive yourself of the benefit of the
493
+ patent license for this particular work, or (3) arrange, in a manner
494
+ consistent with the requirements of this License, to extend the patent
495
+ license to downstream recipients. "Knowingly relying" means you have
496
+ actual knowledge that, but for the patent license, your conveying the
497
+ covered work in a country, or your recipient's use of the covered work
498
+ in a country, would infringe one or more identifiable patents in that
499
+ country that you have reason to believe are valid.
500
+
501
+ If, pursuant to or in connection with a single transaction or
502
+ arrangement, you convey, or propagate by procuring conveyance of, a
503
+ covered work, and grant a patent license to some of the parties
504
+ receiving the covered work authorizing them to use, propagate, modify
505
+ or convey a specific copy of the covered work, then the patent license
506
+ you grant is automatically extended to all recipients of the covered
507
+ work and works based on it.
508
+
509
+ A patent license is "discriminatory" if it does not include within
510
+ the scope of its coverage, prohibits the exercise of, or is
511
+ conditioned on the non-exercise of one or more of the rights that are
512
+ specifically granted under this License. You may not convey a covered
513
+ work if you are a party to an arrangement with a third party that is
514
+ in the business of distributing software, under which you make payment
515
+ to the third party based on the extent of your activity of conveying
516
+ the work, and under which the third party grants, to any of the
517
+ parties who would receive the covered work from you, a discriminatory
518
+ patent license (a) in connection with copies of the covered work
519
+ conveyed by you (or copies made from those copies), or (b) primarily
520
+ for and in connection with specific products or compilations that
521
+ contain the covered work, unless you entered into that arrangement,
522
+ or that patent license was granted, prior to 28 March 2007.
523
+
524
+ Nothing in this License shall be construed as excluding or limiting
525
+ any implied license or other defenses to infringement that may
526
+ otherwise be available to you under applicable patent law.
527
+
528
+ 12. No Surrender of Others' Freedom.
529
+
530
+ If conditions are imposed on you (whether by court order, agreement or
531
+ otherwise) that contradict the conditions of this License, they do not
532
+ excuse you from the conditions of this License. If you cannot convey a
533
+ covered work so as to satisfy simultaneously your obligations under this
534
+ License and any other pertinent obligations, then as a consequence you may
535
+ not convey it at all. For example, if you agree to terms that obligate you
536
+ to collect a royalty for further conveying from those to whom you convey
537
+ the Program, the only way you could satisfy both those terms and this
538
+ License would be to refrain entirely from conveying the Program.
539
+
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
552
+
553
+ Notwithstanding any other provision of this License, you have
554
+ permission to link or combine any covered work with a work licensed
555
+ under version 3 of the GNU General Public License into a single
556
+ combined work, and to convey the resulting work. The terms of this
557
+ License will continue to apply to the part which is the covered work,
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
560
+
561
+ 14. Revised Versions of this License.
562
+
563
+ The Free Software Foundation may publish revised and/or new versions of
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
566
+ address new problems or concerns.
567
+
568
+ Each version is given a distinguishing version number. If the
569
+ Program specifies that a certain numbered version of the GNU Affero General
570
+ Public License "or any later version" applies to it, you have the
571
+ option of following the terms and conditions either of that numbered
572
+ version or of any later version published by the Free Software
573
+ Foundation. If the Program does not specify a version number of the
574
+ GNU Affero General Public License, you may choose any version ever published
575
+ by the Free Software Foundation.
576
+
577
+ If the Program specifies that a proxy can decide which future
578
+ versions of the GNU Affero General Public License can be used, that proxy's
579
+ public statement of acceptance of a version permanently authorizes you
580
+ to choose that version for the Program.
581
+
582
+ Later license versions may give you additional or different
583
+ permissions. However, no additional obligations are imposed on any
584
+ author or copyright holder as a result of your choosing to follow a
585
+ later version.
586
+
587
+ 15. Disclaimer of Warranty.
588
+
589
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597
+
598
+ 16. Limitation of Liability.
599
+
600
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608
+ SUCH DAMAGES.
609
+
610
+ 17. Interpretation of Sections 15 and 16.
611
+
612
+ If the disclaimer of warranty and limitation of liability provided
613
+ above cannot be given local legal effect according to their terms,
614
+ reviewing courts shall apply local law that most closely approximates
615
+ an absolute waiver of all civil liability in connection with the
616
+ Program, unless a warranty or assumption of liability accompanies a
617
+ copy of the Program in return for a fee.
618
+
619
+ END OF TERMS AND CONDITIONS
620
+
621
+ How to Apply These Terms to Your New Programs
622
+
623
+ If you develop a new program, and you want it to be of the greatest
624
+ possible use to the public, the best way to achieve this is to make it
625
+ free software which everyone can redistribute and change under these terms.
626
+
627
+ To do so, attach the following notices to the program. It is safest
628
+ to attach them to the start of each source file to most effectively
629
+ state the exclusion of warranty; and each file should have at least
630
+ the "copyright" line and a pointer to where the full notice is found.
631
+
632
+ <one line to give the program's name and a brief idea of what it does.>
633
+ Copyright (C) <year> <name of author>
634
+
635
+ This program is free software: you can redistribute it and/or modify
636
+ it under the terms of the GNU Affero General Public License as published
637
+ by the Free Software Foundation, either version 3 of the License, or
638
+ (at your option) any later version.
639
+
640
+ This program is distributed in the hope that it will be useful,
641
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
642
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
+ GNU Affero General Public License for more details.
644
+
645
+ You should have received a copy of the GNU Affero General Public License
646
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
647
+
648
+ Also add information on how to contact you by electronic and paper mail.
649
+
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
657
+
658
+ You should also get your employer (if you work as a programmer) or school,
659
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
661
+ <https://www.gnu.org/licenses/>.
README.md CHANGED
@@ -1,10 +1,1094 @@
1
  ---
2
- title: Termix
3
- emoji: 😻
4
- colorFrom: indigo
5
- colorTo: pink
6
  sdk: docker
7
- pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: BentoPDF
 
 
 
3
  sdk: docker
4
+ app_port: 7860
5
  ---
6
 
7
+ <p align="center"><img src="public/images/favicon-no-bg.svg" width="80"></p>
8
+ <h1 align="center">BentoPDF</h1>
9
+ <p align="center">
10
+ <a href="https://www.digitalocean.com/?refcode=d93c189ef6d0&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge">
11
+ <img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%203.svg" alt="DigitalOcean Referral Badge">
12
+ </a>
13
+ </p>
14
+
15
+ **BentoPDF** is a powerful, privacy-first, client-side PDF toolkit that is self hostable and allows you to manipulate, edit, merge, and process PDF files directly in your browser. No server-side processing is required, ensuring your files remain secure and private.
16
+
17
+ [![Docker Downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fghcr-badge.elias.eu.org%2Fapi%2Falam00000%2Fbentopdf%2Fbentopdf&query=%24.downloadCount&logo=docker&label=Docker%20Downloads&color=blue)](https://github.com/alam00000/bentopdf/pkgs/container/bentopdf) [![Ko-fi](https://img.shields.io/badge/Buy%20me%20a%20Coffee-yellow?logo=kofi&style=flat-square)](https://ko-fi.com/alio01) ![GitHub Stars](https://img.shields.io/github/stars/alam00000/bentopdf?style=social)
18
+ [![Sponsor me on GitHub](https://img.shields.io/badge/Sponsor-%E2%9D%A4-ff69b4)](https://github.com/sponsors/alam00000)
19
+
20
+ ![BentoPDF Tools](public/images/bentopdf-tools.png)
21
+
22
+ ---
23
+
24
+ ## Table of Contents
25
+
26
+ - [Join Us on Discord](#-join-us-on-discord)
27
+ - [Documentation](#-documentation)
28
+ - [Licensing](#-licensing)
29
+ - [Stargazers over time](#-stargazers-over-time)
30
+ - [Thank You to Our Sponsors](#-thank-you-to-our-sponsors)
31
+ - [Why BentoPDF?](#-why-bentopdf)
32
+ - [Features / Tools Supported](#️-features--tools-supported)
33
+ - [Organize & Manage PDFs](#organize--manage-pdfs)
34
+ - [Edit & Modify PDFs](#edit--modify-pdfs)
35
+ - [Convert to PDF](#convert-to-pdf)
36
+ - [Convert from PDF](#convert-from-pdf)
37
+ - [Secure & Optimize PDFs](#secure--optimize-pdfs)
38
+ - [Translations](#-translations)
39
+ - [Getting Started](#-getting-started)
40
+ - [Prerequisites](#prerequisites)
41
+ - [Quick Start](#-quick-start)
42
+ - [Static Hosting](#static-hosting-using-netlify-vercel-and-github-pages)
43
+ - [Self-Hosting Locally](#-self-hosting-locally)
44
+ - [Docker Compose / Podman Compose](#-run-with-docker-compose--podman-compose-recommended)
45
+ - [Podman Quadlet](#-podman-quadlet-systemd-integration)
46
+ - [Simple Mode](#-simple-mode-for-internal-use)
47
+ - [Custom Branding](#-custom-branding)
48
+ - [WASM Configuration](#wasm-configuration)
49
+ - [Air-Gapped / Offline Deployment](#air-gapped--offline-deployment)
50
+ - [Security Features](#-security-features)
51
+ - [Digital Signature CORS Proxy](#digital-signature-cors-proxy-required)
52
+ - [Version Management](#-version-management)
53
+ - [Development Setup](#-development-setup)
54
+ - [Tech Stack & Background](#️-tech-stack--background)
55
+ - [Roadmap](#️-roadmap)
56
+ - [Contributing](#-contributing)
57
+ - [Special Thanks](#special-thanks)
58
+
59
+ ---
60
+
61
+ ## 📢 Join Us on Discord
62
+
63
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Server-7289da?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/Bgq3Ay3f2w)
64
+
65
+ Have questions, feature requests, or want to chat with the community? Join our Discord server!
66
+
67
+ ---
68
+
69
+ ## 📚 Documentation
70
+
71
+ [![Documentation](https://img.shields.io/badge/Docs-VitePress-646cff?style=for-the-badge&logo=vite&logoColor=white)](https://bentopdf.com/docs/)
72
+
73
+ Visit our [Documentation](https://bentopdf.com/docs/) for:
74
+
75
+ - **Getting Started** guide
76
+ - **Tools Reference** (50+ tools)
77
+ - **Self-Hosting** guides (Docker, Vercel, Netlify, Cloudflare, AWS, Hostinger, Nginx, Apache)
78
+ - **Contributing** guide
79
+ - **Commercial License** details
80
+
81
+ ---
82
+
83
+ ## 📜 Licensing
84
+
85
+ BentoPDF is **dual-licensed** to fit your needs:
86
+
87
+ | License | Best For | Price |
88
+ | -------------- | -------------------------------------------- | ------------------ |
89
+ | **AGPL-3.0** | Open-source projects with public source code | **Free** |
90
+ | **Commercial** | Proprietary / closed-source applications | **$49** (lifetime) |
91
+
92
+ <p align="center">
93
+ <a href="https://buy.polar.sh/polar_cl_ThDfffbl733x7oAodcIryCzhlO57ZtcWPq6HJ1qMChd">
94
+ <img src="https://img.shields.io/badge/🚀_Get_Commercial_License-$49_Lifetime-6366f1?style=for-the-badge&labelColor=1f2937" alt="Get Commercial License">
95
+ </a>
96
+ </p>
97
+
98
+ > **One-time purchase** · **Unlimited devices & users** · **Lifetime updates** · **No AGPL obligations**
99
+
100
+ 📖 For more details, see our [Licensing Page](https://bentopdf.com/licensing.html)
101
+
102
+ ### AGPL Components (Pre-configured via CDN)
103
+
104
+ BentoPDF does **not** bundle AGPL-licensed processing libraries in its source code, but **pre-configures CDN URLs** so all features work out of the box with zero setup:
105
+
106
+ | Component | License | Features Enabled |
107
+ | ---------------------- | -------- | --------------------------------------------------------------------------------------------------- |
108
+ | **PyMuPDF** | AGPL-3.0 | PDF to Text/Markdown/SVG/DOCX, Extract Images/Tables, EPUB/MOBI/XPS conversion, Compression, Deskew |
109
+ | **Ghostscript** | AGPL-3.0 | PDF/A Conversion, Font to Outline |
110
+ | **CoherentPDF (CPDF)** | AGPL-3.0 | Merge, Split by Bookmarks, Table of Contents, PDF to/from JSON, Attachments |
111
+
112
+ > [!TIP]
113
+ > **Zero-config by default.** WASM modules are loaded at runtime from jsDelivr CDN. No manual configuration is needed. For custom deployments (air-gapped, self-hosted), see [WASM Configuration](#wasm-configuration) below.
114
+
115
+ <hr>
116
+
117
+ ## ⭐ Stargazers over time
118
+
119
+ [![Star History Chart](https://api.star-history.com/svg?repos=alam00000/bentopdf&type=Date)](https://star-history.com/#alam00000/bentopdf&Date)
120
+
121
+ ---
122
+
123
+ ## 💖 Thank You to Our Sponsors
124
+
125
+ We're incredibly grateful to all our sponsors and supporters who help keep BentoPDF free and open source!
126
+
127
+ [![Sponsor me on GitHub](https://img.shields.io/badge/Become%20a%20Sponsor-%E2%9D%A4-ff69b4?style=for-the-badge)](https://github.com/sponsors/alam00000)
128
+ [![Buy me a Coffee](https://img.shields.io/badge/Buy%20me%20a%20Coffee-yellow?style=for-the-badge&logo=kofi)](https://ko-fi.com/alio01)
129
+
130
+ <!-- sponsors -->
131
+ <!-- sponsors -->
132
+
133
+ ---
134
+
135
+ ## ✨ Why BentoPDF?
136
+
137
+ - **Privacy First**: All processing happens in your browser. Your files are never uploaded to a server, guaranteeing 100% privacy.
138
+ - **No Limits**: Manipulate as many files as you want, as often you want. There are no restrictions or upload limits.
139
+ - **High Performance**: Built with modern web technologies, BentoPDF is fast and efficient, handling even large PDF files with ease.
140
+ - **Completely Free**: BentoPDF is a free and open-source tool for everyone.
141
+
142
+ ---
143
+
144
+ ## 🛠️ Features / Tools Supported
145
+
146
+ BentoPDF offers a comprehensive suite of tools to handle all your PDF needs.
147
+
148
+ ### Organize & Manage PDFs
149
+
150
+ | Tool Name | Description |
151
+ | :--------------------------- | :------------------------------------------------------------------------------------------------------ |
152
+ | **Merge PDFs** | Combine multiple PDF files into one. Preserves Bookmarks. |
153
+ | **Split PDFs** | Extract specific pages or divide a document into smaller files. |
154
+ | **Organize Pages** | Reorder, duplicate, or delete pages with a simple drag-and-drop interface. |
155
+ | **Extract Pages** | Save a specific range of pages as a new PDF. |
156
+ | **Delete Pages** | Remove unwanted pages from your document. |
157
+ | **Rotate PDF** | Rotate individual or all pages in a document. |
158
+ | **Rotate by Custom Degrees** | Rotate pages by any custom angle. |
159
+ | **N-Up PDF** | Combine multiple pages onto a single page. |
160
+ | **View PDF** | A powerful, integrated PDF viewer. |
161
+ | **Alternate & Mix Pages** | Merge pages by alternating pages from each PDF. Preserves Bookmarks. |
162
+ | **Posterize PDF** | Split a PDF into multiple smaller pages for print. |
163
+ | **PDF Multi Tool** | Merge, Split, Organize, Delete, Rotate, Add Blank Pages, Extract and Duplicate in an unified interface. |
164
+ | **PDF Booklet** | Rearrange pages for double-sided booklet printing. Fold and staple to create a booklet. |
165
+ | **Add Attachments** | Embed one or more files into your PDF. |
166
+ | **Extract Attachments** | Extract all embedded files from PDF(s) as a ZIP. |
167
+ | **Edit Attachments** | View or remove attachments in your PDF. |
168
+ | **Divide Pages** | Divide pages horizontally or vertically. |
169
+ | **Combine to Single Page** | Stitch all pages into one continuous scroll. |
170
+ | **Add Blank Page** | Insert an empty page anywhere in your PDF. |
171
+ | **Reverse Pages** | Flip the order of all pages in your document. |
172
+ | **View Metadata** | Inspect the hidden properties of your PDF. |
173
+ | **PDFs to ZIP** | Package multiple PDF files into a ZIP archive. |
174
+ | **Compare PDFs** | Compare two PDFs side by side. |
175
+
176
+ ### Edit & Modify PDFs
177
+
178
+ | Tool Name | Description |
179
+ | :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
180
+ | **PDF Editor** | Annotate, highlight, redact, comment, add shapes/images, search, and view PDFs. |
181
+ | **Create Fillable Forms** | Create professional fillable PDF forms with text fields, checkboxes, dropdowns, radio buttons, signatures, and more. Fully compliant with PDF standards for compatibility with all PDF viewers. |
182
+ | **PDF Form Filler** | Fill in forms directly in the browser. Also supports XFA forms. |
183
+ | **Add Page Numbers** | Easily add page numbers with customizable formatting. |
184
+ | **Add Watermark** | Add text or image watermarks to protect your documents. |
185
+ | **Header & Footer** | Add customizable headers and footers. |
186
+ | **Crop PDF** | Crop specific pages or the entire document. |
187
+ | **Deskew PDF** | Automatically straighten tilted scanned pages using OpenCV. |
188
+ | **Font to Outline** | Convert all fonts to vector outlines for consistent rendering across all devices. |
189
+ | **Invert Colors** | Invert the colors of your PDF pages for better readability. |
190
+ | **Change Background** | Modify the background color of your PDF. |
191
+ | **Change Text Color** | Change the color of text content within the PDF. |
192
+ | **Flatten PDF** | Flatten form fields and annotations into static content. |
193
+ | **Remove Annotations** | Remove comments, highlights, and other annotations. |
194
+ | **Remove Blank Pages** | Auto detect and remove blank pages in a PDF. |
195
+ | **Edit Bookmarks** | Add, Edit, Create, Import and Export PDF Bookmarks. |
196
+ | **Add Stamps** | Add image stamps to your PDF using the annotation toolbar. |
197
+ | **Table of Contents** | Generate a table of contents page from PDF bookmarks. |
198
+ | **Redact Content** | Permanently remove sensitive content from your PDFs. |
199
+ | **Scanner Effect** | Make your PDF look like a scanned document. |
200
+ | **Adjust Colors** | Fine-tune brightness, contrast, saturation and more. |
201
+
202
+ ### Automate
203
+
204
+ | Tool Name | Description |
205
+ | :----------------------- | :--------------------------------------------------------------- |
206
+ | **PDF Workflow Builder** | Build custom PDF processing pipelines with a visual node editor. |
207
+
208
+ ### Convert to PDF
209
+
210
+ | Tool Name | Description |
211
+ | :-------------------- | :----------------------------------------------------------------------------------------------------- |
212
+ | **Image to PDF** | Convert JPG, PNG, BMP, GIF, TIFF, PNM, PGM, PBM, PPM, PAM, JXR, JPX, JP2, PSD, SVG, HEIC, WebP to PDF. |
213
+ | **JPG to PDF** | Convert JPG, JPEG, and JPEG2000 (JP2/JPX) images to PDF. |
214
+ | **PNG to PDF** | Convert PNG images to PDF. |
215
+ | **WebP to PDF** | Convert WebP images to PDF. |
216
+ | **SVG to PDF** | Convert SVG images to PDF. |
217
+ | **BMP to PDF** | Convert BMP images to PDF. |
218
+ | **HEIC to PDF** | Convert HEIC images to PDF. |
219
+ | **TIFF to PDF** | Convert TIFF images to PDF. |
220
+ | **PSD to PDF** | Convert Adobe Photoshop (PSD) files to PDF. |
221
+ | **Word to PDF** | Convert Word documents (DOCX, DOC, ODT, RTF) to PDF. |
222
+ | **Excel to PDF** | Convert Excel spreadsheets (XLSX, XLS, ODS, CSV) to PDF. |
223
+ | **PowerPoint to PDF** | Convert PowerPoint presentations (PPTX, PPT, ODP) to PDF. |
224
+ | **ODT to PDF** | Convert OpenDocument Text files to PDF. |
225
+ | **ODS to PDF** | Convert OpenDocument Spreadsheet (ODS) files to PDF. |
226
+ | **ODP to PDF** | Convert OpenDocument Presentation (ODP) files to PDF. |
227
+ | **ODG to PDF** | Convert OpenDocument Graphics (ODG) files to PDF. |
228
+ | **RTF to PDF** | Convert Rich Text Format documents to PDF. |
229
+ | **CSV to PDF** | Convert CSV spreadsheet files to PDF. |
230
+ | **Markdown to PDF** | Write or paste Markdown and export it as a beautifully formatted PDF. |
231
+ | **Text to PDF** | Convert plain text files into a PDF. |
232
+ | **JSON to PDF** | Convert JSON files to PDF. |
233
+ | **XML to PDF** | Convert XML documents to PDF. |
234
+ | **EPUB to PDF** | Convert EPUB e-books to PDF. |
235
+ | **MOBI to PDF** | Convert MOBI e-books to PDF. |
236
+ | **FB2 to PDF** | Convert FictionBook (FB2) e-books to PDF. |
237
+ | **CBZ to PDF** | Convert comic book archives (CBZ/CBR) to PDF. |
238
+ | **XPS to PDF** | Convert XPS/OXPS documents to PDF. |
239
+ | **Email to PDF** | Convert email files (EML, MSG) to PDF. Supports Outlook exports. |
240
+ | **Pages to PDF** | Convert Apple Pages documents to PDF. |
241
+ | **WPD to PDF** | Convert WordPerfect documents (WPD) to PDF. |
242
+ | **WPS to PDF** | Convert WPS Office documents to PDF. |
243
+ | **PUB to PDF** | Convert Microsoft Publisher (PUB) files to PDF. |
244
+ | **VSD to PDF** | Convert Microsoft Visio (VSD, VSDX) files to PDF. |
245
+
246
+ ### Convert from PDF
247
+
248
+ | Tool Name | Description |
249
+ | :------------------- | :----------------------------------------------------------------------------- |
250
+ | **PDF to Image** | Convert PDF pages to JPG, PNG, WebP, BMP, or TIFF formats. |
251
+ | **PDF to JPG** | Convert each PDF page into a JPG image. |
252
+ | **PDF to PNG** | Convert each PDF page into a PNG image. |
253
+ | **PDF to WebP** | Convert each PDF page into a WebP image. |
254
+ | **PDF to BMP** | Convert each PDF page into a BMP image. |
255
+ | **PDF to TIFF** | Convert each PDF page into a TIFF image. |
256
+ | **PDF to SVG** | Convert each page into a scalable vector graphic (SVG) for perfect quality. |
257
+ | **PDF to Greyscale** | Convert a color PDF into a black-and-white version. |
258
+ | **PDF to Text** | Extract text from PDF files and save as plain text (.txt). |
259
+ | **PDF to JSON** | Convert PDF files to JSON format. |
260
+ | **PDF to CSV** | Extract tables from PDF and convert to CSV format. |
261
+ | **PDF to Excel** | Extract tables from PDF and convert to Excel (XLSX) format. |
262
+ | **Extract Tables** | Extract tables from PDF files and export as CSV, JSON, or Markdown. |
263
+ | **OCR PDF** | Make scanned PDFs searchable and copyable using Optical Character Recognition. |
264
+
265
+ ### Secure & Optimize PDFs
266
+
267
+ | Tool Name | Description |
268
+ | :---------------------- | :--------------------------------------------------------------------------------------------------------- |
269
+ | **Compress PDF** | Reduce file size while maintaining quality. |
270
+ | **Repair PDF** | Attempt to repair and recover data from a corrupted PDF. |
271
+ | **Encrypt PDF** | Add a password to protect your PDF from unauthorized access. |
272
+ | **Decrypt PDF** | Remove password protection from a PDF (password required). |
273
+ | **Change Permissions** | Set or modify user permissions for printing, copying, and editing. |
274
+ | **Sign PDF** | Draw, type, or upload your signature. |
275
+ | **Digital Signature** | Add cryptographic digital signatures using X.509 certificates (PFX/PEM). Private key never leaves browser. |
276
+ | **Validate Signature** | Verify digital signatures, check certificate validity, and confirm document integrity. |
277
+ | **Redact Content** | Permanently remove sensitive content from your PDFs. |
278
+ | **Edit Metadata** | View and modify PDF metadata (author, title, keywords, etc.). |
279
+ | **Remove Metadata** | Strip all metadata from your PDF for privacy. |
280
+ | **Linearize PDF** | Optimize PDF for fast web viewing. |
281
+ | **Sanitize PDF** | Remove metadata, annotations, scripts, and more. |
282
+ | **Fix Page Size** | Standardize all pages to a uniform size. |
283
+ | **Page Dimensions** | Analyze page size, orientation, and units. |
284
+ | **Remove Restrictions** | Remove password protection and security restrictions associated with digitally signed PDF files. |
285
+
286
+ ---
287
+
288
+ ## 🌍 Translations
289
+
290
+ BentoPDF is available in multiple languages:
291
+
292
+ | Language | Status |
293
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
294
+ | English | [![English](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/en/common.json) |
295
+ | Chinese | [![Chinese](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/zh/common.json) |
296
+ | Traditional Chinese | [![Traditional Chinese](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/zh-TW/common.json) |
297
+ | French | [![French](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/fr/common.json) |
298
+ | German | [![German](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/de/common.json) |
299
+ | Indonesian | [![Indonesian](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/id/common.json) |
300
+ | Italian | [![Italian](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/it/common.json) |
301
+ | Portuguese | [![Portuguese](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/pt/common.json) |
302
+ | Turkish | [![Turkish](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/tr/common.json) |
303
+ | Vietnamese | [![Vietnamese](https://img.shields.io/badge/Complete-green?style=flat-square)](public/locales/vi/common.json) |
304
+
305
+ Want to help translate BentoPDF into your language? Check out our [Translation Guide](TRANSLATION.md)!
306
+
307
+ ---
308
+
309
+ ## 🚀 Getting Started
310
+
311
+ You can run BentoPDF locally for development or personal use.
312
+
313
+ ### Prerequisites
314
+
315
+ - [Node.js](https://nodejs.org/) (v18 or higher recommended)
316
+ - [npm](https://www.npmjs.com/) (or yarn/pnpm)
317
+ - [Docker](https://www.docker.com/) & [Docker Compose](https://docs.docker.com/compose/install/) (for containerized setup)
318
+
319
+ ### 🚀 Quick Start
320
+
321
+ Run BentoPDF instantly from GitHub Container Registry (Recommended):
322
+
323
+ ```bash
324
+ docker run -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
325
+ ```
326
+
327
+ Open your browser at: http://localhost:3000
328
+
329
+ <details>
330
+ <summary><b>Alternative: Using Docker Hub or Podman</b></summary>
331
+
332
+ **Docker Hub:**
333
+
334
+ ```bash
335
+ docker run -p 3000:8080 bentopdfteam/bentopdf:latest
336
+ ```
337
+
338
+ **Podman (GHCR):**
339
+
340
+ ```bash
341
+ podman run -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
342
+ ```
343
+
344
+ **Podman (Docker Hub):**
345
+
346
+ ```bash
347
+ podman run -p 3000:8080 docker.io/bentopdfteam/bentopdf:latest
348
+ ```
349
+
350
+ > [!NOTE]
351
+ > All `docker` commands in this documentation work with Podman by replacing `docker` with `podman`.
352
+
353
+ </details>
354
+
355
+ ### Static Hosting using Netlify, Vercel, and GitHub Pages
356
+
357
+ It is very straightforward to host your own instance of BentoPDF using a static web page hosting service. Plus, services such as Netlify, Vercel, and GitHub Pages all offer a free tier for getting started. See [Static Hosting](https://github.com/alam00000/bentopdf/blob/main/STATIC-HOSTING.md) for details.
358
+
359
+ ### 🏠 Self-Hosting Locally
360
+
361
+ Since BentoPDF is fully client-side, all processing happens in the user's browser and no server-side processing is required. This means you can host BentoPDF as simple static files on any web server or hosting platform.
362
+
363
+ **Download from Releases (Recommended):**
364
+
365
+ The easiest way to self-host is to download the pre-built distribution file from our [GitHub releases](https://github.com/alam00000/bentopdf/releases). Each release includes a `dist-{version}.zip` file that contains all necessary files for self-hosting.
366
+
367
+ 1. Go to [BentoPDF Releases](https://github.com/alam00000/bentopdf/releases)
368
+ 2. Download the latest `dist-{version}.zip` file
369
+ 3. Extract the zip file
370
+ 4. Serve the extracted folder with your preferred web server
371
+
372
+ **Serve the extracted folder (requires Node.js):**
373
+
374
+ ```bash
375
+ # Navigate to the extracted folder
376
+ cd dist-1.7.3 # Replace with your version
377
+
378
+ # Start a local server
379
+ npx http-server -c-1
380
+ ```
381
+
382
+ The website will be accessible at: `http://localhost:8080/`
383
+
384
+ > [!NOTE]
385
+ > The `-c-1` flag disables caching for development.
386
+
387
+ **Build from Source (Advanced):**
388
+
389
+ If you prefer to build from source:
390
+
391
+ ```bash
392
+ # Clone the repository
393
+ git clone https://github.com/alam00000/bentopdf.git
394
+ cd bentopdf
395
+
396
+ # Install dependencies
397
+ npm install
398
+
399
+ # Build the project
400
+ npm run build
401
+
402
+ # Package the distribution for hosting (optional)
403
+ npm run package
404
+
405
+ # Preview the build locally
406
+ npm run preview
407
+
408
+ # The website will be accessible at: http://localhost:4173/
409
+
410
+ ```
411
+
412
+ **Compression Modes:**
413
+
414
+ BentoPDF supports different compression modes for optimized builds:
415
+
416
+ ```bash
417
+ # Gzip only (smallest Docker image size)
418
+ npm run build:gzip
419
+ docker build --build-arg COMPRESSION_MODE=g -t bentopdf:gzip .
420
+
421
+ # Brotli only (best compression ratio)
422
+ npm run build:brotli
423
+ docker build --build-arg COMPRESSION_MODE=b -t bentopdf:brotli .
424
+
425
+ # No compression (fastest build time)
426
+ npm run build:original
427
+ docker build --build-arg COMPRESSION_MODE=o -t bentopdf:original .
428
+
429
+ # All formats (default, maximum browser compatibility)
430
+ npm run build:all
431
+ docker build --build-arg COMPRESSION_MODE=all -t bentopdf:all .
432
+ ```
433
+
434
+ | Mode | Files Kept | Use Case |
435
+ | ----- | ----------- | --------------------------------- |
436
+ | `g` | `.gz` only | Standard nginx or minimal size |
437
+ | `b` | `.br` only | Modern CDN with Brotli support |
438
+ | `o` | originals | Development or custom compression |
439
+ | `all` | all formats | Maximum compatibility (default) |
440
+
441
+ **CDN Optimization:**
442
+
443
+ BentoPDF can use jsDelivr CDN to serve large WASM files (LibreOffice, Ghostscript, PyMuPDF) for improved performance and reduced bandwidth costs:
444
+
445
+ ```bash
446
+ # Production build with CDN (Recommended)
447
+ VITE_USE_CDN=true npm run build
448
+
449
+ # Standard build with local files only
450
+ npm run build
451
+ ```
452
+
453
+ **How it works:**
454
+
455
+ - When `VITE_USE_CDN=true`: Browser loads WASM files from jsDelivr CDN (fast, global delivery)
456
+ - Local files are **always included** as automatic fallback
457
+ - If CDN fails then it falls back to local files
458
+
459
+ <h3 id="wasm-configuration">⚙️ WASM Configuration</h3>
460
+
461
+ Advanced PDF features (PyMuPDF, Ghostscript, CoherentPDF) are pre-configured to load from jsDelivr CDN via environment variables. This means **all features work out of the box** — no manual setup needed.
462
+
463
+ The default URLs are set in `.env.production`:
464
+
465
+ ```bash
466
+ VITE_WASM_PYMUPDF_URL=https://cdn.jsdelivr.net/npm/@bentopdf/pymupdf-wasm@0.11.14/
467
+ VITE_WASM_GS_URL=https://cdn.jsdelivr.net/npm/@bentopdf/gs-wasm/assets/
468
+ VITE_WASM_CPDF_URL=https://cdn.jsdelivr.net/npm/coherentpdf/dist/
469
+ ```
470
+
471
+ To override via Docker build args:
472
+
473
+ ```bash
474
+ docker build \
475
+ --build-arg VITE_WASM_PYMUPDF_URL=https://your-server.com/pymupdf/ \
476
+ --build-arg VITE_WASM_GS_URL=https://your-server.com/gs/ \
477
+ --build-arg VITE_WASM_CPDF_URL=https://your-server.com/cpdf/ \
478
+ -t bentopdf .
479
+ ```
480
+
481
+ To disable a module (require manual user config via Advanced Settings), set its variable to an empty string.
482
+
483
+ Users can also override these defaults per-browser via **Advanced Settings** in the UI — user overrides take priority over the environment defaults.
484
+
485
+ > [!IMPORTANT]
486
+ > These URLs are baked into the JavaScript at **build time**. The WASM files themselves are downloaded by the **user's browser** at runtime — Docker does not download them during the build.
487
+
488
+ <h3 id="air-gapped--offline-deployment">🔒 Air-Gapped / Offline Deployment</h3>
489
+
490
+ For networks with no internet access (government, healthcare, financial, etc.), you need to prepare everything on a machine **with** internet, then transfer the bundle into the isolated network.
491
+
492
+ #### Automated Script (Recommended)
493
+
494
+ The included `prepare-airgap.sh` script automates the entire process — downloading WASM packages, building the Docker image, exporting everything into a self-contained bundle with a setup script.
495
+
496
+ ```bash
497
+ git clone https://github.com/alam00000/bentopdf.git
498
+ cd bentopdf
499
+
500
+ # Interactive mode — prompts for all options
501
+ bash scripts/prepare-airgap.sh
502
+
503
+ # Or fully automated
504
+ bash scripts/prepare-airgap.sh --wasm-base-url https://internal.example.com/wasm
505
+ ```
506
+
507
+ This produces a bundle directory containing:
508
+
509
+ ```
510
+ bentopdf-airgap-bundle/
511
+ bentopdf.tar # Docker image
512
+ *.tgz # WASM packages (PyMuPDF, Ghostscript, CoherentPDF)
513
+ setup.sh # Setup script for the air-gapped side
514
+ README.md # Instructions
515
+ ```
516
+
517
+ **Transfer the bundle** into the air-gapped network via USB, internal artifact repo, or approved method. Then run the included setup script:
518
+
519
+ ```bash
520
+ cd bentopdf-airgap-bundle
521
+ bash setup.sh
522
+ ```
523
+
524
+ The setup script loads the Docker image, extracts WASM files, and optionally starts the container.
525
+
526
+ <details>
527
+ <summary><strong>Script options</strong></summary>
528
+
529
+ | Flag | Description | Default |
530
+ | ----------------------- | ------------------------------------------------ | --------------------------------- |
531
+ | `--wasm-base-url <url>` | Where WASMs will be hosted internally | _(required, prompted if missing)_ |
532
+ | `--image-name <name>` | Docker image tag | `bentopdf` |
533
+ | `--output-dir <path>` | Output bundle directory | `./bentopdf-airgap-bundle` |
534
+ | `--simple-mode` | Enable Simple Mode | off |
535
+ | `--base-url <path>` | Subdirectory base URL (e.g. `/pdf/`) | `/` |
536
+ | `--language <code>` | Default UI language (e.g. `fr`, `de`) | _(none)_ |
537
+ | `--brand-name <name>` | Custom brand name | _(none)_ |
538
+ | `--brand-logo <path>` | Logo path relative to `public/` | _(none)_ |
539
+ | `--footer-text <text>` | Custom footer text | _(none)_ |
540
+ | `--dockerfile <path>` | Dockerfile to use | `Dockerfile` |
541
+ | `--skip-docker` | Skip Docker build and export | off |
542
+ | `--skip-wasm` | Skip WASM download (reuse existing `.tgz` files) | off |
543
+
544
+ </details>
545
+
546
+ > [!IMPORTANT]
547
+ > WASM files must be served from the **same origin** as the BentoPDF app. Web Workers use `importScripts()` which cannot load scripts cross-origin. For example, if BentoPDF runs at `https://internal.example.com`, the WASM base URL should also be `https://internal.example.com/wasm`.
548
+
549
+ #### Manual Steps
550
+
551
+ <details>
552
+ <summary>If you prefer to do it manually without the script</summary>
553
+
554
+ **Step 1: Download the WASM packages** (on a machine with internet)
555
+
556
+ ```bash
557
+ npm pack @bentopdf/pymupdf-wasm@0.11.14
558
+ npm pack @bentopdf/gs-wasm
559
+ npm pack coherentpdf
560
+ ```
561
+
562
+ **Step 2: Build the Docker image with internal URLs**
563
+
564
+ ```bash
565
+ git clone https://github.com/alam00000/bentopdf.git
566
+ cd bentopdf
567
+
568
+ docker build \
569
+ --build-arg VITE_WASM_PYMUPDF_URL=https://internal-server.example.com/wasm/pymupdf/ \
570
+ --build-arg VITE_WASM_GS_URL=https://internal-server.example.com/wasm/gs/ \
571
+ --build-arg VITE_WASM_CPDF_URL=https://internal-server.example.com/wasm/cpdf/ \
572
+ -t bentopdf .
573
+ ```
574
+
575
+ **Step 3: Export the Docker image**
576
+
577
+ ```bash
578
+ docker save bentopdf -o bentopdf.tar
579
+ ```
580
+
581
+ **Step 4: Transfer into the air-gapped network**
582
+
583
+ Copy these files via USB drive, internal artifact repository, or approved transfer method:
584
+
585
+ - `bentopdf.tar` — the Docker image
586
+ - `bentopdf-pymupdf-wasm-0.11.14.tgz` — PyMuPDF WASM package
587
+ - `bentopdf-gs-wasm-*.tgz` — Ghostscript WASM package
588
+ - `coherentpdf-*.tgz` — CoherentPDF WASM package
589
+
590
+ **Step 5: Set up inside the air-gapped network**
591
+
592
+ ```bash
593
+ # Load the Docker image
594
+ docker load -i bentopdf.tar
595
+
596
+ # Extract the WASM packages
597
+ mkdir -p ./wasm/pymupdf ./wasm/gs ./wasm/cpdf
598
+ tar xzf bentopdf-pymupdf-wasm-0.11.14.tgz -C ./wasm/pymupdf --strip-components=1
599
+ tar xzf bentopdf-gs-wasm-*.tgz -C ./wasm/gs --strip-components=1
600
+ tar xzf coherentpdf-*.tgz -C ./wasm/cpdf --strip-components=1
601
+
602
+ # Run BentoPDF
603
+ docker run -d -p 3000:8080 --restart unless-stopped bentopdf
604
+ ```
605
+
606
+ Make sure the WASM files are accessible at the URLs you configured in Step 2.
607
+
608
+ </details>
609
+
610
+ > [!NOTE]
611
+ > If you're building from source instead of Docker, set the variables in `.env.production` before running `npm run build`:
612
+ >
613
+ > ```bash
614
+ > VITE_WASM_PYMUPDF_URL=https://internal-server.example.com/wasm/pymupdf/
615
+ > VITE_WASM_GS_URL=https://internal-server.example.com/wasm/gs/
616
+ > VITE_WASM_CPDF_URL=https://internal-server.example.com/wasm/cpdf/
617
+ > ```
618
+
619
+ **Subdirectory Hosting:**
620
+
621
+ BentoPDF can also be hosted from a subdirectory (e.g., `example.com/tools/bentopdf/`):
622
+
623
+ ```bash
624
+
625
+ # Example:
626
+ # 1. Build the app with the specific BASE_URL. BASE_URL must have a trailing and leading slash. The BASE_URL can be any url of your choice. Here we are using /tools/bentopdf/ as an example.
627
+
628
+ BASE_URL=/tools/bentopdf/ npm run build
629
+
630
+ # 2. Create the nested directory structure inside serve-test (or any folder of your choice for local testing. In case of production, create the nested directory structure inside the root directory)
631
+ mkdir -p serve-test/tools/bentopdf
632
+
633
+ # 3. Copy all files from the 'dist' folder into that nested directory
634
+ cp -r dist/* serve-test/tools/bentopdf/
635
+
636
+ # 4. Serve the 'serve-test' folder
637
+ npx serve serve-test
638
+ ```
639
+
640
+ The website can be accessible at: `http://localhost:3000/tools/bentopdf/`
641
+
642
+ The `npm run package` command creates a `dist-{version}.zip` file that you can use for self-hosting.
643
+
644
+ **Docker Subdirectory Deployment:**
645
+
646
+ BentoPDF's Docker image also supports the `BASE_URL` build argument for subdirectory deployments:
647
+
648
+ ```bash
649
+ # Build for subdirectory deployment
650
+ docker build --build-arg BASE_URL=/bentopdf/ -t bentopdf .
651
+
652
+ # Run the container
653
+ docker run -p 3000:8080 bentopdf
654
+
655
+ # The app will be accessible at http://localhost:3000/bentopdf/
656
+ ```
657
+
658
+ **Default Language:**
659
+
660
+ Set the default UI language at build time. Users can still switch languages — this only changes the initial default. Supported: `en`, `ar`, `be`, `fr`, `de`, `es`, `zh`, `zh-TW`, `vi`, `tr`, `id`, `it`, `pt`, `nl`, `da`.
661
+
662
+ ```bash
663
+ docker build --build-arg VITE_DEFAULT_LANGUAGE=fr -t bentopdf .
664
+ ```
665
+
666
+ **Combined with Simple Mode:**
667
+
668
+ ```bash
669
+ # Build with both BASE_URL and SIMPLE_MODE
670
+ docker build \
671
+ --build-arg BASE_URL=/tools/pdf/ \
672
+ --build-arg SIMPLE_MODE=true \
673
+ -t bentopdf-simple .
674
+
675
+ docker run -p 3000:8080 bentopdf-simple
676
+ ```
677
+
678
+ > [!IMPORTANT]
679
+ >
680
+ > - Always include trailing slashes in `BASE_URL` (e.g., `/bentopdf/` not `/bentopdf`)
681
+ > - The default value is `/` for root deployment
682
+
683
+ ### 🚀 Run with Docker Compose / Podman Compose (Recommended)
684
+
685
+ For a more robust setup with auto-restart capabilities:
686
+
687
+ 1. **Download the repo and create a `docker-compose.yml` file or use the one given in repo**:
688
+
689
+ ```yaml
690
+ services:
691
+ bentopdf:
692
+ image: ghcr.io/alam00000/bentopdf:latest # Recommended
693
+ # image: bentopdfteam/bentopdf:latest # Alternative: Docker Hub
694
+ container_name: bentopdf
695
+ ports:
696
+ - '3000:8080'
697
+ restart: unless-stopped
698
+ ```
699
+
700
+ 2. **Start the application**:
701
+
702
+ ```bash
703
+ # Docker Compose
704
+ docker-compose up -d
705
+
706
+ # Podman Compose
707
+ podman-compose up -d
708
+ ```
709
+
710
+ The application will be available at `http://localhost:3000`.
711
+
712
+ ### 🐧 Podman Quadlet (Systemd Integration)
713
+
714
+ For Linux production deployments, you can run BentoPDF as a systemd service using [Podman Quadlet](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html).
715
+
716
+ Create `~/.config/containers/systemd/bentopdf.container`:
717
+
718
+ ```ini
719
+ [Unit]
720
+ Description=BentoPDF - Privacy-first PDF toolkit
721
+ After=network-online.target
722
+
723
+ [Container]
724
+ Image=ghcr.io/alam00000/bentopdf:latest
725
+ ContainerName=bentopdf
726
+ PublishPort=3000:8080
727
+ AutoUpdate=registry
728
+
729
+ [Service]
730
+ Restart=always
731
+
732
+ [Install]
733
+ WantedBy=default.target
734
+ ```
735
+
736
+ Then enable and start:
737
+
738
+ ```bash
739
+ systemctl --user daemon-reload
740
+ systemctl --user enable --now bentopdf
741
+ ```
742
+
743
+ For detailed Quadlet configuration, see [Self-Hosting Docker Guide](https://bentopdf.com/docs/self-hosting/docker).
744
+
745
+ ### 🏢 Simple Mode for Internal Use
746
+
747
+ For organizations that want a clean, distraction-free interface focused solely on PDF tools, BentoPDF supports a **Simple Mode** that hides all branding and marketing content.
748
+
749
+ **What Simple Mode does:**
750
+
751
+ - Hides navigation, hero section, features, FAQ, testimonials, and footer
752
+ - Shows only the essential PDF tools
753
+ - Updates page title to "PDF Tools"
754
+ - Perfect for internal company tools and educational institutions
755
+
756
+ For more details, see [SIMPLE_MODE.md](SIMPLE_MODE.md).
757
+
758
+ ### 🎨 Custom Branding
759
+
760
+ Replace the default BentoPDF logo, name, and footer text with your own. Branding is configured via environment variables at **build time** and works across all deployment methods (Docker, static hosting, air-gapped VMs).
761
+
762
+ | Variable | Description | Default |
763
+ | ------------------ | --------------------------------------- | --------------------------------------- |
764
+ | `VITE_BRAND_NAME` | Brand name shown in header and footer | `BentoPDF` |
765
+ | `VITE_BRAND_LOGO` | Path to logo file relative to `public/` | `images/favicon-no-bg.svg` |
766
+ | `VITE_FOOTER_TEXT` | Custom footer/copyright text | `© 2026 BentoPDF. All rights reserved.` |
767
+
768
+ **Docker:**
769
+
770
+ ```bash
771
+ docker build \
772
+ --build-arg VITE_BRAND_NAME="AcmePDF" \
773
+ --build-arg VITE_BRAND_LOGO="images/acme-logo.svg" \
774
+ --build-arg VITE_FOOTER_TEXT="© 2026 Acme Corp. Internal use only." \
775
+ -t acmepdf .
776
+ ```
777
+
778
+ **Building from source:**
779
+
780
+ Place your logo in the `public/` folder, then build:
781
+
782
+ ```bash
783
+ VITE_BRAND_NAME="AcmePDF" \
784
+ VITE_BRAND_LOGO="images/acme-logo.svg" \
785
+ VITE_FOOTER_TEXT="© 2026 Acme Corp. Internal use only." \
786
+ npm run build
787
+ ```
788
+
789
+ Or set the values in `.env.production` before building.
790
+
791
+ > [!TIP]
792
+ > Branding works in both full mode and Simple Mode. You can combine it with other build-time options like `SIMPLE_MODE`, `BASE_URL`, and `VITE_DEFAULT_LANGUAGE`.
793
+
794
+ ### 🔒 Security Features
795
+
796
+ BentoPDF runs as a non-root user using nginx-unprivileged for enhanced security:
797
+
798
+ - **Non-Root Execution**: Container runs with minimal privileges using nginx-unprivileged
799
+ - **Port 8080**: Uses high port number to avoid requiring root privileges
800
+ - **Security Best Practices**: Follows Principle of Least Privilege
801
+
802
+ #### Basic Usage
803
+
804
+ ```bash
805
+ docker build -t bentopdf .
806
+ docker run -p 8080:8080 bentopdf
807
+ ```
808
+
809
+ #### Custom User ID (PUID/PGID)
810
+
811
+ For environments that require running as a specific non-root user (e.g., NAS devices, Kubernetes with security contexts), use the non-root Dockerfile:
812
+
813
+ ```bash
814
+ # Build the non-root image
815
+ docker build -f Dockerfile.nonroot -t bentopdf-nonroot .
816
+
817
+ # Run with custom UID/GID
818
+ docker run -d -p 3000:8080 -e PUID=1000 -e PGID=1000 bentopdf-nonroot
819
+ ```
820
+
821
+ | Variable | Description | Default |
822
+ | -------- | ------------------ | ------- |
823
+ | `PUID` | User ID to run as | `1000` |
824
+ | `PGID` | Group ID to run as | `1000` |
825
+
826
+ > [!NOTE]
827
+ > The standard `Dockerfile` uses `nginx-unprivileged` (UID 101) and is recommended for most deployments. Use `Dockerfile.nonroot` only when you need a specific UID/GID.
828
+
829
+ For detailed security configuration, see [SECURITY.md](SECURITY.md).
830
+
831
+ ### Digital Signature CORS Proxy (Required)
832
+
833
+ The **Digital Signature** tool uses a signing library that may need to fetch certificate chain data from certificate authority provider. Since many certificate servers don't include CORS headers, a proxy is required for this feature to work in the browser.
834
+
835
+ **When is the proxy needed?**
836
+
837
+ - Only when using the Digital Signature tool
838
+ - Only if your certificate requires fetching issuer certificates from external URLs
839
+ - Self-signed certificates typically don't need this
840
+
841
+ **Deploying the CORS Proxy (Cloudflare Workers):**
842
+
843
+ 1. **Navigate to the cloudflare directory:**
844
+
845
+ ```bash
846
+ cd cloudflare
847
+ ```
848
+
849
+ 2. **Login to Cloudflare (if not already):**
850
+
851
+ ```bash
852
+ npx wrangler login
853
+ ```
854
+
855
+ 3. **Deploy the worker:**
856
+
857
+ ```bash
858
+ npx wrangler deploy
859
+ ```
860
+
861
+ 4. **Note your worker URL** (e.g., `https://bentopdf-cors-proxy.your-subdomain.workers.dev`)
862
+
863
+ 5. **Set the environment variable when building:**
864
+ ```bash
865
+ VITE_CORS_PROXY_URL=https://your-worker-url.workers.dev npm run build
866
+ ```
867
+
868
+ #### Production Security Features
869
+
870
+ The CORS proxy includes several security measures:
871
+
872
+ | Feature | Description |
873
+ | ----------------------- | ------------------------------------------------------------------------- |
874
+ | **URL Restrictions** | Only allows certificate URLs (`.crt`, `.cer`, `.pem`, `/certs/`, `/ocsp`) |
875
+ | **Private IP Blocking** | Blocks requests to localhost, 10.x, 192.168.x, 172.16-31.x |
876
+ | **File Size Limit** | Rejects files larger than 10MB |
877
+ | **Rate Limiting** | 60 requests per IP per minute (requires KV) |
878
+ | **HMAC Signatures** | Optional client-side signing (limited protection) |
879
+
880
+ #### Enabling Rate Limiting (Recommended)
881
+
882
+ Rate limiting requires Cloudflare KV storage:
883
+
884
+ ```bash
885
+ cd cloudflare
886
+
887
+ # Create KV namespace
888
+ npx wrangler kv namespace create "RATE_LIMIT_KV"
889
+
890
+ # Copy the returned ID and add to wrangler.toml:
891
+ # [[kv_namespaces]]
892
+ # binding = "RATE_LIMIT_KV"
893
+ # id = "YOUR_ID_HERE"
894
+
895
+ # Redeploy
896
+ npx wrangler deploy
897
+ ```
898
+
899
+ **Free tier limits:** 100,000 reads/day, 1,000 writes/day (~300-500 signatures/day)
900
+
901
+ #### HMAC Signature Verification (Optional)
902
+
903
+ > [!WARNING]
904
+ > Client-side secrets can be extracted from bundled JavaScript. For production deployments with sensitive requirements, use your own backend server to proxy requests instead of embedding secrets in frontend code.
905
+
906
+ BentoPDF uses client-side HMAC as a deterrent against casual abuse, but accepts this tradeoff due to its fully client-side architecture. To enable:
907
+
908
+ ```bash
909
+ # Generate a secret
910
+ openssl rand -hex 32
911
+
912
+ # Set on Cloudflare Worker
913
+ npx wrangler secret put PROXY_SECRET
914
+
915
+ # Set in build environment
916
+ VITE_CORS_PROXY_SECRET=your-secret npm run build
917
+ ```
918
+
919
+ ### 📦 Version Management
920
+
921
+ BentoPDF supports semantic versioning with multiple container tags available:
922
+
923
+ **GitHub Container Registry (Recommended):**
924
+
925
+ - **Latest**: `ghcr.io/alam00000/bentopdf:latest`
926
+ - **Specific Version**: `ghcr.io/alam00000/bentopdf:1.0.0`
927
+ - **Version with Prefix**: `ghcr.io/alam00000/bentopdf:v1.0.0`
928
+
929
+ **Docker Hub:**
930
+
931
+ - **Latest**: `bentopdfteam/bentopdf:latest`
932
+ - **Specific Version**: `bentopdfteam/bentopdf:1.0.0`
933
+ - **Version with Prefix**: `bentopdfteam/bentopdf:v1.0.0`
934
+
935
+ #### Quick Release
936
+
937
+ ```bash
938
+ # Release a patch version (0.0.1 → 0.0.2)
939
+ npm run release
940
+
941
+ # Release a minor version (0.0.1 → 0.1.0)
942
+ npm run release:minor
943
+
944
+ # Release a major version (0.0.1 → 1.0.0)
945
+ npm run release:major
946
+ ```
947
+
948
+ For detailed release instructions, see [RELEASE.md](RELEASE.md).
949
+
950
+ ### 🚀 Development Setup
951
+
952
+ #### Option 1: Run with npm
953
+
954
+ 1. **Clone the Repository**:
955
+
956
+ ```bash
957
+ git clone https://github.com/alam00000/bentopdf.git
958
+ cd bentopdf
959
+ ```
960
+
961
+ 2. **Install Dependencies**:
962
+
963
+ ```bash
964
+ npm install
965
+ ```
966
+
967
+ 3. **Run the Development Server**:
968
+ ```bash
969
+ npm run dev
970
+ ```
971
+ The application will be available at `http://localhost:5173`.
972
+
973
+ #### Option 2: Build and Run with Docker Compose
974
+
975
+ 1. **Clone the Repository**:
976
+
977
+ ```bash
978
+ git clone https://github.com/alam00000/bentopdf.git
979
+ cd bentopdf
980
+ ```
981
+
982
+ 2. **Run with Docker Compose**:
983
+
984
+ ```bash
985
+ docker-compose -f docker-compose.dev.yml up -d
986
+ ```
987
+
988
+ The application will be available at `http://localhost:3000`.
989
+
990
+ > [!NOTE]
991
+ > After making any local changes to the code, rebuild the Docker image using:
992
+
993
+ ```bash
994
+ docker-compose -f docker-compose.dev.yml up --build -d
995
+ ```
996
+
997
+ This ensures your latest changes are applied inside the container.
998
+
999
+ ---
1000
+
1001
+ ## 🛠️ Tech Stack & Background
1002
+
1003
+ BentoPDF was originally built using **HTML**, **CSS**, and **vanilla JavaScript**. As the project grew, it was migrated to a modern stack for better maintainability and scalability:
1004
+
1005
+ - **Vite**: A fast build tool for modern web development.
1006
+ - **TypeScript**: For type safety and an improved developer experience.
1007
+ - **Tailwind CSS**: For rapid and consistent UI development.
1008
+
1009
+ > [!NOTE]
1010
+ > Some parts of the codebase still use legacy structures from the original implementation. Contributors should expect gradual updates as testing and refactoring continue.
1011
+
1012
+ ---
1013
+
1014
+ ## 🗺️ Roadmap
1015
+
1016
+ ### Planned Features:
1017
+
1018
+ - **HTML to PDF**: Convert HTML files or web pages into PDF documents.
1019
+ - **Markdown to PDF**: Enhanced support for converting `.md` files to PDF.
1020
+ - **Convert to PDF/A**: Convert PDFs to the PDF/A archival format.
1021
+ - **Edit PDF Content**: Directly edit text and other content within your PDF.
1022
+ - **PDF to Office**: Converts PDF files into editable Word, Excel, and PowerPoint formats.
1023
+ - **Office to PDF**: Converts Word, Excel, and PowerPoint documents into optimized PDFs.
1024
+
1025
+ Contributions and discussions on the roadmap are welcome! Join the conversation via [Discord](https://discord.gg/Bgq3Ay3f2w).
1026
+
1027
+ ---
1028
+
1029
+ ## 🤝 Contributing
1030
+
1031
+ We welcome contributions from the community! Here's how you can get started:
1032
+
1033
+ 1. **Fork the repository** and create your branch from `main`.
1034
+ 2. Follow the **Getting Started** steps to set up your local environment.
1035
+ 3. Make your changes and commit them with a clear message.
1036
+ 4. **Open a Pull Request** and describe the changes you've made.
1037
+
1038
+ Have an idea for a new tool or an improvement? [Open an issue](https://github.com/alam00000/bentopdf/issues) to discuss it first.
1039
+
1040
+ ### 📖 Contributing to Documentation
1041
+
1042
+ Our documentation is built with [VitePress](https://vitepress.dev/). Here's how to contribute:
1043
+
1044
+ ```bash
1045
+ # Install dependencies
1046
+ npm install
1047
+
1048
+ # Start docs dev server
1049
+ npm run docs:dev
1050
+
1051
+ # Build docs for production
1052
+ npm run docs:build
1053
+
1054
+ # Preview the built docs
1055
+ npm run docs:preview
1056
+ ```
1057
+
1058
+ Documentation files are in the `docs/` folder:
1059
+
1060
+ - `docs/index.md` - Home page
1061
+ - `docs/getting-started.md` - Getting started guide
1062
+ - `docs/tools/` - Tools reference
1063
+ - `docs/self-hosting/` - Self-hosting guides (Docker, Vercel, Netlify, Hostinger, etc.)
1064
+ - `docs/contributing.md` - Contributing guide
1065
+ - `docs/licensing.md` - Commercial license info
1066
+
1067
+ ---
1068
+
1069
+ ## Special Thanks
1070
+
1071
+ BentoPDF wouldn't be possible without the amazing open-source tools and libraries that power it. We'd like to extend our heartfelt thanks to the creators and maintainers of:
1072
+
1073
+ **Bundled Libraries:**
1074
+
1075
+ - **[PDFLib.js](https://pdf-lib.js.org/)** – For enabling powerful client-side PDF manipulation.
1076
+ - **[PDF.js](https://mozilla.github.io/pdf.js/)** – For the robust PDF rendering engine in the browser.
1077
+ - **[PDFKit](https://pdfkit.org/)** – For creating and editing PDFs with ease.
1078
+ - **[EmbedPDF](https://github.com/embedpdf/embed-pdf-viewer)** – For seamless PDF editing in pure JS.
1079
+ - **[Cropper.js](https://fengyuanchen.github.io/cropperjs/)** – For intuitive image cropping functionality.
1080
+ - **[Vite](https://vitejs.dev/)** – For lightning-fast development and build tooling.
1081
+ - **[Tailwind CSS](https://tailwindcss.com/)** – For rapid, flexible, and beautiful UI styling.
1082
+ - **[qpdf](https://github.com/qpdf/qpdf)** and **[qpdf-wasm](https://github.com/neslinesli93/qpdf-wasm)** – For inspecting, repairing, and transforming PDF files.
1083
+ - **[LibreOffice](https://www.libreoffice.org/)** – For powerful document conversion capabilities.
1084
+
1085
+ **AGPL Libraries (Pre-configured via CDN):**
1086
+
1087
+ - **[CoherentPDF (cpdf)](https://www.coherentpdf.com/)** – For content-preserving PDF operations. _(AGPL-3.0)_
1088
+ - **[PyMuPDF](https://github.com/pymupdf/PyMuPDF)** – For high-performance PDF manipulation and data extraction. _(AGPL-3.0)_
1089
+ - **[Ghostscript (GhostPDL)](https://github.com/ArtifexSoftware/ghostpdl)** – For PDF/A conversion and font outlining. _(AGPL-3.0)_
1090
+
1091
+ > [!NOTE]
1092
+ > AGPL-licensed libraries are not bundled in BentoPDF's source code. They are loaded at runtime from CDN (pre-configured) and can be overridden via environment variables or Advanced Settings.
1093
+
1094
+ Your work inspires and empowers developers everywhere. Thank you for making open-source amazing!
RELEASE.md ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🚀 Release Process - Real-World Scenarios
2
+
3
+ ## 📋 Common Release Scenarios
4
+
5
+ ### **Scenario 1: I Just Finished a Feature and Want to Release**
6
+
7
+ **Situation:** You've completed a new feature, tested it locally, and want to release it.
8
+
9
+ **Current State:**
10
+
11
+ ```bash
12
+ $ git status
13
+ On branch main
14
+ Your branch is up to date with 'origin/main'.
15
+
16
+ Changes not staged for commit:
17
+ modified: src/js/new-feature.js
18
+ modified: src/css/styles.css
19
+ modified: README.md
20
+
21
+ Untracked files:
22
+ src/js/feature-helper.js
23
+ ```
24
+
25
+ **Steps:**
26
+
27
+ ```bash
28
+ # 1. Commit your feature changes
29
+ git add .
30
+ git commit -m "Add new PDF watermark feature"
31
+
32
+ # 2. Choose your release type and run
33
+ npm run release # Patch: 1.0.0 → 1.0.1 (bug fixes, small improvements)
34
+ npm run release:minor # Minor: 1.0.0 → 1.1.0 (new features, backward compatible)
35
+ npm run release:major # Major: 1.0.0 → 2.0.0 (breaking changes)
36
+ ```
37
+
38
+ **What Happens:**
39
+
40
+ - ✅ Your feature commit stays as-is
41
+ - ✅ Version gets bumped in `package.json` and `chart/Chart.yaml`
42
+ - ✅ New release commit is created
43
+ - ✅ Git tag is created (e.g., `v1.0.1`)
44
+ - ✅ Everything gets pushed to GitHub
45
+ - ✅ Docker image gets built and published
46
+
47
+ ---
48
+
49
+ ### **Scenario 2: I Have Uncommitted Changes and Want to Release**
50
+
51
+ **Situation:** You have local changes but haven't committed them yet.
52
+
53
+ **Current State:**
54
+
55
+ ```bash
56
+ $ git status
57
+ Changes not staged for commit:
58
+ modified: package.json
59
+ modified: src/js/main.js
60
+ modified: README.md
61
+ ```
62
+
63
+ **❌ This Will Fail:**
64
+
65
+ ```bash
66
+ npm run release
67
+ # Error: Your local changes would be overwritten by merge
68
+ ```
69
+
70
+ **✅ Solution Options:**
71
+
72
+ **Option A: Commit Everything First (Recommended)**
73
+
74
+ ```bash
75
+ git add .
76
+ git commit -m "Add new features and improvements"
77
+ npm run release
78
+ ```
79
+
80
+ **Option B: Stash Changes Temporarily**
81
+
82
+ ```bash
83
+ git stash
84
+ npm run release
85
+ git stash pop # Restore your changes after release
86
+ ```
87
+
88
+ **Option C: Commit Only What's Needed**
89
+
90
+ ```bash
91
+ git add package.json src/js/main.js
92
+ git commit -m "Add core improvements"
93
+ npm run release
94
+ git add README.md
95
+ git commit -m "Update documentation"
96
+ ```
97
+
98
+ ---
99
+
100
+ ### **Scenario 3: I Want to Release a Hotfix**
101
+
102
+ **Situation:** There's a critical bug in production that needs immediate fixing.
103
+
104
+ **Steps:**
105
+
106
+ ```bash
107
+ # 1. Fix the bug
108
+ git add src/js/bug-fix.js
109
+ git commit -m "Fix critical PDF rendering issue"
110
+
111
+ # 2. Release as patch (bug fix)
112
+ npm run release
113
+ # This creates: 1.0.0 → 1.0.1
114
+ ```
115
+
116
+ **Result:**
117
+
118
+ - ✅ Bug fix gets released immediately
119
+ - ✅ Docker image with fix is available
120
+ - ✅ Users can pull the fixed version
121
+
122
+ ---
123
+
124
+ ### **Scenario 4: I Want to Release a Major Update**
125
+
126
+ **Situation:** You've added significant new features that might break existing functionality.
127
+
128
+ **Steps:**
129
+
130
+ ```bash
131
+ # 1. Commit all your changes
132
+ git add .
133
+ git commit -m "Add major PDF editing features and API changes"
134
+
135
+ # 2. Release as major version
136
+ npm run release:major
137
+ # This creates: 1.0.0 → 2.0.0
138
+ ```
139
+
140
+ **Result:**
141
+
142
+ - ✅ Major version bump indicates breaking changes
143
+ - ✅ Users know to check compatibility
144
+ - ✅ Both old and new versions available
145
+
146
+ ---
147
+
148
+ ### **Scenario 5: I Want to Release Multiple Features at Once**
149
+
150
+ **Situation:** You've been working on multiple features and want to release them together.
151
+
152
+ **Steps:**
153
+
154
+ ```bash
155
+ # 1. Commit all features
156
+ git add .
157
+ git commit -m "Add multiple PDF tools: watermark, encryption, and compression"
158
+
159
+ # 2. Choose appropriate release type
160
+ npm run release:minor # For new features (1.0.0 → 1.1.0)
161
+ # OR
162
+ npm run release:major # For breaking changes (1.0.0 → 2.0.0)
163
+ ```
164
+
165
+ ---
166
+
167
+ ### **Scenario 6: I Want to Test the Release Process**
168
+
169
+ **Situation:** You want to test the release system without affecting production.
170
+
171
+ **Steps:**
172
+
173
+ ```bash
174
+ # 1. Make a small test change
175
+ echo "// Test comment" >> src/js/main.js
176
+ git add src/js/main.js
177
+ git commit -m "Test release process"
178
+
179
+ # 2. Run patch release
180
+ npm run release
181
+ # This creates: 1.0.0 → 1.0.1
182
+
183
+ # 3. Verify everything works
184
+ # Check GitHub Actions, Docker Hub, etc.
185
+
186
+ # 4. If you want to undo the test release
187
+ git tag -d v1.0.1
188
+ git push origin :refs/tags/v1.0.1
189
+ git reset --hard HEAD~1
190
+ ```
191
+
192
+ ---
193
+
194
+ ## 🎯 **Release Type Guidelines**
195
+
196
+ | Scenario | Command | Version Change | When to Use |
197
+ | ------------------- | ----------------------- | --------------- | ------------------------------------ |
198
+ | **Bug Fix** | `npm run release` | `1.0.0 → 1.0.1` | Fixing bugs, small improvements |
199
+ | **New Feature** | `npm run release:minor` | `1.0.0 → 1.1.0` | Adding features, backward compatible |
200
+ | **Breaking Change** | `npm run release:major` | `1.0.0 → 2.0.0` | API changes, major rewrites |
201
+
202
+ ---
203
+
204
+ ## 🔄 **What Happens After You Run a Release Command**
205
+
206
+ ### **Immediate Actions (Local):**
207
+
208
+ 1. **Version Update**: `package.json` version gets bumped
209
+ 2. **Git Commit**: New commit created with "Release vX.X.X"
210
+ 3. **Git Tag**: Tag created (e.g., `v1.0.1`)
211
+ 4. **Git Push**: Everything pushed to GitHub
212
+
213
+ ### **Automatic Actions (GitHub):**
214
+
215
+ 1. **GitHub Actions Triggered**: Workflow starts building Docker image
216
+ 2. **Docker Build**: Multi-architecture image created
217
+ 3. **Docker Push**: Images pushed to Docker Hub with tags:
218
+ - `bentopdfteam/bentopdf:latest`
219
+ - `bentopdfteam/bentopdf:1.0.1`
220
+ - `bentopdfteam/bentopdf:v1.0.1`
221
+
222
+ ### **End Result:**
223
+
224
+ Users can immediately pull your new version:
225
+
226
+ ```bash
227
+ docker pull bentopdfteam/bentopdf:1.0.1
228
+ ```
229
+
230
+ ---
231
+
232
+ ## 🚨 **Before You Release - Prerequisites**
233
+
234
+ ### **1. Docker Hub Credentials Setup**
235
+
236
+ You need to add these secrets to your GitHub repository:
237
+
238
+ 1. Go to **Settings** → **Secrets and variables** → **Actions**
239
+ 2. Add these secrets:
240
+ - `DOCKER_USERNAME`: Your Docker Hub username
241
+ - `DOCKER_TOKEN`: Your Docker Hub access token
242
+
243
+ ### **2. Get Docker Hub Token**
244
+
245
+ 1. Go to [Docker Hub](https://hub.docker.com)
246
+ 2. Account Settings → Security → New Access Token
247
+ 3. Set permissions to "Read, Write, Delete"
248
+ 4. Copy the token and add it to GitHub Secrets
249
+
250
+ ---
251
+
252
+ ## 🔧 **Troubleshooting Common Issues**
253
+
254
+ ### **❌ "Your local changes would be overwritten by merge"**
255
+
256
+ **Problem:** You have uncommitted changes
257
+ **Solution:**
258
+
259
+ ```bash
260
+ git add .
261
+ git commit -m "Your commit message"
262
+ npm run release
263
+ ```
264
+
265
+ ### **❌ "Permission denied" in GitHub Actions**
266
+
267
+ **Problem:** Missing Docker Hub credentials
268
+ **Solution:** Add `DOCKER_USERNAME` and `DOCKER_TOKEN` to GitHub Secrets
269
+
270
+ ### **❌ "Tag already exists"**
271
+
272
+ **Problem:** You've run the same release before
273
+ **Solution:** This is normal! The script will skip creating duplicate tags
274
+
275
+ ### **❌ GitHub Actions fails**
276
+
277
+ **Problem:** Various build issues
278
+ **Solution:**
279
+
280
+ 1. Check Actions tab for detailed logs
281
+ 2. Verify Docker Hub credentials
282
+ 3. Check Dockerfile for syntax errors
283
+
284
+ ---
285
+
286
+ ## 🧪 **Testing Your Release System**
287
+
288
+ ### **Quick Test:**
289
+
290
+ ```bash
291
+ # Make a small change
292
+ echo "// Test" >> src/js/main.js
293
+ git add src/js/main.js
294
+ git commit -m "Test release"
295
+ npm run release
296
+ ```
297
+
298
+ ### **Verify Results:**
299
+
300
+ 1. **GitHub Actions**: Check Actions tab for successful build
301
+ 2. **Docker Hub**: Verify images are published
302
+ 3. **Git Tags**: `git tag --list` should show new tag
303
+ 4. **Version**: `cat package.json | grep version` should show updated version
304
+
305
+ ### **Undo Test Release:**
306
+
307
+ ```bash
308
+ git tag -d v1.0.1
309
+ git push origin :refs/tags/v1.0.1
310
+ git reset --hard HEAD~1
311
+ ```
312
+
313
+ ---
314
+
315
+ ## 🎉 **That's It!**
316
+
317
+ Your release system is now ready! Just follow the scenarios above based on your situation and run the appropriate `npm run release` command.
SECURITY.md ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Security Configuration
2
+
3
+ ## Non-Root User Support
4
+
5
+ BentoPDF now uses nginx-unprivileged for enhanced security. This follows the Principle of Least Privilege and is essential for production environments.
6
+
7
+ ### Security Benefits
8
+
9
+ - **Reduced Attack Surface**: If compromised, attackers won't have root privileges
10
+ - **Compliance**: Meets security standards like SOC 2, PCI DSS
11
+ - **Kubernetes/OpenShift Compatibility**: Works with security policies that require non-root execution
12
+ - **System Protection**: Prevents system-wide damage if the application is compromised
13
+
14
+ ### Usage
15
+
16
+ #### Default Configuration (nginx-unprivileged)
17
+
18
+ ```bash
19
+ docker build -t bentopdf .
20
+ docker run -p 8080:8080 bentopdf
21
+ ```
22
+
23
+ #### Simple Mode
24
+
25
+ ```bash
26
+ # Build with simple mode enabled
27
+ docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple .
28
+
29
+ # Run the container
30
+ docker run -p 8080:8080 bentopdf-simple
31
+ ```
32
+
33
+ #### Kubernetes Example
34
+
35
+ ```yaml
36
+ apiVersion: apps/v1
37
+ kind: Deployment
38
+ metadata:
39
+ name: bentopdf
40
+ spec:
41
+ template:
42
+ spec:
43
+ securityContext:
44
+ runAsNonRoot: true
45
+ runAsUser: 2000
46
+ runAsGroup: 2000
47
+ containers:
48
+ - name: bentopdf
49
+ image: bentopdf:latest
50
+ ports:
51
+ - containerPort: 8080
52
+ ```
53
+
54
+ #### Docker Compose Example
55
+
56
+ ```yaml
57
+ version: '3.8'
58
+ services:
59
+ bentopdf:
60
+ build:
61
+ context: .
62
+ dockerfile: Dockerfile
63
+ args:
64
+ SIMPLE_MODE: false
65
+ ports:
66
+ - '8080:8080'
67
+ security_opt:
68
+ - no-new-privileges:true
69
+ ```
70
+
71
+ ### Verification
72
+
73
+ To verify the container is running as non-root:
74
+
75
+ ```bash
76
+ # Check the user inside the container
77
+ docker exec <container_id> whoami
78
+ # Should output: nginx
79
+
80
+ # Check the user ID
81
+ docker exec <container_id> id
82
+ # Should show UID/GID for nginx user (typically 101)
83
+ ```
84
+
85
+ ### Security Best Practices
86
+
87
+ 1. **Use nginx-unprivileged**: Built-in non-root user with minimal privileges
88
+ 2. **Regular Updates**: Keep the base image updated (currently using 1.29-alpine)
89
+ 3. **Port 8080**: Use high port numbers to avoid requiring root privileges
90
+ 4. **Security Scanning**: Regularly scan images for vulnerabilities
91
+ 5. **Network Policies**: Implement network segmentation
92
+
93
+ ### Troubleshooting
94
+
95
+ If you encounter permission issues:
96
+
97
+ 1. **Check file ownership**: Ensure all application files are owned by the nginx user
98
+ 2. **Verify PID directory**: Ensure `/etc/nginx/tmp/` directory exists and is writable
99
+ 3. **Port binding**: Ensure port 8080 is available and not blocked by firewall
100
+
101
+ ### Migration from Root
102
+
103
+ If migrating from a root-based setup:
104
+
105
+ 1. Update your Dockerfile to use nginx-unprivileged base image
106
+ 2. Change port mappings from 80 to 8080 in all configurations
107
+ 3. Update nginx.conf to use `/etc/nginx/tmp/nginx.pid` for PID file
108
+ 4. Rebuild your images with the new security settings
109
+ 5. Update your deployment configurations (Kubernetes, Docker Compose, etc.)
110
+ 6. Test thoroughly in a staging environment
SIMPLE_MODE.md ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Simple Mode for BentoPDF
2
+
3
+ Simple Mode is designed for internal organizational use where you want to hide all branding and marketing content, showing only the essential PDF tools for your users.
4
+
5
+ ## What Simple Mode Does
6
+
7
+ When enabled, Simple Mode will:
8
+
9
+ - Hide the navigation bar
10
+ - Hide the hero section with marketing content
11
+ - Hide the features section
12
+ - Hide the security/compliance section
13
+ - Hide the FAQ section
14
+ - Hide the testimonials section
15
+ - Hide the support section
16
+ - Hide the footer
17
+ - Update the page title to "PDF Tools"
18
+ - Make the tools section more prominent
19
+
20
+ ## How to Enable Simple Mode
21
+
22
+ ### Method 1: Using Pre-built Simple Mode Image (Recommended)
23
+
24
+ Use the pre-built Simple Mode image directly:
25
+
26
+ **Using GitHub Container Registry (Recommended):**
27
+
28
+ ```bash
29
+ # Docker
30
+ docker run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
31
+
32
+ # Podman
33
+ podman run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
34
+ ```
35
+
36
+ **Using Docker Hub:**
37
+
38
+ ```bash
39
+ # Docker
40
+ docker run -p 3000:8080 bentopdfteam/bentopdf-simple:latest
41
+
42
+ # Podman
43
+ podman run -p 3000:8080 docker.io/bentopdfteam/bentopdf-simple:latest
44
+ ```
45
+
46
+ Or with Docker Compose / Podman Compose:
47
+
48
+ ```yaml
49
+ services:
50
+ bentopdf:
51
+ # Using GitHub Container Registry (Recommended)
52
+ image: ghcr.io/alam00000/bentopdf-simple:latest
53
+ # Or using Docker Hub
54
+ # image: bentopdfteam/bentopdf-simple:latest
55
+ container_name: bentopdf
56
+ restart: unless-stopped
57
+ ports:
58
+ - '3000:8080'
59
+ ```
60
+
61
+ ### Method 2: Using Docker Compose with Build
62
+
63
+ Build the image locally with Simple Mode enabled:
64
+
65
+ ```bash
66
+ docker compose -f docker-compose.dev.yml build --build-arg SIMPLE_MODE=true
67
+ docker compose -f docker-compose.dev.yml up -d
68
+ ```
69
+
70
+ ### Method 3: Using Docker Build
71
+
72
+ Build the image with the SIMPLE_MODE build argument:
73
+
74
+ ```bash
75
+ docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple .
76
+ docker run -p 3000:8080 bentopdf-simple
77
+ ```
78
+
79
+ ### Method 4: Using npm Script (Easiest for Local Development)
80
+
81
+ Use the built-in npm script that handles everything:
82
+
83
+ ```bash
84
+ npm run serve:simple
85
+ ```
86
+
87
+ This command automatically:
88
+
89
+ - Sets `SIMPLE_MODE=true`
90
+ - Builds the project with Simple Mode enabled
91
+ - Serves the built files on `http://localhost:3000`
92
+
93
+ ### Method 5: Using Environment Variables
94
+
95
+ Set the environment variable before building:
96
+
97
+ ```bash
98
+ export SIMPLE_MODE=true
99
+ npm run build
100
+ npx serve dist -p 3000
101
+ ```
102
+
103
+ ## 🧪 Testing Simple Mode Locally
104
+
105
+ ### Method 1: Using npm Script (Easiest for Development)
106
+
107
+ ```bash
108
+ npm run serve:simple
109
+ ```
110
+
111
+ This automatically builds and serves Simple Mode on `http://localhost:3000`.
112
+
113
+ ### Method 2: Using Pre-built Image (Easiest for Production)
114
+
115
+ ```bash
116
+ # Docker - Pull and run the Simple Mode image
117
+ docker pull ghcr.io/alam00000/bentopdf-simple:latest
118
+ docker run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
119
+
120
+ # Podman
121
+ podman pull ghcr.io/alam00000/bentopdf-simple:latest
122
+ podman run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
123
+ ```
124
+
125
+ Open `http://localhost:3000` in your browser.
126
+
127
+ ### Method 3: Build and Test Locally
128
+
129
+ ```bash
130
+ # Build with simple mode
131
+ SIMPLE_MODE=true npm run build
132
+
133
+ # Serve the built files
134
+ npx serve dist -p 3000
135
+ ```
136
+
137
+ Open `http://localhost:3000` in your browser.
138
+
139
+ ### Method 4: Compare Both Modes
140
+
141
+ ```bash
142
+ # Test Normal Mode (Docker)
143
+ docker run -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
144
+
145
+ # Test Simple Mode (Docker)
146
+ docker run -p 3001:8080 ghcr.io/alam00000/bentopdf-simple:latest
147
+
148
+ # Podman users: replace 'docker' with 'podman'
149
+ ```
150
+
151
+ - Normal Mode: `http://localhost:3000`
152
+ - Simple Mode: `http://localhost:3001`
153
+
154
+ ## 🔍 What to Look For
155
+
156
+ When Simple Mode is working correctly, you should see:
157
+
158
+ - ✅ Clean "PDF Tools" header (no marketing hero section)
159
+ - ✅ "Select a tool to get started" subtitle
160
+ - ✅ Search bar for tools
161
+ - ✅ All PDF tool cards organized by category
162
+ - ❌ No navigation bar
163
+ - ❌ No hero section with "The PDF Toolkit built for privacy"
164
+ - ❌ No features, FAQ, testimonials, or footer sections
165
+
166
+ ## 📦 Available Container Images
167
+
168
+ ### Normal Mode (Full Branding)
169
+
170
+ **GitHub Container Registry (Recommended):**
171
+
172
+ - `ghcr.io/alam00000/bentopdf:latest`
173
+ - `ghcr.io/alam00000/bentopdf:v1.0.0` (versioned)
174
+
175
+ **Docker Hub:**
176
+
177
+ - `bentopdfteam/bentopdf:latest`
178
+ - `bentopdfteam/bentopdf:v1.0.0` (versioned)
179
+
180
+ ### Simple Mode (Clean Interface)
181
+
182
+ **GitHub Container Registry (Recommended):**
183
+
184
+ - `ghcr.io/alam00000/bentopdf-simple:latest`
185
+ - `ghcr.io/alam00000/bentopdf-simple:v1.0.0` (versioned)
186
+
187
+ **Docker Hub:**
188
+
189
+ - `bentopdfteam/bentopdf-simple:latest`
190
+ - `bentopdfteam/bentopdf-simple:v1.0.0` (versioned)
191
+
192
+ ## 🚀 Production Deployment Examples
193
+
194
+ ### Docker Compose / Podman Compose
195
+
196
+ ```yaml
197
+ services:
198
+ bentopdf:
199
+ image: ghcr.io/alam00000/bentopdf-simple:latest # Recommended
200
+ # image: bentopdfteam/bentopdf-simple:latest # Alternative: Docker Hub
201
+ container_name: bentopdf
202
+ restart: unless-stopped
203
+ ports:
204
+ - '80:8080'
205
+ environment:
206
+ - PUID=1000
207
+ - PGID=1000
208
+ ```
209
+
210
+ ### Podman Quadlet (Linux Systemd)
211
+
212
+ Create `~/.config/containers/systemd/bentopdf-simple.container`:
213
+
214
+ ```ini
215
+ [Unit]
216
+ Description=BentoPDF Simple Mode
217
+ After=network-online.target
218
+
219
+ [Container]
220
+ Image=ghcr.io/alam00000/bentopdf-simple:latest
221
+ ContainerName=bentopdf-simple
222
+ PublishPort=80:8080
223
+ AutoUpdate=registry
224
+
225
+ [Service]
226
+ Restart=always
227
+
228
+ [Install]
229
+ WantedBy=default.target
230
+ ```
231
+
232
+ Enable and start:
233
+
234
+ ```bash
235
+ systemctl --user daemon-reload
236
+ systemctl --user enable --now bentopdf-simple
237
+ ```
238
+
239
+ ## ⚠️ Important Notes
240
+
241
+ - **Pre-built images**: Use `ghcr.io/alam00000/bentopdf-simple:latest` for Simple Mode (recommended)
242
+ - **Environment variables**: `SIMPLE_MODE=true` only works during build, not runtime
243
+ - **Build-time optimization**: Simple Mode uses dead code elimination for smaller bundles
244
+ - **Same functionality**: All PDF tools work identically in both modes
STATIC-HOSTING.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Hosting BentoPDF as a static website
2
+
3
+ As an alternative to runnning BenotPDF locally or in a Docker container, you can very easily host it as a set of static web pages. Here are a few examples:
4
+
5
+ ## Netlify
6
+
7
+ ### Netlify - static deployment
8
+
9
+ One of simplest ways to host BentoPDF is to create a project at [Netlify](https://www.netlify.com/) and create a static deployment. You can accomplish this by first downloading the pre-built distribution file from our [GitHub releases](https://github.com/alam00000/bentopdf/releases). Each release includes a `dist-{version}.zip` file that contains all necessary files for self-hosting.
10
+
11
+ 1. Go to [BentoPDF Releases](https://github.com/alam00000/bentopdf/releases)
12
+ 2. Download the latest `dist-{version}.zip` file
13
+ 3. Next, if you have not already done so, create a Netlify account and log in.
14
+ 4. From your Netlify projects page, add a new project and select "Deploy manually".
15
+ 5. Drag and drop to upload the Bentopdf zip file you downloaded in step 3.
16
+ 6. Your BentoPDF deployment should now be working! Optionally, you can go into Project Configuration and change the project name.
17
+
18
+ When a new BentoPDF release becomes available, you will need to repeat steps 1-3, then go into "Deploys" and upload the new release.
19
+
20
+ ### Netlify - dynamic deployment
21
+
22
+ Alternatively, you can configure a Netlify project to automatically deploy whenever your BentoPDF is updated.
23
+
24
+ 1. If you have not done so already, create a fork of BentoPDF into your own Github account.
25
+ 2. If you have not already done so, create a Netlify account and log in.
26
+ 3. From your Netlify projects page, add a new project and select 'Import an existing project'.
27
+ 4. Select the GitHub button, authorize Netlify, then choose where to install the integration. You can choose 'All repositories' or 'Only select repositories' and choose your BentoPDF fork.
28
+ 5. Select your repo and give it a project name. (add environment variables?) Then click the blue 'Deploy' button.
29
+ 6. The Netlify build & deploy process will kick off. Once it finishes, you can click on the provided URL `https://[projectname]/netlify.app` to view your deployment of BentoPDF.
30
+
31
+ Whenever the BentoPDF source code is updated, you can sync the changes into your repo. This will kick off a new build and deploy within Netlify.
32
+
33
+ If you want to use BentoPDF's simple mode, go into Deploy Settings, then Environment Variables, and Add a variable. Add `SIMPLE_MODE` and set it to `true`. You will need to manually kick a new build to get this to take effect.
34
+
35
+ ## Vercel
36
+
37
+ Vercel provides similar services to Netlify dynamic hosting.
38
+
39
+ 1. If you have not done so already, create a fork of BentoPDF into your own Github account.
40
+ 2. If you have not already done so, create a Vercel account and log in.
41
+ 3. From your Vercel Overview page, select 'Add new project'
42
+ 4. Under 'Import Git Repository' and then choose 'Add GitHub Account'. Follow the prompts to authorize Vercel integration. You can choose 'All repositories' or 'Only select repositories' and choose your BentoPDF fork.
43
+ 5. Select 'Import' to import the repo into Vercel.
44
+ 6. Under 'Framework Preset', select 'Vite' and save the settings.
45
+ 7. The Vercel build & deploy process will kick off. Once it finishes, you can click on the provided link to view your deployment of BentoPDF.
46
+
47
+ Whenever the BentoPDF source code is updated, you can sync the changes into your repo. This will kick off a new build and deploy within BentoPDF.
48
+
49
+ If you want to use BentoPDF's simple mode, go into Project Settings, then Environment Variables, and Create a new variable. Add `SIMPLE_MODE` and set it to `true`. You will need to redeploy to get this to take effect.
50
+
51
+ ## GitHub Pages
52
+
53
+ You can also host your own instance of BentoPDF using GitHub pages. An advantage of this over the other options is you are able to do everything in GitHub without any third party service.
54
+
55
+ 1. If you have not done so already, create a fork of BentoPDF into your own Github account.
56
+ 2. From your fork, go to `Settings->Pages`, and change the 'Source' to 'GitHub Actions'
57
+ 3. Go to `Settings->Secrets and Variables > Actions`, then select 'Variables', and add the repository variable `BASE_URL`. Set the value to `/bentopdf`. *If you've renamed the repo to something other than bentopdf, put that here*.
58
+ 4. Go to `Actions` in the top menu, and select 'I understand' to enable Actions
59
+ 5. Within Actions, on the left, select 'Deploy static content to Pages', and then on the right select 'Run workflow', and in the dropdown, 'Run Workflow'. The action will not run to build BentoPDF and deploy it to GitHub Pages.
60
+
61
+ When the build completes, you can find the website at `https://[your-github-username]/bentopdf`
62
+
63
+ If/when you merge changes from the source BentoPDF repository, the build and deploy action will automatically be kicked off and the new version will be automatically deployed to GitHub Pages.
TRANSLATION.md ADDED
@@ -0,0 +1,606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🌍 Translation Guide for BentoPDF
2
+
3
+ This guide will help you add new languages or improve existing translations for BentoPDF.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Overview](#overview)
8
+ - [Quick Start](#quick-start)
9
+ - [Adding a New Language](#adding-a-new-language)
10
+ - [Translation File Structure](#translation-file-structure)
11
+ - [Where Translations Are Used](#where-translations-are-used)
12
+ - [Testing Your Translations](#testing-your-translations)
13
+ - [Translation Guidelines](#translation-guidelines)
14
+ - [Common Issues](#common-issues)
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ BentoPDF uses **i18next** for internationalization (i18n). Currently supported languages:
21
+
22
+ - **English** (`en`) - Default
23
+ - **Belarusian** (`be`)
24
+ - **German** (`de`)
25
+ - **Spanish** (`es`)
26
+ - **French** (`fr`)
27
+ - **Italian** (`it`)
28
+ - **Portuguese** (`pt`)
29
+ - **Turkish** (`tr`)
30
+ - **Vietnamese** (`vi`)
31
+ - **Indonesian** (`id`)
32
+ - **Chinese** (`zh`)
33
+ - **Traditional Chinese (Taiwan)** (`zh-TW`)
34
+
35
+ The app automatically detects the language from the URL path:
36
+
37
+ - `/` or `/en/` → English (default)
38
+ - `/de/` → German
39
+ - `/fr/` → French
40
+ - etc.
41
+
42
+ ### Architecture
43
+
44
+ BentoPDF uses a **static pre-rendering** approach for SEO-optimized i18n:
45
+
46
+ 1. **Build time**: `scripts/generate-i18n-pages.mjs` generates localized HTML files in `dist/{lang}/`
47
+ 2. **Dev/Preview**: `languageRouterPlugin` in `vite.config.ts` handles URL rewriting
48
+ 3. **Production**: Nginx serves static files directly from language directories
49
+
50
+ ---
51
+
52
+ ## Quick Start
53
+
54
+ **To improve existing translations:**
55
+
56
+ 1. Navigate to `public/locales/{language}/common.json` and `public/locales/{language}/tools.json`
57
+ 2. Find the key you want to update
58
+ 3. Change the translation value
59
+ 4. Save and test
60
+
61
+ **To add a new language (e.g., Japanese `ja`):**
62
+
63
+ 1. Copy `public/locales/en/` to `public/locales/ja/`
64
+ 2. Translate all values in both `ja/common.json` and `ja/tools.json`
65
+ 3. Add Japanese to `supportedLanguages` and `languageNames` in `src/js/i18n/i18n.ts`
66
+ 4. Add `'ja'` to `SUPPORTED_LANGUAGES` in `vite.config.ts`
67
+ 5. Restart the dev server
68
+ 6. Run `npm run build` to generate static language pages
69
+ 7. Test thoroughly
70
+
71
+ ---
72
+
73
+ ## Adding a New Language
74
+
75
+ Let's add **Spanish** as an example:
76
+
77
+ ### Step 1: Create Translation Files
78
+
79
+ ```bash
80
+ # Create the directory
81
+ mkdir -p public/locales/es
82
+
83
+ # Copy the English template
84
+ cp public/locales/en/common.json public/locales/es/common.json
85
+ ```
86
+
87
+ ### Step 2: Translate the JSON Files
88
+
89
+ Open `public/locales/es/common.json` and translate all the values:
90
+
91
+ ```json
92
+ {
93
+ "nav": {
94
+ "home": "Inicio",
95
+ "about": "Acerca de",
96
+ "contact": "Contacto",
97
+ "allTools": "Todas las herramientas"
98
+ },
99
+ "hero": {
100
+ "title": "Tu conjunto de herramientas PDF gratuito y seguro",
101
+ "subtitle": "Combina, divide, comprime y edita archivos PDF directamente en tu navegador."
102
+ }
103
+ // ... continue translating all keys
104
+ }
105
+ ```
106
+
107
+ ⚠️ **Important**: Only translate the **values**, NOT the keys!
108
+
109
+ ✅ **Correct:**
110
+
111
+ ```json
112
+ "home": "Inicio"
113
+ ```
114
+
115
+ ❌ **Wrong:**
116
+
117
+ ```json
118
+ "inicio": "Inicio"
119
+ ```
120
+
121
+ Then do the same for `public/locales/fr/tools.json` to translate all tool names and descriptions.
122
+
123
+ ### Step 3: Register the Language
124
+
125
+ Edit `src/js/i18n/i18n.ts`:
126
+
127
+ ```typescript
128
+ // Add 'fr' to supported languages
129
+ export const supportedLanguages = ['en', 'de', 'es', 'fr', 'zh', 'vi'] as const;
130
+ export type SupportedLanguage = (typeof supportedLanguages)[number];
131
+
132
+ // Add French display name
133
+ export const languageNames: Record<SupportedLanguage, string> = {
134
+ en: 'English',
135
+ de: 'Deutsch',
136
+ fr: 'Français', // ← Add this
137
+ };
138
+ ```
139
+
140
+ ### Step 4: Update Vite Configuration
141
+
142
+ In `vite.config.ts`, add your language to the `SUPPORTED_LANGUAGES` array:
143
+
144
+ ```typescript
145
+ const SUPPORTED_LANGUAGES = [
146
+ 'en',
147
+ 'de',
148
+ 'es',
149
+ 'zh',
150
+ 'zh-TW',
151
+ 'vi',
152
+ 'it',
153
+ 'id',
154
+ 'tr',
155
+ 'fr',
156
+ 'pt',
157
+ 'ja',
158
+ ] as const;
159
+ ```
160
+
161
+ > **Important**: This is required for both dev server routing and the build-time i18n generation.
162
+
163
+ ### Step 5: Test Your Translation
164
+
165
+ ```bash
166
+ # Restart the dev server
167
+ npm run dev
168
+
169
+ # Visit the Japanese version
170
+ # http://localhost:5173/ja/
171
+ ```
172
+
173
+ ### Step 6: Build and Verify Static Files
174
+
175
+ ```bash
176
+ # Run build (includes i18n page generation)
177
+ npm run build
178
+
179
+ # Verify files were created
180
+ ls dist/ja/
181
+ # Should show: index.html, merge-pdf.html, etc.
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Translation File Structure
187
+
188
+ The `common.json` file is organized into logical sections:
189
+
190
+ ```json
191
+ {
192
+ "nav": {
193
+ // Navigation menu items
194
+ },
195
+ "hero": {
196
+ // Homepage hero section
197
+ },
198
+ "features": {
199
+ // Features section
200
+ },
201
+ "tools": {
202
+ // Tool names and descriptions
203
+ },
204
+ "upload": {
205
+ // File upload UI
206
+ },
207
+ "settings": {
208
+ // Settings modal and keyboard shortcuts
209
+ },
210
+ "faq": {
211
+ // FAQ section
212
+ },
213
+ "footer": {
214
+ // Footer links and text
215
+ },
216
+ "compliance": {
217
+ // Security compliance information
218
+ },
219
+ "testimonials": {
220
+ // User testimonials
221
+ },
222
+ "support": {
223
+ // Support section
224
+ },
225
+ "alert": {
226
+ // Alert and error messages
227
+ }
228
+ }
229
+ ```
230
+
231
+ ### Key Naming Convention
232
+
233
+ - Use **camelCase** for keys: `"deletePage"` not `"delete_page"`
234
+ - Use **nested objects** for organization: `"nav.home"` is represented as:
235
+ ```json
236
+ {
237
+ "nav": {
238
+ "home": "Home"
239
+ }
240
+ }
241
+ ```
242
+ - Be descriptive: `"shortcutsWarning"` is better than `"warning1"`
243
+
244
+ ---
245
+
246
+ ## Where Translations Are Used
247
+
248
+ ### 1. HTML Templates (`data-i18n` attribute)
249
+
250
+ ```html
251
+ <!-- Translation key: nav.home -->
252
+ <a href="/" data-i18n="nav.home">Home</a>
253
+ ```
254
+
255
+ The `data-i18n` attribute tells i18next which translation to use.
256
+
257
+ ### 2. Tool Definitions
258
+
259
+ Tool names and descriptions are defined in `src/js/config/tools.ts` and use a special namespace:
260
+
261
+ ```typescript
262
+ {
263
+ name: 'Merge PDF', // Used for shortcuts only
264
+ subtitle: 'Combine multiple PDFs into one file.',
265
+ }
266
+ ```
267
+
268
+ In translations:
269
+
270
+ ```json
271
+ {
272
+ "tools": {
273
+ "mergePdf": {
274
+ "name": "PDF zusammenführen",
275
+ "subtitle": "Mehrere PDFs in eine Datei kombinieren."
276
+ }
277
+ }
278
+ }
279
+ ```
280
+
281
+ ### 3. Dynamic JavaScript (`t()` function)
282
+
283
+ For translations that need to be applied dynamically:
284
+
285
+ ```typescript
286
+ import { t } from './i18n/i18n';
287
+
288
+ const message = t('alert.error');
289
+ console.log(message); // "Error" or "Fehler" depending on language
290
+ ```
291
+
292
+ ### 4. Placeholders
293
+
294
+ For input placeholders:
295
+
296
+ ```html
297
+ <input
298
+ type="text"
299
+ placeholder="Search for a tool..."
300
+ data-i18n-placeholder="tools.searchPlaceholder"
301
+ />
302
+ ```
303
+
304
+ In `common.json`:
305
+
306
+ ```json
307
+ {
308
+ "tools": {
309
+ "searchPlaceholder": "Nach einem Tool suchen..."
310
+ }
311
+ }
312
+ ```
313
+
314
+ ---
315
+
316
+ ## Testing Your Translations
317
+
318
+ ### Manual Testing
319
+
320
+ 1. **Start development server:**
321
+
322
+ ```bash
323
+ npm run dev
324
+ ```
325
+
326
+ 2. **Visit each language:**
327
+ - English: `http://localhost:5173/en/`
328
+ - German: `http://localhost:5173/de/`
329
+ - Vietnamese: `http://localhost:5173/vi/`
330
+ - Indonesian: `http://localhost:5173/id/`
331
+ - Chinese: `http://localhost:5173/zh/`
332
+ - Traditional Chinese (Taiwan): `http://localhost:5173/zh-TW/`
333
+ - French: `http://localhost:5173/fr/`
334
+ - Your new language: `http://localhost:5173/es/`
335
+
336
+ 3. **Check these pages:**
337
+ - Homepage (`/`)
338
+ - About page (`/about.html`)
339
+ - Contact page (`/contact.html`)
340
+ - FAQ page (`/faq.html`)
341
+ - Tool pages (e.g., `/merge-pdf.html`)
342
+
343
+ 4. **Test these interactions:**
344
+ - Click the language switcher in the footer
345
+ - Navigate between pages
346
+ - Open the settings modal (click gear icon next to search)
347
+ - Try a tool to see upload messages
348
+
349
+ ### Automated Checks
350
+
351
+ Check for missing translations:
352
+
353
+ ```bash
354
+ # This will show any missing keys
355
+ node scripts/check-translations.js
356
+ ```
357
+
358
+ _(If this script doesn't exist, you may need to create it or manually compare JSON files)_
359
+
360
+ ### Browser Testing
361
+
362
+ Test in different browsers:
363
+
364
+ - Chrome/Edge
365
+ - Firefox
366
+ - Safari
367
+
368
+ ---
369
+
370
+ ## Translation Guidelines
371
+
372
+ ### 1. Keep the Tone Consistent
373
+
374
+ BentoPDF is **friendly, clear, and professional**. Match this tone in your translations.
375
+
376
+ ✅ **Good:**
377
+
378
+ ```json
379
+ "hero.title": "Ihr kostenloses und sicheres PDF-Toolkit"
380
+ ```
381
+
382
+ ❌ **Too formal:**
383
+
384
+ ```json
385
+ "hero.title": "Ihr gebührenfreies und gesichertes Werkzeug für PDF-Dokumente"
386
+ ```
387
+
388
+ ### 2. Preserve Formatting
389
+
390
+ Some strings contain HTML or special characters:
391
+
392
+ ```json
393
+ {
394
+ "faq.analytics.answer": "We care about your privacy. BentoPDF does not track personal information. We use <a href=\"https://simpleanalytics.com\" class=\"text-indigo-400 hover:underline\" target=\"_blank\" rel=\"noopener noreferrer\">Simple Analytics</a> solely to see anonymous visit counts."
395
+ }
396
+ ```
397
+
398
+ When translating, **keep the HTML tags intact**:
399
+
400
+ ```json
401
+ {
402
+ "faq.analytics.answer": "Wir schätzen Ihre Privatsphäre. BentoPDF verfolgt keine persönlichen Informationen. Wir verwenden <a href=\"https://simpleanalytics.com\" class=\"text-indigo-400 hover:underline\" target=\"_blank\" rel=\"noopener noreferrer\">Simple Analytics</a> ausschließlich, um anonyme Besucherzahlen zu sehen."
403
+ }
404
+ ```
405
+
406
+ ### 3. Handle Plurals and Gender
407
+
408
+ If your language has complex plural rules or gender distinctions, consult the [i18next pluralization guide](https://www.i18next.com/translation-function/plurals).
409
+
410
+ Example:
411
+
412
+ ```json
413
+ {
414
+ "pages": "page",
415
+ "pages_plural": "pages"
416
+ }
417
+ ```
418
+
419
+ ### 4. Don't Translate Brand Names or Legal Terms
420
+
421
+ Keep these as-is:
422
+
423
+ - BentoPDF
424
+ - PDF
425
+ - GitHub
426
+ - Discord
427
+ - Chrome, Firefox, Safari, etc.
428
+ - Terms and Conditions
429
+ - Privacy Policy
430
+ - Licensing
431
+
432
+ ### 5. Technical Terms
433
+
434
+ For technical terms, use commonly accepted translations in your language:
435
+
436
+ - "Merge" → "Fusionner" (French), "Zusammenführen" (German)
437
+ - "Split" → "Diviser" (French), "Teilen" (German)
438
+ - "Compress" → "Compresser" (French), "Komprimieren" (German)
439
+
440
+ If unsure, check how other PDF tools translate these terms in your language.
441
+
442
+ ### 6. String Length
443
+
444
+ Some UI elements have limited space. Try to keep translations **similar in length** to the English version.
445
+
446
+ If a translation is much longer, test it visually to ensure it doesn't break the layout.
447
+
448
+ ---
449
+
450
+ ## Common Issues
451
+
452
+ ### Issue: Translations Not Showing Up
453
+
454
+ **Solution:**
455
+
456
+ 1. Clear your browser cache
457
+ 2. Hard refresh (Ctrl+F5 or Cmd+Shift+R)
458
+ 3. Check browser console for errors
459
+ 4. Verify the JSON file is valid (no syntax errors)
460
+
461
+ ### Issue: Some Text Still in English
462
+
463
+ **Possible causes:**
464
+
465
+ 1. Missing translation key in your language file
466
+ 2. Missing `data-i18n` attribute in HTML
467
+ 3. Hardcoded text in JavaScript
468
+
469
+ **Solution:**
470
+
471
+ - Compare your language file with `en/common.json` to find missing keys
472
+ - Search the codebase for hardcoded strings
473
+
474
+ ### Issue: JSON Syntax Error
475
+
476
+ **Symptoms:**
477
+
478
+ ```
479
+ SyntaxError: Unexpected token } in JSON at position 1234
480
+ ```
481
+
482
+ **Solution:**
483
+
484
+ - Use a JSON validator: https://jsonlint.com/
485
+ - Common mistakes:
486
+ - Trailing comma after last item
487
+ - Missing or extra quotes
488
+ - Unescaped quotes inside strings (use `\"`)
489
+
490
+ ### Issue: Language Switcher Not Showing New Language
491
+
492
+ **Solution:**
493
+ Make sure you added the language to both arrays in `i18n.ts`:
494
+
495
+ ```typescript
496
+ export const supportedLanguages = ['en', 'de', 'es', 'fr', 'zh', 'vi']; // ← Add here
497
+ export const languageNames = {
498
+ en: 'English',
499
+ de: 'Deutsch',
500
+ es: 'Español',
501
+ fr: 'Français', // ← And here
502
+ zh: '中文',
503
+ vi: 'Tiếng Việt',
504
+ };
505
+ ```
506
+
507
+ ### Issue: 404 Error When Accessing Language Pages
508
+
509
+ **Symptoms:**
510
+ Visiting `http://localhost:5173/ja/about.html` shows a 404 error page.
511
+
512
+ **Solution:**
513
+ You need to add your language code to `SUPPORTED_LANGUAGES` in `vite.config.ts`:
514
+
515
+ ```typescript
516
+ const SUPPORTED_LANGUAGES = [
517
+ 'en',
518
+ 'de',
519
+ 'es',
520
+ 'zh',
521
+ 'zh-TW',
522
+ 'vi',
523
+ 'it',
524
+ 'id',
525
+ 'tr',
526
+ 'fr',
527
+ 'pt',
528
+ 'ja',
529
+ ] as const;
530
+ ```
531
+
532
+ After updating, restart the dev server:
533
+
534
+ ```bash
535
+ npm run dev
536
+ ```
537
+
538
+ ---
539
+
540
+ ## File Checklist
541
+
542
+ When adding a new language, make sure these files are updated:
543
+
544
+ - [ ] `public/locales/{lang}/common.json` - Main translation file
545
+ - [ ] `public/locales/{lang}/tools.json` - Tools translation file
546
+ - [ ] `src/js/i18n/i18n.ts` - Add to `supportedLanguages` and `languageNames`
547
+ - [ ] `vite.config.ts` - Add to `SUPPORTED_LANGUAGES` array
548
+ - [ ] Test all pages: homepage, about, contact, FAQ, tool pages
549
+ - [ ] Test settings modal and shortcuts
550
+ - [ ] Test language switcher in footer
551
+ - [ ] Verify URL routing works (`/{lang}/`)
552
+ - [ ] Run `npm run build` and verify `dist/{lang}/` folder is created
553
+ - [ ] Test that all tools load correctly
554
+
555
+ ---
556
+
557
+ ## Getting Help
558
+
559
+ If you have questions or need help:
560
+
561
+ 1. Check existing translations in `public/locales/de/common.json` for reference
562
+ 2. Open an issue on [GitHub](https://github.com/alam00000/bentopdf/issues)
563
+ 3. Join our [Discord server](https://discord.gg/Bgq3Ay3f2w)
564
+
565
+ ---
566
+
567
+ ## Contributing Your Translation
568
+
569
+ Once you've completed a translation:
570
+
571
+ 1. **Test thoroughly** (see [Testing Your Translations](#testing-your-translations))
572
+ 2. **Fork the repository** on GitHub
573
+ 3. **Create a new branch**: `git checkout -b add-french-translation`
574
+ 4. **Commit your changes**: `git commit -m "Add French translation"`
575
+ 5. **Push to your fork**: `git push origin add-french-translation`
576
+ 6. **Open a Pull Request** with:
577
+ - Description of the language added
578
+ - Screenshots showing the translation in action
579
+ - Confirmation that you've tested all pages
580
+
581
+ Thank you for contributing to BentoPDF! 🎉
582
+
583
+ ---
584
+
585
+ ## Translation Progress
586
+
587
+ Current translation coverage:
588
+
589
+ | Language | Code | Status | Maintainer |
590
+ | ------------------- | ------- | -------------- | ---------- |
591
+ | English | `en` | ✅ Complete | Core team |
592
+ | German | `de` | ✅ Complete | Community |
593
+ | Spanish | `es` | ✅ Complete | Community |
594
+ | French | `fr` | ✅ Complete | Community |
595
+ | Italian | `it` | ✅ Complete | Community |
596
+ | Portuguese | `pt` | ✅ Complete | Community |
597
+ | Turkish | `tr` | ✅ Complete | Community |
598
+ | Vietnamese | `vi` | ✅ Complete | Community |
599
+ | Indonesian | `id` | ✅ Complete | Community |
600
+ | Chinese | `zh` | ✅ Complete | Community |
601
+ | Traditional Chinese | `zh-TW` | ✅ Complete | Community |
602
+ | Your Language | `??` | 🚧 In Progress | You? |
603
+
604
+ ---
605
+
606
+ **Last Updated**: January 2026
about.html ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+
7
+ <!-- Primary Meta Tags -->
8
+ <title>About BentoPDF - Privacy-First Free PDF Tools | Our Mission</title>
9
+ <meta
10
+ name="description"
11
+ content="Learn about BentoPDF - 100% free, privacy-first PDF toolkit. All tools run in your browser, no uploads, no signup. Fast, secure, and forever free."
12
+ />
13
+ <meta
14
+ name="keywords"
15
+ content="about bentopdf, privacy-first pdf, free pdf tools, browser-based pdf, open source pdf"
16
+ />
17
+ <meta name="author" content="BentoPDF" />
18
+ <meta name="robots" content="index, follow" />
19
+
20
+ <!-- Canonical URL -->
21
+ <link rel="canonical" href="https://www.bentopdf.com/about.html" />
22
+
23
+ <!-- Open Graph -->
24
+ <meta property="og:type" content="website" />
25
+ <meta property="og:url" content="https://www.bentopdf.com/about" />
26
+ <meta
27
+ property="og:title"
28
+ content="About BentoPDF - Privacy-First Free PDF Tools"
29
+ />
30
+ <meta
31
+ property="og:description"
32
+ content="100% free PDF toolkit. Privacy-first, browser-based, no signups. Learn about our mission and values."
33
+ />
34
+ <meta
35
+ property="og:image"
36
+ content="https://www.bentopdf.com/images/og-about.png"
37
+ />
38
+ <meta property="og:site_name" content="BentoPDF" />
39
+
40
+ <!-- Twitter Card -->
41
+ <meta name="twitter:card" content="summary_large_image" />
42
+ <meta name="twitter:title" content="About BentoPDF" />
43
+ <meta
44
+ name="twitter:description"
45
+ content="Privacy-first, free PDF tools that run in your browser."
46
+ />
47
+ <meta
48
+ name="twitter:image"
49
+ content="https://www.bentopdf.com/images/twitter-about.png"
50
+ />
51
+ <meta name="twitter:site" content="@BentoPDF" />
52
+
53
+ <link href="/src/css/styles.css" rel="stylesheet" />
54
+
55
+ <!-- Web App Manifest -->
56
+ <link rel="manifest" href="/site.webmanifest" />
57
+
58
+ <!-- Favicons -->
59
+ <link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
60
+ <link
61
+ rel="icon"
62
+ type="image/png"
63
+ sizes="192x192"
64
+ href="/images/favicon-192x192.png"
65
+ />
66
+ <link
67
+ rel="icon"
68
+ type="image/png"
69
+ sizes="512x512"
70
+ href="/images/favicon-512x512.png"
71
+ />
72
+ <link
73
+ rel="apple-touch-icon"
74
+ sizes="180x180"
75
+ href="/images/apple-touch-icon.png"
76
+ />
77
+ <link rel="icon" href="/favicon.ico" sizes="32x32" />
78
+ </head>
79
+
80
+ <body class="antialiased bg-gray-900 text-gray-300">
81
+ {{> navbar }}
82
+
83
+ <div id="app" class="min-h-screen container mx-auto p-4 md:p-8">
84
+ <section id="about-hero" class="text-center py-16 md:py-24">
85
+ <h1 class="text-3xl md:text-6xl font-bold text-white mb-4">
86
+ <span data-i18n="about.hero.title"
87
+ >We believe PDF tools should be</span
88
+ >
89
+ <span class="marker-slanted" data-i18n="about.hero.subtitle"
90
+ >fast, private, and free.</span
91
+ >
92
+ </h1>
93
+ <p
94
+ class="text-lg md:text-xl text-gray-400"
95
+ data-i18n="about.hero.noCompromises"
96
+ >
97
+ No compromises.
98
+ </p>
99
+ </section>
100
+
101
+ <div class="section-divider"></div>
102
+
103
+ <section id="mission-section" class="py-16 max-w-4xl mx-auto">
104
+ <div class="text-center">
105
+ <i
106
+ data-lucide="rocket"
107
+ class="w-16 h-16 text-indigo-400 mx-auto mb-6"
108
+ ></i>
109
+ <h2
110
+ class="text-3xl md:text-4xl font-bold text-white mb-4"
111
+ data-i18n="about.mission.title"
112
+ >
113
+ Our Mission
114
+ </h2>
115
+ <p
116
+ class="text-lg text-gray-400 leading-relaxed"
117
+ data-i18n="about.mission.description"
118
+ >
119
+ To provide the most comprehensive PDF toolbox that respects your
120
+ privacy and never asks for payment. We believe essential document
121
+ tools should be accessible to everyone, everywhere, without
122
+ barriers.
123
+ </p>
124
+ </div>
125
+ </section>
126
+
127
+ <div
128
+ class="bg-gray-800 rounded-xl p-8 md:p-12 my-16 border border-gray-700"
129
+ >
130
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-12 items-center">
131
+ <div class="text-center md:text-left">
132
+ <span
133
+ class="text-indigo-400 font-bold uppercase"
134
+ data-i18n="about.philosophy.label"
135
+ >Our Core Philosophy</span
136
+ >
137
+ <h2
138
+ class="text-3xl md:text-4xl font-bold text-white mt-2 mb-4"
139
+ data-i18n="about.philosophy.title"
140
+ >
141
+ Privacy First. Always.
142
+ </h2>
143
+ <p
144
+ class="text-gray-400 leading-relaxed"
145
+ data-i18n="about.philosophy.description"
146
+ >
147
+ In an era where data is a commodity, we take a different approach.
148
+ All processing for Bentopdf tools happens locally in your browser.
149
+ This means your files never touch our servers, we never see your
150
+ documents, and we don't track what you do. Your documents remain
151
+ completely and unequivocally private. It's not just a feature;
152
+ it's our foundation.
153
+ </p>
154
+ </div>
155
+ <div class="flex justify-center">
156
+ <div class="relative w-48 h-48">
157
+ <div
158
+ class="absolute inset-0 bg-indigo-500 rounded-full opacity-20 animate-pulse"
159
+ ></div>
160
+ <div
161
+ class="absolute inset-4 bg-indigo-500 rounded-full opacity-30 animate-pulse delay-500"
162
+ ></div>
163
+ <i
164
+ data-lucide="shield-check"
165
+ class="w-48 h-48 text-indigo-400"
166
+ ></i>
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <section id="why-Bentopdf" class="py-16">
173
+ <h2 class="text-3xl md:text-4xl font-bold text-center text-white mb-12">
174
+ <span data-i18n="about.whyBentopdf.title">Why</span>
175
+ <span class="marker-slanted">Bentopdf?</span>
176
+ </h2>
177
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto">
178
+ <div class="bg-gray-800 p-6 rounded-lg flex items-start gap-4">
179
+ <i
180
+ data-lucide="zap"
181
+ class="w-10 h-10 text-indigo-400 flex-shrink-0 mt-1"
182
+ ></i>
183
+ <div>
184
+ <h3
185
+ class="text-xl font-bold text-white"
186
+ data-i18n="about.whyBentopdf.speed.title"
187
+ >
188
+ Built for Speed
189
+ </h3>
190
+ <p
191
+ class="text-gray-400 mt-2"
192
+ data-i18n="about.whyBentopdf.speed.description"
193
+ >
194
+ No waiting for uploads or downloads to a server. By processing
195
+ files directly in your browser using modern web technologies
196
+ like WebAssembly, we offer unparalleled speed for all our tools.
197
+ </p>
198
+ </div>
199
+ </div>
200
+ <div class="bg-gray-800 p-6 rounded-lg flex items-start gap-4">
201
+ <i
202
+ data-lucide="badge-dollar-sign"
203
+ class="w-10 h-10 text-indigo-400 flex-shrink-0 mt-1"
204
+ ></i>
205
+ <div>
206
+ <h3
207
+ class="text-xl font-bold text-white"
208
+ data-i18n="about.whyBentopdf.free.title"
209
+ >
210
+ Completely Free
211
+ </h3>
212
+ <p
213
+ class="text-gray-400 mt-2"
214
+ data-i18n="about.whyBentopdf.free.description"
215
+ >
216
+ No trials, no subscriptions, no hidden fees, and no "premium"
217
+ features held hostage. We believe powerful PDF tools should be a
218
+ public utility, not a profit center.
219
+ </p>
220
+ </div>
221
+ </div>
222
+ <div class="bg-gray-800 p-6 rounded-lg flex items-start gap-4">
223
+ <i
224
+ data-lucide="user-plus"
225
+ class="w-10 h-10 text-indigo-400 flex-shrink-0 mt-1"
226
+ ></i>
227
+ <div>
228
+ <h3
229
+ class="text-xl font-bold text-white"
230
+ data-i18n="about.whyBentopdf.noAccount.title"
231
+ >
232
+ No Account Required
233
+ </h3>
234
+ <p
235
+ class="text-gray-400 mt-2"
236
+ data-i18n="about.whyBentopdf.noAccount.description"
237
+ >
238
+ Start using any tool immediately. We don't need your email, a
239
+ password, or any personal information. Your workflow should be
240
+ frictionless and anonymous.
241
+ </p>
242
+ </div>
243
+ </div>
244
+ <div class="bg-gray-800 p-6 rounded-lg flex items-start gap-4">
245
+ <i
246
+ data-lucide="code-2"
247
+ class="w-10 h-10 text-indigo-400 flex-shrink-0 mt-1"
248
+ ></i>
249
+ <div>
250
+ <h3
251
+ class="text-xl font-bold text-white"
252
+ data-i18n="about.whyBentopdf.openSource.title"
253
+ >
254
+ Open Source Spirit
255
+ </h3>
256
+ <p
257
+ class="text-gray-400 mt-2"
258
+ data-i18n="about.whyBentopdf.openSource.description"
259
+ >
260
+ Built with transparency in mind. We leverage incredible
261
+ open-source libraries like PDF-lib and PDF.js, and believe in
262
+ the community-driven effort to make powerful tools accessible to
263
+ everyone.
264
+ </p>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </section>
269
+
270
+ <div class="section-divider"></div>
271
+
272
+ <section id="cta-section" class="text-center py-16">
273
+ <h2
274
+ class="text-3xl font-bold text-white mb-4"
275
+ data-i18n="about.cta.title"
276
+ >
277
+ Ready to get started?
278
+ </h2>
279
+ <p
280
+ class="text-lg text-gray-400 mb-8 max-w-2xl mx-auto"
281
+ data-i18n="about.cta.description"
282
+ >
283
+ Join thousands of users who trust Bentopdf for their daily document
284
+ needs. Experience the difference that privacy and performance can
285
+ make.
286
+ </p>
287
+ <a
288
+ href="index.html#tools-header"
289
+ class="inline-block px-8 py-3 rounded-full bg-gradient-to-b from-indigo-500 to-indigo-600 text-white font-semibold focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-900 focus:ring-indigo-400 hover:shadow-xl hover:shadow-indigo-500/30 transition-all duration-200 transform hover:-translate-y-1"
290
+ data-i18n="about.cta.button"
291
+ >
292
+ Explore All Tools
293
+ </a>
294
+ </section>
295
+ </div>
296
+
297
+ {{> footer }}
298
+
299
+ <script type="module" src="src/js/utils/lucide-init.ts"></script>
300
+ <script type="module" src="src/version.ts"></script>
301
+ <script type="module" src="src/js/main.ts"></script>
302
+ <script type="module" src="src/js/mobileMenu.ts"></script>
303
+
304
+ <!-- JSON-LD Schema -->
305
+ <script type="application/ld+json">
306
+ {
307
+ "@context": "https://schema.org",
308
+ "@type": "AboutPage",
309
+ "name": "About BentoPDF",
310
+ "description": "Learn about BentoPDF's mission to provide free, privacy-first PDF tools",
311
+ "url": "https://www.bentopdf.com/about"
312
+ }
313
+ </script>
314
+ </body>
315
+ </html>
chart/.helmignore ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Patterns to ignore when building packages.
2
+ # This supports shell glob matching, relative path matching, and
3
+ # negation (prefixed with !). Only one pattern per line.
4
+ .DS_Store
5
+ # Common VCS dirs
6
+ .git/
7
+ .gitignore
8
+ .bzr/
9
+ .bzrignore
10
+ .hg/
11
+ .hgignore
12
+ .svn/
13
+ # Common backup files
14
+ *.swp
15
+ *.bak
16
+ *.tmp
17
+ *.orig
18
+ *~
19
+ # Various IDEs
20
+ .project
21
+ .idea/
22
+ *.tmproj
23
+ .vscode/
chart/Chart.yaml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: v2
2
+ name: bentopdf
3
+ description: BentoPDF static frontend served by NGINX
4
+ icon: https://raw.githubusercontent.com/spwoodcock/bentopdf/refs/heads/main/public/favicon.ico
5
+ type: application
6
+
7
+ # This is the chart version. This version number should be incremented each time you make changes
8
+ # to the chart and its templates, including the app version.
9
+ # Versions are expected to follow Semantic Versioning (https://semver.org/)
10
+ version: 1.0.0
11
+
12
+ # This is the version number of the application being deployed. This version number should be
13
+ # incremented each time you make changes to the application. Versions are not expected to
14
+ # follow Semantic Versioning. They should reflect the version the application is using.
15
+ # It is recommended to use it with quotes.
16
+ appVersion: "2.1.0"
chart/README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BentoPDF Helm Chart
2
+
3
+ Deploys **BentoPDF** as a **single NGINX container** serving the static frontend.
4
+
5
+ ## Quickstart
6
+
7
+ ### Option 1: Port-forward (testing)
8
+
9
+ ```bash
10
+ helm install bentopdf ./chart
11
+ kubectl port-forward deploy/bentopdf 8080:8080
12
+ # open http://127.0.0.1:8080
13
+ ```
14
+
15
+ ### Option 2: Ingress
16
+
17
+ ```yaml
18
+ ingress:
19
+ enabled: true
20
+ className: nginx
21
+ hosts:
22
+ - host: bentopdf.example.com
23
+ paths:
24
+ - path: /
25
+ pathType: Prefix
26
+ ```
27
+
28
+ ### Option 3: Gateway API (Gateway + HTTPRoute)
29
+
30
+ ```yaml
31
+ gateway:
32
+ enabled: true
33
+ gatewayClassName: "cloudflare" # or your gateway class
34
+
35
+ httpRoute:
36
+ enabled: true
37
+ hostnames:
38
+ - pdfs.example.com
39
+ ```
40
+
41
+ **Note:** Both Gateway and HTTPRoute default to the release namespace. Omit `namespace` fields to use the release namespace automatically.
42
+
43
+ If you have an existing Gateway, set `gateway.enabled=false` and configure `httpRoute.parentRefs`:
44
+
45
+ ```yaml
46
+ gateway:
47
+ enabled: false
48
+
49
+ httpRoute:
50
+ enabled: true
51
+ parentRefs:
52
+ - name: existing-gateway
53
+ namespace: gateway-namespace
54
+ sectionName: http
55
+ hostnames:
56
+ - pdfs.example.com
57
+ ```
58
+
59
+ ## Configuration
60
+
61
+ ### Image
62
+
63
+ - **`image.repository`**: container image repo (default: `ghcr.io/alam00000/bentopdf-simple`)
64
+ - **`image.tag`**: image tag (default: `Chart.appVersion`)
65
+ - **`image.pullPolicy`**: default `IfNotPresent`
66
+
67
+ ### Ports
68
+
69
+ - **`containerPort`**: container listen port (**8080** for the BentoPDF nginx image)
70
+ - **`service.port`**: Service port exposed in-cluster (default **80**)
71
+
72
+ ### Environment Variables
73
+
74
+ ```yaml
75
+ env:
76
+ - name: DISABLE_IPV6
77
+ value: "true"
78
+ ```
79
+
80
+ ## Publish this chart to GHCR (OCI) for testing/deploying
81
+
82
+ ### Build And Push OCI
83
+
84
+ ```bash
85
+ echo "$GHCR_TOKEN" | helm registry login ghcr.io -u "$GHCR_USERNAME" --password-stdin
86
+
87
+ cd chart
88
+ helm package .
89
+
90
+ # produces bentopdf-<version>.tgz
91
+ helm push bentopdf-*.tgz oci://ghcr.io/$GHCR_USERNAME/charts
92
+ ```
93
+
94
+ This could be automated as part of a Github workflow.
95
+
96
+ ### Deploy
97
+
98
+ ```bash
99
+ helm upgrade --install bentopdf oci://ghcr.io/$GHCR_USERNAME/charts/bentopdf --version 1.0.0
100
+ ```
chart/templates/NOTES.txt ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1. Get the application URL by running these commands:
2
+ {{- if .Values.httpRoute.enabled }}
3
+ {{- $defaultGatewayName := .Values.gateway.name -}}
4
+ {{- if not $defaultGatewayName -}}
5
+ {{- $defaultGatewayName = printf "%s-gateway" (include "chart.fullname" .) -}}
6
+ {{- end -}}
7
+ {{- $defaultGatewayNs := .Release.Namespace -}}
8
+ {{- if .Values.gateway.enabled -}}
9
+ {{- $defaultGatewayNs = default .Release.Namespace .Values.gateway.namespace -}}
10
+ {{- end -}}
11
+ {{- $gatewayName := $defaultGatewayName -}}
12
+ {{- $gatewayNs := $defaultGatewayNs -}}
13
+ {{- if and .Values.httpRoute.parentRefs (first .Values.httpRoute.parentRefs) -}}
14
+ {{- $firstRef := first .Values.httpRoute.parentRefs -}}
15
+ {{- $gatewayName = default $defaultGatewayName $firstRef.name -}}
16
+ {{- $gatewayNs = default $defaultGatewayNs $firstRef.namespace -}}
17
+ {{- end -}}
18
+ {{- if .Values.httpRoute.hostnames }}
19
+ export APP_HOSTNAME={{ .Values.httpRoute.hostnames | first }}
20
+ echo "Visit http://$APP_HOSTNAME to use your application"
21
+ {{- else }}
22
+ echo "HTTPRoute is enabled. Configure httpRoute.hostnames to see your URL here."
23
+ {{- end }}
24
+ NOTE: Your HTTPRoute depends on the listener configuration of your gateway and your HTTPRoute rules.
25
+ The rules can be set for path, method, header and query parameters.
26
+ You can check the gateway configuration with 'kubectl get --namespace {{ $gatewayNs }} gateway/{{ $gatewayName }} -o yaml'
27
+ {{- else if .Values.ingress.enabled }}
28
+ {{- range $host := .Values.ingress.hosts }}
29
+ {{- range .paths }}
30
+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
31
+ {{- end }}
32
+ {{- end }}
33
+ {{- else if contains "NodePort" .Values.service.type }}
34
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "chart.fullname" . }})
35
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
36
+ echo http://$NODE_IP:$NODE_PORT
37
+ {{- else if contains "LoadBalancer" .Values.service.type }}
38
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
39
+ You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "chart.fullname" . }}'
40
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "chart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
41
+ echo http://$SERVICE_IP:{{ .Values.service.port }}
42
+ {{- else if contains "ClusterIP" .Values.service.type }}
43
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "chart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
44
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
45
+ echo "Visit http://127.0.0.1:8080 to use your application"
46
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
47
+ {{- end }}
chart/templates/_helpers.tpl ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{/*
2
+ Expand the name of the chart.
3
+ */}}
4
+ {{- define "chart.name" -}}
5
+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6
+ {{- end }}
7
+
8
+ {{/*
9
+ Create a default fully qualified app name.
10
+ We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11
+ If release name contains chart name it will be used as a full name.
12
+ */}}
13
+ {{- define "chart.fullname" -}}
14
+ {{- if .Values.fullnameOverride }}
15
+ {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16
+ {{- else }}
17
+ {{- $name := default .Chart.Name .Values.nameOverride }}
18
+ {{- if contains $name .Release.Name }}
19
+ {{- .Release.Name | trunc 63 | trimSuffix "-" }}
20
+ {{- else }}
21
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22
+ {{- end }}
23
+ {{- end }}
24
+ {{- end }}
25
+
26
+ {{/*
27
+ Create chart name and version as used by the chart label.
28
+ */}}
29
+ {{- define "chart.chart" -}}
30
+ {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31
+ {{- end }}
32
+
33
+ {{/*
34
+ Common labels
35
+ */}}
36
+ {{- define "chart.labels" -}}
37
+ helm.sh/chart: {{ include "chart.chart" . }}
38
+ {{ include "chart.selectorLabels" . }}
39
+ {{- if .Chart.AppVersion }}
40
+ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41
+ {{- end }}
42
+ app.kubernetes.io/managed-by: {{ .Release.Service }}
43
+ {{- end }}
44
+
45
+ {{/*
46
+ Selector labels
47
+ */}}
48
+ {{- define "chart.selectorLabels" -}}
49
+ app.kubernetes.io/name: {{ include "chart.name" . }}
50
+ app.kubernetes.io/instance: {{ .Release.Name }}
51
+ {{- end }}
52
+
chart/templates/deployment.yaml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: {{ include "chart.fullname" . }}
5
+ labels:
6
+ {{- include "chart.labels" . | nindent 4 }}
7
+ spec:
8
+ replicas: {{ .Values.replicaCount }}
9
+ selector:
10
+ matchLabels:
11
+ {{- include "chart.selectorLabels" . | nindent 6 }}
12
+ template:
13
+ metadata:
14
+ {{- with .Values.podAnnotations }}
15
+ annotations:
16
+ {{- toYaml . | nindent 8 }}
17
+ {{- end }}
18
+ labels:
19
+ {{- include "chart.labels" . | nindent 8 }}
20
+ {{- with .Values.podLabels }}
21
+ {{- toYaml . | nindent 8 }}
22
+ {{- end }}
23
+ spec:
24
+ {{- with .Values.imagePullSecrets }}
25
+ imagePullSecrets:
26
+ {{- toYaml . | nindent 8 }}
27
+ {{- end }}
28
+ containers:
29
+ - name: {{ .Chart.Name }}
30
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
31
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
32
+ ports:
33
+ - name: http
34
+ containerPort: {{ .Values.containerPort }}
35
+ protocol: TCP
36
+ {{- with .Values.env }}
37
+ env:
38
+ {{- toYaml . | nindent 12 }}
39
+ {{- end }}
40
+ {{- with .Values.livenessProbe }}
41
+ livenessProbe:
42
+ {{- toYaml . | nindent 12 }}
43
+ {{- end }}
44
+ {{- with .Values.readinessProbe }}
45
+ readinessProbe:
46
+ {{- toYaml . | nindent 12 }}
47
+ {{- end }}
48
+ {{- with .Values.resources }}
49
+ resources:
50
+ {{- toYaml . | nindent 12 }}
51
+ {{- end }}
chart/templates/gateway.yaml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- if .Values.gateway.enabled -}}
2
+ {{- $gatewayName := .Values.gateway.name -}}
3
+ {{- if not $gatewayName -}}
4
+ {{- $gatewayName = printf "%s-gateway" (include "chart.fullname" .) -}}
5
+ {{- end -}}
6
+ {{- $gatewayNs := default .Release.Namespace .Values.gateway.namespace -}}
7
+ apiVersion: gateway.networking.k8s.io/v1
8
+ kind: Gateway
9
+ metadata:
10
+ name: {{ $gatewayName }}
11
+ namespace: {{ $gatewayNs }}
12
+ labels:
13
+ {{- include "chart.labels" . | nindent 4 }}
14
+ {{- with .Values.gateway.annotations }}
15
+ annotations:
16
+ {{- toYaml . | nindent 4 }}
17
+ {{- end }}
18
+ spec:
19
+ gatewayClassName: {{ required "values.gateway.gatewayClassName is required when gateway.enabled=true" .Values.gateway.gatewayClassName }}
20
+ listeners:
21
+ {{- toYaml .Values.gateway.listeners | nindent 4 }}
22
+ {{- end }}
chart/templates/httproute.yaml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- if .Values.httpRoute.enabled -}}
2
+ {{- $fullName := include "chart.fullname" . -}}
3
+ {{- $svcPort := .Values.service.port -}}
4
+ {{- $defaultGatewayName := .Values.gateway.name -}}
5
+ {{- if not $defaultGatewayName -}}
6
+ {{- $defaultGatewayName = printf "%s-gateway" $fullName -}}
7
+ {{- end -}}
8
+ {{- $defaultGatewayNs := .Release.Namespace -}}
9
+ {{- if .Values.gateway.enabled -}}
10
+ {{- $defaultGatewayNs = default .Release.Namespace .Values.gateway.namespace -}}
11
+ {{- end -}}
12
+ apiVersion: gateway.networking.k8s.io/v1
13
+ kind: HTTPRoute
14
+ metadata:
15
+ name: {{ $fullName }}
16
+ labels:
17
+ {{- include "chart.labels" . | nindent 4 }}
18
+ {{- with .Values.httpRoute.annotations }}
19
+ annotations:
20
+ {{- toYaml . | nindent 4 }}
21
+ {{- end }}
22
+ spec:
23
+ parentRefs:
24
+ {{- if .Values.httpRoute.parentRefs }}
25
+ {{- range $ref := .Values.httpRoute.parentRefs }}
26
+ - name: {{ default $defaultGatewayName $ref.name | quote }}
27
+ {{- $refNs := $ref.namespace | default $defaultGatewayNs -}}
28
+ namespace: {{ $refNs | quote }}
29
+ {{- with $ref.sectionName }}
30
+ sectionName: {{ . | quote }}
31
+ {{- else }}
32
+ sectionName: "http"
33
+ {{- end }}
34
+ {{- with $ref.kind }}
35
+ kind: {{ . | quote }}
36
+ {{- end }}
37
+ {{- with $ref.group }}
38
+ group: {{ . | quote }}
39
+ {{- end }}
40
+ {{- end }}
41
+ {{- else }}
42
+ # Default parentRef when parentRefs is empty or not set
43
+ - name: {{ $defaultGatewayName | quote }}
44
+ namespace: {{ $defaultGatewayNs | quote }}
45
+ sectionName: "http"
46
+ {{- end }}
47
+ {{- with .Values.httpRoute.hostnames }}
48
+ hostnames:
49
+ {{- toYaml . | nindent 4 }}
50
+ {{- end }}
51
+ rules:
52
+ {{- range .Values.httpRoute.rules }}
53
+ - {{- with .matches }}
54
+ matches:
55
+ {{- toYaml . | nindent 8 }}
56
+ {{- end }}
57
+ {{- with .filters }}
58
+ filters:
59
+ {{- toYaml . | nindent 8 }}
60
+ {{- end }}
61
+ backendRefs:
62
+ - name: {{ $fullName }}
63
+ port: {{ $svcPort }}
64
+ weight: 1
65
+ {{- end }}
66
+ {{- end }}
chart/templates/ingress.yaml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- if .Values.ingress.enabled -}}
2
+ apiVersion: networking.k8s.io/v1
3
+ kind: Ingress
4
+ metadata:
5
+ name: {{ include "chart.fullname" . }}
6
+ labels:
7
+ {{- include "chart.labels" . | nindent 4 }}
8
+ {{- with .Values.ingress.annotations }}
9
+ annotations:
10
+ {{- toYaml . | nindent 4 }}
11
+ {{- end }}
12
+ spec:
13
+ {{- with .Values.ingress.className }}
14
+ ingressClassName: {{ . }}
15
+ {{- end }}
16
+ {{- if .Values.ingress.tls }}
17
+ tls:
18
+ {{- range .Values.ingress.tls }}
19
+ - hosts:
20
+ {{- range .hosts }}
21
+ - {{ . | quote }}
22
+ {{- end }}
23
+ secretName: {{ .secretName }}
24
+ {{- end }}
25
+ {{- end }}
26
+ rules:
27
+ {{- range .Values.ingress.hosts }}
28
+ - host: {{ .host | quote }}
29
+ http:
30
+ paths:
31
+ {{- range .paths }}
32
+ - path: {{ .path }}
33
+ {{- with .pathType }}
34
+ pathType: {{ . }}
35
+ {{- end }}
36
+ backend:
37
+ service:
38
+ name: {{ include "chart.fullname" $ }}
39
+ port:
40
+ number: {{ $.Values.service.port }}
41
+ {{- end }}
42
+ {{- end }}
43
+ {{- end }}
chart/templates/service.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: {{ include "chart.fullname" . }}
5
+ labels:
6
+ {{- include "chart.labels" . | nindent 4 }}
7
+ spec:
8
+ type: {{ .Values.service.type }}
9
+ ports:
10
+ - port: {{ .Values.service.port }}
11
+ targetPort: http
12
+ protocol: TCP
13
+ name: http
14
+ selector:
15
+ {{- include "chart.selectorLabels" . | nindent 4 }}
chart/templates/serviceaccount.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # The service account was removed, as it's not necessary for a chart like this.
2
+ #
3
+ # There are no calls to the Kubernetes API - routing between services.
4
+ # It's a simple nginx static website deployment only.
chart/templates/tests/test-connection.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: v1
2
+ kind: Pod
3
+ metadata:
4
+ name: "{{ include "chart.fullname" . }}-test-connection"
5
+ labels:
6
+ {{- include "chart.labels" . | nindent 4 }}
7
+ annotations:
8
+ "helm.sh/hook": test
9
+ spec:
10
+ containers:
11
+ - name: wget
12
+ image: busybox
13
+ command: ['wget']
14
+ args: ['-qO-', 'http://{{ include "chart.fullname" . }}:{{ .Values.service.port }}/']
15
+ restartPolicy: Never
chart/values.yaml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Default values for the BentoPDF chart (single nginx static frontend).
2
+ replicaCount: 1
3
+
4
+ image:
5
+ # Image built from this repo's `Dockerfile` (nginx serving static frontend).
6
+ repository: ghcr.io/alam00000/bentopdf-simple
7
+ pullPolicy: IfNotPresent
8
+ tag: ""
9
+
10
+ imagePullSecrets: []
11
+ nameOverride: ""
12
+ fullnameOverride: ""
13
+
14
+ podAnnotations: {}
15
+ podLabels: {}
16
+
17
+ service:
18
+ type: ClusterIP
19
+ port: 80
20
+
21
+ # Container listen port (BentoPDF nginx image listens on 8080).
22
+ containerPort: 8080
23
+
24
+ env: []
25
+
26
+ ingress:
27
+ enabled: false
28
+ className: ""
29
+ annotations: {}
30
+ hosts:
31
+ - host: bentopdf.local
32
+ paths:
33
+ - path: /
34
+ pathType: ImplementationSpecific
35
+ tls: []
36
+
37
+ # Gateway API (optional)
38
+ gateway:
39
+ enabled: false
40
+ name: "" # default: release fullname + "-gateway" suffix
41
+ namespace: "" # to override the namespace
42
+ annotations: {}
43
+ gatewayClassName: "" # required when enabled=true
44
+ listeners:
45
+ - name: http
46
+ protocol: HTTP
47
+ port: 80
48
+ allowedRoutes:
49
+ namespaces:
50
+ from: Same # Allow routes from the same namespace
51
+
52
+ httpRoute:
53
+ enabled: false
54
+ annotations: {}
55
+ # parentRefs: # Omit entirely to use default (auto-references gateway in same namespace)
56
+ # - name: "" # default: gateway.name or {release-name}-gateway
57
+ # namespace: "" # to override the namespace
58
+ # sectionName: "http"
59
+ hostnames:
60
+ - bentopdf.local
61
+ rules:
62
+ - matches:
63
+ - path:
64
+ type: PathPrefix
65
+ value: /
66
+
67
+ resources: {}
68
+
69
+ livenessProbe:
70
+ httpGet:
71
+ path: /
72
+ port: http
73
+ readinessProbe:
74
+ httpGet:
75
+ path: /
76
+ port: http
cloudflare/WASM-PROXY.md ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WASM Proxy Setup Guide
2
+
3
+ BentoPDF uses a Cloudflare Worker to proxy WASM library requests, bypassing CORS restrictions when loading AGPL-licensed components (PyMuPDF, Ghostscript, CoherentPDF) from external sources.
4
+
5
+ ## Quick Start
6
+
7
+ ### 1. Deploy the Worker
8
+
9
+ ```bash
10
+ cd cloudflare
11
+ npx wrangler login
12
+ npx wrangler deploy -c wasm-wrangler.toml
13
+ ```
14
+
15
+ ### 2. Configure Source URLs
16
+
17
+ Set environment secrets with the base URLs for your WASM files:
18
+
19
+ ```bash
20
+ # Option A: Interactive prompts
21
+ npx wrangler secret put PYMUPDF_SOURCE -c wasm-wrangler.toml
22
+ npx wrangler secret put GS_SOURCE -c wasm-wrangler.toml
23
+ npx wrangler secret put CPDF_SOURCE -c wasm-wrangler.toml
24
+
25
+ # Option B: Set via Cloudflare Dashboard
26
+ # Go to Workers & Pages > bentopdf-wasm-proxy > Settings > Variables
27
+ ```
28
+
29
+ **Recommended Source URLs:**
30
+
31
+ - PYMUPDF_SOURCE: `https://cdn.jsdelivr.net/npm/@bentopdf/pymupdf-wasm@0.11.14/`
32
+ - GS_SOURCE: `https://cdn.jsdelivr.net/npm/@bentopdf/gs-wasm/assets/`
33
+ - CPDF_SOURCE: `https://cdn.jsdelivr.net/npm/coherentpdf/dist/`
34
+
35
+ > **Note:** You can use your own hosted WASM files instead of the recommended URLs. Just ensure your files match the expected directory structure and file names that BentoPDF expects for each module.
36
+
37
+ ### 3. Configure BentoPDF
38
+
39
+ **Option A: Environment variables (recommended — zero-config for users)**
40
+
41
+ Set these in `.env.production` or pass as Docker build args:
42
+
43
+ ```bash
44
+ VITE_WASM_PYMUPDF_URL=https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/pymupdf/
45
+ VITE_WASM_GS_URL=https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/gs/
46
+ VITE_WASM_CPDF_URL=https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/cpdf/
47
+ ```
48
+
49
+ **Option B: Manual per-user configuration**
50
+
51
+ In BentoPDF's Advanced Settings (wasm-settings.html), enter:
52
+
53
+ | Module | URL |
54
+ | ----------- | ------------------------------------------------------------------- |
55
+ | PyMuPDF | `https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/pymupdf/` |
56
+ | Ghostscript | `https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/gs/` |
57
+ | CoherentPDF | `https://bentopdf-wasm-proxy.<your-subdomain>.workers.dev/cpdf/` |
58
+
59
+ ## Custom Domain (Optional)
60
+
61
+ To use a custom domain like `wasm.bentopdf.com`:
62
+
63
+ 1. Add route in `wasm-wrangler.toml`:
64
+
65
+ ```toml
66
+ routes = [
67
+ { pattern = "wasm.bentopdf.com/*", zone_name = "bentopdf.com" }
68
+ ]
69
+ ```
70
+
71
+ 2. Add DNS record in Cloudflare:
72
+ - Type: AAAA
73
+ - Name: wasm
74
+ - Content: 100::
75
+ - Proxied: Yes
76
+
77
+ 3. Redeploy:
78
+
79
+ ```bash
80
+ npx wrangler deploy -c wasm-wrangler.toml
81
+ ```
82
+
83
+ ## Security Features
84
+
85
+ - **Origin validation**: Only allows requests from configured origins
86
+ - **Rate limiting**: 100 requests/minute per IP (requires KV namespace)
87
+ - **File type restrictions**: Only WASM-related files (.js, .wasm, .data, etc.)
88
+ - **Size limits**: Max 100MB per file
89
+ - **Caching**: Reduces origin requests and improves performance
90
+
91
+ ## Self-Hosting Notes
92
+
93
+ 1. Update `ALLOWED_ORIGINS` in `wasm-proxy-worker.js` to include your domain
94
+ 2. Host your WASM files on any origin (R2, S3, or any CDN)
95
+ 3. Set source URLs as secrets in your worker
96
+
97
+ ## Endpoints
98
+
99
+ | Endpoint | Description |
100
+ | ------------ | -------------------------------------- |
101
+ | `/` | Health check, shows configured modules |
102
+ | `/pymupdf/*` | PyMuPDF WASM files |
103
+ | `/gs/*` | Ghostscript WASM files |
104
+ | `/cpdf/*` | CoherentPDF files |
cloudflare/cors-proxy-worker.js ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BentoPDF CORS Proxy Worker
3
+ *
4
+ * This Cloudflare Worker proxies certificate requests for the digital signing tool.
5
+ * It fetches certificates from external CAs that don't have CORS headers enabled
6
+ * and returns them with proper CORS headers.
7
+ *
8
+ *
9
+ * Deploy: npx wrangler deploy
10
+ *
11
+ * Required Environment Variables (set in wrangler.toml or Cloudflare dashboard):
12
+ * - PROXY_SECRET: Shared secret for HMAC signature verification
13
+ */
14
+
15
+ const ALLOWED_PATTERNS = [
16
+ /\.crt$/i,
17
+ /\.cer$/i,
18
+ /\.pem$/i,
19
+ /\/certs\//i,
20
+ /\/ocsp/i,
21
+ /\/crl/i,
22
+ /caIssuers/i,
23
+ ];
24
+
25
+ const ALLOWED_ORIGINS = [
26
+ 'https://www.bentopdf.com',
27
+ 'https://bentopdf.com',
28
+ ];
29
+
30
+ const BLOCKED_DOMAINS = [
31
+ 'localhost',
32
+ '127.0.0.1',
33
+ '0.0.0.0',
34
+ ];
35
+
36
+
37
+ const MAX_TIMESTAMP_AGE_MS = 5 * 60 * 1000;
38
+
39
+ const RATE_LIMIT_MAX_REQUESTS = 60;
40
+ const RATE_LIMIT_WINDOW_MS = 60 * 1000;
41
+
42
+ const MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024;
43
+
44
+ async function verifySignature(message, signature, secret) {
45
+ try {
46
+ const encoder = new TextEncoder();
47
+ const key = await crypto.subtle.importKey(
48
+ 'raw',
49
+ encoder.encode(secret),
50
+ { name: 'HMAC', hash: 'SHA-256' },
51
+ false,
52
+ ['verify']
53
+ );
54
+
55
+ const signatureBytes = new Uint8Array(
56
+ signature.match(/.{1,2}/g).map(byte => parseInt(byte, 16))
57
+ );
58
+
59
+ return await crypto.subtle.verify(
60
+ 'HMAC',
61
+ key,
62
+ signatureBytes,
63
+ encoder.encode(message)
64
+ );
65
+ } catch (e) {
66
+ console.error('Signature verification error:', e);
67
+ return false;
68
+ }
69
+ }
70
+
71
+ async function generateSignature(message, secret) {
72
+ const encoder = new TextEncoder();
73
+ const key = await crypto.subtle.importKey(
74
+ 'raw',
75
+ encoder.encode(secret),
76
+ { name: 'HMAC', hash: 'SHA-256' },
77
+ false,
78
+ ['sign']
79
+ );
80
+
81
+ const signature = await crypto.subtle.sign(
82
+ 'HMAC',
83
+ key,
84
+ encoder.encode(message)
85
+ );
86
+
87
+ return Array.from(new Uint8Array(signature))
88
+ .map(b => b.toString(16).padStart(2, '0'))
89
+ .join('');
90
+ }
91
+
92
+ function isAllowedOrigin(origin) {
93
+ if (!origin) return false;
94
+ return ALLOWED_ORIGINS.some(allowed => origin.startsWith(allowed.replace(/\/$/, '')));
95
+ }
96
+
97
+ function isValidCertificateUrl(urlString) {
98
+ try {
99
+ const url = new URL(urlString);
100
+
101
+ if (!['http:', 'https:'].includes(url.protocol)) {
102
+ return false;
103
+ }
104
+
105
+ if (BLOCKED_DOMAINS.some(domain => url.hostname.includes(domain))) {
106
+ return false;
107
+ }
108
+
109
+ const hostname = url.hostname;
110
+ if (/^10\./.test(hostname) ||
111
+ /^172\.(1[6-9]|2[0-9]|3[0-1])\./.test(hostname) ||
112
+ /^192\.168\./.test(hostname)) {
113
+ return false;
114
+ }
115
+
116
+ return ALLOWED_PATTERNS.some(pattern => pattern.test(urlString));
117
+ } catch {
118
+ return false;
119
+ }
120
+ }
121
+
122
+ function corsHeaders(origin) {
123
+ return {
124
+ 'Access-Control-Allow-Origin': origin || '*',
125
+ 'Access-Control-Allow-Methods': 'GET, OPTIONS',
126
+ 'Access-Control-Allow-Headers': 'Content-Type',
127
+ 'Access-Control-Max-Age': '86400',
128
+ };
129
+ }
130
+
131
+ function handleOptions(request) {
132
+ const origin = request.headers.get('Origin');
133
+ return new Response(null, {
134
+ status: 204,
135
+ headers: corsHeaders(origin),
136
+ });
137
+ }
138
+
139
+ export default {
140
+ async fetch(request, env, ctx) {
141
+ const url = new URL(request.url);
142
+ const origin = request.headers.get('Origin');
143
+
144
+ if (request.method === 'OPTIONS') {
145
+ return handleOptions(request);
146
+ }
147
+
148
+ // NOTE: If you are selfhosting this proxy, you can remove this check, or can set it to only accept requests from your own domain
149
+ if (!isAllowedOrigin(origin)) {
150
+ return new Response(JSON.stringify({
151
+ error: 'Forbidden',
152
+ message: 'This proxy only accepts requests from bentopdf.com',
153
+ }), {
154
+ status: 403,
155
+ headers: {
156
+ 'Content-Type': 'application/json',
157
+ },
158
+ });
159
+ }
160
+
161
+ if (request.method !== 'GET') {
162
+ return new Response('Method not allowed', {
163
+ status: 405,
164
+ headers: corsHeaders(origin),
165
+ });
166
+ }
167
+
168
+ const targetUrl = url.searchParams.get('url');
169
+ const timestamp = url.searchParams.get('t');
170
+ const signature = url.searchParams.get('sig');
171
+
172
+ if (env.PROXY_SECRET) {
173
+ if (!timestamp || !signature) {
174
+ return new Response(JSON.stringify({
175
+ error: 'Missing authentication parameters',
176
+ message: 'Request must include timestamp (t) and signature (sig) parameters',
177
+ }), {
178
+ status: 401,
179
+ headers: {
180
+ ...corsHeaders(origin),
181
+ 'Content-Type': 'application/json',
182
+ },
183
+ });
184
+ }
185
+
186
+ const requestTime = parseInt(timestamp, 10);
187
+ const now = Date.now();
188
+ if (isNaN(requestTime) || Math.abs(now - requestTime) > MAX_TIMESTAMP_AGE_MS) {
189
+ return new Response(JSON.stringify({
190
+ error: 'Request expired or invalid timestamp',
191
+ message: 'Timestamp must be within 5 minutes of current time',
192
+ }), {
193
+ status: 401,
194
+ headers: {
195
+ ...corsHeaders(origin),
196
+ 'Content-Type': 'application/json',
197
+ },
198
+ });
199
+ }
200
+
201
+ const message = `${targetUrl}${timestamp}`;
202
+ const isValid = await verifySignature(message, signature, env.PROXY_SECRET);
203
+
204
+ if (!isValid) {
205
+ return new Response(JSON.stringify({
206
+ error: 'Invalid signature',
207
+ message: 'Request signature verification failed',
208
+ }), {
209
+ status: 401,
210
+ headers: {
211
+ ...corsHeaders(origin),
212
+ 'Content-Type': 'application/json',
213
+ },
214
+ });
215
+ }
216
+ }
217
+
218
+ if (!targetUrl) {
219
+ return new Response(JSON.stringify({
220
+ error: 'Missing url parameter',
221
+ usage: 'GET /?url=<certificate_url>',
222
+ }), {
223
+ status: 400,
224
+ headers: {
225
+ ...corsHeaders(origin),
226
+ 'Content-Type': 'application/json',
227
+ },
228
+ });
229
+ }
230
+
231
+ if (!isValidCertificateUrl(targetUrl)) {
232
+ return new Response(JSON.stringify({
233
+ error: 'Invalid or disallowed URL',
234
+ message: 'Only certificate-related URLs are allowed (*.crt, *.cer, *.pem, /certs/, /ocsp, /crl)',
235
+ }), {
236
+ status: 403,
237
+ headers: {
238
+ ...corsHeaders(origin),
239
+ 'Content-Type': 'application/json',
240
+ },
241
+ });
242
+ }
243
+
244
+ const clientIP = request.headers.get('CF-Connecting-IP') || 'unknown';
245
+ const rateLimitKey = `ratelimit:${clientIP}`;
246
+ const now = Date.now();
247
+
248
+ if (env.RATE_LIMIT_KV) {
249
+ const rateLimitData = await env.RATE_LIMIT_KV.get(rateLimitKey, { type: 'json' });
250
+ const requests = rateLimitData?.requests || [];
251
+
252
+ const recentRequests = requests.filter(t => now - t < RATE_LIMIT_WINDOW_MS);
253
+
254
+ if (recentRequests.length >= RATE_LIMIT_MAX_REQUESTS) {
255
+ return new Response(JSON.stringify({
256
+ error: 'Rate limit exceeded',
257
+ message: `Maximum ${RATE_LIMIT_MAX_REQUESTS} requests per minute. Please try again later.`,
258
+ retryAfter: Math.ceil((recentRequests[0] + RATE_LIMIT_WINDOW_MS - now) / 1000),
259
+ }), {
260
+ status: 429,
261
+ headers: {
262
+ ...corsHeaders(origin),
263
+ 'Content-Type': 'application/json',
264
+ 'Retry-After': Math.ceil((recentRequests[0] + RATE_LIMIT_WINDOW_MS - now) / 1000).toString(),
265
+ },
266
+ });
267
+ }
268
+
269
+ recentRequests.push(now);
270
+ await env.RATE_LIMIT_KV.put(rateLimitKey, JSON.stringify({ requests: recentRequests }), {
271
+ expirationTtl: 120,
272
+ });
273
+ }
274
+
275
+ try {
276
+ const response = await fetch(targetUrl, {
277
+ headers: {
278
+ 'User-Agent': 'BentoPDF-CertProxy/1.0',
279
+ },
280
+ });
281
+
282
+ if (!response.ok) {
283
+ return new Response(JSON.stringify({
284
+ error: 'Failed to fetch certificate',
285
+ status: response.status,
286
+ statusText: response.statusText,
287
+ }), {
288
+ status: response.status,
289
+ headers: {
290
+ ...corsHeaders(origin),
291
+ 'Content-Type': 'application/json',
292
+ },
293
+ });
294
+ }
295
+
296
+ const contentLength = parseInt(response.headers.get('Content-Length') || '0', 10);
297
+ if (contentLength > MAX_FILE_SIZE_BYTES) {
298
+ return new Response(JSON.stringify({
299
+ error: 'File too large',
300
+ message: `Certificate file exceeds maximum size of ${MAX_FILE_SIZE_BYTES / 1024}KB`,
301
+ size: contentLength,
302
+ maxSize: MAX_FILE_SIZE_BYTES,
303
+ }), {
304
+ status: 413,
305
+ headers: {
306
+ ...corsHeaders(origin),
307
+ 'Content-Type': 'application/json',
308
+ },
309
+ });
310
+ }
311
+
312
+ const certData = await response.arrayBuffer();
313
+
314
+ if (certData.byteLength > MAX_FILE_SIZE_BYTES) {
315
+ return new Response(JSON.stringify({
316
+ error: 'File too large',
317
+ message: `Certificate file exceeds maximum size of ${MAX_FILE_SIZE_BYTES / 1024}KB`,
318
+ size: certData.byteLength,
319
+ maxSize: MAX_FILE_SIZE_BYTES,
320
+ }), {
321
+ status: 413,
322
+ headers: {
323
+ ...corsHeaders(origin),
324
+ 'Content-Type': 'application/json',
325
+ },
326
+ });
327
+ }
328
+
329
+ return new Response(certData, {
330
+ status: 200,
331
+ headers: {
332
+ ...corsHeaders(origin),
333
+ 'Content-Type': response.headers.get('Content-Type') || 'application/x-x509-ca-cert',
334
+ 'Content-Length': certData.byteLength.toString(),
335
+ 'Cache-Control': 'public, max-age=86400',
336
+ },
337
+ });
338
+ } catch (error) {
339
+ return new Response(JSON.stringify({
340
+ error: 'Proxy error',
341
+ message: error.message,
342
+ }), {
343
+ status: 500,
344
+ headers: {
345
+ ...corsHeaders(origin),
346
+ 'Content-Type': 'application/json',
347
+ },
348
+ });
349
+ }
350
+ },
351
+ };
cloudflare/wasm-proxy-worker.js ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * BentoPDF WASM Proxy Worker
3
+ *
4
+ * This Cloudflare Worker proxies WASM module requests to bypass CORS restrictions.
5
+ * It fetches WASM libraries (PyMuPDF, Ghostscript, CoherentPDF) from configured sources
6
+ * and serves them with proper CORS headers.
7
+ *
8
+ * Endpoints:
9
+ * - /pymupdf/* - Proxies to PyMuPDF WASM source
10
+ * - /gs/* - Proxies to Ghostscript WASM source
11
+ * - /cpdf/* - Proxies to CoherentPDF WASM source
12
+ *
13
+ * Deploy: cd cloudflare && npx wrangler deploy -c wasm-wrangler.toml
14
+ *
15
+ * Required Environment Variables (set in Cloudflare dashboard):
16
+ * - PYMUPDF_SOURCE: Base URL for PyMuPDF WASM files (e.g., https://cdn.example.com/pymupdf)
17
+ * - GS_SOURCE: Base URL for Ghostscript WASM files (e.g., https://cdn.example.com/gs)
18
+ * - CPDF_SOURCE: Base URL for CoherentPDF files (e.g., https://cdn.example.com/cpdf)
19
+ */
20
+
21
+ const ALLOWED_ORIGINS = ['https://www.bentopdf.com', 'https://bentopdf.com'];
22
+
23
+ const MAX_FILE_SIZE_BYTES = 100 * 1024 * 1024;
24
+
25
+ const RATE_LIMIT_MAX_REQUESTS = 100;
26
+ const RATE_LIMIT_WINDOW_MS = 60 * 1000;
27
+
28
+ const CACHE_TTL_SECONDS = 604800;
29
+
30
+ const ALLOWED_EXTENSIONS = [
31
+ '.js',
32
+ '.mjs',
33
+ '.wasm',
34
+ '.data',
35
+ '.py',
36
+ '.so',
37
+ '.zip',
38
+ '.json',
39
+ '.mem',
40
+ '.asm.js',
41
+ '.worker.js',
42
+ '.html',
43
+ ];
44
+
45
+ function isAllowedOrigin(origin) {
46
+ if (!origin) return true; // Allow no-origin requests (e.g., direct browser navigation)
47
+ return ALLOWED_ORIGINS.some((allowed) =>
48
+ origin.startsWith(allowed.replace(/\/$/, ''))
49
+ );
50
+ }
51
+
52
+ function isAllowedFile(pathname) {
53
+ const ext = pathname.substring(pathname.lastIndexOf('.')).toLowerCase();
54
+ if (ALLOWED_EXTENSIONS.includes(ext)) return true;
55
+
56
+ if (!pathname.includes('.') || pathname.endsWith('/')) return true;
57
+
58
+ return false;
59
+ }
60
+
61
+ function corsHeaders(origin) {
62
+ return {
63
+ 'Access-Control-Allow-Origin': origin || '*',
64
+ 'Access-Control-Allow-Methods': 'GET, HEAD, OPTIONS',
65
+ 'Access-Control-Allow-Headers': 'Content-Type, Range, Cache-Control',
66
+ 'Access-Control-Expose-Headers':
67
+ 'Content-Length, Content-Range, Content-Type',
68
+ 'Access-Control-Max-Age': '86400',
69
+ };
70
+ }
71
+
72
+ function handleOptions(request) {
73
+ const origin = request.headers.get('Origin');
74
+ return new Response(null, {
75
+ status: 204,
76
+ headers: corsHeaders(origin),
77
+ });
78
+ }
79
+
80
+ function getContentType(pathname) {
81
+ const ext = pathname.substring(pathname.lastIndexOf('.')).toLowerCase();
82
+ const contentTypes = {
83
+ '.js': 'application/javascript',
84
+ '.mjs': 'application/javascript',
85
+ '.wasm': 'application/wasm',
86
+ '.json': 'application/json',
87
+ '.data': 'application/octet-stream',
88
+ '.py': 'text/x-python',
89
+ '.so': 'application/octet-stream',
90
+ '.zip': 'application/zip',
91
+ '.mem': 'application/octet-stream',
92
+ '.html': 'text/html',
93
+ };
94
+ return contentTypes[ext] || 'application/octet-stream';
95
+ }
96
+
97
+ async function proxyRequest(request, env, sourceBaseUrl, subpath, origin) {
98
+ if (!sourceBaseUrl) {
99
+ return new Response(
100
+ JSON.stringify({
101
+ error: 'Source not configured',
102
+ message: 'This WASM module source URL has not been configured.',
103
+ }),
104
+ {
105
+ status: 503,
106
+ headers: {
107
+ ...corsHeaders(origin),
108
+ 'Content-Type': 'application/json',
109
+ },
110
+ }
111
+ );
112
+ }
113
+
114
+ const normalizedBase = sourceBaseUrl.endsWith('/')
115
+ ? sourceBaseUrl.slice(0, -1)
116
+ : sourceBaseUrl;
117
+ const normalizedPath = subpath.startsWith('/') ? subpath : `/${subpath}`;
118
+ const targetUrl = `${normalizedBase}${normalizedPath}`;
119
+
120
+ if (!isAllowedFile(normalizedPath)) {
121
+ return new Response(
122
+ JSON.stringify({
123
+ error: 'Forbidden file type',
124
+ message: 'Only WASM-related file types are allowed.',
125
+ }),
126
+ {
127
+ status: 403,
128
+ headers: {
129
+ ...corsHeaders(origin),
130
+ 'Content-Type': 'application/json',
131
+ },
132
+ }
133
+ );
134
+ }
135
+
136
+ try {
137
+ const cacheKey = new Request(targetUrl, request);
138
+ const cache = caches.default;
139
+ let response = await cache.match(cacheKey);
140
+
141
+ if (!response) {
142
+ response = await fetch(targetUrl, {
143
+ headers: {
144
+ 'User-Agent': 'BentoPDF-WASM-Proxy/1.0',
145
+ Accept: '*/*',
146
+ },
147
+ });
148
+
149
+ if (!response.ok) {
150
+ return new Response(
151
+ JSON.stringify({
152
+ error: 'Failed to fetch resource',
153
+ status: response.status,
154
+ statusText: response.statusText,
155
+ targetUrl: targetUrl,
156
+ }),
157
+ {
158
+ status: response.status,
159
+ headers: {
160
+ ...corsHeaders(origin),
161
+ 'Content-Type': 'application/json',
162
+ },
163
+ }
164
+ );
165
+ }
166
+
167
+ const contentLength = parseInt(
168
+ response.headers.get('Content-Length') || '0',
169
+ 10
170
+ );
171
+ if (contentLength > MAX_FILE_SIZE_BYTES) {
172
+ return new Response(
173
+ JSON.stringify({
174
+ error: 'File too large',
175
+ message: `File exceeds maximum size of ${MAX_FILE_SIZE_BYTES / 1024 / 1024}MB`,
176
+ }),
177
+ {
178
+ status: 413,
179
+ headers: {
180
+ ...corsHeaders(origin),
181
+ 'Content-Type': 'application/json',
182
+ },
183
+ }
184
+ );
185
+ }
186
+
187
+ response = new Response(response.body, response);
188
+ response.headers.set(
189
+ 'Cache-Control',
190
+ `public, max-age=${CACHE_TTL_SECONDS}`
191
+ );
192
+
193
+ if (response.status === 200) {
194
+ await cache.put(cacheKey, response.clone());
195
+ }
196
+ }
197
+
198
+ const bodyData = await response.arrayBuffer();
199
+
200
+ return new Response(bodyData, {
201
+ status: 200,
202
+ headers: {
203
+ ...corsHeaders(origin),
204
+ 'Content-Type': getContentType(normalizedPath),
205
+ 'Content-Length': bodyData.byteLength.toString(),
206
+ 'Cache-Control': `public, max-age=${CACHE_TTL_SECONDS}`,
207
+ 'X-Proxied-From': new URL(targetUrl).hostname,
208
+ },
209
+ });
210
+ } catch (error) {
211
+ return new Response(
212
+ JSON.stringify({
213
+ error: 'Proxy error',
214
+ message: error.message,
215
+ }),
216
+ {
217
+ status: 500,
218
+ headers: {
219
+ ...corsHeaders(origin),
220
+ 'Content-Type': 'application/json',
221
+ },
222
+ }
223
+ );
224
+ }
225
+ }
226
+
227
+ export default {
228
+ async fetch(request, env, ctx) {
229
+ const url = new URL(request.url);
230
+ const pathname = url.pathname;
231
+ const origin = request.headers.get('Origin');
232
+
233
+ if (request.method === 'OPTIONS') {
234
+ return handleOptions(request);
235
+ }
236
+
237
+ if (!isAllowedOrigin(origin)) {
238
+ return new Response(
239
+ JSON.stringify({
240
+ error: 'Forbidden',
241
+ message:
242
+ 'Origin not allowed. Add your domain to ALLOWED_ORIGINS if self-hosting.',
243
+ }),
244
+ {
245
+ status: 403,
246
+ headers: {
247
+ 'Content-Type': 'application/json',
248
+ ...corsHeaders(origin),
249
+ },
250
+ }
251
+ );
252
+ }
253
+
254
+ if (request.method !== 'GET' && request.method !== 'HEAD') {
255
+ return new Response('Method not allowed', {
256
+ status: 405,
257
+ headers: corsHeaders(origin),
258
+ });
259
+ }
260
+
261
+ if (env.RATE_LIMIT_KV) {
262
+ const clientIP = request.headers.get('CF-Connecting-IP') || 'unknown';
263
+ const rateLimitKey = `wasm-ratelimit:${clientIP}`;
264
+ const now = Date.now();
265
+
266
+ const rateLimitData = await env.RATE_LIMIT_KV.get(rateLimitKey, {
267
+ type: 'json',
268
+ });
269
+ const requests = rateLimitData?.requests || [];
270
+ const recentRequests = requests.filter(
271
+ (t) => now - t < RATE_LIMIT_WINDOW_MS
272
+ );
273
+
274
+ if (recentRequests.length >= RATE_LIMIT_MAX_REQUESTS) {
275
+ return new Response(
276
+ JSON.stringify({
277
+ error: 'Rate limit exceeded',
278
+ message: `Maximum ${RATE_LIMIT_MAX_REQUESTS} requests per minute.`,
279
+ }),
280
+ {
281
+ status: 429,
282
+ headers: {
283
+ ...corsHeaders(origin),
284
+ 'Content-Type': 'application/json',
285
+ 'Retry-After': '60',
286
+ },
287
+ }
288
+ );
289
+ }
290
+
291
+ recentRequests.push(now);
292
+ await env.RATE_LIMIT_KV.put(
293
+ rateLimitKey,
294
+ JSON.stringify({ requests: recentRequests }),
295
+ {
296
+ expirationTtl: 120,
297
+ }
298
+ );
299
+ }
300
+
301
+ if (pathname.startsWith('/pymupdf/')) {
302
+ const subpath = pathname.replace('/pymupdf', '');
303
+ return proxyRequest(request, env, env.PYMUPDF_SOURCE, subpath, origin);
304
+ }
305
+
306
+ if (pathname.startsWith('/gs/')) {
307
+ const subpath = pathname.replace('/gs', '');
308
+ return proxyRequest(request, env, env.GS_SOURCE, subpath, origin);
309
+ }
310
+
311
+ if (pathname.startsWith('/cpdf/')) {
312
+ const subpath = pathname.replace('/cpdf', '');
313
+ return proxyRequest(request, env, env.CPDF_SOURCE, subpath, origin);
314
+ }
315
+
316
+ if (pathname === '/' || pathname === '/health') {
317
+ return new Response(
318
+ JSON.stringify({
319
+ service: 'BentoPDF WASM Proxy',
320
+ version: '1.0.0',
321
+ endpoints: {
322
+ pymupdf: '/pymupdf/*',
323
+ gs: '/gs/*',
324
+ cpdf: '/cpdf/*',
325
+ },
326
+ configured: {
327
+ pymupdf: !!env.PYMUPDF_SOURCE,
328
+ gs: !!env.GS_SOURCE,
329
+ cpdf: !!env.CPDF_SOURCE,
330
+ },
331
+ }),
332
+ {
333
+ status: 200,
334
+ headers: {
335
+ ...corsHeaders(origin),
336
+ 'Content-Type': 'application/json',
337
+ },
338
+ }
339
+ );
340
+ }
341
+
342
+ return new Response(
343
+ JSON.stringify({
344
+ error: 'Not Found',
345
+ message: 'Use /pymupdf/*, /gs/*, or /cpdf/* endpoints',
346
+ }),
347
+ {
348
+ status: 404,
349
+ headers: {
350
+ ...corsHeaders(origin),
351
+ 'Content-Type': 'application/json',
352
+ },
353
+ }
354
+ );
355
+ },
356
+ };
cloudflare/wasm-wrangler.toml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name = "bentopdf-wasm-proxy"
2
+ main = "wasm-proxy-worker.js"
3
+ compatibility_date = "2024-01-01"
4
+
5
+ # =============================================================================
6
+ # DEPLOYMENT
7
+ # =============================================================================
8
+ # Deploy this worker:
9
+ # cd cloudflare
10
+ # npx wrangler deploy -c wasm-wrangler.toml
11
+ #
12
+ # Set environment secrets (one of the following methods):
13
+ # Option A: Cloudflare Dashboard
14
+ # Go to Workers & Pages > bentopdf-wasm-proxy > Settings > Variables
15
+ # Add: PYMUPDF_SOURCE, GS_SOURCE, CPDF_SOURCE
16
+ #
17
+ # Option B: Wrangler CLI
18
+ # npx wrangler secret put PYMUPDF_SOURCE -c wasm-wrangler.toml
19
+ # npx wrangler secret put GS_SOURCE -c wasm-wrangler.toml
20
+ # npx wrangler secret put CPDF_SOURCE -c wasm-wrangler.toml
21
+
22
+ # =============================================================================
23
+ # WASM SOURCE URLS
24
+ # =============================================================================
25
+ # Set these as secrets in the Cloudflare dashboard or via wrangler:
26
+ #
27
+ # PYMUPDF_SOURCE: Base URL to PyMuPDF WASM files
28
+ # Example: https://cdn.jsdelivr.net/npm/@bentopdf/pymupdf-wasm/assets
29
+ # https://your-bucket.r2.cloudflarestorage.com/pymupdf
30
+ #
31
+ # GS_SOURCE: Base URL to Ghostscript WASM files
32
+ # Example: https://cdn.jsdelivr.net/npm/@bentopdf/gs-wasm/assets
33
+ # https://your-bucket.r2.cloudflarestorage.com/gs
34
+ #
35
+ # CPDF_SOURCE: Base URL to CoherentPDF files
36
+ # Example: https://cdn.jsdelivr.net/npm/coherentpdf/cpdf
37
+ # https://your-bucket.r2.cloudflarestorage.com/cpdf
38
+
39
+ # =============================================================================
40
+ # USAGE FROM BENTOPDF
41
+ # =============================================================================
42
+ # In BentoPDF's WASM Settings page, configure URLs like:
43
+ # PyMuPDF: https://wasm.bentopdf.com/pymupdf/
44
+ # Ghostscript: https://wasm.bentopdf.com/gs/
45
+ # CoherentPDF: https://wasm.bentopdf.com/cpdf/
46
+
47
+ # =============================================================================
48
+ # RATE LIMITING (Optional but recommended)
49
+ # =============================================================================
50
+ # Create KV namespace:
51
+ # npx wrangler kv namespace create "RATE_LIMIT_KV"
52
+ #
53
+ # Then uncomment and update the ID below:
54
+ # [[kv_namespaces]]
55
+ # binding = "RATE_LIMIT_KV"
56
+ # id = "<YOUR_KV_NAMESPACE_ID>"
57
+
58
+ # Use the same KV namespace as the CORS proxy if you want shared rate limiting
59
+ [[kv_namespaces]]
60
+ binding = "RATE_LIMIT_KV"
61
+ id = "b88e030b308941118cd484e3fcb3ae49"
62
+
63
+ # =============================================================================
64
+ # CUSTOM DOMAIN (Optional)
65
+ # =============================================================================
66
+ # If you want a custom domain like wasm.bentopdf.com:
67
+ # routes = [
68
+ # { pattern = "wasm.bentopdf.com/*", zone_name = "bentopdf.com" }
69
+ # ]
cloudflare/wrangler.toml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name = "bentopdf-cors-proxy"
2
+ main = "cors-proxy-worker.js"
3
+ compatibility_date = "2024-01-01"
4
+
5
+ # Deploy to Cloudflare's global network
6
+ # If you are self hosting change the name to your worker name
7
+ # Run: npx wrangler deploy
8
+
9
+ # =============================================================================
10
+ # SECURITY FEATURES
11
+ # =============================================================================
12
+ #
13
+ # 1. SIGNATURE VERIFICATION (Optional - for anti-spoofing)
14
+ # - Generate secret: openssl rand -hex 32
15
+ # - Set secret: npx wrangler secret put PROXY_SECRET
16
+ # - Note: Secret is visible in frontend JS, so provides limited protection
17
+ #
18
+ # 2. RATE LIMITING (Recommended - requires KV)
19
+ # - Create KV namespace: npx wrangler kv namespace create "RATE_LIMIT_KV"
20
+ # - Uncomment the kv_namespaces section below with the returned ID
21
+ # - Limits: 60 requests per IP per minute
22
+ #
23
+ # 3. FILE SIZE LIMIT
24
+ # - Automatic: Rejects files larger than 1MB
25
+ # - Certificates are typically <10KB, so this prevents abuse
26
+ #
27
+ # 4. URL RESTRICTIONS
28
+ # - Only certificate URLs allowed (*.crt, *.cer, *.pem, /certs/, etc.)
29
+ # - Blocks private IPs (localhost, 10.x, 192.168.x, 172.16-31.x)
30
+
31
+ # =============================================================================
32
+ # KV NAMESPACE FOR RATE LIMITING
33
+ # =============================================================================
34
+ [[kv_namespaces]]
35
+ binding = "RATE_LIMIT_KV"
36
+ id = "b88e030b308941118cd484e3fcb3ae49"
37
+
38
+ # Optional: Custom domain routing
39
+ # routes = [
40
+ # { pattern = "cors-proxy.bentopdf.com/*", zone_name = "bentopdf.com" }
41
+ # ]
42
+
43
+ # Optional: Environment variables (for non-secret config)
44
+ # [vars]
45
+ # ALLOWED_ORIGINS = "https://www.bentopdf.com,https://bentopdf.com"
contact.html ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <!-- Primary Meta Tags -->
7
+ <title>Contact BentoPDF - Get in Touch | Support</title>
8
+ <meta
9
+ name="description"
10
+ content="Contact BentoPDF for support, questions, or feedback. Reach us at contact@bentopdf.com - we're here to help with your PDF needs."
11
+ />
12
+ <meta name="author" content="BentoPDF" />
13
+ <meta name="robots" content="index, follow" />
14
+
15
+ <!-- Canonical URL -->
16
+ <link rel="canonical" href="https://www.bentopdf.com/contact.html" />
17
+
18
+ <!-- Open Graph -->
19
+ <meta property="og:type" content="website" />
20
+ <meta property="og:url" content="https://www.bentopdf.com/contact" />
21
+ <meta
22
+ property="og:title"
23
+ content="Contact BentoPDF - Get in Touch | Support"
24
+ />
25
+ <meta
26
+ property="og:description"
27
+ content="Contact BentoPDF for support, questions, or feedback. Reach us at contact@bentopdf.com - we're here to help with your PDF needs."
28
+ />
29
+ <meta
30
+ property="og:image"
31
+ content="https://www.bentopdf.com/images/og-contact.png"
32
+ />
33
+ <meta property="og:site_name" content="BentoPDF" />
34
+
35
+ <!-- Twitter Card -->
36
+ <meta name="twitter:card" content="summary_large_image" />
37
+ <meta
38
+ name="twitter:title"
39
+ content="Contact BentoPDF - Get in Touch | Support"
40
+ />
41
+ <meta
42
+ name="twitter:description"
43
+ content="Contact BentoPDF for support, questions, or feedback. Reach us at contact@bentopdf.com - we're here to help with your PDF needs."
44
+ />
45
+ <meta
46
+ name="twitter:image"
47
+ content="https://www.bentopdf.com/images/twitter-contact.png"
48
+ />
49
+ <meta name="twitter:site" content="@BentoPDF" />
50
+
51
+ <title>Contact BentoPDF - Get in Touch | Support</title>
52
+
53
+ <link href="/src/css/styles.css" rel="stylesheet" />
54
+
55
+ <!-- Web App Manifest -->
56
+ <link rel="manifest" href="/site.webmanifest" />
57
+
58
+ <!-- Favicons -->
59
+ <link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
60
+ <link
61
+ rel="icon"
62
+ type="image/png"
63
+ sizes="192x192"
64
+ href="/images/favicon-192x192.png"
65
+ />
66
+ <link
67
+ rel="icon"
68
+ type="image/png"
69
+ sizes="512x512"
70
+ href="/images/favicon-512x512.png"
71
+ />
72
+ <link
73
+ rel="apple-touch-icon"
74
+ sizes="180x180"
75
+ href="/images/apple-touch-icon.png"
76
+ />
77
+ <link rel="icon" href="/favicon.ico" sizes="32x32" />
78
+ </head>
79
+
80
+ <body class="antialiased bg-gray-900 text-gray-300">
81
+ {{> navbar }}
82
+
83
+ <div id="app" class="min-h-screen container mx-auto p-4 md:p-8">
84
+ <section id="contact-hero" class="text-center py-16 md:py-24">
85
+ <h1
86
+ class="text-4xl md:text-5xl font-bold text-white mb-4"
87
+ data-i18n="contact.title"
88
+ >
89
+ Get in Touch
90
+ </h1>
91
+ <p
92
+ class="text-lg md:text-xl text-gray-400 max-w-3xl mx-auto"
93
+ data-i18n="contact.subtitle"
94
+ >
95
+ We'd love to hear from you. Whether you have a question, feedback, or
96
+ a feature request, please don't hesitate to reach out.
97
+ </p>
98
+ </section>
99
+
100
+ <div class="max-w-2xl mx-auto text-center py-8">
101
+ <p class="text-lg text-gray-400">
102
+ <span data-i18n="contact.email"
103
+ >You can reach us directly by email at:</span
104
+ >
105
+ <a
106
+ href="mailto:contact@bentopdf.com"
107
+ class="text-indigo-400 underline hover:text-indigo-300"
108
+ >contact@bentopdf.com</a
109
+ >
110
+ </p>
111
+ </div>
112
+ </div>
113
+
114
+ {{> footer }}
115
+
116
+ <script type="module" src="src/js/utils/lucide-init.ts"></script>
117
+ <script type="module" src="src/version.ts"></script>
118
+ <script type="module" src="src/js/main.ts"></script>
119
+ <script type="module" src="src/js/mobileMenu.ts"></script>
120
+ <!-- JSON-LD Schema -->
121
+ <script type="application/ld+json">
122
+ {
123
+ "@context": "https://schema.org",
124
+ "@type": "ContactPage",
125
+ "name": "Contact BentoPDF - Get in Touch | Support",
126
+ "url": "https://www.bentopdf.com/contact"
127
+ }
128
+ </script>
129
+ </body>
130
+ </html>
docker-compose.dev.yml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ bentopdf:
3
+ build:
4
+ context: .
5
+ dockerfile: Dockerfile
6
+ args:
7
+ SIMPLE_MODE: false # false for default mode, true for simple mode
8
+ container_name: bentopdf
9
+ ports:
10
+ - '8080:8080'
11
+ restart: unless-stopped
12
+ # For IPv4-only environments
13
+ #environment:
14
+ # - DISABLE_IPV6=true
docker-compose.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ services:
2
+ bentopdf:
3
+ # GitHub Container Registry (Recommended)
4
+ # simple mode - ghcr.io/alam00000/bentopdf-simple:latest
5
+ # default mode - ghcr.io/alam00000/bentopdf:latest
6
+ # Docker Hub (Alternative)
7
+ # simple mode - bentopdfteam/bentopdf-simple:latest
8
+ # default mode - bentopdfteam/bentopdf:latest
9
+ image: ghcr.io/alam00000/bentopdf-simple:latest
10
+ container_name: bentopdf
11
+ restart: unless-stopped
12
+ ports:
13
+ - '8080:8080'
14
+ # For IPv4-only environments
15
+ #environment:
16
+ # - DISABLE_IPV6=true
docs/.vitepress/cache/deps/@theme_index.js ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ useMediaQuery
3
+ } from "./chunk-2CLQ7TTZ.js";
4
+ import {
5
+ computed,
6
+ ref,
7
+ shallowRef,
8
+ watch
9
+ } from "./chunk-LE5NDSFD.js";
10
+
11
+ // node_modules/vitepress/dist/client/theme-default/index.js
12
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
13
+
14
+ // node_modules/vitepress/dist/client/theme-default/without-fonts.js
15
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
16
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/base.css";
17
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/icons.css";
18
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
19
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
20
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
21
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
22
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
23
+ import "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
24
+ import VPBadge from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
25
+ import Layout from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/Layout.vue";
26
+ import { default as default2 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
27
+ import { default as default3 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue";
28
+ import { default as default4 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
29
+ import { default as default5 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPFeatures.vue";
30
+ import { default as default6 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPHomeContent.vue";
31
+ import { default as default7 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
32
+ import { default as default8 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
33
+ import { default as default9 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
34
+ import { default as default10 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue";
35
+ import { default as default11 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPLink.vue";
36
+ import { default as default12 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPNavBarSearch.vue";
37
+ import { default as default13 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPSocialLink.vue";
38
+ import { default as default14 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPSocialLinks.vue";
39
+ import { default as default15 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue";
40
+ import { default as default16 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
41
+ import { default as default17 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
42
+ import { default as default18 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
43
+ import { default as default19 } from "/Users/abdullahtapadar/Desktop/workspaceforbento/bento-pdf/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
44
+
45
+ // node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
46
+ import { onContentUpdated } from "vitepress";
47
+
48
+ // node_modules/vitepress/dist/client/theme-default/composables/outline.js
49
+ import { getScrollOffset } from "vitepress";
50
+
51
+ // node_modules/vitepress/dist/client/theme-default/support/utils.js
52
+ import { withBase } from "vitepress";
53
+
54
+ // node_modules/vitepress/dist/client/theme-default/composables/data.js
55
+ import { useData as useData$ } from "vitepress";
56
+ var useData = useData$;
57
+
58
+ // node_modules/vitepress/dist/client/theme-default/support/utils.js
59
+ function ensureStartingSlash(path) {
60
+ return path.startsWith("/") ? path : `/${path}`;
61
+ }
62
+
63
+ // node_modules/vitepress/dist/client/theme-default/support/sidebar.js
64
+ function getSidebar(_sidebar, path) {
65
+ if (Array.isArray(_sidebar))
66
+ return addBase(_sidebar);
67
+ if (_sidebar == null)
68
+ return [];
69
+ path = ensureStartingSlash(path);
70
+ const dir = Object.keys(_sidebar).sort((a, b) => {
71
+ return b.split("/").length - a.split("/").length;
72
+ }).find((dir2) => {
73
+ return path.startsWith(ensureStartingSlash(dir2));
74
+ });
75
+ const sidebar = dir ? _sidebar[dir] : [];
76
+ return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base);
77
+ }
78
+ function getSidebarGroups(sidebar) {
79
+ const groups = [];
80
+ let lastGroupIndex = 0;
81
+ for (const index in sidebar) {
82
+ const item = sidebar[index];
83
+ if (item.items) {
84
+ lastGroupIndex = groups.push(item);
85
+ continue;
86
+ }
87
+ if (!groups[lastGroupIndex]) {
88
+ groups.push({ items: [] });
89
+ }
90
+ groups[lastGroupIndex].items.push(item);
91
+ }
92
+ return groups;
93
+ }
94
+ function addBase(items, _base) {
95
+ return [...items].map((_item) => {
96
+ const item = { ..._item };
97
+ const base = item.base || _base;
98
+ if (base && item.link)
99
+ item.link = base + item.link;
100
+ if (item.items)
101
+ item.items = addBase(item.items, base);
102
+ return item;
103
+ });
104
+ }
105
+
106
+ // node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
107
+ function useSidebar() {
108
+ const { frontmatter, page, theme: theme2 } = useData();
109
+ const is960 = useMediaQuery("(min-width: 960px)");
110
+ const isOpen = ref(false);
111
+ const _sidebar = computed(() => {
112
+ const sidebarConfig = theme2.value.sidebar;
113
+ const relativePath = page.value.relativePath;
114
+ return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];
115
+ });
116
+ const sidebar = ref(_sidebar.value);
117
+ watch(_sidebar, (next, prev) => {
118
+ if (JSON.stringify(next) !== JSON.stringify(prev))
119
+ sidebar.value = _sidebar.value;
120
+ });
121
+ const hasSidebar = computed(() => {
122
+ return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home";
123
+ });
124
+ const leftAside = computed(() => {
125
+ if (hasAside)
126
+ return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left";
127
+ return false;
128
+ });
129
+ const hasAside = computed(() => {
130
+ if (frontmatter.value.layout === "home")
131
+ return false;
132
+ if (frontmatter.value.aside != null)
133
+ return !!frontmatter.value.aside;
134
+ return theme2.value.aside !== false;
135
+ });
136
+ const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);
137
+ const sidebarGroups = computed(() => {
138
+ return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];
139
+ });
140
+ function open() {
141
+ isOpen.value = true;
142
+ }
143
+ function close() {
144
+ isOpen.value = false;
145
+ }
146
+ function toggle() {
147
+ isOpen.value ? close() : open();
148
+ }
149
+ return {
150
+ isOpen,
151
+ sidebar,
152
+ sidebarGroups,
153
+ hasSidebar,
154
+ hasAside,
155
+ leftAside,
156
+ isSidebarEnabled,
157
+ open,
158
+ close,
159
+ toggle
160
+ };
161
+ }
162
+
163
+ // node_modules/vitepress/dist/client/theme-default/composables/outline.js
164
+ var ignoreRE = /\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/;
165
+ var resolvedHeaders = [];
166
+ function getHeaders(range) {
167
+ const headers = [
168
+ ...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")
169
+ ].filter((el) => el.id && el.hasChildNodes()).map((el) => {
170
+ const level = Number(el.tagName[1]);
171
+ return {
172
+ element: el,
173
+ title: serializeHeader(el),
174
+ link: "#" + el.id,
175
+ level
176
+ };
177
+ });
178
+ return resolveHeaders(headers, range);
179
+ }
180
+ function serializeHeader(h) {
181
+ let ret = "";
182
+ for (const node of h.childNodes) {
183
+ if (node.nodeType === 1) {
184
+ if (ignoreRE.test(node.className))
185
+ continue;
186
+ ret += node.textContent;
187
+ } else if (node.nodeType === 3) {
188
+ ret += node.textContent;
189
+ }
190
+ }
191
+ return ret.trim();
192
+ }
193
+ function resolveHeaders(headers, range) {
194
+ if (range === false) {
195
+ return [];
196
+ }
197
+ const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2;
198
+ const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange;
199
+ return buildTree(headers, high, low);
200
+ }
201
+ function buildTree(data, min, max) {
202
+ resolvedHeaders.length = 0;
203
+ const result = [];
204
+ const stack = [];
205
+ data.forEach((item) => {
206
+ const node = { ...item, children: [] };
207
+ let parent = stack[stack.length - 1];
208
+ while (parent && parent.level >= node.level) {
209
+ stack.pop();
210
+ parent = stack[stack.length - 1];
211
+ }
212
+ if (node.element.classList.contains("ignore-header") || parent && "shouldIgnore" in parent) {
213
+ stack.push({ level: node.level, shouldIgnore: true });
214
+ return;
215
+ }
216
+ if (node.level > max || node.level < min)
217
+ return;
218
+ resolvedHeaders.push({ element: node.element, link: node.link });
219
+ if (parent)
220
+ parent.children.push(node);
221
+ else
222
+ result.push(node);
223
+ stack.push(node);
224
+ });
225
+ return result;
226
+ }
227
+
228
+ // node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
229
+ function useLocalNav() {
230
+ const { theme: theme2, frontmatter } = useData();
231
+ const headers = shallowRef([]);
232
+ const hasLocalNav = computed(() => {
233
+ return headers.value.length > 0;
234
+ });
235
+ onContentUpdated(() => {
236
+ headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline);
237
+ });
238
+ return {
239
+ headers,
240
+ hasLocalNav
241
+ };
242
+ }
243
+
244
+ // node_modules/vitepress/dist/client/theme-default/without-fonts.js
245
+ var theme = {
246
+ Layout,
247
+ enhanceApp: ({ app }) => {
248
+ app.component("Badge", VPBadge);
249
+ }
250
+ };
251
+ var without_fonts_default = theme;
252
+ export {
253
+ default2 as VPBadge,
254
+ default3 as VPButton,
255
+ default4 as VPDocAsideSponsors,
256
+ default5 as VPFeatures,
257
+ default6 as VPHomeContent,
258
+ default7 as VPHomeFeatures,
259
+ default8 as VPHomeHero,
260
+ default9 as VPHomeSponsors,
261
+ default10 as VPImage,
262
+ default11 as VPLink,
263
+ default12 as VPNavBarSearch,
264
+ default13 as VPSocialLink,
265
+ default14 as VPSocialLinks,
266
+ default15 as VPSponsors,
267
+ default16 as VPTeamMembers,
268
+ default17 as VPTeamPage,
269
+ default18 as VPTeamPageSection,
270
+ default19 as VPTeamPageTitle,
271
+ without_fonts_default as default,
272
+ useLocalNav,
273
+ useSidebar
274
+ };
275
+ //# sourceMappingURL=@theme_index.js.map
docs/.vitepress/cache/deps/@theme_index.js.map ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/outline.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js"],
4
+ "sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/icons.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPFeatures } from './components/VPFeatures.vue';\nexport { default as VPHomeContent } from './components/VPHomeContent.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPLink } from './components/VPLink.vue';\nexport { default as VPNavBarSearch } from './components/VPNavBarSearch.vue';\nexport { default as VPSocialLink } from './components/VPSocialLink.vue';\nexport { default as VPSocialLinks } from './components/VPSocialLinks.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { useLocalNav } from './composables/local-nav';\nexport { useSidebar } from './composables/sidebar';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { onContentUpdated } from 'vitepress';\nimport { computed, shallowRef } from 'vue';\nimport { getHeaders } from '../composables/outline';\nimport { useData } from './data';\nexport function useLocalNav() {\n const { theme, frontmatter } = useData();\n const headers = shallowRef([]);\n const hasLocalNav = computed(() => {\n return headers.value.length > 0;\n });\n onContentUpdated(() => {\n headers.value = getHeaders(frontmatter.value.outline ?? theme.value.outline);\n });\n return {\n headers,\n hasLocalNav\n };\n}\n", "import { getScrollOffset } from 'vitepress';\nimport { onMounted, onUnmounted, onUpdated } from 'vue';\nimport { throttleAndDebounce } from '../support/utils';\nimport { useAside } from './aside';\nconst ignoreRE = /\\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\\b/;\n// cached list of anchor elements from resolveHeaders\nconst resolvedHeaders = [];\nexport function resolveTitle(theme) {\n return ((typeof theme.outline === 'object' &&\n !Array.isArray(theme.outline) &&\n theme.outline.label) ||\n theme.outlineTitle ||\n 'On this page');\n}\nexport function getHeaders(range) {\n const headers = [\n ...document.querySelectorAll('.VPDoc :where(h1,h2,h3,h4,h5,h6)')\n ]\n .filter((el) => el.id && el.hasChildNodes())\n .map((el) => {\n const level = Number(el.tagName[1]);\n return {\n element: el,\n title: serializeHeader(el),\n link: '#' + el.id,\n level\n };\n });\n return resolveHeaders(headers, range);\n}\nfunction serializeHeader(h) {\n let ret = '';\n for (const node of h.childNodes) {\n if (node.nodeType === 1) {\n if (ignoreRE.test(node.className))\n continue;\n ret += node.textContent;\n }\n else if (node.nodeType === 3) {\n ret += node.textContent;\n }\n }\n return ret.trim();\n}\nexport function resolveHeaders(headers, range) {\n if (range === false) {\n return [];\n }\n const levelsRange = (typeof range === 'object' && !Array.isArray(range)\n ? range.level\n : range) || 2;\n const [high, low] = typeof levelsRange === 'number'\n ? [levelsRange, levelsRange]\n : levelsRange === 'deep'\n ? [2, 6]\n : levelsRange;\n return buildTree(headers, high, low);\n}\nexport function useActiveAnchor(container, marker) {\n const { isAsideEnabled } = useAside();\n const onScroll = throttleAndDebounce(setActiveLink, 100);\n let prevActiveLink = null;\n onMounted(() => {\n requestAnimationFrame(setActiveLink);\n window.addEventListener('scroll', onScroll);\n });\n onUpdated(() => {\n // sidebar update means a route change\n activateLink(location.hash);\n });\n onUnmounted(() => {\n window.removeEventListener('scroll', onScroll);\n });\n function setActiveLink() {\n if (!isAsideEnabled.value) {\n return;\n }\n const scrollY = window.scrollY;\n const innerHeight = window.innerHeight;\n const offsetHeight = document.body.offsetHeight;\n const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1;\n // resolvedHeaders may be repositioned, hidden or fix positioned\n const headers = resolvedHeaders\n .map(({ element, link }) => ({\n link,\n top: getAbsoluteTop(element)\n }))\n .filter(({ top }) => !Number.isNaN(top))\n .sort((a, b) => a.top - b.top);\n // no headers available for active link\n if (!headers.length) {\n activateLink(null);\n return;\n }\n // page top\n if (scrollY < 1) {\n activateLink(null);\n return;\n }\n // page bottom - highlight last link\n if (isBottom) {\n activateLink(headers[headers.length - 1].link);\n return;\n }\n // find the last header above the top of viewport\n let activeLink = null;\n for (const { link, top } of headers) {\n if (top > scrollY + getScrollOffset() + 4) {\n break;\n }\n activeLink = link;\n }\n activateLink(activeLink);\n }\n function activateLink(hash) {\n if (prevActiveLink) {\n prevActiveLink.classList.remove('active');\n }\n if (hash == null) {\n prevActiveLink = null;\n }\n else {\n prevActiveLink = container.value.querySelector(`a[href=\"${decodeURIComponent(hash)}\"]`);\n }\n const activeLink = prevActiveLink;\n if (activeLink) {\n activeLink.classList.add('active');\n marker.value.style.top = activeLink.offsetTop + 39 + 'px';\n marker.value.style.opacity = '1';\n }\n else {\n marker.value.style.top = '33px';\n marker.value.style.opacity = '0';\n }\n }\n}\nfunction getAbsoluteTop(element) {\n let offsetTop = 0;\n while (element !== document.body) {\n if (element === null) {\n // child element is:\n // - not attached to the DOM (display: none)\n // - set to fixed position (not scrollable)\n // - body or html element (null offsetParent)\n return NaN;\n }\n offsetTop += element.offsetTop;\n element = element.offsetParent;\n }\n return offsetTop;\n}\nfunction buildTree(data, min, max) {\n resolvedHeaders.length = 0;\n const result = [];\n const stack = [];\n data.forEach((item) => {\n const node = { ...item, children: [] };\n let parent = stack[stack.length - 1];\n while (parent && parent.level >= node.level) {\n stack.pop();\n parent = stack[stack.length - 1];\n }\n if (node.element.classList.contains('ignore-header') ||\n (parent && 'shouldIgnore' in parent)) {\n stack.push({ level: node.level, shouldIgnore: true });\n return;\n }\n if (node.level > max || node.level < min)\n return;\n resolvedHeaders.push({ element: node.element, link: node.link });\n if (parent)\n parent.children.push(node);\n else\n result.push(node);\n stack.push(node);\n });\n return result;\n}\n", "import { withBase } from 'vitepress';\nimport { isExternal, treatAsHtml } from '../../shared';\nimport { useData } from '../composables/data';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId)\n clearTimeout(timeoutId);\n if (!called) {\n fn();\n (called = true) && setTimeout(() => (called = false), delay);\n }\n else\n timeoutId = setTimeout(fn, delay);\n };\n}\nexport function ensureStartingSlash(path) {\n return path.startsWith('/') ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');\n if (isExternal(url) ||\n url.startsWith('#') ||\n !protocol.startsWith('http') ||\n !treatAsHtml(pathname))\n return url;\n const { site } = useData();\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { isActive } from '../../shared';\nimport { ensureStartingSlash } from './utils';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n recursivelyExtractLinks(item.items);\n }\n }\n }\n recursivelyExtractLinks(sidebar);\n return links;\n}\n/**\n * Check if the given sidebar item contains any active link.\n */\nexport function hasActiveLink(path, items) {\n if (Array.isArray(items)) {\n return items.some((item) => hasActiveLink(path, item));\n }\n return isActive(path, items.link)\n ? true\n : items.items\n ? hasActiveLink(path, items.items)\n : false;\n}\nfunction addBase(items, _base) {\n return [...items].map((_item) => {\n const item = { ..._item };\n const base = item.base || _base;\n if (base && item.link)\n item.link = base + item.link;\n if (item.items)\n item.items = addBase(item.items, base);\n return item;\n });\n}\n", "import { useMediaQuery } from '@vueuse/core';\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect, watchPostEffect } from 'vue';\nimport { isActive } from '../../shared';\nimport { hasActiveLink as containsActiveLink, getSidebar, getSidebarGroups } from '../support/sidebar';\nimport { useData } from './data';\nexport function useSidebar() {\n const { frontmatter, page, theme } = useData();\n const is960 = useMediaQuery('(min-width: 960px)');\n const isOpen = ref(false);\n const _sidebar = computed(() => {\n const sidebarConfig = theme.value.sidebar;\n const relativePath = page.value.relativePath;\n return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];\n });\n const sidebar = ref(_sidebar.value);\n watch(_sidebar, (next, prev) => {\n if (JSON.stringify(next) !== JSON.stringify(prev))\n sidebar.value = _sidebar.value;\n });\n const hasSidebar = computed(() => {\n return (frontmatter.value.sidebar !== false &&\n sidebar.value.length > 0 &&\n frontmatter.value.layout !== 'home');\n });\n const leftAside = computed(() => {\n if (hasAside)\n return frontmatter.value.aside == null\n ? theme.value.aside === 'left'\n : frontmatter.value.aside === 'left';\n return false;\n });\n const hasAside = computed(() => {\n if (frontmatter.value.layout === 'home')\n return false;\n if (frontmatter.value.aside != null)\n return !!frontmatter.value.aside;\n return theme.value.aside !== false;\n });\n const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);\n const sidebarGroups = computed(() => {\n return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];\n });\n function open() {\n isOpen.value = true;\n }\n function close() {\n isOpen.value = false;\n }\n function toggle() {\n isOpen.value ? close() : open();\n }\n return {\n isOpen,\n sidebar,\n sidebarGroups,\n hasSidebar,\n hasAside,\n leftAside,\n isSidebarEnabled,\n open,\n close,\n toggle\n };\n}\n/**\n * a11y: cache the element that opened the Sidebar (the menu button) then\n * focus that button again when Menu is closed with Escape key.\n */\nexport function useCloseSidebarOnEscape(isOpen, close) {\n let triggerElement;\n watchEffect(() => {\n triggerElement = isOpen.value\n ? document.activeElement\n : undefined;\n });\n onMounted(() => {\n window.addEventListener('keyup', onEscape);\n });\n onUnmounted(() => {\n window.removeEventListener('keyup', onEscape);\n });\n function onEscape(e) {\n if (e.key === 'Escape' && isOpen.value) {\n close();\n triggerElement?.focus();\n }\n }\n}\nexport function useSidebarControl(item) {\n const { page, hash } = useData();\n const collapsed = ref(false);\n const collapsible = computed(() => {\n return item.value.collapsed != null;\n });\n const isLink = computed(() => {\n return !!item.value.link;\n });\n const isActiveLink = ref(false);\n const updateIsActiveLink = () => {\n isActiveLink.value = isActive(page.value.relativePath, item.value.link);\n };\n watch([page, item, hash], updateIsActiveLink);\n onMounted(updateIsActiveLink);\n const hasActiveLink = computed(() => {\n if (isActiveLink.value) {\n return true;\n }\n return item.value.items\n ? containsActiveLink(page.value.relativePath, item.value.items)\n : false;\n });\n const hasChildren = computed(() => {\n return !!(item.value.items && item.value.items.length);\n });\n watchEffect(() => {\n collapsed.value = !!(collapsible.value && item.value.collapsed);\n });\n watchPostEffect(() => {\n ;\n (isActiveLink.value || hasActiveLink.value) && (collapsed.value = false);\n });\n function toggle() {\n if (collapsible.value) {\n collapsed.value = !collapsed.value;\n }\n }\n return {\n collapsed,\n collapsible,\n isLink,\n isActiveLink,\n hasActiveLink,\n hasChildren,\n toggle\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,iBAA0B;AACnC,SAAoB,WAAXA,iBAAyB;AAClC,SAAoB,WAAXA,iBAAiC;AAC1C,SAAoB,WAAXA,iBAA+B;AACxC,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAA6B;AACtC,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAA6B;AACtC,SAAoB,WAAXA,iBAAoC;AAC7C,SAAoB,WAAXA,iBAAkC;;;AC5B3C,SAAS,wBAAwB;;;ACAjC,SAAS,uBAAuB;;;ACAhC,SAAS,gBAAgB;;;ACAzB,SAAS,WAAW,gBAAgB;AAC7B,IAAM,UAAU;;;ADgBhB,SAAS,oBAAoB,MAAM;AACtC,SAAO,KAAK,WAAW,GAAG,IAAI,OAAO,IAAI,IAAI;AACjD;;;AEXO,SAAS,WAAW,UAAU,MAAM;AACvC,MAAI,MAAM,QAAQ,QAAQ;AACtB,WAAO,QAAQ,QAAQ;AAC3B,MAAI,YAAY;AACZ,WAAO,CAAC;AACZ,SAAO,oBAAoB,IAAI;AAC/B,QAAM,MAAM,OAAO,KAAK,QAAQ,EAC3B,KAAK,CAAC,GAAG,MAAM;AAChB,WAAO,EAAE,MAAM,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,EAAE;AAAA,EAC9C,CAAC,EACI,KAAK,CAACC,SAAQ;AAEf,WAAO,KAAK,WAAW,oBAAoBA,IAAG,CAAC;AAAA,EACnD,CAAC;AACD,QAAM,UAAU,MAAM,SAAS,GAAG,IAAI,CAAC;AACvC,SAAO,MAAM,QAAQ,OAAO,IACtB,QAAQ,OAAO,IACf,QAAQ,QAAQ,OAAO,QAAQ,IAAI;AAC7C;AAIO,SAAS,iBAAiB,SAAS;AACtC,QAAM,SAAS,CAAC;AAChB,MAAI,iBAAiB;AACrB,aAAW,SAAS,SAAS;AACzB,UAAM,OAAO,QAAQ,KAAK;AAC1B,QAAI,KAAK,OAAO;AACZ,uBAAiB,OAAO,KAAK,IAAI;AACjC;AAAA,IACJ;AACA,QAAI,CAAC,OAAO,cAAc,GAAG;AACzB,aAAO,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;AAAA,IAC7B;AACA,WAAO,cAAc,EAAE,MAAM,KAAK,IAAI;AAAA,EAC1C;AACA,SAAO;AACX;AAiCA,SAAS,QAAQ,OAAO,OAAO;AAC3B,SAAO,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,UAAU;AAC7B,UAAM,OAAO,EAAE,GAAG,MAAM;AACxB,UAAM,OAAO,KAAK,QAAQ;AAC1B,QAAI,QAAQ,KAAK;AACb,WAAK,OAAO,OAAO,KAAK;AAC5B,QAAI,KAAK;AACL,WAAK,QAAQ,QAAQ,KAAK,OAAO,IAAI;AACzC,WAAO;AAAA,EACX,CAAC;AACL;;;ACnFO,SAAS,aAAa;AACzB,QAAM,EAAE,aAAa,MAAM,OAAAC,OAAM,IAAI,QAAQ;AAC7C,QAAM,QAAQ,cAAc,oBAAoB;AAChD,QAAM,SAAS,IAAI,KAAK;AACxB,QAAM,WAAW,SAAS,MAAM;AAC5B,UAAM,gBAAgBA,OAAM,MAAM;AAClC,UAAM,eAAe,KAAK,MAAM;AAChC,WAAO,gBAAgB,WAAW,eAAe,YAAY,IAAI,CAAC;AAAA,EACtE,CAAC;AACD,QAAM,UAAU,IAAI,SAAS,KAAK;AAClC,QAAM,UAAU,CAAC,MAAM,SAAS;AAC5B,QAAI,KAAK,UAAU,IAAI,MAAM,KAAK,UAAU,IAAI;AAC5C,cAAQ,QAAQ,SAAS;AAAA,EACjC,CAAC;AACD,QAAM,aAAa,SAAS,MAAM;AAC9B,WAAQ,YAAY,MAAM,YAAY,SAClC,QAAQ,MAAM,SAAS,KACvB,YAAY,MAAM,WAAW;AAAA,EACrC,CAAC;AACD,QAAM,YAAY,SAAS,MAAM;AAC7B,QAAI;AACA,aAAO,YAAY,MAAM,SAAS,OAC5BA,OAAM,MAAM,UAAU,SACtB,YAAY,MAAM,UAAU;AACtC,WAAO;AAAA,EACX,CAAC;AACD,QAAM,WAAW,SAAS,MAAM;AAC5B,QAAI,YAAY,MAAM,WAAW;AAC7B,aAAO;AACX,QAAI,YAAY,MAAM,SAAS;AAC3B,aAAO,CAAC,CAAC,YAAY,MAAM;AAC/B,WAAOA,OAAM,MAAM,UAAU;AAAA,EACjC,CAAC;AACD,QAAM,mBAAmB,SAAS,MAAM,WAAW,SAAS,MAAM,KAAK;AACvE,QAAM,gBAAgB,SAAS,MAAM;AACjC,WAAO,WAAW,QAAQ,iBAAiB,QAAQ,KAAK,IAAI,CAAC;AAAA,EACjE,CAAC;AACD,WAAS,OAAO;AACZ,WAAO,QAAQ;AAAA,EACnB;AACA,WAAS,QAAQ;AACb,WAAO,QAAQ;AAAA,EACnB;AACA,WAAS,SAAS;AACd,WAAO,QAAQ,MAAM,IAAI,KAAK;AAAA,EAClC;AACA,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;;;AJ3DA,IAAM,WAAW;AAEjB,IAAM,kBAAkB,CAAC;AAQlB,SAAS,WAAW,OAAO;AAC9B,QAAM,UAAU;AAAA,IACZ,GAAG,SAAS,iBAAiB,kCAAkC;AAAA,EACnE,EACK,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,cAAc,CAAC,EAC1C,IAAI,CAAC,OAAO;AACb,UAAM,QAAQ,OAAO,GAAG,QAAQ,CAAC,CAAC;AAClC,WAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO,gBAAgB,EAAE;AAAA,MACzB,MAAM,MAAM,GAAG;AAAA,MACf;AAAA,IACJ;AAAA,EACJ,CAAC;AACD,SAAO,eAAe,SAAS,KAAK;AACxC;AACA,SAAS,gBAAgB,GAAG;AACxB,MAAI,MAAM;AACV,aAAW,QAAQ,EAAE,YAAY;AAC7B,QAAI,KAAK,aAAa,GAAG;AACrB,UAAI,SAAS,KAAK,KAAK,SAAS;AAC5B;AACJ,aAAO,KAAK;AAAA,IAChB,WACS,KAAK,aAAa,GAAG;AAC1B,aAAO,KAAK;AAAA,IAChB;AAAA,EACJ;AACA,SAAO,IAAI,KAAK;AACpB;AACO,SAAS,eAAe,SAAS,OAAO;AAC3C,MAAI,UAAU,OAAO;AACjB,WAAO,CAAC;AAAA,EACZ;AACA,QAAM,eAAe,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAChE,MAAM,QACN,UAAU;AAChB,QAAM,CAAC,MAAM,GAAG,IAAI,OAAO,gBAAgB,WACrC,CAAC,aAAa,WAAW,IACzB,gBAAgB,SACZ,CAAC,GAAG,CAAC,IACL;AACV,SAAO,UAAU,SAAS,MAAM,GAAG;AACvC;AA8FA,SAAS,UAAU,MAAM,KAAK,KAAK;AAC/B,kBAAgB,SAAS;AACzB,QAAM,SAAS,CAAC;AAChB,QAAM,QAAQ,CAAC;AACf,OAAK,QAAQ,CAAC,SAAS;AACnB,UAAM,OAAO,EAAE,GAAG,MAAM,UAAU,CAAC,EAAE;AACrC,QAAI,SAAS,MAAM,MAAM,SAAS,CAAC;AACnC,WAAO,UAAU,OAAO,SAAS,KAAK,OAAO;AACzC,YAAM,IAAI;AACV,eAAS,MAAM,MAAM,SAAS,CAAC;AAAA,IACnC;AACA,QAAI,KAAK,QAAQ,UAAU,SAAS,eAAe,KAC9C,UAAU,kBAAkB,QAAS;AACtC,YAAM,KAAK,EAAE,OAAO,KAAK,OAAO,cAAc,KAAK,CAAC;AACpD;AAAA,IACJ;AACA,QAAI,KAAK,QAAQ,OAAO,KAAK,QAAQ;AACjC;AACJ,oBAAgB,KAAK,EAAE,SAAS,KAAK,SAAS,MAAM,KAAK,KAAK,CAAC;AAC/D,QAAI;AACA,aAAO,SAAS,KAAK,IAAI;AAAA;AAEzB,aAAO,KAAK,IAAI;AACpB,UAAM,KAAK,IAAI;AAAA,EACnB,CAAC;AACD,SAAO;AACX;;;AD7KO,SAAS,cAAc;AAC1B,QAAM,EAAE,OAAAC,QAAO,YAAY,IAAI,QAAQ;AACvC,QAAM,UAAU,WAAW,CAAC,CAAC;AAC7B,QAAM,cAAc,SAAS,MAAM;AAC/B,WAAO,QAAQ,MAAM,SAAS;AAAA,EAClC,CAAC;AACD,mBAAiB,MAAM;AACnB,YAAQ,QAAQ,WAAW,YAAY,MAAM,WAAWA,OAAM,MAAM,OAAO;AAAA,EAC/E,CAAC;AACD,SAAO;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AACJ;;;ADcA,IAAM,QAAQ;AAAA,EACV;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;",
6
+ "names": ["default", "dir", "theme", "theme"]
7
+ }
docs/.vitepress/cache/deps/_metadata.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "hash": "b8473a4c",
3
+ "configHash": "de601e5a",
4
+ "lockfileHash": "97b635bf",
5
+ "browserHash": "6dc79743",
6
+ "optimized": {
7
+ "vue": {
8
+ "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
9
+ "file": "vue.js",
10
+ "fileHash": "82d9bd70",
11
+ "needsInterop": false
12
+ },
13
+ "vitepress > @vue/devtools-api": {
14
+ "src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
15
+ "file": "vitepress___@vue_devtools-api.js",
16
+ "fileHash": "776db5f7",
17
+ "needsInterop": false
18
+ },
19
+ "vitepress > @vueuse/core": {
20
+ "src": "../../../../node_modules/@vueuse/core/index.mjs",
21
+ "file": "vitepress___@vueuse_core.js",
22
+ "fileHash": "5b890910",
23
+ "needsInterop": false
24
+ },
25
+ "vitepress > @vueuse/integrations/useFocusTrap": {
26
+ "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
27
+ "file": "vitepress___@vueuse_integrations_useFocusTrap.js",
28
+ "fileHash": "0798c805",
29
+ "needsInterop": false
30
+ },
31
+ "vitepress > mark.js/src/vanilla.js": {
32
+ "src": "../../../../node_modules/mark.js/src/vanilla.js",
33
+ "file": "vitepress___mark__js_src_vanilla__js.js",
34
+ "fileHash": "ce575f5c",
35
+ "needsInterop": false
36
+ },
37
+ "vitepress > minisearch": {
38
+ "src": "../../../../node_modules/minisearch/dist/es/index.js",
39
+ "file": "vitepress___minisearch.js",
40
+ "fileHash": "97a74ec0",
41
+ "needsInterop": false
42
+ },
43
+ "@theme/index": {
44
+ "src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
45
+ "file": "@theme_index.js",
46
+ "fileHash": "725ded83",
47
+ "needsInterop": false
48
+ }
49
+ },
50
+ "chunks": {
51
+ "chunk-2CLQ7TTZ": {
52
+ "file": "chunk-2CLQ7TTZ.js"
53
+ },
54
+ "chunk-LE5NDSFD": {
55
+ "file": "chunk-LE5NDSFD.js"
56
+ }
57
+ }
58
+ }
docs/.vitepress/cache/deps/chunk-2CLQ7TTZ.js ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/chunk-2CLQ7TTZ.js.map ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/chunk-LE5NDSFD.js ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/chunk-LE5NDSFD.js.map ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/package.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "type": "module"
3
+ }
docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map ADDED
The diff for this file is too large to render. See raw diff
 
docs/.vitepress/cache/deps/vitepress___@vueuse_core.js ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ DefaultMagicKeysAliasMap,
3
+ StorageSerializers,
4
+ TransitionPresets,
5
+ assert,
6
+ breakpointsAntDesign,
7
+ breakpointsBootstrapV5,
8
+ breakpointsElement,
9
+ breakpointsMasterCss,
10
+ breakpointsPrimeFlex,
11
+ breakpointsQuasar,
12
+ breakpointsSematic,
13
+ breakpointsTailwind,
14
+ breakpointsVuetify,
15
+ breakpointsVuetifyV2,
16
+ breakpointsVuetifyV3,
17
+ bypassFilter,
18
+ camelize,
19
+ clamp,
20
+ cloneFnJSON,
21
+ computedAsync,
22
+ computedEager,
23
+ computedInject,
24
+ computedWithControl,
25
+ containsProp,
26
+ controlledRef,
27
+ createEventHook,
28
+ createFetch,
29
+ createFilterWrapper,
30
+ createGlobalState,
31
+ createInjectionState,
32
+ createRef,
33
+ createReusableTemplate,
34
+ createSharedComposable,
35
+ createSingletonPromise,
36
+ createTemplatePromise,
37
+ createUnrefFn,
38
+ customStorageEventName,
39
+ debounceFilter,
40
+ defaultDocument,
41
+ defaultLocation,
42
+ defaultNavigator,
43
+ defaultWindow,
44
+ executeTransition,
45
+ extendRef,
46
+ formatDate,
47
+ formatTimeAgo,
48
+ get,
49
+ getLifeCycleTarget,
50
+ getSSRHandler,
51
+ hasOwn,
52
+ hyphenate,
53
+ identity,
54
+ increaseWithUnit,
55
+ injectLocal,
56
+ invoke,
57
+ isClient,
58
+ isDef,
59
+ isDefined,
60
+ isIOS,
61
+ isObject,
62
+ isWorker,
63
+ makeDestructurable,
64
+ mapGamepadToXbox360Controller,
65
+ noop,
66
+ normalizeDate,
67
+ notNullish,
68
+ now,
69
+ objectEntries,
70
+ objectOmit,
71
+ objectPick,
72
+ onClickOutside,
73
+ onElementRemoval,
74
+ onKeyDown,
75
+ onKeyPressed,
76
+ onKeyStroke,
77
+ onKeyUp,
78
+ onLongPress,
79
+ onStartTyping,
80
+ pausableFilter,
81
+ promiseTimeout,
82
+ provideLocal,
83
+ provideSSRWidth,
84
+ pxValue,
85
+ rand,
86
+ reactify,
87
+ reactifyObject,
88
+ reactiveComputed,
89
+ reactiveOmit,
90
+ reactivePick,
91
+ refAutoReset,
92
+ refDebounced,
93
+ refDefault,
94
+ refThrottled,
95
+ refWithControl,
96
+ resolveRef,
97
+ resolveUnref,
98
+ set,
99
+ setSSRHandler,
100
+ syncRef,
101
+ syncRefs,
102
+ templateRef,
103
+ throttleFilter,
104
+ timestamp,
105
+ toArray,
106
+ toReactive,
107
+ toRef,
108
+ toRefs,
109
+ toValue,
110
+ tryOnBeforeMount,
111
+ tryOnBeforeUnmount,
112
+ tryOnMounted,
113
+ tryOnScopeDispose,
114
+ tryOnUnmounted,
115
+ unrefElement,
116
+ until,
117
+ useActiveElement,
118
+ useAnimate,
119
+ useArrayDifference,
120
+ useArrayEvery,
121
+ useArrayFilter,
122
+ useArrayFind,
123
+ useArrayFindIndex,
124
+ useArrayFindLast,
125
+ useArrayIncludes,
126
+ useArrayJoin,
127
+ useArrayMap,
128
+ useArrayReduce,
129
+ useArraySome,
130
+ useArrayUnique,
131
+ useAsyncQueue,
132
+ useAsyncState,
133
+ useBase64,
134
+ useBattery,
135
+ useBluetooth,
136
+ useBreakpoints,
137
+ useBroadcastChannel,
138
+ useBrowserLocation,
139
+ useCached,
140
+ useClipboard,
141
+ useClipboardItems,
142
+ useCloned,
143
+ useColorMode,
144
+ useConfirmDialog,
145
+ useCountdown,
146
+ useCounter,
147
+ useCssVar,
148
+ useCurrentElement,
149
+ useCycleList,
150
+ useDark,
151
+ useDateFormat,
152
+ useDebounceFn,
153
+ useDebouncedRefHistory,
154
+ useDeviceMotion,
155
+ useDeviceOrientation,
156
+ useDevicePixelRatio,
157
+ useDevicesList,
158
+ useDisplayMedia,
159
+ useDocumentVisibility,
160
+ useDraggable,
161
+ useDropZone,
162
+ useElementBounding,
163
+ useElementByPoint,
164
+ useElementHover,
165
+ useElementSize,
166
+ useElementVisibility,
167
+ useEventBus,
168
+ useEventListener,
169
+ useEventSource,
170
+ useEyeDropper,
171
+ useFavicon,
172
+ useFetch,
173
+ useFileDialog,
174
+ useFileSystemAccess,
175
+ useFocus,
176
+ useFocusWithin,
177
+ useFps,
178
+ useFullscreen,
179
+ useGamepad,
180
+ useGeolocation,
181
+ useIdle,
182
+ useImage,
183
+ useInfiniteScroll,
184
+ useIntersectionObserver,
185
+ useInterval,
186
+ useIntervalFn,
187
+ useKeyModifier,
188
+ useLastChanged,
189
+ useLocalStorage,
190
+ useMagicKeys,
191
+ useManualRefHistory,
192
+ useMediaControls,
193
+ useMediaQuery,
194
+ useMemoize,
195
+ useMemory,
196
+ useMounted,
197
+ useMouse,
198
+ useMouseInElement,
199
+ useMousePressed,
200
+ useMutationObserver,
201
+ useNavigatorLanguage,
202
+ useNetwork,
203
+ useNow,
204
+ useObjectUrl,
205
+ useOffsetPagination,
206
+ useOnline,
207
+ usePageLeave,
208
+ useParallax,
209
+ useParentElement,
210
+ usePerformanceObserver,
211
+ usePermission,
212
+ usePointer,
213
+ usePointerLock,
214
+ usePointerSwipe,
215
+ usePreferredColorScheme,
216
+ usePreferredContrast,
217
+ usePreferredDark,
218
+ usePreferredLanguages,
219
+ usePreferredReducedMotion,
220
+ usePreferredReducedTransparency,
221
+ usePrevious,
222
+ useRafFn,
223
+ useRefHistory,
224
+ useResizeObserver,
225
+ useSSRWidth,
226
+ useScreenOrientation,
227
+ useScreenSafeArea,
228
+ useScriptTag,
229
+ useScroll,
230
+ useScrollLock,
231
+ useSessionStorage,
232
+ useShare,
233
+ useSorted,
234
+ useSpeechRecognition,
235
+ useSpeechSynthesis,
236
+ useStepper,
237
+ useStorage,
238
+ useStorageAsync,
239
+ useStyleTag,
240
+ useSupported,
241
+ useSwipe,
242
+ useTemplateRefsList,
243
+ useTextDirection,
244
+ useTextSelection,
245
+ useTextareaAutosize,
246
+ useThrottleFn,
247
+ useThrottledRefHistory,
248
+ useTimeAgo,
249
+ useTimeout,
250
+ useTimeoutFn,
251
+ useTimeoutPoll,
252
+ useTimestamp,
253
+ useTitle,
254
+ useToNumber,
255
+ useToString,
256
+ useToggle,
257
+ useTransition,
258
+ useUrlSearchParams,
259
+ useUserMedia,
260
+ useVModel,
261
+ useVModels,
262
+ useVibrate,
263
+ useVirtualList,
264
+ useWakeLock,
265
+ useWebNotification,
266
+ useWebSocket,
267
+ useWebWorker,
268
+ useWebWorkerFn,
269
+ useWindowFocus,
270
+ useWindowScroll,
271
+ useWindowSize,
272
+ watchArray,
273
+ watchAtMost,
274
+ watchDebounced,
275
+ watchDeep,
276
+ watchIgnorable,
277
+ watchImmediate,
278
+ watchOnce,
279
+ watchPausable,
280
+ watchThrottled,
281
+ watchTriggerable,
282
+ watchWithFilter,
283
+ whenever
284
+ } from "./chunk-2CLQ7TTZ.js";
285
+ import "./chunk-LE5NDSFD.js";
286
+ export {
287
+ DefaultMagicKeysAliasMap,
288
+ StorageSerializers,
289
+ TransitionPresets,
290
+ assert,
291
+ computedAsync as asyncComputed,
292
+ refAutoReset as autoResetRef,
293
+ breakpointsAntDesign,
294
+ breakpointsBootstrapV5,
295
+ breakpointsElement,
296
+ breakpointsMasterCss,
297
+ breakpointsPrimeFlex,
298
+ breakpointsQuasar,
299
+ breakpointsSematic,
300
+ breakpointsTailwind,
301
+ breakpointsVuetify,
302
+ breakpointsVuetifyV2,
303
+ breakpointsVuetifyV3,
304
+ bypassFilter,
305
+ camelize,
306
+ clamp,
307
+ cloneFnJSON,
308
+ computedAsync,
309
+ computedEager,
310
+ computedInject,
311
+ computedWithControl,
312
+ containsProp,
313
+ computedWithControl as controlledComputed,
314
+ controlledRef,
315
+ createEventHook,
316
+ createFetch,
317
+ createFilterWrapper,
318
+ createGlobalState,
319
+ createInjectionState,
320
+ reactify as createReactiveFn,
321
+ createRef,
322
+ createReusableTemplate,
323
+ createSharedComposable,
324
+ createSingletonPromise,
325
+ createTemplatePromise,
326
+ createUnrefFn,
327
+ customStorageEventName,
328
+ debounceFilter,
329
+ refDebounced as debouncedRef,
330
+ watchDebounced as debouncedWatch,
331
+ defaultDocument,
332
+ defaultLocation,
333
+ defaultNavigator,
334
+ defaultWindow,
335
+ computedEager as eagerComputed,
336
+ executeTransition,
337
+ extendRef,
338
+ formatDate,
339
+ formatTimeAgo,
340
+ get,
341
+ getLifeCycleTarget,
342
+ getSSRHandler,
343
+ hasOwn,
344
+ hyphenate,
345
+ identity,
346
+ watchIgnorable as ignorableWatch,
347
+ increaseWithUnit,
348
+ injectLocal,
349
+ invoke,
350
+ isClient,
351
+ isDef,
352
+ isDefined,
353
+ isIOS,
354
+ isObject,
355
+ isWorker,
356
+ makeDestructurable,
357
+ mapGamepadToXbox360Controller,
358
+ noop,
359
+ normalizeDate,
360
+ notNullish,
361
+ now,
362
+ objectEntries,
363
+ objectOmit,
364
+ objectPick,
365
+ onClickOutside,
366
+ onElementRemoval,
367
+ onKeyDown,
368
+ onKeyPressed,
369
+ onKeyStroke,
370
+ onKeyUp,
371
+ onLongPress,
372
+ onStartTyping,
373
+ pausableFilter,
374
+ watchPausable as pausableWatch,
375
+ promiseTimeout,
376
+ provideLocal,
377
+ provideSSRWidth,
378
+ pxValue,
379
+ rand,
380
+ reactify,
381
+ reactifyObject,
382
+ reactiveComputed,
383
+ reactiveOmit,
384
+ reactivePick,
385
+ refAutoReset,
386
+ refDebounced,
387
+ refDefault,
388
+ refThrottled,
389
+ refWithControl,
390
+ resolveRef,
391
+ resolveUnref,
392
+ set,
393
+ setSSRHandler,
394
+ syncRef,
395
+ syncRefs,
396
+ templateRef,
397
+ throttleFilter,
398
+ refThrottled as throttledRef,
399
+ watchThrottled as throttledWatch,
400
+ timestamp,
401
+ toArray,
402
+ toReactive,
403
+ toRef,
404
+ toRefs,
405
+ toValue,
406
+ tryOnBeforeMount,
407
+ tryOnBeforeUnmount,
408
+ tryOnMounted,
409
+ tryOnScopeDispose,
410
+ tryOnUnmounted,
411
+ unrefElement,
412
+ until,
413
+ useActiveElement,
414
+ useAnimate,
415
+ useArrayDifference,
416
+ useArrayEvery,
417
+ useArrayFilter,
418
+ useArrayFind,
419
+ useArrayFindIndex,
420
+ useArrayFindLast,
421
+ useArrayIncludes,
422
+ useArrayJoin,
423
+ useArrayMap,
424
+ useArrayReduce,
425
+ useArraySome,
426
+ useArrayUnique,
427
+ useAsyncQueue,
428
+ useAsyncState,
429
+ useBase64,
430
+ useBattery,
431
+ useBluetooth,
432
+ useBreakpoints,
433
+ useBroadcastChannel,
434
+ useBrowserLocation,
435
+ useCached,
436
+ useClipboard,
437
+ useClipboardItems,
438
+ useCloned,
439
+ useColorMode,
440
+ useConfirmDialog,
441
+ useCountdown,
442
+ useCounter,
443
+ useCssVar,
444
+ useCurrentElement,
445
+ useCycleList,
446
+ useDark,
447
+ useDateFormat,
448
+ refDebounced as useDebounce,
449
+ useDebounceFn,
450
+ useDebouncedRefHistory,
451
+ useDeviceMotion,
452
+ useDeviceOrientation,
453
+ useDevicePixelRatio,
454
+ useDevicesList,
455
+ useDisplayMedia,
456
+ useDocumentVisibility,
457
+ useDraggable,
458
+ useDropZone,
459
+ useElementBounding,
460
+ useElementByPoint,
461
+ useElementHover,
462
+ useElementSize,
463
+ useElementVisibility,
464
+ useEventBus,
465
+ useEventListener,
466
+ useEventSource,
467
+ useEyeDropper,
468
+ useFavicon,
469
+ useFetch,
470
+ useFileDialog,
471
+ useFileSystemAccess,
472
+ useFocus,
473
+ useFocusWithin,
474
+ useFps,
475
+ useFullscreen,
476
+ useGamepad,
477
+ useGeolocation,
478
+ useIdle,
479
+ useImage,
480
+ useInfiniteScroll,
481
+ useIntersectionObserver,
482
+ useInterval,
483
+ useIntervalFn,
484
+ useKeyModifier,
485
+ useLastChanged,
486
+ useLocalStorage,
487
+ useMagicKeys,
488
+ useManualRefHistory,
489
+ useMediaControls,
490
+ useMediaQuery,
491
+ useMemoize,
492
+ useMemory,
493
+ useMounted,
494
+ useMouse,
495
+ useMouseInElement,
496
+ useMousePressed,
497
+ useMutationObserver,
498
+ useNavigatorLanguage,
499
+ useNetwork,
500
+ useNow,
501
+ useObjectUrl,
502
+ useOffsetPagination,
503
+ useOnline,
504
+ usePageLeave,
505
+ useParallax,
506
+ useParentElement,
507
+ usePerformanceObserver,
508
+ usePermission,
509
+ usePointer,
510
+ usePointerLock,
511
+ usePointerSwipe,
512
+ usePreferredColorScheme,
513
+ usePreferredContrast,
514
+ usePreferredDark,
515
+ usePreferredLanguages,
516
+ usePreferredReducedMotion,
517
+ usePreferredReducedTransparency,
518
+ usePrevious,
519
+ useRafFn,
520
+ useRefHistory,
521
+ useResizeObserver,
522
+ useSSRWidth,
523
+ useScreenOrientation,
524
+ useScreenSafeArea,
525
+ useScriptTag,
526
+ useScroll,
527
+ useScrollLock,
528
+ useSessionStorage,
529
+ useShare,
530
+ useSorted,
531
+ useSpeechRecognition,
532
+ useSpeechSynthesis,
533
+ useStepper,
534
+ useStorage,
535
+ useStorageAsync,
536
+ useStyleTag,
537
+ useSupported,
538
+ useSwipe,
539
+ useTemplateRefsList,
540
+ useTextDirection,
541
+ useTextSelection,
542
+ useTextareaAutosize,
543
+ refThrottled as useThrottle,
544
+ useThrottleFn,
545
+ useThrottledRefHistory,
546
+ useTimeAgo,
547
+ useTimeout,
548
+ useTimeoutFn,
549
+ useTimeoutPoll,
550
+ useTimestamp,
551
+ useTitle,
552
+ useToNumber,
553
+ useToString,
554
+ useToggle,
555
+ useTransition,
556
+ useUrlSearchParams,
557
+ useUserMedia,
558
+ useVModel,
559
+ useVModels,
560
+ useVibrate,
561
+ useVirtualList,
562
+ useWakeLock,
563
+ useWebNotification,
564
+ useWebSocket,
565
+ useWebWorker,
566
+ useWebWorkerFn,
567
+ useWindowFocus,
568
+ useWindowScroll,
569
+ useWindowSize,
570
+ watchArray,
571
+ watchAtMost,
572
+ watchDebounced,
573
+ watchDeep,
574
+ watchIgnorable,
575
+ watchImmediate,
576
+ watchOnce,
577
+ watchPausable,
578
+ watchThrottled,
579
+ watchTriggerable,
580
+ watchWithFilter,
581
+ whenever
582
+ };
583
+ //# sourceMappingURL=vitepress___@vueuse_core.js.map