alistgo-alist-web 3.62.0 → 3.63.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-90445130.js → 2fa-abc3de78.js} +1 -1
- package/dist/assets/{2fa-legacy.4651384a.js → 2fa-legacy.55737098.js} +1 -1
- package/dist/assets/{About-eda27b55.js → About-ebade33f.js} +1 -1
- package/dist/assets/{About-legacy.8c72ed25.js → About-legacy.1ab87d8b.js} +1 -1
- package/dist/assets/{AddLabelDialog-58275e40.js → AddLabelDialog-d838839b.js} +1 -1
- package/dist/assets/{AddLabelDialog-legacy.25a1a0bf.js → AddLabelDialog-legacy.0c773d90.js} +1 -1
- package/dist/assets/{AddOrEdit-3c0c392c.js → AddOrEdit-616ec90f.js} +1 -1
- package/dist/assets/{AddOrEdit-d0768673.js → AddOrEdit-81330314.js} +1 -1
- package/dist/assets/{AddOrEdit-147c64bc.js → AddOrEdit-b4bb1c42.js} +1 -1
- package/dist/assets/{AddOrEdit-37fb1158.js → AddOrEdit-ebed8ac0.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.a17a1681.js → AddOrEdit-legacy.2fd88478.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.78a89d90.js → AddOrEdit-legacy.3af450b0.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.5f9f6e00.js → AddOrEdit-legacy.abd115d9.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.cc28033b.js → AddOrEdit-legacy.acbb24c8.js} +1 -1
- package/dist/assets/{Common-ab1ed06a.js → Common-ca550843.js} +1 -1
- package/dist/assets/{Common-legacy.77f75cae.js → Common-legacy.b3ab5071.js} +1 -1
- package/dist/assets/{Copy-0a9852d8.js → Copy-0384ca0d.js} +1 -1
- package/dist/assets/{Copy-legacy.95090e73.js → Copy-legacy.e201e664.js} +1 -1
- package/dist/assets/Decompress-272f91b5.js +1 -0
- package/dist/assets/{Decompress-legacy.23122f34.js → Decompress-legacy.3df460b6.js} +1 -1
- package/dist/assets/{DeletePopover-97491ed2.js → DeletePopover-3958d0ad.js} +1 -1
- package/dist/assets/{DeletePopover-legacy.75b6b298.js → DeletePopover-legacy.49680594.js} +1 -1
- package/dist/assets/{EditLabelDialog-8cc7e858.js → EditLabelDialog-ea31ea23.js} +1 -1
- package/dist/assets/{EditLabelDialog-legacy.9fa392e6.js → EditLabelDialog-legacy.2b5bee02.js} +1 -1
- package/dist/assets/{File-6f10ed97.js → File-9c374f1a.js} +1 -1
- package/dist/assets/{File-legacy.7d9854b2.js → File-legacy.9d2c3ca7.js} +1 -1
- package/dist/assets/{Folder-3af0d072.js → Folder-14a25b89.js} +2 -2
- package/dist/assets/{Folder-legacy.0c7ccabb.js → Folder-legacy.de37bd62.js} +2 -2
- package/dist/assets/{FolderTree-38cf3401.js → FolderTree-7ae29384.js} +1 -1
- package/dist/assets/{FolderTree-legacy.cd2c39e7.js → FolderTree-legacy.53528cb3.js} +1 -1
- package/dist/assets/{Frp-d12680a2.js → Frp-f7302299.js} +1 -1
- package/dist/assets/{Frp-legacy.ba6e7027.js → Frp-legacy.71102175.js} +1 -1
- package/dist/assets/Grid-f0c4d013.js +1 -0
- package/dist/assets/{Grid-legacy.7203a923.js → Grid-legacy.164386d7.js} +1 -1
- package/dist/assets/{GridItem-c24bccd1.js → GridItem-657d21bd.js} +1 -1
- package/dist/assets/{GridItem-legacy.e05d60cc.js → GridItem-legacy.2c3dbff8.js} +1 -1
- package/dist/assets/ImageWithError-270ffbd0.js +1 -0
- package/dist/assets/{ImageWithError-legacy.bf6a9e3d.js → ImageWithError-legacy.991e20db.js} +1 -1
- package/dist/assets/{Images-ace8cf15.js → Images-1b5fd472.js} +1 -1
- package/dist/assets/{Images-legacy.27190692.js → Images-legacy.d3a439bd.js} +1 -1
- package/dist/assets/{Layout-27464135.js → Layout-77c54d54.js} +4 -4
- package/dist/assets/{Layout-legacy.12efcab5.js → Layout-legacy.d9c36690.js} +1 -1
- package/dist/assets/{List-c2310d66.js → List-cb3f2b1f.js} +1 -1
- package/dist/assets/{List-legacy.870c9e01.js → List-legacy.d509dbd5.js} +1 -1
- package/dist/assets/{Messenger-0c026e7c.js → Messenger-69bf75f1.js} +1 -1
- package/dist/assets/{Messenger-legacy.956b05cb.js → Messenger-legacy.2447ffbd.js} +1 -1
- package/dist/assets/{Metas-345e5cd3.js → Metas-6fc6206f.js} +1 -1
- package/dist/assets/{Metas-legacy.cff72103.js → Metas-legacy.a22fda65.js} +1 -1
- package/dist/assets/Other-bf0c8f40.js +1 -0
- package/dist/assets/Other-legacy.0b52198b.js +1 -0
- package/dist/assets/{PackageDownload-a29edc97.js → PackageDownload-f1225dad.js} +1 -1
- package/dist/assets/{PackageDownload-legacy.8602aaba.js → PackageDownload-legacy.5ce2ee6a.js} +1 -1
- package/dist/assets/{Paginator-4383aac7.js → Paginator-8b9321c4.js} +1 -1
- package/dist/assets/{Paginator-legacy.0dbfe7e8.js → Paginator-legacy.25f9c490.js} +1 -1
- package/dist/assets/{Password-80dc04ca.js → Password-b98cef17.js} +1 -1
- package/dist/assets/{Password-legacy.9e534b9b.js → Password-legacy.f4c14222.js} +1 -1
- package/dist/assets/{PermissionForm-37577089.js → PermissionForm-7a161a53.js} +1 -1
- package/dist/assets/{PermissionForm-legacy.82b24501.js → PermissionForm-legacy.14a9fe69.js} +1 -1
- package/dist/assets/{Profile-73231b4d.js → Profile-e8195cc8.js} +1 -1
- package/dist/assets/{Profile-legacy.2f4bbe4e.js → Profile-legacy.876024b1.js} +1 -1
- package/dist/assets/{ResponsiveGrid-cf04dd59.js → ResponsiveGrid-0e943896.js} +1 -1
- package/dist/assets/{ResponsiveGrid-legacy.539dcc2d.js → ResponsiveGrid-legacy.a9062597.js} +1 -1
- package/dist/assets/{Role-a5ae44a1.js → Role-3e2c225c.js} +1 -1
- package/dist/assets/{Role-legacy.a19a467f.js → Role-legacy.2745cfe3.js} +1 -1
- package/dist/assets/{S3-b51c960c.js → S3-3211311d.js} +1 -1
- package/dist/assets/{S3-legacy.78984bcf.js → S3-legacy.6b587900.js} +1 -1
- package/dist/assets/{S3Transition-d946d841.js → S3Transition-4b41bf18.js} +1 -1
- package/dist/assets/{S3Transition-legacy.05c07f4e.js → S3Transition-legacy.cf3cde2a.js} +1 -1
- package/dist/assets/{SettingItem-43a27519.js → SettingItem-e7a7bfc9.js} +1 -1
- package/dist/assets/{SettingItem-legacy.988d1d9c.js → SettingItem-legacy.b5a9ffeb.js} +1 -1
- package/dist/assets/{Storages-abe8c4f9.js → Storages-baae5b17.js} +1 -1
- package/dist/assets/{Storages-legacy.c5179b0d.js → Storages-legacy.bf0c1aa1.js} +1 -1
- package/dist/assets/StrmGenerate-768d6021.js +1 -0
- package/dist/assets/{StrmGenerate-f58ea741.js → StrmGenerate-d4f07081.js} +1 -1
- package/dist/assets/{StrmGenerate-legacy.5ae65986.js → StrmGenerate-legacy.4402360f.js} +1 -1
- package/dist/assets/{StrmGenerate-legacy.eaf82811.js → StrmGenerate-legacy.ecbb8e9d.js} +1 -1
- package/dist/assets/{Tag-f71f66bd.js → Tag-ffe1a992.js} +1 -1
- package/dist/assets/{Tag-legacy.cccf7e4f.js → Tag-legacy.971a1953.js} +1 -1
- package/dist/assets/{Task-4bab4ae7.js → Task-438c4d6b.js} +1 -1
- package/dist/assets/{Task-legacy.bb16a63a.js → Task-legacy.607e52ad.js} +1 -1
- package/dist/assets/{Tasks-a81ddbfb.js → Tasks-c0229b29.js} +1 -1
- package/dist/assets/{Tasks-legacy.7372c9c9.js → Tasks-legacy.f3598230.js} +1 -1
- package/dist/assets/{Upload-82e59afd.js → Upload-958e240c.js} +1 -1
- package/dist/assets/Upload-e69eb0ff.js +1 -0
- package/dist/assets/{Upload-legacy.f7d24878.js → Upload-legacy.03c286e2.js} +1 -1
- package/dist/assets/{Upload-legacy.333c7f45.js → Upload-legacy.698d3c2b.js} +1 -1
- package/dist/assets/{Users-d54db363.js → Users-bdf25bea.js} +1 -1
- package/dist/assets/{Users-legacy.ea25ac9c.js → Users-legacy.b0075433.js} +1 -1
- package/dist/assets/{Wether-34003580.js → Wether-891c8709.js} +1 -1
- package/dist/assets/{Wether-legacy.e7f0cdf2.js → Wether-legacy.7a5c9f59.js} +1 -1
- package/dist/assets/{aliyun_office-62289944.js → aliyun_office-a22ac966.js} +1 -1
- package/dist/assets/{aliyun_office-legacy.ab69efae.js → aliyun_office-legacy.910c67dd.js} +1 -1
- package/dist/assets/{aliyun_video-e4e5e5b1.js → aliyun_video-72e75696.js} +1 -1
- package/dist/assets/{aliyun_video-legacy.5052d2be.js → aliyun_video-legacy.3ca538ae.js} +1 -1
- package/dist/assets/{archive-f13b3c32.js → archive-15d8b252.js} +1 -1
- package/dist/assets/{archive-legacy.9e4f702a.js → archive-legacy.141ed6de.js} +1 -1
- package/dist/assets/{asciinema-d265f5ed.js → asciinema-befe680b.js} +1 -1
- package/dist/assets/{asciinema-legacy.a677f7a4.js → asciinema-legacy.0e111ef8.js} +1 -1
- package/dist/assets/{audio-63384a50.js → audio-37bb4f75.js} +1 -1
- package/dist/assets/{audio-legacy.3a1bc571.js → audio-legacy.9c9e6fd9.js} +1 -1
- package/dist/assets/{backup-restore-5d8f4473.js → backup-restore-8d5112f2.js} +1 -1
- package/dist/assets/{backup-restore-legacy.558c1bbf.js → backup-restore-legacy.21994194.js} +1 -1
- package/dist/assets/{doubao-3f38d292.js → doubao-4962e438.js} +1 -1
- package/dist/assets/{doubao-legacy.ce23ad6f.js → doubao-legacy.e8e5bddc.js} +1 -1
- package/dist/assets/{download-334cfc63.js → download-cf222578.js} +1 -1
- package/dist/assets/{download-legacy.20113d61.js → download-legacy.6b17b261.js} +1 -1
- package/dist/assets/{entry-014101b9.js → entry-23d0eac8.js} +4 -4
- package/dist/assets/{entry-acdd26dd.js → entry-2abbb591.js} +3 -3
- package/dist/assets/{entry-71381848.js → entry-55b019b5.js} +3 -3
- package/dist/assets/{entry-220f7e8b.js → entry-6fb77620.js} +2 -2
- package/dist/assets/{entry-1c58d2fa.js → entry-9896052e.js} +3 -3
- package/dist/assets/{entry-a4d7c810.js → entry-9a9c06fb.js} +2 -2
- package/dist/assets/{entry-96ec7279.js → entry-d1529af3.js} +4 -4
- package/dist/assets/{entry-2d788f53.js → entry-d2b2146e.js} +2 -2
- package/dist/assets/{entry-4f284779.js → entry-d9866ffb.js} +3 -3
- package/dist/assets/{entry-0a2185c7.js → entry-f67c0939.js} +3 -3
- package/dist/assets/entry-legacy.1c11c4ce.js +1 -0
- package/dist/assets/entry-legacy.6066ebc9.js +1 -0
- package/dist/assets/entry-legacy.60876545.js +1 -0
- package/dist/assets/entry-legacy.62cc3c3d.js +1 -0
- package/dist/assets/entry-legacy.8088e3bc.js +1 -0
- package/dist/assets/entry-legacy.b99b54c1.js +1 -0
- package/dist/assets/entry-legacy.b9b7580f.js +1 -0
- package/dist/assets/{entry-legacy.1d598eba.js → entry-legacy.c9424c94.js} +1 -1
- package/dist/assets/entry-legacy.d1b30365.js +1 -0
- package/dist/assets/entry-legacy.f43d27fe.js +1 -0
- package/dist/assets/{helper-ed76cd58.js → helper-8d6da87f.js} +1 -1
- package/dist/assets/{helper-a97d2506.js → helper-bcff9934.js} +1 -1
- package/dist/assets/{helper-legacy.a6497213.js → helper-legacy.c67cf50b.js} +1 -1
- package/dist/assets/{helper-legacy.f609beae.js → helper-legacy.fc3cc7d5.js} +1 -1
- package/dist/assets/{hls-d9c70324.js → hls-34ad2bf0.js} +1 -1
- package/dist/assets/{hls-legacy.8ac3e311.js → hls-legacy.258e62dc.js} +1 -1
- package/dist/assets/{html-eecc2de0.js → html-772e9d83.js} +1 -1
- package/dist/assets/{html-legacy.62ec8691.js → html-legacy.d0f89f46.js} +1 -1
- package/dist/assets/{image-da2e21d0.js → image-73b55447.js} +1 -1
- package/dist/assets/{image-legacy.1ecb39b4.js → image-legacy.944e86c3.js} +1 -1
- package/dist/assets/{index-be8bf534.js → index-003b5203.js} +1 -1
- package/dist/assets/{index-9e81668b.js → index-0af67a26.js} +3 -3
- package/dist/assets/{index-79dd8025.js → index-14204052.js} +1 -1
- package/dist/assets/{index-672ecb3a.js → index-2da9ca8e.js} +1 -1
- package/dist/assets/{index-16696b4e.js → index-314d6447.js} +1 -1
- package/dist/assets/index-54ddc888.js +1 -0
- package/dist/assets/{index-6a8f5a97.js → index-6021c988.js} +1 -1
- package/dist/assets/{index-16054e06.js → index-66bc0c4a.js} +1 -1
- package/dist/assets/{index-ed94c068.js → index-66f271c4.js} +1 -1
- package/dist/assets/{index-3095233d.js → index-6cfcfd46.js} +1 -1
- package/dist/assets/{index-a69ba1a7.js → index-76fcdbdf.js} +1 -1
- package/dist/assets/{index-bd615f4c.js → index-bc854cf4.js} +1 -1
- package/dist/assets/{index-69ab97af.js → index-cbfadd9b.js} +1 -1
- package/dist/assets/{index-e8eb691f.js → index-ccd3c2df.js} +1 -1
- package/dist/assets/{index-legacy.648c8cb3.js → index-legacy.06ba96c2.js} +1 -1
- package/dist/assets/{index-legacy.68d7598b.js → index-legacy.14cbd866.js} +1 -1
- package/dist/assets/{index-legacy.91f9f875.js → index-legacy.24d29f81.js} +1 -1
- package/dist/assets/{index-legacy.198def1c.js → index-legacy.257815ef.js} +1 -1
- package/dist/assets/{index-legacy.f80dcf65.js → index-legacy.2ecd8568.js} +1 -1
- package/dist/assets/{index-legacy.1181b6ae.js → index-legacy.35aba8a0.js} +1 -1
- package/dist/assets/{index-legacy.9b890e23.js → index-legacy.53efc4c8.js} +1 -1
- package/dist/assets/{index-legacy.5b1574d3.js → index-legacy.5a403980.js} +1 -1
- package/dist/assets/{index-legacy.15f306f3.js → index-legacy.7b9d362b.js} +1 -1
- package/dist/assets/{index-legacy.96c38d29.js → index-legacy.831645c0.js} +1 -1
- package/dist/assets/{index-legacy.2ab05dfe.js → index-legacy.9a995a78.js} +3 -3
- package/dist/assets/{index-legacy.760496d0.js → index-legacy.aa1b93bf.js} +1 -1
- package/dist/assets/{index-legacy.8d21f125.js → index-legacy.b2067bd5.js} +1 -1
- package/dist/assets/{index-legacy.16817eb5.js → index-legacy.f9d48ec7.js} +1 -1
- package/dist/assets/{indexes-c43edd5f.js → indexes-39a5b1ff.js} +1 -1
- package/dist/assets/{indexes-legacy.081aa8b7.js → indexes-legacy.8769beeb.js} +1 -1
- package/dist/assets/{info-35e907bb.js → info-6b46a634.js} +1 -1
- package/dist/assets/{info-legacy.c051afcc.js → info-legacy.dc8f48be.js} +1 -1
- package/dist/assets/{ipa-59eb2697.js → ipa-86dc8896.js} +1 -1
- package/dist/assets/{ipa-legacy.2a3a0938.js → ipa-legacy.17ae2e8d.js} +1 -1
- package/dist/assets/{lark-7e95d330.js → lark-73a41a60.js} +1 -1
- package/dist/assets/{lark-legacy.63776d90.js → lark-legacy.24acf7f1.js} +1 -1
- package/dist/assets/{lark_tools-b9fca864.js → lark_tools-649a02b3.js} +1 -1
- package/dist/assets/{lark_tools-legacy.ccc5ff9f.js → lark_tools-legacy.eecb6c72.js} +1 -1
- package/dist/assets/{layout-5666d0ff.js → layout-5d35ffe8.js} +1 -1
- package/dist/assets/{layout-legacy.225ec2a7.js → layout-legacy.ae9754f2.js} +1 -1
- package/dist/assets/{management-6734acd2.js → management-0c24b19e.js} +1 -1
- package/dist/assets/{management-legacy.3b1fee1b.js → management-legacy.8848a8f8.js} +1 -1
- package/dist/assets/{markdown-152a9ed3.js → markdown-8d906270.js} +1 -1
- package/dist/assets/{markdown-legacy.ffda05f3.js → markdown-legacy.9eb66931.js} +1 -1
- package/dist/assets/{markdown_with_word_wrap-31b0838a.js → markdown_with_word_wrap-c0408f23.js} +1 -1
- package/dist/assets/{markdown_with_word_wrap-legacy.9a2dbe70.js → markdown_with_word_wrap-legacy.3463bef2.js} +1 -1
- package/dist/assets/{mySession-516a67e2.js → mySession-884023ca.js} +1 -1
- package/dist/assets/{mySession-legacy.c1a50dd2.js → mySession-legacy.68203a3e.js} +1 -1
- package/dist/assets/offline_download-6fa0e9d2.js +1 -0
- package/dist/assets/{offline_download-legacy.c97059a6.js → offline_download-legacy.d0f875cd.js} +1 -1
- package/dist/assets/{open-with-b7fbd33c.js → open-with-7bd13257.js} +1 -1
- package/dist/assets/{open-with-legacy.23b88457.js → open-with-legacy.89db98a3.js} +1 -1
- package/dist/assets/{plist-0de55944.js → plist-18445805.js} +1 -1
- package/dist/assets/{plist-legacy.86c28020.js → plist-legacy.c128376d.js} +1 -1
- package/dist/assets/{polyfills-legacy.2ae8dfb3.js → polyfills-legacy.bfccebe0.js} +1 -1
- package/dist/assets/{shares-59ef97b5.js → shares-d862241a.js} +1 -1
- package/dist/assets/{shares-legacy.f295f323.js → shares-legacy.2e408931.js} +1 -1
- package/dist/assets/{solid-contextmenu-9117c1c3.js → solid-contextmenu-389460bd.js} +1 -1
- package/dist/assets/{solid-contextmenu-legacy.972288a0.js → solid-contextmenu-legacy.0f1769af.js} +1 -1
- package/dist/assets/{text-editor-c7592027.js → text-editor-ffff6c54.js} +1 -1
- package/dist/assets/{text-editor-legacy.a0f8df35.js → text-editor-legacy.cd9e1a2d.js} +1 -1
- package/dist/assets/{url-8cd64395.js → url-23fb7cc0.js} +1 -1
- package/dist/assets/{url-legacy.d032f14e.js → url-legacy.b18d3809.js} +1 -1
- package/dist/assets/{useTitle-86c4f10b.js → useTitle-394ae64f.js} +1 -1
- package/dist/assets/{useTitle-legacy.692240ad.js → useTitle-legacy.2e69d9a6.js} +1 -1
- package/dist/assets/{video-2ea2797b.js → video-ebb98b67.js} +1 -1
- package/dist/assets/{video-legacy.f9611553.js → video-legacy.768a1779.js} +1 -1
- package/dist/assets/{video360-1c1d238c.js → video360-a4d64816.js} +1 -1
- package/dist/assets/{video360-legacy.be846428.js → video360-legacy.8266ee4a.js} +1 -1
- package/dist/assets/{video_box-1abd8d42.js → video_box-a8a43c3b.js} +1 -1
- package/dist/assets/{video_box-legacy.9f147b79.js → video_box-legacy.53fe4ab0.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/Decompress-ccf89dc1.js +0 -1
- package/dist/assets/Grid-2d1b4ec0.js +0 -1
- package/dist/assets/ImageWithError-c7604bb9.js +0 -1
- package/dist/assets/Other-71018b72.js +0 -1
- package/dist/assets/Other-legacy.8e7c037f.js +0 -1
- package/dist/assets/StrmGenerate-39346c86.js +0 -1
- package/dist/assets/Upload-815bfacf.js +0 -1
- package/dist/assets/entry-legacy.04da8194.js +0 -1
- package/dist/assets/entry-legacy.051dbcd4.js +0 -1
- package/dist/assets/entry-legacy.1e84bb16.js +0 -1
- package/dist/assets/entry-legacy.3c8055af.js +0 -1
- package/dist/assets/entry-legacy.798b9e5d.js +0 -1
- package/dist/assets/entry-legacy.82d2f08f.js +0 -1
- package/dist/assets/entry-legacy.a4ac476b.js +0 -1
- package/dist/assets/entry-legacy.a8128a4b.js +0 -1
- package/dist/assets/entry-legacy.f0301d80.js +0 -1
- package/dist/assets/index-5e369960.js +0 -1
- package/dist/assets/offline_download-375946fc.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,cY as R,az as d,n as T,a3 as q,bc as A,dA as F}from"./index-
|
|
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,cY as R,az as d,n as T,a3 as q,bc as A,dA as F}from"./index-0af67a26.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();A(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.2ab05dfe.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.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 +1 @@
|
|
|
1
|
-
import{b as t,aY as n,y as a,bV as r,cY as s}from"./index-
|
|
1
|
+
import{b as t,aY as n,y as a,bV as r,cY as s}from"./index-0af67a26.js";import{b as o}from"./useTitle-394ae64f.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.9a995a78.js","./useTitle-legacy.2e69d9a6.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.cY},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-0af67a26.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.2ab05dfe.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.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 +1 @@
|
|
|
1
|
-
import{b as m,d as $,dd as x,ba as o,bq as g,y as t,Y as _,bW as C,Z as c,$ as b,a6 as v,R as k,a3 as h,n as S,cY as T,bX as F,aG as i,N as I,bN as L,T as E,a0 as M,S as R,O as q}from"./index-
|
|
1
|
+
import{b as m,d as $,dd as x,ba as o,bq as g,y as t,Y as _,bW as C,Z as c,$ as b,a6 as v,R as k,a3 as h,n as S,cY as T,bX as F,aG as i,N as I,bN as L,T as E,a0 as M,S as R,O as q}from"./index-0af67a26.js";import{a as D}from"./FolderTree-7ae29384.js";import"./index-14204052.js";const H=e=>{const r=m();return t(c,{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[i(()=>i(()=>e.type==="string",!0)()?t(I,{get id(){return e.name},get value(){return e.value},onInput:n=>e.onChange(n.currentTarget.value)}):i(()=>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(c,{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(c,{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:d=>l(a.name,d),get sub(){return s[a.sub]},onSub:d=>l(a.sub,d),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,4 +1,4 @@
|
|
|
1
|
-
import{b as W,y as t,$ as U,al as X,aJ as p,am as m,N as k,bD as j,bP as D,S as s,aw as M,ar as ee,bN as te,T as ne,Y,a6 as L,R as V,O as B,de as re,Z as ae,d as ie,ba as _,bq as x,C as ue,dd as q,B as de,bW as le,eF as ge,cJ as ce,cK as he,aG as me,a5 as H,n as J,ac as oe,a3 as T,cY as se}from"./index-
|
|
1
|
+
import{b as W,y as t,$ as U,al as X,aJ as p,am as m,N as k,bD as j,bP as D,S as s,aw as M,ar as ee,bN as te,T as ne,Y,a6 as L,R as V,O as B,de as re,Z as ae,d as ie,ba as _,bq as x,C as ue,dd as q,B as de,bW as le,eF as ge,cJ as ce,cK as he,aG as me,a5 as H,n as J,ac as oe,a3 as T,cY as se}from"./index-0af67a26.js";import{T as a}from"./item_type-32dc6fdf.js";import{a as z}from"./FolderTree-7ae29384.js";import{R as ve}from"./ResponsiveGrid-0e943896.js";import"./index-14204052.js";const R=e=>{const l=W(),F=e.type===a.String&&!e.readonly&&(e.name==="root_folder_path"||e.name==="remote_path"),b=e.type===a.Number&&e.driver==="Chunker"&&e.name==="chunk_size",g=e.type===a.Text&&e.driver==="Chunker"&&e.name==="remote_paths",I=e.type===a.Text&&e.driver==="Strm"&&e.name==="paths",C=g||I,c=e.type===a.Bool&&e.driver==="Chunker"&&e.name==="store_chunks_in_primary",v=e.type===a.Number?e.onChange:void 0,N=()=>{var r;return String(((r=e.additionValues)==null?void 0:r.remote_paths)??"").split(`
|
|
2
2
|
`).map(n=>n.trim()).filter(Boolean)},S=()=>c?N().length===0?l("drivers.Chunker.store_chunks_in_primary-empty_hint"):e.value?l("drivers.Chunker.store_chunks_in_primary-enabled_hint"):l("drivers.Chunker.store_chunks_in_primary-disabled_hint"):"",y=()=>{if(!C)return[];const r=e.value??"";return r===""?[""]:r.split(`
|
|
3
3
|
`)},f=r=>{var n;e.type===a.Text&&((n=e.onChange)==null||n.call(e,r.join(`
|
|
4
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 l(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 l("settings.unknown_type")}})},get children(){return[t(m,{when:F,get children(){return t(z,{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(m,{get when(){return e.type===a.String},get children(){return t(k,{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(m,{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 u;const n=parseInt(r,10);(u=e.onChange)==null||u.call(e,Number.isNaN(n)?0:n)}:void 0},get children(){return t(D,{get readonly(){return e.readonly},get options(){return e.options.split(",").map(r=>({key:r,label:l((e.options_prefix??(e.driver==="common"?`storages.common.${e.name}s`:`drivers.${e.driver}.${e.name}s`))+`.${r}`)}))}})}})}}),t(m,{get when(){return e.type===a.Number},get children(){return t(s,{when:b,get fallback(){return t(k,{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(M,{w:"$full",spacing:"$2",get children(){return[t(k,{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);v==null||v(Number.isFinite(n)?Math.round(n*1024*1024):0)}}),t(ee,{minW:"3rem",textAlign:"right",children:"MB"})]}})}})}}),t(m,{get when(){return e.type===a.Float},get children(){return t(k,{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(m,{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(m,{get when(){return e.type===a.Text},get children(){return t(s,{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(Y,{w:"$full",alignItems:"stretch",spacing:"$2",get children(){return[t(L,{get each(){return y()},children:(r,n)=>t(M,{w:"$full",alignItems:"flex-start",spacing:"$2",get children(){return[t(z,{get id(){return n()===0?e.name:void 0},value:r,onChange:u=>{const h=[...y()];h[n()]=u,f(h)}}),t(V,{colorScheme:"danger",variant:"subtle",onClick:()=>{const u=[...y()];u.splice(n(),1),f(u)},get disabled(){return e.readonly},get children(){return l("global.delete")}})]}})}),t(V,{variant:"subtle",onClick:()=>{f([...y(),""])},get disabled(){return e.readonly},get children(){return l("global.add")}})]}})}})}}),t(m,{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(D,{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:l((e.options_prefix??(e.driver==="common"?`storages.common.${e.name}s`:`drivers.${e.driver}.${e.name}s`))+`.${r}`)}))}})}})}})]}}),t(s,{get when(){return e.help},get children(){return t(B,{get children(){return l(e.driver==="common"?`storages.common.${e.name}-tips`:`drivers.${e.driver}.${e.name}-tips`)}})}}),t(s,{when:b,get children(){return t(B,{get children(){return`${e.value.toLocaleString()} bytes (${re(e.value)})`}})}}),t(s,{get when(){return S()},get children(){return t(B,{get children(){return S()}})}})]}})};function G(e,l){switch(e){case a.Bool:return l?l==="true":!1;case a.Number:return l?parseInt(l):0;default:return l||""}}const $e=()=>{const e=W(),{params:l,back:F,to:b}=ie(),{id:g}=l,[I,C]=_(()=>x.get("/admin/driver/list"),!0),[c,v]=ue({}),N=async()=>{const i=await C();T(i,v)},[S,y]=_(()=>x.get(`/admin/storage/get?id=${g}`),!0),[f,r]=_(()=>x.get(`/admin/driver/info?driver=${u.driver}`),!0);g?(async()=>{const i=await y();T(i,async d=>{h(d),w(JSON.parse(d.addition));const o=await r();T(o,P=>v({[u.driver]:P}))})})():N();const[u,h]=q({}),[$,w]=q({}),[K,Z]=_(()=>(h("addition",JSON.stringify($)),x.post(`/admin/storage/${g?"update":"create"}`,u))),O=de(()=>{var A,E;const i=(E=(A=c()[u.driver])==null?void 0:A.config.alert)==null?void 0:E.trim();if(!i)return;const[d,...o]=i.split("|"),P=["info","success","warning","danger"].includes(d)?d:"info",Q=o.length>0?o.join("|").trim():i;return{status:P,fallbackText:Q}});return t(se,{get loading(){return g?S()||f():I()},get children(){return[t(le,{mb:"$2",get children(){return e(`global.${g?"edit":"add"}`)}}),t(Y,{mb:"$2",spacing:"$2",get children(){return[t(R,{name:"driver",default:"",readonly:g!==void 0,required:!0,searchable:!0,get type(){return a.Select},get options(){return g?u.driver:Object.keys(c()).join(",")},get value(){return u.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:i=>{for(const d of c()[i].common)h(d.name,G(d.type,d.default));w(ge(d=>{for(const o in d)delete d[o]}));for(const d of c()[i].additional)w(d.name,G(d.type,d.default));h("driver",i)}}),t(s,{get when(){return O()},get children(){return t(ce,{get status(){return O().status},w:"$full",get children(){return[t(he,{}),me(()=>e(`drivers.config.${u.driver}.alert`,void 0,O().fallbackText))]}})}})]}}),t(ve,{get children(){return t(s,{get when(){return c()[u.driver]},get children(){return[t(L,{get each(){return c()[u.driver].common},children:i=>t(R,H(i,{driver:"common",additionValues:$,get value(){return u[i.name]},onChange:d=>{h(i.name,d)}}))}),t(L,{get each(){return c()[u.driver].additional},children:i=>t(R,H(i,{get driver(){return u.driver},additionValues:$,get value(){return $[i.name]},onChange:d=>{w(i.name,d)}}))})]}})}}),t(V,{mt:"$2",get loading(){return K()},onClick:async()=>{c()[u.driver].config.need_ms&&(J.info(e("manage.add_storage-tips")),window.open(oe("/@manage/messenger"),"_blank"));const i=await Z();T(i,()=>{J.success(e("global.save_success")),F()},(d,o)=>{i.data.id&&b(`/@manage/storages/edit/${i.data.id}`)})},get children(){return e(`global.${g?"save":"add"}`)}})]}})};export{$e as default};
|
|
@@ -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-9e81668b.js";import{h as qe,e as Je}from"./index-79dd8025.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,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 +1 @@
|
|
|
1
|
-
import{b as V,d as W,C as x,dd as Y,ba as h,ep as A,bq as w,y as e,bW as J,cY as K,Y as $,S as p,Z as i,$ as o,N as c,bD as y,bE as v,bG as Z,bI as _,bJ as S,a6 as f,bK as I,bL as k,bM as j,av as Q,bF as X,du as ee,dv as re,dw as te,aw as ne,a0 as C,R as se,n as T,a3 as d,eG as le}from"./index-
|
|
1
|
+
import{b as V,d as W,C as x,dd as Y,ba as h,ep as A,bq as w,y as e,bW as J,cY as K,Y as $,S as p,Z as i,$ as o,N as c,bD as y,bE as v,bG as Z,bI as _,bJ as S,a6 as f,bK as I,bL as k,bM as j,av as Q,bF as X,du as ee,dv as re,dw as te,aw as ne,a0 as C,R as se,n as T,a3 as d,eG as le}from"./index-0af67a26.js";const ie=()=>{const n=V(),{params:D,back:R}=W(),{id:u}=D,[m,L]=x([]),[q,F]=x([]),[t,a]=Y({id:0,username:"",password:"",base_path:"",role:[],permission:0,disabled:!1,sso_id:"",role_info:[],permissions:[],max_devices:void 0,session_ttl:void 0}),[O,N]=h(()=>A()),[P,z]=h(()=>w.get(`/admin/user/get?id=${u}`)),B=async()=>{const r=await N();if(d(r,s=>{L(s.content)}),u){const s=await z();d(s,l=>{a(l),H(l.role)})}else a("base_path","/")},H=async r=>{const s=new Set;s.add("/");for(const l of r){const g=await le(l);d(g,U=>{for(const b of U.permission_scopes||[])b.path&&s.add(b.path)})}F([...s].map(l=>l.toString()))};B();const[E,G]=h(()=>w.post(`/admin/user/${u?"update":"create"}`,t)),M=()=>!u;return e($,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(J,{get children(){return n(u?"global.edit":"global.add")}}),e(K,{get loading(){return P()||O()},get children(){return e($,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(p,{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(o,{for:"username",display:"flex",alignItems:"center",get children(){return n("users.username")}}),e(c,{id:"username",get value(){return t.username},onInput:r=>a("username",r.currentTarget.value)})]}}),e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(o,{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=>a("password",r.currentTarget.value)})]}})]}}),e(p,{get when(){return!M()},get children(){return e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(o,{for:"base_path",display:"flex",alignItems:"center",get children(){return n("users.base_path")}}),e(y,{get value(){return t.base_path},onChange:r=>a("base_path",r),get children(){return[e(v,{get children(){return e(Z,{})}}),e(_,{get children(){return e(S,{get children(){return e(f,{get each(){return q()},children:r=>e(I,{value:r,get children(){return[e(k,{children:r}),e(j,{})]}})})}})}})]}})]}})}}),e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(o,{display:"flex",alignItems:"center",get children(){return n("users.role")}}),e(y,{get value(){return t.role},onChange:r=>a("role",r),get children(){return[e(v,{get children(){return e(Q,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(p,{get when(){return t.role.length>0},get fallback(){return e(X,{get children(){return n("home.selected")}})},get children(){return e(f,{get each(){return t.role},children:r=>{const s=m().find(l=>l.id===r);return e(ee,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(re,{get children(){return(s==null?void 0:s.name)||`ID: ${r}`}}),e(te,{onClick:l=>{l.stopPropagation(),a("role",t.role.filter(g=>g!==r))}})]}})}})}})}})}}),e(_,{get children(){return e(S,{get children(){return e(f,{get each(){return m()},children:r=>e(I,{get value(){return r.id},onClick:()=>{const s=t.role.includes(r.id)?t.role.filter(l=>l!==r.id):[r.id];a("role",s)},get children(){return e(ne,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(C,{get checked(){return t.role.includes(r.id)},readOnly:!0}),e(k,{get children(){return r.name}})]}})}})})}})}})]}})]}}),e(i,{w:"fit-content",display:"flex",get children(){return e(C,{css:{whiteSpace:"nowrap"},id:"disabled",onChange:r=>a("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(o,{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=>a("max_devices",r.currentTarget.value?Number(r.currentTarget.value):void 0)})]}}),e(i,{w:"$full",display:"flex",flexDirection:"column",get children(){return[e(o,{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=>a("session_ttl",r.currentTarget.value?Number(r.currentTarget.value):void 0)})]}}),e(se,{get loading(){return E()},onClick:async()=>{if(!t.role||t.role.length===0){T.error(n("users.role")+" "+n("global.required"));return}const r=await G();d(r,()=>{T.success(n("global.save_success")),R()})},get children(){return n("global.save")}})]}})}})]}})};export{ie 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",u=i.asyncIterator||"@@asyncIterator",c=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(k){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(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 O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(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=s(t,e,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)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(k){return{type:"throw",arg:k}}}r.wrap=f;var h={};function p(){}function d(){}function y(){}var g={};l(g,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(j([])));m&&m!==n&&o.call(m,a)&&(g=m);var b=y.prototype=p.prototype=Object.create(g);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,u,c){var l=s(e[i],e,a);if("throw"!==l.type){var f=l.arg,h=f.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(h).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(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 _(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,_(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=s(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 L(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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:O}}function O(){return{value:void 0,done:!0}}return d.prototype=y,l(b,"constructor",y),l(y,"constructor",d),d.displayName=l(y,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),l(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(f(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,c,"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=j,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(S),!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 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(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),S(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;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(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 u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(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,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(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 i(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 i(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}function a(t,e){for(var r in e){(i=e[r]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r,i)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++){var i,a=n[o];(i=e[a]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a,i)}return t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.2ab05dfe.js","./FolderTree-legacy.cd2c39e7.js","./index-legacy.16817eb5.js"],(function(t,r){"use strict";var i,c,l,f,s,h,p,d,y,g,v,m,b,w,x,_,L,S,E,j,O,k,P,T;return{setters:[function(t){i=t.b,c=t.d,l=t.dd,f=t.ba,s=t.bq,h=t.y,p=t.Y,d=t.bW,y=t.Z,g=t.$,v=t.a6,m=t.R,b=t.a3,w=t.n,x=t.cY,_=t.bX,L=t.aG,S=t.N,E=t.bN,j=t.T,O=t.a0,k=t.S,P=t.O},function(t){T=t.a},null],execute:function(){var r=function(t){var e=i();return h(y,{w:"$full",display:"flex",flexDirection:"column",get children(){var r,n;return[h(g,(r={},"for",n={},n.for=n.for||{},n.for.get=function(){return t.name},u(r,"display","flex"),u(r,"alignItems","center"),"children",n.children=n.children||{},n.children.get=function(){return e("metas.".concat(t.name))},a(r,n),r)),h(_,{w:"$full",get direction(){return"bool"===t.type?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[L((function(){return L((function(){return"string"===t.type}),!0)()?h(S,{get id(){return t.name},get value(){return t.value},onInput:function(e){return t.onChange(e.currentTarget.value)}}):L((function(){return"bool"===t.type}),!0)()?h(E,{get id(){return t.name},get checked(){return t.value},onChange:function(e){return t.onChange(e.currentTarget.checked)}}):h(j,{get id(){return t.name},get value(){return t.value},onChange:function(e){return t.onChange(e.currentTarget.value)}})})),h(y,{w:"fit-content",display:"flex",get children(){return h(O,{css:{whiteSpace:"nowrap"},get id(){return"".concat(t.name,"_sub")},onChange:function(e){return t.onSub(e.currentTarget.checked)},color:"$neutral10",fontSize:"$sm",get checked(){return t.sub},get children(){return e("metas.apply_sub")}})}})]}}),h(k,{get when(){return t.help},get children(){return h(P,{get children(){return e("metas.".concat(t.name,"_help"))}})}})]}})};t("default",(function(){var t=i(),a=c(),u=a.params,_=a.back,L=u.id,S=o(l({id:0,path:"",password:"",p_sub:!1,write:!1,w_sub:!1,hide:"",h_sub:!1,readme:"",r_sub:!1,header:"",header_sub:!1}),2),E=S[0],j=S[1],O=o(f((function(){return s.get("/admin/meta/get?id=".concat(L))})),2),k=O[0],P=O[1],C=function(){var t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P();case 2:r=t.sent,b(r,j);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();L&&C();var I=o(f((function(){return s.post("/admin/meta/".concat(L?"update":"create"),E)})),2),N=I[0],$=I[1];return h(x,{get loading(){return k()},get children(){return h(p,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[h(d,{get children(){return t("global.".concat(L?"edit":"add"))}}),h(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[h(g,{for:"path",display:"flex",alignItems:"center",get children(){return t("metas.path")}}),h(T,{id:"path",get value(){return E.path},onChange:function(t){return j("path",t)}})]}}),h(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:function(t){return h(r,{get name(){return t.name},get type(){return t.type},get value(){return E[t.name]},onChange:function(e){return j(t.name,e)},get sub(){return E[t.sub]},onSub:function(e){return j(t.sub,e)},get help(){return t.help}})}}),h(m,{get loading(){return N()},onClick:(o=n(e().mark((function r(){var n;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:n=e.sent,b(n,(function(){w.success(t("global.save_success")),_()}));case 4:case"end":return e.stop()}}),r)}))),function(){return o.apply(this,arguments)}),get children(){return t("global.".concat(L?"save":"add"))}})];var o}})}})}))}}}))}();
|
|
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",u=i.asyncIterator||"@@asyncIterator",c=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(k){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(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 O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=_(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=s(t,e,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)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(k){return{type:"throw",arg:k}}}r.wrap=f;var h={};function p(){}function d(){}function y(){}var g={};l(g,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(j([])));m&&m!==n&&o.call(m,a)&&(g=m);var b=y.prototype=p.prototype=Object.create(g);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,u,c){var l=s(e[i],e,a);if("throw"!==l.type){var f=l.arg,h=f.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(h).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(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 _(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,_(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=s(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 L(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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:O}}function O(){return{value:void 0,done:!0}}return d.prototype=y,l(b,"constructor",y),l(y,"constructor",d),d.displayName=l(y,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},w(x.prototype),l(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(f(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,c,"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=j,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(S),!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 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(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),S(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;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(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 u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(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,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(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 i(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 i(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}function a(t,e){for(var r in e){(i=e[r]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r,i)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o++){var i,a=n[o];(i=e[a]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a,i)}return t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.9a995a78.js","./FolderTree-legacy.53528cb3.js","./index-legacy.f9d48ec7.js"],(function(t,r){"use strict";var i,c,l,f,s,h,p,d,y,g,v,m,b,w,x,_,L,S,E,j,O,k,P,T;return{setters:[function(t){i=t.b,c=t.d,l=t.dd,f=t.ba,s=t.bq,h=t.y,p=t.Y,d=t.bW,y=t.Z,g=t.$,v=t.a6,m=t.R,b=t.a3,w=t.n,x=t.cY,_=t.bX,L=t.aG,S=t.N,E=t.bN,j=t.T,O=t.a0,k=t.S,P=t.O},function(t){T=t.a},null],execute:function(){var r=function(t){var e=i();return h(y,{w:"$full",display:"flex",flexDirection:"column",get children(){var r,n;return[h(g,(r={},"for",n={},n.for=n.for||{},n.for.get=function(){return t.name},u(r,"display","flex"),u(r,"alignItems","center"),"children",n.children=n.children||{},n.children.get=function(){return e("metas.".concat(t.name))},a(r,n),r)),h(_,{w:"$full",get direction(){return"bool"===t.type?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[L((function(){return L((function(){return"string"===t.type}),!0)()?h(S,{get id(){return t.name},get value(){return t.value},onInput:function(e){return t.onChange(e.currentTarget.value)}}):L((function(){return"bool"===t.type}),!0)()?h(E,{get id(){return t.name},get checked(){return t.value},onChange:function(e){return t.onChange(e.currentTarget.checked)}}):h(j,{get id(){return t.name},get value(){return t.value},onChange:function(e){return t.onChange(e.currentTarget.value)}})})),h(y,{w:"fit-content",display:"flex",get children(){return h(O,{css:{whiteSpace:"nowrap"},get id(){return"".concat(t.name,"_sub")},onChange:function(e){return t.onSub(e.currentTarget.checked)},color:"$neutral10",fontSize:"$sm",get checked(){return t.sub},get children(){return e("metas.apply_sub")}})}})]}}),h(k,{get when(){return t.help},get children(){return h(P,{get children(){return e("metas.".concat(t.name,"_help"))}})}})]}})};t("default",(function(){var t=i(),a=c(),u=a.params,_=a.back,L=u.id,S=o(l({id:0,path:"",password:"",p_sub:!1,write:!1,w_sub:!1,hide:"",h_sub:!1,readme:"",r_sub:!1,header:"",header_sub:!1}),2),E=S[0],j=S[1],O=o(f((function(){return s.get("/admin/meta/get?id=".concat(L))})),2),k=O[0],P=O[1],C=function(){var t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P();case 2:r=t.sent,b(r,j);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();L&&C();var I=o(f((function(){return s.post("/admin/meta/".concat(L?"update":"create"),E)})),2),N=I[0],$=I[1];return h(x,{get loading(){return k()},get children(){return h(p,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[h(d,{get children(){return t("global.".concat(L?"edit":"add"))}}),h(y,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[h(g,{for:"path",display:"flex",alignItems:"center",get children(){return t("metas.path")}}),h(T,{id:"path",get value(){return E.path},onChange:function(t){return j("path",t)}})]}}),h(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:function(t){return h(r,{get name(){return t.name},get type(){return t.type},get value(){return E[t.name]},onChange:function(e){return j(t.name,e)},get sub(){return E[t.sub]},onSub:function(e){return j(t.sub,e)},get help(){return t.help}})}}),h(m,{get loading(){return N()},onClick:(o=n(e().mark((function r(){var n;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:n=e.sent,b(n,(function(){w.success(t("global.save_success")),_()}));case 4:case"end":return e.stop()}}),r)}))),function(){return o.apply(this,arguments)}),get children(){return t("global.".concat(L?"save":"add"))}})];var o}})}})}))}}}))}();
|
|
@@ -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="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 r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return t};var t={},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(L){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new O(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=_(a,r);if(u){if(u===f)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=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)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 s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=d;var f={};function h(){}function v(){}function g(){}var p={};l(p,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(C([])));m&&m!==n&&o.call(m,a)&&(p=m);var b=g.prototype=h.prototype=Object.create(p);function w(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=s(t[i],t,a);if("throw"!==l.type){var d=l.arg,f=d.value;return f&&"object"==e(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(f).then((function(e){d.value=e,u(d)}),(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 f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;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,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(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:j}}function j(){return{value:void 0,done:!0}}return v.prototype=g,l(b,"constructor",g),l(g,"constructor",v),v.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),l(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(d(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),l(b,c,"Generator"),l(b,a,(function(){return this})),l(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=C,O.prototype={constructor:O,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(k),!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,f):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),f},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),k(r),f}},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;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(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 o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function u(e){n(a,o,i,u,c,"next",e)}function c(e){n(a,o,i,u,c,"throw",e)}u(void 0)}))}}function i(e,t){return u(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)||a()}function a(){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 u(e){if(Array.isArray(e))return e}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||d(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 l(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(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}function f(e,t){for(var r in t){(i=t[r]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r,i)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),o=0;o<n.length;o++){var i,a=n[o];(i=t[a]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a,i)}return e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}System.register(["./index-legacy.2ab05dfe.js","./item_type-legacy.1b6076a1.js","./FolderTree-legacy.cd2c39e7.js","./ResponsiveGrid-legacy.539dcc2d.js","./index-legacy.16817eb5.js"],(function(e,n){"use strict";var s,v,g,p,y,m,b,w,x,_,S,k,O,C,j,L,E,T,N,I,A,P,$,F,G,B,V,q,J,Y,M,R,D,W,z,K,U,Z,H;return{setters:[function(e){s=e.b,v=e.y,g=e.$,p=e.al,y=e.aJ,m=e.am,b=e.N,w=e.bD,x=e.bP,_=e.S,S=e.aw,k=e.ar,O=e.bN,C=e.T,j=e.Y,L=e.a6,E=e.R,T=e.O,N=e.de,I=e.Z,A=e.d,P=e.ba,$=e.bq,F=e.C,G=e.dd,B=e.B,V=e.bW,q=e.eF,J=e.cJ,Y=e.cK,M=e.aG,R=e.a5,D=e.n,W=e.ac,z=e.a3,K=e.cY},function(e){U=e.T},function(e){Z=e.a},function(e){H=e.R},null],execute:function(){var n=function(e){var t=s(),r=e.type===U.String&&!e.readonly&&("root_folder_path"===e.name||"remote_path"===e.name),n=e.type===U.Number&&"Chunker"===e.driver&&"chunk_size"===e.name,o=e.type===U.Text&&"Chunker"===e.driver&&"remote_paths"===e.name,i=e.type===U.Text&&"Strm"===e.driver&&"paths"===e.name,a=o||i,u=e.type===U.Bool&&"Chunker"===e.driver&&"store_chunks_in_primary"===e.name,l=e.type===U.Number?e.onChange:void 0,d=function(){return u?0===String(null!==(r=null===(n=e.additionValues)||void 0===n?void 0:n.remote_paths)&&void 0!==r?r:"").split("\n").map((function(e){return e.trim()})).filter(Boolean).length?t("drivers.Chunker.store_chunks_in_primary-empty_hint"):e.value?t("drivers.Chunker.store_chunks_in_primary-enabled_hint"):t("drivers.Chunker.store_chunks_in_primary-disabled_hint"):"";var r,n},A=function(){var t;if(!a)return[];var r=null!==(t=e.value)&&void 0!==t?t:"";return""===r?[""]:r.split("\n")},P=function(t){var r;e.type===U.Text&&(null===(r=e.onChange)||void 0===r||r.call(e,t.join("\n")))};return v(I,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){var o,i;return[v(g,(o={},"for",i={},i.for=i.for||{},i.for.get=function(){return e.name},h(o,"display","flex"),h(o,"alignItems","center"),"children",i.children=i.children||{},i.children.get=function(){var r;return t((null!==(r=e.full_name_path)&&void 0!==r?r:"common"===e.driver)?"storages.common.".concat(e.name):"drivers.".concat(e.driver,".").concat(e.name))},f(o,i),o)),v(p,{get fallback(){return v(y,{get children(){return t("settings.unknown_type")}})},get children(){return[v(m,{when:r,get children(){return v(Z,{get id(){return e.name},get value(){return e.value},onChange:function(t){var r;e.type===U.String&&(null===(r=e.onChange)||void 0===r||r.call(e,t))}})}}),v(m,{get when(){return e.type===U.String},get children(){return v(b,{get id(){return e.name},get type(){return"password"==e.name?"password":"text"},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===U.String?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),v(m,{get when(){return e.type===U.Number&&e.options},get children(){return v(w,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return String(e.value)},get onChange(){return e.type===U.Number?function(t){var r,n=parseInt(t,10);null===(r=e.onChange)||void 0===r||r.call(e,Number.isNaN(n)?0:n)}:void 0},get children(){return v(x,{get readonly(){return e.readonly},get options(){return e.options.split(",").map((function(r){var n;return{key:r,label:t((null!==(n=e.options_prefix)&&void 0!==n?n:"common"===e.driver?"storages.common.".concat(e.name,"s"):"drivers.".concat(e.driver,".").concat(e.name,"s"))+".".concat(r))}}))}})}})}}),v(m,{get when(){return e.type===U.Number},get children(){return v(_,{when:n,get fallback(){return v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===U.Number?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseInt(t.currentTarget.value))}:void 0}})},get children(){return v(S,{w:"$full",spacing:"$2",get children(){return[v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return(e.value/1048576).toString()},onInput:function(e){var t=parseFloat(e.currentTarget.value);null==l||l(Number.isFinite(t)?Math.round(1024*t*1024):0)}}),v(k,{minW:"3rem",textAlign:"right",children:"MB"})]}})}})}}),v(m,{get when(){return e.type===U.Float},get children(){return v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===U.Float?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseFloat(t.currentTarget.value))}:void 0}})}}),v(m,{get when(){return e.type===U.Bool},get children(){return v(O,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===U.Bool?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.checked)}:void 0}})}}),v(m,{get when(){return e.type===U.Text},get children(){return v(_,{when:a,get fallback(){return v(C,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===U.Text?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})},get children(){return v(j,{w:"$full",alignItems:"stretch",spacing:"$2",get children(){return[v(L,{get each(){return A()},children:function(r,n){return v(S,{w:"$full",alignItems:"flex-start",spacing:"$2",get children(){return[v(Z,{get id(){return 0===n()?e.name:void 0},value:r,onChange:function(e){var t=c(A());t[n()]=e,P(t)}}),v(E,{colorScheme:"danger",variant:"subtle",onClick:function(){var e=c(A());e.splice(n(),1),P(e)},get disabled(){return e.readonly},get children(){return t("global.delete")}})]}})}}),v(E,{variant:"subtle",onClick:function(){P([].concat(c(A()),[""]))},get disabled(){return e.readonly},get children(){return t("global.add")}})]}})}})}}),v(m,{get when(){return e.type===U.Select},get children(){return v(w,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===U.Select?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t)}:void 0},get children(){return v(x,{get readonly(){return e.readonly},get searchable(){return e.type===U.Select&&e.searchable},get options(){return e.options.split(",").map((function(r){var n;return{key:r,label:t((null!==(n=e.options_prefix)&&void 0!==n?n:"common"===e.driver?"storages.common.".concat(e.name,"s"):"drivers.".concat(e.driver,".").concat(e.name,"s"))+".".concat(r))}}))}})}})}})]}}),v(_,{get when(){return e.help},get children(){return v(T,{get children(){return t("common"===e.driver?"storages.common.".concat(e.name,"-tips"):"drivers.".concat(e.driver,".").concat(e.name,"-tips"))}})}}),v(_,{when:n,get children(){return v(T,{get children(){return"".concat(e.value.toLocaleString()," bytes (").concat(N(e.value),")")}})}}),v(_,{get when(){return d()},get children(){return v(T,{get children(){return d()}})}})]}})};function Q(e,t){switch(e){case U.Bool:return!!t&&"true"===t;case U.Number:return t?parseInt(t):0;default:return t||""}}e("default",(function(){var e=s(),c=A(),f=c.params,g=c.back,p=c.to,y=f.id,m=i(P((function(){return $.get("/admin/driver/list")}),!0),2),b=m[0],w=m[1],x=i(F({}),2),S=x[0],k=x[1],O=function(){var e=o(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:t=e.sent,z(t,k);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=i(P((function(){return $.get("/admin/storage/get?id=".concat(y))}),!0),2),T=C[0],N=C[1],I=i(P((function(){return $.get("/admin/driver/info?driver=".concat(re.driver))}),!0),2),Z=I[0],X=I[1],ee=function(){var e=o(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:t=e.sent,z(t,function(){var e=o(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ne(t),ae(JSON.parse(t.addition)),e.next=4,X();case 4:n=e.sent,z(n,(function(e){return k(h({},re.driver,e))}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();y?ee():O();var te=i(G({}),2),re=te[0],ne=te[1],oe=i(G({}),2),ie=oe[0],ae=oe[1],ue=i(P((function(){return ne("addition",JSON.stringify(ie)),$.post("/admin/storage/".concat(y?"update":"create"),re)})),2),ce=ue[0],le=ue[1],de=B((function(){var e,t,r=null===(e=S()[re.driver])||void 0===e||null===(t=e.config.alert)||void 0===t?void 0:t.trim();if(r){var n,o=r.split("|"),i=u(n=o)||d(n)||l(n)||a(),c=i[0],s=i.slice(1);return{status:["info","success","warning","danger"].includes(c)?c:"info",fallbackText:s.length>0?s.join("|").trim():r}}}));return v(K,{get loading(){return y?T()||Z():b()},get children(){return[v(V,{mb:"$2",get children(){return e("global.".concat(y?"edit":"add"))}}),v(j,{mb:"$2",spacing:"$2",get children(){return[v(n,{name:"driver",default:"",readonly:void 0!==y,required:!0,searchable:!0,get type(){return U.Select},get options(){return y?re.driver:Object.keys(S()).join(",")},get value(){return re.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:function(e){var r,n=t(S()[e].common);try{for(n.s();!(r=n.n()).done;){var o=r.value;ne(o.name,Q(o.type,o.default))}}catch(c){n.e(c)}finally{n.f()}ae(q((function(e){for(var t in e)delete e[t]})));var i,a=t(S()[e].additional);try{for(a.s();!(i=a.n()).done;){var u=i.value;ae(u.name,Q(u.type,u.default))}}catch(c){a.e(c)}finally{a.f()}ne("driver",e)}}),v(_,{get when(){return de()},get children(){return v(J,{get status(){return de().status},w:"$full",get children(){return[v(Y,{}),M((function(){return e("drivers.config.".concat(re.driver,".alert"),void 0,de().fallbackText)}))]}})}})]}}),v(H,{get children(){return v(_,{get when(){return S()[re.driver]},get children(){return[v(L,{get each(){return S()[re.driver].common},children:function(e){return v(n,R(e,{driver:"common",additionValues:ie,get value(){return re[e.name]},onChange:function(t){ne(e.name,t)}}))}}),v(L,{get each(){return S()[re.driver].additional},children:function(e){return v(n,R(e,{get driver(){return re.driver},additionValues:ie,get value(){return ie[e.name]},onChange:function(t){ae(e.name,t)}}))}})]}})}}),v(E,{mt:"$2",get loading(){return ce()},onClick:(i=o(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return S()[re.driver].config.need_ms&&(D.info(e("manage.add_storage-tips")),window.open(W("/@manage/messenger"),"_blank")),t.next=3,le();case 3:n=t.sent,z(n,(function(){D.success(e("global.save_success")),g()}),(function(e,t){n.data.id&&p("/@manage/storages/edit/".concat(n.data.id))}));case 5:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),get children(){return e("global.".concat(y?"save":"add"))}})];var i}})}))}}}))}();
|
|
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="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 r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return t};var t={},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(L){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new O(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=_(a,r);if(u){if(u===f)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=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)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 s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=d;var f={};function h(){}function v(){}function g(){}var p={};l(p,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(C([])));m&&m!==n&&o.call(m,a)&&(p=m);var b=g.prototype=h.prototype=Object.create(p);function w(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=s(t[i],t,a);if("throw"!==l.type){var d=l.arg,f=d.value;return f&&"object"==e(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(f).then((function(e){d.value=e,u(d)}),(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 f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;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,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(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:j}}function j(){return{value:void 0,done:!0}}return v.prototype=g,l(b,"constructor",g),l(g,"constructor",v),v.displayName=l(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),l(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(d(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),l(b,c,"Generator"),l(b,a,(function(){return this})),l(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=C,O.prototype={constructor:O,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(k),!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,f):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),f},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),k(r),f}},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;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(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 o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function u(e){n(a,o,i,u,c,"next",e)}function c(e){n(a,o,i,u,c,"throw",e)}u(void 0)}))}}function i(e,t){return u(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)||a()}function a(){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 u(e){if(Array.isArray(e))return e}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||d(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 l(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(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}function f(e,t){for(var r in t){(i=t[r]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r,i)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),o=0;o<n.length;o++){var i,a=n[o];(i=t[a]).configurable=i.enumerable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a,i)}return e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}System.register(["./index-legacy.9a995a78.js","./item_type-legacy.1b6076a1.js","./FolderTree-legacy.53528cb3.js","./ResponsiveGrid-legacy.a9062597.js","./index-legacy.f9d48ec7.js"],(function(e,n){"use strict";var s,v,g,p,y,m,b,w,x,_,S,k,O,C,j,L,E,T,N,I,A,P,$,F,G,B,V,q,J,Y,M,R,D,W,z,K,U,Z,H;return{setters:[function(e){s=e.b,v=e.y,g=e.$,p=e.al,y=e.aJ,m=e.am,b=e.N,w=e.bD,x=e.bP,_=e.S,S=e.aw,k=e.ar,O=e.bN,C=e.T,j=e.Y,L=e.a6,E=e.R,T=e.O,N=e.de,I=e.Z,A=e.d,P=e.ba,$=e.bq,F=e.C,G=e.dd,B=e.B,V=e.bW,q=e.eF,J=e.cJ,Y=e.cK,M=e.aG,R=e.a5,D=e.n,W=e.ac,z=e.a3,K=e.cY},function(e){U=e.T},function(e){Z=e.a},function(e){H=e.R},null],execute:function(){var n=function(e){var t=s(),r=e.type===U.String&&!e.readonly&&("root_folder_path"===e.name||"remote_path"===e.name),n=e.type===U.Number&&"Chunker"===e.driver&&"chunk_size"===e.name,o=e.type===U.Text&&"Chunker"===e.driver&&"remote_paths"===e.name,i=e.type===U.Text&&"Strm"===e.driver&&"paths"===e.name,a=o||i,u=e.type===U.Bool&&"Chunker"===e.driver&&"store_chunks_in_primary"===e.name,l=e.type===U.Number?e.onChange:void 0,d=function(){return u?0===String(null!==(r=null===(n=e.additionValues)||void 0===n?void 0:n.remote_paths)&&void 0!==r?r:"").split("\n").map((function(e){return e.trim()})).filter(Boolean).length?t("drivers.Chunker.store_chunks_in_primary-empty_hint"):e.value?t("drivers.Chunker.store_chunks_in_primary-enabled_hint"):t("drivers.Chunker.store_chunks_in_primary-disabled_hint"):"";var r,n},A=function(){var t;if(!a)return[];var r=null!==(t=e.value)&&void 0!==t?t:"";return""===r?[""]:r.split("\n")},P=function(t){var r;e.type===U.Text&&(null===(r=e.onChange)||void 0===r||r.call(e,t.join("\n")))};return v(I,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){var o,i;return[v(g,(o={},"for",i={},i.for=i.for||{},i.for.get=function(){return e.name},h(o,"display","flex"),h(o,"alignItems","center"),"children",i.children=i.children||{},i.children.get=function(){var r;return t((null!==(r=e.full_name_path)&&void 0!==r?r:"common"===e.driver)?"storages.common.".concat(e.name):"drivers.".concat(e.driver,".").concat(e.name))},f(o,i),o)),v(p,{get fallback(){return v(y,{get children(){return t("settings.unknown_type")}})},get children(){return[v(m,{when:r,get children(){return v(Z,{get id(){return e.name},get value(){return e.value},onChange:function(t){var r;e.type===U.String&&(null===(r=e.onChange)||void 0===r||r.call(e,t))}})}}),v(m,{get when(){return e.type===U.String},get children(){return v(b,{get id(){return e.name},get type(){return"password"==e.name?"password":"text"},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===U.String?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),v(m,{get when(){return e.type===U.Number&&e.options},get children(){return v(w,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return String(e.value)},get onChange(){return e.type===U.Number?function(t){var r,n=parseInt(t,10);null===(r=e.onChange)||void 0===r||r.call(e,Number.isNaN(n)?0:n)}:void 0},get children(){return v(x,{get readonly(){return e.readonly},get options(){return e.options.split(",").map((function(r){var n;return{key:r,label:t((null!==(n=e.options_prefix)&&void 0!==n?n:"common"===e.driver?"storages.common.".concat(e.name,"s"):"drivers.".concat(e.driver,".").concat(e.name,"s"))+".".concat(r))}}))}})}})}}),v(m,{get when(){return e.type===U.Number},get children(){return v(_,{when:n,get fallback(){return v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===U.Number?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseInt(t.currentTarget.value))}:void 0}})},get children(){return v(S,{w:"$full",spacing:"$2",get children(){return[v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return(e.value/1048576).toString()},onInput:function(e){var t=parseFloat(e.currentTarget.value);null==l||l(Number.isFinite(t)?Math.round(1024*t*1024):0)}}),v(k,{minW:"3rem",textAlign:"right",children:"MB"})]}})}})}}),v(m,{get when(){return e.type===U.Float},get children(){return v(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===U.Float?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseFloat(t.currentTarget.value))}:void 0}})}}),v(m,{get when(){return e.type===U.Bool},get children(){return v(O,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===U.Bool?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.checked)}:void 0}})}}),v(m,{get when(){return e.type===U.Text},get children(){return v(_,{when:a,get fallback(){return v(C,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===U.Text?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})},get children(){return v(j,{w:"$full",alignItems:"stretch",spacing:"$2",get children(){return[v(L,{get each(){return A()},children:function(r,n){return v(S,{w:"$full",alignItems:"flex-start",spacing:"$2",get children(){return[v(Z,{get id(){return 0===n()?e.name:void 0},value:r,onChange:function(e){var t=c(A());t[n()]=e,P(t)}}),v(E,{colorScheme:"danger",variant:"subtle",onClick:function(){var e=c(A());e.splice(n(),1),P(e)},get disabled(){return e.readonly},get children(){return t("global.delete")}})]}})}}),v(E,{variant:"subtle",onClick:function(){P([].concat(c(A()),[""]))},get disabled(){return e.readonly},get children(){return t("global.add")}})]}})}})}}),v(m,{get when(){return e.type===U.Select},get children(){return v(w,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===U.Select?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t)}:void 0},get children(){return v(x,{get readonly(){return e.readonly},get searchable(){return e.type===U.Select&&e.searchable},get options(){return e.options.split(",").map((function(r){var n;return{key:r,label:t((null!==(n=e.options_prefix)&&void 0!==n?n:"common"===e.driver?"storages.common.".concat(e.name,"s"):"drivers.".concat(e.driver,".").concat(e.name,"s"))+".".concat(r))}}))}})}})}})]}}),v(_,{get when(){return e.help},get children(){return v(T,{get children(){return t("common"===e.driver?"storages.common.".concat(e.name,"-tips"):"drivers.".concat(e.driver,".").concat(e.name,"-tips"))}})}}),v(_,{when:n,get children(){return v(T,{get children(){return"".concat(e.value.toLocaleString()," bytes (").concat(N(e.value),")")}})}}),v(_,{get when(){return d()},get children(){return v(T,{get children(){return d()}})}})]}})};function Q(e,t){switch(e){case U.Bool:return!!t&&"true"===t;case U.Number:return t?parseInt(t):0;default:return t||""}}e("default",(function(){var e=s(),c=A(),f=c.params,g=c.back,p=c.to,y=f.id,m=i(P((function(){return $.get("/admin/driver/list")}),!0),2),b=m[0],w=m[1],x=i(F({}),2),S=x[0],k=x[1],O=function(){var e=o(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:t=e.sent,z(t,k);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=i(P((function(){return $.get("/admin/storage/get?id=".concat(y))}),!0),2),T=C[0],N=C[1],I=i(P((function(){return $.get("/admin/driver/info?driver=".concat(re.driver))}),!0),2),Z=I[0],X=I[1],ee=function(){var e=o(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:t=e.sent,z(t,function(){var e=o(r().mark((function e(t){var n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ne(t),ae(JSON.parse(t.addition)),e.next=4,X();case 4:n=e.sent,z(n,(function(e){return k(h({},re.driver,e))}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();y?ee():O();var te=i(G({}),2),re=te[0],ne=te[1],oe=i(G({}),2),ie=oe[0],ae=oe[1],ue=i(P((function(){return ne("addition",JSON.stringify(ie)),$.post("/admin/storage/".concat(y?"update":"create"),re)})),2),ce=ue[0],le=ue[1],de=B((function(){var e,t,r=null===(e=S()[re.driver])||void 0===e||null===(t=e.config.alert)||void 0===t?void 0:t.trim();if(r){var n,o=r.split("|"),i=u(n=o)||d(n)||l(n)||a(),c=i[0],s=i.slice(1);return{status:["info","success","warning","danger"].includes(c)?c:"info",fallbackText:s.length>0?s.join("|").trim():r}}}));return v(K,{get loading(){return y?T()||Z():b()},get children(){return[v(V,{mb:"$2",get children(){return e("global.".concat(y?"edit":"add"))}}),v(j,{mb:"$2",spacing:"$2",get children(){return[v(n,{name:"driver",default:"",readonly:void 0!==y,required:!0,searchable:!0,get type(){return U.Select},get options(){return y?re.driver:Object.keys(S()).join(",")},get value(){return re.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:function(e){var r,n=t(S()[e].common);try{for(n.s();!(r=n.n()).done;){var o=r.value;ne(o.name,Q(o.type,o.default))}}catch(c){n.e(c)}finally{n.f()}ae(q((function(e){for(var t in e)delete e[t]})));var i,a=t(S()[e].additional);try{for(a.s();!(i=a.n()).done;){var u=i.value;ae(u.name,Q(u.type,u.default))}}catch(c){a.e(c)}finally{a.f()}ne("driver",e)}}),v(_,{get when(){return de()},get children(){return v(J,{get status(){return de().status},w:"$full",get children(){return[v(Y,{}),M((function(){return e("drivers.config.".concat(re.driver,".alert"),void 0,de().fallbackText)}))]}})}})]}}),v(H,{get children(){return v(_,{get when(){return S()[re.driver]},get children(){return[v(L,{get each(){return S()[re.driver].common},children:function(e){return v(n,R(e,{driver:"common",additionValues:ie,get value(){return re[e.name]},onChange:function(t){ne(e.name,t)}}))}}),v(L,{get each(){return S()[re.driver].additional},children:function(e){return v(n,R(e,{get driver(){return re.driver},additionValues:ie,get value(){return ie[e.name]},onChange:function(t){ae(e.name,t)}}))}})]}})}}),v(E,{mt:"$2",get loading(){return ce()},onClick:(i=o(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return S()[re.driver].config.need_ms&&(D.info(e("manage.add_storage-tips")),window.open(W("/@manage/messenger"),"_blank")),t.next=3,le();case 3:n=t.sent,z(n,(function(){D.success(e("global.save_success")),g()}),(function(e,t){n.data.id&&p("/@manage/storages/edit/".concat(n.data.id))}));case 5:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),get children(){return e("global.".concat(y?"save":"add"))}})];var i}})}))}}}))}();
|