@shumai-one/shumai 0.3.3 → 0.3.4
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/bin/{chunk-0dcv6kpk.js → chunk-03pw611p.js} +2 -2
- package/bin/{chunk-p8enen2a.js → chunk-05m8w09t.js} +1 -1
- package/bin/chunk-0ark0qrm.js +1 -0
- package/bin/{chunk-rt0pvhdf.js → chunk-1apsnd7e.js} +1 -1
- package/bin/{chunk-9vgjhemh.js → chunk-1bfrnc6b.js} +1 -1
- package/bin/{chunk-25qj10ny.js → chunk-21h9kgp5.js} +1 -1
- package/bin/{chunk-am1m29pv.js → chunk-2967rnmn.js} +1 -1
- package/bin/{chunk-7436fyrg.js → chunk-2errtbmb.js} +1 -1
- package/bin/{chunk-gh4w2bdg.js → chunk-2jnyk045.js} +1 -1
- package/bin/{chunk-xcbb21j9.js → chunk-2mr99scd.js} +2 -2
- package/bin/chunk-2pxev94x.js +2 -0
- package/bin/{chunk-p86w1eaw.js → chunk-2y9t0qxp.js} +1 -1
- package/bin/{chunk-7pjes19z.js → chunk-2ydhnafa.js} +2 -2
- package/bin/{chunk-m268vcdm.js → chunk-38hp9gfh.js} +2 -2
- package/bin/chunk-3t7v2de9.js +307 -0
- package/bin/{chunk-yj6tmjsc.js → chunk-3vbx3x11.js} +2 -2
- package/bin/chunk-3xfhbvar.js +2 -0
- package/bin/{chunk-9e99n265.js → chunk-4153rke8.js} +2 -2
- package/bin/{chunk-xn9cpax1.js → chunk-4a185tez.js} +3 -3
- package/bin/{chunk-3g9g2c7h.js → chunk-4rexdetz.js} +3 -3
- package/bin/{chunk-9zvteyz0.js → chunk-58y9bagr.js} +2 -2
- package/bin/{chunk-hz6s7by4.js → chunk-5dqn7egd.js} +1 -1
- package/bin/{chunk-7anqxx1z.js → chunk-5e48saab.js} +1 -1
- package/bin/{chunk-g097058z.js → chunk-5qwzveck.js} +2 -2
- package/bin/chunk-61hfhfce.js +2 -0
- package/bin/{chunk-mhwp74hh.js → chunk-6ab9eftx.js} +1 -1
- package/bin/{chunk-3gcnj1eq.js → chunk-6b0f3d07.js} +2 -2
- package/bin/{chunk-p1bcbtmg.js → chunk-6gjn8trh.js} +1 -1
- package/bin/{chunk-2fc5hk8r.js → chunk-75x3w5hx.js} +1 -1
- package/bin/chunk-7e39zmss.js +1 -0
- package/bin/chunk-7h1m1e0b.js +1 -0
- package/bin/{chunk-va6hxm7n.js → chunk-7kdz1eng.js} +2 -2
- package/bin/chunk-7pcba64w.js +1 -0
- package/bin/{chunk-749c09cw.js → chunk-7xfx7741.js} +1 -1
- package/bin/{chunk-gpeyctxd.js → chunk-898hrxwq.js} +2 -2
- package/bin/{chunk-pqxh0cg7.js → chunk-89chaa11.js} +2 -2
- package/bin/chunk-8btfb5g6.js +2 -0
- package/bin/{chunk-5cm4vge8.js → chunk-8pa1n500.js} +2 -2
- package/bin/{chunk-m6sssvg3.js → chunk-8qe7cpbr.js} +1 -1
- package/bin/{chunk-t15a1vp6.js → chunk-8tnq43k9.js} +1 -1
- package/bin/{chunk-h4a3ms2b.js → chunk-8wzepzp3.js} +2 -2
- package/bin/{chunk-c7rj0f5r.js → chunk-9deae0n7.js} +1 -1
- package/bin/{chunk-tc7q988r.js → chunk-ankkm2wz.js} +2 -2
- package/bin/{chunk-yedr4r8a.js → chunk-ardp3pze.js} +1 -1
- package/bin/{chunk-tzmzqmcg.js → chunk-axe5rq99.js} +1 -1
- package/bin/{chunk-mggfc9ya.js → chunk-bagxeg82.js} +2 -2
- package/bin/{chunk-bw6wyw7k.js → chunk-bhqrqt97.js} +2 -2
- package/bin/{chunk-zgsy3k3h.js → chunk-bn1sts8x.js} +1 -1
- package/bin/{chunk-5vwkfxy7.js → chunk-bpb0szs5.js} +2 -2
- package/bin/{chunk-9a7a1p1j.js → chunk-c1j58ekb.js} +2 -2
- package/bin/{chunk-qx2mzv89.js → chunk-c4nenmry.js} +1 -1
- package/bin/{chunk-cdqvg03f.js → chunk-c9f6n4sf.js} +1 -1
- package/bin/chunk-cwh21vfb.js +2 -0
- package/bin/{chunk-8a75zqbz.js → chunk-cwpmf8tx.js} +2 -2
- package/bin/{chunk-vg6mkdj1.js → chunk-d2xrh0vv.js} +2 -2
- package/bin/{chunk-9g6vy76b.js → chunk-d4sg0z3y.js} +2 -2
- package/bin/{chunk-4g7h9qhr.js → chunk-d4sjezbk.js} +1 -1
- package/bin/{chunk-mm810jv7.js → chunk-ddfx823h.js} +2 -2
- package/bin/chunk-dtjx1097.js +2 -0
- package/bin/chunk-e32bzfza.js +1 -0
- package/bin/{chunk-qshm5vcn.js → chunk-e6rmqgzv.js} +1 -1
- package/bin/chunk-ersxsrz8.js +62 -0
- package/bin/{chunk-vf3bg920.js → chunk-gg1wfpm8.js} +2 -2
- package/bin/{chunk-2jvqhps9.js → chunk-gg8dmkwd.js} +2 -2
- package/bin/chunk-gnx9g8px.js +2 -0
- package/bin/{chunk-bd6x5ns9.js → chunk-h0k9zw29.js} +2 -2
- package/bin/chunk-htrzgs2a.css +1 -0
- package/bin/{chunk-41m51y08.js → chunk-j2jdrmaa.js} +1 -1
- package/bin/{chunk-gpmaaca1.js → chunk-j5dejr3e.js} +2 -2
- package/bin/{chunk-9sdhdhv4.js → chunk-j5q3t199.js} +2 -2
- package/bin/{chunk-67rr836p.js → chunk-jgxhv36z.js} +1 -1
- package/bin/{chunk-0a0sdyta.js → chunk-jnx8p6kj.js} +1 -1
- package/bin/{chunk-q8me9zev.js → chunk-k41vt2gq.js} +1 -1
- package/bin/{chunk-wpntb95k.js → chunk-k78m3rar.js} +2 -2
- package/bin/{chunk-gaemak59.js → chunk-kfbztymc.js} +2 -2
- package/bin/{chunk-ts9f4zqh.js → chunk-kgr3ytpb.js} +2 -2
- package/bin/{chunk-yfkcv10v.js → chunk-khc3dydj.js} +1 -1
- package/bin/chunk-krpr6g8a.js +1 -0
- package/bin/{chunk-pdajhyqm.js → chunk-m8tnsds1.js} +2 -2
- package/bin/chunk-mfmcsdd7.js +1 -0
- package/bin/chunk-msjv1ykh.js +2 -0
- package/bin/{chunk-1rsp4hc5.js → chunk-n73dbqps.js} +1 -1
- package/bin/{chunk-xsw3pb5p.js → chunk-n7cmya8k.js} +2 -2
- package/bin/{chunk-x0r8dcq0.js → chunk-nabagpah.js} +2 -2
- package/bin/{chunk-h73653yp.js → chunk-nn5qpr0q.js} +1 -1
- package/bin/{chunk-3823qzr0.js → chunk-pew69nxg.js} +2 -2
- package/bin/{chunk-2475z7vk.js → chunk-q2shr586.js} +1 -1
- package/bin/chunk-q7v8sj72.js +1 -0
- package/bin/{chunk-jkh04dka.js → chunk-q9tm2d21.js} +1 -1
- package/bin/{chunk-xgb533n0.js → chunk-qw5yjhab.js} +3 -3
- package/bin/{chunk-wkth5xwr.js → chunk-r9thyg31.js} +2 -2
- package/bin/{chunk-57kgmgfs.js → chunk-s584wxzj.js} +2 -2
- package/bin/{chunk-bn4ewsy8.js → chunk-s5s1rk4n.js} +1 -1
- package/bin/{chunk-d3kpqay2.js → chunk-scfbmsy7.js} +2 -2
- package/bin/{chunk-525eypdk.js → chunk-sddrv3ep.js} +1 -1
- package/bin/{chunk-r5jmnsqj.js → chunk-sfmhbk59.js} +1 -1
- package/bin/{chunk-6jgq154r.js → chunk-tbdgkpgw.js} +1 -1
- package/bin/chunk-twhj7h73.js +1 -0
- package/bin/{chunk-wtzkfwmx.js → chunk-v5zdafv4.js} +2 -2
- package/bin/{chunk-v75fanse.js → chunk-vzx1r87y.js} +2 -2
- package/bin/{chunk-g224r7mc.js → chunk-w3xzd86e.js} +2 -2
- package/bin/{chunk-fwqpq2sy.js → chunk-xkh6b42h.js} +1 -1
- package/bin/chunk-yn7mxpmb.js +7 -0
- package/bin/{chunk-ey7vty63.js → chunk-z544s59c.js} +2 -2
- package/bin/{chunk-7x7jtkh8.js → chunk-zned6mj8.js} +1 -1
- package/bin/{chunk-v0yhkcj5.js → chunk-zpq34g0w.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +498 -412
- package/package.json +7 -7
- package/prisma/migrations/20260806082136_add_sharelink_watermark/migration.sql +69 -0
- package/prisma/migrations/20260806085643_add_watermark_file_status/migration.sql +7 -0
- package/prisma/migrations/20260807140837_clean_media_remove_raw_transcodes_and_original_download_url/migration.sql +86 -0
- package/prisma/migrations/20260808014542_add_sharelink_allow_download/migration.sql +2 -0
- package/prisma/schema.prisma +68 -0
- package/bin/chunk-1cjgpspz.js +0 -2
- package/bin/chunk-1pgtq4rc.js +0 -2
- package/bin/chunk-4v5ykazp.js +0 -1
- package/bin/chunk-5x3vzer8.js +0 -1
- package/bin/chunk-804ndet8.js +0 -2
- package/bin/chunk-a8daqpfh.js +0 -7
- package/bin/chunk-c0c88nje.js +0 -307
- package/bin/chunk-d6v81kjj.js +0 -1
- package/bin/chunk-dfcrtdk2.js +0 -1
- package/bin/chunk-eczsk2xd.js +0 -62
- package/bin/chunk-g5e93f59.js +0 -2
- package/bin/chunk-g5xkj9p3.js +0 -2
- package/bin/chunk-hp139z0j.js +0 -2
- package/bin/chunk-j4y8c864.js +0 -1
- package/bin/chunk-pbb1tdwt.js +0 -1
- package/bin/chunk-pbfkw90e.js +0 -1
- package/bin/chunk-s10v4b01.css +0 -1
- package/bin/chunk-s1b5kf34.js +0 -2
- package/bin/chunk-v0xbr5e6.js +0 -2
- package/bin/chunk-yfjn4qn2.js +0 -1
- package/bin/chunk-z9560a6e.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "A fullstack AI-powered media workspace and workflow engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"zod": "4.4.3"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@shumai-one/shumai-darwin-arm64": "0.3.
|
|
31
|
-
"@shumai-one/shumai-darwin-x64": "0.3.
|
|
32
|
-
"@shumai-one/shumai-linux-arm64": "0.3.
|
|
33
|
-
"@shumai-one/shumai-linux-x64": "0.3.
|
|
34
|
-
"@shumai-one/shumai-win32-arm64": "0.3.
|
|
35
|
-
"@shumai-one/shumai-win32-x64": "0.3.
|
|
30
|
+
"@shumai-one/shumai-darwin-arm64": "0.3.4",
|
|
31
|
+
"@shumai-one/shumai-darwin-x64": "0.3.4",
|
|
32
|
+
"@shumai-one/shumai-linux-arm64": "0.3.4",
|
|
33
|
+
"@shumai-one/shumai-linux-x64": "0.3.4",
|
|
34
|
+
"@shumai-one/shumai-win32-arm64": "0.3.4",
|
|
35
|
+
"@shumai-one/shumai-win32-x64": "0.3.4"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "WatermarkStatus" AS ENUM ('disabled', 'processing', 'ready', 'failed');
|
|
3
|
+
|
|
4
|
+
-- AlterEnum
|
|
5
|
+
ALTER TYPE "WorkflowTaskType" ADD VALUE 'transcode_watermark';
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "share_links" ADD COLUMN "watermark_config_id" TEXT,
|
|
9
|
+
ADD COLUMN "watermark_status" "WatermarkStatus" NOT NULL DEFAULT 'disabled';
|
|
10
|
+
|
|
11
|
+
-- CreateTable
|
|
12
|
+
CREATE TABLE "watermark_configs" (
|
|
13
|
+
"id" TEXT NOT NULL,
|
|
14
|
+
"config" JSONB NOT NULL,
|
|
15
|
+
"hash" TEXT NOT NULL,
|
|
16
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
17
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
18
|
+
|
|
19
|
+
CONSTRAINT "watermark_configs_pkey" PRIMARY KEY ("id")
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
-- CreateTable
|
|
23
|
+
CREATE TABLE "watermark_templates" (
|
|
24
|
+
"id" TEXT NOT NULL,
|
|
25
|
+
"name" TEXT NOT NULL,
|
|
26
|
+
"config" JSONB NOT NULL,
|
|
27
|
+
"team_id" TEXT,
|
|
28
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
29
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
30
|
+
|
|
31
|
+
CONSTRAINT "watermark_templates_pkey" PRIMARY KEY ("id")
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
-- CreateTable
|
|
35
|
+
CREATE TABLE "watermark_files" (
|
|
36
|
+
"id" TEXT NOT NULL,
|
|
37
|
+
"asset_id" TEXT NOT NULL,
|
|
38
|
+
"watermark_config_id" TEXT NOT NULL,
|
|
39
|
+
"media" JSONB,
|
|
40
|
+
"status" "WorkflowTaskStatus" NOT NULL DEFAULT 'pending',
|
|
41
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
42
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
43
|
+
|
|
44
|
+
CONSTRAINT "watermark_files_pkey" PRIMARY KEY ("id")
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
-- CreateIndex
|
|
48
|
+
CREATE UNIQUE INDEX "watermark_configs_hash_key" ON "watermark_configs"("hash");
|
|
49
|
+
|
|
50
|
+
-- CreateIndex
|
|
51
|
+
CREATE INDEX "watermark_templates_team_id_idx" ON "watermark_templates"("team_id");
|
|
52
|
+
|
|
53
|
+
-- CreateIndex
|
|
54
|
+
CREATE INDEX "watermark_files_watermark_config_id_idx" ON "watermark_files"("watermark_config_id");
|
|
55
|
+
|
|
56
|
+
-- CreateIndex
|
|
57
|
+
CREATE UNIQUE INDEX "watermark_files_asset_id_watermark_config_id_key" ON "watermark_files"("asset_id", "watermark_config_id");
|
|
58
|
+
|
|
59
|
+
-- AddForeignKey
|
|
60
|
+
ALTER TABLE "share_links" ADD CONSTRAINT "share_links_watermark_config_id_fkey" FOREIGN KEY ("watermark_config_id") REFERENCES "watermark_configs"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
61
|
+
|
|
62
|
+
-- AddForeignKey
|
|
63
|
+
ALTER TABLE "watermark_templates" ADD CONSTRAINT "watermark_templates_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
64
|
+
|
|
65
|
+
-- AddForeignKey
|
|
66
|
+
ALTER TABLE "watermark_files" ADD CONSTRAINT "watermark_files_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
67
|
+
|
|
68
|
+
-- AddForeignKey
|
|
69
|
+
ALTER TABLE "watermark_files" ADD CONSTRAINT "watermark_files_watermark_config_id_fkey" FOREIGN KEY ("watermark_config_id") REFERENCES "watermark_configs"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "WatermarkFileStatus" AS ENUM ('pending', 'processing', 'completed', 'failed');
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "watermark_files" ALTER COLUMN "status" DROP DEFAULT;
|
|
6
|
+
ALTER TABLE "watermark_files" ALTER COLUMN "status" TYPE "WatermarkFileStatus" USING ("status"::text::"WatermarkFileStatus");
|
|
7
|
+
ALTER TABLE "watermark_files" ALTER COLUMN "status" SET DEFAULT 'pending';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
-- Data cleanup: remove legacy media JSON fields that are no longer used.
|
|
2
|
+
--
|
|
3
|
+
-- WebUI now displays transcoded proxies only and never falls back to the raw
|
|
4
|
+
-- original file:
|
|
5
|
+
-- 1. Drop the raw-original marker entries (`isRaw: true`) from
|
|
6
|
+
-- videoTranscodes / imageTranscodes. They pointed at the original file
|
|
7
|
+
-- key and were only consumed by the removed display fallbacks and the
|
|
8
|
+
-- download-menu entries, which now use media.original.key directly.
|
|
9
|
+
-- 2. Strip the now-removed `isRaw` field from remaining transcode entries.
|
|
10
|
+
-- 3. Drop `original.downloadUrl` (removed from the AssetInfo DTO; downloads
|
|
11
|
+
-- resolve a fresh presigned URL from `key` via the download-url APIs).
|
|
12
|
+
|
|
13
|
+
UPDATE "assets"
|
|
14
|
+
SET "media" = jsonb_set(
|
|
15
|
+
jsonb_set(
|
|
16
|
+
CASE WHEN jsonb_typeof("media"->'original') = 'object'
|
|
17
|
+
THEN "media" #- '{original,downloadUrl}'
|
|
18
|
+
ELSE "media" END,
|
|
19
|
+
'{videoTranscodes}',
|
|
20
|
+
COALESCE(
|
|
21
|
+
(SELECT jsonb_agg(elem - 'isRaw')
|
|
22
|
+
FROM jsonb_array_elements("media"->'videoTranscodes') elem
|
|
23
|
+
WHERE jsonb_typeof(elem) = 'object'
|
|
24
|
+
AND NOT COALESCE((elem->>'isRaw')::boolean, false)),
|
|
25
|
+
'[]'::jsonb
|
|
26
|
+
)
|
|
27
|
+
),
|
|
28
|
+
'{imageTranscodes}',
|
|
29
|
+
COALESCE(
|
|
30
|
+
(SELECT jsonb_agg(elem - 'isRaw')
|
|
31
|
+
FROM jsonb_array_elements("media"->'imageTranscodes') elem
|
|
32
|
+
WHERE jsonb_typeof(elem) = 'object'
|
|
33
|
+
AND NOT COALESCE((elem->>'isRaw')::boolean, false)),
|
|
34
|
+
'[]'::jsonb
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
WHERE "media" IS NOT NULL
|
|
38
|
+
AND (
|
|
39
|
+
(jsonb_typeof("media"->'original') = 'object' AND "media"->'original' ? 'downloadUrl')
|
|
40
|
+
OR EXISTS (
|
|
41
|
+
SELECT 1 FROM jsonb_array_elements(COALESCE("media"->'videoTranscodes', '[]'::jsonb)) e
|
|
42
|
+
WHERE jsonb_typeof(e) = 'object' AND e ? 'isRaw'
|
|
43
|
+
)
|
|
44
|
+
OR EXISTS (
|
|
45
|
+
SELECT 1 FROM jsonb_array_elements(COALESCE("media"->'imageTranscodes', '[]'::jsonb)) e
|
|
46
|
+
WHERE jsonb_typeof(e) = 'object' AND e ? 'isRaw'
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
-- Same cleanup for watermarked proxy media.
|
|
51
|
+
UPDATE "watermark_files"
|
|
52
|
+
SET "media" = jsonb_set(
|
|
53
|
+
jsonb_set(
|
|
54
|
+
CASE WHEN jsonb_typeof("media"->'original') = 'object'
|
|
55
|
+
THEN "media" #- '{original,downloadUrl}'
|
|
56
|
+
ELSE "media" END,
|
|
57
|
+
'{videoTranscodes}',
|
|
58
|
+
COALESCE(
|
|
59
|
+
(SELECT jsonb_agg(elem - 'isRaw')
|
|
60
|
+
FROM jsonb_array_elements("media"->'videoTranscodes') elem
|
|
61
|
+
WHERE jsonb_typeof(elem) = 'object'
|
|
62
|
+
AND NOT COALESCE((elem->>'isRaw')::boolean, false)),
|
|
63
|
+
'[]'::jsonb
|
|
64
|
+
)
|
|
65
|
+
),
|
|
66
|
+
'{imageTranscodes}',
|
|
67
|
+
COALESCE(
|
|
68
|
+
(SELECT jsonb_agg(elem - 'isRaw')
|
|
69
|
+
FROM jsonb_array_elements("media"->'imageTranscodes') elem
|
|
70
|
+
WHERE jsonb_typeof(elem) = 'object'
|
|
71
|
+
AND NOT COALESCE((elem->>'isRaw')::boolean, false)),
|
|
72
|
+
'[]'::jsonb
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
WHERE "media" IS NOT NULL
|
|
76
|
+
AND (
|
|
77
|
+
(jsonb_typeof("media"->'original') = 'object' AND "media"->'original' ? 'downloadUrl')
|
|
78
|
+
OR EXISTS (
|
|
79
|
+
SELECT 1 FROM jsonb_array_elements(COALESCE("media"->'videoTranscodes', '[]'::jsonb)) e
|
|
80
|
+
WHERE jsonb_typeof(e) = 'object' AND e ? 'isRaw'
|
|
81
|
+
)
|
|
82
|
+
OR EXISTS (
|
|
83
|
+
SELECT 1 FROM jsonb_array_elements(COALESCE("media"->'imageTranscodes', '[]'::jsonb)) e
|
|
84
|
+
WHERE jsonb_typeof(e) = 'object' AND e ? 'isRaw'
|
|
85
|
+
)
|
|
86
|
+
);
|
package/prisma/schema.prisma
CHANGED
|
@@ -106,6 +106,7 @@ enum WorkflowTaskType {
|
|
|
106
106
|
transcode_pdf_pages
|
|
107
107
|
transcode_screenshot
|
|
108
108
|
transcode_image_annotation
|
|
109
|
+
transcode_watermark
|
|
109
110
|
ai_metadata_autofill
|
|
110
111
|
chat
|
|
111
112
|
ai_embedding
|
|
@@ -120,6 +121,20 @@ enum WorkflowTaskStatus {
|
|
|
120
121
|
failed
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
enum WatermarkStatus {
|
|
125
|
+
disabled
|
|
126
|
+
processing
|
|
127
|
+
ready
|
|
128
|
+
failed
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
enum WatermarkFileStatus {
|
|
132
|
+
pending
|
|
133
|
+
processing
|
|
134
|
+
completed
|
|
135
|
+
failed
|
|
136
|
+
}
|
|
137
|
+
|
|
123
138
|
// ----------------------------------------------------------------------
|
|
124
139
|
// Models
|
|
125
140
|
// ----------------------------------------------------------------------
|
|
@@ -241,6 +256,7 @@ model Team {
|
|
|
241
256
|
agents Agent[] @relation("TeamToAgent")
|
|
242
257
|
aiUsages AiUsage[] @relation("TeamToAiUsage")
|
|
243
258
|
auditLogs AuditLog[] @relation("TeamToAuditLog")
|
|
259
|
+
watermarkTemplates WatermarkTemplate[] @relation("TeamToWatermarkTemplate")
|
|
244
260
|
|
|
245
261
|
@@map("teams")
|
|
246
262
|
}
|
|
@@ -351,6 +367,7 @@ model ShareLink {
|
|
|
351
367
|
expireAt DateTime? @map("expire_at")
|
|
352
368
|
password String?
|
|
353
369
|
isDisabled Boolean @default(false) @map("is_disabled")
|
|
370
|
+
allowDownload Boolean @default(true) @map("allow_download")
|
|
354
371
|
defaultSortOrder String? @map("default_sort_order")
|
|
355
372
|
viewMode String? @map("view_mode")
|
|
356
373
|
/// [ShareLinkFieldVisibility]
|
|
@@ -367,9 +384,59 @@ model ShareLink {
|
|
|
367
384
|
creatorId String? @map("creator_id")
|
|
368
385
|
creator User? @relation("UserToShareLink", fields: [creatorId], references: [id])
|
|
369
386
|
|
|
387
|
+
watermarkConfigId String? @map("watermark_config_id")
|
|
388
|
+
watermarkStatus WatermarkStatus @default(disabled) @map("watermark_status")
|
|
389
|
+
watermarkConfig WatermarkConfig? @relation(fields: [watermarkConfigId], references: [id], onDelete: SetNull)
|
|
390
|
+
|
|
370
391
|
@@map("share_links")
|
|
371
392
|
}
|
|
372
393
|
|
|
394
|
+
model WatermarkConfig {
|
|
395
|
+
id String @id @default(ulid())
|
|
396
|
+
/// [WatermarkConfigSpec]
|
|
397
|
+
config Json
|
|
398
|
+
hash String @unique
|
|
399
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
400
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
401
|
+
|
|
402
|
+
shareLinks ShareLink[]
|
|
403
|
+
watermarkFiles WatermarkFile[]
|
|
404
|
+
|
|
405
|
+
@@map("watermark_configs")
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
model WatermarkTemplate {
|
|
409
|
+
id String @id @default(ulid())
|
|
410
|
+
name String
|
|
411
|
+
/// [WatermarkConfigSpec]
|
|
412
|
+
config Json
|
|
413
|
+
teamId String? @map("team_id")
|
|
414
|
+
team Team? @relation("TeamToWatermarkTemplate", fields: [teamId], references: [id], onDelete: Cascade)
|
|
415
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
416
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
417
|
+
|
|
418
|
+
@@index([teamId])
|
|
419
|
+
@@map("watermark_templates")
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
model WatermarkFile {
|
|
423
|
+
id String @id @default(ulid())
|
|
424
|
+
assetId String @map("asset_id")
|
|
425
|
+
watermarkConfigId String @map("watermark_config_id")
|
|
426
|
+
/// [MediaInfo]
|
|
427
|
+
media Json?
|
|
428
|
+
status WatermarkFileStatus @default(pending)
|
|
429
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
430
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
431
|
+
|
|
432
|
+
asset Asset @relation("AssetToWatermarkFile", fields: [assetId], references: [id], onDelete: Cascade)
|
|
433
|
+
watermarkConfig WatermarkConfig @relation(fields: [watermarkConfigId], references: [id], onDelete: Cascade)
|
|
434
|
+
|
|
435
|
+
@@unique([assetId, watermarkConfigId])
|
|
436
|
+
@@index([watermarkConfigId])
|
|
437
|
+
@@map("watermark_files")
|
|
438
|
+
}
|
|
439
|
+
|
|
373
440
|
model Asset {
|
|
374
441
|
id String @id @default(ulid())
|
|
375
442
|
name String @default("")
|
|
@@ -421,6 +488,7 @@ model Asset {
|
|
|
421
488
|
projectShareRoot Project? @relation("ProjectToShareRoot")
|
|
422
489
|
shareLinkRootFolder ShareLink? @relation("ShareLinkToRootFolder")
|
|
423
490
|
agentSessions AgentSession[] @relation("AssetToAgentSession")
|
|
491
|
+
watermarkFiles WatermarkFile[] @relation("AssetToWatermarkFile")
|
|
424
492
|
|
|
425
493
|
@@map("assets")
|
|
426
494
|
@@index([type])
|
package/bin/chunk-1cjgpspz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gg as e}from"./chunk-9a7a1p1j.js";import{Ag as T,nj as v,tj as U}from"./chunk-eczsk2xd.js";var u={human:"human",agent:"agent"};var l={editor:"editor",reviewer:"reviewer"};var x={team:"team",project:"project"};var h={chat:"chat",autofill:"autofill",embedding:"embedding"};var n=e.object({cursor:e.string().optional(),total:e.number().optional(),totalSize:e.number().optional()}),r=e.object({first:e.coerce.number().optional(),after:e.string().optional()});var le=e.object({name:e.string()}),w=e.object({id:e.string(),name:e.string(),rootFolder:e.string().optional(),updatedAt:e.union([e.string(),e.date()])});var me=e.object({data:e.array(w),pageInfo:n}),fe=e.object({teamId:e.string(),userId:e.string()}),de=e.object({id:e.string(),name:e.string(),email:e.string().optional(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),unreadNotificationCount:e.number().optional()}),ge=e.object({name:e.string().optional(),imageKey:e.string().nullable().optional()}),ye=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),email:e.string().optional(),type:e.nativeEnum(u).optional(),image:e.string().optional(),scope:e.nativeEnum(x).optional()}),ue=e.object({includeAgents:e.string().optional().transform((o)=>o==="true")}),C={best_match:"best_match",all:"all"},xe=e.union([e.object({key:e.literal("transcode.videoStrategy"),value:e.nativeEnum(C)})]),he=e.object({allowedDomains:e.array(e.string()),pendingDomains:e.array(e.string()).default([])});var Se=e.object({role:e.enum(["editor","reviewer"])});var S=e.nativeEnum(h),b=e.enum(["off","minimal","low","medium","high","xhigh"]),M=e.object({id:e.string().optional(),skillId:e.string(),skill:e.object({id:e.string(),name:e.string()}).optional()}),je=e.object({id:e.string(),name:e.string(),type:S,enabled:e.boolean(),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:b.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(M).optional(),deniedTools:e.array(e.string()).optional()}),_=e.object({name:e.string().min(1),type:S,enabled:e.boolean().optional().default(!0),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:b.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(e.string()).optional(),deniedTools:e.array(e.string()).optional()}),ke=_.superRefine((o,a)=>{if(o.type==="chat"||o.type==="autofill"){if(!o.providerId)a.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!o.modelId)a.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),Ie=_.superRefine((o,a)=>{if(o.type==="chat"||o.type==="autofill"){if(!o.providerId)a.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!o.modelId)a.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),qe=e.object({id:e.string(),sessionId:e.string(),entry:e.unknown()}),Te=e.object({id:e.string(),name:e.string().nullable().optional(),type:e.string(),createdAt:e.string(),creator:e.object({id:e.string(),name:e.string().nullable().optional(),email:e.string().nullable().optional(),image:e.string().nullable().optional()}).nullable().optional(),agentId:e.string().optional()});var Pe=e.object({apiKey:e.string().optional(),baseUrl:e.string().optional(),chatModels:e.array(e.string()).optional()}),F=e.enum(["1h","24h","7d","30d"]),we=e.object({timeframe:F.default("30d"),userId:e.string().optional()});var Ne=e.object({data:e.array(e.lazy(()=>V)),pageInfo:n}),R=e.object({proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),thumbnailUrl:e.string().optional(),originalHeight:e.number().optional(),originalWidth:e.number().optional(),spriteUrl:e.string().optional(),duration:e.number().optional(),pageCount:e.number().optional()}),N=e.object({type:e.string().nullable(),preview:R.nullable()}),s=e.object({id:e.string(),name:e.string(),image:e.string().optional()}),L=e.object({fieldId:e.string(),value:e.any()}),E=e.object({id:e.string(),name:e.string()}),O=e.object({duration:e.number().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional(),frameRate:e.number().optional(),totalFrames:e.number().optional(),startTimecode:e.string().optional()}),V=e.object({id:e.string(),name:e.string(),sizeByte:e.number(),fileCount:e.number(),type:e.string(),targetType:e.string().optional().nullable(),status:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),latestChildren:e.array(N).optional(),preview:R.nullable().optional(),createdAt:e.string(),updatedAt:e.string(),deletedAt:e.string().nullable().optional(),projectId:e.string().optional().nullable(),creator:s.nullable().optional(),fieldValues:e.array(L).optional(),sortIndex:e.string().optional().nullable(),startTime:e.number().optional().nullable(),endTime:e.number().optional().nullable(),media:e.object({original:e.object({downloadUrl:e.string(),key:e.string().optional()}).optional(),videoTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number(),isRaw:e.boolean()})).optional(),imageTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number(),isRaw:e.boolean()})).optional(),videoPreview:e.object({url:e.string(),key:e.string().optional()}).optional(),pdfTranscode:e.object({url:e.string(),key:e.string().optional()}).optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),metadata:O.optional()}).optional(),ancestorFolders:e.array(E).optional(),versionStack:e.object({id:e.string(),versions:e.array(e.object({version:e.number(),current:e.boolean(),id:e.string(),name:e.string().optional().nullable(),previewUrl:e.string().optional().nullable(),creator:e.object({id:e.string(),name:e.string().nullable()}).nullable().optional()}))}).optional().nullable()}),Le=e.object({name:e.string(),type:e.string(),projectId:e.string().optional(),parentId:e.string().optional(),key:e.string().optional(),sizeByte:e.number().optional(),contentType:e.string().optional(),creatorId:e.string().optional()}),Ee=e.object({assetId:e.string()}),Oe=e.object({id:e.string(),name:e.string()}),Ve=e.object({assetId:e.string().optional(),assetType:e.string(),projectId:e.string().optional(),showDeleted:e.boolean().optional(),prefix:e.string().optional(),sort:e.string().optional(),order:e.string().optional(),...r.shape}),Qe=e.object({assetId:e.string(),userId:e.string(),replyToId:e.string().optional(),message:e.string(),annotations:e.any().optional(),second:e.number().optional(),attachmentIds:e.array(e.string())}),Q=e.object({id:e.string(),assetId:e.string(),url:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional()}),K=e.object({id:e.string(),assetId:e.string(),message:e.string().nullable(),annotations:e.any(),second:e.number().nullable(),creator:s,replies:e.array(e.lazy(()=>K)),attachments:e.array(Q),mentions:e.array(s),createdAt:e.string(),updatedAt:e.string(),sessionId:e.string().nullable(),isCompleted:e.boolean(),completionLastChangedBy:s.nullable()}),Ke=e.object({isCompleted:e.boolean()}),We=e.object({newParentId:e.string(),assetIds:e.array(e.string()),creatorId:e.string().optional()}),Be=e.object({newParentId:e.string(),assetIds:e.array(e.string()),withComments:e.boolean().default(!1),creatorId:e.string().optional()}),De=e.object({name:e.string()}),Ze=e.object({beforeIndex:e.string().optional(),afterIndex:e.string().optional()}),Ge=e.object({ids:e.array(e.string())}),Je=e.object({ids:e.array(e.string())}),Ye=e.object({file:e.instanceof(File)}),He=e.object({key:e.string()}),Xe=e.object({fileName:e.string(),contentType:e.string(),size:e.number()}),$e=e.object({id:e.string(),uploadUrl:e.string()}),Ae=e.object({ids:e.array(e.string())}),W=e.object({id:e.string(),name:e.string(),url:e.string()}),ze=e.object({files:e.array(W)});var ot=e.object({userCount:e.number()}),rt=e.object({name:e.string().min(1,"Name is required").max(100,"Name is too long")}),at=e.object({id:e.string(),token:e.string(),name:e.string(),createdAt:e.string()});var B=e.enum(["is","eq","neq","gt","gte","lt","lte","contains","notContains","isEmpty","isNotEmpty","in","notIn","hasAny","hasAll","hasNone","isWithin"]),D=e.object({field:e.string(),operator:B,value:e.any()}),Z=e.enum(["asc","desc"]),G=e.object({field:e.string(),order:Z}),J=e.enum(["AND","OR"]),Y=e.enum(["file","folder"]),m=e.object({operator:J.optional().default("AND"),conditions:e.array(D).optional().default([]),sort:G.optional(),assetType:Y.optional(),showSymlink:e.boolean().optional(),recursively:e.boolean().optional().default(!0),query:e.string().optional(),isSemantic:e.boolean().optional().default(!1)}),pt=m.extend(r.shape);var f=e.object({sourceFolderId:e.string(),searchFilter:m}),H=e.object({id:e.string(),name:e.string(),filter:f,projectId:e.string(),createdAt:e.string(),updatedAt:e.string(),creator:e.object({id:e.string(),name:e.string(),image:e.string().optional().nullable()}).optional().nullable()}),dt=e.object({name:e.string(),filter:f}),gt=e.object({name:e.string().optional(),filter:f.optional()});var yt=e.object({data:e.array(H),pageInfo:e.object({cursor:e.string().optional(),total:e.number().optional()})});var ht=e.object({name:e.string(),parentId:e.string()}),St=e.object({name:e.string()}),bt=e.object({ids:e.array(e.string())}),_t=e.object({ids:e.array(e.string())});var It=e.object({code:e.string(),role:e.string(),teamId:e.string(),teamName:e.string(),projectId:e.string().optional(),projectName:e.string().optional(),inviterName:e.string(),isUsed:e.boolean()}),qt=e.object({role:e.nativeEnum(l)}),Tt=e.object({role:e.nativeEnum(l)}),vt=e.object({code:e.string()});var Mt={text:"text",longText:"longText",select:"select",selectMulti:"selectMulti",rating:"rating",number:"number",toggle:"toggle",date:"date",user:"user",userMulti:"userMulti"},Ft=e.object({id:e.string(),displayName:e.string(),color:e.string().optional()}),d=e.object({name:e.string(),type:e.enum(["text","longText","select","selectMulti","rating","number","toggle","date","user","userMulti"]),text:e.any().optional(),longText:e.any().optional(),select:e.any().optional(),selectMulti:e.any().optional(),rating:e.any().optional(),number:e.any().optional(),toggle:e.any().optional(),date:e.any().optional(),user:e.any().optional(),userMulti:e.any().optional()}),Nt=e.object({key:e.string().optional(),label:e.string().optional(),scope:e.string().optional(),config:d,aiAutofill:e.boolean().default(!1),description:e.string().default("")}),Lt=e.object({label:e.string().optional(),config:d,aiAutofill:e.boolean().optional(),description:e.string().optional()}),X=e.object({fieldId:e.string(),visible:e.boolean()}),Et=e.array(X),$=e.object({key:e.string(),value:e.any()}),Ot=e.array($),Vt=e.object({id:e.string(),config:d,scope:e.string(),readOnly:e.boolean(),visible:e.boolean(),description:e.string(),aiAutofill:e.boolean()});var j=e.object({id:e.string().optional(),name:e.string().optional(),role:e.string().optional()}),k=e.object({id:e.string().optional(),name:e.string().optional()}),A=e.object({id:e.string().optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),name:e.string().optional(),preview:e.string().optional(),thumbnailUrl:e.string().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional()}),Wt=e.object({id:e.string().optional(),creator:j.optional(),type:e.string().optional(),team:k.optional(),project:k.optional(),asset:A.optional(),user:j.optional(),createdAt:e.string().optional(),isRead:e.boolean().optional()}),Bt=e.object({unreadOnly:e.union([e.boolean(),e.string()]).transform((o)=>o===!0||o==="true").optional(),after:e.string().optional(),pageSize:e.coerce.number().optional()}),Dt=e.object({notificationId:e.string().min(1)}),Zt=e.object({comments:e.boolean().default(!0),replies:e.boolean().default(!0),mentions:e.boolean().default(!0),yourUploads:e.boolean().default(!1),otherUploads:e.boolean().default(!0),statusUpdates:e.boolean().default(!0)});var Ht=e.object({name:e.string(),coverImageKey:e.string().optional(),enableNotification:e.boolean().default(!0)}),Xt=e.object({name:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean().optional()}),z=e.object({id:e.string(),name:e.string(),teamId:e.string(),rootFolder:e.string().optional(),coverImage:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean(),updatedAt:e.union([e.string(),e.date()])}),$t=e.object({sortBy:e.string().optional(),sortDirection:e.enum(["asc","desc"]).optional()}).merge(r),At=e.object({data:e.array(z),pageInfo:n}),zt=e.object({teamId:e.string()}),eo=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),scope:e.enum(["team","project"]).optional(),hasCustomRole:e.boolean().optional()}),to=e.object({id:e.string(),name:e.string()}),oo=e.object({assetType:e.string(),sort:e.enum(["createdAt","name","size"]).optional(),order:e.enum(["asc","desc"]).optional()}).merge(r),ro=e.object({role:e.enum(["editor","reviewer"])}),ao=e.object({userId:e.string(),role:e.enum(["owner","editor","reviewer"])}),no=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional()});var I=["openai-completions","mistral-conversations","openai-responses","azure-openai-responses","openai-codex-responses","anthropic-messages","bedrock-converse-stream","google-generative-ai","google-vertex"],ee=e.object({api:e.enum(I).optional(),reasoning:e.boolean().default(!1),input:e.array(e.enum(["text","image"])).default(["text"]),contextWindow:e.number().int().positive().default(128000),maxTokens:e.number().int().positive().default(4096),cost:e.object({input:e.number().nonnegative().default(0),output:e.number().nonnegative().default(0),cacheRead:e.number().nonnegative().default(0),cacheWrite:e.number().nonnegative().default(0)})}),g=e.object({id:e.string().optional(),modelId:e.string().min(1,"Model ID is required"),name:e.string().min(0).default(""),config:ee}),y=e.object({baseUrl:e.string().url("Must be a valid URL").optional().or(e.literal("")),apiKey:e.string().optional().or(e.literal("")),api:e.enum(I),headers:e.record(e.string(),e.string()).optional(),authHeader:e.boolean().optional()}),po=e.object({name:e.string().min(1,"Provider name is required"),config:y,models:e.array(g).min(1,"At least one model is required")}),co=e.object({config:y,models:e.array(g).min(1,"At least one model is required")}),lo=e.object({id:e.string(),name:e.string(),isBuiltin:e.boolean(),config:y,models:e.array(g).optional(),modelsCount:e.number().optional(),createdAt:e.date(),updatedAt:e.date()});var yo=e.object({name:e.string().min(1),expireAt:e.string().datetime().optional(),password:e.string().optional(),isDisabled:e.boolean().optional(),defaultSortOrder:e.string().optional(),viewMode:e.string().optional()}),uo=e.object({name:e.string().min(1).optional(),expireAt:e.string().datetime().optional().nullable(),password:e.string().optional().nullable(),isDisabled:e.boolean().optional(),defaultSortOrder:e.string().optional().nullable(),viewMode:e.string().optional().nullable(),fieldVisibility:e.record(e.string(),e.boolean()).optional().nullable()}),xo=r.extend({projectId:e.string().optional()}),ho=e.object({assetIds:e.array(e.string().min(1)).min(1)});var _o=e.object({assetId:e.string().optional(),githubUrl:e.string().optional(),override:e.boolean().optional()}),Ro=e.object({config:e.object({environmentVariables:e.array(e.object({name:e.string(),default:e.string().optional()}))})}),jo=e.object({permission:e.enum(["owner","editor","reviewer"])});var q=e.lazy(()=>e.object({name:e.string(),id:e.string(),size:e.number(),children:e.array(q),type:e.string(),mediaType:e.string().optional()})),qo=e.object({parentId:e.string(),files:e.array(q)}),te=e.object({id:e.string(),fileId:e.string(),url:e.string()}),To=e.object({taskId:e.string(),presignedUrls:e.array(te),createdAssets:e.array(e.object({tempId:e.string(),assetId:e.string()})).optional()}),vo=e.object({fileId:e.string(),errorMessage:e.string().optional()}),Uo=e.object({id:e.string(),name:e.string(),total:e.number(),uploaded:e.number(),createdAt:e.string()}),Po=e.object({bucket:e.string(),key:e.string(),Signature:e.string()}),wo=e.object({file:e.instanceof(File)});var oe=e.object({key:e.string(),value:e.unknown()}),Fo=e.object({value:e.unknown()}),No=e.array(oe);var Oo=e.object({fileIds:e.array(e.string())}),Vo=e.object({fileId:e.string(),beforeId:e.string()});var Wo=e.object({agentId:e.string(),textPrompt:e.string().optional(),attachedFiles:e.array(e.string()).optional(),assetIds:e.array(e.string()).optional(),sessionId:e.string().optional(),contextAssetId:e.string().optional(),projectId:e.string().optional()}).superRefine((o,a)=>{let p=o.textPrompt&&o.textPrompt.trim().length>0,c=o.attachedFiles&&o.attachedFiles.length>0,P=o.assetIds&&o.assetIds.length>0;if(!p&&!c&&!P)a.addIssue({code:e.ZodIssueCode.custom,message:"At least one of textPrompt, attachedFiles, or assetIds must be provided.",path:["textPrompt"]})}),Bo=e.object({id:e.string(),agentId:e.string(),userId:e.string().nullable(),assetId:e.string().nullable(),userCommentId:e.string().nullable(),name:e.string().nullable().optional(),createdAt:e.string(),updatedAt:e.string()}),Do=e.intersection(e.object({id:e.string()}),e.unknown());var i;((t)=>{t.team_create="team_create";t.team_update="team_update";t.team_delete="team_delete";t.team_member_add="team_member_add";t.team_member_update="team_member_update";t.team_member_remove="team_member_remove";t.project_create="project_create";t.project_update="project_update";t.project_delete="project_delete";t.project_empty_trash="project_empty_trash";t.project_member_add="project_member_add";t.project_member_update="project_member_update";t.project_member_remove="project_member_remove";t.file_create="file_create";t.file_update="file_update";t.file_delete="file_delete";t.folder_create="folder_create";t.folder_update="folder_update";t.folder_delete="folder_delete";t.asset_reparent="asset_reparent";t.asset_copy="asset_copy";t.share_create="share_create";t.share_update="share_update";t.share_delete="share_delete";t.agent_create="agent_create";t.agent_update="agent_update";t.agent_delete="agent_delete";t.skill_create="skill_create";t.skill_update="skill_update";t.skill_delete="skill_delete";t.provider_create="provider_create";t.provider_update="provider_update";t.provider_delete="provider_delete";t.invite_create="invite_create";t.invite_revoke="invite_revoke";t.metadata_field_create="metadata_field_create";t.metadata_field_update="metadata_field_update";t.metadata_field_delete="metadata_field_delete";t.comment_create="comment_create";t.comment_update="comment_update";t.comment_delete="comment_delete";t.comment_complete="comment_complete"})(i||={});var re=e.object({id:e.string(),action:e.nativeEnum(i),teamId:e.string(),userId:e.string().nullable().optional(),projectId:e.string().nullable().optional(),itemId:e.string().nullable().optional(),createdAt:e.string()}),Jo=e.object({first:e.coerce.number().optional(),after:e.string().optional(),actions:e.union([e.nativeEnum(i),e.array(e.nativeEnum(i))]).transform((o)=>Array.isArray(o)?o:[o]).optional(),userIds:e.union([e.string(),e.array(e.string())]).transform((o)=>Array.isArray(o)?o:[o]).optional(),itemId:e.string().optional()}),Yo=e.object({nodes:e.array(re),pageInfo:e.object({hasNextPage:e.boolean(),endCursor:e.string().nullable()}),total:e.number()});function _r({className:o,orientation:a="horizontal",decorative:p=!0,...c}){return T(v.Root,{"data-slot":"separator",decorative:p,orientation:a,className:U("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",o),...c})}
|
|
2
|
-
export{b as Ua,Mt as Va,I as Wa,g as Xa,y as Ya,C as Za,i as _a,_r as $a};
|
package/bin/chunk-1pgtq4rc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ef as Hf,ff as Jf,gf as Kf,hf as Qf,if as Wf,lf as _f}from"./chunk-mggfc9ya.js";import{rf as Zf,sf as Gf}from"./chunk-vf3bg920.js";import{tf as $f}from"./chunk-xcbb21j9.js";import{wf as Rf,xf as Lf,yf as Vf,zf as Cf}from"./chunk-gpeyctxd.js";import{cg as zf}from"./chunk-57kgmgfs.js";import{ig as Sf,jg as a,kg as Nf,lg as Uf,mg as W,pg as qf,qg as g,rg as p,sg as l,tg as c,vg as Xf}from"./chunk-m268vcdm.js";import{Ag as f,Bg as V,Bj as X,Dh as e,Ih as j,Jh as r,Ng as u,Pg as d,Zh as n,ch as i,ei as o,hi as s,jh as x,li as ff,tj as D,zg as O}from"./chunk-eczsk2xd.js";function Yf({teamId:K,projectId:L,projectName:_,ancestorFolders:B,currentAsset:U,isRootFolder:Y,displayStyle:E,onDisplayStyleChange:h,isLeftSidebarCollapsed:P,onLeftSidebarToggle:T,isRightSidebarCollapsed:$,onRightSidebarToggle:v,isChatbotOpen:Z=!1,onChatbotToggle:N,isPublic:Q=!1,onFolderClick:w,fileId:q,shareId:G,downloadInfo:z,versions:S,compareMode:J=!1,canCompareVersions:b=!1,onCompareVersions:A}){let k=u(),{canEdit:y}=Xf(L),I=!1,m=(R)=>{if(!q)return;if(Q&&G){k({to:"/share/$shareId/files/$fileId",params:{shareId:G,fileId:q},search:(C)=>({...C,version:R})});return}if(!L)return;k({to:"/projects/$projectId/files/$fileId",params:{projectId:L,fileId:q},search:(C)=>({...C,version:R})})},M=async(R)=>{if(!q)return;try{let C=G?await i.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:G,fileId:q},json:{key:R}}):await i.api.files["download-url"].$post({json:{key:R,assetId:q}});if(!C.ok)return;let{url:H}=await C.json(),F=document.createElement("a");F.href=H,F.download="",document.body.appendChild(F),F.click(),document.body.removeChild(F)}catch{}},Bf=U.proxyType!=="audio"&&z?.videoTranscodes&&z.videoTranscodes.filter((R)=>!R.isRaw).length>0,Ef=Q?[{name:_,id:"root"},...B.slice().reverse().map((R)=>({name:R.name||"",id:R.id}))]:[{name:X.all_projects(),path:`/teams/${K}`,isMuted:!0},{name:_,path:`/projects/${L}`},...B.slice().reverse().map((R)=>({name:R.name||"",path:`/projects/${L}/folders/${R.id}`}))];return V("div",{className:"flex h-14 flex-wrap items-center justify-between gap-2 border-b border-border bg-card px-4 py-2",children:[V("div",{className:"flex min-w-0 flex-shrink items-center gap-1",children:[Ef.map((R,C)=>V("div",{className:"flex items-center gap-1",children:[C>0&&f("span",{className:"text-muted-foreground",children:"/"}),R.path?f(d,{to:R.path,className:D("truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",R.isMuted?"text-muted-foreground":"text-foreground"),children:R.name}):f("button",{onClick:()=>R.id&&w?.(R.id),className:"truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground text-foreground",children:R.name})]},C)),!Y&&!J&&V("div",{className:"flex items-center gap-1",children:[f("span",{className:"text-muted-foreground",children:"/"}),U.type==="folder"?f("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:U.name}):V(Sf,{children:[V(Nf,{className:"flex items-center gap-1 truncate rounded px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[f("span",{children:U.name}),U.version!==void 0&&V(zf,{variant:"outline",className:"px-1 py-0 text-xs",children:["v",U.version]}),f(r,{className:"h-4 w-4"})]}),V(Uf,{className:"w-56",children:[Bf?V(p,{children:[f(l,{className:"flex items-center gap-2",children:f("span",{children:X.download()})}),f(a,{children:V(c,{className:"w-48",children:[f(qf,{children:X.download()}),z?.videoTranscodes?.filter((R)=>!R.isRaw).map((R)=>{let C=Math.max(R.width,R.height),H=`${R.height}p`;if(C>=3840)H="2160p";else if(C>=1920)H="1080p";else if(C>=1280)H="720p";else if(C>=960)H="540p";else if(C>=640)H="360p";else if(C>=320)H="180p";return V(W,{onClick:()=>M(R.key),className:"flex items-center justify-between",children:[f("span",{children:H}),f("span",{className:"text-xs text-muted-foreground",children:"MP4"})]},H)}),z?.originalKey&&V(O,{children:[f(g,{}),V(W,{onClick:()=>M(z.originalKey),className:"flex items-center justify-between",children:[f("span",{children:"Original"}),f("span",{className:"text-xs text-muted-foreground",children:U.name?.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):f(W,{onClick:()=>z?.originalKey&&M(z.originalKey),disabled:!z?.originalKey,children:X.download()}),y&&f(W,{onClick:()=>console.log("Rename"),children:"Rename"}),y&&f(W,{onClick:()=>console.log("Delete"),children:"Delete"}),b&&A&&V(O,{children:[f(g,{}),V(W,{onClick:()=>A(),children:[f(x,{className:"h-4 w-4"}),f("span",{children:X.compare_versions()})]})]}),S&&S.length>0&&V(O,{children:[f(g,{}),V(p,{children:[V(l,{className:"flex items-center gap-2",children:[f(o,{className:"h-4 w-4"}),f("span",{children:"Versions"})]}),f(a,{children:V(c,{className:"w-80 p-1",children:[f("div",{className:"flex flex-col gap-1 max-h-96 overflow-y-auto",children:S.map((R)=>{let C=U.version===R.version;return V(W,{onClick:()=>m(R.id),className:"flex items-center gap-3 py-2 px-3 rounded-md cursor-pointer focus:bg-accent focus:text-accent-foreground",children:[V("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted dark:bg-muted-foreground/20 text-muted-foreground dark:text-muted-foreground rounded-full px-2 py-0.5 text-xs font-semibold select-none min-w-[2rem]",children:["v",R.version]}),f("div",{className:"h-10 w-16 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:R.previewUrl?f("img",{src:R.previewUrl,alt:R.name||void 0,className:"h-full w-full object-cover"}):f(n,{className:"h-4 w-4 text-muted-foreground"})}),V("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[f("span",{className:"truncate text-sm font-semibold text-foreground",children:R.name}),f("span",{className:"truncate text-xs text-muted-foreground",children:R.creator?.name||"Unknown"})]}),C&&f(j,{className:"h-4 w-4 text-primary ml-auto flex-shrink-0"})]},R.id)})}),f(g,{}),f("div",{className:"p-1",children:f("button",{className:"w-full text-center text-xs font-medium py-2 px-3 rounded-md bg-muted/80 hover:bg-muted text-foreground transition-colors",onClick:()=>console.log("Manage versions"),children:"Manage versions..."})})]})})]})]})]})]})]})]}),V("div",{className:"flex items-center gap-2",children:[V("div",{className:"flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background p-1",children:[!q&&!Q&&T&&f("button",{onClick:T,className:"rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",title:P?"Show Left Sidebar":"Hide Left Sidebar",children:P?f(Hf,{className:"h-4 w-4"}):f(Kf,{className:"h-4 w-4 fill-primary stroke-0"})}),!q&&!Q&&E&&h&&V(O,{children:[f("button",{onClick:()=>h("card"),className:`rounded p-1.5 transition-colors ${E==="card"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"Card View",children:f(s,{className:"h-4 w-4"})}),f("button",{onClick:()=>h("list"),className:`rounded p-1.5 transition-colors ${E==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"List View",children:f(ff,{className:"h-4 w-4"})})]}),f("button",{onClick:v,className:`rounded p-1.5 transition-colors ${!$&&!Z?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:$?"Show Right Sidebar":"Hide Right Sidebar",children:!$&&!Z?f(Qf,{className:"h-4 w-4 fill-primary stroke-0"}):f(Jf,{className:"h-4 w-4"})})]}),!Q&&N&&f(Rf,{children:V(Lf,{children:[f(Vf,{asChild:!0,children:f("span",{children:f("button",{disabled:!1,onClick:N,className:D("h-9 w-9 flex items-center justify-center rounded-full border border-border bg-background transition-colors",Z?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground",!1),children:Z?f(Wf,{className:"h-6 w-6 text-primary transition-colors"}):f(e,{className:"h-6 w-6 text-muted-foreground transition-colors"})})})}),f(Cf,{children:f("p",{children:Z?X.hide_chatbot():X.show_chatbot()})})]})})]})]})}function cf(){let{projectState:K}=Zf(),L=$f(),{isChatbotOpen:_,setIsChatbotOpen:B}=Gf();if(!K)return f(hf,{});let{teamId:U,projectId:Y,projectName:E,ancestorFolders:h,currentAsset:P,isRootFolder:T,fileId:$,downloadInfo:v,versions:Z,isPublic:N,shareId:Q,onFolderClick:w,compareMode:q,canCompareVersions:G,onCompareVersions:z}=K,S=!!$,J=!!Q&&!S,b=S?L.fileViewLeftSidebarCollapsed:J?L.shareConfigLeftSidebarCollapsed:L.fileListLeftSidebarCollapsed,A=N?void 0:()=>S?L.setFileViewLeftSidebarCollapsed(!L.fileViewLeftSidebarCollapsed):J?L.setShareConfigLeftSidebarCollapsed(!L.shareConfigLeftSidebarCollapsed):L.setFileListLeftSidebarCollapsed(!L.fileListLeftSidebarCollapsed),k=N&&K.isRightSidebarCollapsed!==void 0?K.isRightSidebarCollapsed:S?L.fileViewRightSidebarCollapsed:J?L.shareConfigRightSidebarCollapsed:L.fileListRightSidebarCollapsed,y=N&&K.onRightSidebarToggle?K.onRightSidebarToggle:()=>{if(!N&&_)if(B(!1),S)L.setFileViewRightSidebarCollapsed(!1);else if(J)L.setShareConfigRightSidebarCollapsed(!1);else L.setFileListRightSidebarCollapsed(!1);else if(S)L.setFileViewRightSidebarCollapsed(!L.fileViewRightSidebarCollapsed);else if(J)L.setShareConfigRightSidebarCollapsed(!L.shareConfigRightSidebarCollapsed);else L.setFileListRightSidebarCollapsed(!L.fileListRightSidebarCollapsed)},I=N?void 0:()=>{B(!_)},m=Y?L.viewModes[Y]??"card":"card";return f(Yf,{teamId:U,projectId:Y,projectName:E,ancestorFolders:h,currentAsset:P,isRootFolder:T,displayStyle:S||J?void 0:m,onDisplayStyleChange:S||J?void 0:N?void 0:(t)=>{if(Y)L.setViewMode(Y,t)},isLeftSidebarCollapsed:b,onLeftSidebarToggle:A,isRightSidebarCollapsed:k,onRightSidebarToggle:y,isChatbotOpen:!N&&_,onChatbotToggle:I,isPublic:N,shareId:Q,fileId:$,downloadInfo:v,versions:Z,onFolderClick:w,compareMode:q,canCompareVersions:G,onCompareVersions:z})}function hf(){return f("div",{className:"flex h-14 flex-wrap items-center justify-center gap-2 border-b border-border bg-card px-4 py-2 flex-shrink-0",children:f(_f,{className:"w-10 h-10 text-orange-600"})})}
|
|
2
|
-
export{cf as Ke};
|
package/bin/chunk-4v5ykazp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V}from"./chunk-41m51y08.js";import"./chunk-7436fyrg.js";import"./chunk-v0xbr5e6.js";import"./chunk-c0c88nje.js";import"./chunk-fwqpq2sy.js";import"./chunk-a8daqpfh.js";import"./chunk-804ndet8.js";import"./chunk-9g6vy76b.js";import"./chunk-wpntb95k.js";import"./chunk-pdajhyqm.js";import"./chunk-5vwkfxy7.js";import"./chunk-3gcnj1eq.js";import"./chunk-8a75zqbz.js";import"./chunk-1cjgpspz.js";import"./chunk-x0r8dcq0.js";import"./chunk-p8enen2a.js";import"./chunk-tc7q988r.js";import"./chunk-yj6tmjsc.js";import{Le as U}from"./chunk-g097058z.js";import{Ne as N}from"./chunk-3823qzr0.js";import"./chunk-mggfc9ya.js";import"./chunk-v75fanse.js";import"./chunk-vf3bg920.js";import"./chunk-xcbb21j9.js";import"./chunk-ey7vty63.js";import"./chunk-gpeyctxd.js";import"./chunk-9sdhdhv4.js";import"./chunk-2jvqhps9.js";import"./chunk-57kgmgfs.js";import"./chunk-9a7a1p1j.js";import"./chunk-wtzkfwmx.js";import{ug as K}from"./chunk-m268vcdm.js";import{Ag as q,Fg as D,Gg as G,Sg as H,ch as J,yg as Z}from"./chunk-eczsk2xd.js";import{Fk as Y}from"./chunk-t15a1vp6.js";var W=Y(Z(),1);function _(){let{projectId:h}=$.useParams(),{teamId:v,ensureTeamIdForProject:w}=K();W.useEffect(()=>{w(h)},[h,w]);let{data:A}=G(U(h)),b=A?.rootFolder,{data:X}=D({queryKey:["folders",b],queryFn:async()=>{let B=await J.api.folders[":folderId"].$get({param:{folderId:b}});if(!B.ok)throw Error("failed to fetch folder");return await B.json()},enabled:!!b});if(!v||!b||!X)return q(N,{});return q(V,{teamId:v,projectId:h,projectName:A.name??"",assetId:b,rootFolderId:b})}var $=H("/projects/$projectId/")({component:_});export{$ as Route};
|
package/bin/chunk-5x3vzer8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V}from"./chunk-41m51y08.js";import"./chunk-7436fyrg.js";import"./chunk-v0xbr5e6.js";import"./chunk-c0c88nje.js";import"./chunk-fwqpq2sy.js";import"./chunk-a8daqpfh.js";import"./chunk-804ndet8.js";import"./chunk-9g6vy76b.js";import"./chunk-wpntb95k.js";import"./chunk-pdajhyqm.js";import"./chunk-5vwkfxy7.js";import"./chunk-3gcnj1eq.js";import"./chunk-8a75zqbz.js";import"./chunk-1cjgpspz.js";import"./chunk-x0r8dcq0.js";import"./chunk-p8enen2a.js";import"./chunk-tc7q988r.js";import"./chunk-yj6tmjsc.js";import{Ae as U}from"./chunk-pqxh0cg7.js";import{Ne as N}from"./chunk-3823qzr0.js";import"./chunk-mggfc9ya.js";import"./chunk-v75fanse.js";import"./chunk-vf3bg920.js";import"./chunk-xcbb21j9.js";import"./chunk-ey7vty63.js";import"./chunk-gpeyctxd.js";import"./chunk-9sdhdhv4.js";import"./chunk-2jvqhps9.js";import"./chunk-57kgmgfs.js";import"./chunk-9a7a1p1j.js";import"./chunk-wtzkfwmx.js";import{ug as K}from"./chunk-m268vcdm.js";import{Ag as q,Fg as B,Gg as G,Sg as H,ch as J,yg as Z}from"./chunk-eczsk2xd.js";import{Fk as Y}from"./chunk-t15a1vp6.js";var W=Y(Z(),1);function _(){let{projectId:h}=$.useParams(),{teamId:v,ensureTeamIdForProject:w}=K();W.useEffect(()=>{w(h)},[h,w]);let{data:A}=G(U(h)),b=A?.rootFolder,{data:X}=B({queryKey:["folders",b],queryFn:()=>(async()=>{return await(await J.api.folders[":folderId"].$get({param:{folderId:b}})).json()})(),enabled:!!b});if(!v||!b||!X)return q(N,{});return q(V,{teamId:v,projectId:h,projectName:A.name??"",assetId:"recently-deleted",rootFolderId:b})}var $=H("/projects/$projectId/recently-deleted")({component:_});export{$ as Route};
|
package/bin/chunk-804ndet8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Q as n,R as o,S as s}from"./chunk-wpntb95k.js";import{Aa as h,Ba as J2,Ca as T1,Da as J1,U as v,V as O2,W as P5,X as y0,Y as T2,Z as S5,_ as P2,aa as x2,ca as S2,da as E5,ea as I5,fa as D5,ga as f5,ha as x5,ia as j5,ja as y5,ka as E2,la as I2,ma as D2,na as _5,oa as v5,pa as h5,qa as g5,ra as k1,sa as C1,ta as O1,ua as m5,va as b5,wa as $2,xa as t5,ya as e5,za as $1}from"./chunk-5vwkfxy7.js";import{Va as _}from"./chunk-1cjgpspz.js";import{db as h0}from"./chunk-tc7q988r.js";import{qf as Q2}from"./chunk-vf3bg920.js";import{Bf as P0,Cf as y,Hf as H5,Mf as B0,Rf as k2}from"./chunk-9sdhdhv4.js";import{hg as U0}from"./chunk-wtzkfwmx.js";import{ig as V1,kg as L1,lg as A1,mg as R1}from"./chunk-m268vcdm.js";import{Ag as K,Bg as A,Bj as I,Cg as Y1,Ci as m2,Cj as v0,Gh as K1,Gi as W1,Hg as g2,Hi as G1,Ih as Y2,Jh as F0,Kh as B5,Lh as W5,Mi as o0,Ni as z1,Pi as M1,Rh as G5,Ri as U1,Vi as F1,Wi as w1,Xg as p0,Yg as X5,_i as w0,ch as T0,ci as q1,di as N1,li as B1,qh as Q1,sh as H1,tj as j1,vj as $0,wj as V0,xj as L0,yg as l,yj as A0,zg as X2}from"./chunk-eczsk2xd.js";import{Fk as d}from"./chunk-t15a1vp6.js";var s2=Symbol.for("immer-nothing"),d2=Symbol.for("immer-draftable"),b=Symbol.for("immer-state");function u($,...J){throw Error(`[Immer] minified error nr: ${$}. Full error at: https://bit.ly/3cXEKWf`)}var R0=Object.getPrototypeOf;function N0($){return!!$&&!!$[b]}function Y0($){if(!$)return!1;return r2($)||Array.isArray($)||!!$[d2]||!!$.constructor?.[d2]||O0($)||d0($)}var y1=Object.prototype.constructor.toString(),l2=new WeakMap;function r2($){if(!$||typeof $!=="object")return!1;let J=Object.getPrototypeOf($);if(J===null||J===Object.prototype)return!0;let Z=Object.hasOwnProperty.call(J,"constructor")&&J.constructor;if(Z===Object)return!0;if(typeof Z!=="function")return!1;let X=l2.get(Z);if(X===void 0)X=Function.toString.call(Z),l2.set(Z,X);return X===y1}function m0($,J,Z=!0){if(u0($)===0)(Z?Reflect.ownKeys($):Object.keys($)).forEach((Y)=>{J(Y,$[Y],$)});else $.forEach((X,Y)=>J(Y,X,$))}function u0($){let J=$[b];return J?J.type_:Array.isArray($)?1:O0($)?2:d0($)?3:0}function N2($,J){return u0($)===2?$.has(J):Object.prototype.hasOwnProperty.call($,J)}function a2($,J,Z){let X=u0($);if(X===2)$.set(J,Z);else if(X===3)$.add(Z);else $[J]=Z}function _1($,J){if($===J)return $!==0||1/$===1/J;else return $!==$&&J!==J}function O0($){return $ instanceof Map}function d0($){return $ instanceof Set}function X0($){return $.copy_||$.base_}function B2($,J){if(O0($))return new Map($);if(d0($))return new Set($);if(Array.isArray($))return Array.prototype.slice.call($);let Z=r2($);if(J===!0||J==="class_only"&&!Z){let X=Object.getOwnPropertyDescriptors($);delete X[b];let Y=Reflect.ownKeys(X);for(let q=0;q<Y.length;q++){let Q=Y[q],H=X[Q];if(H.writable===!1)H.writable=!0,H.configurable=!0;if(H.get||H.set)X[Q]={configurable:!0,writable:!0,enumerable:H.enumerable,value:$[Q]}}return Object.create(R0($),X)}else{let X=R0($);if(X!==null&&Z)return{...$};let Y=Object.create(X);return Object.assign(Y,$)}}function U2($,J=!1){if(l0($)||N0($)||!Y0($))return $;if(u0($)>1)Object.defineProperties($,{set:g0,add:g0,clear:g0,delete:g0});if(Object.freeze($),J)Object.values($).forEach((Z)=>U2(Z,!0));return $}function v1(){u(2)}var g0={value:v1};function l0($){if($===null||typeof $!=="object")return!0;return Object.isFrozen($)}var h1={};function Q0($){let J=h1[$];if(!J)u(0,$);return J}var k0;function t2(){return k0}function g1($,J){return{drafts_:[],parent_:$,immer_:J,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function p2($,J){if(J)Q0("Patches"),$.patches_=[],$.inversePatches_=[],$.patchListener_=J}function W2($){G2($),$.drafts_.forEach(m1),$.drafts_=null}function G2($){if($===k0)k0=$.parent_}function i2($){return k0=g1(k0,$)}function m1($){let J=$[b];if(J.type_===0||J.type_===1)J.revoke_();else J.revoked_=!0}function n2($,J){J.unfinalizedDrafts_=J.drafts_.length;let Z=J.drafts_[0];if($!==void 0&&$!==Z){if(Z[b].modified_)W2(J),u(4);if(Y0($)){if($=b0(J,$),!J.parent_)c0(J,$)}if(J.patches_)Q0("Patches").generateReplacementPatches_(Z[b].base_,$,J.patches_,J.inversePatches_)}else $=b0(J,Z,[]);if(W2(J),J.patches_)J.patchListener_(J.patches_,J.inversePatches_);return $!==s2?$:void 0}function b0($,J,Z){if(l0(J))return J;let X=$.immer_.shouldUseStrictIteration(),Y=J[b];if(!Y)return m0(J,(q,Q)=>o2($,Y,J,q,Q,Z),X),J;if(Y.scope_!==$)return J;if(!Y.modified_)return c0($,Y.base_,!0),Y.base_;if(!Y.finalized_){Y.finalized_=!0,Y.scope_.unfinalizedDrafts_--;let q=Y.copy_,Q=q,H=!1;if(Y.type_===3)Q=new Set(q),q.clear(),H=!0;if(m0(Q,(z,G)=>o2($,Y,q,z,G,Z,H),X),c0($,q,!1),Z&&$.patches_)Q0("Patches").generatePatches_(Y,Z,$.patches_,$.inversePatches_)}return Y.copy_}function o2($,J,Z,X,Y,q,Q){if(Y==null)return;if(typeof Y!=="object"&&!Q)return;let H=l0(Y);if(H&&!Q)return;if(N0(Y)){let z=q&&J&&J.type_!==3&&!N2(J.assigned_,X)?q.concat(X):void 0,G=b0($,Y,z);if(a2(Z,X,G),N0(G))$.canAutoFreeze_=!1;else return}else if(Q)Z.add(Y);if(Y0(Y)&&!H){if(!$.immer_.autoFreeze_&&$.unfinalizedDrafts_<1)return;if(J&&J.base_&&J.base_[X]===Y&&H)return;if(b0($,Y),(!J||!J.scope_.parent_)&&typeof X!=="symbol"&&(O0(Z)?Z.has(X):Object.prototype.propertyIsEnumerable.call(Z,X)))c0($,Y)}}function c0($,J,Z=!1){if(!$.parent_&&$.immer_.autoFreeze_&&$.canAutoFreeze_)U2(J,Z)}function b1($,J){let Z=Array.isArray($),X={type_:Z?1:0,scope_:J?J.scope_:t2(),modified_:!1,finalized_:!1,assigned_:{},parent_:J,base_:$,draft_:null,copy_:null,revoke_:null,isManual_:!1},Y=X,q=F2;if(Z)Y=[X],q=C0;let{revoke:Q,proxy:H}=Proxy.revocable(Y,q);return X.draft_=H,X.revoke_=Q,H}var F2={get($,J){if(J===b)return $;let Z=X0($);if(!N2(Z,J))return c1($,Z,J);let X=Z[J];if($.finalized_||!Y0(X))return X;if(X===K2($.base_,J))return q2($),$.copy_[J]=M2(X,$);return X},has($,J){return J in X0($)},ownKeys($){return Reflect.ownKeys(X0($))},set($,J,Z){let X=e2(X0($),J);if(X?.set)return X.set.call($.draft_,Z),!0;if(!$.modified_){let Y=K2(X0($),J),q=Y?.[b];if(q&&q.base_===Z)return $.copy_[J]=Z,$.assigned_[J]=!1,!0;if(_1(Z,Y)&&(Z!==void 0||N2($.base_,J)))return!0;q2($),z2($)}if($.copy_[J]===Z&&(Z!==void 0||(J in $.copy_))||Number.isNaN(Z)&&Number.isNaN($.copy_[J]))return!0;return $.copy_[J]=Z,$.assigned_[J]=!0,!0},deleteProperty($,J){if(K2($.base_,J)!==void 0||J in $.base_)$.assigned_[J]=!1,q2($),z2($);else delete $.assigned_[J];if($.copy_)delete $.copy_[J];return!0},getOwnPropertyDescriptor($,J){let Z=X0($),X=Reflect.getOwnPropertyDescriptor(Z,J);if(!X)return X;return{writable:!0,configurable:$.type_!==1||J!=="length",enumerable:X.enumerable,value:Z[J]}},defineProperty(){u(11)},getPrototypeOf($){return R0($.base_)},setPrototypeOf(){u(12)}},C0={};m0(F2,($,J)=>{C0[$]=function(){return arguments[0]=arguments[0][0],J.apply(this,arguments)}});C0.deleteProperty=function($,J){return C0.set.call(this,$,J,void 0)};C0.set=function($,J,Z){return F2.set.call(this,$[0],J,Z,$[0])};function K2($,J){let Z=$[b];return(Z?X0(Z):$)[J]}function c1($,J,Z){let X=e2(J,Z);return X?"value"in X?X.value:X.get?.call($.draft_):void 0}function e2($,J){if(!(J in $))return;let Z=R0($);while(Z){let X=Object.getOwnPropertyDescriptor(Z,J);if(X)return X;Z=R0(Z)}return}function z2($){if(!$.modified_){if($.modified_=!0,$.parent_)z2($.parent_)}}function q2($){if(!$.copy_)$.copy_=B2($.base_,$.scope_.immer_.useStrictShallowCopy_)}var u1=class{constructor($){if(this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(J,Z,X)=>{if(typeof J==="function"&&typeof Z!=="function"){let q=Z;Z=J;let Q=this;return function(z=q,...G){return Q.produce(z,(M)=>Z.call(this,M,...G))}}if(typeof Z!=="function")u(6);if(X!==void 0&&typeof X!=="function")u(7);let Y;if(Y0(J)){let q=i2(this),Q=M2(J,void 0),H=!0;try{Y=Z(Q),H=!1}finally{if(H)W2(q);else G2(q)}return p2(q,X),n2(Y,q)}else if(!J||typeof J!=="object"){if(Y=Z(J),Y===void 0)Y=J;if(Y===s2)Y=void 0;if(this.autoFreeze_)U2(Y,!0);if(X){let q=[],Q=[];Q0("Patches").generateReplacementPatches_(J,Y,q,Q),X(q,Q)}return Y}else u(1,J)},this.produceWithPatches=(J,Z)=>{if(typeof J==="function")return(Q,...H)=>this.produceWithPatches(Q,(z)=>J(z,...H));let X,Y;return[this.produce(J,Z,(Q,H)=>{X=Q,Y=H}),X,Y]},typeof $?.autoFreeze==="boolean")this.setAutoFreeze($.autoFreeze);if(typeof $?.useStrictShallowCopy==="boolean")this.setUseStrictShallowCopy($.useStrictShallowCopy);if(typeof $?.useStrictIteration==="boolean")this.setUseStrictIteration($.useStrictIteration)}createDraft($){if(!Y0($))u(8);if(N0($))$=d1($);let J=i2(this),Z=M2($,void 0);return Z[b].isManual_=!0,G2(J),Z}finishDraft($,J){let Z=$&&$[b];if(!Z||!Z.isManual_)u(9);let{scope_:X}=Z;return p2(X,J),n2(void 0,X)}setAutoFreeze($){this.autoFreeze_=$}setUseStrictShallowCopy($){this.useStrictShallowCopy_=$}setUseStrictIteration($){this.useStrictIteration_=$}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches($,J){let Z;for(Z=J.length-1;Z>=0;Z--){let Y=J[Z];if(Y.path.length===0&&Y.op==="replace"){$=Y.value;break}}if(Z>-1)J=J.slice(Z+1);let X=Q0("Patches").applyPatches_;if(N0($))return X($,J);return this.produce($,(Y)=>X(Y,J))}};function M2($,J){let Z=O0($)?Q0("MapSet").proxyMap_($,J):d0($)?Q0("MapSet").proxySet_($,J):b1($,J);return(J?J.scope_:t2()).drafts_.push(Z),Z}function d1($){if(!N0($))u(10,$);return $5($)}function $5($){if(!Y0($)||l0($))return $;let J=$[b],Z,X=!0;if(J){if(!J.modified_)return J.base_;J.finalized_=!0,Z=B2($,J.scope_.immer_.useStrictShallowCopy_),X=J.scope_.immer_.shouldUseStrictIteration()}else Z=B2($,!0);if(m0(Z,(Y,q)=>{a2(Z,Y,$5(q))},X),J)J.finalized_=!1;return Z}var l1=new u1,J5=l1.produce;var p1=($)=>(J,Z,X)=>{return X.setState=(Y,q,...Q)=>{let H=typeof Y==="function"?J5(Y):Y;return J(H,q,...Q)},$(X.setState,Z,X)},Z5=p1;var i0=p0()(X5(Z5(($,J)=>({members:[],loading:!1,fetchMembers:async(Z,X,Y)=>{if(!Y&&J().loadedTeamId===Z&&J().loadedWithAgents===X)return;$({loading:!0});try{let q=await T0.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{includeAgents:X?"true":"false"}});if(!q.ok)throw Error("failed to fetch members");let Q=await q.json();$({members:Q||[],loadedTeamId:Z,loadedWithAgents:X,loading:!1})}catch{$({loading:!1})}}}))));var Y5=p0(($)=>({fields:[],loadedProjectId:null,setFields:(J,Z)=>$({fields:J,loadedProjectId:Z}),updateFields:(J)=>$({fields:J})}));function w2($,J,Z){let X=y($,Z?.in);if(isNaN(J))return P0(Z?.in||$,NaN);if(!J)return X;let Y=X.getDate(),q=P0(Z?.in||$,X.getTime());q.setMonth(X.getMonth()+J+1,0);let Q=q.getDate();if(Y>=Q)return q;else return X.setFullYear(q.getFullYear(),q.getMonth(),Y),X}function Q5($,J){let Z=y($,J?.in),X=Z.getMonth();return Z.setFullYear(Z.getFullYear(),X+1,0),Z.setHours(23,59,59,999),Z}function K5($,J){let[Z,X]=H5($,J.start,J.end);return{start:Z,end:X}}function q5($,J){let{start:Z,end:X}=K5(J?.in,$),Y=+Z>+X,q=Y?+Z:+X,Q=Y?X:Z;Q.setHours(0,0,0,0);let H=J?.step??1;if(!H)return[];if(H<0)H=-H,Y=!Y;let z=[];while(+Q<=q)z.push(P0(Z,Q)),Q.setDate(Q.getDate()+H),Q.setHours(0,0,0,0);return Y?z.reverse():z}function n0($,J){return y($,J?.in).getDate()}function N5($,J){return y($,J?.in).getDay()}function V2($,J){return y($,J?.in).getHours()}function L2($,J){return y($,J?.in).getMinutes()}function A2($,J){return y($,J?.in).getMonth()}function R2($,J){return y($,J?.in).getFullYear()}var a=d(l(),1);var i1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.date,[q,Q]=a.useState(!1),H=a.useRef(null),z=$?new Date($):new Date,G=B0(z)?z:new Date,[M,U]=a.useState(G);a.useEffect(()=>{if(q&&$){let N=new Date($);if(B0(N))U(N)}},[q,$]),a.useEffect(()=>{let N=(k)=>{if(H.current&&!H.current.contains(k.target)){if(q)Q(!1)}};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[q]);let W=()=>{if(!X)Q(!0)},w=(N)=>{if(!N)return"";let k=new Date(N);if(!B0(k))return"Invalid Date";let P="PPP";if(Y?.displayFormat==="usa")P="MM/dd/yyyy";else if(Y?.displayFormat==="euro")P="dd/MM/yyyy";else if(Y?.displayFormat==="iso")P="yyyy-MM-dd";if(Y?.includeTime)if(Y?.timeFormat==="twenty_four_hour")P+=" HH:mm";else P+=" p";let D=k2(k,P);if(Y?.displayTimezone)D+=` (${Intl.DateTimeFormat().resolvedOptions().timeZone})`;return D},B=new Date(M.getFullYear(),M.getMonth(),1),T=Q5(M),O=q5({start:B,end:T}),R=N5(B),S=(N)=>{let k=new Date(N);if(Y?.includeTime)k.setHours(V2(G)),k.setMinutes(L2(G));let P=k.toISOString();if(Z(P),!Y?.includeTime)Q(!1)},F=(N,k)=>{let P=$?new Date($):new Date;if(!B0(P))P.setTime(new Date().getTime());if(N==="hour")P.setHours(k);if(N==="minute")P.setMinutes(k);let D=P.toISOString();Z(D)},L=Array.from({length:24},(N,k)=>k),V=Array.from({length:12},(N,k)=>k*5);if(q)return A("div",{className:"relative w-full",ref:H,children:[K("div",{className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm shadow-sm min-h-[28px] flex items-center",children:$?w($):K("span",{className:"text-muted-foreground",children:"Select date..."})}),A("div",{className:"absolute z-50 top-full left-0 mt-1 bg-popover border border-border rounded-lg shadow-xl flex flex-col md:flex-row overflow-hidden min-w-[280px]",children:[A("div",{className:"p-4 w-64",children:[A("div",{className:"flex justify-between items-center mb-4",children:[K("button",{onClick:()=>U(w2(M,-1)),className:"p-1 hover:bg-accent rounded",children:K(B5,{className:"w-4 h-4"})}),K("span",{className:"font-semibold text-sm",children:k2(M,"MMMM yyyy")}),K("button",{onClick:()=>U(w2(M,1)),className:"p-1 hover:bg-accent rounded",children:K(W5,{className:"w-4 h-4"})})]}),K("div",{className:"grid grid-cols-7 gap-1 text-center text-xs mb-2 text-muted-foreground",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map((N)=>K("div",{children:N},N))}),A("div",{className:"grid grid-cols-7 gap-1 text-center text-sm",children:[Array.from({length:R}).map((N,k)=>K("div",{},`empty-${k}`)),O.map((N)=>{let k=$?new Date($):null,P=k&&B0(k)&&n0(k)===n0(N)&&A2(k)===A2(N)&&R2(k)===R2(N);return K("button",{onClick:()=>S(N),className:`w-8 h-8 rounded-full flex items-center justify-center hover:bg-accent transition-colors ${P?"bg-primary text-primary-foreground hover:bg-primary/90":"text-foreground"}`,children:n0(N)},N.toString())})]})]}),Y?.includeTime&&A("div",{className:"border-l border-border bg-muted w-32 flex flex-col",children:[A("div",{className:"p-2 border-b border-border text-xs font-semibold text-muted-foreground flex items-center justify-center gap-1",children:[K(G5,{className:"w-3 h-3"})," Time"]}),A("div",{className:"flex flex-1 h-64",children:[K("div",{className:"flex-1 overflow-y-auto scrollbar-hide border-r border-border",children:L.map((N)=>K("div",{onClick:()=>F("hour",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${V2(G)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))}),K("div",{className:"flex-1 overflow-y-auto scrollbar-hide",children:V.map((N)=>K("div",{onClick:()=>F("minute",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${L2(G)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))})]})]})]})]});return K("div",{onClick:W,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$?w($):K("span",{className:"text-muted-foreground italic",children:"Empty"})})},z5=i1;var p=d(l(),1);var n1=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=p.useState(!1),[q,Q]=p.useState($||""),H=p.useRef(null),z=p.useRef(null),[G,M]=p.useState(!1);p.useEffect(()=>{Q($||"")},[$]),p.useEffect(()=>{if(X&&H.current)H.current.focus(),M(!1)},[X]),p.useEffect(()=>{let B=(T)=>{if(G&&z.current&&!z.current.contains(T.target))M(!1)};if(G)document.addEventListener("mousedown",B);return()=>{document.removeEventListener("mousedown",B)}},[G]);let U=()=>{Y(!1),J(q)},W=(B)=>{B.stopPropagation(),M(!0)},w=(B)=>{if(B.stopPropagation(),!Z)Y(!0)};if(X)return K("textarea",{ref:H,value:q,onChange:(B)=>Q(B.target.value),onBlur:U,className:"w-full min-h-[80px] p-2 border border-ring rounded bg-background text-sm outline-none shadow-sm resize-none"});return A("div",{ref:z,className:"relative w-full text-sm",children:[K("div",{onClick:W,className:`w-full text-foreground rounded border border-transparent transition-all px-2 py-1 line-clamp-2 max-h-[3rem] overflow-hidden ${!Z?"cursor-pointer hover:bg-accent hover:border-border":"cursor-pointer"}`,title:"Click to expand",children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})}),G&&K("div",{onClick:w,className:`absolute top-0 left-0 w-full min-h-full h-auto z-50 bg-background border border-ring rounded shadow-lg px-2 py-1 whitespace-pre-wrap ${!Z?"cursor-text":""}`,children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})})]})},M5=n1;var t=d(l(),1);var o1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.number,[q,Q]=t.useState(!1),[H,z]=t.useState(""),G=t.useRef(null);t.useEffect(()=>{z($!==void 0&&$!==null?$.toString():"")},[$]),t.useEffect(()=>{if(q&&G.current)G.current.focus()},[q]);let M=()=>{if(!X)Q(!0)},U=()=>{if(Q(!1),H==="")Z(void 0);else{let B=parseFloat(H);Z(isNaN(B)?void 0:B)}},W=(B)=>{if(B.key==="Enter")B.stopPropagation(),G.current?.blur()},w=(B)=>{if(B===void 0||B===null||isNaN(B))return"";return B.toFixed(Y?.scale)};if(q)return K("input",{ref:G,type:"number",step:1/Math.pow(10,Y?.scale||0),value:H,onChange:(B)=>z(B.target.value),onBlur:U,onKeyDown:W,onDoubleClick:(B)=>B.stopPropagation(),className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm text-left font-mono"});return K("div",{onClick:M,onDoubleClick:(B)=>B.stopPropagation(),className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors text-left font-mono ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$!==void 0&&$!==null?w($):K("span",{className:"text-muted-foreground italic font-sans text-left block",children:"Empty"})})},U5=o1;var F5=d(l(),1);var s1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.rating,q=Math.max(2,Math.min(6,Y?.maxValue||5)),[Q,H]=F5.useState(null),z=(M,U)=>{if(M.stopPropagation(),X)return;let W;if($===U)W=0;else W=U;Z(W)},G=Array.from({length:q},(M,U)=>U+1);return K("div",{className:"flex items-center gap-1 h-[28px]",onMouseLeave:()=>!X&&H(null),onDoubleClick:(M)=>M.stopPropagation(),children:G.map((M)=>{let U=Q!==null?M<=Q:M<=($||0);return K("button",{onClick:(W)=>z(W,M),onMouseEnter:()=>!X&&H(M),className:`focus:outline-none transition-transform ${!X?"cursor-pointer hover:scale-110":"cursor-default"}`,type:"button",disabled:X,children:K(o0,{className:`w-5 h-5 transition-colors ${U?"fill-yellow-400 text-yellow-400":"fill-muted text-muted-foreground/30"}`})},M)})})},w5=s1;var P1=d(l(),1);var H0;(function($){$.Base32IncorrectEncoding="B32_ENC_INVALID",$.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",$.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",$.EncodeTimeNegative="ENC_TIME_NEG",$.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",$.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",$.PRNGDetectFailure="PRNG_DETECT",$.ULIDInvalid="ULID_INVALID",$.Unexpected="UNEXPECTED",$.UUIDInvalid="UUID_INVALID"})(H0||(H0={}));class W0 extends Error{constructor($,J){super(`${J} (${$})`);this.name="ULIDError",this.code=$}}function r1($){let J=Math.floor($()*32)%32;return"0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(J)}function a1($){let J=t1(),Z=J&&(J.crypto||J.msCrypto)||null;if(typeof Z?.getRandomValues==="function")return()=>{let X=new Uint8Array(1);return Z.getRandomValues(X),X[0]/256};else if(typeof Z?.randomBytes==="function")return()=>Z.randomBytes(1).readUInt8()/256;throw new W0(H0.PRNGDetectFailure,"Failed to find a reliable PRNG")}function t1(){if(J4())return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;return null}function e1($,J){let Z="";for(;$>0;$--)Z=r1(J)+Z;return Z}function $4($,J=10){if(isNaN($))throw new W0(H0.EncodeTimeValueMalformed,`Time must be a number: ${$}`);else if($>281474976710655)throw new W0(H0.EncodeTimeSizeExceeded,`Cannot encode a time larger than 281474976710655: ${$}`);else if($<0)throw new W0(H0.EncodeTimeNegative,`Time must be positive: ${$}`);else if(Number.isInteger($)===!1)throw new W0(H0.EncodeTimeValueMalformed,`Time must be an integer: ${$}`);let Z,X="";for(let Y=J;Y>0;Y--)Z=$%32,X="0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(Z)+X,$=($-Z)/32;return X}function J4(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function V5($,J){let Z=J||a1(),X=!$||isNaN($)?Date.now():$;return $4(X,10)+e1(16,Z)}var _0=d(l(),1);var{create:Z4,defineProperty:c5,defineProperties:X4,getOwnPropertyDescriptor:Y4,getOwnPropertyDescriptors:Q4,getOwnPropertySymbols:e0}=Object,u5=Object.prototype.hasOwnProperty,d5=Object.prototype.propertyIsEnumerable,H4=($,J)=>(J=Symbol[$])?J:Symbol.for("Symbol."+$),x0=($)=>{throw TypeError($)},f2=($,J,Z)=>(J in $)?c5($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,L5=($,J)=>{for(var Z in J||(J={}))if(u5.call(J,Z))f2($,Z,J[Z]);if(e0){for(var Z of e0(J))if(d5.call(J,Z))f2($,Z,J[Z])}return $},A5=($,J)=>X4($,Q4(J)),K4=($,J)=>{var Z={};for(var X in $)if(u5.call($,X)&&J.indexOf(X)<0)Z[X]=$[X];if($!=null&&e0){for(var X of e0($))if(J.indexOf(X)<0&&d5.call($,X))Z[X]=$[X]}return Z},q4=($)=>{var J;return[,,,Z4((J=void 0)!=null?J:null)]},l5=["class","method","getter","setter","accessor","field","value","get","set"],E0=($)=>$!==void 0&&typeof $!=="function"?x0("Function expected"):$,N4=($,J,Z,X,Y)=>({kind:l5[$],name:J,metadata:X,addInitializer:(q)=>Z._?x0("Already initialized"):Y.push(E0(q||null))}),B4=($,J)=>f2(J,H4("metadata"),$[3]),s0=($,J,Z,X)=>{for(var Y=0,q=$[J>>1],Q=q&&q.length;Y<Q;Y++)J&1?q[Y].call(Z):X=q[Y].call(Z,X);return X},p5=($,J,Z,X,Y,q)=>{var Q,H,z,G,M,U=J&7,W=!1,w=!1,B=$.length+1,T=l5[U+5],O=$[B-1]=[],R=$[B]||($[B]=[]),S=(Y=Y.prototype,Y4({get[Z](){return I0(this,q)},set[Z](L){return K0(this,q,L)}},Z));for(var F=X.length-1;F>=0;F--)if(G=N4(U,Z,z={},$[3],R),G.static=W,G.private=w,M=G.access={has:(L)=>(Z in L)},M.get=(L)=>L[Z],M.set=(L,V)=>L[Z]=V,H=(0,X[F])({get:S.get,set:S.set},G),z._=1,H===void 0)E0(H)&&(S[T]=H);else if(typeof H!=="object"||H===null)x0("Object expected");else E0(Q=H.get)&&(S.get=Q),E0(Q=H.set)&&(S.set=Q),E0(Q=H.init)&&O.unshift(Q);return S&&c5(Y,Z,S),Y},i5=($,J,Z)=>J.has($)||x0("Cannot "+Z),I0=($,J,Z)=>(i5($,J,"read from private field"),J.get($)),S0=($,J,Z)=>J.has($)?x0("Cannot add the same private member more than once"):J instanceof WeakSet?J.add($):J.set($,Z),K0=($,J,Z,X)=>(i5($,J,"write to private field"),J.set($,Z),Z);function i($){return $ instanceof v2||$ instanceof s5}var r0=10,W4=class extends x2{constructor($){super($);let J=P5(()=>{let{dragOperation:X}=$;if(!D2(X.activatorEvent))return;if(!i(X.source))return;if(X.status.initialized){let Y=$.registry.plugins.get(g5);if(Y)return Y.disable(),()=>Y.enable()}}),Z=$.monitor.addEventListener("dragmove",(X,Y)=>{queueMicrotask(()=>{if(this.disabled||X.defaultPrevented||!X.nativeEvent)return;let{dragOperation:q}=Y;if(!D2(X.nativeEvent))return;if(!i(q.source))return;if(!q.shape)return;let{actions:Q,collisionObserver:H,registry:z}=Y,{by:G}=X;if(!G)return;let M=G4(G),{source:U,target:W}=q,{center:w}=q.shape.current,B=[],T=[];v(()=>{for(let V of z.droppables){let{id:N}=V;if(!V.accepts(U)||N===(W==null?void 0:W.id)&&i(V)||!V.element)continue;let k=V.shape,P=new I2(V.element,{getBoundingClientRect:(D)=>I5(D,void 0,0.2)});if(!P.height||!P.width)continue;if(M=="down"&&w.y+r0<P.center.y||M=="up"&&w.y-r0>P.center.y||M=="left"&&w.x-r0>P.center.x||M=="right"&&w.x+r0<P.center.x)B.push(V),V.shape=P,T.push(()=>V.shape=k)}}),X.preventDefault(),H.disable();let O=H.computeCollisions(B,v5);v(()=>T.forEach((V)=>V()));let[R]=O;if(!R)return;let{id:S}=R,{index:F,group:L}=U.sortable;Q.setDropTarget(S).then(()=>{let{source:V,target:N,shape:k}=q;if(!V||!i(V)||!k)return;let{index:P,group:D,target:f}=V.sortable,g=F!==P||L!==D,m=g?f:N==null?void 0:N.element;if(!m)return;j5(m);let C=new I2(m);if(!C)return;let E=P2.delta(C,P2.from(k.current.boundingRectangle),V.alignment);if(Q.move({by:E}),g)Q.setDropTarget(V.id).then(()=>H.enable());else H.enable()})})});this.destroy=()=>{Z(),J()}}};function G4($){let{x:J,y:Z}=$;if(J>0)return"right";else if(J<0)return"left";else if(Z>0)return"down";else if(Z<0)return"up"}var{defineProperty:z4,defineProperties:M4,getOwnPropertyDescriptors:U4,getOwnPropertySymbols:R5}=Object,F4=Object.prototype.hasOwnProperty,w4=Object.prototype.propertyIsEnumerable,k5=($,J,Z)=>(J in $)?z4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,G0=($,J)=>{for(var Z in J||(J={}))if(F4.call(J,Z))k5($,Z,J[Z]);if(R5){for(var Z of R5(J))if(w4.call(J,Z))k5($,Z,J[Z])}return $},z0=($,J)=>M4($,U4(J));function V4($,J,Z){if(J===Z)return $;let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function C2($){return"initialIndex"in $&&typeof $.initialIndex==="number"&&"index"in $&&typeof $.index==="number"}function L4($,J,Z){var X,Y,q;let{source:Q,target:H,canceled:z}=J.operation;if(!Q||!H||z){if("preventDefault"in J)J.preventDefault();return $}let G=(L,V)=>L===V||typeof L==="object"&&("id"in L)&&L.id===V;if(Array.isArray($)){let L=$.findIndex((N)=>G(N,Q.id)),V=$.findIndex((N)=>G(N,H.id));if(L===-1||V===-1){if(C2(Q)){let{initialIndex:N,index:k}=Q;if(N===k||N<0||N>=$.length){if("preventDefault"in J)J.preventDefault();return $}return Z($,N,k)}return $}if(!z&&"index"in Q&&typeof Q.index==="number"){let N=Q.index;if(N!==L)return Z($,L,N)}return Z($,L,V)}let M=Object.entries($),U=-1,W,w=-1,B;for(let[L,V]of M){if(U===-1){if(U=V.findIndex((N)=>G(N,Q.id)),U!==-1)W=L}if(w===-1){if(w=V.findIndex((N)=>G(N,H.id)),w!==-1)B=L}if(U!==-1&&w!==-1)break}if(U===-1&&C2(Q)){let{initialGroup:L,initialIndex:V,group:N,index:k}=Q;if(L==null||N==null||!(L in $)||!(N in $)){if("preventDefault"in J)J.preventDefault();return $}if(L===N&&V===k){if("preventDefault"in J)J.preventDefault();return $}if(L===N)return z0(G0({},$),{[L]:Z($[L],V,k)});let P=$[L][V];return z0(G0({},$),{[L]:[...$[L].slice(0,V),...$[L].slice(V+1)],[N]:[...$[N].slice(0,k),P,...$[N].slice(k)]})}if(!Q.manager)return $;let{dragOperation:T}=Q.manager,O=(Y=(X=T.shape)==null?void 0:X.current.center)!=null?Y:T.position.current;if(B==null){if(H.id in $){let L=H.shape&&O.y>H.shape.center.y?$[H.id].length:0;B=H.id,w=L}}if(W==null||B==null||W===B&&U===w){if(W!=null&&W===B&&U===w&&C2(Q)){let L=Q.group!=null&&Q.group!==W,V=Q.index!==U;if(L||V){let N=(q=Q.group)!=null?q:W;if(N in $){if(W===N)return z0(G0({},$),{[W]:Z($[W],U,Q.index)});let k=$[W][U];return z0(G0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[N]:[...$[N].slice(0,Q.index),k,...$[N].slice(Q.index)]})}}}if("preventDefault"in J)J.preventDefault();return $}if(W===B)return z0(G0({},$),{[W]:Z($[W],U,w)});let S=H.shape&&Math.round(O.y)>Math.round(H.shape.center.y)?1:0,F=$[W][U];return z0(G0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[B]:[...$[B].slice(0,w+S),F,...$[B].slice(w+S)]})}function A4($,J){return L4($,J,V4)}var C5="__default__",R4=class extends x2{constructor($){super($);let J=()=>{let X=new Map;for(let Y of $.registry.droppables)if(Y instanceof v2){let{sortable:q}=Y,{group:Q}=q,H=X.get(Q);if(!H)H=new Set,X.set(Q,H);H.add(q)}for(let[Y,q]of X)X.set(Y,new Set(a0(q)));return X},Z=[$.monitor.addEventListener("dragover",(X,Y)=>{if(this.disabled)return;let{dragOperation:q}=Y,{source:Q,target:H}=q;if(!i(Q)||!i(H))return;if(Q.sortable===H.sortable)return;let z=J(),G=Q.sortable.group===H.sortable.group,M=z.get(Q.sortable.group),U=G?M:z.get(H.sortable.group);if(!M||!U)return;queueMicrotask(()=>{if(X.defaultPrevented)return;Y.renderer.rendering.then(()=>{var W,w,B;let T=J();for(let[f,g]of z.entries()){let m=Array.from(g).entries();for(let[C,E]of m)if(E.index!==C||E.group!==f||!((W=T.get(f))==null?void 0:W.has(E)))return}let O=Q.sortable.element,R=H.sortable.element;if(!R||!O)return;if(!G&&H.id===Q.sortable.group)return;let S=a0(M),F=G?S:a0(U),L=(w=Q.sortable.group)!=null?w:C5,V=(B=H.sortable.group)!=null?B:C5,N={[L]:S,[V]:F},k=A4(N,X);if(N===k)return;let P=k[V].indexOf(Q.sortable),D=k[V].indexOf(H.sortable);Y.collisionObserver.disable(),O5(O,P,R,D),v(()=>{for(let[f,g]of k[L].entries())g.index=f;if(!G)for(let[f,g]of k[V].entries())g.group=H.sortable.group,g.index=f}),Y.actions.setDropTarget(Q.id).then(()=>Y.collisionObserver.enable())})})}),$.monitor.addEventListener("dragend",(X,Y)=>{if(!X.canceled)return;let{dragOperation:q}=Y,{source:Q}=q;if(!i(Q))return;if(Q.sortable.initialIndex===Q.sortable.index&&Q.sortable.initialGroup===Q.sortable.group)return;queueMicrotask(()=>{let H=J(),z=H.get(Q.sortable.initialGroup);if(!z)return;Y.renderer.rendering.then(()=>{for(let[w,B]of H.entries()){let T=Array.from(B).entries();for(let[O,R]of T)if(R.index!==O||R.group!==w)return}let G=a0(z),M=Q.sortable.element,U=G[Q.sortable.initialIndex],W=U==null?void 0:U.element;if(!U||!W||!M)return;O5(M,U.index,W,Q.index),v(()=>{for(let[w,B]of H.entries()){let T=Array.from(B).values();for(let O of T)O.index=O.initialIndex,O.group=O.initialGroup}})})})})];this.destroy=()=>{for(let X of Z)X()}}};function O5($,J,Z,X){let Y=X<J?"afterend":"beforebegin";Z.insertAdjacentElement(Y,$)}function k4($,J){return $.index-J.index}function a0($){return Array.from($).sort(k4)}var T5=[W4,R4],j2={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},t0=new S5,n5,o5,e,y2,D0,f0,_2,M0;o5=[T2],n5=[T2];var j0=class{constructor($,J){S0(this,y2,s0(e,8,this)),s0(e,11,this),S0(this,D0),S0(this,f0),S0(this,_2,s0(e,12,this)),s0(e,15,this),S0(this,M0),this.register=()=>{return v(()=>{var W,w;(W=this.manager)==null||W.registry.register(this.droppable),(w=this.manager)==null||w.registry.register(this.draggable)}),()=>this.unregister()},this.unregister=()=>{v(()=>{var W,w;(W=this.manager)==null||W.registry.unregister(this.droppable),(w=this.manager)==null||w.registry.unregister(this.draggable)})},this.destroy=()=>{v(()=>{this.droppable.destroy(),this.draggable.destroy()})};var Z=$,{effects:X=()=>[],group:Y,index:q,sensors:Q,type:H,transition:z=j2,plugins:G}=Z,M=K4(Z,["effects","group","index","sensors","type","transition","plugins"]);let U=S2(G,T5);this.droppable=new v2(M,J,this),this.draggable=new s5(A5(L5({},M),{plugins:U,effects:()=>[()=>{var W,w,B;let T=(W=this.manager)==null?void 0:W.dragOperation.status;if((T==null?void 0:T.initializing)&&this.id===((B=(w=this.manager)==null?void 0:w.dragOperation.source)==null?void 0:B.id))t0.clear(this.manager);if(T==null?void 0:T.dragging)t0.set(this.manager,this.id,O2(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:W,group:w,manager:B}=this,T=I0(this,f0),O=I0(this,D0);if(W!==T||w!==O)K0(this,f0,W),K0(this,D0,w),this.animate()},()=>{var W,w;let{target:B}=this,{isDragSource:T}=this.draggable;if(((w=(W=this.draggable.pluginConfig(h5))==null?void 0:W.feedback)!=null?w:"default")==="move"&&T)this.droppable.disabled=!B},...X()],type:H,sensors:Q}),J,this),K0(this,M0,M.element),this.manager=J,this.index=q,K0(this,f0,q),this.group=Y,K0(this,D0,Y),this.type=H,this.transition=z}get initialIndex(){var $,J;return(J=($=t0.get(this.manager,this.id))==null?void 0:$.initialIndex)!=null?J:this.index}get initialGroup(){var $,J;return(J=($=t0.get(this.manager,this.id))==null?void 0:$.initialGroup)!=null?J:this.group}animate(){O2(()=>{let{manager:$,transition:J}=this,{shape:Z}=this.droppable;if(!$)return;let{idle:X}=$.dragOperation.status;if(!Z||!J||X&&!J.idle)return;$.renderer.rendering.then(()=>{let{element:Y}=this;if(!Y)return;for(let M of Y.getAnimations())if("transitionProperty"in M&&(M.transitionProperty==="transform"||M.transitionProperty==="translate"||M.transitionProperty==="scale"))M.cancel();let q=this.refreshShape();if(!q)return;let Q={x:Z.boundingRectangle.left-q.boundingRectangle.left,y:Z.boundingRectangle.top-q.boundingRectangle.top},{translate:H}=x5(Y),z=E2(Y,H,!1),G=E2(Y,H);if(Q.x||Q.y){let M=D5(E5(Y))?A5(L5({},J),{duration:0}):J;y5({element:Y,keyframes:{translate:[`${z.x+Q.x}px ${z.y+Q.y}px ${z.z}`,`${G.x}px ${G.y}px ${G.z}`]},options:M}).then(()=>{if(!$.dragOperation.status.dragging)this.droppable.shape=void 0})}})})}get manager(){return this.draggable.manager}set manager($){v(()=>{this.draggable.manager=$,this.droppable.manager=$})}set element($){v(()=>{let J=I0(this,M0),Z=this.droppable.element,X=this.draggable.element;if(!Z||Z===J)this.droppable.element=$;if(!X||X===J)this.draggable.element=$;K0(this,M0,$)})}get element(){var $,J;let Z=I0(this,M0);if(!Z)return;return(J=($=f5.get(Z))!=null?$:Z)!=null?J:this.droppable.element}set target($){this.droppable.element=$}get target(){return this.droppable.element}set source($){this.draggable.element=$}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins($){this.draggable.plugins=S2($,T5)}set disabled($){v(()=>{this.droppable.disabled=$,this.draggable.disabled=$})}set data($){v(()=>{this.droppable.data=$,this.draggable.data=$})}set handle($){this.draggable.handle=$}set id($){this.droppable.id=$,this.draggable.id=$}get id(){return this.droppable.id}set sensors($){this.draggable.sensors=$}set modifiers($){this.draggable.modifiers=$}set collisionPriority($){this.droppable.collisionPriority=$}set collisionDetector($){this.droppable.collisionDetector=$!=null?$:_5}set alignment($){this.draggable.alignment=$}get alignment(){return this.draggable.alignment}set type($){v(()=>{this.droppable.type=$,this.draggable.type=$})}get type(){return this.draggable.type}set accept($){this.droppable.accept=$}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts($){return this.droppable.accepts($)}};e=q4();y2=new WeakMap;D0=new WeakMap;f0=new WeakMap;_2=new WeakMap;M0=new WeakMap;p5(e,4,"index",o5,j0,y2);p5(e,4,"group",n5,j0,_2);B4(e,j0);var s5=class extends m5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},v2=class extends b5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get group(){return this.sortable.group}};var{defineProperty:C4,defineProperties:O4,getOwnPropertyDescriptors:T4,getOwnPropertySymbols:r5}=Object,P4=Object.prototype.hasOwnProperty,S4=Object.prototype.propertyIsEnumerable,a5=($,J,Z)=>(J in $)?C4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,h2=($,J)=>{for(var Z in J||(J={}))if(P4.call(J,Z))a5($,Z,J[Z]);if(r5){for(var Z of r5(J))if(S4.call(J,Z))a5($,Z,J[Z])}return $},E4=($,J)=>O4($,T4(J));function Z1($){let{accept:J,collisionDetector:Z,collisionPriority:X,id:Y,data:q,element:Q,handle:H,index:z,group:G,disabled:M,modifiers:U,sensors:W,target:w,type:B,plugins:T}=$,O=h2(h2({},j2),$.transition),R=J1((F)=>{return new j0(E4(h2({},$),{transition:O,register:!1,handle:$2(H),element:$2(Q),target:$2(w)}),F)}),S=e5(R,I4);return h(Y,()=>R.id=Y),t5(()=>{v(()=>{R.group=G,R.index=z})},[R,G,z]),h(B,()=>R.type=B),h(J,()=>R.accept=J,void 0,y0),h(q,()=>q&&(R.data=q)),h(z,()=>{var F;if(((F=R.manager)==null?void 0:F.dragOperation.status.idle)&&(O==null?void 0:O.idle))R.refreshShape()},$1),J2(H,(F)=>R.handle=F),J2(Q,(F)=>R.element=F),J2(w,(F)=>R.target=F),h(M,()=>R.disabled=M===!0),h(W,()=>R.sensors=W),h(Z,()=>R.collisionDetector=Z),h(X,()=>R.collisionPriority=X),h(T,()=>R.plugins=T,void 0,y0),h(O,()=>R.transition=O,void 0,y0),h(U,()=>R.modifiers=U,void 0,y0),h($.alignment,()=>R.alignment=$.alignment),{sortable:S,get isDragging(){return S.isDragging},get isDropping(){return S.isDropping},get isDragSource(){return S.isDragSource},get isDropTarget(){return S.isDropTarget},handleRef:_0.useCallback((F)=>{R.handle=F!=null?F:void 0},[R]),ref:_0.useCallback((F)=>{var L,V;if(!F&&((L=R.element)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.element=F!=null?F:void 0},[R]),sourceRef:_0.useCallback((F)=>{var L,V;if(!F&&((L=R.source)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.source=F!=null?F:void 0},[R]),targetRef:_0.useCallback((F)=>{var L,V;if(!F&&((L=R.target)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.target=F!=null?F:void 0},[R])}}function I4($,J,Z){if($==="isDragSource"&&!Z&&J)return!0;return!1}function D4($,J,Z){let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function X1($,J,Z,X){if(Z===X)return $;let Y=D4(J,Z,X),q=new Set(J.map((H)=>H.id)),Q=0;return $.map((H)=>q.has(H.id)?Y[Q++]:H)}async function Y$($){let J=[],Z=[],X=$.items;if(X)for(let Q=0;Q<X.length;Q++){let H=X[Q];if(H.kind==="file"){let z=H.webkitGetAsEntry?.();if(z)Z.push({entry:z,path:""})}}else return Array.from($.files);let Y=(Q)=>{return new Promise((H)=>{Q.readEntries((z)=>H(z),()=>H([]))})},q=(Q)=>{return new Promise((H,z)=>{Q.file((G)=>H(G),(G)=>z(G))})};while(Z.length>0){let Q=Z.shift();if(!Q)continue;let{entry:H,path:z}=Q;if(H.isFile)try{let G=await q(H),M=z?`${z}/${G.name}`:G.name;Object.defineProperty(G,"webkitRelativePath",{value:M,writable:!1,configurable:!0}),J.push(G)}catch(G){console.error("Error reading file entry:",G)}else if(H.isDirectory){let G=H.createReader(),M=[],U=await Y(G);while(U.length>0)M=M.concat(U),U=await Y(G);let W=z?`${z}/${H.name}`:H.name;for(let w of M)Z.push({entry:w,path:W})}}return J}var c=d(l(),1);var Z2=["red","orange","yellow","green","blue","purple","gray"],b2={red:{bg:"rgba(239, 68, 68, 0.15)",text:"#ef4444",hex:"#ef4444"},orange:{bg:"rgba(249, 115, 22, 0.15)",text:"#f97316",hex:"#f97316"},yellow:{bg:"rgba(234, 179, 8, 0.15)",text:"#ca8a04",hex:"#eab308"},green:{bg:"rgba(34, 197, 94, 0.15)",text:"#16a34a",hex:"#22c55e"},blue:{bg:"rgba(59, 130, 246, 0.15)",text:"#2563eb",hex:"#3b82f6"},purple:{bg:"rgba(168, 85, 247, 0.15)",text:"#9333ea",hex:"#a855f7"},gray:{bg:"rgba(128, 128, 128, 0.15)",text:"#4b5563",hex:"#808080"},system:{bg:"rgba(128, 128, 128, 0.1)",text:"#6b7280",hex:"#808080"}};function q0($){if(!$)return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:"#6b7280"};let J=$.toLowerCase(),Z=b2[J];if(Z)return{backgroundColor:Z.bg,color:Z.text};if($.startsWith("#"))return{backgroundColor:`${$}33`,color:$};return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:$}}function f4($=[]){let J=new Set($.map((X)=>X.color?.toLowerCase()).filter(Boolean)),Z=Z2.filter((X)=>!J.has(X.toLowerCase()));if(Z.length>0)return Z[Math.floor(Math.random()*Z.length)];return Z2[Math.floor(Math.random()*Z2.length)]}var x4={[_.text]:U1,[_.longText]:H1,[_.select]:B1,[_.selectMulti]:z1,[_.rating]:o0,[_.number]:N1,[_.toggle]:M1,[_.date]:K1,[_.user]:F1,[_.userMulti]:w1};function j4({field:$,index:J,onVisibilityChange:Z}){let{ref:X,handleRef:Y}=Z1({id:$.id,index:J}),q=$.config?.type?x4[$.config.type]:null;return A("div",{ref:X,className:"flex items-center justify-between p-2 rounded-md hover:bg-muted",children:[A("div",{className:"flex items-center gap-2",children:[K("div",{ref:Y,className:"cursor-grab",children:K(q1,{className:"h-4 w-4 text-muted-foreground"})}),q&&K(q,{className:"h-4 w-4 text-muted-foreground shrink-0"}),$.aiAutofill&&K(Q1,{className:"h-4 w-4 text-muted-foreground shrink-0"}),K("span",{className:"text-sm truncate",children:$.config?.name})]}),K(h0,{checked:$.visible,onCheckedChange:(Q)=>Z($.id,Q)})]})}function C$({projectId:$,onManageFields:J,onSave:Z}){let{fields:X,updateFields:Y}=Y5(),[q,Q]=c.useState(""),[H,z]=c.useState("list"),[G,M]=c.useState(""),[U,W]=c.useState(""),[w,B]=c.useState(!1),[T,O]=c.useState(""),[R,S]=c.useState([]),F=Y1();c.useEffect(()=>{F.invalidateQueries({queryKey:["fields",$]})},[$,F]);let L=T0.api.projects[":projectId"].fields.order.$patch,{mutate:V}=g2({mutationFn:async(C)=>{if(!(await L(C)).ok)throw Error(I.failed_update_fields_order());return null}}),N=T0.api.projects[":projectId"].fields.$post,{mutate:k}=g2({mutationFn:async(C)=>{let E=await N(C);if(!E.ok)throw Error(I.failed_create_field());return await E.json()},onSuccess:(C)=>{let E={...C,visible:!0},x=[...X,E];Y(x),M(""),S([]),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))}),Z?.()}}),P=c.useMemo(()=>X.filter((C)=>C.config?.name?.toLowerCase().includes(q.toLowerCase())),[X,q]),D=(C)=>{if(C.canceled)return;let{source:E}=C.operation;if(!i(E))return;let{initialIndex:x,index:j}=E;if(x===j)return;let c2=X1(X,P,x,j);Y(c2),V({param:{projectId:$},json:c2.map((u2)=>({fieldId:u2.id,visible:u2.visible||!1}))})},f=(C,E)=>{let x=X.map((j)=>j.id===C?{...j,visible:E}:j);Y(x),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))})},g=()=>{if(!G||!U)return;let C=U===_.select?{select:{options:R}}:U===_.selectMulti?{selectMulti:{options:R}}:{};k({param:{projectId:$},json:{config:{name:G,type:U,...C},label:G,aiAutofill:w,description:T}})},m=X.filter((C)=>C.visible).length;if(H==="create")return K("div",{className:"w-80 p-4",children:A("div",{className:"space-y-4",children:[A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-name",children:I.field_name()}),K(v0,{id:"field-name",placeholder:I.new_field_placeholder(),value:G,onChange:(C)=>M(C.target.value),autoFocus:!0})]}),A("div",{className:"space-y-2",children:[K(U0,{children:I.field_type()}),A(V1,{children:[K(L1,{asChild:!0,children:A($0,{variant:"outline",className:"w-full justify-between font-normal",children:[U?K("span",{className:"capitalize",children:U.replace(/_/g," ")}):K("span",{className:"text-muted-foreground border-dashed",children:I.select_field_type()}),K(F0,{className:"ml-2 h-4 w-4 opacity-50"})]})}),K(A1,{className:"w-[--radix-dropdown-menu-trigger-width]",children:Object.values(_).map((C)=>K(R1,{onClick:()=>{W(C),S([])},className:"capitalize",children:C.replace(/_/g," ")},C))})]})]}),A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-desc",children:I.description()}),K(v0,{id:"field-desc",placeholder:I.description_optional_placeholder(),value:T,onChange:(C)=>O(C.target.value)})]}),A("div",{className:"flex items-center space-x-2",children:[K(h0,{id:"ai-autofill",checked:w,onCheckedChange:B}),K(U0,{htmlFor:"ai-autofill",children:I.ai_autofill()})]}),(U===_.select||U===_.selectMulti)&&A("div",{className:"space-y-2",children:[A("div",{className:"flex items-center justify-between",children:[K(U0,{className:"text-sm font-medium",children:I.options()}),A($0,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>{let C={id:V5(),displayName:I.new_option(),color:f4(R)};S([...R,C])},children:[K(m2,{className:"h-4 w-4 mr-1"})," ",I.add_option()]})]}),K("div",{className:"space-y-2 max-h-40 overflow-y-auto pr-1",children:R.map((C,E)=>A("div",{className:"flex items-center gap-2",children:[K(v0,{value:C.displayName,onChange:(x)=>{let j=[...R];j[E]={...C,displayName:x.target.value},S(j)},placeholder:I.option_name_placeholder(),className:"h-8 flex-1"}),A(n,{children:[K(o,{asChild:!0,children:K("button",{type:"button",className:"w-6 h-6 rounded-full border shrink-0 cursor-pointer focus:outline-none hover:scale-105 transition-transform",style:{backgroundColor:b2[C.color||""]?.hex||C.color||"#808080"}})}),K(s,{className:"p-2 w-auto",align:"end",children:K("div",{className:"flex gap-1",children:Z2.map((x)=>K("button",{type:"button",className:"w-5 h-5 rounded-full border cursor-pointer hover:scale-110 transition-transform",style:{backgroundColor:b2[x]?.hex||x},onClick:()=>{let j=[...R];j[E]={...C,color:x},S(j)}},x))})})]}),K($0,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>{S(R.filter((x,j)=>j!==E))},children:K(w0,{className:"h-4 w-4"})})]},C.id))})]}),A("div",{className:"flex gap-2 pt-2",children:[K($0,{variant:"secondary",className:"flex-1",onClick:()=>{z("list"),M(""),W(""),B(!1),O(""),S([])},children:I.cancel()}),K($0,{className:"flex-1",onClick:g,disabled:!G||!U,children:I.save()})]})]})});return A("div",{className:"w-80 p-4",children:[K("div",{className:"flex items-center justify-between mb-4",children:A("h3",{className:"font-semibold",children:[I.fields()," ",K("span",{className:"text-muted-foreground text-sm font-normal",children:I.visible_count({count:m})})]})}),A("div",{className:"relative mb-4",children:[K(W1,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),K(v0,{placeholder:I.search_fields_placeholder(),value:q,onChange:(C)=>Q(C.target.value),className:"pl-8"})]}),K("div",{className:"max-h-60 overflow-y-auto pr-2",children:K(T1,{sensors:[O1.configure({activationConstraints:[new C1.Distance({value:8})]}),k1],onDragEnd:D,children:P.map((C,E)=>K(j4,{field:C,index:E,onVisibilityChange:f},C.id))})}),J&&A("div",{className:"mt-4 space-y-2",children:[A($0,{variant:"secondary",className:"w-full",onClick:J,children:[K(G1,{className:"h-4 w-4 mr-2"}),I.manage_fields()]}),A($0,{className:"w-full",onClick:()=>z("create"),children:[K(m2,{className:"h-4 w-4 mr-2"}),I.new_field()]})]})]})}var y4=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.select,[q,Q]=P1.useState(!1),H=Y?.options?.find((W)=>W.id===$),z=()=>{if(!X)Q(!0)},G=(W)=>{Z(W),Q(!1)};return K("div",{className:"relative w-full",onClick:(W)=>W.stopPropagation(),children:A(n,{open:!X&&q,onOpenChange:(W)=>{if(X)return;Q(W)},children:[K(o,{asChild:!0,children:A("div",{onClick:z,className:`flex items-center justify-between w-full min-h-[28px] px-2 py-1 rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((W)=>{if(!W)return K("span",{className:"text-muted-foreground italic",children:"Select an option"});return K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})})(H),!X&&K(F0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(s,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[150px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>G(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2",children:[K(w0,{className:"w-3 h-3"})," Clear"]}),Y?.options?.map((W)=>K("div",{onClick:()=>G(W.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center",children:K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})},W.id))]})]})})},S1=y4;var J0=d(l(),1);var _4=({value:$=[],config:J,onSave:Z,readOnly:X})=>{let Y=J?.selectMulti,q=J0.useRef(null),[Q,H]=J0.useState(!1),[z,G]=J0.useState(!1),[M,U]=J0.useState($.length),W=Y?.options?.filter((F)=>($||[]).includes(F.id))||[];J0.useLayoutEffect(()=>{if(Q||z){U(W.length);return}if(q.current){let F=q.current.offsetWidth,V=document.createElement("canvas").getContext("2d");if(V){V.font="12px ui-sans-serif, system-ui, sans-serif";let N=0,k=0,D=F-28;for(let f=0;f<W.length;f++){let m=V.measureText(W[f].displayName).width+16+4;if(N+m>D&&f<W.length-1)break;if(f===W.length-1){if(N+m<=F)k++;break}N+=m,k++}U(k)}}},[W,Q,z,$]);let w=(F)=>{let L=$||[],V;if(L.includes(F))V=L.filter((N)=>N!==F);else V=[...L,F];Z(V)},B=(F)=>{if(F.stopPropagation(),Q)return;let L=W.length-M;if(!z&&L>0)G(!0);else if(!X)H(!0)},T=(F)=>{if(F.stopPropagation(),!X)H(!0)},O=W.length-M;return K("div",{className:"relative w-full",onClick:(F)=>F.stopPropagation(),children:A(n,{open:!X&&(z&&!Q||Q),onOpenChange:(F)=>{if(X)return;if(!F)G(!1),H(!1)},children:[K(o,{asChild:!0,children:A("div",{ref:q,onClick:B,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!X||O>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.slice(0,M).map((F)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(F.color),children:F.displayName},F.id)),O>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",O]})]})}),K(s,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${z&&!Q?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:z&&!Q?T:void 0,children:z&&!Q?A(X2,{children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.map((F)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(F.color),children:F.displayName},F.id))]}):Y?.options?.map((F)=>{let L=($||[]).includes(F.id);return A("div",{onClick:()=>w(F.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between",children:[K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(F.color),children:F.displayName}),L&&K(Y2,{className:"w-4 h-4 text-primary"})]},F.id)})})]})})},E1=_4;var Z0=d(l(),1);var v4=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=Z0.useState(!1),[q,Q]=Z0.useState($||""),H=Z0.useRef(null);Z0.useEffect(()=>{Q($||"")},[$]),Z0.useEffect(()=>{if(X&&H.current)H.current.focus()},[X]);let z=()=>{if(!Z)Y(!0)},G=()=>{Y(!1),J(q)},M=(U)=>{if(U.key==="Enter")H.current?.blur()};if(X)return K("input",{ref:H,type:"text",value:q,onChange:(U)=>Q(U.target.value),onBlur:G,onKeyDown:M,className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm"});return K("div",{onClick:z,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded truncate border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$||K("span",{className:"text-muted-foreground italic",children:"Empty"})})},I1=v4;var h4=({value:$,onSave:J,readOnly:Z})=>{return K("div",{className:"flex items-center h-[28px] w-full",onClick:(Y)=>Y.stopPropagation(),children:K(h0,{checked:$,onCheckedChange:(Y)=>{if(!Z)J(Y)},disabled:Z,className:"cursor-pointer"})})},D1=h4;var H2=d(l(),1);var g4=({value:$,onSave:J,readOnly:Z})=>{let X=Q2(),{members:Y,fetchMembers:q}=i0(),[Q,H]=H2.useState(!1);H2.useEffect(()=>{if(X)q(X)},[X,q]);let z=Y.find((B)=>B.id===$),G=()=>{if(!Z)H(!0)},M=(B)=>{J(B),H(!1)},U=(B)=>{if(Z)return;H(B)},W=(B)=>{return B.split(" ").map((T)=>T[0]).slice(0,2).join("").toUpperCase()};return K("div",{className:"relative w-full",onClick:(B)=>B.stopPropagation(),children:A(n,{open:!Z&&Q,onOpenChange:U,children:[K(o,{asChild:!0,children:A("div",{onClick:G,className:`flex items-center justify-between w-full h-[28px] px-2 rounded border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((B)=>{if(!B)return K("span",{className:"text-muted-foreground italic text-sm",children:"Select user"});return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(L0,{src:B.image,alt:B.name,className:"object-cover"}),K(A0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"truncate max-w-[120px]",children:B.name})]})})(z),!Z&&K(F0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(s,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[200px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>M(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[K(w0,{className:"w-3 h-3"})," Clear"]}),Y.map((B)=>A("div",{onClick:()=>M(B.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[A(V0,{className:"w-5 h-5",children:[K(L0,{src:B.image,alt:B.name,className:"object-cover"}),K(A0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:B.name})]},B.id))]})]})})},f1=g4;var r=d(l(),1);var m4=({value:$=[],onSave:J,readOnly:Z})=>{let X=Q2(),{members:Y,fetchMembers:q}=i0(),Q=r.useRef(null),[H,z]=r.useState(!1),[G,M]=r.useState(!1),[U,W]=r.useState($.length);r.useEffect(()=>{if(X)q(X)},[X,q]);let w=Y.filter((N)=>($||[]).includes(N.id)),B=(N)=>{return N.split(" ").map((k)=>k[0]).slice(0,2).join("").toUpperCase()};r.useLayoutEffect(()=>{if(H||G){W(w.length);return}if(Q.current){let N=Q.current.offsetWidth,P=document.createElement("canvas").getContext("2d");if(P){P.font="12px ui-sans-serif, system-ui, sans-serif";let D=0,f=0,m=N-28;for(let C=0;C<w.length;C++){let x=P.measureText(w[C].name).width+42;if(D+x>m&&C<w.length-1)break;if(C===w.length-1){if(D+x<=N)f++;break}D+=x,f++}W(f)}}},[w,H,G,$]);let T=(N)=>{let k=$||[],P;if(k.includes(N))P=k.filter((D)=>D!==N);else P=[...k,N];J(P)},O=(N)=>{if(N.stopPropagation(),H)return;let k=w.length-U;if(!G&&k>0)M(!0);else if(!Z)z(!0)},R=(N)=>{if(N.stopPropagation(),!Z)z(!0)},S=w.length-U,F=G&&!H||H,L=(N)=>{if(Z)return;if(!N)M(!1),z(!1)},V=(N)=>{return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border whitespace-nowrap h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(L0,{src:N.image,alt:N.name,className:"object-cover"}),K(A0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"truncate max-w-[100px]",children:N.name})]},N.id)};return K("div",{className:"relative w-full",onClick:(N)=>N.stopPropagation(),children:A(n,{open:!Z&&F,onOpenChange:L,children:[K(o,{asChild:!0,children:A("div",{ref:Q,onClick:O,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!Z||S>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[w.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),w.slice(0,U).map(V),S>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",S]})]})}),K(s,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${G&&!H?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:G&&!H?R:void 0,children:G&&!H?A(X2,{children:[w.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),w.map(V)]}):Y.map((N)=>{let k=($||[]).includes(N.id);return A("div",{onClick:()=>T(N.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between rounded-sm",children:[A("div",{className:"flex items-center gap-2",children:[A(V0,{className:"w-5 h-5",children:[K(L0,{src:N.image,alt:N.name,className:"object-cover"}),K(A0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:N.name})]}),k&&K(Y2,{className:"w-4 h-4 text-primary"})]},N.id)})})]})})},x1=m4;var b4=($)=>{if(!$.config)return K("div",{children:"Unknown Field Type"});switch($.config.type){case"text":return K(I1,{...$,value:$.value,onSave:$.onSave});case"longText":return K(M5,{...$,value:$.value,onSave:$.onSave});case"select":return K(S1,{...$,value:$.value,onSave:$.onSave});case"selectMulti":return K(E1,{...$,value:$.value,onSave:$.onSave});case"rating":return K(w5,{...$,value:$.value,onSave:$.onSave});case"number":return K(U5,{...$,value:$.value,onSave:$.onSave});case"toggle":return K(D1,{...$,value:$.value,onSave:$.onSave});case"date":return K(z5,{...$,value:$.value,onSave:$.onSave});case"user":return K(f1,{...$,value:$.value,onSave:$.onSave});case"userMulti":return K(x1,{...$,value:$.value,onSave:$.onSave});default:return K("div",{children:"Unknown Field Type"})}},w6=b4;var A6=({progress:$,className:J})=>{let X=2*Math.PI*20,Y=X-Math.min(100,Math.max(0,$))/100*X;return A("svg",{viewBox:"0 0 50 50",className:j1("w-12 h-12",J),children:[K("circle",{cx:"25",cy:"25",r:20,className:"stroke-muted",strokeWidth:"4",fill:"transparent"}),K("circle",{cx:"25",cy:"25",r:20,className:"stroke-primary transition-all duration-300 ease-out",strokeWidth:"4",fill:"transparent",strokeDasharray:X,strokeDashoffset:Y,transform:"rotate(-90 25 25)"}),K("text",{x:"50%",y:"50%",textAnchor:"middle",dy:".3em",className:"fill-foreground text-[10px] font-bold",children:`${Math.round($)}%`})]})};var c4=($)=>{if(isNaN($))return"00:00";let J=new Date($*1000),Z=J.getUTCHours(),X=J.getUTCMinutes().toString().padStart(2,"0"),Y=J.getUTCSeconds().toString().padStart(2,"0");if(Z)return`${Z}:${X}:${Y}`;return`${X}:${Y}`},C6=($,J,Z,X)=>{if(Z==="frames")return`${$} fr`;if(Z==="standard")return c4($/J);let Y=Math.round(J),q=J!==Y,Q=!1;if(q&&(Y===30||Y===60))Q=!0;let H=0;if(X){let B=X.match(/^([012]\d):(\d\d):(\d\d)(:|;|\.)(\d+)$/);if(B){let T=parseInt(B[1],10),O=parseInt(B[2],10),R=parseInt(B[3],10),S=parseInt(B[5],10);if(Q=B[4]!==":",H=(T*3600+O*60+R)*Y+S,Q){let F=T*60+O,L=J<30?2:4;H-=L*(F-Math.floor(F/10))}}}let z=$+H;if(Q){let B=J<30?2:4,T=Math.floor(z/(17982*B/2)),O=z%(17982*B/2);if(O<B)O=O+B;z+=9*B*T+B*Math.floor((O-B)/(1798*B/2))}let G=z%Y,M=Math.floor(z/Y)%60,U=Math.floor(z/(Y*60))%60,W=Math.floor(z/(Y*3600))%24,w=Q?";":":";return`${W.toString().padStart(2,"0")}:${U.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}${w}${G.toString().padStart(2,"0")}`};var O6=($,J)=>{if(!J)return 0;let Z=1/J;return $*Z+Z/2},u4=($)=>Math.max(100,3000/($||30)),T6=({dbTotalFrames:$,containerDuration:J,frameRate:Z})=>{let X=Z||30,Y=Math.round(J*X);if($<=0)return Y;let q=$/X,Q=J-q,H=u4(X)/1000;return Q>H?Y:$};
|
|
2
|
-
export{w2 as p,Q5 as q,K5 as r,A2 as s,R2 as t,X1 as u,Y$ as v,Y5 as w,V5 as x,A6 as y,w5 as z,i as A,Z1 as B,Z2 as C,b2 as D,q0 as E,f4 as F,x4 as G,C$ as H,i0 as I,w6 as J,c4 as K,C6 as L,O6 as M,u4 as N,T6 as O};
|