@kaeawc/auto-mobile 0.0.91 → 0.0.92
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/dist/build-info.json +12 -12
- package/dist/schemas/README.md +16 -0
- package/dist/schemas/prototype-icon-names.json +302 -0
- package/dist/src/chunk-09442h7v.js +4 -0
- package/dist/src/chunk-0dfnyfkh.js +5 -0
- package/dist/src/chunk-0e4gm1kj.js +5 -0
- package/dist/src/chunk-0eb8576f.js +4 -0
- package/dist/src/chunk-0rjm4nx7.js +5 -0
- package/dist/src/chunk-0w1spptt.js +6 -0
- package/dist/src/chunk-1zmh2eak.js +4 -0
- package/dist/src/chunk-28k63ha3.js +5 -0
- package/dist/src/chunk-2d4wmp8b.js +4 -0
- package/dist/src/chunk-2e6s75qv.js +78 -0
- package/dist/src/chunk-2v7tw1nj.js +5 -0
- package/dist/src/chunk-32jpxz2y.js +323 -0
- package/dist/src/chunk-34zxqcmq.js +5 -0
- package/dist/src/chunk-3jmvqygr.js +238 -0
- package/dist/src/chunk-3swvfhqt.js +5 -0
- package/dist/src/chunk-44bt78m9.js +5 -0
- package/dist/src/chunk-488vt2bp.js +4 -0
- package/dist/src/chunk-4fgdhcwx.js +5 -0
- package/dist/src/chunk-4jp2se4w.js +4 -0
- package/dist/src/chunk-4pfftt07.js +5 -0
- package/dist/src/chunk-4vhr9e4t.js +4 -0
- package/dist/src/chunk-4xd6zs3y.js +15 -0
- package/dist/src/chunk-51567pg8.js +4 -0
- package/dist/src/chunk-5agqsfev.js +4 -0
- package/dist/src/chunk-5d706gmr.js +4 -0
- package/dist/src/chunk-5kd4rqk7.js +5 -0
- package/dist/src/chunk-5s645vr4.js +4 -0
- package/dist/src/chunk-61t538bm.js +4 -0
- package/dist/src/chunk-6d3mmqxt.js +54 -0
- package/dist/src/chunk-6hyt398x.js +5 -0
- package/dist/src/chunk-6mnr8kpm.js +4 -0
- package/dist/src/chunk-6pg7bqck.js +4 -0
- package/dist/src/chunk-79q5xsdc.js +42 -0
- package/dist/src/chunk-7bdgand3.js +4 -0
- package/dist/src/chunk-84cp9dw5.js +4 -0
- package/dist/src/chunk-86f2h5ww.js +5 -0
- package/dist/src/chunk-8cghfzb2.js +19 -0
- package/dist/src/chunk-8en08r7q.js +5 -0
- package/dist/src/chunk-950qcq1e.js +10 -0
- package/dist/src/chunk-9rkfyt6q.js +5 -0
- package/dist/src/chunk-9tf2p9y9.js +5 -0
- package/dist/src/chunk-9y5bcy28.js +6 -0
- package/dist/src/chunk-a2sc4jm0.js +5 -0
- package/dist/src/chunk-a4k9rt7z.js +5 -0
- package/dist/src/chunk-aa5ng3d1.js +4 -0
- package/dist/src/chunk-ajsrz473.js +5 -0
- package/dist/src/chunk-b3h0a6ca.js +4 -0
- package/dist/src/chunk-b4cxdzwy.js +20 -0
- package/dist/src/chunk-b6a737qt.js +4 -0
- package/dist/src/chunk-bn64x5z5.js +5 -0
- package/dist/src/chunk-bvh649za.js +12 -0
- package/dist/src/chunk-c9nk1r78.js +5 -0
- package/dist/src/chunk-c9tyfg4j.js +26 -0
- package/dist/src/chunk-cfsdfqnm.js +4 -0
- package/dist/src/chunk-cxyf04jc.js +7 -0
- package/dist/src/chunk-d57432wq.js +4 -0
- package/dist/src/chunk-da08tx5v.js +4 -0
- package/dist/src/chunk-eka89q3k.js +4 -0
- package/dist/src/chunk-f2tc08m2.js +4 -0
- package/dist/src/chunk-f8tnk179.js +5 -0
- package/dist/src/chunk-f9s1kkhx.js +5 -0
- package/dist/src/chunk-fbp8a4rx.js +4 -0
- package/dist/src/chunk-fd2z0sze.js +4 -0
- package/dist/src/chunk-fk927f4q.js +54 -0
- package/dist/src/chunk-fxmr3a0f.js +4 -0
- package/dist/src/chunk-gaqwhd44.js +4 -0
- package/dist/src/chunk-ggtd5x5a.js +5 -0
- package/dist/src/chunk-gndcfrm7.js +4 -0
- package/dist/src/chunk-h3n4adc6.js +310 -0
- package/dist/src/chunk-h5pjbb83.js +4 -0
- package/dist/src/chunk-hgnnh302.js +4 -0
- package/dist/src/chunk-hmke8nhx.js +5 -0
- package/dist/src/chunk-j2bx12hn.js +4 -0
- package/dist/src/chunk-j70y1a2g.js +4 -0
- package/dist/src/chunk-jdqvcq0a.js +5 -0
- package/dist/src/chunk-jhnbfj19.js +55 -0
- package/dist/src/chunk-js1jpyxp.js +6 -0
- package/dist/src/chunk-kbjq0qvb.js +4 -0
- package/dist/src/chunk-kfwx57xd.js +4 -0
- package/dist/src/chunk-km0dy5vc.js +71 -0
- package/dist/src/chunk-kzwctna2.js +4 -0
- package/dist/src/chunk-m9ehyehy.js +4 -0
- package/dist/src/chunk-mct91p1f.js +4 -0
- package/dist/src/chunk-mf9spd4g.js +5 -0
- package/dist/src/chunk-mgrcansb.js +4 -0
- package/dist/src/chunk-mqc1d0eb.js +6 -0
- package/dist/src/chunk-n1zmpk0z.js +4 -0
- package/dist/src/chunk-ncyjf63g.js +4 -0
- package/dist/src/chunk-nr64d21q.js +973 -0
- package/dist/src/chunk-nwm2pq5v.js +168 -0
- package/dist/src/chunk-pm06b05d.js +9 -0
- package/dist/src/chunk-q50s00ry.js +4 -0
- package/dist/src/chunk-qv2918jt.js +4 -0
- package/dist/src/chunk-qwye1958.js +14 -0
- package/dist/src/chunk-r0f1q783.js +5 -0
- package/dist/src/chunk-r14wwk37.js +18 -0
- package/dist/src/chunk-r20pe1nv.js +5 -0
- package/dist/src/chunk-r8z9pfve.js +5 -0
- package/dist/src/chunk-rdpgkjf6.js +4 -0
- package/dist/src/chunk-rkr0dks9.js +5 -0
- package/dist/src/chunk-rn84t3sf.js +11 -0
- package/dist/src/chunk-s123kn7n.js +4 -0
- package/dist/src/chunk-s1zq65ny.js +4 -0
- package/dist/src/chunk-s73qn3fx.js +4 -0
- package/dist/src/chunk-sjn0nj4p.js +5 -0
- package/dist/src/chunk-sns0c35v.js +7 -0
- package/dist/src/chunk-stfzjr9y.js +8 -0
- package/dist/src/chunk-sz1a7p43.js +4 -0
- package/dist/src/chunk-t4dr5c8v.js +8 -0
- package/dist/src/chunk-tc8k9c1j.js +4 -0
- package/dist/src/chunk-teznhase.js +4 -0
- package/dist/src/chunk-ty9xgmz4.js +4 -0
- package/dist/src/chunk-tyazf3sk.js +145 -0
- package/dist/src/chunk-v6npjrjm.js +5 -0
- package/dist/src/chunk-v90es00d.js +4 -0
- package/dist/src/chunk-vbvtzkwz.js +5 -0
- package/dist/src/chunk-vefd8qee.js +8 -0
- package/dist/src/chunk-vs9r72ta.js +17 -0
- package/dist/src/chunk-w2mwa0jk.js +4 -0
- package/dist/src/chunk-w7zsh13a.js +9 -0
- package/dist/src/chunk-w88k0bgr.js +4 -0
- package/dist/src/chunk-wry6skrm.js +4 -0
- package/dist/src/chunk-wzdt0enk.js +4 -0
- package/dist/src/chunk-xhhv854c.js +4 -0
- package/dist/src/chunk-y58270hd.js +4 -0
- package/dist/src/chunk-yk0hmbex.js +4 -0
- package/dist/src/chunk-ympy4fdz.js +28 -0
- package/dist/src/chunk-yw436axy.js +4 -0
- package/dist/src/chunk-z04jrpjy.js +5 -0
- package/dist/src/chunk-z2xznczw.js +4 -0
- package/dist/src/chunk-z4xnrgps.js +4 -0
- package/dist/src/chunk-z7csyszv.js +4 -0
- package/dist/src/chunk-z8t0v07j.js +11 -0
- package/dist/src/chunk-z916af47.js +228 -0
- package/dist/src/chunk-zcr8he8q.js +5 -0
- package/dist/src/chunk-zd9vmkzn.js +9 -0
- package/dist/src/chunk-zg67wjkh.js +5 -0
- package/dist/src/chunk-zj939v0h.js +5 -0
- package/dist/src/chunk-zkdjwtc1.js +4 -0
- package/dist/src/chunk-zkv5kzt6.js +4 -0
- package/dist/src/daemon/processEntry.js +4 -0
- package/dist/src/index.js +4 -2843
- package/dist/src/runtime/bunRuntimeGuard.js +4 -0
- package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
- package/package.json +5 -5
- package/schemas/README.md +16 -0
- package/schemas/prototype-icon-names.json +302 -0
- package/node_modules/@borewit/text-codec/README.md +0 -87
- package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
- package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
- package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
- package/node_modules/@jimp/js-png/README.md +0 -35
- package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
- package/node_modules/@jimp/js-png/src/output.png +0 -0
- package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
- package/node_modules/@jimp/plugin-resize/README.md +0 -12
- package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
- package/node_modules/@tokenizer/inflate/README.md +0 -114
- package/node_modules/@tokenizer/token/README.md +0 -19
- package/node_modules/await-to-js/README.md +0 -82
- package/node_modules/debug/README.md +0 -481
- package/node_modules/exif-parser/README.md +0 -83
- package/node_modules/file-type/readme.md +0 -667
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/mime/README.md +0 -178
- package/node_modules/ms/readme.md +0 -59
- package/node_modules/parse-bmfont-xml/README.md +0 -74
- package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
- package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
- package/node_modules/pngjs/README.md +0 -287
- package/node_modules/sax/README.md +0 -228
- package/node_modules/strtok3/README.md +0 -795
- package/node_modules/tinycolor2/README.md +0 -492
- package/node_modules/tinycolor2/cjs/test.js +0 -2191
- package/node_modules/tinycolor2/cjs/test_template.js +0 -26
- package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
- package/node_modules/tinycolor2/esm/test.js +0 -2189
- package/node_modules/tinycolor2/esm/test_template.js +0 -24
- package/node_modules/tinycolor2/tinycolor.js +0 -1191
- package/node_modules/token-types/README.md +0 -160
- package/node_modules/uint8array-extras/readme.md +0 -318
- package/node_modules/xml-parse-from-string/README.md +0 -35
- package/node_modules/xmlbuilder/README.md +0 -86
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/v4/locales/ar.d.cts +0 -4
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.d.cts +0 -4
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.d.cts +0 -4
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.d.cts +0 -4
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.d.cts +0 -4
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.d.cts +0 -4
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -5
- package/node_modules/zod/v4/locales/es.d.cts +0 -4
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.d.cts +0 -4
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.d.cts +0 -4
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.d.cts +0 -4
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.d.cts +0 -4
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.d.cts +0 -4
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.d.cts +0 -4
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/index.d.cts +0 -39
- package/node_modules/zod/v4/locales/index.d.ts +0 -39
- package/node_modules/zod/v4/locales/it.d.cts +0 -4
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.d.cts +0 -4
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/kh.d.cts +0 -4
- package/node_modules/zod/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.d.cts +0 -4
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.d.cts +0 -4
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.d.cts +0 -4
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.d.cts +0 -4
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.d.cts +0 -4
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.d.cts +0 -4
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.d.cts +0 -4
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.d.cts +0 -4
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.d.cts +0 -4
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.d.cts +0 -4
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.d.cts +0 -4
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.d.cts +0 -4
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.d.cts +0 -4
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.d.cts +0 -4
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.d.cts +0 -4
- package/node_modules/zod/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.d.cts +0 -4
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.d.cts +0 -4
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
package/dist/build-info.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@kaeawc/auto-mobile",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"sourceSha": "
|
|
4
|
+
"version": "0.0.92",
|
|
5
|
+
"sourceSha": "3c35b55e5a2bec5b8c9b2c82f16399f4cd80ca6a",
|
|
6
6
|
"sourceShaFrom": "git",
|
|
7
7
|
"sourceDirty": false,
|
|
8
8
|
"sourceDirtyPaths": [],
|
|
9
9
|
"nativeResources": {
|
|
10
|
-
"apkSha256": "
|
|
11
|
-
"ipaSha256": "
|
|
12
|
-
"protoViewerApkSha256": "
|
|
13
|
-
"runnerSha256": "
|
|
10
|
+
"apkSha256": "dc53aff0d1859dfa6ce0c664e43c37ae80c49915dbe7fcc45dc4e2a7a015f863",
|
|
11
|
+
"ipaSha256": "4cb0a3dcfb87bddb4f5c8d7fc2ce2c2a48dc26a11107f420db02aa10c0e84de0",
|
|
12
|
+
"protoViewerApkSha256": "c4263f5562d57eca70494848740228590bb744ad35ed7580b81172d1cb2aba18",
|
|
13
|
+
"runnerSha256": "786e5c8f9add807ac4fd0a12078ce4c5afb47b65b2acf3993fcd32d51dafc032",
|
|
14
14
|
"videoJarSha256": "092ad380e2cc80e763f1d91944113a79e343d8514178439bb2016bf52d9b5e92",
|
|
15
|
-
"screenCaptureHelperSha256": "
|
|
16
|
-
"audioLoopbackHelperSha256": "
|
|
17
|
-
"tvosRunnerSha256": "
|
|
18
|
-
"prototypeAgentSha256": "
|
|
19
|
-
"prototypeViewerSha256": "
|
|
20
|
-
"networkFilterSha256": "
|
|
15
|
+
"screenCaptureHelperSha256": "c3bf53fd1dc363ed4ecdc1bc493217af81a976b5185ee16eb50e5ab6e1dc6a34",
|
|
16
|
+
"audioLoopbackHelperSha256": "c67731e6c3e5c0f1587db09965e16a6bc2562240bbc123123abddfea3814c36c",
|
|
17
|
+
"tvosRunnerSha256": "4689dc1d1d5befec48fb023c1d3d6ba47784c1fd5f25b6cc34d5eb56a598d783",
|
|
18
|
+
"prototypeAgentSha256": "cb235e9641245d26e8095d7ac256851fb92349f30b51dc190e2e46330296da2e",
|
|
19
|
+
"prototypeViewerSha256": "549c64d1fcda565bf9a4adb1599fa61df01981cea528b83911aae442ec3d7119",
|
|
20
|
+
"networkFilterSha256": "ef11d70d6f3c954f30e67965b8fc1857039ba5da25aa60c57904f07346123990",
|
|
21
21
|
"lmkPressureArm64Sha256": "0de62ea4977e1b1be2f7fe2b646319c7988a7df89398a56caa90a0febb7a681c",
|
|
22
22
|
"lmkPressureX8664Sha256": "37a5194393e58b4e715382ff1a81d7e47ad4311307c8a2ea4e6ed76f9f1210fa"
|
|
23
23
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Prototype icon selection
|
|
2
|
+
|
|
3
|
+
`prototype-icon-names.json` is the sorted, authoritative list of 300 supported Material icon names.
|
|
4
|
+
The selection retains 147 names from repository icon fields, fixtures, goldens, samples,
|
|
5
|
+
documentation examples, icon-specific tests, legacy iOS support and Compose references (including
|
|
6
|
+
AutoMirrored icons, Playground, Kotlin and Swift). It includes the complete 49-name Material core set, adding 12 names
|
|
7
|
+
beyond that evidence, and 141 common UI names spanning navigation, actions, communication, media,
|
|
8
|
+
content, toggles, status, social and commerce. Each name supports all five Material styles.
|
|
9
|
+
|
|
10
|
+
Edit this data, then run `bun scripts/prototype/generate-prototype-icon-names.ts` to update the
|
|
11
|
+
contract enum and the [allowed icon guide](../docs/using/prototype-icons.md). The contract drives
|
|
12
|
+
TypeScript and native validation, generated models, embedded Swift data and CtrlProxy's generated
|
|
13
|
+
R8 rules. Do not edit the derived enum or R8 rules independently. Run the model, render-contract,
|
|
14
|
+
iOS contract and iOS symbol generators, then `bash scripts/update-tool-definitions.sh --no-stage`.
|
|
15
|
+
The iOS symbol generator keeps the mapping and fallback partition in contract order; mappings
|
|
16
|
+
must follow the SF Symbol availability and restriction rules in `ios/prototype-agent/ICON-SYMBOLS.md`.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
[
|
|
2
|
+
"ac_unit",
|
|
3
|
+
"access_alarm",
|
|
4
|
+
"access_time",
|
|
5
|
+
"accessibility",
|
|
6
|
+
"accessible",
|
|
7
|
+
"account_balance",
|
|
8
|
+
"account_balance_wallet",
|
|
9
|
+
"account_box",
|
|
10
|
+
"account_circle",
|
|
11
|
+
"add",
|
|
12
|
+
"add_a_photo",
|
|
13
|
+
"add_alarm",
|
|
14
|
+
"add_box",
|
|
15
|
+
"add_circle",
|
|
16
|
+
"add_circle_outline",
|
|
17
|
+
"add_photo_alternate",
|
|
18
|
+
"add_shopping_cart",
|
|
19
|
+
"airplay",
|
|
20
|
+
"alarm",
|
|
21
|
+
"alarm_add",
|
|
22
|
+
"album",
|
|
23
|
+
"analytics",
|
|
24
|
+
"android",
|
|
25
|
+
"apps",
|
|
26
|
+
"archive",
|
|
27
|
+
"arrow_back",
|
|
28
|
+
"arrow_back_ios",
|
|
29
|
+
"arrow_downward",
|
|
30
|
+
"arrow_drop_down",
|
|
31
|
+
"arrow_forward",
|
|
32
|
+
"arrow_forward_ios",
|
|
33
|
+
"arrow_left",
|
|
34
|
+
"arrow_right",
|
|
35
|
+
"arrow_upward",
|
|
36
|
+
"article",
|
|
37
|
+
"assignment",
|
|
38
|
+
"attach_file",
|
|
39
|
+
"attach_money",
|
|
40
|
+
"audiotrack",
|
|
41
|
+
"autorenew",
|
|
42
|
+
"backspace",
|
|
43
|
+
"backup",
|
|
44
|
+
"bar_chart",
|
|
45
|
+
"battery_alert",
|
|
46
|
+
"battery_charging_full",
|
|
47
|
+
"battery_full",
|
|
48
|
+
"battery_std",
|
|
49
|
+
"bedtime",
|
|
50
|
+
"block",
|
|
51
|
+
"bluetooth",
|
|
52
|
+
"bluetooth_connected",
|
|
53
|
+
"bluetooth_disabled",
|
|
54
|
+
"book",
|
|
55
|
+
"bookmark",
|
|
56
|
+
"bookmark_border",
|
|
57
|
+
"bookmarks",
|
|
58
|
+
"broken_image",
|
|
59
|
+
"brush",
|
|
60
|
+
"build",
|
|
61
|
+
"cached",
|
|
62
|
+
"calculate",
|
|
63
|
+
"calendar_month",
|
|
64
|
+
"calendar_today",
|
|
65
|
+
"call",
|
|
66
|
+
"call_end",
|
|
67
|
+
"camera",
|
|
68
|
+
"camera_alt",
|
|
69
|
+
"campaign",
|
|
70
|
+
"cancel",
|
|
71
|
+
"category",
|
|
72
|
+
"chat",
|
|
73
|
+
"chat_bubble",
|
|
74
|
+
"chat_bubble_outline",
|
|
75
|
+
"check",
|
|
76
|
+
"check_box",
|
|
77
|
+
"check_box_outline_blank",
|
|
78
|
+
"check_circle",
|
|
79
|
+
"chevron_left",
|
|
80
|
+
"chevron_right",
|
|
81
|
+
"circle",
|
|
82
|
+
"clear",
|
|
83
|
+
"close",
|
|
84
|
+
"cloud",
|
|
85
|
+
"cloud_done",
|
|
86
|
+
"cloud_download",
|
|
87
|
+
"cloud_upload",
|
|
88
|
+
"code",
|
|
89
|
+
"collections",
|
|
90
|
+
"color_lens",
|
|
91
|
+
"comment",
|
|
92
|
+
"compare_arrows",
|
|
93
|
+
"computer",
|
|
94
|
+
"contacts",
|
|
95
|
+
"content_copy",
|
|
96
|
+
"content_cut",
|
|
97
|
+
"content_paste",
|
|
98
|
+
"create",
|
|
99
|
+
"credit_card",
|
|
100
|
+
"crop",
|
|
101
|
+
"crop_169",
|
|
102
|
+
"crop_free",
|
|
103
|
+
"dark_mode",
|
|
104
|
+
"dashboard",
|
|
105
|
+
"date_range",
|
|
106
|
+
"delete",
|
|
107
|
+
"delete_forever",
|
|
108
|
+
"delete_outline",
|
|
109
|
+
"delivery_dining",
|
|
110
|
+
"description",
|
|
111
|
+
"devices",
|
|
112
|
+
"dialpad",
|
|
113
|
+
"directions",
|
|
114
|
+
"directions_bike",
|
|
115
|
+
"directions_bus",
|
|
116
|
+
"directions_car",
|
|
117
|
+
"directions_run",
|
|
118
|
+
"directions_walk",
|
|
119
|
+
"done",
|
|
120
|
+
"download",
|
|
121
|
+
"drag_handle",
|
|
122
|
+
"drag_indicator",
|
|
123
|
+
"eco",
|
|
124
|
+
"edit",
|
|
125
|
+
"edit_note",
|
|
126
|
+
"email",
|
|
127
|
+
"emoji_emotions",
|
|
128
|
+
"equalizer",
|
|
129
|
+
"error",
|
|
130
|
+
"error_outline",
|
|
131
|
+
"event",
|
|
132
|
+
"event_available",
|
|
133
|
+
"event_busy",
|
|
134
|
+
"event_note",
|
|
135
|
+
"exit_to_app",
|
|
136
|
+
"expand_less",
|
|
137
|
+
"expand_more",
|
|
138
|
+
"explore",
|
|
139
|
+
"exposure_neg_1",
|
|
140
|
+
"face",
|
|
141
|
+
"fast_forward",
|
|
142
|
+
"fast_rewind",
|
|
143
|
+
"favorite",
|
|
144
|
+
"favorite_border",
|
|
145
|
+
"feedback",
|
|
146
|
+
"file_copy",
|
|
147
|
+
"file_download",
|
|
148
|
+
"file_upload",
|
|
149
|
+
"filter_alt",
|
|
150
|
+
"filter_list",
|
|
151
|
+
"fitness_center",
|
|
152
|
+
"flag",
|
|
153
|
+
"flight",
|
|
154
|
+
"folder",
|
|
155
|
+
"folder_open",
|
|
156
|
+
"format_align_left",
|
|
157
|
+
"format_bold",
|
|
158
|
+
"format_list_bulleted",
|
|
159
|
+
"format_list_numbered",
|
|
160
|
+
"forum",
|
|
161
|
+
"fullscreen",
|
|
162
|
+
"fullscreen_exit",
|
|
163
|
+
"gps_fixed",
|
|
164
|
+
"graphic_eq",
|
|
165
|
+
"grid_view",
|
|
166
|
+
"group",
|
|
167
|
+
"group_add",
|
|
168
|
+
"groups",
|
|
169
|
+
"headphones",
|
|
170
|
+
"headset",
|
|
171
|
+
"help",
|
|
172
|
+
"help_outline",
|
|
173
|
+
"highlight_off",
|
|
174
|
+
"history",
|
|
175
|
+
"home",
|
|
176
|
+
"hotel",
|
|
177
|
+
"hourglass_empty",
|
|
178
|
+
"hourglass_full",
|
|
179
|
+
"house",
|
|
180
|
+
"image",
|
|
181
|
+
"inbox",
|
|
182
|
+
"info",
|
|
183
|
+
"keyboard_arrow_down",
|
|
184
|
+
"keyboard_arrow_left",
|
|
185
|
+
"keyboard_arrow_right",
|
|
186
|
+
"keyboard_arrow_up",
|
|
187
|
+
"layers",
|
|
188
|
+
"library_add",
|
|
189
|
+
"library_music",
|
|
190
|
+
"light_mode",
|
|
191
|
+
"link",
|
|
192
|
+
"list",
|
|
193
|
+
"local_hospital",
|
|
194
|
+
"local_movies",
|
|
195
|
+
"location_on",
|
|
196
|
+
"lock",
|
|
197
|
+
"logout",
|
|
198
|
+
"mail",
|
|
199
|
+
"mail_outline",
|
|
200
|
+
"menu",
|
|
201
|
+
"mic",
|
|
202
|
+
"mic_off",
|
|
203
|
+
"monitor_heart",
|
|
204
|
+
"more_horiz",
|
|
205
|
+
"more_vert",
|
|
206
|
+
"music_note",
|
|
207
|
+
"notifications",
|
|
208
|
+
"notifications_off",
|
|
209
|
+
"pause",
|
|
210
|
+
"person",
|
|
211
|
+
"phone",
|
|
212
|
+
"phone_iphone",
|
|
213
|
+
"photo",
|
|
214
|
+
"photo_album",
|
|
215
|
+
"photo_camera",
|
|
216
|
+
"place",
|
|
217
|
+
"play_arrow",
|
|
218
|
+
"play_circle",
|
|
219
|
+
"psychology",
|
|
220
|
+
"public",
|
|
221
|
+
"push_pin",
|
|
222
|
+
"qr_code_scanner",
|
|
223
|
+
"radio_button_checked",
|
|
224
|
+
"radio_button_unchecked",
|
|
225
|
+
"receipt",
|
|
226
|
+
"receipt_long",
|
|
227
|
+
"redo",
|
|
228
|
+
"refresh",
|
|
229
|
+
"remove",
|
|
230
|
+
"repeat",
|
|
231
|
+
"replay",
|
|
232
|
+
"reply",
|
|
233
|
+
"report_problem",
|
|
234
|
+
"restaurant",
|
|
235
|
+
"rocket_launch",
|
|
236
|
+
"satellite",
|
|
237
|
+
"save",
|
|
238
|
+
"save_alt",
|
|
239
|
+
"schedule",
|
|
240
|
+
"school",
|
|
241
|
+
"science",
|
|
242
|
+
"search",
|
|
243
|
+
"security",
|
|
244
|
+
"sell",
|
|
245
|
+
"send",
|
|
246
|
+
"sensors",
|
|
247
|
+
"settings",
|
|
248
|
+
"share",
|
|
249
|
+
"shopping_bag",
|
|
250
|
+
"shopping_basket",
|
|
251
|
+
"shopping_cart",
|
|
252
|
+
"shuffle",
|
|
253
|
+
"skip_next",
|
|
254
|
+
"skip_previous",
|
|
255
|
+
"slideshow",
|
|
256
|
+
"sms",
|
|
257
|
+
"sort",
|
|
258
|
+
"speaker",
|
|
259
|
+
"speed",
|
|
260
|
+
"star",
|
|
261
|
+
"star_border",
|
|
262
|
+
"star_half",
|
|
263
|
+
"stop",
|
|
264
|
+
"storage",
|
|
265
|
+
"store",
|
|
266
|
+
"storefront",
|
|
267
|
+
"support",
|
|
268
|
+
"swap_horiz",
|
|
269
|
+
"swap_vert",
|
|
270
|
+
"sync",
|
|
271
|
+
"system_update_alt",
|
|
272
|
+
"thumb_down",
|
|
273
|
+
"thumb_up",
|
|
274
|
+
"timer",
|
|
275
|
+
"today",
|
|
276
|
+
"toggle_off",
|
|
277
|
+
"toggle_on",
|
|
278
|
+
"touch_app",
|
|
279
|
+
"translate",
|
|
280
|
+
"trending_down",
|
|
281
|
+
"trending_up",
|
|
282
|
+
"tune",
|
|
283
|
+
"undo",
|
|
284
|
+
"update",
|
|
285
|
+
"upload",
|
|
286
|
+
"verified",
|
|
287
|
+
"verified_user",
|
|
288
|
+
"videocam",
|
|
289
|
+
"videocam_off",
|
|
290
|
+
"visibility",
|
|
291
|
+
"visibility_off",
|
|
292
|
+
"volume_down",
|
|
293
|
+
"volume_off",
|
|
294
|
+
"volume_up",
|
|
295
|
+
"wallet",
|
|
296
|
+
"warning",
|
|
297
|
+
"wifi",
|
|
298
|
+
"work",
|
|
299
|
+
"work_outline",
|
|
300
|
+
"zoom_in",
|
|
301
|
+
"zoom_out"
|
|
302
|
+
]
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{an,HR,xY,kn,CY,DY}from"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{kn as getMcpServerVersion,DY as getSettledMcpServerVersion,CY as isMcpServerVersionSettled,xY as probeCheckoutMcpServerVersion,an as releaseVersion,HR as withoutDirtyStamp};
|
|
3
|
+
|
|
4
|
+
//# debugId=78C791CAA15CF83864756E2164756E21
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{t}from"./chunk-9rkfyt6q.js";import{O,vt}from"./chunk-2v7tw1nj.js";var ne=O(function(mt,ce){ce.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Y=O(function(ue){var ae={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",MAX_OUTPUT_EXCEEDED:"Decompressed data exceeds the declared uncompressed size",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DUPLICATE_ENTRY:"Duplicate entry name {0}",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",ZIP64_VALUE_TOO_LARGE:"Zip64 value exceeds the maximum safe integer",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function je(n){return function(...f){if(f.length)n=n.replace(/\{(\d)\}/g,(r,s)=>f[s]||"");return Error("ADM-ZIP: "+n)}}for(let n of Object.keys(ae))ue[n]=je(ae[n])});var he=O(function(Lt,de){var qe=vt("fs"),_=vt("path"),Q=ne(),b=Y(),be=typeof process==="object"&&process.platform==="win32",le=(n)=>typeof n==="object"&&n!==null,Ee=new Uint32Array(256).map((n,f)=>{for(let r=0;r<8;r++)if((f&1)!==0)f=3988292384^f>>>1;else f>>>=1;return f>>>0});function P(n){if(this.sep=_.sep,this.fs=qe,le(n)){if(le(n.fs)&&typeof n.fs.statSync==="function")this.fs=n.fs}}de.exports=P;P.prototype.makeDir=function(n){let f=this;function r(s){let c=s.split(f.sep)[0];s.split(f.sep).forEach(function(d){if(!d||d.substr(-1,1)===":")return;c+=f.sep+d;var o;try{o=f.fs.statSync(c)}catch(m){if(m.message&&m.message.startsWith("ENOENT"))f.fs.mkdirSync(c);else throw m}if(o&&o.isFile())throw b.FILE_IN_THE_WAY(`"${c}"`)})}r(n)};P.prototype.writeFileTo=function(n,f,r,s){let c=this;if(c.fs.existsSync(n)){if(!r)return!1;var d=c.fs.statSync(n);if(d.isDirectory())return!1}var o=_.dirname(n);if(!c.fs.existsSync(o))c.makeDir(o);var m;try{m=c.fs.openSync(n,"w",438)}catch(S){c.fs.chmodSync(n,438),m=c.fs.openSync(n,"w",438)}if(m)try{c.fs.writeSync(m,f,0,f.length,0)}finally{c.fs.closeSync(m)}return c.fs.chmodSync(n,s||438),!0};P.prototype.writeFileToAsync=function(n,f,r,s,c){if(typeof s==="function")c=s,s=void 0;let d=this;d.fs.exists(n,function(o){if(o&&!r)return c(!1);d.fs.stat(n,function(m,S){if(o&&S&&S.isDirectory())return c(!1);var A=_.dirname(n);d.fs.exists(A,function(p){if(!p)try{d.makeDir(A)}catch(T){return c(!1)}let C=function(T){d.fs.write(T,f,0,f.length,0,function(R){d.fs.close(T,function(){if(R)return c(!1);d.fs.chmod(n,s||438,function(){c(!0)})})})};d.fs.open(n,"w",438,function(T,R){if(T)d.fs.chmod(n,438,function(){d.fs.open(n,"w",438,function(i,a){if(i||!a)return c(!1);C(a)})});else if(R)C(R);else c(!1)})})})})};P.prototype.assertPathSafe=function(n,f){let r=this;if(typeof r.fs.lstatSync!=="function")return;let s=_.resolve(n),c=_.resolve(f);if(c===s)return;let d=_.relative(s,c);if(!d||d===".."||d.startsWith(".."+_.sep)||_.isAbsolute(d))return;let o=s;for(let m of d.split(_.sep)){if(!m||m===".")continue;o=_.join(o,m);let S;try{S=r.fs.lstatSync(o)}catch(A){break}if(S.isSymbolicLink())throw b.FILE_IN_THE_WAY(`"${o}"`)}};P.prototype.findFiles=function(n){let f=this,r=typeof f.fs.lstatSync==="function",s=f.fs.realpathSync(n);function c(o){if(!r)return!1;if(!f.fs.lstatSync(o).isSymbolicLink())return!1;let m;try{m=f.fs.realpathSync(o)}catch(S){return!0}return!(m===s||m.startsWith(s+_.sep))}function d(o,m,S,A){if(typeof m==="boolean")S=m,m=void 0;let p=[];return f.fs.readdirSync(o).forEach(function(C){let T=_.join(o,C);if(c(T))return;let R=f.fs.statSync(T);if(!m||m.test(T))p.push(_.normalize(T)+(R.isDirectory()?f.sep:""));if(R.isDirectory()&&S){let i=f.fs.realpathSync(T);if(!A.has(i))A.add(i),p=p.concat(d(T,m,S,A))}}),p}return d(n,void 0,!0,new Set([s]))};P.prototype.findFilesAsync=function(n,f){let r=this,s=[],c=!1,d=function(p){if(c)return;c=!0,f(p,p?void 0:s)},o=typeof r.fs.lstat==="function",m=null,S=function(p,C){if(!o)return C(null,!1);r.fs.lstat(p,function(T,R){if(T)return C(T);if(!R||!R.isSymbolicLink())return C(null,!1);r.fs.realpath(p,function(i,a){if(i)return C(null,!0);C(null,!(a===m||a.startsWith(m+_.sep)))})})},A=function(p,C,T){r.fs.readdir(p,function(R,i){if(R)return T(R);let a=i.length;if(!a)return T();i.forEach(function(u){let E=_.join(p,u);S(E,function(h,e){if(h)return T(h);if(e){if(!--a)T();return}r.fs.stat(E,function(l,L){if(l)return T(l);if(!L){if(!--a)T();return}if(s.push(_.normalize(E)+(L.isDirectory()?r.sep:"")),!L.isDirectory()){if(!--a)T();return}r.fs.realpath(E,function(g,D){if(g)return T(g);if(C.has(D)){if(!--a)T();return}C.add(D),A(E,C,function(N){if(N)return T(N);if(!--a)T()})})})})})})};r.fs.realpath(n,function(p,C){if(p)return d(p);m=C,A(n,new Set([C]),d)})};P.prototype.getAttributes=function(){};P.prototype.setAttributes=function(){};P.crc32update=function(n,f){return Ee[(n^f)&255]^n>>>8};P.crc32=function(n){if(typeof n==="string")n=Buffer.from(n,"utf8");let f=n.length,r=-1;for(let s=0;s<f;)r=P.crc32update(r,n[s++]);return~r>>>0};P.methodToString=function(n){switch(n){case Q.STORED:return"STORED ("+n+")";case Q.DEFLATED:return"DEFLATED ("+n+")";default:return"UNSUPPORTED ("+n+")"}};P.canonical=function(n){if(!n)return"";let f=_.posix.normalize("/"+n.split("\\").join("/"));return _.join(".",f)};P.zipnamefix=function(n){if(!n)return"";let f=_.posix.normalize("/"+n.split("\\").join("/"));return _.posix.join(".",f)};P.findLast=function(n,f){if(!Array.isArray(n))throw TypeError("arr is not array");let r=n.length>>>0;for(let s=r-1;s>=0;s--)if(f(n[s],s,n))return n[s];return};P.sanitize=function(n,f){n=_.resolve(_.normalize(n));var r=f.split("/");for(var s=0,c=r.length;s<c;s++){var d=_.normalize(_.join(n,r.slice(s,c).join(_.sep)));if(d===n||d.startsWith(n+_.sep))return d}return _.normalize(_.join(n,_.basename(f)))};P.toBuffer=function(f,r){if(Buffer.isBuffer(f))return f;else if(f instanceof Uint8Array)return Buffer.from(f);else return typeof f==="string"?r(f):Buffer.alloc(0)};P.readBigUInt64LE=function(n,f){let r=n.readUInt32LE(f),c=n.readUInt32LE(f+4)*4294967296+r;if(c>Number.MAX_SAFE_INTEGER)throw b.ZIP64_VALUE_TOO_LARGE();return c};P.writeBigUInt64LE=function(n,f,r){let s=f>>>0,c=Math.floor(f/4294967296)>>>0;n.writeUInt32LE(s,r),n.writeUInt32LE(c,r+4)};P.fromDOS2Date=function(n){return new Date((n>>25&127)+1980,Math.max((n>>21&15)-1,0),Math.max(n>>16&31,1),n>>11&31,n>>5&63,(n&31)<<1)};P.fromDate2DOS=function(n){let f=0,r=0;if(n.getFullYear()>1979)f=(n.getFullYear()-1980&127)<<9|n.getMonth()+1<<5|n.getDate(),r=n.getHours()<<11|n.getMinutes()<<5|n.getSeconds()>>1;return f<<16|r};P.isWin=be;P.crcTable=Ee});var Le=O(function(Dt,Ie){var me=vt("path");Ie.exports=function(n,{fs:f}){var r=n||"",s=d(),c=null;function d(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(r&&f.existsSync(r))c=f.statSync(r),s.directory=c.isDirectory(),s.mtime=c.mtime,s.atime=c.atime,s.executable=(73&c.mode)!==0,s.readonly=(128&c.mode)===0,s.hidden=me.basename(r)[0]===".";else console.warn("Invalid path: "+r);return{get directory(){return s.directory},get readOnly(){return s.readonly},get hidden(){return s.hidden},get mtime(){return s.mtime},get atime(){return s.atime},get executable(){return s.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:s.directory,isReadOnly:s.readonly,isHidden:s.hidden,isExecutable:s.executable,mTime:s.mtime,aTime:s.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ge=O(function(gt,De){De.exports={efs:!0,encode:(n)=>Buffer.from(n,"utf8"),decode:(n)=>n.toString("utf8")}});var W=O(function(Nt,X){X.exports=he();X.exports.Constants=ne();X.exports.Errors=Y();X.exports.FileAttr=Le();X.exports.decoder=ge()});var _e=O(function(_t,Ne){var V=W(),I=V.Constants;Ne.exports=function(){var n=20,f=10,r=0,s=0,c=0,d=0,o=0,m=0,S=0,A=0,p=0,C=0,T=0,R=0,i=0;n|=V.isWin?2560:768,r|=I.FLG_EFS;let a={extraLen:0},u=(e)=>Math.max(0,e)>>>0,E=(e)=>Math.max(0,e)&65535,h=(e)=>Math.max(0,e)&255;return c=V.fromDate2DOS(new Date),{get made(){return n},set made(e){n=e},get version(){return f},set version(e){f=e},get flags(){return r},set flags(e){r=e},get flags_efs(){return(r&I.FLG_EFS)>0},set flags_efs(e){if(e)r|=I.FLG_EFS;else r&=~I.FLG_EFS},get flags_desc(){return(r&I.FLG_DESC)>0},set flags_desc(e){if(e)r|=I.FLG_DESC;else r&=~I.FLG_DESC},get method(){return s},set method(e){switch(e){case I.STORED:this.version=10;break;case I.DEFLATED:default:this.version=20}s=e},get time(){return V.fromDOS2Date(this.timeval)},set time(e){e=new Date(e),this.timeval=V.fromDate2DOS(e)},get timeval(){return c},set timeval(e){c=u(e)},get timeHighByte(){return h(c>>>8)},get crc(){return d},set crc(e){d=u(e)},get compressedSize(){return o},set compressedSize(e){o=u(e)},get size(){return m},set size(e){m=u(e)},get fileNameLength(){return S},set fileNameLength(e){S=e},get extraLength(){return A},set extraLength(e){A=e},get extraLocalLength(){return a.extraLen},set extraLocalLength(e){a.extraLen=e},get commentLength(){return p},set commentLength(e){p=e},get diskNumStart(){return C},set diskNumStart(e){C=u(e)},get inAttr(){return T},set inAttr(e){T=u(e)},get attr(){return R},set attr(e){R=u(e)},get fileAttr(){return(R||0)>>16&511},get offset(){return i},set offset(e){i=u(e)},get encrypted(){return(r&I.FLG_ENC)===I.FLG_ENC},get centralHeaderSize(){return I.CENHDR+S+A+p},get realDataOffset(){return i+I.LOCHDR+a.fnameLen+a.extraLen},get localHeader(){return a},loadLocalHeaderFromBinary:function(e){if(i<0||i+I.LOCHDR>e.length)throw V.Errors.INVALID_LOC();var l=e.slice(i,i+I.LOCHDR);if(l.readUInt32LE(0)!==I.LOCSIG)throw V.Errors.INVALID_LOC();a.version=l.readUInt16LE(I.LOCVER),a.flags=l.readUInt16LE(I.LOCFLG),a.flags_desc=(a.flags&I.FLG_DESC)>0,a.method=l.readUInt16LE(I.LOCHOW),a.time=l.readUInt32LE(I.LOCTIM),a.crc=l.readUInt32LE(I.LOCCRC),a.compressedSize=l.readUInt32LE(I.LOCSIZ),a.size=l.readUInt32LE(I.LOCLEN),a.fnameLen=l.readUInt16LE(I.LOCNAM),a.extraLen=l.readUInt16LE(I.LOCEXT);let L=i+I.LOCHDR+a.fnameLen,g=L+a.extraLen;return e.slice(L,g)},loadFromBinary:function(e){if(e.length!==I.CENHDR||e.readUInt32LE(0)!==I.CENSIG)throw V.Errors.INVALID_CEN();n=e.readUInt16LE(I.CENVEM),f=e.readUInt16LE(I.CENVER),r=e.readUInt16LE(I.CENFLG),s=e.readUInt16LE(I.CENHOW),c=e.readUInt32LE(I.CENTIM),d=e.readUInt32LE(I.CENCRC),o=e.readUInt32LE(I.CENSIZ),m=e.readUInt32LE(I.CENLEN),S=e.readUInt16LE(I.CENNAM),A=e.readUInt16LE(I.CENEXT),p=e.readUInt16LE(I.CENCOM),C=e.readUInt16LE(I.CENDSK),T=e.readUInt16LE(I.CENATT),R=e.readUInt32LE(I.CENATX),i=e.readUInt32LE(I.CENOFF)},localHeaderToBinary:function(){var e=Buffer.alloc(I.LOCHDR);return e.writeUInt32LE(I.LOCSIG,0),e.writeUInt16LE(f,I.LOCVER),e.writeUInt16LE(r&~I.FLG_DESC,I.LOCFLG),e.writeUInt16LE(s,I.LOCHOW),e.writeUInt32LE(c,I.LOCTIM),e.writeUInt32LE(d,I.LOCCRC),e.writeUInt32LE(o,I.LOCSIZ),e.writeUInt32LE(m,I.LOCLEN),e.writeUInt16LE(S,I.LOCNAM),e.writeUInt16LE(a.extraLen,I.LOCEXT),e},centralHeaderToBinary:function(){var e=Buffer.alloc(I.CENHDR+S+A+p);return e.writeUInt32LE(I.CENSIG,0),e.writeUInt16LE(n,I.CENVEM),e.writeUInt16LE(f,I.CENVER),e.writeUInt16LE(r&~I.FLG_DESC,I.CENFLG),e.writeUInt16LE(s,I.CENHOW),e.writeUInt32LE(c,I.CENTIM),e.writeUInt32LE(d,I.CENCRC),e.writeUInt32LE(o,I.CENSIZ),e.writeUInt32LE(m,I.CENLEN),e.writeUInt16LE(S,I.CENNAM),e.writeUInt16LE(A,I.CENEXT),e.writeUInt16LE(p,I.CENCOM),e.writeUInt16LE(C,I.CENDSK),e.writeUInt16LE(T,I.CENATT),e.writeUInt32LE(R,I.CENATX),e.writeUInt32LE(i,I.CENOFF),e},toJSON:function(){let e=function(l){return l+" bytes"};return{made:n,version:f,flags:r,method:V.methodToString(s),time:this.time,crc:"0x"+d.toString(16).toUpperCase(),compressedSize:e(o),size:e(m),fileNameLength:e(S),extraLength:e(A),commentLength:e(p),diskNumStart:C,inAttr:T,attr:R,offset:i,centralHeaderSize:e(I.CENHDR+S+A+p)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var pe=O(function(yt,ye){var G=W(),y=G.Constants;ye.exports=function(){var n=0,f=0,r=0,s=0,c=0;let d=()=>n>y.EF_ZIP64_OR_16||f>y.EF_ZIP64_OR_16||r>y.EF_ZIP64_OR_32||s>y.EF_ZIP64_OR_32;return{get diskEntries(){return n},set diskEntries(o){n=f=o},get totalEntries(){return f},set totalEntries(o){f=n=o},get size(){return r},set size(o){r=o},get offset(){return s},set offset(o){s=o},get commentLength(){return c},set commentLength(o){c=o},get mainHeaderSize(){return(d()?y.ZIP64HDR+y.END64HDR:0)+y.ENDHDR+c},loadFromBinary:function(o){if((o.length!==y.ENDHDR||o.readUInt32LE(0)!==y.ENDSIG)&&(o.length<y.ZIP64HDR||o.readUInt32LE(0)!==y.ZIP64SIG))throw G.Errors.INVALID_END();if(o.readUInt32LE(0)===y.ENDSIG)n=o.readUInt16LE(y.ENDSUB),f=o.readUInt16LE(y.ENDTOT),r=o.readUInt32LE(y.ENDSIZ),s=o.readUInt32LE(y.ENDOFF),c=o.readUInt16LE(y.ENDCOM);else n=G.readBigUInt64LE(o,y.ZIP64SUB),f=G.readBigUInt64LE(o,y.ZIP64TOT),r=G.readBigUInt64LE(o,y.ZIP64SIZB),s=G.readBigUInt64LE(o,y.ZIP64OFF),c=0},toBinary:function(){if(!d()){var o=Buffer.alloc(y.ENDHDR+c);return o.writeUInt32LE(y.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(n,y.ENDSUB),o.writeUInt16LE(f,y.ENDTOT),o.writeUInt32LE(r,y.ENDSIZ),o.writeUInt32LE(s,y.ENDOFF),o.writeUInt16LE(c,y.ENDCOM),o.fill(" ",y.ENDHDR),o}var o=Buffer.alloc(this.mainHeaderSize);let m=0;o.writeUInt32LE(y.ZIP64SIG,m),G.writeBigUInt64LE(o,y.ZIP64HDR-y.ZIP64LEAD,m+y.ZIP64SIZE),o.writeUInt16LE(45,m+y.ZIP64VEM),o.writeUInt16LE(45,m+y.ZIP64VER),o.writeUInt32LE(0,m+y.ZIP64DSK),o.writeUInt32LE(0,m+y.ZIP64DSKDIR),G.writeBigUInt64LE(o,n,m+y.ZIP64SUB),G.writeBigUInt64LE(o,f,m+y.ZIP64TOT),G.writeBigUInt64LE(o,r,m+y.ZIP64SIZB),G.writeBigUInt64LE(o,s,m+y.ZIP64OFF);let S=s+r;return m+=y.ZIP64HDR,o.writeUInt32LE(y.END64SIG,m),o.writeUInt32LE(0,m+y.END64START),G.writeBigUInt64LE(o,S,m+y.END64OFF),o.writeUInt32LE(1,m+y.END64NUMDISKS),m+=y.END64HDR,o.writeUInt32LE(y.ENDSIG,m),o.writeUInt32LE(0,m+4),o.writeUInt16LE(Math.min(n,y.EF_ZIP64_OR_16),m+y.ENDSUB),o.writeUInt16LE(Math.min(f,y.EF_ZIP64_OR_16),m+y.ENDTOT),o.writeUInt32LE(Math.min(r,y.EF_ZIP64_OR_32),m+y.ENDSIZ),o.writeUInt32LE(Math.min(s,y.EF_ZIP64_OR_32),m+y.ENDOFF),o.writeUInt16LE(c,m+y.ENDCOM),o.fill(" ",m+y.ENDHDR),o},toJSON:function(){let o=function(m,S){let A=m.toString(16).toUpperCase();while(A.length<S)A="0"+A;return"0x"+A};return{diskEntries:n,totalEntries:f,size:r+" bytes",offset:o(s,4),commentLength:c}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var re=O(function(Xe){Xe.EntryHeader=_e();Xe.MainHeader=pe()});var Se=O(function(Ct,Ce){Ce.exports=function(n){var f=vt("zlib"),r={chunkSize:(parseInt(n.length/1024)+1)*1024};return{deflate:function(){return f.deflateRawSync(n,r)},deflateAsync:function(s){var c=f.createDeflateRaw(r),d=[],o=0;c.on("data",function(m){d.push(m),o+=m.length}),c.on("end",function(){var m=Buffer.alloc(o),S=0;m.fill(0);for(var A=0;A<d.length;A++){var p=d[A];p.copy(m,S),S+=p.length}s&&s(m)}),c.end(n)}}}});var Te=O(function(St,Ae){var Ye=+(process?.versions?.node??"").split(".")[0]||0,Oe=Y();Ae.exports=function(n,f){var r=vt("zlib");let s=f>0?f:1,c=Ye>=15?{maxOutputLength:s}:{};return{inflate:function(){return r.inflateRawSync(n,c)},inflateAsync:function(d){var o=r.createInflateRaw(c),m=[],S=0,A=!1;let p=function(C){if(A)return;A=!0,o.destroy(),d&&d(Buffer.alloc(0),C)};o.on("error",function(C){p(C)}),o.on("data",function(C){if(A)return;if(S+=C.length,S>s)return p(Oe.MAX_OUTPUT_EXCEEDED());m.push(C)}),o.on("end",function(){if(A)return;A=!0;var C=Buffer.alloc(S),T=0;C.fill(0);for(var R=0;R<m.length;R++){var i=m[R];i.copy(C,T),T+=i.length}d&&d(C)}),o.end(n)}}}});var Be=O(function(Ot,Ue){var{randomFillSync:Fe}=vt("crypto"),xe=Y(),Je=new Uint32Array(256).map((n,f)=>{for(let r=0;r<8;r++)if((f&1)!==0)f=f>>>1^3988292384;else f>>>=1;return f>>>0}),we=(n,f)=>Math.imul(n,f)>>>0,Re=(n,f)=>Je[(n^f)&255]^n>>>8,J=()=>{if(typeof Fe==="function")return Fe(Buffer.alloc(12));else return J.node()};J.node=()=>{let n=Buffer.alloc(12),f=n.length;for(let r=0;r<f;r++)n[r]=Math.random()*256&255;return n};var ee={genSalt:J};function te(n){let f=Buffer.isBuffer(n)?n:Buffer.from(n);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<f.length;r++)this.updateKeys(f[r])}te.prototype.updateKeys=function(n){let f=this.keys;return f[0]=Re(f[0],n),f[1]+=f[0]&255,f[1]=we(f[1],134775813)+1,f[2]=Re(f[2],f[1]>>>24),n};te.prototype.next=function(){let n=(this.keys[2]|2)>>>0;return we(n,n^1)>>8&255};function $e(n){let f=new te(n);return function(r){let s=Buffer.alloc(r.length),c=0;for(let d of r)s[c++]=f.updateKeys(d^f.next());return s}}function ke(n){let f=new te(n);return function(r,s,c=0){if(!s)s=Buffer.alloc(r.length);for(let d of r){let o=f.next();s[c++]=d^o,f.updateKeys(d)}return s}}function Qe(n,f,r){if(!n||!Buffer.isBuffer(n)||n.length<12)return Buffer.alloc(0);let s=$e(r),c=s(n.slice(0,12)),d=(f.flags&8)===8?f.timeHighByte:f.crc>>>24;if(c[11]!==d)throw xe.WRONG_PASSWORD();return s(n.slice(12))}function et(n){if(Buffer.isBuffer(n)&&n.length>=12)ee.genSalt=function(){return n.slice(0,12)};else if(n==="node")ee.genSalt=J.node;else ee.genSalt=J}function tt(n,f,r,s=!1){if(n==null)n=Buffer.alloc(0);if(!Buffer.isBuffer(n))n=Buffer.from(n.toString());let c=ke(r),d=ee.genSalt();if(d[11]=f.crc>>>24&255,s)d[10]=f.crc>>>16&255;let o=Buffer.alloc(n.length+12);return c(d,o),c(n,o,12)}Ue.exports={decrypt:Qe,encrypt:tt,_salter:et}});var Ze=O(function(nt){nt.Deflater=Se();nt.Inflater=Te();nt.ZipCrypto=Be()});var ie=O(function(Tt,ve){var v=W(),st=re(),z=v.Constants,oe=Ze();ve.exports=function(n,f){var r=new st.EntryHeader,s=Buffer.alloc(0),c=Buffer.alloc(0),d=!1,o=null,m=Buffer.alloc(0),S=Buffer.alloc(0),A=!0;let p=n,C=typeof p.decoder==="object"?p.decoder:v.decoder;A=C.hasOwnProperty("efs")?C.efs:!1;function T(){if(!f||!(f instanceof Uint8Array))return Buffer.alloc(0);S=r.loadLocalHeaderFromBinary(f);let e=r.realDataOffset,l=e+r.compressedSize;if(e<0||l<e||l>f.length)throw v.Errors.INVALID_LOC();return f.slice(e,l)}function R(e){let l=r.flags_desc||r.localHeader.flags_desc?r.crc:r.localHeader.crc;return v.crc32(e)===l}function i(e,l,L){if(typeof l>"u"&&typeof e==="string")L=e,e=void 0;if(d){if(e&&l)l(Buffer.alloc(0),v.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var g;try{if(g=T(),g.length===0){if(e&&l)l(g);return g}if(r.encrypted){if(typeof L!=="string"&&!Buffer.isBuffer(L))throw v.Errors.INVALID_PASS_PARAM();g=oe.ZipCrypto.decrypt(g,r,L)}}catch(x){if(e&&l)return l(Buffer.alloc(0),x),Buffer.alloc(0);throw x}var D;switch(r.method){case v.Constants.STORED:if(D=Buffer.alloc(g.length),g.copy(D),!R(D)){if(e&&l)l(D,v.Errors.BAD_CRC());throw v.Errors.BAD_CRC()}else{if(e&&l)l(D);return D}case v.Constants.DEFLATED:var N=new oe.Inflater(g,r.size);if(!e){if(D=N.inflate(),!R(D))throw v.Errors.BAD_CRC(`"${C.decode(s)}"`);return D}else N.inflateAsync(function(x,U){if(!l)return;if(U)l(Buffer.alloc(0),U);else if(!R(x))l(x,v.Errors.BAD_CRC());else l(x)});break;default:if(e&&l)l(Buffer.alloc(0),v.Errors.UNKNOWN_METHOD());throw v.Errors.UNKNOWN_METHOD()}}function a(e,l){if((!o||!o.length)&&Buffer.isBuffer(f)){if(e&&l)l(T());return T()}if(o.length&&!d){var L;switch(r.method){case v.Constants.STORED:if(r.compressedSize=r.size,L=Buffer.alloc(o.length),o.copy(L),e&&l)l(L);return L;default:case v.Constants.DEFLATED:var g=new oe.Deflater(o);if(!e){var D=g.deflate();return r.compressedSize=D.length,D}else g.deflateAsync(function(N){L=Buffer.alloc(N.length),r.compressedSize=N.length,N.copy(L),l&&l(L)});g=null;break}}else if(e&&l)l(Buffer.alloc(0));else return Buffer.alloc(0)}function u(e,l){return v.readBigUInt64LE(e,l)}function E(e){try{var l=0,L,g,D;while(l+4<e.length)if(L=e.readUInt16LE(l),l+=2,g=e.readUInt16LE(l),l+=2,D=e.slice(l,l+g),l+=g,z.ID_ZIP64===L)h(D)}catch(N){throw v.Errors.EXTRA_FIELD_PARSE_ERROR()}}function h(e){var l,L,g,D;if(e.length>=z.EF_ZIP64_SCOMP){if(l=u(e,z.EF_ZIP64_SUNCOMP),r.size===z.EF_ZIP64_OR_32)r.size=l}if(e.length>=z.EF_ZIP64_RHO){if(L=u(e,z.EF_ZIP64_SCOMP),r.compressedSize===z.EF_ZIP64_OR_32)r.compressedSize=L}if(e.length>=z.EF_ZIP64_DSN){if(g=u(e,z.EF_ZIP64_RHO),r.offset===z.EF_ZIP64_OR_32)r.offset=g}if(e.length>=z.EF_ZIP64_DSN+4){if(D=e.readUInt32LE(z.EF_ZIP64_DSN),r.diskNumStart===z.EF_ZIP64_OR_16)r.diskNumStart=D}}return{get entryName(){return C.decode(s)},get rawEntryName(){return s},set entryName(e){s=v.toBuffer(e,C.encode);var l=s[s.length-1];d=l===47||l===92,r.fileNameLength=s.length},get efs(){if(typeof A==="function")return A(this.entryName);else return A},get extra(){return m},set extra(e){m=e,r.extraLength=e.length,E(e)},get comment(){return C.decode(c)},set comment(e){if(c=v.toBuffer(e,C.encode),r.commentLength=c.length,c.length>65535)throw v.Errors.COMMENT_TOO_LONG()},get name(){let e=C.decode(s);return d?e.replace(/[/\\]$/,"").split("/").pop():e.split("/").pop()},get isDirectory(){return d},getCompressedData:function(){return a(!1,null)},getCompressedDataAsync:function(e){a(!0,e)},setData:function(e){if(o=v.toBuffer(e,v.decoder.encode),!d&&o.length)r.size=o.length,r.method=v.Constants.DEFLATED,r.crc=v.crc32(e),r.changed=!0;else r.method=v.Constants.STORED},getData:function(e){if(r.changed)return o;else return i(!1,null,e)},getDataAsync:function(e,l){if(r.changed)e(o);else i(!0,e,l)},set attr(e){r.attr=e},get attr(){return r.attr},set header(e){r.loadFromBinary(e)},get header(){return r},packCentralHeader:function(){r.flags_efs=this.efs,r.extraLength=m.length;var e=r.centralHeaderToBinary(),l=v.Constants.CENHDR;return s.copy(e,l),l+=s.length,m.copy(e,l),l+=r.extraLength,c.copy(e,l),e},packLocalHeader:function(){let e=0;r.flags_efs=this.efs,r.extraLocalLength=S.length;let l=r.localHeaderToBinary(),L=Buffer.alloc(l.length+s.length+r.extraLocalLength);return l.copy(L,e),e+=l.length,s.copy(L,e),e+=s.length,S.copy(L,e),e+=S.length,L},toJSON:function(){let e=function(l){return"<"+(l&&l.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:r.toJSON(),compressedData:e(f),data:e(o)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ze=O(function(Ft,Me){var Pe=ie(),He=re(),B=W();Me.exports=function(n,f){var r=[],s=Object.create(null),c=Buffer.alloc(0),d=new He.MainHeader,o=!1,m=null;let S=new Set,A=f,{noSort:p,decoder:C}=A;if(n)i(A.readEntries);else o=!0;function T(){let u=new Set;for(let E of Object.keys(s)){let h=E.split("/");if(h.pop(),!h.length)continue;for(let e=0;e<h.length;e++){let l=h.slice(0,e+1).join("/")+"/";u.add(l)}}for(let E of u)if(!(E in s)){let h=new Pe(A);h.entryName=E,h.attr=16,h.temporary=!0,r.push(h),s[h.entryName]=h,S.add(h)}}function R(){if(o=!0,s=Object.create(null),d.diskEntries>(n.length-d.offset)/B.Constants.CENHDR)throw B.Errors.DISK_ENTRY_TOO_LARGE();r=Array(d.diskEntries);var u=d.offset;for(var E=0;E<r.length;E++){var h=u,e=new Pe(A,n);if(e.header=n.slice(h,h+=B.Constants.CENHDR),e.entryName=n.slice(h,h+=e.header.fileNameLength),e.header.extraLength)e.extra=n.slice(h,h+=e.header.extraLength);if(e.header.commentLength)e.comment=n.slice(h,h+e.header.commentLength);if(u+=e.header.centralHeaderSize,e.entryName in s)throw B.Errors.DUPLICATE_ENTRY(`"${e.entryName}"`);r[E]=e,s[e.entryName]=e}S.clear(),T()}function i(u){var E=n.length-B.Constants.ENDHDR,h=Math.max(0,E-65535),e=h,l=n.length,L=-1,g=0;if(typeof A.trailingSpace==="boolean"?A.trailingSpace:!1)h=0;for(E;E>=e;E--){if(n[E]!==80)continue;if(n.readUInt32LE(E)===B.Constants.ENDSIG){L=E,g=E,l=E+B.Constants.ENDHDR,e=E-B.Constants.END64HDR;continue}if(n.readUInt32LE(E)===B.Constants.END64SIG){e=h;continue}if(n.readUInt32LE(E)===B.Constants.ZIP64SIG){L=E,l=E+B.readBigUInt64LE(n,E+B.Constants.ZIP64SIZE)+B.Constants.ZIP64LEAD;break}}if(L==-1)throw B.Errors.INVALID_FORMAT();if(d.loadFromBinary(n.slice(L,l)),d.commentLength)c=n.slice(g+B.Constants.ENDHDR);if(u)R()}function a(){if(r.length>1&&!p)r=r.map((u)=>({entry:u,key:u.entryName.toLowerCase()})).sort((u,E)=>u.key.localeCompare(E.key)).map((u)=>u.entry)}return{get entries(){if(!o)R();return r.filter((u)=>!S.has(u))},get comment(){return C.decode(c)},set comment(u){c=B.toBuffer(u,C.encode),d.commentLength=c.length},getEntryCount:function(){if(!o)return d.diskEntries;return r.length},forEach:function(u){this.entries.forEach(u)},getEntry:function(u){if(!o)R();return s[u]||null},setEntry:function(u){if(!o)R();r.push(u),s[u.entryName]=u,d.totalEntries=r.length},deleteFile:function(u,E=!0){if(!o)R();let h=s[u];this.getEntryChildren(h,E).map((l)=>l.entryName).forEach(this.deleteEntry)},deleteEntry:function(u){if(!o)R();let E=s[u],h=r.indexOf(E);if(h>=0)r.splice(h,1),delete s[u],d.totalEntries=r.length},getEntryChildren:function(u,E=!0){if(!o)R();if(typeof u==="object")if(u.isDirectory&&E){let h=[],e=u.entryName;for(let l of r)if(l.entryName.startsWith(e))h.push(l);return h}else return[u];return[]},getChildCount:function(u){if(u&&u.isDirectory){let E=this.getEntryChildren(u);return E.includes(u)?E.length-1:E.length}return 0},compressToBuffer:function(){if(!o)R();a();let u=[],E=[],h=0,e=0;d.size=0,d.offset=0;let l=0;for(let D of this.entries){let N=D.getCompressedData();D.header.offset=e;let x=D.packLocalHeader(),U=x.length+N.length;e+=U,u.push(x),u.push(N);let Z=D.packCentralHeader();E.push(Z),d.size+=Z.length,h+=U+Z.length,l++}h+=d.mainHeaderSize,d.offset=e,d.totalEntries=l,e=0;let L=Buffer.alloc(h);for(let D of u)D.copy(L,e),e+=D.length;for(let D of E)D.copy(L,e),e+=D.length;let g=d.toBinary();if(c)c.copy(g,g.length-c.length);return g.copy(L,e),n=L,o=!1,L},toAsyncBuffer:function(u,E,h,e){try{if(!o)R();a();let l=[],L=[],g=0,D=0,N=0;d.size=0,d.offset=0;let x=function(U){if(U.length>0){let Z=U.shift(),H=Z.entryName+Z.extra.toString();if(h)h(H);Z.getCompressedDataAsync(function(M){if(e)e(H);Z.header.offset=D;let j=Z.packLocalHeader(),k=j.length+M.length;D+=k,l.push(j),l.push(M);let K=Z.packCentralHeader();L.push(K),d.size+=K.length,g+=k+K.length,N++,x(U)})}else{g+=d.mainHeaderSize,d.offset=D,d.totalEntries=N,D=0;let Z=Buffer.alloc(g);l.forEach(function(M){M.copy(Z,D),D+=M.length}),L.forEach(function(M){M.copy(Z,D),D+=M.length});let H=d.toBinary();if(c)c.copy(H,H.length-c.length);H.copy(Z,D),n=Z,o=!1,u(Z)}};x(Array.from(this.entries))}catch(l){E(l)}}}}});var fd=O(function(Rt,Ve){var w=W(),F=vt("path"),ft=ie(),ct=ze(),q=(...n)=>w.findLast(n,(f)=>typeof f==="boolean"),Ge=(...n)=>w.findLast(n,(f)=>typeof f==="string"),at=(...n)=>w.findLast(n,(f)=>typeof f==="function"),ut={noSort:!1,readEntries:!1,method:w.Constants.NONE,fs:null};Ve.exports=function(n,f){let r=null,s=Object.assign(Object.create(null),ut);if(n&&typeof n==="object"){if(!(n instanceof Uint8Array)){if(Object.assign(s,n),n=s.input?s.input:void 0,s.input)delete s.input}if(Buffer.isBuffer(n))r=n,s.method=w.Constants.BUFFER,n=void 0}Object.assign(s,f);let c=new w(s),d=(i)=>{i.filter((a)=>a.attr).sort((a,u)=>u.path.length-a.path.length).forEach((a)=>c.fs.chmodSync(a.path,a.attr))};if(typeof s.decoder!=="object"||typeof s.decoder.encode!=="function"||typeof s.decoder.decode!=="function")s.decoder=w.decoder;if(n&&typeof n==="string")if(c.fs.existsSync(n))s.method=w.Constants.FILE,s.filename=n,r=c.fs.readFileSync(n);else throw w.Errors.INVALID_FILENAME();let o=new ct(r,s),{canonical:m,sanitize:S,zipnamefix:A}=w;function p(i){if(i&&o){var a;if(typeof i==="string")a=o.getEntry(F.posix.normalize(i));if(typeof i==="object"&&typeof i.entryName<"u"&&typeof i.header<"u")a=o.getEntry(i.entryName);if(a)return a}return null}function C(i){let{join:a,normalize:u,sep:E}=F.posix;return a(F.isAbsolute(i)?"/":".",u(E+i.split("\\").join(E)+E))}function T(i){if(i instanceof RegExp)return function(a){return function(u){return a.test(u)}}(i);else if(typeof i!=="function")return()=>!0;return i}let R=(i,a)=>{let u=a.slice(-1);return u=u===c.sep?c.sep:"",F.relative(i,a)+u};return{readFile:function(i,a){var u=p(i);return u&&u.getData(a)||null},childCount:function(i){let a=p(i);if(a)return o.getChildCount(a)},readFileAsync:function(i,a){var u=p(i);if(u)u.getDataAsync(a);else a(null,"getEntry failed for:"+i)},readAsText:function(i,a){var u=p(i);if(u){var E=u.getData();if(E&&E.length)return E.toString(a||"utf8")}return""},readAsTextAsync:function(i,a,u){var E=p(i);if(E)E.getDataAsync(function(h,e){if(e){a(h,e);return}if(h&&h.length)a(h.toString(u||"utf8"));else a("")});else a("")},deleteFile:function(i,a=!0){var u=p(i);if(u)o.deleteFile(u.entryName,a)},deleteEntry:function(i){var a=p(i);if(a)o.deleteEntry(a.entryName)},addZipComment:function(i){o.comment=i},getZipComment:function(){return o.comment||""},addZipEntryComment:function(i,a){var u=p(i);if(u)u.comment=a},getZipEntryComment:function(i){var a=p(i);if(a)return a.comment||"";return""},updateFile:function(i,a){var u=p(i);if(u)u.setData(a)},addLocalFile:function(i,a,u,E){if(c.fs.existsSync(i)){a=a?C(a):"";let h=F.win32.basename(F.win32.normalize(i));a+=u?u:h;let e=c.fs.statSync(i),l=e.isFile()?c.fs.readFileSync(i):Buffer.alloc(0);if(e.isDirectory())a+=c.sep;this.addFile(a,l,E,e)}else throw w.Errors.FILE_NOT_FOUND(i)},addLocalFileAsync:function(i,a){i=typeof i==="object"?i:{localPath:i};let u=F.resolve(i.localPath),{comment:E}=i,{zipPath:h,zipName:e}=i,l=this;c.fs.stat(u,function(L,g){if(L)return a(L,!1);h=h?C(h):"";let D=F.win32.basename(F.win32.normalize(u));if(h+=e?e:D,g.isFile())c.fs.readFile(u,function(N,x){if(N)return a(N,!1);return l.addFile(h,x,E,g),setImmediate(a,void 0,!0)});else if(g.isDirectory())return h+=c.sep,l.addFile(h,Buffer.alloc(0),E,g),setImmediate(a,void 0,!0)})},addLocalFolder:function(i,a,u){if(u=T(u),a=a?C(a):"",i=F.normalize(i),c.fs.existsSync(i)){let E=c.findFiles(i),h=this;if(E.length)for(let e of E){let l=F.join(a,R(i,e));if(u(l))h.addLocalFile(e,F.dirname(l))}}else throw w.Errors.FILE_NOT_FOUND(i)},addLocalFolderAsync:function(i,a,u,E){E=T(E),u=u?C(u):"",i=F.normalize(i);var h=this;c.fs.open(i,"r",function(e){if(e&&e.code==="ENOENT")a(void 0,w.Errors.FILE_NOT_FOUND(i));else if(e)a(void 0,e);else{var l=c.findFiles(i),L=-1,g=function(){if(L+=1,L<l.length){var D=l[L],N=R(i,D).split("\\").join("/");if(N=N.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),E(N))c.fs.stat(D,function(x,U){if(x)a(void 0,x);if(U.isFile())c.fs.readFile(D,function(Z,H){if(Z)a(void 0,Z);else h.addFile(u+N,H,"",U),g()});else h.addFile(u+N+"/",Buffer.alloc(0),"",U),g()});else process.nextTick(()=>{g()})}else a(!0,void 0)};g()}})},addLocalFolderAsync2:function(i,a){let u=this;i=typeof i==="object"?i:{localPath:i};let E=F.resolve(i.localPath),{zipPath:h,filter:e,namefix:l}=i;if(e instanceof RegExp)e=function(D){return function(N){return D.test(N)}}(e);else if(typeof e!=="function")e=function(){return!0};if(h=h?C(h):"",l==="latin1")l=(D)=>D.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof l!=="function")l=(D)=>D;let L=(D)=>F.join(h,l(R(E,D))),g=(D)=>F.win32.basename(F.win32.normalize(l(D)));c.fs.open(E,"r",function(D){if(D&&D.code==="ENOENT")a(w.Errors.FILE_NOT_FOUND(E),!1);else if(D)a(D,!1);else c.findFilesAsync(E,function(N,x){if(N)return a(N,!1);if(x=x.filter((U)=>e(L(U))),!x.length)return a(void 0,!0);setImmediate(x.reverse().reduce(function(U,Z){return function(H,M){if(H||M===!1)return setImmediate(U,H,!1);u.addLocalFileAsync({localPath:Z,zipPath:F.dirname(L(Z)),zipName:g(Z)},U)}},a))})})},addLocalFolderPromise:function(i,a){return new Promise((u,E)=>{this.addLocalFolderAsync2(Object.assign({localPath:i},a),(h,e)=>{if(h)return E(h);if(e)u(this)})})},addFile:function(i,a,u,E){i=A(i);let h=p(i),e=h!=null;if(!e)h=new ft(s),h.entryName=i;h.comment=u||"";let l=typeof E==="object"&&E instanceof c.fs.Stats;if(l)h.header.time=E.mtime;var L=h.isDirectory?16:0;let g=h.isDirectory?16384:32768;if(l)g|=4095&E.mode;else if(typeof E==="number")g|=4095&E;else g|=h.isDirectory?493:420;if(L=(L|g<<16)>>>0,h.attr=L,h.setData(a),!e)o.setEntry(h);return h},getEntries:function(i){return o.password=i,o?o.entries:[]},getEntry:function(i){return p(i)},getEntryCount:function(){return o.getEntryCount()},forEach:function(i){return o.forEach(i)},extractEntryTo:function(i,a,u,E,h,e){E=q(!1,E),h=q(!1,h),u=q(!0,u),e=Ge(h,e);var l=p(i);if(!l)throw w.Errors.NO_ENTRY();var L=m(l.entryName),g=S(a,e&&!l.isDirectory?m(e):u?L:F.basename(L));if(l.isDirectory){var D=o.getEntryChildren(l);return D.forEach(function(U){if(U.isDirectory)return;var Z=U.getData();if(!Z)throw w.Errors.CANT_EXTRACT_FILE();var H=m(u?U.entryName:U.entryName.substring(l.entryName.length)),M=S(a,H);c.assertPathSafe(a,M);let j=h?U.header.fileAttr:void 0;c.writeFileTo(M,Z,E,j)}),!0}var N=l.getData(o.password);if(!N)throw w.Errors.CANT_EXTRACT_FILE();if(c.assertPathSafe(a,g),c.fs.existsSync(g)&&!E)throw w.Errors.CANT_OVERRIDE();let x=h?i.header.fileAttr:void 0;return c.writeFileTo(g,N,E,x),!0},test:function(i){if(!o)return!1;for(var a of o.entries)try{if(a.isDirectory)continue;var u=a.getData(i);if(!u)return!1}catch(E){return!1}return!0},extractAllTo:function(i,a,u,E){if(u=q(!1,u),E=Ge(u,E),a=q(!1,a),!o)throw w.Errors.NO_ZIP();let h=[];o.entries.forEach(function(e){var l=S(i,m(e.entryName));if(c.assertPathSafe(i,l),e.isDirectory){if(c.makeDir(l),u)h.push({path:l,attr:e.header.fileAttr});return}var L=e.getData(E);if(!L)throw w.Errors.CANT_EXTRACT_FILE();let g=u?e.header.fileAttr:void 0;c.writeFileTo(l,L,a,g);try{c.fs.utimesSync(l,e.header.time,e.header.time)}catch(D){}}),d(h)},extractAllToAsync:function(i,a,u,E){if(E=at(a,u,E),u=q(!1,u),a=q(!1,a),!E)return new Promise((N,x)=>{this.extractAllToAsync(i,a,u,function(U){if(U)x(U);else N(this)})});if(!o){E(w.Errors.NO_ZIP());return}i=F.resolve(i);let h=(N)=>S(i,F.normalize(m(N.entryName))),e=(N,x)=>Error(N+': "'+x+'"'),l=[],L=[];o.entries.forEach((N)=>{if(N.isDirectory)l.push(N);else L.push(N)});let g=[];for(let N of l){let x=h(N),U=u?N.header.fileAttr:void 0;try{c.assertPathSafe(i,x),c.makeDir(x)}catch(Z){E(e("Unable to create folder",x));continue}if(U)g.push({path:x,attr:U});try{c.fs.utimesSync(x,N.header.time,N.header.time)}catch(Z){}}let D=(N)=>{if(!N)try{d(g)}catch(x){return E(e("Unable to set folder permissions",x.path||""))}E(N)};L.reverse().reduce(function(N,x){return function(U){if(U)N(U);else{let Z=F.normalize(m(x.entryName)),H=S(i,Z);try{c.assertPathSafe(i,H)}catch(M){return N(M)}x.getDataAsync(function(M,j){if(j)N(j);else if(!M)N(w.Errors.CANT_EXTRACT_FILE());else{let k=u?x.header.fileAttr:void 0;c.writeFileToAsync(H,M,a,k,function(K){if(!K)return N(e("Unable to write file",H));c.fs.utimes(H,x.header.time,x.header.time,function(){N()})})}})}}},D)()},writeZip:function(i,a){if(arguments.length===1){if(typeof i==="function")a=i,i=""}if(!i&&s.filename)i=s.filename;if(!i)return;var u=o.compressToBuffer();if(u){var E=c.writeFileTo(i,u,!0);if(typeof a==="function")a(!E?Error("failed"):null,"")}},writeZipPromise:function(i,a){let{overwrite:u,perm:E}=Object.assign({overwrite:!0},a);return new Promise((h,e)=>{if(!i&&s.filename)i=s.filename;if(!i)e("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((l)=>{let L=(g)=>g?h(g):e("ADM-ZIP: Wasn't able to write zip file");c.writeFileToAsync(i,l,u,E,L)},e)})},toBufferPromise:function(){return new Promise((i,a)=>{o.toAsyncBuffer(i,a)})},toBuffer:function(i,a,u,E){if(typeof i==="function")return o.toAsyncBuffer(i,a,u,E),null;return o.compressToBuffer()}}}});import*as fe from"path";import*as se from"path";function Pc(n,f,r={}){let s=r.paths??se,c=s.resolve(n),d=s.resolve(c,f),o=s.relative(c,d);if(o==="")return r.allowEqual??!0;return!(o===".."||o.startsWith(`..${s.sep}`)||s.isAbsolute(o))}function Yie(n,f,r,s={}){if(!Pc(n,f,s))throw r();let c=s.paths??se;return c.resolve(c.resolve(n),f)}function f$(n,f,r="CtrlProxy bundle"){let s=fe.resolve(f);for(let c of n.getEntries())if(!Pc(s,c.entryName))throw new t(`Refusing to extract ${r}: entry "${c.entryName}" resolves outside the extraction directory ${s} (zip-slip / path traversal).`)}
|
|
3
|
+
export{fd,Pc,Yie,f$};
|
|
4
|
+
|
|
5
|
+
//# debugId=B1BE341C5A62EE5564756E2164756E21
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{dt,dl,gre,_,k}from"./chunk-h3n4adc6.js";import{e}from"./chunk-z8t0v07j.js";import{gr}from"./chunk-bn64x5z5.js";import{mm,cC,fn}from"./chunk-sns0c35v.js";import{r,t}from"./chunk-9rkfyt6q.js";var A=new gr;function x4(i,o,n){if(n?.aborted||i instanceof dt||i instanceof Error&&i.name==="AbortError")return`Android long press interrupted; press may still be held on the device for up to ${o} ms. Wait ${o} ms before retrying touch input.`;return}function Yx(i,o,n){let a=x4(i,o,n);if(a)throw new t(a,{cause:i})}function mF(i,o){let n=i??o.defaultMs;if(!Number.isFinite(n))throw new t("searchUntil.duration must be a number");if(n<o.minMs)throw new t(`searchUntil.duration must be at least ${o.minMs}ms`);if(n>o.maxMs)throw new t(`searchUntil.duration must be at most ${o.maxMs}ms`);return Math.round(n)}function fF(i,o,n){if(!n)return!0;return i.hasContainer?.(o,n)??A.hasContainer(o,n)}function hF(i,o){if(!i)return null;return[i.elementId,i.text].filter(Boolean).length===1?null:`${o} container must specify exactly one of elementId or text`}function gF(i){if(i!==void 0&&i>mm)throw new t(`longPress duration too large; maximum is ${mm} ms; requested ${i} ms`)}function yF(i,o){return{success:!1,action:i,error:o,element:{bounds:{left:0,top:0,right:0,bottom:0}}}}function tQ(i){return(o=[])=>{for(let n of o)i.add(n)}}function rQ(i,o){return i==="doubleTap"&&o===1?" Double tap partially applied: one tap was delivered; the second tap was not confirmed. Do not retry automatically.":""}function nQ(i){let o=!1;return()=>{if(!o)o=!0,i()}}class m extends cC{}function D(i){return i instanceof cC&&!(i instanceof m)&&(/timed out|timeout/i.test(i.message)||dl({error:i.message}))}function b(i){return new m(`${i.message} With VoiceOver on, synthetic touches and activation requests can be held or swallowed, so the tap may not have run. Verify with observe; turn VoiceOver off using the accessibility tool ({voiceover:false}), then retry if needed.`,{cause:i})}async function qA(i){try{await i()}catch(o){if(D(o))throw b(o);throw o}}async function iQ(i,o){try{await i()}catch(n){if(D(n)&&await T(o))throw b(n);throw n}}async function T(i){try{return await i()}catch(o){return e.warn(`VoiceOver probe after a tap timeout failed: ${r(o)}`,o),!1}}function Vq(i,o){if(o.success)_.getExistingInstance(i.deviceId)?.invalidateCache()}async function oQ({device:i,action:o,element:n,point:a,durationMs:c,fenceOptions:s,coordinateTap:v}){let{displayFence:y,signal:g}=s,d=n["ios-accessibility-label"]??(typeof n["content-desc"]==="string"&&n["content-desc"]?n["content-desc"]:void 0)??(typeof n.text==="string"&&n.text?n.text:void 0);if(!d){e.info("[TapOnElement] VoiceOver: no label available, falling back to coordinate tap"),await qA(()=>v({displayFence:y,signal:g}));return}let h=o==="longPress"?"long_press":"activate",p=await _.getInstance(i).requestVoiceOverActivate(d,h,gre(h,c),{bounds:n.bounds,duration:o==="longPress"?c:void 0});if(C(i,p),!p.success)e.warn(`[TapOnElement] VoiceOver action failed for label "${d}": ${p.error??"unknown error"}, falling back to coordinate tap at (${a.x}, ${a.y})`),await qA(()=>v({displayFence:y,signal:g}))}function C(i,o){if(o.dispatched&&o.acknowledged!==!0)throw fn(o.error);Vq(i,o)}class f{accessibilityService;constructor(i){this.accessibilityService=i}async getAccessibilityHierarchy(){return this.accessibilityService.getAccessibilityHierarchy(void 0,{skipWaitForFresh:!1,disableAllFiltering:!0})}async requestTraversalOrder(){return this.accessibilityService.requestTraversalOrder()}async requestCurrentFocus(){return this.accessibilityService.requestCurrentFocus()}async requestTapCoordinates(i){let{x:o,y:n,duration:a=10,onDispatch:c}=i;return this.accessibilityService.requestTapCoordinates({x:o,y:n,duration:a,onDispatch:c})}async requestDoubleTapCoordinates(i,o,n){return this.accessibilityService.requestDoubleTapCoordinates(i,o,n)}async requestAction(i,o,n){return this.accessibilityService.requestAction(i,o,void 0,{signal:n})}async requestNodeAction(i,o,n){return this.accessibilityService.requestNodeAction(i,o,{signal:n})}async supportsNodeActionSelectors(){return this.accessibilityService.supportsNodeActionSelectors()}}class yh{adbFactory;constructor(i){this.adbFactory=i}createDriver(i){return new f(k.getInstance(i,this.adbFactory))}}var l=new Map,u=new Map;function Wq(i,o){C4(o.deviceId),l.set(i,{...o}),u.set(i,(u.get(i)??0)+1)}function ho(i){let o=l.get(i);return o?{sessionUuid:i,device:{...o},incarnation:u.get(i)??0}:void 0}function sQ(){let i=new Map;for(let o of l.values())i.set(o.deviceId,{...o});return[...i.values()]}function aQ(i){l.delete(i),u.delete(i)}function C4(i){for(let[o,n]of l)if(n.deviceId===i)l.delete(o)}function zq(i,o){for(let[n,a]of l)if(a.platform===i&&(i==="android"?a.deviceId.startsWith("emulator-")&&a.name===o:a.deviceId===o))l.delete(n)}var D4=["gesture","threeButton","twoButton"],jq=["corner","double","hole","tall","waterfall"],vh=200,Kq=2,cQ=16384;var S={navigationMode:"com.android.internal.systemui.navbar.",displayCutout:"com.android.internal.display.cutout.emulation."},w={gesture:"com.android.internal.systemui.navbar.gestural",threeButton:"com.android.internal.systemui.navbar.threebutton",twoButton:"com.android.internal.systemui.navbar.twobutton"};function Gq(i,o){return i.filter((n)=>n.packageName.startsWith(S[o]))}function vF(i,o){return Gq(i,o).filter((n)=>n.enabled).map((n)=>n.packageName)}function O4(i,o){if(o==="default"||o==="none")return[];return i==="navigationMode"?[w[o]]:[`com.android.internal.display.cutout.emulation.${o}`]}function bF(i,o){if(o.length===0)return i==="navigationMode"?"default":"none";if(o.length>1)return;let n=o[0].slice(S[i].length);if(i==="displayCutout")return jq.includes(n)?n:void 0;if(n==="gestural"||n.startsWith("gestural_"))return"gesture";return n==="threebutton"?"threeButton":n==="twobutton"?"twoButton":void 0}function Yq(i,o){let n=new Set(Gq(i,o).map((s)=>s.packageName)),c=(o==="navigationMode"?D4:jq).filter((s)=>n.has(O4(o,s)[0]));return[o==="navigationMode"?"default":"none",...c]}function Jq(i,o){if(i.length===o.length&&o.every((s)=>i.includes(s)))return[];let[a,...c]=o;return[...a===void 0?[]:[`shell cmd overlay enable-exclusive --category ${a}`],...c.map((s)=>`shell cmd overlay enable ${s}`),...i.filter((s)=>!o.includes(s)).map((s)=>`shell cmd overlay disable ${s}`)]}function qS(i){let o={};for(let n of i.matchAll(/^[ \t]*(Physical|Override) size:[ \t]*([^\r\n]*)/gim)){let a=/^(\d+)x(\d+)$/.exec(n[2].trim()),c=n[1].toLowerCase();if(!a||o[c]!==void 0)return;o[c]={width:Number(a[1]),height:Number(a[2])}}return o.physical===void 0?void 0:o}function x(i){return i===void 0||i===0?"":` -d ${i}`}function VS(i){return`shell wm size${x(i)}`}function Xq(i,o){return`shell wm size ${i==="default"?"reset":`${i.width}x${i.height}`}${x(o)}`}function Jx(i){return i.override??"default"}function Gy(i){return i.override??i.physical}function M4(i,o){if(i===void 0||o===void 0||i==="default"||o==="default")return i===o;return i.width===o.width&&i.height===o.height}function SF(i){return i===void 0||i==="default"?String(i):`${i.width}x${i.height}`}
|
|
3
|
+
export{x4,Yx,mF,fF,hF,gF,yF,tQ,rQ,nQ,qA,iQ,Vq,oQ,yh,Wq,ho,sQ,aQ,C4,zq,D4,jq,vh,Kq,cQ,Gq,vF,O4,bF,Yq,Jq,qS,VS,Xq,Jx,Gy,M4,SF};
|
|
4
|
+
|
|
5
|
+
//# debugId=55885077B6C07F7D64756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{YY}from"./chunk-js1jpyxp.js";import"./chunk-tyazf3sk.js";import"./chunk-z04jrpjy.js";import"./chunk-0e4gm1kj.js";import"./chunk-6d3mmqxt.js";import"./chunk-zg67wjkh.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{YY as getSharedStorageReadService};
|
|
3
|
+
|
|
4
|
+
//# debugId=5F067EBC800CFC1664756E2164756E21
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ge,pe,Y,o,R,st,eg,Gt,G,WL,er,GL,Ot,rd,jo,_,k}from"./chunk-h3n4adc6.js";import{i,Bt,Se,Ft,l,e}from"./chunk-z8t0v07j.js";import{De,Ht,wt}from"./chunk-4fgdhcwx.js";import{r,u,yt}from"./chunk-9rkfyt6q.js";function Y0(s,t,n){return["android.","androidx."].some((a)=>s?.startsWith(a))&&typeof t==="string"&&t!==""&&n===t}function w(s){return s?.tokens??[]}function A(s){return s.tokens===void 0?s.value??"":s.trailingText}function F(...s){return s.some((t)=>w(t).length>0)}function g(s){let t=w(s);return t.length===0?"no tokens":`tokens ${JSON.stringify(t)}`}function V(s,t){let n=Array.from(t),a=0;for(let d of s)if(d===n[a])a++;return a===n.length}function P(s,t,n){if(!F(t,n))return;if(w(n).length>w(t).length)return{success:!0};let a=A(t),d=A(n);if(a===void 0||d===void 0)return{success:!0,warning:"iOS typed text result was not verified: the recipient field's value does not follow its tokens."};if(a===d)return{success:!1,error:`iOS nothing was typed: no new recipient token was committed and the text after the tokens is unchanged (${g(n)}).`};return V(d,s)?{success:!0}:{success:!0,warning:`iOS typed text changed in the recipient field; text after the tokens: ${JSON.stringify(d)} (${g(n)}).`}}function D(s,t,n){if(!F(t,n))return;let a=w(t);if(w(n).length>a.length)return`a new recipient token was committed (${g(n)}).`;let c=t===void 0?"":A(t),f=A(n);if(c===void 0||f===void 0)return`the recipient field's value does not follow its tokens, so the typed text is unknown (${g(n)}).`;if(c===f)return`no new recipient token was committed and the text after the tokens is unchanged (${g(n)}).`;return V(f,s)?`the text after the recipient tokens now contains the typed characters (${g(n)}).`:`the text after the recipient tokens changed to ${JSON.stringify(f)} (partial or altered input; ${g(n)}).`}class C extends G{extractNodeProperties(s){let t=Se(s),n=t.class??t.className;if(t.password===!0||t.password==="true"||typeof n==="string"&&n.includes("SecureTextField"))return{focused:t.focused,class:n,password:!0,editable:t.editable,actions:t.actions,"resource-id":t["resource-id"],bounds:t.bounds};return super.extractNodeProperties(s)}}var I=512,M=`iOS typed text result was not verified: the focused field value fills the ${I}-character read window, so a change past it cannot be seen.`;function B(s,t,n,a){let d=t.length+s.length-n.length;if(d<0||!a&&d!==0)return!1;for(let c=n.indexOf(s);c!==-1;c=n.indexOf(s,c+1)){if(n.slice(0,c)!==t.slice(0,c))return!1;if(n.slice(c+s.length)===t.slice(c+d))return!0}return!1}function Z(s,t,n,a){if(n.length===I)return{success:!0,warning:M};if(t===n)return{success:!1,error:"iOS nothing was typed: the focused field value is unchanged."};return B(s,t,n,a)?{success:!0}:{success:!1,error:"iOS typed text chunk was not fully appended to the focused field."}}function O(s,t={secure:!1},n={secure:!1},a=!1){if(t.secure||n.secure)return{success:!0,warning:"iOS typed text check skipped for a secure field."};return((typeof a==="boolean"?a:a.verifyAppend)?Q(s,t,n,typeof a!=="boolean"&&a.firstChunk===!0):void 0)??ee(s,t,n)}function Q(s,t,n,a){if(t.identity!==void 0&&n.identity!==void 0&&t.identity!==n.identity)return{success:!0,warning:"iOS typed text result was not verified: focus moved to another field."};let d=t.nativeEditableValues??{},c=n.nativeEditableValues??{};if(Object.keys(d).some((f)=>Object.hasOwn(c,f)&&d[f]!==c[f]&&B(s,d[f],c[f],a)))return{success:!0};if(t.value!==void 0&&n.value!==void 0&&!F(t,n))return Z(s,t.value,n.value,a);return}function ee(s,t,n){if(H(t.nativeEditableValues,n.nativeEditableValues)==="changed")return{success:!0};let d=P(s,t,n);if(d!==void 0)return d;if(t.value===void 0||n.value===void 0)return{success:!0,warning:"iOS typed text result was not verified: the focused field could not be read."};if(n.value.length>=I)return{success:!0,warning:M};if(t.value===n.value)return{success:!1,error:"iOS nothing was typed: the focused field value is unchanged."};return K(n.value,s)?{success:!0}:{success:!0,warning:`iOS typed text changed in the focused field; observed value: ${JSON.stringify(n.value)}.`}}function te(s,t,n){if(n===void 0)return"the focused field could not be read, so what was committed is unknown.";if(t?.secure||n.secure)return"the focused field is secure; its content was not inspected.";let a=D(s,t,n);if(a!==void 0)return a;if(H(t?.nativeEditableValues,n.nativeEditableValues)==="changed")return"another editable on screen changed (a recipient or token entry may hold the text), so the focused field's value does not show what was committed.";return ne(s,t?.value,n.value)}function ne(s,t,n){if(n!==void 0&&n.length>=I)return`the focused field's value fills the ${I}-character read window, so what was committed is unknown.`;if(t===void 0||n===void 0)return"the focused field's value could not be read, so what was committed is unknown.";if(t===n)return"the focused field's value is unchanged from before typing; entries held as separate tokens would not show in it.";return K(n,s)?"the focused field now contains the typed characters.":`the focused field's value changed to ${JSON.stringify(n)} (partial or altered input).`}function H(s={},t={}){let n=Object.keys(s).filter((a)=>Object.hasOwn(t,a));if(n.some((a)=>s[a]!==t[a]))return"changed";return n.length>0?"unchanged":"unavailable"}function K(s,t){let n=Array.from(t),a=0;for(let d of s)if(d===n[a])a++;return a===n.length}function re(s,t){let n=jo(),a=n===void 0?void 0:n-s.now();return t===void 0?a:Math.min(t,a??t)}async function fh(s,t={},n){let a=await c4(s,t,n);return a.kind==="read"?a.field:void 0}async function c4(s,t={},n){let{observer:a,timer:d,signal:c,display:f}=s,h=pe(c),m=re(d,n);if(h?.aborted||m!==void 0&&m<=0)return{kind:"unavailable"};let p=new AbortController,x=Ge(h,p.signal);try{let b=await l(()=>a.execute({freshness:"fresh",skipScreenshot:!0,skipAccessibilityAudit:!0,signal:x,timeoutMs:m,...f===void 0?{}:{display:f}}),{timer:d,timeoutMs:m,signal:x,label:"iOS typed text verification",onTimeout:()=>p.abort()}),y=b.viewHierarchy;if(b.freshness?.isFresh===!1||!y||y.hierarchy.error)return{kind:"unavailable"};return{kind:"read",field:Vd(y,new C,{...t,includeIosNativeEditableValues:!0}),hasFocusedTextInput:oc(y,new C),keyboardVisible:GL(b.viewHierarchy,b.screenSize)}}catch{return e.warn("[iOS typed text] Focused field read unavailable; result cannot be verified"),{kind:"unavailable"}}}var ie=1000,oe=250;async function J0(s,t,n,a=!1){let{timer:d,signal:c}=n,f=typeof a==="boolean"?a:a.verifyAppend;if(t?.secure&&!f)return{...O(s,t,void 0),after:t};let h=await fh(n,{includeIdentity:f}),m=O(s,t,h,a),p=d.now()+ie;while(!m.success&&F(t,h)&&d.now()<p)c?.throwIfAborted(),await d.sleep(oe),h=await fh(n,{includeIdentity:f},Math.max(0,p-d.now())),m=O(s,t,h,a);return{...m,after:h}}var se=2000;async function X0(s,t,n,a){if(!WL(s))return s;let d=n?.secure?n:await fh(a,{},se);return`${s} Observed afterwards: ${te(t,n,d)}`}var ae=3,de=Bt([100,200]);function ue(s,t){return Object.entries(s?.nativeEditableValues??{}).some(([n,a])=>a!==""&&t?.nativeEditableValues?.[n]==="")}function ce(s){return s?.keyboardNativeEditableValue===""}function L(s,t,n=1,a){if(ue(a,s)||ce(s))return{success:!0};if(s?.secure)return{success:!0,warning:"iOS clear check skipped for a secure field."};if(s?.value===void 0){if(t!==void 0)return{success:!1,partialApplication:!0,error:`iOS clear could not be verified after ${n} attempt(s); the focused field last held ${JSON.stringify(t)} and could not be read again.`};return{success:!0,warning:"iOS clear was not verified: the focused field could not be read."}}if(s.value===t)return le(s.value,n,a?.value);return s.value===""?{success:!0}:s.value}function le(s,t,n){if(s!==""&&s===n)return{success:!1,error:`iOS clear removed nothing after ${t} attempt(s): the runner acknowledged each clear, but the focused field still holds its pre-clear value; remaining value: ${JSON.stringify(s)}.`};return{success:!0,warning:`The field still holds ${JSON.stringify(s)} after the clear was acknowledged and retried; it may be a mask or permanent prefix at its cleared content, or the app may have refused the clear.`}}function W(s){if(s===void 0)return"unreadable";let t=Object.entries(s.nativeEditableValues??{}).map(([n,a])=>`${n}:${a.length}`);return`focusedLength=${s.value?.length??"none"} native={${t.join(",")}} keyboardEditableLength=${s.keyboardNativeEditableValue?.length??"none"}`}async function fe(s,t,n){n?.throwIfAborted();let a=de.delayForAttempt(t),d=jo();if(d!==void 0&&d-s.now()<=a)return!1;await l(()=>s.sleep(a),{timer:s,signal:n,label:"iOS clear retry"}),n?.throwIfAborted();let c=jo();return c===void 0||c>s.now()}async function Aq({clear:s,observer:t,timer:n,signal:a,display:d}){let c=pe(a),f=async(v=!1)=>{c?.throwIfAborted();let T=await fh({observer:t,timer:n,signal:c,display:d},{iosPlaceholderAsBlank:!0});if(c?.throwIfAborted(),v&&!T?.secure&&T?.value===void 0)e.warn("[iOS clear] Pre-clear field read unavailable; using post-clear verification only");return T},h=await f(!0),m=await s();if(!m.success)return m;if(c?.throwIfAborted(),h?.secure)return{success:!0,warning:"iOS clear check skipped for a secure field."};let p=await f(),x=L(p,void 0,1,h),b=1;while(typeof x==="string"&&b<ae){if(!await fe(n,b,c))break;let v=await s();if(b++,!v.success)return{...v,partialApplication:!0};p=await f(),x=L(p,x,b,h)}let y=typeof x==="string"?{success:!1,partialApplication:!0,error:`iOS clear left text in the focused field after ${b} attempt(s); remaining value: ${JSON.stringify(x)}.`}:x;if(!y.success)e.warn(`[iOS clear] Verification failed; before ${W(h)}; after ${W(p)}`);return y}class N{editables=[];keyboardTop;recordKeyboard(s){if(s)this.keyboardTop=Math.min(this.keyboardTop??s.top,s.top)}recordEditable(s,t){if(t)this.editables.push({value:s,bounds:t})}soleValueAboveKeyboard(){let s=this.keyboardTop;if(s===void 0)return;let t=this.editables.filter((n)=>n.bounds.bottom<=s);return t.length===1?t[0].value:void 0}}function he(s,t){return s!==null&&t!==null&&s.left>=t.left&&s.right<=t.right&&s.top>=t.top&&s.bottom<=t.bottom}function me(s,t,n){let a=n.extractNodeProperties(s),d=er(a),c=d.textSources.text;if(!(d.className==="UIButton"||a.role==="button")||!st(a.clickable)||d.nativeId!==void 0||c===void 0||c===""||!he(Gt(Ft(s)),t))return;return c}function ye(s,t){let n=s;for(let a of t){if(!n.startsWith(a))return;n=n.slice(a.length),n=n.startsWith(" ")?n.slice(1):n}return n}function U(s,t,n){let a=Gt(Ft(s)),d=(s.node??[]).flatMap((f)=>me(f,a,n)??[]);if(d.length===0)return;let c=t===void 0?void 0:ye(t,d);return c===void 0?{tokens:d}:{tokens:d,trailingText:c}}var Z0=1000,q=50;function E(s,t){let n=t.extractWindowRootGroups(s,"topmost-first"),a=t.extractRootNodes(s),d=new Set,c=(f)=>f.filter((h)=>{if(d.has(h))return!1;return d.add(h),!0});return[...n,a].map(c).filter((f)=>f.length>0)}function xe(s,t){let n=er(s),a=n.textSources.value??n.textSources.text,d=["android.","androidx."].some((f)=>n.className?.startsWith(f));if(!t&&Y0(n.className,s["hint-text"],a))return 0;let c=typeof a==="string"?a.length:n.capturedTextLength;if(c===void 0&&d&&S(s)&&!st(s.password))return 0;return c}function Kl(s,t=new G,n=!1){for(let a of E(s,t)){let d;for(let c of a)t.traverseNode(c,(f)=>{let h=t.extractNodeProperties(f),m=xe(h,n);if((h.focused==="true"||h.focused===!0)&&m!==void 0)d=Math.max(d??0,m)});if(d!==void 0)return d}return}function oc(s,t=new G){for(let n of E(s,t))for(let a of n){let d=!1;if(t.traverseNode(a,(c)=>{if(d)return;let f=t.extractNodeProperties(c);if(S(f))d=!0}),d)return!0}return!1}function Q0(s,t=new G){for(let n of E(s,t)){let a;for(let d of n)t.traverseNode(d,(c)=>{let f=t.extractNodeProperties(c);if(a!==void 0||!S(f))return;a=j(f,!0)});if(a!==void 0)return a}return}function j(s,t=!1){let n=er(s);if(!t&&n.nativeId===void 0&&n.bounds===void 0)return;return JSON.stringify([n.nativeId??null,n.className??null,n.bounds?.left??null,n.bounds?.top??null])}function Vd(s,t=new G,n={}){for(let a of E(s,t)){let d,c=n.includeIosNativeEditableValues?{}:void 0,f=n.includeIosNativeEditableValues?new N:void 0;for(let h of a){let m,p;if(t.traverseNode(h,(x,b)=>{if(p!==void 0&&b<=p)p=void 0;let y=t.extractNodeProperties(x),v=y.class??y.className;if(p===void 0&&v==="WKWebView")p=b;if(p===void 0)be(y,c),ge(x,y,f);if(!S(y))return;let T=we(x,y,n,t);if(T===void 0)return;d??=T,m??=p===void 0?T:void 0}),m!==void 0)return m}if(c&&Object.keys(c).length>0)return Te(d,c,f);if(d!==void 0)return d}return}function be(s,t){if(!t||st(s.focused)||!z(s))return;let n=er(s),a=s["view-id"]??n.nativeId;if(typeof a==="string"&&a!==""){let d=typeof s.value==="string"?s.value:"";t[a]=d===s["hint-text"]?"":d}}function Te(s,t,n){let a=n?.soleValueAboveKeyboard();return{...s??{secure:!1},nativeEditableValues:t,...a===void 0?{}:{keyboardNativeEditableValue:a}}}function ge(s,t,n){if(!n)return;if((t.class??t.className)==="UIKeyboard"){n.recordKeyboard(Gt(Ft(s)));return}if(z(t)){let d=typeof t.value==="string"?t.value:"";n.recordEditable(d===t["hint-text"]?"":d,Gt(Ft(s)))}}function X(s){let t=s.class??s.className;return st(s.password)||typeof t==="string"&&t.includes("SecureTextField")}function z(s){let t=s.class??s.className;if(X(s))return!1;return s.role==="textfield"||Array.isArray(s.actions)&&s.actions.includes("set_text")||typeof t==="string"&&/UITextField|UISearchBar|UITextView/.test(t)}function ve(s,t){let n=er(s),a=X(s),d=n.textSources.value??n.textSources.text??(n.capturedTextLength===0?"":void 0);if(a)return{value:d,secure:a};let c=t.iosEmptyAsBlank?J(n.textSources):t.iosPlaceholderAsBlank?n.textSources.value===void 0?void 0:J(n.textSources):d;return c!==void 0||t.includeIosNativeEditableValues?{value:c,secure:a}:void 0}function we(s,t,n,a){let d=ve(t,n),c=d&&n.includeIdentity?{...d,identity:j({...t,bounds:Ft(s)})}:d;if(c===void 0||c.secure)return c;let f=U(s,c.value,a);return f===void 0?c:{...c,...f}}function J(s){let t=s.value;return t===void 0||t===s["hint-text"]?"":t}function S(s){if(s.focused!=="true"&&s.focused!==!0)return!1;let t=s.class??s.className,n=typeof t==="string"&&(t.includes("SecureTextField")||eg.some((f)=>t.includes(f))),a=s.actions,d=Array.isArray(a)&&a.includes("set_text"),c=s.editable==="true"||s.editable===!0;return n||d||c}async function Tq(s,t,{signal:n,onDelete:a,supportsKeyCombination:d}={}){if(n?.throwIfAborted(),await s.executeCommand(d?"shell input keycombination KEYCODE_CTRL_LEFT KEYCODE_A":"shell input keyevent KEYCODE_MOVE_END"),n?.throwIfAborted(),d){await s.executeCommand("shell input keyevent KEYCODE_DEL"),a?.(),n?.throwIfAborted();return}for(let c=0;c<t;c+=q){n?.throwIfAborted();let f=Math.min(q,t-c),h=Array(f).fill("KEYCODE_DEL").join(" ");await s.executeCommand(`shell input keyevent ${h}`),a?.(),n?.throwIfAborted()}}async function kq(s,t,n=new G){o(t);try{let a=await s();o(t);let d=a.viewHierarchy;if(a.freshness?.isFresh===!1||!d||d.hierarchy.error||!oc(d,n))return{success:!1,error:"Cannot verify key-event clear: no fresh focused editable field available"};let c=Kl(d,n);if(c===void 0)return{success:!1,error:"Cannot verify key-event clear: focused field text length is unreadable"};return c===0?{success:!0}:{success:!1,error:`Field was not fully cleared: ${c} UTF-16 units remain`}}catch(a){return o(t),e.warn("[ClearText] Key-event clear verification unavailable",a),{success:!1,error:`Cannot verify key-event clear: ${r(a)}`}}}class poe extends De{parser;androidKeyCombinationSupported;constructor(s,t=null,n=new G,a=i){super(s,{adb:t,timer:a});this.parser=n}async execute(s,t){t?.throwIfAborted();let n=Y();return n.serial("clearText"),this.observedInteraction(async(a)=>{try{switch(this.device.platform){case"android":return await n.track("androidClearText",()=>this.executeAndroidClearText(a,t));case"ios":return await n.track("iOSClearText",()=>this.executeiOSClearText(a,t));default:throw n.end(),yt(this.device.platform,"clear text")}}catch(d){n.end(),t?.throwIfAborted();let c=u(d,"Failed to clear text");return e.warn(`[ClearText] ${c.message}`),{success:!1,error:c.message}}},{...Ht.textEdit,tolerancePercent:0,timeoutMs:wt.immediate,progress:s,signal:t,perf:n})}get testHooks(){return{executeAndroidClearText:this.executeAndroidClearText.bind(this),executeiOSClearText:this.executeiOSClearText.bind(this)}}async executeAndroidClearText(s,t){let n=s.viewHierarchy,a=s;if(n&&!n.hierarchy.error&&!oc(n,this.parser)){let f=await this.refreshFocusedTextInputObservation(n,t).catch((h)=>{t?.throwIfAborted(),e.warn("[ClearText] Focus refresh unavailable; trying live clearing",h);return});if(f?.viewHierarchy&&!oc(f.viewHierarchy,this.parser))return{success:!1,error:"No focused editable node found"};a=f??{...s,viewHierarchy:void 0}}let d=k.getInstance(this.device,this.adbFactory);t?.throwIfAborted();let c=await d.requestClearText();if(t?.throwIfAborted(),c.success)return e.info(`[ClearText] Cleared text via accessibility service: ${c.totalTimeMs}ms`),{success:!0};return e.warn(`[ClearText] Accessibility service clear failed: ${c.error}, falling back to ADB`),this.executeAdbClearText(a,t)}async refreshFocusedTextInputObservation(s,t){let n;if(typeof s.updatedAt==="number")n=s.updatedAt+1;else{t?.throwIfAborted();let c=await this.adb.getDeviceTimestampMsWithSource();if(t?.throwIfAborted(),c.source==="host")return;n=c.source==="device-seconds"?c.timestampMs+Z0:c.timestampMs}t?.throwIfAborted();let a=await this.observeScreen.execute({freshness:"fresh",minTimestamp:n,signal:t,skipScreenshot:!0});t?.throwIfAborted();let d=a.viewHierarchy;return a.freshness?.isFresh!==!1&&d&&!d.hierarchy.error?a:void 0}async executeAdbClearText(s,t){let n=s.viewHierarchy,d=(n&&!n.hierarchy.error?Kl(n,this.parser):void 0)??200;if(d===0)return{success:!0};return await this.clearWithDeletes(d,t),kq(()=>this.observeScreen.execute({freshness:"fresh",minTimestamp:0,signal:t,skipScreenshot:!0}),t,this.parser)}async executeiOSClearText(s,t){let n=Date.now();e.debug("[ClearText] iOS begin");try{let a=_.getInstance(this.device);t?.throwIfAborted();let c=await Aq({clear:()=>{let f=jo();return a.requestClearText(void 0,5000,void 0,{abortSignal:t,...f===void 0?{}:{deadlineMs:f}})},observer:this.observeScreen,timer:this.timer,signal:t});if(c.retryable!==!1)t?.throwIfAborted();if(c.success)return e.info(`[ClearText] Cleared text via CtrlProxy iOS totalMs=${Date.now()-n}`),{success:!0,..."warning"in c&&c.warning?{warnings:[c.warning]}:{}};return e.warn(`[ClearText] CtrlProxy iOS clear failed: ${c.error} totalMs=${Date.now()-n}`),{success:!1,error:c.error,...c.retryable===!1?{retryable:!1}:{}}}catch(a){return t?.throwIfAborted(),e.warn(`[ClearText] CtrlProxy iOS exception: ${r(a)} totalMs=${Date.now()-n}`,a),{success:!1,error:String(a)}}}findAnyTextInputLength(s){let t=0;for(let n of E(s,this.parser))for(let a of n)this.parser.traverseNode(a,(d)=>{let c=this.parser.extractNodeProperties(d),f=er(c).textSources.text;if(c.class&&eg.some((h)=>c.class.includes(h))&&f&&typeof f==="string")t=Math.max(t,f.length)});return t}async clearWithDeletes(s,t){this.androidKeyCombinationSupported??=Ot(this.adb,1000,this.timer).then((a)=>a!==null&&a>=rd).catch((a)=>{throw this.androidKeyCombinationSupported=void 0,u(a,"Failed to read Android key-combination capability")});let n=await R(this.androidKeyCombinationSupported,t);await Tq(this.adb,s,{signal:t,supportsKeyCombination:n})}}
|
|
3
|
+
export{Y0,fh,c4,J0,X0,Aq,Z0,Kl,oc,Q0,Vd,Tq,kq,poe};
|
|
4
|
+
|
|
5
|
+
//# debugId=9C0E29CBB734F64964756E2164756E21
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Je,dt,v,o,R,st,eg,Ms,G,KL,we,Qc,tr,TD,_z,_,k,Vi}from"./chunk-h3n4adc6.js";import{i,l,e}from"./chunk-z8t0v07j.js";import{WF,rs,Zs,xh,dC}from"./chunk-sns0c35v.js";import{r,t}from"./chunk-9rkfyt6q.js";var x=3000,g=4,C=30000,M=20,N=60000,K=14,H=500,D=75,F=500,I=32;async function VF(n,s,a,{apiLevel:d,textLength:c,...u}){let m=a.slice(6);if(d===null||d>=31)return B(n,s,`echo $$; exec ${d===null?"":"cmd "}${m}`,{textLength:c,...u});let y,h="",b=!1,T=(w)=>{if(b)return;h+=w.slice(0,I+1);let S=h.indexOf(`
|
|
3
|
+
`);if(S<0&&h.length<=I)return;if(b=!0,S<0||S>I)return;let f=h.slice(0,S).trim(),E=/^\d+$/.test(f)?Number(f):NaN;if(Number.isSafeInteger(E)&&E>0)y=E};try{let w=`echo $$; exec ${m}`;return await n.execute(["shell",w],{...u,noRetry:!0,waitForProcessSettlementAfterAbort:!0,onStdout:T})}catch(w){if(y===void 0)e.warn("[ADB input text] Guest PID unavailable; using host process settlement only");else{e.warn(`[ADB input text] Dispatch failed; settling guest PID ${y}`);let S=Math.min(C,x+g*c);await q(n,s,y,{terminate:!0,settlementMs:S})}throw w}}async function B(n,s,a,{textLength:d,signal:c,timeoutMs:u,...m}){c?.throwIfAborted();let p=L(d),y=new AbortController,h=!1,b=Je(()=>n.execute(["shell",a],{...m,noRetry:!0,timeoutMs:(u??0)+p,signal:y.signal,onStdout:(f)=>{h||=f.length>0}})),T=s.now(),w=!1,S=!1;b.then(()=>{w=!0},()=>{w=!0,S=!0});try{let f=await l(b,{timer:s,timeoutMs:u,signal:c,label:"Android input text",timeoutError:()=>new dt(`Android input text timed out after ${u}ms`)}),E=K*d-(s.now()-T);if(E>0)await V(s,E,c);return f}catch(f){let E=S;if(!w){if(!h)y.abort(f);await U(s,b,p),y.abort(f)}if(h&&!E)await s.sleep(K*d+H);throw f}}function V(n,s,a){return new Promise((d,c)=>{if(a?.aborted){c(a.reason);return}let u=()=>{n.clearTimeout(m),c(a?.reason)},m=n.setTimeout(()=>{a?.removeEventListener("abort",u),d()},s);a?.addEventListener("abort",u,{once:!0})})}function L(n){return Math.min(N,x+M*n)}async function U(n,s,a){e.warn(`[ADB input text] Cancelled; holding for the host client up to ${a}ms`);try{await l(s.then(()=>{return},()=>{return}),{timer:n,timeoutMs:a,label:"Android input text host settlement"})}catch(d){e.warn(`[ADB input text] Host client settlement deadline expired after ${a}ms`,d)}}function W(n,s){let a=["input text ","/system/bin/input text ","sh /system/bin/input text ","/system/bin/sh /system/bin/input text ","cmd input text ","/system/bin/cmd input text ","app_process /system/bin com.android.commands.input.Input text ","/system/bin/app_process /system/bin com.android.commands.input.Input text "].map((d)=>`"${d}"*`).join("|");return["shell",`if [ -r /proc/${n}/cmdline ]; then if cmdline=$(tr '\\0' ' ' < /proc/${n}/cmdline 2>/dev/null); then case "$cmdline" in ${a}) ${s?`kill ${n} 2>/dev/null; `:""}echo alive;; esac; else echo alive; fi; fi`]}async function q(n,s,a,{terminate:d,settlementMs:c}){let u=s.now()+c,m=new AbortController,p=!1,y=async()=>{while(!p&&s.now()<u){try{let b=await n.execute(W(a,d),{signal:m.signal,timeoutMs:Math.min(F,u-s.now()),noRetry:!0});if(d=!1,b.stdout.trim()!=="alive")return}catch(b){if(p)e.debug(`[ADB input text] Probe for guest PID ${a} ended after settlement deadline`,b);else e.warn(`[ADB input text] Could not verify guest PID ${a}`,b)}let h=u-s.now();if(p||h<=0)return;await s.sleep(Math.min(D,h))}};try{await l(y,{timer:s,timeoutMs:c,label:"Android input text guest settlement",onTimeout:()=>{p=!0,m.abort()}})}catch(h){e.warn(`[ADB input text] Guest PID ${a} settlement deadline expired after ${c}ms`,h)}}function tv(n,s){return`IME action '${n}' failed after the text was entered: ${s}. Do not retype the text.`}async function P(n,s,a,d){if(Zs(n)&&!await d())return"Runner does not support stable node selectors";if(!WF(s))return"Unable to verify the node selector in an incomplete hierarchy";let c=new we().project(s).filter((m)=>KL(m.properties,n)),u=new Set(c.map((m)=>m.source)).size;if(u!==1)return u>1?`Node selector matches ${u} elements`:"Node selector matches no element in the current hierarchy";return Y(c[0],a)?void 0:"Node selector does not resolve to the focused text input"}function Y(n,s){let a=String(n.properties.class??n.properties.className??"");return st(n.properties.focused)&&eg.some((d)=>a.includes(d))&&n.bounds!==void 0&&s.bounds!==void 0&&Ms(n.bounds,s.bounds,0)}function A(n,s){return`Keyboard open outcome is indeterminate: the ${n} was dispatched but no result was confirmed (${s??"request cancelled"}). The keyboard may have opened. Do not retry automatically; observe before retrying.`}class ev extends t{constructor(n,s){super(A(n,s));this.name="KeyboardOpenIndeterminateError"}}class O{viewHierarchy;cache;constructor(n,s){this.viewHierarchy=n,this.cache=s}async getViewHierarchy(n,s){if(s?.forceFresh)this.cache.invalidateCache();return this.viewHierarchy.getViewHierarchy(void 0,{skipWaitForFresh:!1,minTimestamp:0,signal:n,timeoutMs:s?.timeoutMs})}}function X(n,s,a){return n==="ios"?s():a()}function Q(n,s){return n?.length===s.length&&n.every((a,d)=>a.left===s[d].left&&a.top===s[d].top&&a.right===s[d].right&&a.bottom===s[d].bottom)}class bo{static INPUT_METHOD_WINDOW_TYPE=2;static STATE_CONFIRMATION_TIMEOUT_MS=2000;static IOS_KEYBOARD_VISIBILITY_TIMEOUT_MS=2000;static IOS_KEYBOARD_SETTLE_TIMEOUT_MS=1500;static IOS_KEYBOARD_SETTLE_INTERVAL_MS=250;static STATE_CONFIRMATION_POLL_INTERVAL_MS=100;static CLOSE_FOLLOW_UP_DETECT_TIMEOUT_MS=2000;device;adb;hierarchyProvider;parser;geometry;finder;timer;adbFactory;openClient;constructor(n,s={}){let{adbFactory:a=v,hierarchyProvider:d,timer:c=i,parser:u=new G,geometry:m=new tr,finder:p=new dC,openClient:y}=s;if(this.device=n,this.adbFactory=a,this.openClient=y,this.adb=a.create(n),this.parser=u,this.geometry=m,this.finder=p,this.timer=c,d)this.hierarchyProvider=d;else this.hierarchyProvider=new O(new Vi(n,a),X(n.platform,()=>_.getInstance(n),()=>k.getInstance(n,a)))}async execute(n,s){let{signal:a}=xh(s);if(o(a),this.device.platform==="ios")return this.executeIOS(n,a);switch(n){case"detect":return this.detect(a);case"open":return this.open(a);case"close":return this.close(a);default:return{success:!1,open:!1,message:`Unsupported keyboard action: ${n}`,error:`Unsupported keyboard action: ${n}`}}}async executeIOS(n,s){let a=_.getInstance(this.device);o(s);let d=await R(a.requestKeyboard(n,void 0,void 0,s),s);if(o(s),!d.success)return this.iosFailure(n,d,a,s);if(n!=="close"&&d.open===!0&&j(await this.settledIOSKeyboardVisibility(s))){let c=n==="detect"?"Keyboard is closed (no visible on-screen software keyboard)":"Keyboard did not open: no visible on-screen software keyboard. It may be minimized off screen because the simulator uses a hardware keyboard and cannot be shown on request.";return{success:n==="detect",open:!1,message:c,...n==="open"?{error:c}:{}}}return this.iosKeyboardResult(n,d)}iosKeyboardResult(n,s){let a=n==="detect"||n==="open"&&s.open||n==="close"&&!s.open,d=this.keyboardMessage(n,s.open,s.method);return{success:a,open:s.open,message:d,...n==="close"&&s.method?{method:s.method}:{},...a?{}:{error:d}}}async settledIOSKeyboardVisibility(n){let s=await this.isIOSKeyboardOnScreen(n,bo.IOS_KEYBOARD_VISIBILITY_TIMEOUT_MS);if(s!==!1)return s===!0?"visible":"unknown";let a=!1,d=this.timer.now()+bo.IOS_KEYBOARD_SETTLE_TIMEOUT_MS;while(this.timer.now()<d){await R(this.timer.sleep(Math.min(bo.IOS_KEYBOARD_SETTLE_INTERVAL_MS,d-this.timer.now())),n),o(n);let c=await this.isIOSKeyboardOnScreen(n,bo.IOS_KEYBOARD_VISIBILITY_TIMEOUT_MS);if(c===!0)return"visible";a||=c===!1}return a?"hidden":"hidden_unconfirmed"}async isIOSKeyboardOnScreen(n,s){try{let a=await l(()=>this.hierarchyProvider.getViewHierarchy(n,{timeoutMs:s,forceFresh:!0}),{timer:this.timer,timeoutMs:s,signal:n,label:"iOS keyboard visibility hierarchy"});if(o(n),a?.fresh===!1){e.warn("iOS keyboard visibility hierarchy is stale; using runner state");return}let d=a?.screenWidth,c=a?.screenHeight;if(!a||a.hierarchy?.error||![d,c].every((p)=>typeof p==="number"&&Number.isFinite(p)&&p>0))return;let u=new Qc(this.parser).collect(a,"ios"),m=u&&TD(u);return!!m&&_z(m,{width:d,height:c})!==void 0}catch(a){o(n),e.warn("iOS keyboard visibility hierarchy read failed; using runner state",a);return}}async iosFailure(n,s,a,d){if(n==="close"&&/^Keyboard timed out after \d+ms$/.test(s.error??"")&&await this.confirmIOSCloseAfterTimeout(a,d))return{success:!0,open:!1,message:"Keyboard closed after the close request timed out; dismissal method unknown (Return may have submitted the field)"};let c=n==="close"?await this.settledIOSKeyboardVisibility(d):void 0;if(c==="hidden")return e.warn(`iOS keyboard close failed but no software keyboard is visible: ${s.error}`),{success:!0,open:!1,message:"Keyboard is closed (no visible on-screen software keyboard)"};if(c==="hidden_unconfirmed")return this.iosCloseStateUnknown(s);let u=s.error??`Failed to ${n} iOS keyboard`;return{success:!1,open:s.open,message:u,error:u}}iosCloseStateUnknown(n){let s=n.error??"Failed to close iOS keyboard";e.warn(`iOS keyboard close failed and no settle re-read confirmed the keyboard gone: ${s}`);let a=`Keyboard state unknown after close: ${s}. One hierarchy read showed no keyboard, but every re-read timed out or failed, so the keyboard may still be on screen. Run keyboard detect to check.`;return{success:!1,open:n.open,message:a,error:a,reason:"keyboard_state_unknown"}}async confirmIOSCloseAfterTimeout(n,s){try{o(s);let a=await R(l(n.requestKeyboard("detect",bo.CLOSE_FOLLOW_UP_DETECT_TIMEOUT_MS,void 0,s),{timer:this.timer,timeoutMs:bo.CLOSE_FOLLOW_UP_DETECT_TIMEOUT_MS,label:"Keyboard close follow-up detect"}),s);return a.success&&!a.open}catch(a){return o(s),e.warn(`Keyboard close timeout follow-up detect failed: ${String(a)}`,a),!1}}keyboardMessage(n,s,a){if(n==="detect")return s?"Keyboard is open":"Keyboard is closed";if(n==="open")return s?"Keyboard opened":"Keyboard did not open";if(!s&&a==="returnKey")return"Keyboard closed with Return; the field may have submitted or committed autocorrect";return s?"Keyboard did not close":"Keyboard closed"}async detect(n){let{state:s}=await this.getHierarchyWithState(n);if(s.error)return{success:!1,open:s.open,bounds:s.bounds,message:s.error,error:s.error};return{success:!0,open:s.open,bounds:s.bounds,message:s.open?"Keyboard is open":"Keyboard is closed"}}async open(n){let{hierarchy:s,state:a}=await this.getHierarchyWithState(n);if(a.error)return{success:!1,open:a.open,bounds:a.bounds,message:a.error,error:a.error};if(a.open)return{success:!0,open:!0,bounds:a.bounds,message:"Keyboard already open"};let d=s?this.findFocusedTextInput(s):null;if(!d)return{success:!1,open:!1,message:"No focused text input to open keyboard",error:"No focused text input to open keyboard"};let c=await this.showWithoutTouch(d,s,n);if(c.kind==="unconfirmed"){let y=A("node click",c.error);return{success:!1,open:!1,message:y,error:y}}if(c.kind==="sent")return this.openResult(await this.waitForKeyboardState(!0,n),"Keyboard opened");let u=await this.readCaret(n);await this.tapOnElement(d,n);let m=await this.waitForKeyboardState(!0,n),p=m.open?await this.caretMovedNote(u,n):"";return this.openResult(m,"Keyboard opened",p)}openResult(n,s,a=""){let d=n.open&&!n.error,c=d?`${s}${a}`:n.error??"Failed to open keyboard";return{success:d,open:n.open,bounds:n.bounds,message:c,...n.error?{error:n.error}:{}}}getOpenClient(){return this.openClient??=k.getInstance(this.device,this.adbFactory),this.openClient}async showWithoutTouch(n,s,a){let d=rs(n);if(!d)return this.dispatchNodeClick(this.getOpenClient(),void 0,a);let c;try{c=this.getOpenClient();let u=await P(d,s,n,()=>R(c.supportsNodeActionSelectors(void 0,a),a));if(u)return e.warn(`Keyboard open: node click unavailable (${u})`),{kind:"unavailable"}}catch(u){return o(a),e.warn(`Keyboard open: node click errored: ${r(u)}`,u),{kind:"unavailable"}}return this.dispatchNodeClick(c,d,a)}async dispatchNodeClick(n,s,a){o(a);let d;try{d=s?await n.requestNodeAction("click",s,{signal:a}):await n.requestClickFocusedInput(void 0,void 0,a)}catch(m){return o(a),e.warn(`Keyboard open: node click errored: ${r(m)}`,m),{kind:"unavailable"}}let u=!(!s&&d.error==="Unknown command type: request_click_focused_input")&&d.dispatched===!0&&d.acknowledged!==!0;if(a?.aborted&&u)throw new ev("node click",d.error);if(o(a),d.success)return{kind:"sent"};return e.warn(`Keyboard open: node click failed (${d.error??"unknown error"})`),u?{kind:"unconfirmed",error:d.error}:{kind:"unavailable"}}async readCaret(n){try{let s=await R(this.getOpenClient().requestInsertTextState(),n);return o(n),s.success?s.state:void 0}catch(s){o(n),e.warn(`Keyboard open: caret read failed: ${r(s)}`,s);return}}async caretMovedNote(n,s){if(!n)return"";let a=await this.readCaret(s);if(!a||a.selectionStart===n.selectionStart&&a.selectionEnd===n.selectionEnd)return"";let d=(c)=>`${c.selectionStart}-${c.selectionEnd}`;return` (the tap used to show it moved the caret from ${d(n)} to ${d(a)})`}async close(n){let{state:s}=await this.getHierarchyWithState(n,{timeoutMs:bo.STATE_CONFIRMATION_TIMEOUT_MS,forceFresh:!0});if(s.error)return{success:!1,open:s.open,bounds:s.bounds,message:s.error,error:s.error};if(!s.open)return{success:!0,open:!1,message:"Keyboard already closed"};o(n),await R(this.adb.executeCommand("shell input keyevent KEYCODE_BACK",{signal:n}),n);let a=await this.waitForKeyboardState(!1,n),d=!a.open&&!a.error,c=d?"Keyboard closed":a.error??"Failed to close keyboard";return{success:d,open:a.open,bounds:a.bounds,message:c,...a.error?{error:a.error}:{}}}async waitForKeyboardState(n,s){let a=this.timer.now()+bo.STATE_CONFIRMATION_TIMEOUT_MS,d=await this.readKeyboardStateBefore(a,s),c;while(!this.isStateSettled(d,c,n)){c=d;let u=a-this.timer.now();if(o(s),u<=0)break;if(await R(this.timer.sleep(Math.min(bo.STATE_CONFIRMATION_POLL_INTERVAL_MS,u)),s),o(s),this.timer.now()>=a)break;d=await this.readKeyboardStateBefore(a,s)}return d}isStateSettled(n,s,a){if(n.error||n.open!==a)return!1;if(!a||!n.bounds?.length)return!0;return s?.open===!0&&Q(s.bounds,n.bounds)}async readKeyboardStateBefore(n,s){let{state:a}=await this.getHierarchyWithState(s,{timeoutMs:Math.max(0,n-this.timer.now()),forceFresh:!0});return a}async getHierarchyWithState(n,s){o(n);let a=await R(this.hierarchyProvider.getViewHierarchy(n,s),n);return o(n),{hierarchy:a,state:this.resolveKeyboardState(a)}}resolveKeyboardState(n){if(!n)return{open:!1,error:"No view hierarchy available"};let s=n.windows??[],a=s.length>0,d=s.some((m)=>m.type===bo.INPUT_METHOD_WINDOW_TYPE),c=this.findKeyboardWindowBounds(n);if(c)return{open:!0,bounds:[c],source:"window",windowInfoAvailable:a,imeWindowPresent:!0};if((d||!a)&&this.detectKeyboardInHierarchy(n))return{open:!0,source:"heuristic",windowInfoAvailable:a,imeWindowPresent:d};let u=n.hierarchy?.error;if(u)return{open:!1,error:u};return{open:!1}}findKeyboardWindowBounds(n){let s=n.windows??[];for(let a of s){if(a.type!==bo.INPUT_METHOD_WINDOW_TYPE)continue;if(a.bounds&&this.isValidBounds(a.bounds))return a.bounds}return null}isValidBounds(n){return n.right>n.left&&n.bottom>n.top}detectKeyboardInHierarchy(n){let s=this.parser.extractRootNodes(n),a=["delete","enter","keyboard","emoji","shift"];for(let d of s){let c=!1;if(this.parser.traverseNode(d,(u)=>{if(c)return;let m=this.parser.extractNodeProperties(u),p=this.getStringProp(m,"resource-id","resourceId"),y=this.getStringProp(m,"content-desc","contentDesc"),h=p?.toLowerCase(),b=y?.toLowerCase();if(h&&(h.includes("keyboard")||h.includes("inputmethod"))){c=!0;return}if(b&&a.some((T)=>b.includes(T)))c=!0}),c)return!0}return!1}getStringProp(n,s,a){let d=n[s];if(typeof d==="string")return d;let c=n[a];if(typeof c==="string")return c;return}findFocusedTextInput(n){let s=this.finder.findFocusedTextInput(n);if(!s||!s.bounds)return null;return s}async tapOnElement(n,s){let a=this.geometry.getElementCenter(n),d=Math.round(a.x),c=Math.round(a.y);o(s);try{await this.adb.executeCommand(`shell input tap ${d} ${c}`,{signal:s,waitForProcessSettlementAfterAbort:!0})}catch(u){if(s?.aborted)throw new ev("tap",r(u));throw u}}}function j(n){return n==="hidden"||n==="hidden_unconfirmed"}
|
|
4
|
+
export{ev,bo,VF,tv};
|
|
5
|
+
|
|
6
|
+
//# debugId=F30FEBB51D00609E64756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{jf,sA,mS,jN,KN,Kf}from"./chunk-44bt78m9.js";import"./chunk-jhnbfj19.js";import"./chunk-sjn0nj4p.js";import"./chunk-bn64x5z5.js";import"./chunk-0e4gm1kj.js";import"./chunk-4fgdhcwx.js";import"./chunk-6d3mmqxt.js";import"./chunk-sns0c35v.js";import"./chunk-h3n4adc6.js";import"./chunk-32jpxz2y.js";import"./chunk-79q5xsdc.js";import"./chunk-ggtd5x5a.js";import"./chunk-z8t0v07j.js";import"./chunk-mf9spd4g.js";export{sA as DEFAULT_MCP_REQUEST_TIMEOUT_MS,jf as MAX_CALLER_MCP_REQUEST_TIMEOUT_MS,Kf as ProgressExtendableDeadline,mS as clampCallerMcpRequestTimeoutMs,jN as resolveMcpRequestTimeoutMs,KN as resolveMcpRequestTimeoutMsOnce};
|
|
3
|
+
|
|
4
|
+
//# debugId=4B99B172463A051564756E2164756E21
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{i,dr,l,e}from"./chunk-z8t0v07j.js";import{w,Dt,YV,U,vn,xL,bn,xa}from"./chunk-h3n4adc6.js";import{Fp,Py,cZ,QP,eA,Ay}from"./chunk-nwm2pq5v.js";import{R$,P2}from"./chunk-4pfftt07.js";import{Ed}from"./chunk-rn84t3sf.js";import{Ul,j}from"./chunk-8cghfzb2.js";import{ho,sQ}from"./chunk-0e4gm1kj.js";var f=new Set(["light","dark","auto"]),v="Automatic appearance sync is disabled by AUTOMOBILE_APPEARANCE_SYNC.",m="No device was targeted: the configuration is stored, but no device was changed. Name a session or start a device first.",d={getPooledDevices:()=>{let n=w.devicePool();if(!n)return[];return n.getAllDevices().filter((t)=>dr(t.platform)).map((t)=>({deviceId:t.id,name:t.name,platform:t.platform}))},getSessionDevice:(n)=>{let t=n?.trim();if(!t)return;let o=w.sessionManager();if(!o)return ho(t)?.device;let a=o.getDeviceForSession(t),r=a?w.devicePool()?.getDevice(a):void 0;return r&&dr(r.platform)?{deviceId:r.id,name:r.name,platform:r.platform}:void 0},getSessionForDevice:(n,t)=>{let o=w.sessionManager();if(o)return o.getSessionForDevice(n);let a=t?.trim(),r=a?ho(a):void 0;return r?.device.deviceId===n?r.sessionUuid:null},getSessionManager:()=>w.sessionManager()};function woe(n){return{...d,getSessionlessDevices:()=>[...n(),...sQ()]}}var S={getConfig:Py,updateConfig:cZ,resolveMode:QP,applyToDevice:eA,triggerSync:P2,isSyncEnabled:Ay};class g extends xa{authenticator;deviceSource;dependencies;constructor(n=Dt(YV),t=i,o=bn("appearance",{allowObserverSessions:!0}),{deviceSource:a=d,dependencies:r=S}={}){super(n,t,"Appearance");this.authenticator=o;this.deviceSource=a,this.dependencies=r}bypassesRequestChain(n){return(n.command??n.method)==="get_appearance_config"}async handleRequest(n){let t=n.command??n.method;switch(t){case"get_appearance_config":{let o=await this.dependencies.getConfig(this.configKey(n.sessionUuid));return{id:n.id,type:"appearance_response",success:!0,result:{config:o}}}case"set_appearance_sync":return this.handleSetAppearanceSync(n);case"set_appearance":return this.handleSetAppearance(n);default:throw Error(`Unsupported appearance command: ${t}`)}}async handleSetAppearanceSync(n){this.authenticator.authorize({sessionUuid:n.sessionUuid});let t=n.params?.enabled??n.enabled;if(typeof t!=="boolean")throw Error("set_appearance_sync requires enabled boolean");return this.asControlCall("set_appearance_sync",n.sessionUuid,async(o)=>{let a=await this.dependencies.updateConfig({syncWithHost:t},this.configKey(n.sessionUuid)),r=await this.applyToTargets(a,o);return await this.dependencies.triggerSync(),{id:n.id,type:"appearance_response",success:!0,result:{config:a,appliedMode:r??void 0,...this.warningFor(t,o)}}})}async handleSetAppearance(n){this.authenticator.authorize({sessionUuid:n.sessionUuid});let t=n.params?.mode??n.mode;if(!t||!f.has(String(t).toLowerCase()))throw Error("set_appearance requires mode: light | dark | auto");let o=String(t).toLowerCase();return this.asControlCall("set_appearance",n.sessionUuid,async(a)=>{let r=await this.dependencies.updateConfig({defaultMode:o,syncWithHost:o==="auto"},this.configKey(n.sessionUuid)),s=await this.applyToTargets(r,a,o);return await this.dependencies.triggerSync(),{id:n.id,type:"appearance_response",success:!0,result:{config:r,appliedMode:s??void 0,...this.warningFor(o==="auto",a)}}})}async asControlCall(n,t,o){let a=[];try{for(let r of this.getTargets(t)){let s={device:r};a.push(s),await this.admitOnHolderSession(n,s)}return await o(a)}finally{for(let{execution:r}of a)if(r)j.endExecution(r.id)}}async admitOnHolderSession(n,t){let o=t.device.deviceId,a=this.deviceSource.getSessionManager?.();if(!a||this.authenticator.isAuthenticationEnforced?.()===!1)return;let r=this.deviceSource.getSessionForDevice(o);if(!r)return;let s=j.startExecution(n,void 0,r);t.execution=s,j.bindDeviceExecution(s.id,o);let c=s.abortController.signal;if(await xL({deviceId:o,holderSessionUuid:r,sessionManager:a,execution:Ul(s),signal:c}),c.aborted)throw Fp(s.cancelReason)??c.reason;j.markSessionAdmitted(s.id)}createErrorResponse(n,t){return{id:n??"unknown",type:"appearance_response",success:!1,error:t}}warningFor(n,t){let o=[this.automaticSyncWarning(n),t.length===0&&this.authenticator.isAuthenticationEnforced?.()===!1?{warning:m}:{}].flatMap((a)=>("warning"in a)?[a.warning]:[]);return o.length>0?{warning:o.join(" ")}:{}}automaticSyncWarning(n){return n&&!(this.dependencies.isSyncEnabled??Ay)()?{warning:v}:{}}async applyToTargets(n,t,o){let a=o&&o!=="auto"?o:await this.dependencies.resolveMode(n);if(t.length===0)return null;for(let r of t){let{device:s}=r;try{await l(()=>this.applyToTarget(r,a),{timer:this.timer,timeoutMs:this.dependencies.applyDeadlineMs??R$,label:`Appearance apply for ${s.deviceId}`})}catch(c){let p=Fp(r.execution?.cancelReason);if(p)throw p;e.warn(`[Appearance] Failed to apply appearance to ${s.deviceId}: ${c}`)}}return a}async applyToTarget(n,t){let o=async()=>{await Ed(n.device,["nightMode"]),await this.dependencies.applyToDevice(n.device,t)},a=n.execution?.abortController.signal;await(a?U(a,o):o())}configKey(n){if(this.authenticator.isAuthenticationEnforced?.()===!1)return;return this.authenticator.resolveSessionIdentity?.(n)??(n?.trim()||void 0)}sessionlessDevices(n){return!n&&this.authenticator.isAuthenticationEnforced?.()===!1?this.deviceSource.getSessionlessDevices?.()??[]:[]}getTargets(n){let t=n?.trim()||void 0,o=new Map;for(let c of this.deviceSource.getPooledDevices())o.set(c.deviceId,c);let a=this.deviceSource.getSessionDevice(t);if(a)o.set(a.deviceId,a);for(let c of this.sessionlessDevices(t))o.set(c.deviceId,c);if(this.authenticator.isAuthenticationEnforced?.()===!1)return[...o.values()];let r=this.configKey(t),s=[...o.values()].filter((c)=>{let p=this.deviceSource.getSessionForDevice(c.deviceId,t);if(!r||!p)return!1;return(this.authenticator.resolveSessionIdentity?.(p)??p)===r});if(s.length===0)e.info(`[Appearance] Session ${r??"unknown"} owns no device; config stored`);return s}}var u=new vn;function h2(){return u.instance?.getSocketPath()??Dt(YV)}async function g2(n=d){await u.start(()=>new g(void 0,void 0,void 0,{deviceSource:n}))}async function y2(){await u.stop()}
|
|
3
|
+
export{woe,h2,g2,y2};
|
|
4
|
+
|
|
5
|
+
//# debugId=EA3D1743E7D1633764756E2164756E21
|