@myrialabs/clopen 0.4.36 → 0.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/backend/auth/permissions.ts +14 -0
- package/backend/bootstrap.ts +16 -0
- package/backend/database/crypto/envelope.test.ts +93 -0
- package/backend/database/crypto/envelope.ts +127 -0
- package/backend/database/crypto/index.ts +22 -0
- package/backend/database/crypto/master-key.ts +129 -0
- package/backend/database/crypto/secret-columns.ts +147 -0
- package/backend/database/migrations/071_create_notes_tables.ts +90 -0
- package/backend/database/migrations/072_encrypt_stored_secrets.ts +107 -0
- package/backend/database/migrations/073_create_integration_tables.ts +119 -0
- package/backend/database/migrations/074_create_work_tables.ts +94 -0
- package/backend/database/migrations/index.ts +28 -0
- package/backend/database/queries/db-client-connection-queries.ts +23 -12
- package/backend/database/queries/engine-queries.ts +23 -10
- package/backend/database/queries/index.ts +6 -1
- package/backend/database/queries/integration-queries.ts +297 -0
- package/backend/database/queries/mcp-server-queries.ts +38 -11
- package/backend/database/queries/note-queries.test.ts +190 -0
- package/backend/database/queries/note-queries.ts +269 -0
- package/backend/database/queries/profile-queries.ts +1 -1
- package/backend/database/queries/ssh-connection-queries.ts +19 -8
- package/backend/database/queries/work-queries.ts +210 -0
- package/backend/engine/docs/artifacts.md +22 -9
- package/backend/files/os-clipboard.test.ts +209 -0
- package/backend/files/os-clipboard.ts +567 -0
- package/backend/git/conflict-state.test.ts +396 -0
- package/backend/git/git-executor.ts +6 -0
- package/backend/git/git-parser.ts +144 -48
- package/backend/git/git-service.ts +727 -57
- package/backend/git/push-target.test.ts +264 -0
- package/backend/http/integration-hooks.ts +42 -0
- package/backend/http/notes-images.test.ts +228 -0
- package/backend/http/notes-images.ts +196 -0
- package/backend/index.ts +9 -0
- package/backend/integrations/accounts.ts +229 -0
- package/backend/integrations/health.ts +146 -0
- package/backend/integrations/index.ts +36 -0
- package/backend/integrations/projections/index.ts +120 -0
- package/backend/integrations/projections/mcp-projector.test.ts +204 -0
- package/backend/integrations/projections/mcp-projector.ts +159 -0
- package/backend/integrations/projections/types.ts +51 -0
- package/backend/integrations/registry/define.ts +38 -0
- package/backend/integrations/registry/index.ts +56 -0
- package/backend/integrations/registry/providers/context7.ts +44 -0
- package/backend/integrations/registry/providers/firecrawl.ts +41 -0
- package/backend/integrations/registry/providers/github.ts +78 -0
- package/backend/integrations/registry/types.ts +96 -0
- package/backend/integrations/webhooks/gateway.ts +160 -0
- package/backend/integrations/webhooks/verify.ts +65 -0
- package/backend/mcp/README.md +25 -3
- package/backend/mcp/external/config.ts +35 -1
- package/backend/mcp/index.ts +1 -1
- package/backend/mcp/internal/config.ts +1 -1
- package/backend/notes/access.test.ts +82 -0
- package/backend/notes/access.ts +27 -0
- package/backend/notes/storage.test.ts +77 -0
- package/backend/notes/storage.ts +114 -0
- package/backend/permissions/service.ts +2 -2
- package/backend/profiles/service.ts +1 -1
- package/backend/project/status-manager.ts +20 -0
- package/backend/projects/project-cleanup.ts +6 -0
- package/backend/work/bindings.ts +124 -0
- package/backend/work/index.ts +42 -0
- package/backend/work/prompts.ts +150 -0
- package/backend/work/providers/github/actions-logs.ts +180 -0
- package/backend/work/providers/github/adapter.test.ts +88 -0
- package/backend/work/providers/github/adapter.ts +1255 -0
- package/backend/work/providers/github/client.ts +280 -0
- package/backend/work/providers/github/list-range.test.ts +158 -0
- package/backend/work/providers/github/token-kind.test.ts +42 -0
- package/backend/work/pull-requests.ts +242 -0
- package/backend/work/registry.ts +27 -0
- package/backend/work/service.ts +436 -0
- package/backend/work/start-work.test.ts +71 -0
- package/backend/work/start-work.ts +232 -0
- package/backend/work/types.ts +180 -0
- package/backend/ws/files/clipboard.ts +78 -0
- package/backend/ws/files/index.ts +5 -0
- package/backend/ws/git/branch-name.ts +6 -5
- package/backend/ws/git/branch.ts +43 -1
- package/backend/ws/git/commit-message.ts +13 -10
- package/backend/ws/git/conflict.ts +106 -3
- package/backend/ws/git/diff-budget.test.ts +125 -0
- package/backend/ws/git/diff-budget.ts +279 -0
- package/backend/ws/git/log.ts +25 -0
- package/backend/ws/git/remote.ts +75 -1
- package/backend/ws/index.ts +11 -1
- package/backend/ws/integrations/crud.ts +219 -0
- package/backend/ws/integrations/index.ts +22 -0
- package/backend/ws/mcp/crud.ts +25 -1
- package/backend/ws/notes/index.ts +278 -0
- package/backend/ws/profiles/crud.ts +1 -1
- package/backend/ws/work/actions.ts +206 -0
- package/backend/ws/work/context.ts +51 -0
- package/backend/ws/work/crud.ts +347 -0
- package/backend/ws/work/index.ts +17 -0
- package/backend/ws/work/pull-requests.ts +177 -0
- package/backend/ws/work/schemas.ts +226 -0
- package/dist/assets/{index-Bg-SUCFg.js → index-CyH7fSbR.js} +1 -1
- package/dist/assets/{index-Cz4YpHVi.js → index-DSHIANSy.js} +1 -1
- package/dist/assets/main-D2IOjftb.css +1 -0
- package/dist/assets/main-DM-tHKbW.js +1152 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/shared/constants/engine-tools.ts +1 -1
- package/shared/constants/tool-icons.ts +33 -0
- package/shared/types/database/schema.ts +41 -0
- package/shared/types/git.ts +123 -0
- package/shared/types/integrations.ts +140 -0
- package/shared/types/stores/settings.ts +8 -0
- package/shared/types/work.ts +426 -0
- package/shared/utils/logger.ts +3 -0
- package/dist/assets/main-9G7IpQpK.css +0 -1
- package/dist/assets/main-BofFsH8E.js +0 -1085
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opening a pull request from the branch in front of you.
|
|
3
|
+
*
|
|
4
|
+
* work:pr-context everything the composer needs, in one call
|
|
5
|
+
* work:pr-draft an AI-written title and body for this branch
|
|
6
|
+
* work:pr-create create it
|
|
7
|
+
*
|
|
8
|
+
* `pr-create` is the only outward-facing write in this surface: it publishes to
|
|
9
|
+
* a repository other people watch. It is deliberately three steps rather than
|
|
10
|
+
* one button — context, then a draft the user reads and edits, then create —
|
|
11
|
+
* because "open a PR" is not an action anyone should be able to take by
|
|
12
|
+
* mis-clicking, and a description nobody read is worse than no description.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { t } from 'elysia';
|
|
16
|
+
import { createRouter } from '$shared/utils/ws-server';
|
|
17
|
+
import {
|
|
18
|
+
applyConfiguredTransition,
|
|
19
|
+
buildPullRequestContext,
|
|
20
|
+
draftPullRequestDescription,
|
|
21
|
+
pushPullRequestHead,
|
|
22
|
+
workService,
|
|
23
|
+
readBinding
|
|
24
|
+
} from '$backend/work';
|
|
25
|
+
import { workLinkQueries } from '$backend/database/queries';
|
|
26
|
+
import type { EngineType } from '$shared/types/unified';
|
|
27
|
+
import { resolveWorkProject } from './context';
|
|
28
|
+
import { announceWorkChanged } from './crud';
|
|
29
|
+
import { MERGE_METHOD_SCHEMA, PR_CONTEXT_SCHEMA, WORK_ITEM_SCHEMA } from './schemas';
|
|
30
|
+
import { debug } from '$shared/utils/logger';
|
|
31
|
+
|
|
32
|
+
export const workPullRequestHandler = createRouter()
|
|
33
|
+
.http('work:pr-context', {
|
|
34
|
+
data: t.Object({
|
|
35
|
+
projectId: t.Optional(t.String()),
|
|
36
|
+
accountId: t.String({ minLength: 1 }),
|
|
37
|
+
/** Re-read for another local branch, when the composer's head changes. */
|
|
38
|
+
head: t.Optional(t.String({ maxLength: 250 }))
|
|
39
|
+
}),
|
|
40
|
+
response: PR_CONTEXT_SCHEMA
|
|
41
|
+
}, async ({ data, conn }) => {
|
|
42
|
+
// The VIEWED workspace when this is the current project: a pull request is
|
|
43
|
+
// opened from the branch the user is looking at, which in a worktree
|
|
44
|
+
// session is not the main tree. For any other project it is that
|
|
45
|
+
// project's own root, since this connection's worktree is not there.
|
|
46
|
+
const { projectId, root } = resolveWorkProject(conn, data.projectId);
|
|
47
|
+
return buildPullRequestContext(projectId, data.accountId, root, data.head);
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Push the head branch, then answer with the context again.
|
|
52
|
+
*
|
|
53
|
+
* A write, but the mildest one in this file: it publishes commits the user
|
|
54
|
+
* already made to a branch that tracks nothing, which is the step the
|
|
55
|
+
* composer would otherwise send them to another panel to perform.
|
|
56
|
+
*/
|
|
57
|
+
.http('work:pr-push', {
|
|
58
|
+
data: t.Object({
|
|
59
|
+
projectId: t.Optional(t.String()),
|
|
60
|
+
accountId: t.String({ minLength: 1 }),
|
|
61
|
+
head: t.String({ minLength: 1, maxLength: 250 })
|
|
62
|
+
}),
|
|
63
|
+
response: PR_CONTEXT_SCHEMA
|
|
64
|
+
}, async ({ data, conn }) => {
|
|
65
|
+
const { projectId, root } = resolveWorkProject(conn, data.projectId);
|
|
66
|
+
return pushPullRequestHead(projectId, data.accountId, root, data.head);
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
.http('work:pr-draft', {
|
|
70
|
+
data: t.Object({
|
|
71
|
+
projectId: t.Optional(t.String()),
|
|
72
|
+
accountId: t.String({ minLength: 1 }),
|
|
73
|
+
base: t.String({ minLength: 1 }),
|
|
74
|
+
head: t.String({ minLength: 1 }),
|
|
75
|
+
engine: t.String({ minLength: 1 }),
|
|
76
|
+
/** Hint only — the backend re-derives it from the engine catalog. */
|
|
77
|
+
providerSlug: t.Optional(t.String()),
|
|
78
|
+
modelId: t.String({ minLength: 1 })
|
|
79
|
+
}),
|
|
80
|
+
response: t.Object({
|
|
81
|
+
title: t.String(),
|
|
82
|
+
body: t.String()
|
|
83
|
+
})
|
|
84
|
+
}, async ({ data, conn }) => {
|
|
85
|
+
const { projectId, root } = resolveWorkProject(conn, data.projectId);
|
|
86
|
+
|
|
87
|
+
return draftPullRequestDescription({
|
|
88
|
+
projectId,
|
|
89
|
+
cwd: root,
|
|
90
|
+
base: data.base,
|
|
91
|
+
head: data.head,
|
|
92
|
+
engine: data.engine as EngineType,
|
|
93
|
+
...(data.providerSlug && { providerSlug: data.providerSlug }),
|
|
94
|
+
modelId: data.modelId
|
|
95
|
+
});
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
.http('work:pr-create', {
|
|
99
|
+
data: t.Object({
|
|
100
|
+
projectId: t.Optional(t.String()),
|
|
101
|
+
accountId: t.String({ minLength: 1 }),
|
|
102
|
+
title: t.String({ minLength: 1, maxLength: 400 }),
|
|
103
|
+
body: t.String({ maxLength: 65_536 }),
|
|
104
|
+
base: t.String({ minLength: 1 }),
|
|
105
|
+
head: t.String({ minLength: 1 }),
|
|
106
|
+
isDraft: t.Boolean()
|
|
107
|
+
}),
|
|
108
|
+
response: t.Object({
|
|
109
|
+
item: WORK_ITEM_SCHEMA,
|
|
110
|
+
transitionedTo: t.Union([t.String(), t.Null()]),
|
|
111
|
+
transitionError: t.Union([t.String(), t.Null()])
|
|
112
|
+
})
|
|
113
|
+
}, async ({ data, conn }) => {
|
|
114
|
+
const { projectId } = resolveWorkProject(conn, data.projectId);
|
|
115
|
+
|
|
116
|
+
const item = await workService.createPullRequest(projectId, data.accountId, {
|
|
117
|
+
title: data.title,
|
|
118
|
+
body: data.body,
|
|
119
|
+
base: data.base,
|
|
120
|
+
head: data.head,
|
|
121
|
+
isDraft: data.isDraft
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// If this branch came from an issue, the configured "on PR open"
|
|
125
|
+
// transition applies to THAT issue, not to the pull request we just
|
|
126
|
+
// created. Off by default, and a failure is reported rather than thrown —
|
|
127
|
+
// the pull request exists either way, and hiding it behind an error about
|
|
128
|
+
// a label would be the wrong headline.
|
|
129
|
+
const binding = readBinding(projectId, data.accountId);
|
|
130
|
+
const link = workLinkQueries.getByBranch(projectId, data.head);
|
|
131
|
+
const transition = link && link.item_kind === 'issue'
|
|
132
|
+
? await applyConfiguredTransition(
|
|
133
|
+
projectId,
|
|
134
|
+
data.accountId,
|
|
135
|
+
'issue',
|
|
136
|
+
link.item_identifier,
|
|
137
|
+
binding?.config.transitionOnPrOpen ?? null
|
|
138
|
+
)
|
|
139
|
+
: { applied: null, error: null };
|
|
140
|
+
|
|
141
|
+
announceWorkChanged(projectId);
|
|
142
|
+
debug.log('work', `Opened pull request ${item.identifier} from ${data.head}`);
|
|
143
|
+
|
|
144
|
+
return { item, transitionedTo: transition.applied, transitionError: transition.error };
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Merge a pull request.
|
|
149
|
+
*
|
|
150
|
+
* The most outward-facing action in this surface — it changes what is on the
|
|
151
|
+
* default branch for everyone. The client confirms, names the method
|
|
152
|
+
* explicitly, and the method is validated against what the repository
|
|
153
|
+
* actually allows on the provider's side rather than trusted from here.
|
|
154
|
+
*/
|
|
155
|
+
.http('work:pr-merge', {
|
|
156
|
+
data: t.Object({
|
|
157
|
+
projectId: t.Optional(t.String()),
|
|
158
|
+
accountId: t.String({ minLength: 1 }),
|
|
159
|
+
id: t.String({ minLength: 1 }),
|
|
160
|
+
method: MERGE_METHOD_SCHEMA,
|
|
161
|
+
title: t.Optional(t.String({ maxLength: 400 })),
|
|
162
|
+
message: t.Optional(t.String({ maxLength: 65_536 }))
|
|
163
|
+
}),
|
|
164
|
+
response: t.Object({ ok: t.Boolean() })
|
|
165
|
+
}, async ({ data, conn }) => {
|
|
166
|
+
const { projectId } = resolveWorkProject(conn, data.projectId);
|
|
167
|
+
|
|
168
|
+
await workService.mergePullRequest(projectId, data.accountId, data.id, {
|
|
169
|
+
method: data.method,
|
|
170
|
+
...(data.title && { title: data.title }),
|
|
171
|
+
...(data.message && { message: data.message })
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
announceWorkChanged(projectId);
|
|
175
|
+
debug.log('work', `Merged pull request ${data.id} with ${data.method}`);
|
|
176
|
+
return { ok: true };
|
|
177
|
+
});
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeBox shapes for the Issues & PRs surface.
|
|
3
|
+
*
|
|
4
|
+
* Kept in one file because three handler modules serialise the same work item,
|
|
5
|
+
* and a schema copied per handler is a schema that drifts per handler — the
|
|
6
|
+
* client's generated types then disagree with each other rather than with the
|
|
7
|
+
* server, which is much harder to notice.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { t } from 'elysia';
|
|
11
|
+
|
|
12
|
+
export const KIND_SCHEMA = t.Union([t.Literal('issue'), t.Literal('pull-request')]);
|
|
13
|
+
|
|
14
|
+
export const STATE_CATEGORY_SCHEMA = t.Union([
|
|
15
|
+
t.Literal('open'),
|
|
16
|
+
t.Literal('closed'),
|
|
17
|
+
t.Literal('merged'),
|
|
18
|
+
t.Literal('draft')
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
export const STATUS_SCHEMA = t.Union([
|
|
22
|
+
t.Literal('ok'),
|
|
23
|
+
t.Literal('needs_auth'),
|
|
24
|
+
t.Literal('needs_config'),
|
|
25
|
+
t.Literal('error'),
|
|
26
|
+
t.Literal('unknown')
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
export const WORK_ITEM_SCHEMA = t.Object({
|
|
30
|
+
id: t.String(),
|
|
31
|
+
identifier: t.String(),
|
|
32
|
+
kind: KIND_SCHEMA,
|
|
33
|
+
title: t.String(),
|
|
34
|
+
url: t.String(),
|
|
35
|
+
state: t.String(),
|
|
36
|
+
stateCategory: STATE_CATEGORY_SCHEMA,
|
|
37
|
+
labels: t.Array(t.String()),
|
|
38
|
+
assignees: t.Array(t.String()),
|
|
39
|
+
author: t.Union([t.String(), t.Null()]),
|
|
40
|
+
commentCount: t.Number(),
|
|
41
|
+
createdAt: t.String(),
|
|
42
|
+
updatedAt: t.String(),
|
|
43
|
+
headBranch: t.Optional(t.String()),
|
|
44
|
+
headSha: t.Optional(t.String()),
|
|
45
|
+
baseBranch: t.Optional(t.String()),
|
|
46
|
+
isDraft: t.Optional(t.Boolean())
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const COMMENT_SOURCE_SCHEMA = t.Union([
|
|
50
|
+
t.Literal('conversation'),
|
|
51
|
+
t.Literal('review'),
|
|
52
|
+
t.Literal('review-summary')
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
export const COMMENT_SCHEMA = t.Object({
|
|
56
|
+
id: t.String(),
|
|
57
|
+
author: t.String(),
|
|
58
|
+
body: t.String(),
|
|
59
|
+
createdAt: t.String(),
|
|
60
|
+
url: t.Optional(t.String()),
|
|
61
|
+
source: COMMENT_SOURCE_SCHEMA,
|
|
62
|
+
canModify: t.Boolean(),
|
|
63
|
+
path: t.Optional(t.String()),
|
|
64
|
+
line: t.Optional(t.Union([t.Number(), t.Null()]))
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export const MERGE_METHOD_SCHEMA = t.Union([
|
|
68
|
+
t.Literal('merge'),
|
|
69
|
+
t.Literal('squash'),
|
|
70
|
+
t.Literal('rebase')
|
|
71
|
+
]);
|
|
72
|
+
|
|
73
|
+
export const MERGEABILITY_SCHEMA = t.Object({
|
|
74
|
+
mergeable: t.Union([t.Boolean(), t.Null()]),
|
|
75
|
+
state: t.String(),
|
|
76
|
+
allowedMethods: t.Array(MERGE_METHOD_SCHEMA),
|
|
77
|
+
merged: t.Boolean()
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const COMMIT_SCHEMA = t.Object({
|
|
81
|
+
hash: t.String(),
|
|
82
|
+
subject: t.String(),
|
|
83
|
+
author: t.Union([t.String(), t.Null()]),
|
|
84
|
+
date: t.String(),
|
|
85
|
+
url: t.String()
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const FILE_CHANGE_SCHEMA = t.Object({
|
|
89
|
+
path: t.String(),
|
|
90
|
+
status: t.String(),
|
|
91
|
+
additions: t.Number(),
|
|
92
|
+
deletions: t.Number(),
|
|
93
|
+
patch: t.Optional(t.String()),
|
|
94
|
+
url: t.String(),
|
|
95
|
+
sha: t.Optional(t.String()),
|
|
96
|
+
previousPath: t.Optional(t.String())
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export const COMMIT_DETAIL_SCHEMA = t.Object({
|
|
100
|
+
commit: COMMIT_SCHEMA,
|
|
101
|
+
body: t.String(),
|
|
102
|
+
additions: t.Number(),
|
|
103
|
+
deletions: t.Number(),
|
|
104
|
+
files: t.Array(FILE_CHANGE_SCHEMA)
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
export const TIMELINE_EVENT_SCHEMA = t.Object({
|
|
108
|
+
id: t.String(),
|
|
109
|
+
kind: t.Union([
|
|
110
|
+
t.Literal('labeled'),
|
|
111
|
+
t.Literal('unlabeled'),
|
|
112
|
+
t.Literal('assigned'),
|
|
113
|
+
t.Literal('unassigned'),
|
|
114
|
+
t.Literal('renamed'),
|
|
115
|
+
t.Literal('referenced'),
|
|
116
|
+
t.Literal('cross-referenced'),
|
|
117
|
+
t.Literal('closed'),
|
|
118
|
+
t.Literal('reopened'),
|
|
119
|
+
t.Literal('merged'),
|
|
120
|
+
t.Literal('review-requested')
|
|
121
|
+
]),
|
|
122
|
+
actor: t.Union([t.String(), t.Null()]),
|
|
123
|
+
createdAt: t.String(),
|
|
124
|
+
subject: t.Optional(t.String()),
|
|
125
|
+
referenceTitle: t.Optional(t.String()),
|
|
126
|
+
referenceUrl: t.Optional(t.String()),
|
|
127
|
+
referenceIdentifier: t.Optional(t.String())
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export const WORK_ITEM_DETAIL_SCHEMA = t.Composite([
|
|
131
|
+
WORK_ITEM_SCHEMA,
|
|
132
|
+
t.Object({
|
|
133
|
+
body: t.String(),
|
|
134
|
+
comments: t.Array(COMMENT_SCHEMA),
|
|
135
|
+
events: t.Array(TIMELINE_EVENT_SCHEMA),
|
|
136
|
+
mergeability: t.Optional(MERGEABILITY_SCHEMA)
|
|
137
|
+
})
|
|
138
|
+
]);
|
|
139
|
+
|
|
140
|
+
export const RATE_LIMIT_SCHEMA = t.Object({
|
|
141
|
+
remaining: t.Number(),
|
|
142
|
+
limit: t.Number(),
|
|
143
|
+
resetAt: t.Union([t.String(), t.Null()])
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
export const BINDING_CONFIG_SCHEMA = t.Object({
|
|
147
|
+
transitionOnStartWork: t.Union([t.String(), t.Null()]),
|
|
148
|
+
transitionOnPrOpen: t.Union([t.String(), t.Null()]),
|
|
149
|
+
branchTemplate: t.String()
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export const BINDING_SCHEMA = t.Object({
|
|
153
|
+
locator: t.String(),
|
|
154
|
+
displayName: t.String(),
|
|
155
|
+
detected: t.Boolean(),
|
|
156
|
+
defaultBranch: t.Union([t.String(), t.Null()]),
|
|
157
|
+
config: BINDING_CONFIG_SCHEMA
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export const SOURCE_SCHEMA = t.Object({
|
|
161
|
+
accountId: t.String(),
|
|
162
|
+
provider: t.String(),
|
|
163
|
+
providerName: t.String(),
|
|
164
|
+
label: t.String(),
|
|
165
|
+
viewer: t.Union([t.String(), t.Null()]),
|
|
166
|
+
capabilities: t.Object({
|
|
167
|
+
pullRequests: t.Boolean(),
|
|
168
|
+
checks: t.Boolean(),
|
|
169
|
+
comments: t.Boolean(),
|
|
170
|
+
editComments: t.Boolean(),
|
|
171
|
+
transitions: t.Boolean(),
|
|
172
|
+
editTitle: t.Boolean(),
|
|
173
|
+
createPullRequest: t.Boolean(),
|
|
174
|
+
createIssue: t.Boolean(),
|
|
175
|
+
merge: t.Boolean(),
|
|
176
|
+
assign: t.Boolean(),
|
|
177
|
+
diff: t.Boolean()
|
|
178
|
+
}),
|
|
179
|
+
binding: t.Union([BINDING_SCHEMA, t.Null()]),
|
|
180
|
+
suggestedLocators: t.Array(t.String()),
|
|
181
|
+
status: STATUS_SCHEMA,
|
|
182
|
+
statusDetail: t.Union([t.String(), t.Null()])
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export const CHECK_RUN_SCHEMA = t.Object({
|
|
186
|
+
id: t.String(),
|
|
187
|
+
name: t.String(),
|
|
188
|
+
status: t.Union([
|
|
189
|
+
t.Literal('queued'),
|
|
190
|
+
t.Literal('running'),
|
|
191
|
+
t.Literal('success'),
|
|
192
|
+
t.Literal('failure'),
|
|
193
|
+
t.Literal('cancelled'),
|
|
194
|
+
t.Literal('skipped'),
|
|
195
|
+
t.Literal('unknown')
|
|
196
|
+
]),
|
|
197
|
+
url: t.String(),
|
|
198
|
+
headBranch: t.Union([t.String(), t.Null()]),
|
|
199
|
+
headSha: t.String(),
|
|
200
|
+
event: t.String(),
|
|
201
|
+
startedAt: t.Union([t.String(), t.Null()]),
|
|
202
|
+
finishedAt: t.Union([t.String(), t.Null()]),
|
|
203
|
+
canFetchLogs: t.Boolean()
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export const WORK_LINK_SCHEMA = t.Object({
|
|
207
|
+
itemKind: KIND_SCHEMA,
|
|
208
|
+
itemIdentifier: t.String(),
|
|
209
|
+
worktreeId: t.Union([t.String(), t.Null()]),
|
|
210
|
+
worktreeName: t.Union([t.String(), t.Null()]),
|
|
211
|
+
sessionId: t.Union([t.String(), t.Null()]),
|
|
212
|
+
branch: t.Union([t.String(), t.Null()]),
|
|
213
|
+
createdAt: t.String()
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
export const PR_CONTEXT_SCHEMA = t.Object({
|
|
217
|
+
head: t.String(),
|
|
218
|
+
base: t.String(),
|
|
219
|
+
baseCandidates: t.Array(t.String()),
|
|
220
|
+
headCandidates: t.Array(t.String()),
|
|
221
|
+
isPushed: t.Boolean(),
|
|
222
|
+
pushRemote: t.String(),
|
|
223
|
+
commits: t.Array(t.Object({ hash: t.String(), subject: t.String() })),
|
|
224
|
+
existing: t.Union([WORK_ITEM_SCHEMA, t.Null()]),
|
|
225
|
+
linkedItem: t.Union([WORK_LINK_SCHEMA, t.Null()])
|
|
226
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as _,_ as d,r as s,a as u}from"./main-
|
|
1
|
+
import{s as _,_ as d,r as s,a as u}from"./main-DM-tHKbW.js";import{C as T,P as y,W as E,d as L,b as g,c as v,h as P,l as b,m as k,e as D,n as O,f as R,g as S,t as V}from"./main-DM-tHKbW.js";async function h(o,e={}){const i=e.loading===!1?void 0:_(o,e.loadingText??"Loading…"),[{Terminal:l},{FitAddon:c}]=await Promise.all([d(()=>import("./xterm-B-qIQCd3.js"),[]),d(()=>import("./addon-fit-DX4qG4td.js"),[])]).catch(r=>{throw i?.(),r}),a=new l({scrollback:e.scrollback??5e3,fontSize:e.fontSize??13,fontFamily:e.fontFamily??"ui-monospace, SFMono-Regular, Menlo, monospace",lineHeight:e.lineHeight??1,cursorBlink:e.cursorBlink??!1,cursorStyle:e.cursorStyle??"block",disableStdin:e.stdin!==!0,allowProposedApi:!0,convertEol:!0,theme:s(e.theme),...e.cols?{cols:e.cols}:{},...e.rows?{rows:e.rows}:{},...e.terminalOptions??{}}),t=e.fit===!1?void 0:new c;if(t&&a.loadAddon(t),e.clipboard)try{const{ClipboardAddon:r}=await d(()=>import("./addon-clipboard-wHJhZAA4.js"),[]);a.loadAddon(new r)}catch{}if(e.webLinks)try{const{WebLinksAddon:r}=await d(()=>import("./addon-web-links-DIbG5aQx.js"),[]);a.loadAddon(new r)}catch{}if(e.unicode11)try{const{Unicode11Addon:r}=await d(()=>import("./addon-unicode11-Bt8F3D7-.js"),[]);a.loadAddon(new r),a.unicode.activeVersion="11"}catch{}for(const r of e.addons??[])a.loadAddon(r);if(a.open(o),e.ligatures)try{const{LigaturesAddon:r}=await d(()=>import("./addon-ligatures-DpDY8N_X.js"),[]);a.loadAddon(new r)}catch{}const m=t?u({resize:async()=>{}},a,t,{debounceMs:e.fitDebounceMs??100}):void 0;e.onReady?.(a),i?.();let n=!1;return{terminal:a,fitAddon:t,write:r=>a.write(r),clear:()=>{a.clear(),a.reset()},fit:()=>t?.fit(),setTheme:r=>{a.options.theme=s(r)},dispose(){n||(n=!0,m?.(),a.dispose())}}}export{T as ClientSession,y as PtyKitClient,E as WsCore,u as attachFit,L as darkTheme,g as defaultPersistence,v as draculaTheme,P as hostSocket,b as lightTheme,k as matrixTheme,D as mountTerminal,h as mountViewer,O as nordTheme,s as resolveTheme,_ as showLoadingOverlay,R as solarizedDarkTheme,S as solarizedLightTheme,V as themes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as ce}from"./main-BofFsH8E.js";async function ot(s={}){var t,e=s,r=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,o=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(o){const{createRequire:n}=await ce(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]);var l=n(import.meta.url)}var p=(n,c)=>{throw c},m=import.meta.url,z="";function _(n){return e.locateFile?e.locateFile(n,z):z+n}var x,A;if(o){var a=l("node:fs");m.startsWith("file:")&&(z=l("node:path").dirname(l("node:url").fileURLToPath(m))+"/"),A=n=>{n=u(n)?new URL(n):n;var c=a.readFileSync(n);return c},x=async(n,c=!0)=>{n=u(n)?new URL(n):n;var f=a.readFileSync(n,c?void 0:"utf8");return f},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),p=(n,c)=>{throw process.exitCode=n,c}}else if(r||i){try{z=new URL(".",m).href}catch{}x=async n=>{var c=await fetch(n,{credentials:"same-origin"});if(c.ok)return c.arrayBuffer();throw new Error(c.status+" : "+c.url)}}var R=console.log.bind(console),C=console.error.bind(console),U,M=!1,T,u=n=>n.startsWith("file://"),d,D,B=!1;function E(){var n=ae.buffer;e.HEAPU8=V=new Uint8Array(n),P=new Uint32Array(n),Q=new BigInt64Array(n),new BigUint64Array(n)}function te(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Me(e.preRun.shift());ze(ye)}function fe(){B=!0,L.m()}function Y(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)Be(e.postRun.shift());ze(ge)}function X(n){e.onAbort?.(n),n=`Aborted(${n})`,C(n),M=!0,n+=". Build with -sASSERTIONS for more info.";var c=new WebAssembly.RuntimeError(n);throw D?.(c),c}var J;function ne(){return e.locateFile?_("zipkit-engine.wasm"):new URL("/assets/zipkit-engine-CaR0t_Uy.wasm",import.meta.url).href}function re(n){if(n==J&&U)return new Uint8Array(U);if(A)return A(n);throw"both async and sync fetching of the wasm failed"}async function K(n){if(!U)try{var c=await x(n);return new Uint8Array(c)}catch{}return re(n)}async function F(n,c){try{var f=await K(n),h=await WebAssembly.instantiate(f,c);return h}catch(b){C(`failed to asynchronously prepare wasm: ${b}`),X(b)}}async function _e(n,c,f){if(!n&&!o)try{var h=fetch(c,{credentials:"same-origin"}),b=await WebAssembly.instantiateStreaming(h,f);return b}catch(v){C(`wasm streaming compile failed: ${v}`),C("falling back to ArrayBuffer instantiation")}return F(c,f)}function se(){var n={a:rt};return n}async function ie(){function n(v,k){return L=v.exports,L=st(L),nt(L),E(),L}function c(v){return n(v.instance)}var f=se();if(e.instantiateWasm)return new Promise((v,k)=>{e.instantiateWasm(f,(I,N)=>{v(n(I))})});J??=ne();var h=await _e(U,J,f),b=c(h);return b}class oe{name="ExitStatus";constructor(c){this.message=`Program terminated with exit(${c})`,this.status=c}}var Q,P,V,ze=n=>{for(;n.length>0;)n.shift()(e)},ge=[],Be=n=>ge.push(n),ye=[],Me=n=>ye.push(n),me=!0,be=globalThis.TextDecoder&&new TextDecoder,Ie=(n,c,f,h)=>{for(var b=c+f;n[c]&&!(c>=b);)++c;return c},we=(n,c=0,f,h)=>{c>>>=0;var b=Ie(n,c,f);if(b-c>16&&n.buffer&&be)return be.decode(n.subarray(c,b));for(var v="";c<b;){var k=n[c++];if(!(k&128)){v+=String.fromCharCode(k);continue}var I=n[c++]&63;if((k&224)==192){v+=String.fromCharCode((k&31)<<6|I);continue}var N=n[c++]&63;if((k&240)==224?k=(k&15)<<12|I<<6|N:k=(k&7)<<18|I<<12|N<<6|n[c++]&63,k<65536)v+=String.fromCharCode(k);else{var Te=k-65536;v+=String.fromCharCode(55296|Te>>10,56320|Te&1023)}}return v},he=(n,c,f)=>(n>>>=0,n?we(V,n,c):"");function We(n,c,f,h){return n>>>=0,c>>>=0,h>>>=0,X(`Assertion failed: ${he(n)}, at: `+[c?he(c):"unknown filename",f,h?he(h):"unknown function"])}var Le=()=>X(""),ve=0,Ne=()=>{me=!1,ve=0},O={},ke=n=>{if(n instanceof oe||n=="unwind")return T;p(1,n)},xe=()=>me||ve>0,Ae=n=>{T=n,xe()||(e.onExit?.(n),M=!0),p(n,new oe(n))},He=(n,c)=>{T=n,Ae(n)},Se=He,Ke=()=>{if(!xe())try{Se(T)}catch(n){ke(n)}},Fe=n=>{if(!M)try{return n()}catch(c){ke(c)}finally{Ke()}},Re=()=>performance.now(),Ve=(n,c)=>{if(O[n]&&(clearTimeout(O[n].id),delete O[n]),!c)return 0;var f=setTimeout(()=>{delete O[n],Fe(()=>Ce(n,Re()))},c);return O[n]={id:f,timeout_ms:c},0},qe=()=>Date.now(),$e=n=>n>=0&&n<=3;function je(n,c,f){if(f>>>=0,!$e(n))return 28;var h;n===0?h=qe():h=Re();var b=Math.round(h*1e3*1e3);return Q[f>>>3>>>0]=BigInt(b),0}var Ze=()=>4294901760,Ge=(n,c)=>Math.ceil(n/c)*c,Ye=n=>{var c=ae.buffer.byteLength,f=(n-c+65535)/65536|0;try{return ae.grow(f),E(),1}catch{}};function Xe(n){n>>>=0;var c=V.length,f=Ze();if(n>f)return!1;for(var h=1;h<=4;h*=2){var b=c*(1+.2/h);b=Math.min(b,n+100663296);var v=Math.min(f,Ge(Math.max(n,b),65536)),k=Ye(v);if(k)return!0}return!1}var Je=n=>52;function Qe(n,c,f,h){return 70}var Oe=[null,[],[]],et=(n,c)=>{var f=Oe[n];c===0||c===10?((n===1?R:C)(we(f)),f.length=0):f.push(c)};function tt(n,c,f,h){c>>>=0,f>>>=0,h>>>=0;for(var b=0,v=0;v<f;v++){var k=P[c>>>2>>>0],I=P[c+4>>>2>>>0];c+=8;for(var N=0;N<I;N++)et(n,V[k+N>>>0]);b+=I}return P[h>>>2>>>0]=b,0}if(e.noExitRuntime&&(me=e.noExitRuntime),e.print&&(R=e.print),e.printErr&&(C=e.printErr),e.wasmBinary&&(U=e.wasmBinary),e.arguments&&e.arguments,e.thisProgram&&e.thisProgram,e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.shift()();var Ce,ae;function nt(n){e._zk_input_ptr=n.n,e._zk_result_ptr=n.o,e._zk_result_len=n.p,e._zk_gzip_compress=n.q,e._zk_gzip_decompress=n.r,e._zk_deflate_compress=n.s,e._zk_deflate_decompress=n.t,e._zk_zlib_compress=n.u,e._zk_zlib_decompress=n.v,e._zk_crc32=n.w,e._zk_lz4_compress=n.x,e._zk_lz4_decompress=n.y,e._zk_zstd_compress=n.z,e._zk_zstd_decompress=n.A,e._zk_brotli_compress=n.B,e._zk_brotli_decompress=n.C,e._zk_snappy_compress=n.D,e._zk_snappy_decompress=n.E,e._zk_zstd_max_compress=n.F,e._zk_set_aux=n.G,e._zk_zstd_train_dict=n.H,e._zk_zstd_compress_dict=n.I,e._zk_zstd_decompress_dict=n.J,e._zk_lzma_compress=n.K,e._zk_lzma_decompress=n.L,e._zk_xz_ok=n.M,e._zk_xz_compress=n.N,e._zk_xz_decompress=n.O,e._zk_lzma2_decompress=n.P,e._zk_bzip2_compress=n.Q,e._zk_bzip2_decompress=n.R,e._zk_qoi_encode=n.S,e._zk_qoi_decode=n.T,e._zk_frame_delta_encode=n.U,e._zk_frame_delta_decode=n.V,Ce=n.W,ae=n.l,n.__indirect_function_table}var rt={a:We,f:Le,e:Ne,k:Ve,h:je,c:Xe,b:Se,j:Je,g:Qe,i:tt,d:Ae};function st(n){n=Object.assign({},n);var c=h=>b=>h(b)>>>0,f=h=>()=>h()>>>0;return n._emscripten_stack_alloc=c(n._emscripten_stack_alloc),n.emscripten_stack_get_current=f(n.emscripten_stack_get_current),n}function it(){te();function n(){e.calledRun=!0,!M&&(fe(),d?.(e),e.onRuntimeInitialized?.(),Y())}e.setStatus?(e.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>e.setStatus(""),1),n()},1)):n()}var L;return L=await ie(),it(),B?t=e:t=new Promise((n,c)=>{d=n,D=c}),t}class ue{m;constructor(t){this.m=t}static async load(){const t=await ot();return new ue(t)}call(t,e){const r=this.m,i=r._zk_input_ptr(e.length);r.HEAPU8.set(e,i),t(e.length);const o=r._zk_result_ptr(),l=r._zk_result_len()>>>0;return r.HEAPU8.slice(o,o+l)}gzipCompress(t,e=9){return this.call(r=>this.m._zk_gzip_compress(r,e),t)}gzipDecompress(t){return this.call(e=>this.m._zk_gzip_decompress(e),t)}deflateCompress(t,e=9){return this.call(r=>this.m._zk_deflate_compress(r,e),t)}deflateDecompress(t){return this.call(e=>this.m._zk_deflate_decompress(e,0),t)}zlibCompress(t,e=9){return this.call(r=>this.m._zk_zlib_compress(r,e),t)}zlibDecompress(t){return this.call(e=>this.m._zk_zlib_decompress(e,0),t)}crc32(t,e=0){const r=this.m,i=r._zk_input_ptr(t.length);return r.HEAPU8.set(t,i),r._zk_crc32(t.length,e>>>0)>>>0}lz4Compress(t){return this.call(e=>this.m._zk_lz4_compress(e),t)}lz4Decompress(t){return this.call(e=>this.m._zk_lz4_decompress(e),t)}zstdCompress(t,e=19){return this.call(r=>this.m._zk_zstd_compress(r,e),t)}zstdDecompress(t){return this.call(e=>this.m._zk_zstd_decompress(e),t)}brotliCompress(t,e=11){return this.call(r=>this.m._zk_brotli_compress(r,e),t)}brotliDecompress(t){return this.call(e=>this.m._zk_brotli_decompress(e),t)}snappyCompress(t){return this.call(e=>this.m._zk_snappy_compress(e),t)}snappyDecompress(t){return this.call(e=>this.m._zk_snappy_decompress(e),t)}zstdMaxCompress(t,e=22){return this.call(r=>this.m._zk_zstd_max_compress(r,e),t)}lzmaCompress(t,e=9){return this.call(r=>this.m._zk_lzma_compress(r,e),t)}lzmaDecompress(t){return this.call(e=>this.m._zk_lzma_decompress(e),t)}lzma2Decompress(t,e,r){return this.call(i=>this.m._zk_lzma2_decompress(i,e,r),t)}xzCompress(t,e=6){const r=this.call(i=>this.m._zk_xz_compress(i,e),t);if(!this.m._zk_xz_ok())throw new Error("xz compression failed");return r}xzDecompress(t){const e=this.call(r=>this.m._zk_xz_decompress(r),t);if(!this.m._zk_xz_ok())throw new Error("xz decompression failed (corrupt stream or unsupported filter)");return e}setAux(t){const e=this.m,r=e._zk_input_ptr(t.length);e.HEAPU8.set(t,r),e._zk_set_aux(t.length)}zstdTrainDict(t,e,r){const i=this.m,o=i._zk_input_ptr(t.length);i.HEAPU8.set(t,o),i._zk_zstd_train_dict(t.length,e,r);const l=i._zk_result_ptr(),p=i._zk_result_len()>>>0;return i.HEAPU8.slice(l,l+p)}zstdCompressDict(t,e=19){return this.call(r=>this.m._zk_zstd_compress_dict(r,e),t)}zstdDecompressDict(t){return this.call(e=>this.m._zk_zstd_decompress_dict(e),t)}bzip2Compress(t,e=9){return this.call(r=>this.m._zk_bzip2_compress(r,e),t)}bzip2Decompress(t){return this.call(e=>this.m._zk_bzip2_decompress(e),t)}qoiEncode(t,e,r,i){return this.call(o=>this.m._zk_qoi_encode(o,e,r,i),t)}qoiDecode(t){return this.call(e=>this.m._zk_qoi_decode(e),t)}frameDeltaEncode(t,e){return this.call(r=>this.m._zk_frame_delta_encode(r,e),t)}frameDeltaDecode(t,e){return this.call(r=>this.m._zk_frame_delta_decode(r,e),t)}}let at;function w(){return at??=ue.load()}const ct=Object.freeze(Object.defineProperty({__proto__:null,ZipKitEngine:ue,getEngine:w},Symbol.toStringTag,{value:"Module"}));class pe extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}class ee extends Error{constructor(t){super(t),this.name="ZipKitError"}}function lt(s,t,e,r){return s===void 0||!Number.isFinite(s)?r:Math.max(t,Math.min(e,Math.round(s)))}function de(s){return s?.mode??"balanced"}function H(s,t,e,r){return lt(s?.level,t,e,r[de(s)])}function W(){return globalThis.Bun}function ut(s){if(s?.aborted)throw new pe}async function y(s,t,e){ut(t?.signal),t?.onProgress?.(0,0);const r=s();return t?.onProgress?.(1,e),r}function ft(s){return de(s)!=="ratio"&&!!W()?.gzipSync}async function _t(s,t){const e=H(t,0,9,{speed:1,balanced:6,ratio:9}),r=W();if(ft(t))return y(()=>r.gzipSync(s,{level:e}),t,s.length);const i=await w();return y(()=>i.gzipCompress(s,e),t,s.length)}async function mt(s,t){const e=W();if(e?.gunzipSync)return y(()=>e.gunzipSync(s),t,s.length);const r=await w();return y(()=>r.gzipDecompress(s),t,s.length)}function ht(s){return de(s)!=="ratio"&&!!W()?.deflateSync}async function pt(s,t){const e=H(t,0,9,{speed:1,balanced:6,ratio:9}),r=W();if(ht(t))return y(()=>r.deflateSync(s,{level:e}),t,s.length);const i=await w();return y(()=>i.deflateCompress(s,e),t,s.length)}async function dt(s,t){const e=W();if(e?.inflateSync)return y(()=>e.inflateSync(s),t,s.length);const r=await w();return y(()=>r.deflateDecompress(s),t,s.length)}async function zt(s,t){const e=await w(),r=H(t,0,9,{speed:1,balanced:6,ratio:9});return y(()=>e.zlibCompress(s,r),t,s.length)}async function gt(s,t){const e=await w();return y(()=>e.zlibDecompress(s),t,s.length)}async function yt(s,t){const e=H(t,1,22,{speed:1,balanced:3,ratio:19}),r=W();if(r?.zstdCompressSync)return y(()=>r.zstdCompressSync(s,{level:e}),t,s.length);const i=await w(),o=e>19?()=>i.zstdMaxCompress(s,e):()=>i.zstdCompress(s,e);return y(o,t,s.length)}async function bt(s,t){const e=W();if(e?.zstdDecompressSync)return y(()=>e.zstdDecompressSync(s),t,s.length);const r=await w();return y(()=>r.zstdDecompress(s),t,s.length)}async function wt(s,t){const e=await w();return y(()=>e.lz4Compress(s),t,s.length)}async function vt(s,t){const e=await w();return y(()=>e.lz4Decompress(s),t,s.length)}async function kt(s,t){const e=await w();return y(()=>e.snappyCompress(s),t,s.length)}async function xt(s,t){const e=await w();return y(()=>e.snappyDecompress(s),t,s.length)}async function At(s,t){const e=await w(),r=H(t,0,11,{speed:4,balanced:6,ratio:11});return y(()=>e.brotliCompress(s,r),t,s.length)}async function St(s,t){const e=await w();return y(()=>e.brotliDecompress(s),t,s.length)}async function Rt(s,t){const e=await w(),r=H(t,0,9,{speed:3,balanced:6,ratio:9});return y(()=>e.lzmaCompress(s,r),t,s.length)}async function Ct(s,t){const e=await w();return y(()=>e.lzmaDecompress(s),t,s.length)}async function Tt(s,t){const e=await w(),r=H(t,1,9,{speed:1,balanced:6,ratio:9});return y(()=>e.bzip2Compress(s,r),t,s.length)}async function Dt(s,t){const e=await w();return y(()=>e.bzip2Decompress(s),t,s.length)}const Pt={gzip:_t,deflate:pt,zlib:zt,zstd:yt,lz4:wt,snappy:kt,brotli:At,lzma:Rt,bzip2:Tt},Ut={gzip:mt,deflate:dt,zlib:gt,zstd:bt,lz4:vt,snappy:xt,brotli:St,lzma:Ct,bzip2:Dt};function Et(s,t,e){const r=Pt[t];if(!r)throw new ee(`Unknown codec: ${t}`);return r(s,e)}function Bt(s,t,e){const r=Ut[t];if(!r)throw new ee(`Unknown codec: ${t}`);return r(s,e)}const Mt=Object.freeze(Object.defineProperty({__proto__:null,compress:Et,decompressWith:Bt},Symbol.toStringTag,{value:"Module"})),It=new URL(import.meta.url.endsWith(".ts")?"./worker.ts":"./worker.js",import.meta.url);function Wt(){const s=globalThis.navigator?.hardwareConcurrency??4;return Math.max(1,Math.min(s,8))}async function Lt(){try{return await ce(()=>import("./__vite-browser-external-BIHI7g3E.js"),[])}catch{return}}class Nt{size;workers=[];pending=new Map;next=0;seq=0;ready;usable=!0;refWhileBusy(){const t=this.pending.size>0;for(const e of this.workers)(t?e.ref:e.unref).call(e)}constructor(t={}){this.size=t.size??Wt()}async ensure(){return this.ready?this.ready:(this.ready=(async()=>{const t=await Lt();if(!t){this.usable=!1;return}for(let e=0;e<this.size;e++){const r=new t.Worker(It);r.on("message",i=>this.settle(i)),r.on("error",i=>this.failAll(i)),r.unref(),this.workers.push(r)}})(),this.ready)}settle(t){const e=this.pending.get(t.id);e&&(this.pending.delete(t.id),this.refWhileBusy(),e.signal&&e.onAbort&&e.signal.removeEventListener("abort",e.onAbort),t.ok&&t.result?e.resolve(t.result):e.reject(new Error(t.error??"Worker operation failed")))}failAll(t){for(const[,e]of this.pending)e.reject(t);this.pending.clear(),this.refWhileBusy()}async run(t,e,r,i,o,l,p){if(l?.aborted)throw new pe;if(await this.ensure(),!this.usable){if(t==="zipCompress"){const{getEngine:A}=await ce(async()=>{const{getEngine:R}=await Promise.resolve().then(()=>ct);return{getEngine:R}},void 0),a=await A();return p==="zstd"?a.zstdCompress(e,i??19):a.deflateCompress(e,i??6)}const{compress:_,decompressWith:x}=await ce(async()=>{const{compress:A,decompressWith:a}=await Promise.resolve().then(()=>Mt);return{compress:A,decompressWith:a}},void 0);return t==="compress"?_(e,r,{level:i,mode:o}):x(e,r)}const m=this.seq++,z=this.workers[this.next++%this.workers.length];return new Promise((_,x)=>{const A={resolve:_,reject:x,signal:l};l&&(A.onAbort=()=>{this.pending.delete(m),this.refWhileBusy(),x(new pe)},l.addEventListener("abort",A.onAbort,{once:!0})),this.pending.set(m,A),this.refWhileBusy();const a=e.slice(),R={id:m,kind:t,codec:r,level:i,mode:o,method:p,data:a};z.postMessage(R,[a.buffer])})}compress(t,e,r){return this.run("compress",t,e,r?.level,r?.mode,r?.signal)}decompress(t,e,r){return this.run("decompress",t,e,void 0,void 0,r?.signal)}zipCompress(t,e,r){return this.run("zipCompress",t,e,r,void 0,void 0,e)}async destroy(){this.failAll(new Error("Worker pool destroyed")),await Promise.all(this.workers.map(t=>t.terminate())),this.workers=[],this.ready=void 0}}let Ht;function Kt(){return Ht??=new Nt}function Ft(s){const e=(Math.max(1980,s.getFullYear())-1980&127)<<9|s.getMonth()+1<<5|s.getDate(),r=s.getHours()<<11|s.getMinutes()<<5|s.getSeconds()>>1;return{date:e,time:r}}let g,$,j,Z,G;const Vt=new Uint32Array([16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,452984832,905969664]);function qt(){g=new Uint8Array(256);const s=new Uint8Array(256);let t=1,e=1;do t=t^t<<1^(t&128?283:0),t&=255,e^=e<<1,e^=e<<2,e^=e<<4,e&=255,e&128&&(e^=9),e&=255,s[t]=e;while(t!==1);g[0]=99;for(let r=0;r<256;r++){let i=s[r],o=i;for(let l=0;l<4;l++)o=(o<<1|o>>>7)&255,i^=o;i^=99,g[r]=r===0?99:i}$=new Uint32Array(256),j=new Uint32Array(256),Z=new Uint32Array(256),G=new Uint32Array(256);for(let r=0;r<256;r++){const i=g[r],o=$t(i),l=o^i;$[r]=(o<<24|i<<16|i<<8|l)>>>0,j[r]=(l<<24|o<<16|i<<8|i)>>>0,Z[r]=(i<<24|l<<16|o<<8|i)>>>0,G[r]=(i<<24|i<<16|l<<8|o)>>>0}}function $t(s){return(s<<1^(s&128?283:0))&255}class jt{rk;rounds;constructor(t){if(g||qt(),t.length!==16&&t.length!==24&&t.length!==32)throw new Error(`AES key must be 16/24/32 bytes, got ${t.length}`);const e=t.length/4;this.rounds=e+6;const r=4*(this.rounds+1),i=new Uint32Array(r);for(let o=0;o<e;o++)i[o]=(t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3])>>>0;for(let o=e;o<r;o++){let l=i[o-1];o%e===0?l=(De(l<<8|l>>>24)^Vt[o/e-1])>>>0:e>6&&o%e===4&&(l=De(l)),i[o]=(i[o-e]^l)>>>0}this.rk=i}encryptBlock(t,e,r,i){const o=this.rk;let l=(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])^o[0],p=(t[e+4]<<24|t[e+5]<<16|t[e+6]<<8|t[e+7])^o[1],m=(t[e+8]<<24|t[e+9]<<16|t[e+10]<<8|t[e+11])^o[2],z=(t[e+12]<<24|t[e+13]<<16|t[e+14]<<8|t[e+15])^o[3],_=4;for(let x=1;x<this.rounds;x++){const A=($[l>>>24&255]^j[p>>>16&255]^Z[m>>>8&255]^G[z&255]^o[_])>>>0,a=($[p>>>24&255]^j[m>>>16&255]^Z[z>>>8&255]^G[l&255]^o[_+1])>>>0,R=($[m>>>24&255]^j[z>>>16&255]^Z[l>>>8&255]^G[p&255]^o[_+2])>>>0,C=($[z>>>24&255]^j[l>>>16&255]^Z[p>>>8&255]^G[m&255]^o[_+3])>>>0;l=A,p=a,m=R,z=C,_+=4}r[i]=(g[l>>>24&255]^o[_]>>>24)&255,r[i+1]=(g[p>>>16&255]^o[_]>>>16)&255,r[i+2]=(g[m>>>8&255]^o[_]>>>8)&255,r[i+3]=(g[z&255]^o[_])&255,r[i+4]=(g[p>>>24&255]^o[_+1]>>>24)&255,r[i+5]=(g[m>>>16&255]^o[_+1]>>>16)&255,r[i+6]=(g[z>>>8&255]^o[_+1]>>>8)&255,r[i+7]=(g[l&255]^o[_+1])&255,r[i+8]=(g[m>>>24&255]^o[_+2]>>>24)&255,r[i+9]=(g[z>>>16&255]^o[_+2]>>>16)&255,r[i+10]=(g[l>>>8&255]^o[_+2]>>>8)&255,r[i+11]=(g[p&255]^o[_+2])&255,r[i+12]=(g[z>>>24&255]^o[_+3]>>>24)&255,r[i+13]=(g[l>>>16&255]^o[_+3]>>>16)&255,r[i+14]=(g[p>>>8&255]^o[_+3]>>>8)&255,r[i+15]=(g[m&255]^o[_+3])&255}}function De(s){return(g[s>>>24&255]<<24|g[s>>>16&255]<<16|g[s>>>8&255]<<8|g[s&255])>>>0}function Zt(s,t){const e=new Uint8Array(t.length),r=new Uint8Array(16),i=new Uint8Array(16);let o=1;for(let l=0;l<t.length;l+=16){r[0]=o&255,r[1]=o>>>8&255,r[2]=o>>>16&255,r[3]=o>>>24&255,s.encryptBlock(r,0,i,0);const p=Math.min(16,t.length-l);for(let m=0;m<p;m++)e[l+m]=t[l+m]^i[m];o++}return e}const Gt={1:16,2:24,3:32},Yt={1:8,2:12,3:16},Ee=10,Xt=1e3;function le(){const s=globalThis.crypto;if(!s?.subtle)throw new ee("WebCrypto (crypto.subtle) is required for ZIP AES encryption");return s.subtle}function Jt(s){const t=globalThis.crypto;if(!t?.getRandomValues)throw new ee("crypto.getRandomValues is required to create encrypted ZIPs");return t.getRandomValues(new Uint8Array(s))}async function Qt(s,t,e){const r=Gt[e],i=await le().importKey("raw",new TextEncoder().encode(s),"PBKDF2",!1,["deriveBits"]),o=await le().deriveBits({name:"PBKDF2",salt:t,iterations:Xt,hash:"SHA-1"},i,(r*2+2)*8),l=new Uint8Array(o);return{aesKey:l.subarray(0,r),macKey:l.subarray(r,r*2),verifier:l.subarray(r*2,r*2+2)}}async function Ot(s,t){const e=await le().importKey("raw",s,{name:"HMAC",hash:"SHA-1"},!1,["sign"]),r=await le().sign("HMAC",e,t);return new Uint8Array(r).subarray(0,Ee)}async function en(s,t,e=3){const r=Jt(Yt[e]),{aesKey:i,macKey:o,verifier:l}=await Qt(t,r,e),p=Zt(new jt(i),s),m=await Ot(o,p),z=new Uint8Array(r.length+2+p.length+Ee);return z.set(r,0),z.set(l,r.length),z.set(p,r.length+2),z.set(m,r.length+2+p.length),{payload:z,strength:e}}const tn=256*1024,nn=67324752,rn=33639248,sn=101010256,on=101075792,an=117853008,S=4294967295,q=65535,cn={store:0,deflate:8,zstd:93};class ln{buf=new Uint8Array(1024);view=new DataView(this.buf.buffer);len=0;grow(t){if(this.len+t<=this.buf.length)return;let e=this.buf.length*2;for(;e<this.len+t;)e*=2;const r=new Uint8Array(e);r.set(this.buf.subarray(0,this.len)),this.buf=r,this.view=new DataView(this.buf.buffer)}u16(t){this.grow(2),this.view.setUint16(this.len,t,!0),this.len+=2}u32(t){this.grow(4),this.view.setUint32(this.len,t>>>0,!0),this.len+=4}u64(t){this.grow(8),this.view.setBigUint64(this.len,BigInt(t),!0),this.len+=8}bytes(t){this.grow(t.length),this.buf.set(t,this.len),this.len+=t.length}done(){return this.buf.slice(0,this.len)}}function Pe(s,t,e){s.u16(39169),s.u16(7),s.u16(2),s.u16(17729),s.bytes(new Uint8Array([t])),s.u16(e)}async function un(s,t,e){if(t==="store")return s;const r=await w();if(t==="deflate")return r.deflateCompress(s,e??6);if(t==="zstd")return r.zstdCompress(s,e??19);throw new ee(`Unsupported ZIP method: ${t}`)}const Ue=new TextEncoder;async function _n(s,t={}){const e=await w(),r=s.reduce((u,d)=>u+d.data.length,0),o=t.parallel??(s.length>=2&&r>=tn)?Kt():void 0,l=s.map(u=>e.crc32(u.data));let p=0;const m=t.onProgress,z=await Promise.all(s.map(u=>{const d=u.method??"deflate",D=d==="store"?Promise.resolve(u.data):o?o.zipCompress(u.data,d,u.level??(d==="zstd"?19:6)):un(u.data,d,u.level);return m?D.then(B=>(m(++p,s.length),B)):D})),_=3,x=t.password?await Promise.all(z.map(u=>en(u,t.password,_))):void 0,A=x?x.map(u=>u.payload):z,a=new ln,R=[];let C=s.length>q;for(let u=0;u<s.length;u++){const d=s[u],D=d.method??"deflate",B=cn[D],E=x!==void 0,te=E?99:B,fe=2048|(E?1:0),Y=Ue.encode(d.name),X=d.comment?Ue.encode(d.comment):new Uint8Array(0),J=l[u],ne=E?0:J,re=A[u],K=d.data.length,F=re.length,_e=d.mtime===void 0?new Date:new Date(d.mtime),{date:se,time:ie}=Ft(_e),oe=d.unixPermissions!==void 0?(d.unixPermissions&65535)<<16:0,Q=a.len,P=C||K>S||F>S||Q>S;P&&(C=!0);const V=(P?20:0)+(E?11:0);a.u32(nn),a.u16(P?45:20),a.u16(fe),a.u16(te),a.u16(ie),a.u16(se),a.u32(ne),a.u32(P?S:F),a.u32(P?S:K),a.u16(Y.length),a.u16(V),a.bytes(Y),P&&(a.u16(1),a.u16(16),a.u64(K),a.u64(F)),E&&Pe(a,_,B),a.bytes(re),R.push({nameBytes:Y,commentBytes:X,method:te,actualMethod:B,encrypted:E,crc:ne,compSize:F,size:K,dosDate:se,dosTime:ie,offset:Q,externalAttrs:oe,zip64:P})}const U=a.len;for(const u of R){a.u32(rn),a.u16(u.zip64?45:20),a.u16(u.zip64?45:20),a.u16(2048|(u.encrypted?1:0)),a.u16(u.method),a.u16(u.dosTime),a.u16(u.dosDate),a.u32(u.crc);const d=u.zip64;a.u32(d?S:u.compSize),a.u32(d?S:u.size),a.u16(u.nameBytes.length);const D=[];d&&D.push(u.size,u.compSize,u.offset);const B=(d?4+D.length*8:0)+(u.encrypted?11:0);if(a.u16(B),a.u16(u.commentBytes.length),a.u16(0),a.u16(0),a.u32(u.externalAttrs),a.u32(d?S:u.offset),a.bytes(u.nameBytes),d){a.u16(1),a.u16(D.length*8);for(const E of D)a.u64(E)}u.encrypted&&Pe(a,3,u.actualMethod),a.bytes(u.commentBytes)}const M=a.len-U,T=R.length;if(C||T>q||M>S||U>S){const u=a.len;a.u32(on),a.u64(44),a.u16(45),a.u16(45),a.u32(0),a.u32(0),a.u64(T),a.u64(T),a.u64(M),a.u64(U),a.u32(an),a.u32(0),a.u64(u),a.u32(1)}return a.u32(sn),a.u16(0),a.u16(0),a.u16(T>q?q:T),a.u16(T>q?q:T),a.u32(M>S?S:M),a.u32(U>S?S:U),a.u16(0),a.done()}new TextDecoder("utf-8");export{pe as AbortError,Nt as WorkerPool,ue as ZipKitEngine,ee as ZipKitError,At as brotli,Tt as bzip2,Et as compress,Bt as decompressWith,pt as deflate,w as getEngine,mt as gunzip,_t as gzip,dt as inflate,wt as lz4,Rt as lzma,Kt as sharedPool,kt as snappy,St as unbrotli,Dt as unbzip2,vt as unlz4,Ct as unlzma,xt as unsnappy,gt as unzlib,bt as unzstd,_n as zip,zt as zlib,yt as zstd};
|
|
1
|
+
import{_ as ce}from"./main-DM-tHKbW.js";async function ot(s={}){var t,e=s,r=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,o=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(o){const{createRequire:n}=await ce(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]);var l=n(import.meta.url)}var p=(n,c)=>{throw c},m=import.meta.url,z="";function _(n){return e.locateFile?e.locateFile(n,z):z+n}var x,A;if(o){var a=l("node:fs");m.startsWith("file:")&&(z=l("node:path").dirname(l("node:url").fileURLToPath(m))+"/"),A=n=>{n=u(n)?new URL(n):n;var c=a.readFileSync(n);return c},x=async(n,c=!0)=>{n=u(n)?new URL(n):n;var f=a.readFileSync(n,c?void 0:"utf8");return f},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),p=(n,c)=>{throw process.exitCode=n,c}}else if(r||i){try{z=new URL(".",m).href}catch{}x=async n=>{var c=await fetch(n,{credentials:"same-origin"});if(c.ok)return c.arrayBuffer();throw new Error(c.status+" : "+c.url)}}var R=console.log.bind(console),C=console.error.bind(console),U,M=!1,T,u=n=>n.startsWith("file://"),d,D,B=!1;function E(){var n=ae.buffer;e.HEAPU8=V=new Uint8Array(n),P=new Uint32Array(n),Q=new BigInt64Array(n),new BigUint64Array(n)}function te(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Me(e.preRun.shift());ze(ye)}function fe(){B=!0,L.m()}function Y(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)Be(e.postRun.shift());ze(ge)}function X(n){e.onAbort?.(n),n=`Aborted(${n})`,C(n),M=!0,n+=". Build with -sASSERTIONS for more info.";var c=new WebAssembly.RuntimeError(n);throw D?.(c),c}var J;function ne(){return e.locateFile?_("zipkit-engine.wasm"):new URL("/assets/zipkit-engine-CaR0t_Uy.wasm",import.meta.url).href}function re(n){if(n==J&&U)return new Uint8Array(U);if(A)return A(n);throw"both async and sync fetching of the wasm failed"}async function K(n){if(!U)try{var c=await x(n);return new Uint8Array(c)}catch{}return re(n)}async function F(n,c){try{var f=await K(n),h=await WebAssembly.instantiate(f,c);return h}catch(b){C(`failed to asynchronously prepare wasm: ${b}`),X(b)}}async function _e(n,c,f){if(!n&&!o)try{var h=fetch(c,{credentials:"same-origin"}),b=await WebAssembly.instantiateStreaming(h,f);return b}catch(v){C(`wasm streaming compile failed: ${v}`),C("falling back to ArrayBuffer instantiation")}return F(c,f)}function se(){var n={a:rt};return n}async function ie(){function n(v,k){return L=v.exports,L=st(L),nt(L),E(),L}function c(v){return n(v.instance)}var f=se();if(e.instantiateWasm)return new Promise((v,k)=>{e.instantiateWasm(f,(I,N)=>{v(n(I))})});J??=ne();var h=await _e(U,J,f),b=c(h);return b}class oe{name="ExitStatus";constructor(c){this.message=`Program terminated with exit(${c})`,this.status=c}}var Q,P,V,ze=n=>{for(;n.length>0;)n.shift()(e)},ge=[],Be=n=>ge.push(n),ye=[],Me=n=>ye.push(n),me=!0,be=globalThis.TextDecoder&&new TextDecoder,Ie=(n,c,f,h)=>{for(var b=c+f;n[c]&&!(c>=b);)++c;return c},we=(n,c=0,f,h)=>{c>>>=0;var b=Ie(n,c,f);if(b-c>16&&n.buffer&&be)return be.decode(n.subarray(c,b));for(var v="";c<b;){var k=n[c++];if(!(k&128)){v+=String.fromCharCode(k);continue}var I=n[c++]&63;if((k&224)==192){v+=String.fromCharCode((k&31)<<6|I);continue}var N=n[c++]&63;if((k&240)==224?k=(k&15)<<12|I<<6|N:k=(k&7)<<18|I<<12|N<<6|n[c++]&63,k<65536)v+=String.fromCharCode(k);else{var Te=k-65536;v+=String.fromCharCode(55296|Te>>10,56320|Te&1023)}}return v},he=(n,c,f)=>(n>>>=0,n?we(V,n,c):"");function We(n,c,f,h){return n>>>=0,c>>>=0,h>>>=0,X(`Assertion failed: ${he(n)}, at: `+[c?he(c):"unknown filename",f,h?he(h):"unknown function"])}var Le=()=>X(""),ve=0,Ne=()=>{me=!1,ve=0},O={},ke=n=>{if(n instanceof oe||n=="unwind")return T;p(1,n)},xe=()=>me||ve>0,Ae=n=>{T=n,xe()||(e.onExit?.(n),M=!0),p(n,new oe(n))},He=(n,c)=>{T=n,Ae(n)},Se=He,Ke=()=>{if(!xe())try{Se(T)}catch(n){ke(n)}},Fe=n=>{if(!M)try{return n()}catch(c){ke(c)}finally{Ke()}},Re=()=>performance.now(),Ve=(n,c)=>{if(O[n]&&(clearTimeout(O[n].id),delete O[n]),!c)return 0;var f=setTimeout(()=>{delete O[n],Fe(()=>Ce(n,Re()))},c);return O[n]={id:f,timeout_ms:c},0},qe=()=>Date.now(),$e=n=>n>=0&&n<=3;function je(n,c,f){if(f>>>=0,!$e(n))return 28;var h;n===0?h=qe():h=Re();var b=Math.round(h*1e3*1e3);return Q[f>>>3>>>0]=BigInt(b),0}var Ze=()=>4294901760,Ge=(n,c)=>Math.ceil(n/c)*c,Ye=n=>{var c=ae.buffer.byteLength,f=(n-c+65535)/65536|0;try{return ae.grow(f),E(),1}catch{}};function Xe(n){n>>>=0;var c=V.length,f=Ze();if(n>f)return!1;for(var h=1;h<=4;h*=2){var b=c*(1+.2/h);b=Math.min(b,n+100663296);var v=Math.min(f,Ge(Math.max(n,b),65536)),k=Ye(v);if(k)return!0}return!1}var Je=n=>52;function Qe(n,c,f,h){return 70}var Oe=[null,[],[]],et=(n,c)=>{var f=Oe[n];c===0||c===10?((n===1?R:C)(we(f)),f.length=0):f.push(c)};function tt(n,c,f,h){c>>>=0,f>>>=0,h>>>=0;for(var b=0,v=0;v<f;v++){var k=P[c>>>2>>>0],I=P[c+4>>>2>>>0];c+=8;for(var N=0;N<I;N++)et(n,V[k+N>>>0]);b+=I}return P[h>>>2>>>0]=b,0}if(e.noExitRuntime&&(me=e.noExitRuntime),e.print&&(R=e.print),e.printErr&&(C=e.printErr),e.wasmBinary&&(U=e.wasmBinary),e.arguments&&e.arguments,e.thisProgram&&e.thisProgram,e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.shift()();var Ce,ae;function nt(n){e._zk_input_ptr=n.n,e._zk_result_ptr=n.o,e._zk_result_len=n.p,e._zk_gzip_compress=n.q,e._zk_gzip_decompress=n.r,e._zk_deflate_compress=n.s,e._zk_deflate_decompress=n.t,e._zk_zlib_compress=n.u,e._zk_zlib_decompress=n.v,e._zk_crc32=n.w,e._zk_lz4_compress=n.x,e._zk_lz4_decompress=n.y,e._zk_zstd_compress=n.z,e._zk_zstd_decompress=n.A,e._zk_brotli_compress=n.B,e._zk_brotli_decompress=n.C,e._zk_snappy_compress=n.D,e._zk_snappy_decompress=n.E,e._zk_zstd_max_compress=n.F,e._zk_set_aux=n.G,e._zk_zstd_train_dict=n.H,e._zk_zstd_compress_dict=n.I,e._zk_zstd_decompress_dict=n.J,e._zk_lzma_compress=n.K,e._zk_lzma_decompress=n.L,e._zk_xz_ok=n.M,e._zk_xz_compress=n.N,e._zk_xz_decompress=n.O,e._zk_lzma2_decompress=n.P,e._zk_bzip2_compress=n.Q,e._zk_bzip2_decompress=n.R,e._zk_qoi_encode=n.S,e._zk_qoi_decode=n.T,e._zk_frame_delta_encode=n.U,e._zk_frame_delta_decode=n.V,Ce=n.W,ae=n.l,n.__indirect_function_table}var rt={a:We,f:Le,e:Ne,k:Ve,h:je,c:Xe,b:Se,j:Je,g:Qe,i:tt,d:Ae};function st(n){n=Object.assign({},n);var c=h=>b=>h(b)>>>0,f=h=>()=>h()>>>0;return n._emscripten_stack_alloc=c(n._emscripten_stack_alloc),n.emscripten_stack_get_current=f(n.emscripten_stack_get_current),n}function it(){te();function n(){e.calledRun=!0,!M&&(fe(),d?.(e),e.onRuntimeInitialized?.(),Y())}e.setStatus?(e.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>e.setStatus(""),1),n()},1)):n()}var L;return L=await ie(),it(),B?t=e:t=new Promise((n,c)=>{d=n,D=c}),t}class ue{m;constructor(t){this.m=t}static async load(){const t=await ot();return new ue(t)}call(t,e){const r=this.m,i=r._zk_input_ptr(e.length);r.HEAPU8.set(e,i),t(e.length);const o=r._zk_result_ptr(),l=r._zk_result_len()>>>0;return r.HEAPU8.slice(o,o+l)}gzipCompress(t,e=9){return this.call(r=>this.m._zk_gzip_compress(r,e),t)}gzipDecompress(t){return this.call(e=>this.m._zk_gzip_decompress(e),t)}deflateCompress(t,e=9){return this.call(r=>this.m._zk_deflate_compress(r,e),t)}deflateDecompress(t){return this.call(e=>this.m._zk_deflate_decompress(e,0),t)}zlibCompress(t,e=9){return this.call(r=>this.m._zk_zlib_compress(r,e),t)}zlibDecompress(t){return this.call(e=>this.m._zk_zlib_decompress(e,0),t)}crc32(t,e=0){const r=this.m,i=r._zk_input_ptr(t.length);return r.HEAPU8.set(t,i),r._zk_crc32(t.length,e>>>0)>>>0}lz4Compress(t){return this.call(e=>this.m._zk_lz4_compress(e),t)}lz4Decompress(t){return this.call(e=>this.m._zk_lz4_decompress(e),t)}zstdCompress(t,e=19){return this.call(r=>this.m._zk_zstd_compress(r,e),t)}zstdDecompress(t){return this.call(e=>this.m._zk_zstd_decompress(e),t)}brotliCompress(t,e=11){return this.call(r=>this.m._zk_brotli_compress(r,e),t)}brotliDecompress(t){return this.call(e=>this.m._zk_brotli_decompress(e),t)}snappyCompress(t){return this.call(e=>this.m._zk_snappy_compress(e),t)}snappyDecompress(t){return this.call(e=>this.m._zk_snappy_decompress(e),t)}zstdMaxCompress(t,e=22){return this.call(r=>this.m._zk_zstd_max_compress(r,e),t)}lzmaCompress(t,e=9){return this.call(r=>this.m._zk_lzma_compress(r,e),t)}lzmaDecompress(t){return this.call(e=>this.m._zk_lzma_decompress(e),t)}lzma2Decompress(t,e,r){return this.call(i=>this.m._zk_lzma2_decompress(i,e,r),t)}xzCompress(t,e=6){const r=this.call(i=>this.m._zk_xz_compress(i,e),t);if(!this.m._zk_xz_ok())throw new Error("xz compression failed");return r}xzDecompress(t){const e=this.call(r=>this.m._zk_xz_decompress(r),t);if(!this.m._zk_xz_ok())throw new Error("xz decompression failed (corrupt stream or unsupported filter)");return e}setAux(t){const e=this.m,r=e._zk_input_ptr(t.length);e.HEAPU8.set(t,r),e._zk_set_aux(t.length)}zstdTrainDict(t,e,r){const i=this.m,o=i._zk_input_ptr(t.length);i.HEAPU8.set(t,o),i._zk_zstd_train_dict(t.length,e,r);const l=i._zk_result_ptr(),p=i._zk_result_len()>>>0;return i.HEAPU8.slice(l,l+p)}zstdCompressDict(t,e=19){return this.call(r=>this.m._zk_zstd_compress_dict(r,e),t)}zstdDecompressDict(t){return this.call(e=>this.m._zk_zstd_decompress_dict(e),t)}bzip2Compress(t,e=9){return this.call(r=>this.m._zk_bzip2_compress(r,e),t)}bzip2Decompress(t){return this.call(e=>this.m._zk_bzip2_decompress(e),t)}qoiEncode(t,e,r,i){return this.call(o=>this.m._zk_qoi_encode(o,e,r,i),t)}qoiDecode(t){return this.call(e=>this.m._zk_qoi_decode(e),t)}frameDeltaEncode(t,e){return this.call(r=>this.m._zk_frame_delta_encode(r,e),t)}frameDeltaDecode(t,e){return this.call(r=>this.m._zk_frame_delta_decode(r,e),t)}}let at;function w(){return at??=ue.load()}const ct=Object.freeze(Object.defineProperty({__proto__:null,ZipKitEngine:ue,getEngine:w},Symbol.toStringTag,{value:"Module"}));class pe extends Error{constructor(t="The operation was aborted"){super(t),this.name="AbortError"}}class ee extends Error{constructor(t){super(t),this.name="ZipKitError"}}function lt(s,t,e,r){return s===void 0||!Number.isFinite(s)?r:Math.max(t,Math.min(e,Math.round(s)))}function de(s){return s?.mode??"balanced"}function H(s,t,e,r){return lt(s?.level,t,e,r[de(s)])}function W(){return globalThis.Bun}function ut(s){if(s?.aborted)throw new pe}async function y(s,t,e){ut(t?.signal),t?.onProgress?.(0,0);const r=s();return t?.onProgress?.(1,e),r}function ft(s){return de(s)!=="ratio"&&!!W()?.gzipSync}async function _t(s,t){const e=H(t,0,9,{speed:1,balanced:6,ratio:9}),r=W();if(ft(t))return y(()=>r.gzipSync(s,{level:e}),t,s.length);const i=await w();return y(()=>i.gzipCompress(s,e),t,s.length)}async function mt(s,t){const e=W();if(e?.gunzipSync)return y(()=>e.gunzipSync(s),t,s.length);const r=await w();return y(()=>r.gzipDecompress(s),t,s.length)}function ht(s){return de(s)!=="ratio"&&!!W()?.deflateSync}async function pt(s,t){const e=H(t,0,9,{speed:1,balanced:6,ratio:9}),r=W();if(ht(t))return y(()=>r.deflateSync(s,{level:e}),t,s.length);const i=await w();return y(()=>i.deflateCompress(s,e),t,s.length)}async function dt(s,t){const e=W();if(e?.inflateSync)return y(()=>e.inflateSync(s),t,s.length);const r=await w();return y(()=>r.deflateDecompress(s),t,s.length)}async function zt(s,t){const e=await w(),r=H(t,0,9,{speed:1,balanced:6,ratio:9});return y(()=>e.zlibCompress(s,r),t,s.length)}async function gt(s,t){const e=await w();return y(()=>e.zlibDecompress(s),t,s.length)}async function yt(s,t){const e=H(t,1,22,{speed:1,balanced:3,ratio:19}),r=W();if(r?.zstdCompressSync)return y(()=>r.zstdCompressSync(s,{level:e}),t,s.length);const i=await w(),o=e>19?()=>i.zstdMaxCompress(s,e):()=>i.zstdCompress(s,e);return y(o,t,s.length)}async function bt(s,t){const e=W();if(e?.zstdDecompressSync)return y(()=>e.zstdDecompressSync(s),t,s.length);const r=await w();return y(()=>r.zstdDecompress(s),t,s.length)}async function wt(s,t){const e=await w();return y(()=>e.lz4Compress(s),t,s.length)}async function vt(s,t){const e=await w();return y(()=>e.lz4Decompress(s),t,s.length)}async function kt(s,t){const e=await w();return y(()=>e.snappyCompress(s),t,s.length)}async function xt(s,t){const e=await w();return y(()=>e.snappyDecompress(s),t,s.length)}async function At(s,t){const e=await w(),r=H(t,0,11,{speed:4,balanced:6,ratio:11});return y(()=>e.brotliCompress(s,r),t,s.length)}async function St(s,t){const e=await w();return y(()=>e.brotliDecompress(s),t,s.length)}async function Rt(s,t){const e=await w(),r=H(t,0,9,{speed:3,balanced:6,ratio:9});return y(()=>e.lzmaCompress(s,r),t,s.length)}async function Ct(s,t){const e=await w();return y(()=>e.lzmaDecompress(s),t,s.length)}async function Tt(s,t){const e=await w(),r=H(t,1,9,{speed:1,balanced:6,ratio:9});return y(()=>e.bzip2Compress(s,r),t,s.length)}async function Dt(s,t){const e=await w();return y(()=>e.bzip2Decompress(s),t,s.length)}const Pt={gzip:_t,deflate:pt,zlib:zt,zstd:yt,lz4:wt,snappy:kt,brotli:At,lzma:Rt,bzip2:Tt},Ut={gzip:mt,deflate:dt,zlib:gt,zstd:bt,lz4:vt,snappy:xt,brotli:St,lzma:Ct,bzip2:Dt};function Et(s,t,e){const r=Pt[t];if(!r)throw new ee(`Unknown codec: ${t}`);return r(s,e)}function Bt(s,t,e){const r=Ut[t];if(!r)throw new ee(`Unknown codec: ${t}`);return r(s,e)}const Mt=Object.freeze(Object.defineProperty({__proto__:null,compress:Et,decompressWith:Bt},Symbol.toStringTag,{value:"Module"})),It=new URL(import.meta.url.endsWith(".ts")?"./worker.ts":"./worker.js",import.meta.url);function Wt(){const s=globalThis.navigator?.hardwareConcurrency??4;return Math.max(1,Math.min(s,8))}async function Lt(){try{return await ce(()=>import("./__vite-browser-external-BIHI7g3E.js"),[])}catch{return}}class Nt{size;workers=[];pending=new Map;next=0;seq=0;ready;usable=!0;refWhileBusy(){const t=this.pending.size>0;for(const e of this.workers)(t?e.ref:e.unref).call(e)}constructor(t={}){this.size=t.size??Wt()}async ensure(){return this.ready?this.ready:(this.ready=(async()=>{const t=await Lt();if(!t){this.usable=!1;return}for(let e=0;e<this.size;e++){const r=new t.Worker(It);r.on("message",i=>this.settle(i)),r.on("error",i=>this.failAll(i)),r.unref(),this.workers.push(r)}})(),this.ready)}settle(t){const e=this.pending.get(t.id);e&&(this.pending.delete(t.id),this.refWhileBusy(),e.signal&&e.onAbort&&e.signal.removeEventListener("abort",e.onAbort),t.ok&&t.result?e.resolve(t.result):e.reject(new Error(t.error??"Worker operation failed")))}failAll(t){for(const[,e]of this.pending)e.reject(t);this.pending.clear(),this.refWhileBusy()}async run(t,e,r,i,o,l,p){if(l?.aborted)throw new pe;if(await this.ensure(),!this.usable){if(t==="zipCompress"){const{getEngine:A}=await ce(async()=>{const{getEngine:R}=await Promise.resolve().then(()=>ct);return{getEngine:R}},void 0),a=await A();return p==="zstd"?a.zstdCompress(e,i??19):a.deflateCompress(e,i??6)}const{compress:_,decompressWith:x}=await ce(async()=>{const{compress:A,decompressWith:a}=await Promise.resolve().then(()=>Mt);return{compress:A,decompressWith:a}},void 0);return t==="compress"?_(e,r,{level:i,mode:o}):x(e,r)}const m=this.seq++,z=this.workers[this.next++%this.workers.length];return new Promise((_,x)=>{const A={resolve:_,reject:x,signal:l};l&&(A.onAbort=()=>{this.pending.delete(m),this.refWhileBusy(),x(new pe)},l.addEventListener("abort",A.onAbort,{once:!0})),this.pending.set(m,A),this.refWhileBusy();const a=e.slice(),R={id:m,kind:t,codec:r,level:i,mode:o,method:p,data:a};z.postMessage(R,[a.buffer])})}compress(t,e,r){return this.run("compress",t,e,r?.level,r?.mode,r?.signal)}decompress(t,e,r){return this.run("decompress",t,e,void 0,void 0,r?.signal)}zipCompress(t,e,r){return this.run("zipCompress",t,e,r,void 0,void 0,e)}async destroy(){this.failAll(new Error("Worker pool destroyed")),await Promise.all(this.workers.map(t=>t.terminate())),this.workers=[],this.ready=void 0}}let Ht;function Kt(){return Ht??=new Nt}function Ft(s){const e=(Math.max(1980,s.getFullYear())-1980&127)<<9|s.getMonth()+1<<5|s.getDate(),r=s.getHours()<<11|s.getMinutes()<<5|s.getSeconds()>>1;return{date:e,time:r}}let g,$,j,Z,G;const Vt=new Uint32Array([16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,452984832,905969664]);function qt(){g=new Uint8Array(256);const s=new Uint8Array(256);let t=1,e=1;do t=t^t<<1^(t&128?283:0),t&=255,e^=e<<1,e^=e<<2,e^=e<<4,e&=255,e&128&&(e^=9),e&=255,s[t]=e;while(t!==1);g[0]=99;for(let r=0;r<256;r++){let i=s[r],o=i;for(let l=0;l<4;l++)o=(o<<1|o>>>7)&255,i^=o;i^=99,g[r]=r===0?99:i}$=new Uint32Array(256),j=new Uint32Array(256),Z=new Uint32Array(256),G=new Uint32Array(256);for(let r=0;r<256;r++){const i=g[r],o=$t(i),l=o^i;$[r]=(o<<24|i<<16|i<<8|l)>>>0,j[r]=(l<<24|o<<16|i<<8|i)>>>0,Z[r]=(i<<24|l<<16|o<<8|i)>>>0,G[r]=(i<<24|i<<16|l<<8|o)>>>0}}function $t(s){return(s<<1^(s&128?283:0))&255}class jt{rk;rounds;constructor(t){if(g||qt(),t.length!==16&&t.length!==24&&t.length!==32)throw new Error(`AES key must be 16/24/32 bytes, got ${t.length}`);const e=t.length/4;this.rounds=e+6;const r=4*(this.rounds+1),i=new Uint32Array(r);for(let o=0;o<e;o++)i[o]=(t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3])>>>0;for(let o=e;o<r;o++){let l=i[o-1];o%e===0?l=(De(l<<8|l>>>24)^Vt[o/e-1])>>>0:e>6&&o%e===4&&(l=De(l)),i[o]=(i[o-e]^l)>>>0}this.rk=i}encryptBlock(t,e,r,i){const o=this.rk;let l=(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])^o[0],p=(t[e+4]<<24|t[e+5]<<16|t[e+6]<<8|t[e+7])^o[1],m=(t[e+8]<<24|t[e+9]<<16|t[e+10]<<8|t[e+11])^o[2],z=(t[e+12]<<24|t[e+13]<<16|t[e+14]<<8|t[e+15])^o[3],_=4;for(let x=1;x<this.rounds;x++){const A=($[l>>>24&255]^j[p>>>16&255]^Z[m>>>8&255]^G[z&255]^o[_])>>>0,a=($[p>>>24&255]^j[m>>>16&255]^Z[z>>>8&255]^G[l&255]^o[_+1])>>>0,R=($[m>>>24&255]^j[z>>>16&255]^Z[l>>>8&255]^G[p&255]^o[_+2])>>>0,C=($[z>>>24&255]^j[l>>>16&255]^Z[p>>>8&255]^G[m&255]^o[_+3])>>>0;l=A,p=a,m=R,z=C,_+=4}r[i]=(g[l>>>24&255]^o[_]>>>24)&255,r[i+1]=(g[p>>>16&255]^o[_]>>>16)&255,r[i+2]=(g[m>>>8&255]^o[_]>>>8)&255,r[i+3]=(g[z&255]^o[_])&255,r[i+4]=(g[p>>>24&255]^o[_+1]>>>24)&255,r[i+5]=(g[m>>>16&255]^o[_+1]>>>16)&255,r[i+6]=(g[z>>>8&255]^o[_+1]>>>8)&255,r[i+7]=(g[l&255]^o[_+1])&255,r[i+8]=(g[m>>>24&255]^o[_+2]>>>24)&255,r[i+9]=(g[z>>>16&255]^o[_+2]>>>16)&255,r[i+10]=(g[l>>>8&255]^o[_+2]>>>8)&255,r[i+11]=(g[p&255]^o[_+2])&255,r[i+12]=(g[z>>>24&255]^o[_+3]>>>24)&255,r[i+13]=(g[l>>>16&255]^o[_+3]>>>16)&255,r[i+14]=(g[p>>>8&255]^o[_+3]>>>8)&255,r[i+15]=(g[m&255]^o[_+3])&255}}function De(s){return(g[s>>>24&255]<<24|g[s>>>16&255]<<16|g[s>>>8&255]<<8|g[s&255])>>>0}function Zt(s,t){const e=new Uint8Array(t.length),r=new Uint8Array(16),i=new Uint8Array(16);let o=1;for(let l=0;l<t.length;l+=16){r[0]=o&255,r[1]=o>>>8&255,r[2]=o>>>16&255,r[3]=o>>>24&255,s.encryptBlock(r,0,i,0);const p=Math.min(16,t.length-l);for(let m=0;m<p;m++)e[l+m]=t[l+m]^i[m];o++}return e}const Gt={1:16,2:24,3:32},Yt={1:8,2:12,3:16},Ee=10,Xt=1e3;function le(){const s=globalThis.crypto;if(!s?.subtle)throw new ee("WebCrypto (crypto.subtle) is required for ZIP AES encryption");return s.subtle}function Jt(s){const t=globalThis.crypto;if(!t?.getRandomValues)throw new ee("crypto.getRandomValues is required to create encrypted ZIPs");return t.getRandomValues(new Uint8Array(s))}async function Qt(s,t,e){const r=Gt[e],i=await le().importKey("raw",new TextEncoder().encode(s),"PBKDF2",!1,["deriveBits"]),o=await le().deriveBits({name:"PBKDF2",salt:t,iterations:Xt,hash:"SHA-1"},i,(r*2+2)*8),l=new Uint8Array(o);return{aesKey:l.subarray(0,r),macKey:l.subarray(r,r*2),verifier:l.subarray(r*2,r*2+2)}}async function Ot(s,t){const e=await le().importKey("raw",s,{name:"HMAC",hash:"SHA-1"},!1,["sign"]),r=await le().sign("HMAC",e,t);return new Uint8Array(r).subarray(0,Ee)}async function en(s,t,e=3){const r=Jt(Yt[e]),{aesKey:i,macKey:o,verifier:l}=await Qt(t,r,e),p=Zt(new jt(i),s),m=await Ot(o,p),z=new Uint8Array(r.length+2+p.length+Ee);return z.set(r,0),z.set(l,r.length),z.set(p,r.length+2),z.set(m,r.length+2+p.length),{payload:z,strength:e}}const tn=256*1024,nn=67324752,rn=33639248,sn=101010256,on=101075792,an=117853008,S=4294967295,q=65535,cn={store:0,deflate:8,zstd:93};class ln{buf=new Uint8Array(1024);view=new DataView(this.buf.buffer);len=0;grow(t){if(this.len+t<=this.buf.length)return;let e=this.buf.length*2;for(;e<this.len+t;)e*=2;const r=new Uint8Array(e);r.set(this.buf.subarray(0,this.len)),this.buf=r,this.view=new DataView(this.buf.buffer)}u16(t){this.grow(2),this.view.setUint16(this.len,t,!0),this.len+=2}u32(t){this.grow(4),this.view.setUint32(this.len,t>>>0,!0),this.len+=4}u64(t){this.grow(8),this.view.setBigUint64(this.len,BigInt(t),!0),this.len+=8}bytes(t){this.grow(t.length),this.buf.set(t,this.len),this.len+=t.length}done(){return this.buf.slice(0,this.len)}}function Pe(s,t,e){s.u16(39169),s.u16(7),s.u16(2),s.u16(17729),s.bytes(new Uint8Array([t])),s.u16(e)}async function un(s,t,e){if(t==="store")return s;const r=await w();if(t==="deflate")return r.deflateCompress(s,e??6);if(t==="zstd")return r.zstdCompress(s,e??19);throw new ee(`Unsupported ZIP method: ${t}`)}const Ue=new TextEncoder;async function _n(s,t={}){const e=await w(),r=s.reduce((u,d)=>u+d.data.length,0),o=t.parallel??(s.length>=2&&r>=tn)?Kt():void 0,l=s.map(u=>e.crc32(u.data));let p=0;const m=t.onProgress,z=await Promise.all(s.map(u=>{const d=u.method??"deflate",D=d==="store"?Promise.resolve(u.data):o?o.zipCompress(u.data,d,u.level??(d==="zstd"?19:6)):un(u.data,d,u.level);return m?D.then(B=>(m(++p,s.length),B)):D})),_=3,x=t.password?await Promise.all(z.map(u=>en(u,t.password,_))):void 0,A=x?x.map(u=>u.payload):z,a=new ln,R=[];let C=s.length>q;for(let u=0;u<s.length;u++){const d=s[u],D=d.method??"deflate",B=cn[D],E=x!==void 0,te=E?99:B,fe=2048|(E?1:0),Y=Ue.encode(d.name),X=d.comment?Ue.encode(d.comment):new Uint8Array(0),J=l[u],ne=E?0:J,re=A[u],K=d.data.length,F=re.length,_e=d.mtime===void 0?new Date:new Date(d.mtime),{date:se,time:ie}=Ft(_e),oe=d.unixPermissions!==void 0?(d.unixPermissions&65535)<<16:0,Q=a.len,P=C||K>S||F>S||Q>S;P&&(C=!0);const V=(P?20:0)+(E?11:0);a.u32(nn),a.u16(P?45:20),a.u16(fe),a.u16(te),a.u16(ie),a.u16(se),a.u32(ne),a.u32(P?S:F),a.u32(P?S:K),a.u16(Y.length),a.u16(V),a.bytes(Y),P&&(a.u16(1),a.u16(16),a.u64(K),a.u64(F)),E&&Pe(a,_,B),a.bytes(re),R.push({nameBytes:Y,commentBytes:X,method:te,actualMethod:B,encrypted:E,crc:ne,compSize:F,size:K,dosDate:se,dosTime:ie,offset:Q,externalAttrs:oe,zip64:P})}const U=a.len;for(const u of R){a.u32(rn),a.u16(u.zip64?45:20),a.u16(u.zip64?45:20),a.u16(2048|(u.encrypted?1:0)),a.u16(u.method),a.u16(u.dosTime),a.u16(u.dosDate),a.u32(u.crc);const d=u.zip64;a.u32(d?S:u.compSize),a.u32(d?S:u.size),a.u16(u.nameBytes.length);const D=[];d&&D.push(u.size,u.compSize,u.offset);const B=(d?4+D.length*8:0)+(u.encrypted?11:0);if(a.u16(B),a.u16(u.commentBytes.length),a.u16(0),a.u16(0),a.u32(u.externalAttrs),a.u32(d?S:u.offset),a.bytes(u.nameBytes),d){a.u16(1),a.u16(D.length*8);for(const E of D)a.u64(E)}u.encrypted&&Pe(a,3,u.actualMethod),a.bytes(u.commentBytes)}const M=a.len-U,T=R.length;if(C||T>q||M>S||U>S){const u=a.len;a.u32(on),a.u64(44),a.u16(45),a.u16(45),a.u32(0),a.u32(0),a.u64(T),a.u64(T),a.u64(M),a.u64(U),a.u32(an),a.u32(0),a.u64(u),a.u32(1)}return a.u32(sn),a.u16(0),a.u16(0),a.u16(T>q?q:T),a.u16(T>q?q:T),a.u32(M>S?S:M),a.u32(U>S?S:U),a.u16(0),a.done()}new TextDecoder("utf-8");export{pe as AbortError,Nt as WorkerPool,ue as ZipKitEngine,ee as ZipKitError,At as brotli,Tt as bzip2,Et as compress,Bt as decompressWith,pt as deflate,w as getEngine,mt as gunzip,_t as gzip,dt as inflate,wt as lz4,Rt as lzma,Kt as sharedPool,kt as snappy,St as unbrotli,Dt as unbzip2,vt as unlz4,Ct as unlzma,xt as unsnappy,gt as unzlib,bt as unzstd,_n as zip,zt as zlib,yt as zstd};
|