alistgo-alist-web 3.63.0 → 3.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{2fa-abc3de78.js → 2fa-ed5fd3f5.js} +1 -1
- package/dist/assets/{2fa-legacy.55737098.js → 2fa-legacy.ac2273d3.js} +1 -1
- package/dist/assets/{About-ebade33f.js → About-07b39c36.js} +1 -1
- package/dist/assets/{About-legacy.1ab87d8b.js → About-legacy.f45be2db.js} +1 -1
- package/dist/assets/{AddLabelDialog-d838839b.js → AddLabelDialog-1d6357b9.js} +1 -1
- package/dist/assets/{AddLabelDialog-legacy.0c773d90.js → AddLabelDialog-legacy.dd6c914a.js} +1 -1
- package/dist/assets/AddOrEdit-07c7f3da.js +1 -0
- package/dist/assets/AddOrEdit-8e0d8742.js +4 -0
- package/dist/assets/{AddOrEdit-b4bb1c42.js → AddOrEdit-a3103973.js} +1 -1
- package/dist/assets/{AddOrEdit-616ec90f.js → AddOrEdit-dc4e0032.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.abd115d9.js → AddOrEdit-legacy.284f0a57.js} +1 -1
- package/dist/assets/AddOrEdit-legacy.4bcd7dc8.js +1 -0
- package/dist/assets/AddOrEdit-legacy.9c182801.js +1 -0
- package/dist/assets/{AddOrEdit-legacy.2fd88478.js → AddOrEdit-legacy.afba0798.js} +1 -1
- package/dist/assets/{Common-ca550843.js → Common-8516cca9.js} +1 -1
- package/dist/assets/{Common-legacy.b3ab5071.js → Common-legacy.c5ae8b86.js} +1 -1
- package/dist/assets/{Copy-0384ca0d.js → Copy-4a811523.js} +1 -1
- package/dist/assets/{Copy-legacy.e201e664.js → Copy-legacy.8d10f1fe.js} +1 -1
- package/dist/assets/Decompress-ca56760c.js +1 -0
- package/dist/assets/{Decompress-legacy.3df460b6.js → Decompress-legacy.9f3f38d7.js} +1 -1
- package/dist/assets/{DeletePopover-3958d0ad.js → DeletePopover-b8a9a633.js} +1 -1
- package/dist/assets/{DeletePopover-legacy.49680594.js → DeletePopover-legacy.ca04a0ab.js} +1 -1
- package/dist/assets/{EditLabelDialog-ea31ea23.js → EditLabelDialog-a98f4188.js} +1 -1
- package/dist/assets/{EditLabelDialog-legacy.2b5bee02.js → EditLabelDialog-legacy.1621d4fa.js} +1 -1
- package/dist/assets/{File-9c374f1a.js → File-0abcb7cc.js} +1 -1
- package/dist/assets/{File-legacy.9d2c3ca7.js → File-legacy.9c7c661c.js} +1 -1
- package/dist/assets/{Folder-14a25b89.js → Folder-41ab63d0.js} +2 -2
- package/dist/assets/{Folder-legacy.de37bd62.js → Folder-legacy.d3dd609c.js} +2 -2
- package/dist/assets/FolderTree-fee990c3.js +1 -0
- package/dist/assets/{FolderTree-legacy.53528cb3.js → FolderTree-legacy.5beed504.js} +1 -1
- package/dist/assets/{Frp-f7302299.js → Frp-fdb81713.js} +1 -1
- package/dist/assets/{Frp-legacy.71102175.js → Frp-legacy.3bd5da35.js} +1 -1
- package/dist/assets/Grid-96af823b.js +1 -0
- package/dist/assets/{Grid-legacy.164386d7.js → Grid-legacy.8196af70.js} +1 -1
- package/dist/assets/GridItem-8f0a4e78.js +1 -0
- package/dist/assets/GridItem-legacy.53e5db4f.js +1 -0
- package/dist/assets/{ImageWithError-270ffbd0.js → ImageWithError-7a9cb94e.js} +1 -1
- package/dist/assets/{ImageWithError-legacy.991e20db.js → ImageWithError-legacy.7897ddfe.js} +1 -1
- package/dist/assets/{Images-1b5fd472.js → Images-5b45ded6.js} +1 -1
- package/dist/assets/{Images-legacy.d3a439bd.js → Images-legacy.7c25071b.js} +1 -1
- package/dist/assets/{Layout-77c54d54.js → Layout-03b40a95.js} +4 -4
- package/dist/assets/{Layout-legacy.d9c36690.js → Layout-legacy.b774c154.js} +1 -1
- package/dist/assets/List-2219e301.js +9 -0
- package/dist/assets/List-legacy.b78e0937.js +1 -0
- package/dist/assets/Messenger-3b98cd80.js +1 -0
- package/dist/assets/{Messenger-legacy.2447ffbd.js → Messenger-legacy.ac452c08.js} +1 -1
- package/dist/assets/{Metas-6fc6206f.js → Metas-8334d2a7.js} +1 -1
- package/dist/assets/{Metas-legacy.a22fda65.js → Metas-legacy.bf01cbbc.js} +1 -1
- package/dist/assets/{Other-bf0c8f40.js → Other-8a75824a.js} +1 -1
- package/dist/assets/{Other-legacy.0b52198b.js → Other-legacy.a375dca6.js} +1 -1
- package/dist/assets/{PackageDownload-f1225dad.js → PackageDownload-1d343eca.js} +1 -1
- package/dist/assets/{PackageDownload-legacy.5ce2ee6a.js → PackageDownload-legacy.0718c7cf.js} +1 -1
- package/dist/assets/{Paginator-8b9321c4.js → Paginator-33b3808f.js} +1 -1
- package/dist/assets/{Paginator-legacy.25f9c490.js → Paginator-legacy.0bcc0a06.js} +1 -1
- package/dist/assets/{Password-b98cef17.js → Password-1e03b2a1.js} +1 -1
- package/dist/assets/{Password-legacy.f4c14222.js → Password-legacy.38bae4cb.js} +1 -1
- package/dist/assets/{PermissionForm-7a161a53.js → PermissionForm-d8ce57a2.js} +1 -1
- package/dist/assets/{PermissionForm-legacy.14a9fe69.js → PermissionForm-legacy.9b4348f3.js} +1 -1
- package/dist/assets/{Profile-e8195cc8.js → Profile-a5f67165.js} +1 -1
- package/dist/assets/{Profile-legacy.876024b1.js → Profile-legacy.ddceb40f.js} +1 -1
- package/dist/assets/{ResponsiveGrid-0e943896.js → ResponsiveGrid-9a165c0d.js} +1 -1
- package/dist/assets/{ResponsiveGrid-legacy.a9062597.js → ResponsiveGrid-legacy.92d430a0.js} +1 -1
- package/dist/assets/{Role-3e2c225c.js → Role-237e29ce.js} +1 -1
- package/dist/assets/{Role-legacy.2745cfe3.js → Role-legacy.937d458b.js} +1 -1
- package/dist/assets/{S3-3211311d.js → S3-061d6236.js} +1 -1
- package/dist/assets/{S3-legacy.6b587900.js → S3-legacy.8823249a.js} +1 -1
- package/dist/assets/{S3Transition-4b41bf18.js → S3Transition-beb9f092.js} +1 -1
- package/dist/assets/{S3Transition-legacy.cf3cde2a.js → S3Transition-legacy.a9014759.js} +1 -1
- package/dist/assets/{SettingItem-e7a7bfc9.js → SettingItem-1101a924.js} +1 -1
- package/dist/assets/{SettingItem-legacy.b5a9ffeb.js → SettingItem-legacy.2e0a1b78.js} +1 -1
- package/dist/assets/{Storages-baae5b17.js → Storages-d34a1526.js} +1 -1
- package/dist/assets/{Storages-legacy.bf0c1aa1.js → Storages-legacy.b1cd5702.js} +1 -1
- package/dist/assets/{StrmGenerate-d4f07081.js → StrmGenerate-79e9aee1.js} +1 -1
- package/dist/assets/StrmGenerate-7bb10c94.js +1 -0
- package/dist/assets/{StrmGenerate-legacy.4402360f.js → StrmGenerate-legacy.21cae5f7.js} +1 -1
- package/dist/assets/{StrmGenerate-legacy.ecbb8e9d.js → StrmGenerate-legacy.ab5aecec.js} +1 -1
- package/dist/assets/{Tag-ffe1a992.js → Tag-ec0bc77d.js} +1 -1
- package/dist/assets/{Tag-legacy.971a1953.js → Tag-legacy.091c6c0b.js} +1 -1
- package/dist/assets/{Task-438c4d6b.js → Task-ee12c6df.js} +1 -1
- package/dist/assets/{Task-legacy.607e52ad.js → Task-legacy.993c84aa.js} +1 -1
- package/dist/assets/{Tasks-c0229b29.js → Tasks-da5c9e10.js} +1 -1
- package/dist/assets/{Tasks-legacy.f3598230.js → Tasks-legacy.24f9634a.js} +1 -1
- package/dist/assets/Upload-0bd3bbaf.js +1 -0
- package/dist/assets/{Upload-958e240c.js → Upload-a30ea457.js} +1 -1
- package/dist/assets/{Upload-legacy.03c286e2.js → Upload-legacy.8e3f8f5b.js} +1 -1
- package/dist/assets/{Upload-legacy.698d3c2b.js → Upload-legacy.9c750547.js} +1 -1
- package/dist/assets/{Users-bdf25bea.js → Users-8072ac4d.js} +1 -1
- package/dist/assets/{Users-legacy.b0075433.js → Users-legacy.f5b75f2a.js} +1 -1
- package/dist/assets/{Wether-891c8709.js → Wether-2d1fe638.js} +1 -1
- package/dist/assets/{Wether-legacy.7a5c9f59.js → Wether-legacy.98561794.js} +1 -1
- package/dist/assets/{aliyun_office-a22ac966.js → aliyun_office-ebee9588.js} +1 -1
- package/dist/assets/{aliyun_office-legacy.910c67dd.js → aliyun_office-legacy.b06a1a45.js} +1 -1
- package/dist/assets/{aliyun_video-72e75696.js → aliyun_video-b7361903.js} +1 -1
- package/dist/assets/{aliyun_video-legacy.3ca538ae.js → aliyun_video-legacy.6d4ff360.js} +1 -1
- package/dist/assets/archive-918eb782.js +1 -0
- package/dist/assets/{archive-legacy.141ed6de.js → archive-legacy.66cc28d1.js} +1 -1
- package/dist/assets/{asciinema-befe680b.js → asciinema-c7a38e55.js} +1 -1
- package/dist/assets/{asciinema-legacy.0e111ef8.js → asciinema-legacy.f5ef7418.js} +1 -1
- package/dist/assets/{audio-37bb4f75.js → audio-767031b9.js} +1 -1
- package/dist/assets/{audio-legacy.9c9e6fd9.js → audio-legacy.a1601447.js} +1 -1
- package/dist/assets/{backup-restore-8d5112f2.js → backup-restore-1e664d39.js} +1 -1
- package/dist/assets/{backup-restore-legacy.21994194.js → backup-restore-legacy.3454be27.js} +1 -1
- package/dist/assets/{doubao-4962e438.js → doubao-dbccef6f.js} +1 -1
- package/dist/assets/{doubao-legacy.e8e5bddc.js → doubao-legacy.54e97f26.js} +1 -1
- package/dist/assets/{download-cf222578.js → download-85777c30.js} +1 -1
- package/dist/assets/{download-legacy.6b17b261.js → download-legacy.0a88d596.js} +1 -1
- package/dist/assets/entry-0c2f5c59.js +5 -0
- package/dist/assets/entry-1cb4692b.js +5 -0
- package/dist/assets/entry-293f8889.js +9 -0
- package/dist/assets/entry-2b7d7a8d.js +5 -0
- package/dist/assets/entry-54719adb.js +5 -0
- package/dist/assets/entry-6a475220.js +8 -0
- package/dist/assets/entry-922e5ac4.js +6 -0
- package/dist/assets/entry-bb2bec47.js +5 -0
- package/dist/assets/entry-c0e113da.js +5 -0
- package/dist/assets/entry-d9ec77d7.js +5 -0
- package/dist/assets/entry-legacy.3077b509.js +1 -0
- package/dist/assets/entry-legacy.30e420ec.js +1 -0
- package/dist/assets/entry-legacy.33fb2aeb.js +1 -0
- package/dist/assets/entry-legacy.5477e86d.js +1 -0
- package/dist/assets/entry-legacy.70163a35.js +1 -0
- package/dist/assets/entry-legacy.8ef24743.js +1 -0
- package/dist/assets/entry-legacy.da9a301f.js +1 -0
- package/dist/assets/entry-legacy.e8c74358.js +1 -0
- package/dist/assets/entry-legacy.eb9090b0.js +1 -0
- package/dist/assets/entry-legacy.ed0cc5a4.js +1 -0
- package/dist/assets/{helper-8d6da87f.js → helper-89addd3d.js} +1 -1
- package/dist/assets/{helper-bcff9934.js → helper-ab5aae32.js} +1 -1
- package/dist/assets/{helper-legacy.c67cf50b.js → helper-legacy.41207839.js} +1 -1
- package/dist/assets/{helper-legacy.fc3cc7d5.js → helper-legacy.4304690b.js} +1 -1
- package/dist/assets/{hls-34ad2bf0.js → hls-490669be.js} +1 -1
- package/dist/assets/{hls-legacy.258e62dc.js → hls-legacy.0cd3dbde.js} +1 -1
- package/dist/assets/{html-772e9d83.js → html-ae28dd97.js} +1 -1
- package/dist/assets/{html-legacy.d0f89f46.js → html-legacy.1ee9a3dd.js} +1 -1
- package/dist/assets/{image-73b55447.js → image-ce762fda.js} +1 -1
- package/dist/assets/{image-legacy.944e86c3.js → image-legacy.ebb99722.js} +1 -1
- package/dist/assets/{index-2da9ca8e.js → index-0b95f278.js} +2 -2
- package/dist/assets/index-0c3482f7.js +1 -0
- package/dist/assets/{index-6021c988.js → index-12a11fa4.js} +1 -1
- package/dist/assets/{index-66f271c4.js → index-1f021dd2.js} +1 -1
- package/dist/assets/index-25c8c203.js +1 -0
- package/dist/assets/index-5b80a56f.js +1 -0
- package/dist/assets/{index-314d6447.js → index-6e2f0655.js} +1 -1
- package/dist/assets/{index-0af67a26.js → index-6e98aa26.js} +37 -37
- package/dist/assets/index-94a67054.js +4 -0
- package/dist/assets/{index-66bc0c4a.js → index-9f85fd4a.js} +1 -1
- package/dist/assets/index-aa5a83eb.js +1 -0
- package/dist/assets/{index-bc854cf4.js → index-cdc3b5ff.js} +1 -1
- package/dist/assets/index-d0610ae0.js +1 -0
- package/dist/assets/{index-14204052.js → index-d8ea6769.js} +1 -1
- package/dist/assets/{index-legacy.9a995a78.js → index-legacy.0569de56.js} +3 -3
- package/dist/assets/index-legacy.35059afc.js +1 -0
- package/dist/assets/{index-legacy.14cbd866.js → index-legacy.4902336b.js} +1 -1
- package/dist/assets/{index-legacy.06ba96c2.js → index-legacy.50848259.js} +1 -1
- package/dist/assets/index-legacy.63ab569f.js +1 -0
- package/dist/assets/{index-legacy.53efc4c8.js → index-legacy.7d1fb0aa.js} +1 -1
- package/dist/assets/{index-legacy.831645c0.js → index-legacy.7efaa5f5.js} +1 -1
- package/dist/assets/index-legacy.82ee4b37.js +1 -0
- package/dist/assets/{index-legacy.24d29f81.js → index-legacy.aadeb0a6.js} +1 -1
- package/dist/assets/{index-legacy.35aba8a0.js → index-legacy.c084734b.js} +1 -1
- package/dist/assets/{index-legacy.f9d48ec7.js → index-legacy.d8a05658.js} +1 -1
- package/dist/assets/{index-legacy.2ecd8568.js → index-legacy.e99049a5.js} +1 -1
- package/dist/assets/{index-legacy.aa1b93bf.js → index-legacy.f38f262a.js} +1 -1
- package/dist/assets/{index-legacy.7b9d362b.js → index-legacy.fdc1b267.js} +1 -1
- package/dist/assets/{indexes-39a5b1ff.js → indexes-9e849b24.js} +2 -2
- package/dist/assets/{indexes-legacy.8769beeb.js → indexes-legacy.09a65722.js} +1 -1
- package/dist/assets/info-57ab995f.js +1 -0
- package/dist/assets/{info-legacy.dc8f48be.js → info-legacy.6f573e67.js} +1 -1
- package/dist/assets/{ipa-86dc8896.js → ipa-1c627d9e.js} +1 -1
- package/dist/assets/{ipa-legacy.17ae2e8d.js → ipa-legacy.466226b4.js} +1 -1
- package/dist/assets/{lark-73a41a60.js → lark-9c1d307c.js} +1 -1
- package/dist/assets/{lark-legacy.24acf7f1.js → lark-legacy.7226f6e3.js} +1 -1
- package/dist/assets/{lark_tools-649a02b3.js → lark_tools-8c437ef0.js} +1 -1
- package/dist/assets/{lark_tools-legacy.eecb6c72.js → lark_tools-legacy.90fd3d64.js} +1 -1
- package/dist/assets/{layout-5d35ffe8.js → layout-8c3e88b6.js} +1 -1
- package/dist/assets/{layout-legacy.ae9754f2.js → layout-legacy.4f5f3870.js} +1 -1
- package/dist/assets/{management-0c24b19e.js → management-4c1a6b51.js} +1 -1
- package/dist/assets/{management-legacy.8848a8f8.js → management-legacy.84e5760a.js} +1 -1
- package/dist/assets/{markdown-8d906270.js → markdown-3ab05481.js} +1 -1
- package/dist/assets/{markdown-legacy.9eb66931.js → markdown-legacy.0df6ed9c.js} +1 -1
- package/dist/assets/{markdown_with_word_wrap-c0408f23.js → markdown_with_word_wrap-b392805e.js} +1 -1
- package/dist/assets/{markdown_with_word_wrap-legacy.3463bef2.js → markdown_with_word_wrap-legacy.e68f3d4b.js} +1 -1
- package/dist/assets/{mySession-884023ca.js → mySession-7bcb5a9b.js} +1 -1
- package/dist/assets/{mySession-legacy.68203a3e.js → mySession-legacy.dadbd1a4.js} +1 -1
- package/dist/assets/offline_download-bcb94b4e.js +1 -0
- package/dist/assets/{offline_download-legacy.d0f875cd.js → offline_download-legacy.aa9a79f5.js} +1 -1
- package/dist/assets/open-with-d9208620.js +1 -0
- package/dist/assets/open-with-legacy.e3bd9fea.js +1 -0
- package/dist/assets/{plist-18445805.js → plist-a6756c80.js} +1 -1
- package/dist/assets/{plist-legacy.c128376d.js → plist-legacy.e1cd044b.js} +1 -1
- package/dist/assets/{polyfills-legacy.bfccebe0.js → polyfills-legacy.03573a32.js} +1 -1
- package/dist/assets/{shares-d862241a.js → shares-51c029e6.js} +1 -1
- package/dist/assets/{shares-legacy.2e408931.js → shares-legacy.bf13fa75.js} +1 -1
- package/dist/assets/{solid-contextmenu-389460bd.js → solid-contextmenu-c30dd1d1.js} +1 -1
- package/dist/assets/{solid-contextmenu-legacy.0f1769af.js → solid-contextmenu-legacy.1761700f.js} +1 -1
- package/dist/assets/{text-editor-ffff6c54.js → text-editor-fb3ed4e7.js} +2 -2
- package/dist/assets/{text-editor-legacy.cd9e1a2d.js → text-editor-legacy.456eba2d.js} +1 -1
- package/dist/assets/{url-23fb7cc0.js → url-16016714.js} +1 -1
- package/dist/assets/{url-legacy.b18d3809.js → url-legacy.f4fd9db0.js} +1 -1
- package/dist/assets/{useTitle-394ae64f.js → useTitle-f9295ffa.js} +1 -1
- package/dist/assets/{useTitle-legacy.2e69d9a6.js → useTitle-legacy.4c438d1f.js} +1 -1
- package/dist/assets/{video-ebb98b67.js → video-a0ebea7a.js} +1 -1
- package/dist/assets/{video-legacy.768a1779.js → video-legacy.5b7f41a6.js} +1 -1
- package/dist/assets/{video360-a4d64816.js → video360-df3b70b3.js} +1 -1
- package/dist/assets/{video360-legacy.8266ee4a.js → video360-legacy.267eb864.js} +1 -1
- package/dist/assets/{video_box-a8a43c3b.js → video_box-3ddaba1b.js} +1 -1
- package/dist/assets/{video_box-legacy.53fe4ab0.js → video_box-legacy.a54c8061.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/AddOrEdit-81330314.js +0 -4
- package/dist/assets/AddOrEdit-ebed8ac0.js +0 -1
- package/dist/assets/AddOrEdit-legacy.3af450b0.js +0 -1
- package/dist/assets/AddOrEdit-legacy.acbb24c8.js +0 -1
- package/dist/assets/Decompress-272f91b5.js +0 -1
- package/dist/assets/FolderTree-7ae29384.js +0 -1
- package/dist/assets/Grid-f0c4d013.js +0 -1
- package/dist/assets/GridItem-657d21bd.js +0 -1
- package/dist/assets/GridItem-legacy.2c3dbff8.js +0 -1
- package/dist/assets/List-cb3f2b1f.js +0 -9
- package/dist/assets/List-legacy.d509dbd5.js +0 -1
- package/dist/assets/Messenger-69bf75f1.js +0 -1
- package/dist/assets/StrmGenerate-768d6021.js +0 -1
- package/dist/assets/Upload-e69eb0ff.js +0 -1
- package/dist/assets/archive-15d8b252.js +0 -1
- package/dist/assets/entry-23d0eac8.js +0 -5
- package/dist/assets/entry-2abbb591.js +0 -5
- package/dist/assets/entry-55b019b5.js +0 -6
- package/dist/assets/entry-6fb77620.js +0 -5
- package/dist/assets/entry-9896052e.js +0 -5
- package/dist/assets/entry-9a9c06fb.js +0 -5
- package/dist/assets/entry-d1529af3.js +0 -8
- package/dist/assets/entry-d2b2146e.js +0 -5
- package/dist/assets/entry-d9866ffb.js +0 -5
- package/dist/assets/entry-f67c0939.js +0 -9
- package/dist/assets/entry-legacy.1c11c4ce.js +0 -1
- package/dist/assets/entry-legacy.6066ebc9.js +0 -1
- package/dist/assets/entry-legacy.60876545.js +0 -1
- package/dist/assets/entry-legacy.62cc3c3d.js +0 -1
- package/dist/assets/entry-legacy.8088e3bc.js +0 -1
- package/dist/assets/entry-legacy.b99b54c1.js +0 -1
- package/dist/assets/entry-legacy.b9b7580f.js +0 -1
- package/dist/assets/entry-legacy.c9424c94.js +0 -1
- package/dist/assets/entry-legacy.d1b30365.js +0 -1
- package/dist/assets/entry-legacy.f43d27fe.js +0 -1
- package/dist/assets/index-003b5203.js +0 -4
- package/dist/assets/index-54ddc888.js +0 -1
- package/dist/assets/index-6cfcfd46.js +0 -1
- package/dist/assets/index-76fcdbdf.js +0 -1
- package/dist/assets/index-cbfadd9b.js +0 -1
- package/dist/assets/index-ccd3c2df.js +0 -1
- package/dist/assets/index-legacy.257815ef.js +0 -1
- package/dist/assets/index-legacy.5a403980.js +0 -1
- package/dist/assets/index-legacy.b2067bd5.js +0 -1
- package/dist/assets/info-6b46a634.js +0 -1
- package/dist/assets/offline_download-6fa0e9d2.js +0 -1
- package/dist/assets/open-with-7bd13257.js +0 -1
- package/dist/assets/open-with-legacy.89db98a3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as v,ba as c,bq as u,b as w,C as i,y as t,S as x,Y as S,bW as g,aB as C,aG as _,ar as $,aD as k,N as D,R as I,
|
|
1
|
+
import{d as v,ba as c,bq as u,b as w,C as i,y as t,S as x,Y as S,bW as g,aB as C,aG as _,ar as $,aD as k,N as D,R as I,cZ as R,az as d,n as T,a3 as q,bc as B,dB as F}from"./index-6e98aa26.js";const M=()=>{const{back:n}=v(),[l,p]=c(()=>u.post("/auth/2fa/generate")),a=w(),[r,h]=i(),f=async()=>{if(d().otp){T.warning(a("users.2fa_already_enabled")),n();return}const e=await p();q(e,h)},[s,y]=i("");f();const[m,b]=c(()=>{var e;return u.post("/auth/2fa/verify",{code:s(),secret:(e=r())==null?void 0:e.secret})}),o=async()=>{const e=await b();B(e,()=>{F({...d(),otp:!0}),n()})};return t(R,{get loading(){return l()},get children(){return t(x,{get when(){return r()},get children(){return t(S,{spacing:"$2",alignItems:"start",get children(){return[t(g,{get children(){return a("users.scan_qr")}}),t(C,{boxSize:"$xs",rounded:"$lg",get src(){var e;return(e=r())==null?void 0:e.qr}}),t(g,{get children(){return[_(()=>a("users.or_manual")),":"," ",t($,{get color(){return k()},get children(){var e;return(e=r())==null?void 0:e.secret}})]}}),t(D,{maxW:"$xs",get placeholder(){return a("users.input_code")},get value(){return s()},onInput:e=>y(e.currentTarget.value),onKeyDown:e=>{e.key==="Enter"&&o()}}),t(I,{get loading(){return m()},onClick:o,get children(){return a("users.verify")}})]}})}})}})};export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function e(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(r){n(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}function n(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(P){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=O(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}r.wrap=l;var h={};function p(){}function y(){}function v(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&n.call(m,a)&&(d=m);var b=v.prototype=p.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function o(i,a,u,c){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return o("throw",t,u,c)}))}c(f.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function O(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,O(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return y.prototype=v,f(b,"constructor",v),f(v,"constructor",y),y.displayName=f(v,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),f(b,c,"Generator"),f(b,a,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function i(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}function u(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return c(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return c(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.9a995a78.js"],(function(t,r){"use strict";var n,i,c,f,l,s,h,p,y,v,d,g,m,b,w,x,O,L,j,E,S;return{setters:[function(t){n=t.d,i=t.ba,c=t.bq,f=t.b,l=t.C,s=t.y,h=t.S,p=t.Y,y=t.bW,v=t.aB,d=t.aG,g=t.ar,m=t.aD,b=t.N,w=t.R,x=t.cY,O=t.az,L=t.n,j=t.a3,E=t.bc,S=t.dA}],execute:function(){t("default",(function(){var t=n().back,r=u(i((function(){return c.post("/auth/2fa/generate")})),2),_=r[0],P=r[1],k=f(),A=u(l(),2),G=A[0],N=A[1],I=function(){var r=a(o().mark((function r(){var e;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!O().otp){r.next=4;break}return L.warning(k("users.2fa_already_enabled")),t(),r.abrupt("return");case 4:return r.next=6,P();case 6:e=r.sent,j(e,N);case 8:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}(),T=u(l(""),2),D=T[0],F=T[1];I();var $=u(i((function(){var t;return c.post("/auth/2fa/verify",{code:D(),secret:null===(t=G())||void 0===t?void 0:t.secret})})),2),Y=$[0],q=$[1],C=function(){var r=a(o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,q();case 2:n=r.sent,E(n,(function(){S(e(e({},O()),{},{otp:!0})),t()}));case 4:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return s(x,{get loading(){return _()},get children(){return s(h,{get when(){return G()},get children(){return s(p,{spacing:"$2",alignItems:"start",get children(){return[s(y,{get children(){return k("users.scan_qr")}}),s(v,{boxSize:"$xs",rounded:"$lg",get src(){var t;return null===(t=G())||void 0===t?void 0:t.qr}}),s(y,{get children(){return[d((function(){return k("users.or_manual")})),":"," ",s(g,{get color(){return m()},get children(){var t;return null===(t=G())||void 0===t?void 0:t.secret}})]}}),s(b,{maxW:"$xs",get placeholder(){return k("users.input_code")},get value(){return D()},onInput:function(t){return F(t.currentTarget.value)},onKeyDown:function(t){"Enter"===t.key&&C()}}),s(w,{get loading(){return Y()},onClick:C,get children(){return k("users.verify")}})]}})}})}})}))}}}))}();
|
|
1
|
+
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function e(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(r){n(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))}))}return t}function n(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var r={},e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(P){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof p?r:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=O(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}r.wrap=l;var h={};function p(){}function y(){}function v(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&n.call(m,a)&&(d=m);var b=v.prototype=p.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function o(i,a,u,c){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):e.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return o("throw",t,u,c)}))}c(f.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function O(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,O(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return y.prototype=v,f(b,"constructor",v),f(v,"constructor",y),y.displayName=f(v,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),f(b,c,"Generator"),f(b,a,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function i(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var a=t.apply(r,e);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}function u(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return c(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return c(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.0569de56.js"],(function(t,r){"use strict";var n,i,c,f,l,s,h,p,y,v,d,g,m,b,w,x,O,L,j,E,S;return{setters:[function(t){n=t.d,i=t.ba,c=t.bq,f=t.b,l=t.C,s=t.y,h=t.S,p=t.Y,y=t.bW,v=t.aB,d=t.aG,g=t.ar,m=t.aD,b=t.N,w=t.R,x=t.cZ,O=t.az,L=t.n,j=t.a3,E=t.bc,S=t.dB}],execute:function(){t("default",(function(){var t=n().back,r=u(i((function(){return c.post("/auth/2fa/generate")})),2),_=r[0],P=r[1],k=f(),G=u(l(),2),N=G[0],A=G[1],I=function(){var r=a(o().mark((function r(){var e;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!O().otp){r.next=4;break}return L.warning(k("users.2fa_already_enabled")),t(),r.abrupt("return");case 4:return r.next=6,P();case 6:e=r.sent,j(e,A);case 8:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}(),T=u(l(""),2),D=T[0],F=T[1];I();var $=u(i((function(){var t;return c.post("/auth/2fa/verify",{code:D(),secret:null===(t=N())||void 0===t?void 0:t.secret})})),2),q=$[0],C=$[1],Y=function(){var r=a(o().mark((function r(){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,C();case 2:n=r.sent,E(n,(function(){S(e(e({},O()),{},{otp:!0})),t()}));case 4:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return s(x,{get loading(){return _()},get children(){return s(h,{get when(){return N()},get children(){return s(p,{spacing:"$2",alignItems:"start",get children(){return[s(y,{get children(){return k("users.scan_qr")}}),s(v,{boxSize:"$xs",rounded:"$lg",get src(){var t;return null===(t=N())||void 0===t?void 0:t.qr}}),s(y,{get children(){return[d((function(){return k("users.or_manual")})),":"," ",s(g,{get color(){return m()},get children(){var t;return null===(t=N())||void 0===t?void 0:t.secret}})]}}),s(b,{maxW:"$xs",get placeholder(){return k("users.input_code")},get value(){return D()},onInput:function(t){return F(t.currentTarget.value)},onKeyDown:function(t){"Enter"===t.key&&Y()}}),s(w,{get loading(){return q()},onClick:Y,get children(){return k("users.verify")}})]}})}})}})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,aY as n,y as a,bV as r,
|
|
1
|
+
import{b as t,aY as n,y as a,bV as r,cZ as s}from"./index-6e98aa26.js";import{b as o}from"./useTitle-f9295ffa.js";const i=async()=>await(await fetch("https://jsd.nn.ci/gh/alist-org/alist@main/README.md")).text(),m=()=>{t(),o("manage.sidemenu.about");const[e]=n(i);return a(s,{get loading(){return e.loading},get children(){return a(r,{get children(){return e()}})}})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function n(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return r};var r={},e=Object.prototype,o=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(k){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof y?r:y,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=L(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}r.wrap=l;var h={};function y(){}function p(){}function v(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(_([])));m&&m!==e&&o.call(m,a)&&(d=m);var w=v.prototype=y.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,u,c){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(f.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function L(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,L(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=v,f(w,"constructor",v),f(v,"constructor",p),p.displayName=f(v,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,c,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:_(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function o(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}System.register(["./index-legacy.
|
|
1
|
+
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function n(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return r};var r={},e=Object.prototype,o=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(k){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof y?r:y,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=L(a,e);if(u){if(u===h)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}r.wrap=l;var h={};function y(){}function p(){}function v(){}var d={};f(d,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(_([])));m&&m!==e&&o.call(m,a)&&(d=m);var w=v.prototype=y.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,u,c){var f=s(r[i],r,a);if("throw"!==f.type){var l=f.arg,h=l.value;return h&&"object"==t(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(h).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(f.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function L(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,L(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,h;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=v,f(w,"constructor",v),f(v,"constructor",p),p.displayName=f(v,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===p||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),f(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),f(w,c,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),h}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:_(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),h}},r}function o(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(f){return void e(f)}u.done?r(c):Promise.resolve(c).then(n,o)}System.register(["./index-legacy.0569de56.js","./useTitle-legacy.4c438d1f.js"],(function(t,e){"use strict";var i,a,u,c,f,l;return{setters:[function(t){i=t.b,a=t.aY,u=t.y,c=t.bV,f=t.cZ},function(t){l=t.b}],execute:function(){var e=function(){var t,r=(t=n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("https://jsd.nn.ci/gh/alist-org/alist@main/README.md");case 2:return t.next=4,t.sent.text();case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})),function(){var r=this,e=arguments;return new Promise((function(n,i){var a=t.apply(r,e);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))});return function(){return r.apply(this,arguments)}}();t("default",(function(){i(),l("manage.sidemenu.about");var t=r(a(e),1)[0];return u(f,{get loading(){return t.loading},get children(){return u(c,{get children(){return t()}})}})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as F,C as l,I as M,dU as O,a3 as B,y as e,M as T,J as k,X as I,K as H,aG as L,L as R,Y as C,Z as c,$ as u,N as $,O as A,aw as p,av as D,cy as W,bW as q,a6 as z,ar as w,aP as E,Q as N,R as v,U,dV as h,dW as V,dX as X,W as j}from"./index-
|
|
1
|
+
import{b as F,C as l,I as M,dU as O,a3 as B,y as e,M as T,J as k,X as I,K as H,aG as L,L as R,Y as C,Z as c,$ as u,N as $,O as A,aw as p,av as D,cy as W,bW as q,a6 as z,ar as w,aP as E,Q as N,R as v,U,dV as h,dW as V,dX as X,W as j}from"./index-6e98aa26.js";const m=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"],J=n=>{const t=F(),[r,i]=l(""),[o,s]=l(""),[S,f]=l(!1),[d,g]=l(m[0]),[y,b]=l([]);M(()=>{n.editingLabel?(i(n.editingLabel.name),s(n.editingLabel.description||""),g(n.editingLabel.bg_color),O(n.editingLabel.id).then(a=>{B(a,_=>{b(_||[])})})):(i(""),s(""),g(m[0]),b([]))});const x=async()=>{if(!r()){h.show({title:t("home.tag.name"),description:t("home.tag.name_required"),status:"warning"});return}try{f(!0),n.editingLabel?await V(n.editingLabel.id,r(),o(),d()):await X(r(),o(),d()),n.onSubmit(r(),o(),d()),i(""),s(""),n.onClose(),j.emit("refresh_labels"),h.show({title:t("home.tag.name"),description:n.editingLabel?t("home.tag.update_success"):t("home.tag.create_success"),status:"success"})}catch(a){h.show({title:t("home.tag.name"),description:a.message||(n.editingLabel?t("home.tag.update_failed"):t("home.tag.create_failed")),status:"danger"})}finally{f(!1)}};return e(U,{get opened(){return n.isOpen},get onClose(){return n.onClose},get children(){return[e(T,{}),e(k,{get children(){return[e(I,{}),e(H,{get children(){return L(()=>!!n.editingLabel,!0)()?t("home.tag.edit"):t("home.tag.add")}}),e(R,{get children(){return e(C,{spacing:"$3",get children(){return[e(c,{required:!0,get children(){return[e(u,{get children(){return t("home.tag.name")}}),e($,{get placeholder(){return t("home.tag.name")},get value(){return r()},maxLength:10,onInput:a=>i(a.currentTarget.value)}),e(A,{pl:"$1",get children(){return[L(()=>r().length),"/10"]}})]}}),e(c,{get children(){return[e(u,{get children(){return t("home.tag.description")}}),e($,{get placeholder(){return t("home.tag.description")},get value(){return o()},onChange:a=>s(a.currentTarget.value)})]}}),e(c,{get children(){return[e(u,{get children(){return t("home.tag.color")}}),e(p,{spacing:"$4",justifyContent:"start",get children(){return m.map(a=>e(D,{as:"button",type:"button",w:"$7",h:"$7",rounded:"$full",bgColor:a,cursor:"pointer",get border(){return d()===a?"3px solid $neutral8":"none"},_hover:{transform:"scale(1.1)"},transition:"all 0.2s",onClick:()=>g(a)}))}})]}}),e(W,{}),e(c,{get children(){return[e(q,{mb:"$4",get children(){return t("home.tag.related_files")}}),e(C,{spacing:"$2",alignItems:"stretch",get children(){return e(z,{get each(){return y()},children:a=>e(p,{p:"$4",bg:"$neutral3",rounded:"$md",spacing:"$2",overflow:"hidden",alignItems:"center",get children(){return[e(w,{flex:"2",fontSize:"$md",noOfLines:1,get children(){return a.name}}),e(E,{get label(){return a.path},placement:"top",get children(){return e(w,{flex:"3",fontSize:"$sm",color:"$neutral11",noOfLines:1,css:{direction:"rtl",textAlign:"left",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},get children(){return a.path}})}})]}})})}})]}})]}})}}),e(N,{get children(){return[e(v,{colorScheme:"primary",get onClick(){return n.onClose},mr:"$2",get children(){return t("global.cancel")}}),e(v,{onClick:x,get loading(){return S()},get children(){return t("global.confirm")}})]}})]}})]}})};export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(j){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return $()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}r.wrap=s;var h={};function d(){}function g(){}function p(){}var y={};l(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(O([])));v&&v!==n&&o.call(v,a)&&(y=v);var b=p.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:$}}function $(){return{value:void 0,done:!0}}return g.prototype=p,l(b,"constructor",p),l(p,"constructor",g),g.displayName=l(p,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.9a995a78.js"],(function(t,o){"use strict";var i,a,c,u,l,s,f,h,d,g,p,y,m,v,b,w,x,L,_,E,S,O,$,j,k,C,I,A,G,N,P;return{setters:[function(t){i=t.b,a=t.C,c=t.I,u=t.dU,l=t.a3,s=t.y,f=t.M,h=t.J,d=t.X,g=t.K,p=t.aG,y=t.L,m=t.Y,v=t.Z,b=t.$,w=t.N,x=t.O,L=t.aw,_=t.av,E=t.cy,S=t.bW,O=t.a6,$=t.ar,j=t.aP,k=t.Q,C=t.R,I=t.U,A=t.dV,G=t.dW,N=t.dX,P=t.W}],execute:function(){var o=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"];t("default",(function(t){var T=i(),F=n(a(""),2),U=F[0],W=F[1],Y=n(a(""),2),q=Y[0],z=Y[1],M=n(a(!1),2),X=M[0],J=M[1],K=n(a(o[0]),2),Q=K[0],R=K[1],V=n(a([]),2),Z=V[0],B=V[1];c((function(){t.editingLabel?(W(t.editingLabel.name),z(t.editingLabel.description||""),R(t.editingLabel.bg_color),u(t.editingLabel.id).then((function(t){l(t,(function(t){B(t||[])}))}))):(W(""),z(""),R(o[0]),B([]))}));var D=function(){var n,o=(n=e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(U()){e.next=3;break}return A.show({title:T("home.tag.name"),description:T("home.tag.name_required"),status:"warning"}),e.abrupt("return");case 3:if(e.prev=3,J(!0),!t.editingLabel){e.next=10;break}return e.next=8,G(t.editingLabel.id,U(),q(),Q());case 8:e.next=12;break;case 10:return e.next=12,N(U(),q(),Q());case 12:t.onSubmit(U(),q(),Q()),W(""),z(""),t.onClose(),P.emit("refresh_labels"),A.show({title:T("home.tag.name"),description:t.editingLabel?T("home.tag.update_success"):T("home.tag.create_success"),status:"success"}),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),A.show({title:T("home.tag.name"),description:e.t0.message||(t.editingLabel?T("home.tag.update_failed"):T("home.tag.create_failed")),status:"danger"});case 23:return e.prev=23,J(!1),e.finish(23);case 26:case"end":return e.stop()}}),r,null,[[3,20,23,26]])})),function(){var t=this,e=arguments;return new Promise((function(o,i){var a=n.apply(t,e);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(){return o.apply(this,arguments)}}();return s(I,{get opened(){return t.isOpen},get onClose(){return t.onClose},get children(){return[s(f,{}),s(h,{get children(){return[s(d,{}),s(g,{get children(){return p((function(){return!!t.editingLabel}),!0)()?T("home.tag.edit"):T("home.tag.add")}}),s(y,{get children(){return s(m,{spacing:"$3",get children(){return[s(v,{required:!0,get children(){return[s(b,{get children(){return T("home.tag.name")}}),s(w,{get placeholder(){return T("home.tag.name")},get value(){return U()},maxLength:10,onInput:function(t){return W(t.currentTarget.value)}}),s(x,{pl:"$1",get children(){return[p((function(){return U().length})),"/10"]}})]}}),s(v,{get children(){return[s(b,{get children(){return T("home.tag.description")}}),s(w,{get placeholder(){return T("home.tag.description")},get value(){return q()},onChange:function(t){return z(t.currentTarget.value)}})]}}),s(v,{get children(){return[s(b,{get children(){return T("home.tag.color")}}),s(L,{spacing:"$4",justifyContent:"start",get children(){return o.map((function(t){return s(_,{as:"button",type:"button",w:"$7",h:"$7",rounded:"$full",bgColor:t,cursor:"pointer",get border(){return Q()===t?"3px solid $neutral8":"none"},_hover:{transform:"scale(1.1)"},transition:"all 0.2s",onClick:function(){return R(t)}})}))}})]}}),s(E,{}),s(v,{get children(){return[s(S,{mb:"$4",get children(){return T("home.tag.related_files")}}),s(m,{spacing:"$2",alignItems:"stretch",get children(){return s(O,{get each(){return Z()},children:function(t){return s(L,{p:"$4",bg:"$neutral3",rounded:"$md",spacing:"$2",overflow:"hidden",alignItems:"center",get children(){return[s($,{flex:"2",fontSize:"$md",noOfLines:1,get children(){return t.name}}),s(j,{get label(){return t.path},placement:"top",get children(){return s($,{flex:"3",fontSize:"$sm",color:"$neutral11",noOfLines:1,css:{direction:"rtl",textAlign:"left",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},get children(){return t.path}})}})]}})}})}})]}})]}})}}),s(k,{get children(){return[s(C,{colorScheme:"primary",get onClick(){return t.onClose},mr:"$2",get children(){return T("global.cancel")}}),s(C,{onClick:D,get loading(){return X()},get children(){return T("global.confirm")}})]}})]}})]}})}))}}}))}();
|
|
1
|
+
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(j){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return $()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}r.wrap=s;var h={};function d(){}function g(){}function p(){}var y={};l(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(O([])));v&&v!==n&&o.call(v,a)&&(y=v);var b=p.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function L(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:$}}function $(){return{value:void 0,done:!0}}return g.prototype=p,l(b,"constructor",p),l(p,"constructor",g),g.displayName=l(p,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.0569de56.js"],(function(t,o){"use strict";var i,a,c,u,l,s,f,h,d,g,p,y,m,v,b,w,x,L,_,E,S,O,$,j,k,C,I,A,G,N,P;return{setters:[function(t){i=t.b,a=t.C,c=t.I,u=t.dU,l=t.a3,s=t.y,f=t.M,h=t.J,d=t.X,g=t.K,p=t.aG,y=t.L,m=t.Y,v=t.Z,b=t.$,w=t.N,x=t.O,L=t.aw,_=t.av,E=t.cy,S=t.bW,O=t.a6,$=t.ar,j=t.aP,k=t.Q,C=t.R,I=t.U,A=t.dV,G=t.dW,N=t.dX,P=t.W}],execute:function(){var o=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"];t("default",(function(t){var T=i(),F=n(a(""),2),U=F[0],W=F[1],Y=n(a(""),2),q=Y[0],z=Y[1],M=n(a(!1),2),X=M[0],J=M[1],K=n(a(o[0]),2),Q=K[0],R=K[1],V=n(a([]),2),Z=V[0],B=V[1];c((function(){t.editingLabel?(W(t.editingLabel.name),z(t.editingLabel.description||""),R(t.editingLabel.bg_color),u(t.editingLabel.id).then((function(t){l(t,(function(t){B(t||[])}))}))):(W(""),z(""),R(o[0]),B([]))}));var D=function(){var n,o=(n=e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(U()){e.next=3;break}return A.show({title:T("home.tag.name"),description:T("home.tag.name_required"),status:"warning"}),e.abrupt("return");case 3:if(e.prev=3,J(!0),!t.editingLabel){e.next=10;break}return e.next=8,G(t.editingLabel.id,U(),q(),Q());case 8:e.next=12;break;case 10:return e.next=12,N(U(),q(),Q());case 12:t.onSubmit(U(),q(),Q()),W(""),z(""),t.onClose(),P.emit("refresh_labels"),A.show({title:T("home.tag.name"),description:t.editingLabel?T("home.tag.update_success"):T("home.tag.create_success"),status:"success"}),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),A.show({title:T("home.tag.name"),description:e.t0.message||(t.editingLabel?T("home.tag.update_failed"):T("home.tag.create_failed")),status:"danger"});case 23:return e.prev=23,J(!1),e.finish(23);case 26:case"end":return e.stop()}}),r,null,[[3,20,23,26]])})),function(){var t=this,e=arguments;return new Promise((function(o,i){var a=n.apply(t,e);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(){return o.apply(this,arguments)}}();return s(I,{get opened(){return t.isOpen},get onClose(){return t.onClose},get children(){return[s(f,{}),s(h,{get children(){return[s(d,{}),s(g,{get children(){return p((function(){return!!t.editingLabel}),!0)()?T("home.tag.edit"):T("home.tag.add")}}),s(y,{get children(){return s(m,{spacing:"$3",get children(){return[s(v,{required:!0,get children(){return[s(b,{get children(){return T("home.tag.name")}}),s(w,{get placeholder(){return T("home.tag.name")},get value(){return U()},maxLength:10,onInput:function(t){return W(t.currentTarget.value)}}),s(x,{pl:"$1",get children(){return[p((function(){return U().length})),"/10"]}})]}}),s(v,{get children(){return[s(b,{get children(){return T("home.tag.description")}}),s(w,{get placeholder(){return T("home.tag.description")},get value(){return q()},onChange:function(t){return z(t.currentTarget.value)}})]}}),s(v,{get children(){return[s(b,{get children(){return T("home.tag.color")}}),s(L,{spacing:"$4",justifyContent:"start",get children(){return o.map((function(t){return s(_,{as:"button",type:"button",w:"$7",h:"$7",rounded:"$full",bgColor:t,cursor:"pointer",get border(){return Q()===t?"3px solid $neutral8":"none"},_hover:{transform:"scale(1.1)"},transition:"all 0.2s",onClick:function(){return R(t)}})}))}})]}}),s(E,{}),s(v,{get children(){return[s(S,{mb:"$4",get children(){return T("home.tag.related_files")}}),s(m,{spacing:"$2",alignItems:"stretch",get children(){return s(O,{get each(){return Z()},children:function(t){return s(L,{p:"$4",bg:"$neutral3",rounded:"$md",spacing:"$2",overflow:"hidden",alignItems:"center",get children(){return[s($,{flex:"2",fontSize:"$md",noOfLines:1,get children(){return t.name}}),s(j,{get label(){return t.path},placement:"top",get children(){return s($,{flex:"3",fontSize:"$sm",color:"$neutral11",noOfLines:1,css:{direction:"rtl",textAlign:"left",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},get children(){return t.path}})}})]}})}})}})]}})]}})}}),s(k,{get children(){return[s(C,{colorScheme:"primary",get onClick(){return t.onClose},mr:"$2",get children(){return T("global.cancel")}}),s(C,{onClick:D,get loading(){return X()},get children(){return T("global.confirm")}})]}})]}})]}})}))}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as R,d as q,C as F,de as O,ba as o,ep as N,bq as f,y as e,bW as z,cZ as B,Y as m,S as g,Z as i,$ as d,N as c,bD as H,bE as E,av as P,bF as U,a6 as b,dv as W,dw as Z,dx as A,bI as J,bJ as K,bK as M,aw as V,a0 as x,bL as Y,R as j,n as w,a3 as p}from"./index-6e98aa26.js";const X=()=>{const n=R(),{params:$,back:y}=q(),{id:u}=$,[h,v]=F([]),[t,s]=O({id:0,username:"",password:"",base_path:"/",role:[],permission:0,disabled:!1,sso_id:"",role_info:[],permissions:[],max_devices:void 0,session_ttl:void 0}),[_,S]=o(()=>N()),[I,k]=o(()=>f.get(`/admin/user/get?id=${u}`));(async()=>{const r=await S();if(p(r,l=>{v(l.content)}),u){const l=await k();p(l,a=>{s(a)})}else s("base_path","/")})();const[T,C]=o(()=>f.post(`/admin/user/${u?"update":"create"}`,t)),D=()=>!u;return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(z,{get children(){return n(u?"global.edit":"global.add")}}),e(B,{get loading(){return I()||_()},get children(){return e(m,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(g,{get when(){return!u||!(t.role_info||[]).includes(1)},get children(){return[e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(d,{for:"username",display:"flex",alignItems:"center",get children(){return n("users.username")}}),e(c,{id:"username",get value(){return t.username},onInput:r=>s("username",r.currentTarget.value)})]}}),e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(d,{for:"password",display:"flex",alignItems:"center",get children(){return n("users.password")}}),e(c,{id:"password",type:"password",placeholder:"********",get value(){return t.password},onInput:r=>s("password",r.currentTarget.value)})]}})]}}),e(g,{get when(){return!D()},get children(){return e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(d,{for:"base_path",display:"flex",alignItems:"center",get children(){return n("users.base_path")}}),e(c,{id:"base_path",value:"/",readOnly:!0})]}})}}),e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(d,{display:"flex",alignItems:"center",get children(){return n("users.role")}}),e(H,{get value(){return t.role},onChange:r=>s("role",r),get children(){return[e(E,{get children(){return e(P,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(g,{get when(){return t.role.length>0},get fallback(){return e(U,{get children(){return n("home.selected")}})},get children(){return e(b,{get each(){return t.role},children:r=>{const l=h().find(a=>a.id===r);return e(W,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(Z,{get children(){return(l==null?void 0:l.name)||`ID: ${r}`}}),e(A,{onClick:a=>{a.stopPropagation(),s("role",t.role.filter(L=>L!==r))}})]}})}})}})}})}}),e(J,{get children(){return e(K,{get children(){return e(b,{get each(){return h()},children:r=>e(M,{get value(){return r.id},onClick:()=>{const l=t.role.includes(r.id)?t.role.filter(a=>a!==r.id):[r.id];s("role",l)},get children(){return e(V,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(x,{get checked(){return t.role.includes(r.id)},readOnly:!0}),e(Y,{get children(){return r.name}})]}})}})})}})}})]}})]}}),e(i,{w:"fit-content",display:"flex",get children(){return e(x,{css:{whiteSpace:"nowrap"},id:"disabled",onChange:r=>s("disabled",r.currentTarget.checked),color:"$neutral10",fontSize:"$sm",get checked(){return t.disabled},get children(){return n("users.disabled")}})}}),e(i,{w:"$full",display:"flex",flexDirection:"column",get children(){return[e(d,{for:"max_devices",display:"flex",alignItems:"center",get children(){return n("users.max_devices")}}),e(c,{id:"max_devices",type:"number",get value(){return t.max_devices??""},onInput:r=>s("max_devices",r.currentTarget.value?Number(r.currentTarget.value):void 0)})]}}),e(i,{w:"$full",display:"flex",flexDirection:"column",get children(){return[e(d,{for:"session_ttl",display:"flex",alignItems:"center",get children(){return n("users.session_ttl")}}),e(c,{id:"session_ttl",type:"number",get value(){return t.session_ttl??""},onInput:r=>s("session_ttl",r.currentTarget.value?Number(r.currentTarget.value):void 0)})]}}),e(j,{get loading(){return T()},onClick:async()=>{if(!t.role||t.role.length===0){w.error(n("users.role")+" "+n("global.required"));return}const r=await C();p(r,()=>{w.success(n("global.save_success")),y()})},get children(){return n("global.save")}})]}})}})]}})};export{X as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{b as W,y as t,$ as U,al as X,aJ as p,am as v,N as T,bD as j,bP as q,S as y,aw as D,ar as ee,bN as te,T as ne,Y as Z,a6 as O,R as V,O as R,df as re,Z as ae,ax as ie,d as ue,ba as F,bq as I,C as de,de as H,B as le,bW as ce,eF as ge,cK as he,cL as oe,aG as se,a5 as M,n as z,ac as me,a3 as N,cZ as fe}from"./index-6e98aa26.js";import{T as a}from"./item_type-32dc6fdf.js";import{a as G}from"./FolderTree-fee990c3.js";import{R as ve}from"./ResponsiveGrid-9a165c0d.js";import"./index-d8ea6769.js";const ye=/(https?:\/\/[^\s<>"')]*[^\s<>"'),.;:])/g,be=e=>{const u=()=>e.text.split(ye);return t(O,{get each(){return u()},children:h=>/^https?:\/\//.test(h)?t(ie,{href:h,external:!0,p:"0",color:"$info9",wordBreak:"break-all",children:h}):h})},L=e=>{const u=W(),h=e.type===a.String&&!e.readonly&&(e.name==="root_folder_path"||e.name==="remote_path"),o=e.type===a.Number&&e.driver==="Chunker"&&e.name==="chunk_size",g=e.type===a.Text&&e.driver==="Chunker"&&e.name==="remote_paths",w=e.type===a.Text&&e.driver==="Strm"&&e.name==="paths",C=g||w,c=e.type===a.Bool&&e.driver==="Chunker"&&e.name==="store_chunks_in_primary",s=e.type===a.Number?e.onChange:void 0,S=()=>{var r;return String(((r=e.additionValues)==null?void 0:r.remote_paths)??"").split(`
|
|
2
|
+
`).map(n=>n.trim()).filter(Boolean)},m=()=>c?S().length===0?u("drivers.Chunker.store_chunks_in_primary-empty_hint"):e.value?u("drivers.Chunker.store_chunks_in_primary-enabled_hint"):u("drivers.Chunker.store_chunks_in_primary-disabled_hint"):"",$=()=>{if(!C)return[];const r=e.value??"";return r===""?[""]:r.split(`
|
|
3
|
+
`)},k=r=>{var n;e.type===a.Text&&((n=e.onChange)==null||n.call(e,r.join(`
|
|
4
|
+
`)))};return t(ae,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){return[t(U,{get for(){return e.name},display:"flex",alignItems:"center",get children(){return u(e.full_name_path??e.driver==="common"?`storages.common.${e.name}`:`drivers.${e.driver}.${e.name}`)}}),t(X,{get fallback(){return t(p,{get children(){return u("settings.unknown_type")}})},get children(){return[t(v,{when:h,get children(){return t(G,{get id(){return e.name},get value(){return e.value},onChange:r=>{var n;e.type===a.String&&((n=e.onChange)==null||n.call(e,r))}})}}),t(v,{get when(){return e.type===a.String},get children(){return t(T,{get id(){return e.name},get type(){return e.name=="password"?"password":"text"},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===a.String?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,r.currentTarget.value)}:void 0}})}}),t(v,{get when(){return e.type===a.Number&&e.options},get children(){return t(j,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return String(e.value)},get onChange(){return e.type===a.Number?r=>{var d;const n=parseInt(r,10);(d=e.onChange)==null||d.call(e,Number.isNaN(n)?0:n)}:void 0},get children(){return t(q,{get readonly(){return e.readonly},get options(){return e.options.split(",").map(r=>({key:r,label:u((e.options_prefix??(e.driver==="common"?`storages.common.${e.name}s`:`drivers.${e.driver}.${e.name}s`))+`.${r}`)}))}})}})}}),t(v,{get when(){return e.type===a.Number},get children(){return t(y,{when:o,get fallback(){return t(T,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===a.Number?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,parseInt(r.currentTarget.value))}:void 0}})},get children(){return t(D,{w:"$full",spacing:"$2",get children(){return[t(T,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return(e.value/(1024*1024)).toString()},onInput:r=>{const n=parseFloat(r.currentTarget.value);s==null||s(Number.isFinite(n)?Math.round(n*1024*1024):0)}}),t(ee,{minW:"3rem",textAlign:"right",children:"MB"})]}})}})}}),t(v,{get when(){return e.type===a.Float},get children(){return t(T,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===a.Float?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,parseFloat(r.currentTarget.value))}:void 0}})}}),t(v,{get when(){return e.type===a.Bool},get children(){return t(te,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===a.Bool?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,r.currentTarget.checked)}:void 0}})}}),t(v,{get when(){return e.type===a.Text},get children(){return t(y,{when:C,get fallback(){return t(ne,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===a.Text?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,r.currentTarget.value)}:void 0}})},get children(){return t(Z,{w:"$full",alignItems:"stretch",spacing:"$2",get children(){return[t(O,{get each(){return $()},children:(r,n)=>t(D,{w:"$full",alignItems:"flex-start",spacing:"$2",get children(){return[t(G,{get id(){return n()===0?e.name:void 0},value:r,onChange:d=>{const f=[...$()];f[n()]=d,k(f)}}),t(V,{colorScheme:"danger",variant:"subtle",onClick:()=>{const d=[...$()];d.splice(n(),1),k(d)},get disabled(){return e.readonly},get children(){return u("global.delete")}})]}})}),t(V,{variant:"subtle",onClick:()=>{k([...$(),""])},get disabled(){return e.readonly},get children(){return u("global.add")}})]}})}})}}),t(v,{get when(){return e.type===a.Select},get children(){return t(j,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===a.Select?r=>{var n;return(n=e.onChange)==null?void 0:n.call(e,r)}:void 0},get children(){return t(q,{get readonly(){return e.readonly},get searchable(){return e.type===a.Select&&e.searchable},get options(){return e.options.split(",").map(r=>({key:r,label:u((e.options_prefix??(e.driver==="common"?`storages.common.${e.name}s`:`drivers.${e.driver}.${e.name}s`))+`.${r}`)}))}})}})}})]}}),t(y,{get when(){return e.help},get children(){return t(R,{get children(){return t(be,{get text(){return u(e.driver==="common"?`storages.common.${e.name}-tips`:`drivers.${e.driver}.${e.name}-tips`)}})}})}}),t(y,{when:o,get children(){return t(R,{get children(){return`${e.value.toLocaleString()} bytes (${re(e.value)})`}})}}),t(y,{get when(){return m()},get children(){return t(R,{get children(){return m()}})}})]}})};function J(e,u){switch(e){case a.Bool:return u?u==="true":!1;case a.Number:return u?parseInt(u):0;default:return u||""}}function we(e,u,h){var s,S;const o=(s=e.show_when)==null?void 0:s.trim();if(!o)return!0;const g=o.indexOf("=");if(g<0)return!0;const w=o.slice(0,g).trim(),C=o.slice(g+1).split("|").map(m=>m.trim());let c=u[w];return(c==null||c==="")&&(c=((S=h.find(m=>m.name===w))==null?void 0:S.default)??""),C.includes(String(c))}const xe=()=>{const e=W(),{params:u,back:h,to:o}=ue(),{id:g}=u,[w,C]=F(()=>I.get("/admin/driver/list"),!0),[c,s]=de({}),S=async()=>{const i=await C();N(i,s)},[m,$]=F(()=>I.get(`/admin/storage/get?id=${g}`),!0),[k,r]=F(()=>I.get(`/admin/driver/info?driver=${d.driver}`),!0);g?(async()=>{const i=await $();N(i,async l=>{f(l),x(JSON.parse(l.addition));const b=await r();N(b,B=>s({[d.driver]:B}))})})():S();const[d,f]=H({}),[_,x]=H({}),[K,Y]=F(()=>(f("addition",JSON.stringify(_)),I.post(`/admin/storage/${g?"update":"create"}`,d))),P=le(()=>{var A,E;const i=(E=(A=c()[d.driver])==null?void 0:A.config.alert)==null?void 0:E.trim();if(!i)return;const[l,...b]=i.split("|"),B=["info","success","warning","danger"].includes(l)?l:"info",Q=b.length>0?b.join("|").trim():i;return{status:B,fallbackText:Q}});return t(fe,{get loading(){return g?m()||k():w()},get children(){return[t(ce,{mb:"$2",get children(){return e(`global.${g?"edit":"add"}`)}}),t(Z,{mb:"$2",spacing:"$2",get children(){return[t(L,{name:"driver",default:"",readonly:g!==void 0,required:!0,searchable:!0,get type(){return a.Select},get options(){return g?d.driver:Object.keys(c()).join(",")},get value(){return d.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:i=>{for(const l of c()[i].common)f(l.name,J(l.type,l.default));x(ge(l=>{for(const b in l)delete l[b]}));for(const l of c()[i].additional)x(l.name,J(l.type,l.default));f("driver",i)}}),t(y,{get when(){return P()},get children(){return t(he,{get status(){return P().status},w:"$full",get children(){return[t(oe,{}),se(()=>e(`drivers.config.${d.driver}.alert`,void 0,P().fallbackText))]}})}})]}}),t(ve,{get children(){return t(y,{get when(){return c()[d.driver]},get children(){return[t(O,{get each(){return c()[d.driver].common},children:i=>t(L,M(i,{driver:"common",additionValues:_,get value(){return d[i.name]},onChange:l=>{f(i.name,l)}}))}),t(O,{get each(){return c()[d.driver].additional},children:i=>t(y,{get when(){return we(i,_,c()[d.driver].additional)},get children(){return t(L,M(i,{get driver(){return d.driver},additionValues:_,get value(){return _[i.name]},onChange:l=>{x(i.name,l)}}))}})})]}})}}),t(V,{mt:"$2",get loading(){return K()},onClick:async()=>{c()[d.driver].config.need_ms&&(z.info(e("manage.add_storage-tips")),window.open(me("/@manage/messenger"),"_blank"));const i=await Y();N(i,()=>{z.success(e("global.save_success")),h()},(l,b)=>{i.data.id&&o(`/@manage/storages/edit/${i.data.id}`)})},get children(){return e(`global.${g?"save":"add"}`)}})]}})};export{xe as default,we as isItemVisible};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aW as ne,b as se,C,I as G,y as e,N as K,av as I,S,ar as F,a6 as R,du as j,dv as L,aP as pe,Y as W,aG as A,M as oe,J as ae,X as be,K as le,aw as N,L as ie,Q as ce,R as x,U as ue,d$ as Se,V as we,dY as $e,B as ee,ba as X,eH as de,_ as ge,dZ as Ce,E as _e,a0 as he,d_ as ke,aD as Y,aE as te,aa as ye,i as ve,a3 as Z,d as Pe,dd as xe,eG as Ie,r as Oe,aO as B,eI as Fe,eJ as Me,bW as Re,cY as Te,Z as D,$ as E,bD as ze,bE as Be,bF as De,dw as Ee,bI as He,bJ as je,bK as Le,bL as We,n as re,j as Ae,bq as Ne}from"./index-0af67a26.js";import{h as qe,e as Je}from"./index-14204052.js";const H=(t,d)=>t.length===d.length&&t.every((g,m)=>g===d[m]),M=(t,d)=>t.length<d.length&&t.every((g,m)=>g===d[m]),Ue=(t,d)=>d.some(o=>H(o,t))?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:d.some(o=>M(t,o))},me=t=>{const{isHidePath:d}=we(),[g,m]=C(),[o,l]=C(!1),{value:p,onChange:c,forceRoot:w,autoOpen:v,showEmptyIcon:a,showHiddenFolder:n,selectedPaths:r,onSelect:i,multiSelect:$}=$e(Q),O=ee(()=>!r||!r()?{checked:!1,indeterminate:!1}:Ue(t.segments,r()));ee(()=>!r||!r()?!1:r().some(y=>M(t.segments,y)));const q=async(h,y)=>{if(h.stopPropagation(),$&&i){const z=!O().checked;i(y,z)}else c("/"+y.join("/"))},J=()=>{var h;return!!(a&&g()!==void 0&&!((h=g())!=null&&h.length))},[U,V]=X(()=>de(t.segments.join("/"),ge(),w)),_=async()=>{var y,z;if((y=g())!=null&&y.length)return;const h=await V();if(h.code===500&&((z=h.message)!=null&&z.includes("storage not found; please add a storage first"))){m([]);return}Z(h,fe=>{m(fe)},()=>{k()&&s()})},{isOpen:k,onToggle:s}=ne(),u=()=>p()===t.segments.join("/"),f=Ce(t.segments.join("/")),b=h=>{h.stopPropagation(),k()?l(!0):(l(!1),_()),s()};G(()=>{t.segments.length,r==null||r();const h=t.segments.join("/");(()=>(o(),!1))()&&!k()&&(console.log("展开节点:",h),s(),_())}),G(_e(p,async h=>{}));const P=()=>d(t.segments.join("/"))&&!f(p());return e(S,{get when(){return n||!P()},get children(){return e(I,{get children(){return[e(N,{spacing:"$2",alignItems:"center",get children(){return[e(S,{when:$,get children(){return e(I,{get children(){return e(he,{get checked(){return O().checked},get indeterminate(){return O().indeterminate}})}})}}),e(S,{get when(){return!U()},get fallback(){return e(ke,{size:"sm",get color(){return Y()}})},get children(){return e(S,{get when(){return!J()},get fallback(){return e(te,{get color(){return Y()},as:qe})},get children(){return e(te,{get color(){return Y()},as:Je,get transform(){return k()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:b})}})}}),e(F,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return u()?"$info8":"transparent"},get _hover(){return{backgroundColor:u()?"$info8":ye()}},onClick:h=>{h.stopPropagation(),q(h,t.segments)},get children(){return A(()=>t.segments.join("/")==="",!0)()?"root":ve(t.segments.join("/"))}})]}}),e(S,{get when(){return k()},get children(){return e(W,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return e(R,{get each(){return g()},children:h=>e(me,{get segments(){return[...t.segments,h.name]}})})}})}})]}})}})},Q=Se(),Ve=t=>{var o;const[d,g]=C("/");(o=t.handle)==null||o.call(t,{setPath:g});const m=t.selectedPaths;return e(I,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return e(Q.Provider,{get value(){return{value:d,onChange:l=>{g(l),t.onChange(l)},autoOpen:t.autoOpen??!1,forceRoot:t.forceRoot??!1,showEmptyIcon:t.showEmptyIcon??!1,showHiddenFolder:t.showHiddenFolder??!0,multiSelect:t.multiSelect,selectedPaths:m,onSelect:t.onSelect}},get children(){return e(me,{segments:[]})}})}})},Ye=t=>{const{isOpen:d,onOpen:g,onClose:m}=ne(),o=se(),[l,p]=C(t.value.map(a=>a.split("/").filter(Boolean))),[c,w]=C(t.value.map(a=>a.split("/").filter(Boolean)));G(()=>{if(t.value){const a=t.value.map(n=>n.split("/").filter(Boolean));p(a),w(a)}});const v=async(a,n)=>{let r=[...l()];n?a.length===0?r=[[]]:(r=r.filter(i=>!H(i,[])&&!H(i,a)&&!M(i,a)&&!M(a,i)),r.push([...a])):r=r.filter(i=>!H(i,a)&&!M(a,i)),p(r),w(r),t.onChange(r.map(i=>i.length===0?"/":"/"+i.join("/")))};return[e(I,{w:"$full",position:"relative",get children(){return[e(K,{get id(){return t.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),e(I,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"$2",maxW:"90%",pl:"$4",cursor:"pointer",onClick:g,zIndex:1,get children(){return e(S,{get when(){return c().length>0},get fallback(){return e(F,{color:"$neutral10",get children(){return o("global.choose_folder")}})},get children(){return[e(R,{get each(){return c().slice(0,3)},children:a=>{const n="/"+a.join("/");return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:n,get children(){return e(L,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})}})}}),e(S,{get when(){return c().length>3},get children(){return e(pe,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return e(W,{alignItems:"flex-start",spacing:"$1",get children(){return e(R,{get each(){return c().slice(3)},children:a=>e(F,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+a.join("/")}})})}})},get children(){return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(L,{get children(){return["+",A(()=>c().length-3)]}})}})}})}})]}})}})]}}),e(ue,{size:"xl",get opened(){return d()},onClose:m,get children(){return[e(oe,{}),e(ae,{get children(){return[e(be,{}),e(le,{get children(){return e(N,{spacing:"$2",alignItems:"center",get children(){return[e(F,{fontWeight:"bold",get children(){return o("global.choose_folder")}}),e(F,{fontSize:"$sm",get children(){return["(",A(()=>o("global.please_click_to_select")),")"]}})]}})}}),e(ie,{get children(){return e(Q.Provider,{get value(){return{value:()=>"/",onChange:a=>{},forceRoot:!0,autoOpen:t.autoOpen??!1,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:c,onSelect:v,multiSelect:t.multiSelect}},get children(){return e(Ve,{forceRoot:!0,onChange:a=>{},get multiSelect(){return t.multiSelect},selectedPaths:c,onSelect:v,get autoOpen(){return t.autoOpen}})}})}}),e(ce,{get children(){return[e(x,{colorScheme:"neutral",onClick:m,mr:"$2",get children(){return o("global.cancel")}}),e(x,{onClick:m,get children(){return o("global.confirm")}})]}})]}})]}})]},Ge=async t=>{const d=new Map,g=async n=>{try{const r=await de(n,ge(),!0);if(r.code===200)return r.data.map($=>Ae(n,$.name))}catch(r){console.error(`获取目录 [${n}] 内容失败:`,r)}return[]},m=n=>{if(n==="/"||!n.includes("/"))return"";const r=n.lastIndexOf("/");return r===0?"/":n.substring(0,r)},o=new Set;t.forEach(n=>o.add(n)),t.forEach(n=>{let r=m(n);for(;r!=="";)o.add(r),r=m(r)});for(const n of o)if(!d.has(n)){const r=await g(n);d.set(n,r)}const l=(n,r)=>r==="/"?n!=="/":n.startsWith(r+"/"),p=(n,r)=>{const i=d.get(n)||[];return i.length===0?!1:i.every($=>r.has($)||p($,r))},c=new Set,w=new Set(t),v=[...t].sort((n,r)=>n.length-r.length);for(const n of v){let r=!1;for(const i of c)if(n!==i&&l(n,i)){r=!0;break}r||(p(n,w),c.add(n))}return c.size===0&&t.length>0&&c.add(t[0]),Array.from(c)},Ze=()=>{const t=se(),{params:d,back:g,to:m}=Pe(),{id:o}=d,[l,p]=xe({name:"",description:"",permission_scopes:[],base_path:[]});C([]);const[c,w]=C(0),[v,a]=C(!1),[n,r]=C(!1),i=async()=>{var s;try{const u=await Ne.get("/fs/list");return u.code===500&&((s=u.message)!=null&&s.includes("please add a storage first"))?(r(!0),!1):!0}catch(u){return console.error("Failed to check storage:",u),!1}},[$,O]=X(()=>Ie(parseInt(o))),q=async()=>{const s=await i();if(a(s),!!s&&o){const u=await O();Z(u,f=>{var b,T;p({name:f.name||"",description:f.description||"",permission_scopes:f.permission_scopes||[],base_path:(b=f.permission_scopes)!=null&&b.length?f.permission_scopes.map(P=>P.path):[]}),((T=f.permission_scopes)==null?void 0:T.length)>0&&w(f.permission_scopes[0].permission)})}};Oe(()=>{q()});const J=()=>l.base_path.length===0||l.name.length===0?(re.error(t("users.base_path")+" "+t("global.required")),!1):!0,[U,V]=X(async()=>{const s=B.reduce((b,T,P)=>(c()>>P&1)===1?b|1<<P:b,0),u=await Ge(l.base_path),f={name:l.name,description:l.description,permission_scopes:u.map(b=>({path:b,permission:s}))};return o?Fe({...f,id:parseInt(o)}):Me(f)}),_=()=>B.filter((s,u)=>(c()>>u&1)===1),k=s=>{const u=1<<s,f=c()^u;w(f),l.base_path&&(f>>s&1?p("permission_scopes",[...l.permission_scopes,{permission:u,path:l.base_path[0]}]):p("permission_scopes",l.permission_scopes.filter(b=>b.permission!==u||b.path!==l.base_path[0])))};return e(W,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(Re,{get children(){return t(o?"global.edit":"global.add")}}),e(Te,{get loading(){return $()},get children(){return e(S,{get when(){return v()},get children(){return e(W,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(D,{required:!0,get children(){return[e(E,{get children(){return t("permissions.role.role_name")}}),e(K,{get value(){return l.name},onInput:s=>p("name",s.currentTarget.value)})]}}),e(D,{get children(){return[e(E,{get children(){return t("permissions.role.role_description")}}),e(K,{get value(){return l.description},onInput:s=>p("description",s.currentTarget.value)})]}}),e(D,{required:!0,get children(){return[e(E,{get children(){return t("users.base_path")}}),e(Ye,{id:"base_path",get value(){return l.base_path},onChange:s=>{p("base_path",s)},multiSelect:!0,autoOpen:!!o})]}}),e(D,{get children(){return[e(E,{get children(){return t("permissions.config.permissions_permissions")}}),e(ze,{multiple:!0,get value(){return _()},get children(){return[e(Be,{get children(){return e(I,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(S,{get when(){return _().length>0},get fallback(){return e(De,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[e(R,{get each(){return _().slice(0,3)},children:(s,u)=>e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(L,{get children(){return t(`users.permissions.${s}`)}}),e(Ee,{onClick:f=>{f.stopPropagation(),k(B.indexOf(s))}})]}})}),e(S,{get when(){return _().length>3},get children(){return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(L,{get children(){return["+",A(()=>_().length-3)]}})}})}})]}})}})}}),e(He,{get children(){return e(je,{get children(){return e(R,{each:B,children:(s,u)=>e(Le,{value:s,onClick:()=>k(u()),get children(){return e(N,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(he,{get checked(){return(c()>>u()&1)===1},readOnly:!0}),e(We,{get children(){return t(`users.permissions.${s}`)}})]}})}})})}})}})]}})]}}),e(N,{spacing:"$2",get children(){return[e(x,{get loading(){return U()},onClick:async()=>{if(!J())return;const s=await V();Z(s,()=>{re.success(t("global.save_success")),g()})},get children(){return t("global.save")}}),e(x,{colorScheme:"accent",onClick:()=>g(),get children(){return t("global.back")}})]}})]}})}})}}),e(ue,{get opened(){return n()},onClose:()=>r(!1),get children(){return[e(oe,{}),e(ae,{get children(){return[e(le,{}),e(ie,{get children(){return t("storages.no_storage_content")}}),e(ce,{get children(){return[e(x,{colorScheme:"accent",onClick:()=>r(!1),get children(){return t("global.cancel")}}),e(x,{onClick:()=>{r(!1),m("/@manage/storages")},ml:"$2",get children(){return t("home.go_to_storages")}})]}})]}})]}})]}})};export{Ze as default};
|
|
1
|
+
import{aW as ne,b as se,C,I as G,y as e,N as K,av as I,S,ar as F,a6 as R,dv as j,dw as L,aP as pe,Y as W,aG as A,M as oe,J as ae,X as be,K as le,aw as N,L as ie,Q as ce,R as x,U as ue,d$ as Se,V as we,dY as $e,B as ee,ba as X,eG as de,_ as ge,dZ as Ce,E as _e,a0 as he,d_ as ke,aD as Z,aE as te,aa as ye,i as ve,a3 as Y,d as Pe,de as xe,eH as Ie,r as Oe,aO as B,eI as Fe,eJ as Me,bW as Re,cZ as Te,Z as D,$ as E,bD as ze,bE as Be,bF as De,dx as Ee,bI as He,bJ as je,bK as Le,bL as We,n as re,j as Ae,bq as Ne}from"./index-6e98aa26.js";import{h as qe,e as Je}from"./index-d8ea6769.js";const H=(t,d)=>t.length===d.length&&t.every((g,m)=>g===d[m]),M=(t,d)=>t.length<d.length&&t.every((g,m)=>g===d[m]),Ue=(t,d)=>d.some(o=>H(o,t))?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:d.some(o=>M(t,o))},me=t=>{const{isHidePath:d}=we(),[g,m]=C(),[o,l]=C(!1),{value:p,onChange:c,forceRoot:w,autoOpen:v,showEmptyIcon:a,showHiddenFolder:n,selectedPaths:r,onSelect:i,multiSelect:$}=$e(Q),O=ee(()=>!r||!r()?{checked:!1,indeterminate:!1}:Ue(t.segments,r()));ee(()=>!r||!r()?!1:r().some(y=>M(t.segments,y)));const q=async(h,y)=>{if(h.stopPropagation(),$&&i){const z=!O().checked;i(y,z)}else c("/"+y.join("/"))},J=()=>{var h;return!!(a&&g()!==void 0&&!((h=g())!=null&&h.length))},[U,V]=X(()=>de(t.segments.join("/"),ge(),w)),_=async()=>{var y,z;if((y=g())!=null&&y.length)return;const h=await V();if(h.code===500&&((z=h.message)!=null&&z.includes("storage not found; please add a storage first"))){m([]);return}Y(h,fe=>{m(fe)},()=>{k()&&s()})},{isOpen:k,onToggle:s}=ne(),u=()=>p()===t.segments.join("/"),f=Ce(t.segments.join("/")),b=h=>{h.stopPropagation(),k()?l(!0):(l(!1),_()),s()};G(()=>{t.segments.length,r==null||r();const h=t.segments.join("/");(()=>(o(),!1))()&&!k()&&(console.log("展开节点:",h),s(),_())}),G(_e(p,async h=>{}));const P=()=>d(t.segments.join("/"))&&!f(p());return e(S,{get when(){return n||!P()},get children(){return e(I,{get children(){return[e(N,{spacing:"$2",alignItems:"center",get children(){return[e(S,{when:$,get children(){return e(I,{get children(){return e(he,{get checked(){return O().checked},get indeterminate(){return O().indeterminate}})}})}}),e(S,{get when(){return!U()},get fallback(){return e(ke,{size:"sm",get color(){return Z()}})},get children(){return e(S,{get when(){return!J()},get fallback(){return e(te,{get color(){return Z()},as:qe})},get children(){return e(te,{get color(){return Z()},as:Je,get transform(){return k()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:b})}})}}),e(F,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return u()?"$info8":"transparent"},get _hover(){return{backgroundColor:u()?"$info8":ye()}},onClick:h=>{h.stopPropagation(),q(h,t.segments)},get children(){return A(()=>t.segments.join("/")==="",!0)()?"root":ve(t.segments.join("/"))}})]}}),e(S,{get when(){return k()},get children(){return e(W,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return e(R,{get each(){return g()},children:h=>e(me,{get segments(){return[...t.segments,h.name]}})})}})}})]}})}})},Q=Se(),Ve=t=>{var o;const[d,g]=C("/");(o=t.handle)==null||o.call(t,{setPath:g});const m=t.selectedPaths;return e(I,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return e(Q.Provider,{get value(){return{value:d,onChange:l=>{g(l),t.onChange(l)},autoOpen:t.autoOpen??!1,forceRoot:t.forceRoot??!1,showEmptyIcon:t.showEmptyIcon??!1,showHiddenFolder:t.showHiddenFolder??!0,multiSelect:t.multiSelect,selectedPaths:m,onSelect:t.onSelect}},get children(){return e(me,{segments:[]})}})}})},Ze=t=>{const{isOpen:d,onOpen:g,onClose:m}=ne(),o=se(),[l,p]=C(t.value.map(a=>a.split("/").filter(Boolean))),[c,w]=C(t.value.map(a=>a.split("/").filter(Boolean)));G(()=>{if(t.value){const a=t.value.map(n=>n.split("/").filter(Boolean));p(a),w(a)}});const v=async(a,n)=>{let r=[...l()];n?a.length===0?r=[[]]:(r=r.filter(i=>!H(i,[])&&!H(i,a)&&!M(i,a)&&!M(a,i)),r.push([...a])):r=r.filter(i=>!H(i,a)&&!M(a,i)),p(r),w(r),t.onChange(r.map(i=>i.length===0?"/":"/"+i.join("/")))};return[e(I,{w:"$full",position:"relative",get children(){return[e(K,{get id(){return t.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),e(I,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"$2",maxW:"90%",pl:"$4",cursor:"pointer",onClick:g,zIndex:1,get children(){return e(S,{get when(){return c().length>0},get fallback(){return e(F,{color:"$neutral10",get children(){return o("global.choose_folder")}})},get children(){return[e(R,{get each(){return c().slice(0,3)},children:a=>{const n="/"+a.join("/");return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:n,get children(){return e(L,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})}})}}),e(S,{get when(){return c().length>3},get children(){return e(pe,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return e(W,{alignItems:"flex-start",spacing:"$1",get children(){return e(R,{get each(){return c().slice(3)},children:a=>e(F,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+a.join("/")}})})}})},get children(){return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(L,{get children(){return["+",A(()=>c().length-3)]}})}})}})}})]}})}})]}}),e(ue,{size:"xl",get opened(){return d()},onClose:m,get children(){return[e(oe,{}),e(ae,{get children(){return[e(be,{}),e(le,{get children(){return e(N,{spacing:"$2",alignItems:"center",get children(){return[e(F,{fontWeight:"bold",get children(){return o("global.choose_folder")}}),e(F,{fontSize:"$sm",get children(){return["(",A(()=>o("global.please_click_to_select")),")"]}})]}})}}),e(ie,{get children(){return e(Q.Provider,{get value(){return{value:()=>"/",onChange:a=>{},forceRoot:!0,autoOpen:t.autoOpen??!1,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:c,onSelect:v,multiSelect:t.multiSelect}},get children(){return e(Ve,{forceRoot:!0,onChange:a=>{},get multiSelect(){return t.multiSelect},selectedPaths:c,onSelect:v,get autoOpen(){return t.autoOpen}})}})}}),e(ce,{get children(){return[e(x,{colorScheme:"neutral",onClick:m,mr:"$2",get children(){return o("global.cancel")}}),e(x,{onClick:m,get children(){return o("global.confirm")}})]}})]}})]}})]},Ge=async t=>{const d=new Map,g=async n=>{try{const r=await de(n,ge(),!0);if(r.code===200)return r.data.map($=>Ae(n,$.name))}catch(r){console.error(`获取目录 [${n}] 内容失败:`,r)}return[]},m=n=>{if(n==="/"||!n.includes("/"))return"";const r=n.lastIndexOf("/");return r===0?"/":n.substring(0,r)},o=new Set;t.forEach(n=>o.add(n)),t.forEach(n=>{let r=m(n);for(;r!=="";)o.add(r),r=m(r)});for(const n of o)if(!d.has(n)){const r=await g(n);d.set(n,r)}const l=(n,r)=>r==="/"?n!=="/":n.startsWith(r+"/"),p=(n,r)=>{const i=d.get(n)||[];return i.length===0?!1:i.every($=>r.has($)||p($,r))},c=new Set,w=new Set(t),v=[...t].sort((n,r)=>n.length-r.length);for(const n of v){let r=!1;for(const i of c)if(n!==i&&l(n,i)){r=!0;break}r||(p(n,w),c.add(n))}return c.size===0&&t.length>0&&c.add(t[0]),Array.from(c)},Ye=()=>{const t=se(),{params:d,back:g,to:m}=Pe(),{id:o}=d,[l,p]=xe({name:"",description:"",permission_scopes:[],base_path:[]});C([]);const[c,w]=C(0),[v,a]=C(!1),[n,r]=C(!1),i=async()=>{var s;try{const u=await Ne.get("/fs/list");return u.code===500&&((s=u.message)!=null&&s.includes("please add a storage first"))?(r(!0),!1):!0}catch(u){return console.error("Failed to check storage:",u),!1}},[$,O]=X(()=>Ie(parseInt(o))),q=async()=>{const s=await i();if(a(s),!!s&&o){const u=await O();Y(u,f=>{var b,T;p({name:f.name||"",description:f.description||"",permission_scopes:f.permission_scopes||[],base_path:(b=f.permission_scopes)!=null&&b.length?f.permission_scopes.map(P=>P.path):[]}),((T=f.permission_scopes)==null?void 0:T.length)>0&&w(f.permission_scopes[0].permission)})}};Oe(()=>{q()});const J=()=>l.base_path.length===0||l.name.length===0?(re.error(t("users.base_path")+" "+t("global.required")),!1):!0,[U,V]=X(async()=>{const s=B.reduce((b,T,P)=>(c()>>P&1)===1?b|1<<P:b,0),u=await Ge(l.base_path),f={name:l.name,description:l.description,permission_scopes:u.map(b=>({path:b,permission:s}))};return o?Fe({...f,id:parseInt(o)}):Me(f)}),_=()=>B.filter((s,u)=>(c()>>u&1)===1),k=s=>{const u=1<<s,f=c()^u;w(f),l.base_path&&(f>>s&1?p("permission_scopes",[...l.permission_scopes,{permission:u,path:l.base_path[0]}]):p("permission_scopes",l.permission_scopes.filter(b=>b.permission!==u||b.path!==l.base_path[0])))};return e(W,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(Re,{get children(){return t(o?"global.edit":"global.add")}}),e(Te,{get loading(){return $()},get children(){return e(S,{get when(){return v()},get children(){return e(W,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(D,{required:!0,get children(){return[e(E,{get children(){return t("permissions.role.role_name")}}),e(K,{get value(){return l.name},onInput:s=>p("name",s.currentTarget.value)})]}}),e(D,{get children(){return[e(E,{get children(){return t("permissions.role.role_description")}}),e(K,{get value(){return l.description},onInput:s=>p("description",s.currentTarget.value)})]}}),e(D,{required:!0,get children(){return[e(E,{get children(){return t("users.base_path")}}),e(Ze,{id:"base_path",get value(){return l.base_path},onChange:s=>{p("base_path",s)},multiSelect:!0,autoOpen:!!o})]}}),e(D,{get children(){return[e(E,{get children(){return t("permissions.config.permissions_permissions")}}),e(ze,{multiple:!0,get value(){return _()},get children(){return[e(Be,{get children(){return e(I,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(S,{get when(){return _().length>0},get fallback(){return e(De,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[e(R,{get each(){return _().slice(0,3)},children:(s,u)=>e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(L,{get children(){return t(`users.permissions.${s}`)}}),e(Ee,{onClick:f=>{f.stopPropagation(),k(B.indexOf(s))}})]}})}),e(S,{get when(){return _().length>3},get children(){return e(j,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(L,{get children(){return["+",A(()=>_().length-3)]}})}})}})]}})}})}}),e(He,{get children(){return e(je,{get children(){return e(R,{each:B,children:(s,u)=>e(Le,{value:s,onClick:()=>k(u()),get children(){return e(N,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(he,{get checked(){return(c()>>u()&1)===1},readOnly:!0}),e(We,{get children(){return t(`users.permissions.${s}`)}})]}})}})})}})}})]}})]}}),e(N,{spacing:"$2",get children(){return[e(x,{get loading(){return U()},onClick:async()=>{if(!J())return;const s=await V();Y(s,()=>{re.success(t("global.save_success")),g()})},get children(){return t("global.save")}}),e(x,{colorScheme:"accent",onClick:()=>g(),get children(){return t("global.back")}})]}})]}})}})}}),e(ue,{get opened(){return n()},onClose:()=>r(!1),get children(){return[e(oe,{}),e(ae,{get children(){return[e(le,{}),e(ie,{get children(){return t("storages.no_storage_content")}}),e(ce,{get children(){return[e(x,{colorScheme:"accent",onClick:()=>r(!1),get children(){return t("global.cancel")}}),e(x,{onClick:()=>{r(!1),m("/@manage/storages")},ml:"$2",get children(){return t("home.go_to_storages")}})]}})]}})]}})]}})};export{Ye as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m,d as $,
|
|
1
|
+
import{b as m,d as $,de as x,ba as o,bq as g,y as t,Y as _,bW as C,Z as d,$ as b,a6 as v,R as k,a3 as h,n as S,cZ as T,bX as F,aG as c,N as I,bN as L,T as E,a0 as M,S as R,O as q}from"./index-6e98aa26.js";import{a as D}from"./FolderTree-fee990c3.js";import"./index-d8ea6769.js";const H=e=>{const r=m();return t(d,{w:"$full",display:"flex",flexDirection:"column",get children(){return[t(b,{get for(){return e.name},display:"flex",alignItems:"center",get children(){return r(`metas.${e.name}`)}}),t(F,{w:"$full",get direction(){return e.type==="bool"?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[c(()=>c(()=>e.type==="string",!0)()?t(I,{get id(){return e.name},get value(){return e.value},onInput:n=>e.onChange(n.currentTarget.value)}):c(()=>e.type==="bool",!0)()?t(L,{get id(){return e.name},get checked(){return e.value},onChange:n=>e.onChange(n.currentTarget.checked)}):t(E,{get id(){return e.name},get value(){return e.value},onChange:n=>e.onChange(n.currentTarget.value)})),t(d,{w:"fit-content",display:"flex",get children(){return t(M,{css:{whiteSpace:"nowrap"},get id(){return`${e.name}_sub`},onChange:n=>e.onSub(n.currentTarget.checked),color:"$neutral10",fontSize:"$sm",get checked(){return e.sub},get children(){return r("metas.apply_sub")}})}})]}}),t(R,{get when(){return e.help},get children(){return t(q,{get children(){return r(`metas.${e.name}_help`)}})}})]}})},A=()=>{const e=m(),{params:r,back:n}=$(),{id:u}=r,[s,l]=x({id:0,path:"",password:"",p_sub:!1,write:!1,w_sub:!1,hide:"",h_sub:!1,readme:"",r_sub:!1,header:"",header_sub:!1}),[f,y]=o(()=>g.get(`/admin/meta/get?id=${u}`));u&&(async()=>{const a=await y();h(a,l)})();const[w,p]=o(()=>g.post(`/admin/meta/${u?"update":"create"}`,s));return t(T,{get loading(){return f()},get children(){return t(_,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[t(C,{get children(){return e(`global.${u?"edit":"add"}`)}}),t(d,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(b,{for:"path",display:"flex",alignItems:"center",get children(){return e("metas.path")}}),t(D,{id:"path",get value(){return s.path},onChange:a=>l("path",a)})]}}),t(v,{each:[{name:"password",type:"string",sub:"p_sub"},{name:"write",type:"bool",sub:"w_sub"},{name:"hide",type:"text",sub:"h_sub",help:!0},{name:"header",type:"text",sub:"header_sub",help:!0},{name:"readme",type:"text",sub:"r_sub",help:!0}],children:a=>t(H,{get name(){return a.name},get type(){return a.type},get value(){return s[a.name]},onChange:i=>l(a.name,i),get sub(){return s[a.sub]},onSub:i=>l(a.sub,i),get help(){return a.help}})}),t(k,{get loading(){return w()},onClick:async()=>{const a=await p();h(a,()=>{S.success(e("global.save_success")),n()})},get children(){return e(`global.${u?"save":"add"}`)}})]}})}})};export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function i(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(E){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new $(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=k(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=l;var h={};function p(){}function d(){}function g(){}var v={};s(v,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(O([])));y&&y!==r&&n.call(y,i)&&(v=y);var b=g.prototype=p.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function o(i,a,u,c){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){o("next",e,u,c)}),(function(e){o("throw",e,u,c)})):r.resolve(h).then((function(e){l.value=e,u(l)}),(function(e){return o("throw",e,u,c)}))}c(s.arg)}var i;this._invoke=function(e,t){function n(){return new r((function(r,n){o(e,t,r,n)}))}return i=i?i.then(n,n):n()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=g,s(b,"constructor",g),s(g,"constructor",d),d.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),s(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),s(b,c,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy.9a995a78.js","./index-legacy.f9d48ec7.js"],(function(e,t){"use strict";var n,u,l,f,h,p,d,g,v,m,y,b,w,x,k,_,S,$,O,j,E,I,P,L,C,A,z,F,T,G,N,W,D,H,B,R,Y,q,J,M,K,U,X,Z,Q,V,ee,te,re,ne,oe,ie,ae,ue,ce,se,le,fe,he,pe,de,ge,ve,me;return{setters:[function(e){n=e.aW,u=e.b,l=e.C,f=e.I,h=e.y,p=e.N,d=e.av,g=e.S,v=e.ar,m=e.a6,y=e.du,b=e.dv,w=e.aP,x=e.Y,k=e.aG,_=e.M,S=e.J,$=e.X,O=e.K,j=e.aw,E=e.L,I=e.Q,P=e.R,L=e.U,C=e.d$,A=e.V,z=e.dY,F=e.B,T=e.ba,G=e.eH,N=e._,W=e.dZ,D=e.E,H=e.a0,B=e.d_,R=e.aD,Y=e.aE,q=e.aa,J=e.i,M=e.a3,K=e.d,U=e.dd,X=e.eG,Z=e.r,Q=e.aO,V=e.eI,ee=e.eJ,te=e.bW,re=e.cY,ne=e.Z,oe=e.$,ie=e.bD,ae=e.bE,ue=e.bF,ce=e.dw,se=e.bI,le=e.bJ,fe=e.bK,he=e.bL,pe=e.n,de=e.j,ge=e.bq},function(e){ve=e.h,me=e.e}],execute:function(){var t=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},ye=function(e,t){return e.length<t.length&&e.every((function(e,r){return e===t[r]}))},be=function e(r){var o=A().isHidePath,u=s(l(),2),p=u[0],y=u[1],b=s(l(!1),2),w=b[0],_=b[1],S=z(we),$=S.value,O=S.onChange,E=S.forceRoot,I=(S.autoOpen,S.showEmptyIcon),P=S.showHiddenFolder,L=S.selectedPaths,C=S.onSelect,K=S.multiSelect,U=F((function(){return L&&L()?function(e,r){return r.some((function(r){return t(r,e)}))?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:r.some((function(t){return ye(e,t)}))}}(r.segments,L()):{checked:!1,indeterminate:!1}}));F((function(){return!(!L||!L())&&L().some((function(e){return ye(r.segments,e)}))}));var X=function(){var e=c(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),K&&C?(n=!U().checked,C(r,n)):O("/"+r.join("/"));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),Z=s(T((function(){return G(r.segments.join("/"),N(),E)})),2),Q=Z[0],V=Z[1],ee=function(){var e=c(a().mark((function e(){var t,r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=p())||void 0===t||!t.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,V();case 4:if(500!==(n=e.sent).code||null===(r=n.message)||void 0===r||!r.includes("storage not found; please add a storage first")){e.next=8;break}return y([]),e.abrupt("return");case 8:M(n,(function(e){y(e)}),(function(){re()&&ne()}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=n(),re=te.isOpen,ne=te.onToggle,oe=function(){return $()===r.segments.join("/")},ie=W(r.segments.join("/")),ae=function(e){e.stopPropagation(),re()?_(!0):(_(!1),ee()),ne()};f((function(){r.segments.length,null==L||L();r.segments.join("/");w()}));var ue=function(){var e=c(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();f(D($,ue));return h(g,{get when(){return P||!(o(r.segments.join("/"))&&!ie($()))},get children(){return h(d,{get children(){return[h(j,{spacing:"$2",alignItems:"center",get children(){return[h(g,{when:K,get children(){return h(d,{get children(){return h(H,{get checked(){return U().checked},get indeterminate(){return U().indeterminate}})}})}}),h(g,{get when(){return!Q()},get fallback(){return h(B,{size:"sm",get color(){return R()}})},get children(){return h(g,{get when(){return!Boolean(I&&void 0!==p()&&!(null!==(e=p())&&void 0!==e&&e.length));var e},get fallback(){return h(Y,{get color(){return R()},as:ve})},get children(){return h(Y,{get color(){return R()},as:me,get transform(){return re()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:ae})}})}}),h(v,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return oe()?"$info8":"transparent"},get _hover(){return{backgroundColor:oe()?"$info8":q()}},onClick:function(e){e.stopPropagation(),X(e,r.segments)},get children(){return k((function(){return""===r.segments.join("/")}),!0)()?"root":J(r.segments.join("/"))}})]}}),h(g,{get when(){return re()},get children(){return h(x,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return h(m,{get each(){return p()},children:function(t){return h(e,{get segments(){return[].concat(i(r.segments),[t.name])}})}})}})}})]}})}})},we=C(),xe=function(e){var t,r=s(l("/"),2),n=r[0],o=r[1];null===(t=e.handle)||void 0===t||t.call(e,{setPath:o});var i=e.selectedPaths;return h(d,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return h(we.Provider,{get value(){var t,r,a,u;return{value:n,onChange:function(t){o(t),e.onChange(t)},autoOpen:null!==(t=e.autoOpen)&&void 0!==t&&t,forceRoot:null!==(r=e.forceRoot)&&void 0!==r&&r,showEmptyIcon:null!==(a=e.showEmptyIcon)&&void 0!==a&&a,showHiddenFolder:null===(u=e.showHiddenFolder)||void 0===u||u,multiSelect:e.multiSelect,selectedPaths:i,onSelect:e.onSelect}},get children(){return h(be,{segments:[]})}})}})},ke=function(e){var r=n(),o=r.isOpen,C=r.onOpen,A=r.onClose,z=u(),F=s(l(e.value.map((function(e){return e.split("/").filter(Boolean)}))),2),T=F[0],G=F[1],N=s(l(e.value.map((function(e){return e.split("/").filter(Boolean)}))),2),W=N[0],D=N[1];f((function(){if(e.value){var t=e.value.map((function(e){return e.split("/").filter(Boolean)}));G(t),D(t)}}));var H=function(){var r=c(a().mark((function r(n,o){var u;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:u=i(T()),o?0===n.length?u=[[]]:(u=u.filter((function(e){return!(t(e,[])||t(e,n)||ye(e,n)||ye(n,e))}))).push(i(n)):u=u.filter((function(e){return!t(e,n)&&!ye(n,e)})),G(u),D(u),e.onChange(u.map((function(e){return 0===e.length?"/":"/"+e.join("/")})));case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}();return[h(d,{w:"$full",position:"relative",get children(){return[h(p,{get id(){return e.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),h(d,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"$2",maxW:"90%",pl:"$4",cursor:"pointer",onClick:C,zIndex:1,get children(){return h(g,{get when(){return W().length>0},get fallback(){return h(v,{color:"$neutral10",get children(){return z("global.choose_folder")}})},get children(){return[h(m,{get each(){return W().slice(0,3)},children:function(e){var t="/"+e.join("/");return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:t,get children(){return h(b,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t})}})}}),h(g,{get when(){return W().length>3},get children(){return h(w,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return h(x,{alignItems:"flex-start",spacing:"$1",get children(){return h(m,{get each(){return W().slice(3)},children:function(e){return h(v,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+e.join("/")}})}})}})},get children(){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return h(b,{get children(){return["+",k((function(){return W().length-3}))]}})}})}})}})]}})}})]}}),h(L,{size:"xl",get opened(){return o()},onClose:A,get children(){return[h(_,{}),h(S,{get children(){return[h($,{}),h(O,{get children(){return h(j,{spacing:"$2",alignItems:"center",get children(){return[h(v,{fontWeight:"bold",get children(){return z("global.choose_folder")}}),h(v,{fontSize:"$sm",get children(){return["(",k((function(){return z("global.please_click_to_select")})),")"]}})]}})}}),h(E,{get children(){return h(we.Provider,{get value(){var t;return{value:function(){return"/"},onChange:function(e){},forceRoot:!0,autoOpen:null!==(t=e.autoOpen)&&void 0!==t&&t,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:W,onSelect:H,multiSelect:e.multiSelect}},get children(){return h(xe,{forceRoot:!0,onChange:function(e){},get multiSelect(){return e.multiSelect},selectedPaths:W,onSelect:H,get autoOpen(){return e.autoOpen}})}})}}),h(I,{get children(){return[h(P,{colorScheme:"neutral",onClick:A,mr:"$2",get children(){return z("global.cancel")}}),h(P,{onClick:A,get children(){return z("global.confirm")}})]}})]}})]}})]},_e=function(){var e=c(a().mark((function e(t){var r,n,u,s,l,f,h,p,d,g,v,m,y,b,w,x,k,_,S,$,O;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new Map,n=function(){var e=c(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G(t,N(),!0);case 3:if(200!==(r=e.sent).code){e.next=7;break}return n=r.data.map((function(e){return de(t,e.name)})),e.abrupt("return",n);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error("获取目录 [".concat(t,"] 内容失败:"),e.t0);case 12:return e.abrupt("return",[]);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if("/"===e||!e.includes("/"))return"";var t=e.lastIndexOf("/");return 0===t?"/":e.substring(0,t)},s=new Set,t.forEach((function(e){return s.add(e)})),t.forEach((function(e){for(var t=u(e);""!==t;)s.add(t),t=u(t)})),l=o(s),e.prev=7,l.s();case 9:if((f=l.n()).done){e.next=18;break}if(h=f.value,r.has(h)){e.next=16;break}return e.next=14,n(h);case 14:p=e.sent,r.set(h,p);case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(7),l.e(e.t0);case 23:return e.prev=23,l.f(),e.finish(23);case 26:d=function(e,t){return"/"===t?"/"!==e:e.startsWith(t+"/")},g=function e(t,n){var o=r.get(t)||[];return 0!==o.length&&o.every((function(t){return n.has(t)||e(t,n)}))},v=new Set,m=new Set(t),y=i(t).sort((function(e,t){return e.length-t.length})),b=o(y),e.prev=32,b.s();case 34:if((w=b.n()).done){e.next=58;break}x=w.value,k=!1,_=o(v),e.prev=38,_.s();case 40:if((S=_.n()).done){e.next=47;break}if($=S.value,x===$||!d(x,$)){e.next=45;break}return k=!0,e.abrupt("break",47);case 45:e.next=40;break;case 47:e.next=52;break;case 49:e.prev=49,e.t1=e.catch(38),_.e(e.t1);case 52:return e.prev=52,_.f(),e.finish(52);case 55:k||(g(x,m),v.add(x));case 56:e.next=34;break;case 58:e.next=63;break;case 60:e.prev=60,e.t2=e.catch(32),b.e(e.t2);case 63:return e.prev=63,b.f(),e.finish(63);case 66:return 0===v.size&&t.length>0&&v.add(t[0]),O=Array.from(v),e.abrupt("return",O);case 69:case"end":return e.stop()}}),e,null,[[7,20,23,26],[32,60,63,66],[38,49,52,55]])})));return function(t){return e.apply(this,arguments)}}();e("default",(function(){var e=u(),t=K(),n=t.params,o=t.back,f=t.to,v=n.id,w=s(U({name:"",description:"",permission_scopes:[],base_path:[]}),2),$=w[0],C=w[1];l([]);var A=s(l(0),2),z=A[0],F=A[1],G=s(l(!1),2),N=G[0],W=G[1],D=s(l(!1),2),B=D[0],R=D[1],Y=function(){var e=c(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ge.get("/fs/list");case 3:if(500!==(r=e.sent).code||null===(t=r.message)||void 0===t||!t.includes("please add a storage first")){e.next=7;break}return R(!0),e.abrupt("return",!1);case 7:return e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(0),console.error("Failed to check storage:",e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),q=s(T((function(){return X(parseInt(v))})),2),J=q[0],de=q[1],ve=function(){var e=c(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y();case 2:if(t=e.sent,W(t),t){e.next=6;break}return e.abrupt("return");case 6:if(!v){e.next=11;break}return e.next=9,de();case 9:r=e.sent,M(r,(function(e){var t,r;C({name:e.name||"",description:e.description||"",permission_scopes:e.permission_scopes||[],base_path:null!==(t=e.permission_scopes)&&void 0!==t&&t.length?e.permission_scopes.map((function(e){return e.path})):[]}),(null===(r=e.permission_scopes)||void 0===r?void 0:r.length)>0&&F(e.permission_scopes[0].permission)}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Z((function(){ve()}));var me=s(T(c(a().mark((function e(){var t,n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Q.reduce((function(e,t,r){return 1==(z()>>r&1)?e|1<<r:e}),0),e.next=3,_e($.base_path);case 3:if(n=e.sent,o={name:$.name,description:$.description,permission_scopes:n.map((function(e){return{path:e,permission:t}}))},!v){e.next=7;break}return e.abrupt("return",V(r(r({},o),{},{id:parseInt(v)})));case 7:return e.abrupt("return",ee(o));case 8:case"end":return e.stop()}}),e)})))),2),ye=me[0],be=me[1],we=function(){return Q.filter((function(e,t){return 1==(z()>>t&1)}))},xe=function(e){var t=1<<e,r=z()^t;F(r),$.base_path&&C("permission_scopes",r>>e&1?[].concat(i($.permission_scopes),[{permission:t,path:$.base_path[0]}]):$.permission_scopes.filter((function(e){return e.permission!==t||e.path!==$.base_path[0]})))};return h(x,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[h(te,{get children(){return e(v?"global.edit":"global.add")}}),h(re,{get loading(){return J()},get children(){return h(g,{get when(){return N()},get children(){return h(x,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[h(ne,{required:!0,get children(){return[h(oe,{get children(){return e("permissions.role.role_name")}}),h(p,{get value(){return $.name},onInput:function(e){return C("name",e.currentTarget.value)}})]}}),h(ne,{get children(){return[h(oe,{get children(){return e("permissions.role.role_description")}}),h(p,{get value(){return $.description},onInput:function(e){return C("description",e.currentTarget.value)}})]}}),h(ne,{required:!0,get children(){return[h(oe,{get children(){return e("users.base_path")}}),h(ke,{id:"base_path",get value(){return $.base_path},onChange:function(e){C("base_path",e)},multiSelect:!0,autoOpen:!!v})]}}),h(ne,{get children(){return[h(oe,{get children(){return e("permissions.config.permissions_permissions")}}),h(ie,{multiple:!0,get value(){return we()},get children(){return[h(ae,{get children(){return h(d,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return h(g,{get when(){return we().length>0},get fallback(){return h(ue,{get children(){return e("permissions.config.select_permissions")}})},get children(){return[h(m,{get each(){return we().slice(0,3)},children:function(t,r){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[h(b,{get children(){return e("users.permissions.".concat(t))}}),h(ce,{onClick:function(e){e.stopPropagation(),xe(Q.indexOf(t))}})]}})}}),h(g,{get when(){return we().length>3},get children(){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return h(b,{get children(){return["+",k((function(){return we().length-3}))]}})}})}})]}})}})}}),h(se,{get children(){return h(le,{get children(){return h(m,{each:Q,children:function(t,r){return h(fe,{value:t,onClick:function(){return xe(r())},get children(){return h(j,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[h(H,{get checked(){return 1==(z()>>r()&1)},readOnly:!0}),h(he,{get children(){return e("users.permissions.".concat(t))}})]}})}})}})}})}})]}})]}}),h(j,{spacing:"$2",get children(){return[h(P,{get loading(){return ye()},onClick:(t=c(a().mark((function t(){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==$.base_path.length&&0!==$.name.length||(pe.error(e("users.base_path")+" "+e("global.required")),0)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,be();case 4:r=t.sent,M(r,(function(){pe.success(e("global.save_success")),o()}));case 6:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return e("global.save")}}),h(P,{colorScheme:"accent",onClick:function(){return o()},get children(){return e("global.back")}})];var t}})]}})}})}}),h(L,{get opened(){return B()},onClose:function(){return R(!1)},get children(){return[h(_,{}),h(S,{get children(){return[h(O,{}),h(E,{get children(){return e("storages.no_storage_content")}}),h(I,{get children(){return[h(P,{colorScheme:"accent",onClick:function(){return R(!1)},get children(){return e("global.cancel")}}),h(P,{onClick:function(){R(!1),f("/@manage/storages")},ml:"$2",get children(){return e("home.go_to_storages")}})]}})]}})]}})]}})}))}}}))}();
|
|
1
|
+
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function i(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(E){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new $(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=k(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=l;var h={};function p(){}function d(){}function g(){}var v={};s(v,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(O([])));y&&y!==r&&n.call(y,i)&&(v=y);var b=g.prototype=p.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function o(i,a,u,c){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(e){o("next",e,u,c)}),(function(e){o("throw",e,u,c)})):r.resolve(h).then((function(e){l.value=e,u(l)}),(function(e){return o("throw",e,u,c)}))}c(s.arg)}var i;this._invoke=function(e,t){function n(){return new r((function(r,n){o(e,t,r,n)}))}return i=i?i.then(n,n):n()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function $(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=g,s(b,"constructor",g),s(g,"constructor",d),d.displayName=s(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),s(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),s(b,c,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,$.prototype={constructor:$,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy.0569de56.js","./index-legacy.d8a05658.js"],(function(e,t){"use strict";var n,u,l,f,h,p,d,g,v,m,y,b,w,x,k,_,S,$,O,j,E,I,P,L,C,A,z,F,T,G,N,W,D,H,B,R,q,Y,J,M,Z,K,U,X,Q,V,ee,te,re,ne,oe,ie,ae,ue,ce,se,le,fe,he,pe,de,ge,ve,me;return{setters:[function(e){n=e.aW,u=e.b,l=e.C,f=e.I,h=e.y,p=e.N,d=e.av,g=e.S,v=e.ar,m=e.a6,y=e.dv,b=e.dw,w=e.aP,x=e.Y,k=e.aG,_=e.M,S=e.J,$=e.X,O=e.K,j=e.aw,E=e.L,I=e.Q,P=e.R,L=e.U,C=e.d$,A=e.V,z=e.dY,F=e.B,T=e.ba,G=e.eG,N=e._,W=e.dZ,D=e.E,H=e.a0,B=e.d_,R=e.aD,q=e.aE,Y=e.aa,J=e.i,M=e.a3,Z=e.d,K=e.de,U=e.eH,X=e.r,Q=e.aO,V=e.eI,ee=e.eJ,te=e.bW,re=e.cZ,ne=e.Z,oe=e.$,ie=e.bD,ae=e.bE,ue=e.bF,ce=e.dx,se=e.bI,le=e.bJ,fe=e.bK,he=e.bL,pe=e.n,de=e.j,ge=e.bq},function(e){ve=e.h,me=e.e}],execute:function(){var t=function(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))},ye=function(e,t){return e.length<t.length&&e.every((function(e,r){return e===t[r]}))},be=function e(r){var o=A().isHidePath,u=s(l(),2),p=u[0],y=u[1],b=s(l(!1),2),w=b[0],_=b[1],S=z(we),$=S.value,O=S.onChange,E=S.forceRoot,I=(S.autoOpen,S.showEmptyIcon),P=S.showHiddenFolder,L=S.selectedPaths,C=S.onSelect,Z=S.multiSelect,K=F((function(){return L&&L()?function(e,r){return r.some((function(r){return t(r,e)}))?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:r.some((function(t){return ye(e,t)}))}}(r.segments,L()):{checked:!1,indeterminate:!1}}));F((function(){return!(!L||!L())&&L().some((function(e){return ye(r.segments,e)}))}));var U=function(){var e=c(a().mark((function e(t,r){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),Z&&C?(n=!K().checked,C(r,n)):O("/"+r.join("/"));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),X=s(T((function(){return G(r.segments.join("/"),N(),E)})),2),Q=X[0],V=X[1],ee=function(){var e=c(a().mark((function e(){var t,r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=p())||void 0===t||!t.length){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,V();case 4:if(500!==(n=e.sent).code||null===(r=n.message)||void 0===r||!r.includes("storage not found; please add a storage first")){e.next=8;break}return y([]),e.abrupt("return");case 8:M(n,(function(e){y(e)}),(function(){re()&&ne()}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=n(),re=te.isOpen,ne=te.onToggle,oe=function(){return $()===r.segments.join("/")},ie=W(r.segments.join("/")),ae=function(e){e.stopPropagation(),re()?_(!0):(_(!1),ee()),ne()};f((function(){r.segments.length,null==L||L();r.segments.join("/");w()}));var ue=function(){var e=c(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();f(D($,ue));return h(g,{get when(){return P||!(o(r.segments.join("/"))&&!ie($()))},get children(){return h(d,{get children(){return[h(j,{spacing:"$2",alignItems:"center",get children(){return[h(g,{when:Z,get children(){return h(d,{get children(){return h(H,{get checked(){return K().checked},get indeterminate(){return K().indeterminate}})}})}}),h(g,{get when(){return!Q()},get fallback(){return h(B,{size:"sm",get color(){return R()}})},get children(){return h(g,{get when(){return!Boolean(I&&void 0!==p()&&!(null!==(e=p())&&void 0!==e&&e.length));var e},get fallback(){return h(q,{get color(){return R()},as:ve})},get children(){return h(q,{get color(){return R()},as:me,get transform(){return re()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:ae})}})}}),h(v,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return oe()?"$info8":"transparent"},get _hover(){return{backgroundColor:oe()?"$info8":Y()}},onClick:function(e){e.stopPropagation(),U(e,r.segments)},get children(){return k((function(){return""===r.segments.join("/")}),!0)()?"root":J(r.segments.join("/"))}})]}}),h(g,{get when(){return re()},get children(){return h(x,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return h(m,{get each(){return p()},children:function(t){return h(e,{get segments(){return[].concat(i(r.segments),[t.name])}})}})}})}})]}})}})},we=C(),xe=function(e){var t,r=s(l("/"),2),n=r[0],o=r[1];null===(t=e.handle)||void 0===t||t.call(e,{setPath:o});var i=e.selectedPaths;return h(d,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return h(we.Provider,{get value(){var t,r,a,u;return{value:n,onChange:function(t){o(t),e.onChange(t)},autoOpen:null!==(t=e.autoOpen)&&void 0!==t&&t,forceRoot:null!==(r=e.forceRoot)&&void 0!==r&&r,showEmptyIcon:null!==(a=e.showEmptyIcon)&&void 0!==a&&a,showHiddenFolder:null===(u=e.showHiddenFolder)||void 0===u||u,multiSelect:e.multiSelect,selectedPaths:i,onSelect:e.onSelect}},get children(){return h(be,{segments:[]})}})}})},ke=function(e){var r=n(),o=r.isOpen,C=r.onOpen,A=r.onClose,z=u(),F=s(l(e.value.map((function(e){return e.split("/").filter(Boolean)}))),2),T=F[0],G=F[1],N=s(l(e.value.map((function(e){return e.split("/").filter(Boolean)}))),2),W=N[0],D=N[1];f((function(){if(e.value){var t=e.value.map((function(e){return e.split("/").filter(Boolean)}));G(t),D(t)}}));var H=function(){var r=c(a().mark((function r(n,o){var u;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:u=i(T()),o?0===n.length?u=[[]]:(u=u.filter((function(e){return!(t(e,[])||t(e,n)||ye(e,n)||ye(n,e))}))).push(i(n)):u=u.filter((function(e){return!t(e,n)&&!ye(n,e)})),G(u),D(u),e.onChange(u.map((function(e){return 0===e.length?"/":"/"+e.join("/")})));case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}();return[h(d,{w:"$full",position:"relative",get children(){return[h(p,{get id(){return e.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),h(d,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"$2",maxW:"90%",pl:"$4",cursor:"pointer",onClick:C,zIndex:1,get children(){return h(g,{get when(){return W().length>0},get fallback(){return h(v,{color:"$neutral10",get children(){return z("global.choose_folder")}})},get children(){return[h(m,{get each(){return W().slice(0,3)},children:function(e){var t="/"+e.join("/");return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:t,get children(){return h(b,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t})}})}}),h(g,{get when(){return W().length>3},get children(){return h(w,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return h(x,{alignItems:"flex-start",spacing:"$1",get children(){return h(m,{get each(){return W().slice(3)},children:function(e){return h(v,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+e.join("/")}})}})}})},get children(){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return h(b,{get children(){return["+",k((function(){return W().length-3}))]}})}})}})}})]}})}})]}}),h(L,{size:"xl",get opened(){return o()},onClose:A,get children(){return[h(_,{}),h(S,{get children(){return[h($,{}),h(O,{get children(){return h(j,{spacing:"$2",alignItems:"center",get children(){return[h(v,{fontWeight:"bold",get children(){return z("global.choose_folder")}}),h(v,{fontSize:"$sm",get children(){return["(",k((function(){return z("global.please_click_to_select")})),")"]}})]}})}}),h(E,{get children(){return h(we.Provider,{get value(){var t;return{value:function(){return"/"},onChange:function(e){},forceRoot:!0,autoOpen:null!==(t=e.autoOpen)&&void 0!==t&&t,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:W,onSelect:H,multiSelect:e.multiSelect}},get children(){return h(xe,{forceRoot:!0,onChange:function(e){},get multiSelect(){return e.multiSelect},selectedPaths:W,onSelect:H,get autoOpen(){return e.autoOpen}})}})}}),h(I,{get children(){return[h(P,{colorScheme:"neutral",onClick:A,mr:"$2",get children(){return z("global.cancel")}}),h(P,{onClick:A,get children(){return z("global.confirm")}})]}})]}})]}})]},_e=function(){var e=c(a().mark((function e(t){var r,n,u,s,l,f,h,p,d,g,v,m,y,b,w,x,k,_,S,$,O;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new Map,n=function(){var e=c(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,G(t,N(),!0);case 3:if(200!==(r=e.sent).code){e.next=7;break}return n=r.data.map((function(e){return de(t,e.name)})),e.abrupt("return",n);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error("获取目录 [".concat(t,"] 内容失败:"),e.t0);case 12:return e.abrupt("return",[]);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if("/"===e||!e.includes("/"))return"";var t=e.lastIndexOf("/");return 0===t?"/":e.substring(0,t)},s=new Set,t.forEach((function(e){return s.add(e)})),t.forEach((function(e){for(var t=u(e);""!==t;)s.add(t),t=u(t)})),l=o(s),e.prev=7,l.s();case 9:if((f=l.n()).done){e.next=18;break}if(h=f.value,r.has(h)){e.next=16;break}return e.next=14,n(h);case 14:p=e.sent,r.set(h,p);case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(7),l.e(e.t0);case 23:return e.prev=23,l.f(),e.finish(23);case 26:d=function(e,t){return"/"===t?"/"!==e:e.startsWith(t+"/")},g=function e(t,n){var o=r.get(t)||[];return 0!==o.length&&o.every((function(t){return n.has(t)||e(t,n)}))},v=new Set,m=new Set(t),y=i(t).sort((function(e,t){return e.length-t.length})),b=o(y),e.prev=32,b.s();case 34:if((w=b.n()).done){e.next=58;break}x=w.value,k=!1,_=o(v),e.prev=38,_.s();case 40:if((S=_.n()).done){e.next=47;break}if($=S.value,x===$||!d(x,$)){e.next=45;break}return k=!0,e.abrupt("break",47);case 45:e.next=40;break;case 47:e.next=52;break;case 49:e.prev=49,e.t1=e.catch(38),_.e(e.t1);case 52:return e.prev=52,_.f(),e.finish(52);case 55:k||(g(x,m),v.add(x));case 56:e.next=34;break;case 58:e.next=63;break;case 60:e.prev=60,e.t2=e.catch(32),b.e(e.t2);case 63:return e.prev=63,b.f(),e.finish(63);case 66:return 0===v.size&&t.length>0&&v.add(t[0]),O=Array.from(v),e.abrupt("return",O);case 69:case"end":return e.stop()}}),e,null,[[7,20,23,26],[32,60,63,66],[38,49,52,55]])})));return function(t){return e.apply(this,arguments)}}();e("default",(function(){var e=u(),t=Z(),n=t.params,o=t.back,f=t.to,v=n.id,w=s(K({name:"",description:"",permission_scopes:[],base_path:[]}),2),$=w[0],C=w[1];l([]);var A=s(l(0),2),z=A[0],F=A[1],G=s(l(!1),2),N=G[0],W=G[1],D=s(l(!1),2),B=D[0],R=D[1],q=function(){var e=c(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ge.get("/fs/list");case 3:if(500!==(r=e.sent).code||null===(t=r.message)||void 0===t||!t.includes("please add a storage first")){e.next=7;break}return R(!0),e.abrupt("return",!1);case 7:return e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(0),console.error("Failed to check storage:",e.t0),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Y=s(T((function(){return U(parseInt(v))})),2),J=Y[0],de=Y[1],ve=function(){var e=c(a().mark((function e(){var t,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q();case 2:if(t=e.sent,W(t),t){e.next=6;break}return e.abrupt("return");case 6:if(!v){e.next=11;break}return e.next=9,de();case 9:r=e.sent,M(r,(function(e){var t,r;C({name:e.name||"",description:e.description||"",permission_scopes:e.permission_scopes||[],base_path:null!==(t=e.permission_scopes)&&void 0!==t&&t.length?e.permission_scopes.map((function(e){return e.path})):[]}),(null===(r=e.permission_scopes)||void 0===r?void 0:r.length)>0&&F(e.permission_scopes[0].permission)}));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();X((function(){ve()}));var me=s(T(c(a().mark((function e(){var t,n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Q.reduce((function(e,t,r){return 1==(z()>>r&1)?e|1<<r:e}),0),e.next=3,_e($.base_path);case 3:if(n=e.sent,o={name:$.name,description:$.description,permission_scopes:n.map((function(e){return{path:e,permission:t}}))},!v){e.next=7;break}return e.abrupt("return",V(r(r({},o),{},{id:parseInt(v)})));case 7:return e.abrupt("return",ee(o));case 8:case"end":return e.stop()}}),e)})))),2),ye=me[0],be=me[1],we=function(){return Q.filter((function(e,t){return 1==(z()>>t&1)}))},xe=function(e){var t=1<<e,r=z()^t;F(r),$.base_path&&C("permission_scopes",r>>e&1?[].concat(i($.permission_scopes),[{permission:t,path:$.base_path[0]}]):$.permission_scopes.filter((function(e){return e.permission!==t||e.path!==$.base_path[0]})))};return h(x,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[h(te,{get children(){return e(v?"global.edit":"global.add")}}),h(re,{get loading(){return J()},get children(){return h(g,{get when(){return N()},get children(){return h(x,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[h(ne,{required:!0,get children(){return[h(oe,{get children(){return e("permissions.role.role_name")}}),h(p,{get value(){return $.name},onInput:function(e){return C("name",e.currentTarget.value)}})]}}),h(ne,{get children(){return[h(oe,{get children(){return e("permissions.role.role_description")}}),h(p,{get value(){return $.description},onInput:function(e){return C("description",e.currentTarget.value)}})]}}),h(ne,{required:!0,get children(){return[h(oe,{get children(){return e("users.base_path")}}),h(ke,{id:"base_path",get value(){return $.base_path},onChange:function(e){C("base_path",e)},multiSelect:!0,autoOpen:!!v})]}}),h(ne,{get children(){return[h(oe,{get children(){return e("permissions.config.permissions_permissions")}}),h(ie,{multiple:!0,get value(){return we()},get children(){return[h(ae,{get children(){return h(d,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return h(g,{get when(){return we().length>0},get fallback(){return h(ue,{get children(){return e("permissions.config.select_permissions")}})},get children(){return[h(m,{get each(){return we().slice(0,3)},children:function(t,r){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[h(b,{get children(){return e("users.permissions.".concat(t))}}),h(ce,{onClick:function(e){e.stopPropagation(),xe(Q.indexOf(t))}})]}})}}),h(g,{get when(){return we().length>3},get children(){return h(y,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return h(b,{get children(){return["+",k((function(){return we().length-3}))]}})}})}})]}})}})}}),h(se,{get children(){return h(le,{get children(){return h(m,{each:Q,children:function(t,r){return h(fe,{value:t,onClick:function(){return xe(r())},get children(){return h(j,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[h(H,{get checked(){return 1==(z()>>r()&1)},readOnly:!0}),h(he,{get children(){return e("users.permissions.".concat(t))}})]}})}})}})}})}})]}})]}}),h(j,{spacing:"$2",get children(){return[h(P,{get loading(){return ye()},onClick:(t=c(a().mark((function t(){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==$.base_path.length&&0!==$.name.length||(pe.error(e("users.base_path")+" "+e("global.required")),0)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,be();case 4:r=t.sent,M(r,(function(){pe.success(e("global.save_success")),o()}));case 6:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return e("global.save")}}),h(P,{colorScheme:"accent",onClick:function(){return o()},get children(){return e("global.back")}})];var t}})]}})}})}}),h(L,{get opened(){return B()},onClose:function(){return R(!1)},get children(){return[h(_,{}),h(S,{get children(){return[h(O,{}),h(E,{get children(){return e("storages.no_storage_content")}}),h(I,{get children(){return[h(P,{colorScheme:"accent",onClick:function(){return R(!1)},get children(){return e("global.cancel")}}),h(P,{onClick:function(){R(!1),f("/@manage/storages")},ml:"$2",get children(){return e("home.go_to_storages")}})]}})]}})]}})]}})}))}}}))}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(I){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(I){return{type:"throw",arg:I}}}r.wrap=s;var d={};function h(){}function p(){}function g(){}var v={};l(v,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(S([])));m&&m!==n&&o.call(m,a)&&(v=m);var w=g.prototype=h.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function n(i,a,u,c){var l=f(t[i],t,a);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==e(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(d).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var i;this._invoke=function(e,t){function o(){return new r((function(r,o){n(e,t,r,o)}))}return i=i?i.then(o,o):o()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=g,l(w,"constructor",g),l(g,"constructor",p),p.displayName=l(g,c,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},b(x.prototype),l(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(w),l(w,c,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=S,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach($),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),$(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;$(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},r}function r(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(l){return void r(l)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,c,"next",e)}function c(e){r(a,o,i,u,c,"throw",e)}u(void 0)}))}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}System.register(["./index-legacy.0569de56.js"],(function(e,r){"use strict";var i,a,u,c,l,s,f,d,h,p,g,v,y,m,w,b,x,_,L,$,E,S,k,I,O,j,T,N,P,A,C,D;return{setters:[function(e){i=e.b,a=e.d,u=e.C,c=e.de,l=e.ba,s=e.ep,f=e.bq,d=e.y,h=e.bW,p=e.cZ,g=e.Y,v=e.S,y=e.Z,m=e.$,w=e.N,b=e.bD,x=e.bE,_=e.av,L=e.bF,$=e.a6,E=e.dv,S=e.dw,k=e.dx,I=e.bI,O=e.bJ,j=e.bK,T=e.aw,N=e.a0,P=e.bL,A=e.R,C=e.n,D=e.a3}],execute:function(){e("default",(function(){var e=i(),r=a(),G=r.params,q=r.back,F=G.id,z=o(u([]),2),Y=z[0],W=z[1],Z=o(c({id:0,username:"",password:"",base_path:"/",role:[],permission:0,disabled:!1,sso_id:"",role_info:[],permissions:[],max_devices:void 0,session_ttl:void 0}),2),H=Z[0],J=Z[1],K=o(l((function(){return s()})),2),M=K[0],R=K[1],U=o(l((function(){return f.get("/admin/user/get?id=".concat(F))})),2),B=U[0],Q=U[1],V=function(){var e=n(t().mark((function e(){var r,n;return t().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:if(r=e.sent,D(r,(function(e){W(e.content)})),!F){e.next=11;break}return e.next=7,Q();case 7:n=e.sent,D(n,(function(e){J(e)})),e.next=12;break;case 11:J("base_path","/");case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();V();var X=o(l((function(){return f.post("/admin/user/".concat(F?"update":"create"),H)})),2),ee=X[0],te=X[1];return d(g,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(h,{get children(){return e(F?"global.edit":"global.add")}}),d(p,{get loading(){return B()||M()},get children(){return d(g,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[d(v,{get when(){return!F||!(H.role_info||[]).includes(1)},get children(){return[d(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[d(m,{for:"username",display:"flex",alignItems:"center",get children(){return e("users.username")}}),d(w,{id:"username",get value(){return H.username},onInput:function(e){return J("username",e.currentTarget.value)}})]}}),d(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[d(m,{for:"password",display:"flex",alignItems:"center",get children(){return e("users.password")}}),d(w,{id:"password",type:"password",placeholder:"********",get value(){return H.password},onInput:function(e){return J("password",e.currentTarget.value)}})]}})]}}),d(v,{get when(){return!!F},get children(){return d(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[d(m,{for:"base_path",display:"flex",alignItems:"center",get children(){return e("users.base_path")}}),d(w,{id:"base_path",value:"/",readOnly:!0})]}})}}),d(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[d(m,{display:"flex",alignItems:"center",get children(){return e("users.role")}}),d(b,{get value(){return H.role},onChange:function(e){return J("role",e)},get children(){return[d(x,{get children(){return d(_,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return d(v,{get when(){return H.role.length>0},get fallback(){return d(L,{get children(){return e("home.selected")}})},get children(){return d($,{get each(){return H.role},children:function(e){var t=Y().find((function(t){return t.id===e}));return d(E,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[d(S,{get children(){return(null==t?void 0:t.name)||"ID: ".concat(e)}}),d(k,{onClick:function(t){t.stopPropagation(),J("role",H.role.filter((function(t){return t!==e})))}})]}})}})}})}})}}),d(I,{get children(){return d(O,{get children(){return d($,{get each(){return Y()},children:function(e){return d(j,{get value(){return e.id},onClick:function(){var t=H.role.includes(e.id)?H.role.filter((function(t){return t!==e.id})):[e.id];J("role",t)},get children(){return d(T,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[d(N,{get checked(){return H.role.includes(e.id)},readOnly:!0}),d(P,{get children(){return e.name}})]}})}})}})}})}})]}})]}}),d(y,{w:"fit-content",display:"flex",get children(){return d(N,{css:{whiteSpace:"nowrap"},id:"disabled",onChange:function(e){return J("disabled",e.currentTarget.checked)},color:"$neutral10",fontSize:"$sm",get checked(){return H.disabled},get children(){return e("users.disabled")}})}}),d(y,{w:"$full",display:"flex",flexDirection:"column",get children(){return[d(m,{for:"max_devices",display:"flex",alignItems:"center",get children(){return e("users.max_devices")}}),d(w,{id:"max_devices",type:"number",get value(){var e;return null!==(e=H.max_devices)&&void 0!==e?e:""},onInput:function(e){return J("max_devices",e.currentTarget.value?Number(e.currentTarget.value):void 0)}})]}}),d(y,{w:"$full",display:"flex",flexDirection:"column",get children(){return[d(m,{for:"session_ttl",display:"flex",alignItems:"center",get children(){return e("users.session_ttl")}}),d(w,{id:"session_ttl",type:"number",get value(){var e;return null!==(e=H.session_ttl)&&void 0!==e?e:""},onInput:function(e){return J("session_ttl",e.currentTarget.value?Number(e.currentTarget.value):void 0)}})]}}),d(A,{get loading(){return ee()},onClick:(r=n(t().mark((function r(){var n;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(H.role&&0!==H.role.length){t.next=3;break}return C.error(e("users.role")+" "+e("global.required")),t.abrupt("return");case 3:return t.next=5,te();case 5:n=t.sent,D(n,(function(){C.success(e("global.save_success")),q()}));case 7:case"end":return t.stop()}}),r)}))),function(){return r.apply(this,arguments)}),get children(){return e("global.save")}})];var r}})}})]}})}))}}}))}();
|