alistgo-alist-web 3.57.0 → 3.58.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-81569bc9.js → 2fa-6af218a3.js} +1 -1
- package/dist/assets/{2fa-legacy.6e1ab4fe.js → 2fa-legacy.907b4543.js} +1 -1
- package/dist/assets/{About-de904a92.js → About-a77d8d20.js} +1 -1
- package/dist/assets/{About-legacy.511d0183.js → About-legacy.faf2735b.js} +1 -1
- package/dist/assets/{AddLabelDialog-1993c9a3.js → AddLabelDialog-cfd2cf2e.js} +1 -1
- package/dist/assets/{AddLabelDialog-legacy.4db59173.js → AddLabelDialog-legacy.fefaa5a7.js} +1 -1
- package/dist/assets/{AddOrEdit-0c492484.js → AddOrEdit-4ff0efa1.js} +1 -1
- package/dist/assets/{AddOrEdit-9d8adc68.js → AddOrEdit-5e5ab894.js} +1 -1
- package/dist/assets/{AddOrEdit-c2ad44de.js → AddOrEdit-8aefb31c.js} +1 -1
- package/dist/assets/{AddOrEdit-338222b0.js → AddOrEdit-c19402e7.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.88bc961a.js → AddOrEdit-legacy.464f7017.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.9c08ba50.js → AddOrEdit-legacy.784d4721.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.50a35112.js → AddOrEdit-legacy.b4375806.js} +1 -1
- package/dist/assets/{AddOrEdit-legacy.a81f6a3f.js → AddOrEdit-legacy.fd09620e.js} +1 -1
- package/dist/assets/Common-69a0fb8a.js +1 -0
- package/dist/assets/{Common-legacy.3981f53b.js → Common-legacy.9f60f3ff.js} +1 -1
- package/dist/assets/{Copy-c3e7cfdb.js → Copy-b2ebb023.js} +1 -1
- package/dist/assets/{Copy-legacy.93ed40b4.js → Copy-legacy.9aa68355.js} +1 -1
- package/dist/assets/{Decompress-1754c1b7.js → Decompress-c3a4d3ba.js} +1 -1
- package/dist/assets/{Decompress-legacy.3d4c9796.js → Decompress-legacy.7613de66.js} +1 -1
- package/dist/assets/DeletePopover-2fb0138c.js +1 -0
- package/dist/assets/DeletePopover-legacy.3bef252d.js +1 -0
- package/dist/assets/{EditLabelDialog-7e35e2b1.js → EditLabelDialog-f8fe6c1e.js} +1 -1
- package/dist/assets/{EditLabelDialog-legacy.92e2d7e6.js → EditLabelDialog-legacy.d78db030.js} +1 -1
- package/dist/assets/{File-900651af.js → File-b3d6c366.js} +6 -6
- package/dist/assets/{File-legacy.a4df28ab.js → File-legacy.d850788a.js} +1 -1
- package/dist/assets/{Folder-5a6fe1bf.js → Folder-732f0c1c.js} +15 -15
- package/dist/assets/Folder-legacy.e17aec55.js +29 -0
- package/dist/assets/{FolderTree-f683f6a4.js → FolderTree-3887d06d.js} +1 -1
- package/dist/assets/{FolderTree-legacy.be5dcfc5.js → FolderTree-legacy.5e170387.js} +1 -1
- package/dist/assets/Grid-a9dd5e14.js +1 -0
- package/dist/assets/{Grid-legacy.8369e962.js → Grid-legacy.d85788e8.js} +1 -1
- package/dist/assets/{GridItem-c9fd1b55.js → GridItem-5727336e.js} +1 -1
- package/dist/assets/{GridItem-legacy.197976c2.js → GridItem-legacy.5c1e5d23.js} +1 -1
- package/dist/assets/{ImageWithError-15a2a914.js → ImageWithError-99f355a5.js} +1 -1
- package/dist/assets/{ImageWithError-legacy.2ccf62f5.js → ImageWithError-legacy.fd49b607.js} +1 -1
- package/dist/assets/{Images-f36a9102.js → Images-7f43bcbb.js} +1 -1
- package/dist/assets/{Images-legacy.523488a0.js → Images-legacy.b59e53c9.js} +1 -1
- package/dist/assets/{Layout-5174ed39.js → Layout-8a0a2c68.js} +6 -6
- package/dist/assets/Layout-legacy.53b536f3.js +1 -0
- package/dist/assets/{List-20370fd1.js → List-2c510900.js} +2 -2
- package/dist/assets/{List-legacy.cad93f30.js → List-legacy.024b493f.js} +1 -1
- package/dist/assets/{Messenger-03f6b10e.js → Messenger-e8b40e7b.js} +1 -1
- package/dist/assets/{Messenger-legacy.6cc4f09b.js → Messenger-legacy.04676d0d.js} +1 -1
- package/dist/assets/Metas-3d43d367.js +1 -0
- package/dist/assets/{Metas-legacy.aa98c42a.js → Metas-legacy.2f0fcedf.js} +1 -1
- package/dist/assets/{Other-eda90693.js → Other-8551d8de.js} +1 -1
- package/dist/assets/{Other-legacy.17cb3c2c.js → Other-legacy.20edfa68.js} +1 -1
- package/dist/assets/{PackageDownload-6e056638.js → PackageDownload-8e4c014c.js} +1 -1
- package/dist/assets/{PackageDownload-legacy.050f68de.js → PackageDownload-legacy.31cacc88.js} +1 -1
- package/dist/assets/{Paginator-12852f15.js → Paginator-7e0484cf.js} +1 -1
- package/dist/assets/Paginator-legacy.99dfcb34.js +1 -0
- package/dist/assets/{Password-157c126d.js → Password-7af2ddb0.js} +1 -1
- package/dist/assets/{Password-legacy.83cde265.js → Password-legacy.7429d55d.js} +1 -1
- package/dist/assets/{PermissionForm-a9f04f21.js → PermissionForm-dbcae6ec.js} +1 -1
- package/dist/assets/{PermissionForm-legacy.8c831c17.js → PermissionForm-legacy.387c533f.js} +1 -1
- package/dist/assets/{Profile-df7c130d.js → Profile-5a1c61a3.js} +1 -1
- package/dist/assets/{Profile-legacy.7b4853cf.js → Profile-legacy.9bc82314.js} +1 -1
- package/dist/assets/ResponsiveGrid-31af9f08.js +1 -0
- package/dist/assets/{ResponsiveGrid-legacy.4fdab710.js → ResponsiveGrid-legacy.4a47f200.js} +1 -1
- package/dist/assets/{Role-5f1a4eb3.js → Role-a9b5b6ce.js} +1 -1
- package/dist/assets/{Role-legacy.50104cdf.js → Role-legacy.ddf3de28.js} +1 -1
- package/dist/assets/{S3-0588b3ce.js → S3-0309c7f4.js} +1 -1
- package/dist/assets/{S3-legacy.57edc3ec.js → S3-legacy.bc65e94c.js} +1 -1
- package/dist/assets/{S3Transition-c9ba279b.js → S3Transition-b63e2297.js} +1 -1
- package/dist/assets/{S3Transition-legacy.55808a63.js → S3Transition-legacy.5529517f.js} +1 -1
- package/dist/assets/{SettingItem-1e8deefd.js → SettingItem-e66b06f6.js} +1 -1
- package/dist/assets/{SettingItem-legacy.22b5b6ee.js → SettingItem-legacy.4f3189c6.js} +1 -1
- package/dist/assets/{Storages-2cc12cff.js → Storages-82415e4f.js} +1 -1
- package/dist/assets/{Storages-legacy.fce35774.js → Storages-legacy.098951ce.js} +1 -1
- package/dist/assets/{Tag-c201fe66.js → Tag-5a3c9435.js} +1 -1
- package/dist/assets/{Tag-legacy.d9f377a0.js → Tag-legacy.f31f0280.js} +1 -1
- package/dist/assets/{Tasks-2f81c157.js → Tasks-db5b0556.js} +1 -1
- package/dist/assets/{Tasks-legacy.b3d674cb.js → Tasks-legacy.812cc101.js} +1 -1
- package/dist/assets/Upload-4dd9ff2b.js +1 -0
- package/dist/assets/{Upload-500c97aa.js → Upload-ecc1eabc.js} +1 -1
- package/dist/assets/{Upload-legacy.70a9822f.js → Upload-legacy.44ea25f0.js} +1 -1
- package/dist/assets/{Upload-legacy.ad3f89ca.js → Upload-legacy.8eff8935.js} +1 -1
- package/dist/assets/{Users-509d6261.js → Users-9d91e932.js} +1 -1
- package/dist/assets/{Users-legacy.6c76571d.js → Users-legacy.3eb1dc56.js} +1 -1
- package/dist/assets/{Wether-fe8556b6.js → Wether-2b2bf57f.js} +1 -1
- package/dist/assets/{Wether-legacy.000f5990.js → Wether-legacy.13620d74.js} +1 -1
- package/dist/assets/{aliyun_office-de1df605.js → aliyun_office-697a57a5.js} +1 -1
- package/dist/assets/{aliyun_office-legacy.1d333b27.js → aliyun_office-legacy.e6722692.js} +1 -1
- package/dist/assets/{aliyun_video-b6cb63b5.js → aliyun_video-c27cf614.js} +1 -1
- package/dist/assets/{aliyun_video-legacy.437b2540.js → aliyun_video-legacy.abcde17f.js} +1 -1
- package/dist/assets/{archive-c1548ac5.js → archive-b2690360.js} +1 -1
- package/dist/assets/{archive-legacy.b12e3f39.js → archive-legacy.8dacbbc3.js} +1 -1
- package/dist/assets/{asciinema-e46fe2d8.js → asciinema-064c7ff1.js} +1 -1
- package/dist/assets/{asciinema-legacy.152dce14.js → asciinema-legacy.c13c9614.js} +1 -1
- package/dist/assets/{audio-644c5027.js → audio-55f6bc9a.js} +1 -1
- package/dist/assets/{audio-legacy.83b0d2e7.js → audio-legacy.db05eda2.js} +1 -1
- package/dist/assets/{backup-restore-e885a23c.js → backup-restore-58c314b3.js} +1 -1
- package/dist/assets/{backup-restore-legacy.b72cb6e9.js → backup-restore-legacy.499894c2.js} +1 -1
- package/dist/assets/{doubao-e42c4e10.js → doubao-c88f8d6b.js} +1 -1
- package/dist/assets/{doubao-legacy.241af2be.js → doubao-legacy.16698426.js} +1 -1
- package/dist/assets/entry-10574124.js +5 -0
- package/dist/assets/entry-28a4dcf8.js +5 -0
- package/dist/assets/entry-4d116535.js +5 -0
- package/dist/assets/entry-66cc462c.js +6 -0
- package/dist/assets/entry-7bc57540.js +5 -0
- package/dist/assets/entry-80f7b791.js +8 -0
- package/dist/assets/entry-b68756c5.js +9 -0
- package/dist/assets/entry-c1e55c5f.js +5 -0
- package/dist/assets/entry-eb7f297b.js +5 -0
- package/dist/assets/entry-effbda2b.js +5 -0
- package/dist/assets/entry-legacy.7f16caac.js +1 -0
- package/dist/assets/entry-legacy.8df6d0e2.js +1 -0
- package/dist/assets/entry-legacy.9c292a2e.js +1 -0
- package/dist/assets/entry-legacy.c2bb158f.js +1 -0
- package/dist/assets/entry-legacy.c93f93c0.js +1 -0
- package/dist/assets/entry-legacy.cc0709cb.js +1 -0
- package/dist/assets/entry-legacy.cd069a40.js +1 -0
- package/dist/assets/entry-legacy.cdc0c87c.js +1 -0
- package/dist/assets/entry-legacy.d65c09d6.js +1 -0
- package/dist/assets/entry-legacy.faa972f5.js +1 -0
- package/dist/assets/{helper-5404c336.js → helper-18247784.js} +1 -1
- package/dist/assets/{helper-0bfe9aea.js → helper-699382d8.js} +1 -1
- package/dist/assets/{helper-legacy.e45b04db.js → helper-legacy.91469451.js} +1 -1
- package/dist/assets/{helper-legacy.5690434a.js → helper-legacy.fbbd18fe.js} +1 -1
- package/dist/assets/{hls-9e0679fb.js → hls-bddce1bf.js} +1 -1
- package/dist/assets/{hls-legacy.21c5e3a3.js → hls-legacy.4d1b84ea.js} +1 -1
- package/dist/assets/html-13d85ff2.js +1 -0
- package/dist/assets/{html-legacy.11c48957.js → html-legacy.f5fc062e.js} +1 -1
- package/dist/assets/{image-f1fa4d95.js → image-28b6515c.js} +1 -1
- package/dist/assets/{image-legacy.e505d723.js → image-legacy.e92b8aa4.js} +1 -1
- package/dist/assets/{index-4acf76ed.js → index-06a2e1d1.js} +1 -1
- package/dist/assets/{index-901660e1.js → index-0ac33e44.js} +43 -43
- package/dist/assets/{index-a86d482d.js → index-0fbb7175.js} +1 -1
- package/dist/assets/{index-64d885aa.js → index-22c5d5df.js} +1 -1
- package/dist/assets/{index-5c69ade1.js → index-2a7c71fa.js} +1 -1
- package/dist/assets/{index-e16afa82.js → index-62f37b04.js} +1 -1
- package/dist/assets/{index-ba477707.js → index-904bdd79.js} +1 -1
- package/dist/assets/{index-3b1eca38.js → index-d1b62002.js} +3 -3
- package/dist/assets/{index-2101fc52.js → index-fc7cec23.js} +1 -1
- package/dist/assets/{index-legacy.82dff40f.js → index-legacy.03386895.js} +1 -1
- package/dist/assets/{index-legacy.18b68c8f.js → index-legacy.143be82f.js} +1 -1
- package/dist/assets/{index-legacy.c85de8a8.js → index-legacy.2a3d5492.js} +1 -1
- package/dist/assets/{index-legacy.9524cbd7.js → index-legacy.2ff748cd.js} +3 -3
- package/dist/assets/{index-legacy.bf8649f2.js → index-legacy.854fefde.js} +1 -1
- package/dist/assets/{index-legacy.565bc8c2.js → index-legacy.b4a7f69e.js} +1 -1
- package/dist/assets/{index-legacy.2c47035c.js → index-legacy.bf3a5b10.js} +1 -1
- package/dist/assets/{index-legacy.7de89ac7.js → index-legacy.eace8bff.js} +3 -3
- package/dist/assets/{index-legacy.b6a8a799.js → index-legacy.f9a28a3c.js} +1 -1
- package/dist/assets/{indexes-e3be59a5.js → indexes-3cfa432d.js} +2 -2
- package/dist/assets/{indexes-legacy.72d2b378.js → indexes-legacy.8515e724.js} +1 -1
- package/dist/assets/{ipa-c742a713.js → ipa-3f466a03.js} +1 -1
- package/dist/assets/{ipa-legacy.e340c0bf.js → ipa-legacy.16744579.js} +1 -1
- package/dist/assets/{management-cc3fcc2c.js → management-b892a416.js} +1 -1
- package/dist/assets/{management-legacy.69f59048.js → management-legacy.f1e9aecd.js} +1 -1
- package/dist/assets/{markdown-dcd76f05.js → markdown-92c0c4f2.js} +1 -1
- package/dist/assets/{markdown-legacy.f9c72cca.js → markdown-legacy.04b5a6ef.js} +1 -1
- package/dist/assets/markdown_with_word_wrap-bfe8724f.js +1 -0
- package/dist/assets/{markdown_with_word_wrap-legacy.06f4999e.js → markdown_with_word_wrap-legacy.d3e14b82.js} +1 -1
- package/dist/assets/mySession-7d61c8ce.js +1 -0
- package/dist/assets/{mySession-legacy.0e826afc.js → mySession-legacy.abcecfb8.js} +1 -1
- package/dist/assets/{offline_download-db12c750.js → offline_download-551ee1f9.js} +1 -1
- package/dist/assets/{offline_download-legacy.10a2fd58.js → offline_download-legacy.92950672.js} +1 -1
- package/dist/assets/{plist-5251b23c.js → plist-1c039eca.js} +1 -1
- package/dist/assets/{plist-legacy.2cdcadc2.js → plist-legacy.ee94fbae.js} +1 -1
- package/dist/assets/{polyfills-legacy.a939e489.js → polyfills-legacy.4a227757.js} +1 -1
- package/dist/assets/{style-a3a6e7df.js → style-f5d5f2e6.js} +1 -1
- package/dist/assets/{style-legacy.707b7c63.js → style-legacy.070d5172.js} +1 -1
- package/dist/assets/{text-editor-4d5d662d.js → text-editor-42221068.js} +1 -1
- package/dist/assets/{text-editor-legacy.499134a2.js → text-editor-legacy.bd233d8f.js} +1 -1
- package/dist/assets/url-c75f0407.js +1 -0
- package/dist/assets/url-legacy.6a4f78af.js +1 -0
- package/dist/assets/{useTitle-515e3802.js → useTitle-98cd4016.js} +1 -1
- package/dist/assets/{useTitle-legacy.f53151a3.js → useTitle-legacy.80f4343f.js} +1 -1
- package/dist/assets/{video-9972d0a6.js → video-84ddfc5a.js} +1 -1
- package/dist/assets/{video-legacy.ac450ba3.js → video-legacy.08f07630.js} +1 -1
- package/dist/assets/{video360-586aec37.js → video360-2b96e18e.js} +1 -1
- package/dist/assets/{video360-legacy.67295403.js → video360-legacy.185dac77.js} +1 -1
- package/dist/assets/{video_box-ff9d5550.js → video_box-fa1e5e08.js} +1 -1
- package/dist/assets/{video_box-legacy.b87e2f03.js → video_box-legacy.b500b361.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/Common-4f423de7.js +0 -1
- package/dist/assets/DeletePopover-832ac966.js +0 -1
- package/dist/assets/DeletePopover-legacy.7e293f65.js +0 -1
- package/dist/assets/Folder-legacy.96f8d181.js +0 -29
- package/dist/assets/Grid-a891ce83.js +0 -1
- package/dist/assets/Layout-legacy.d9f69fa2.js +0 -1
- package/dist/assets/Metas-0f4e66ac.js +0 -1
- package/dist/assets/Paginator-legacy.97dc251e.js +0 -1
- package/dist/assets/ResponsiveGrid-b85a35ec.js +0 -1
- package/dist/assets/Upload-08127fb4.js +0 -1
- package/dist/assets/entry-0dfd7613.js +0 -5
- package/dist/assets/entry-2f00f0d3.js +0 -5
- package/dist/assets/entry-30c2fff7.js +0 -5
- package/dist/assets/entry-5a285ba0.js +0 -9
- package/dist/assets/entry-704bc0bb.js +0 -5
- package/dist/assets/entry-74912352.js +0 -5
- package/dist/assets/entry-96aa03fa.js +0 -5
- package/dist/assets/entry-96b90ef3.js +0 -6
- package/dist/assets/entry-c18ab04f.js +0 -8
- package/dist/assets/entry-f4b3ec7d.js +0 -5
- package/dist/assets/entry-legacy.316d59d7.js +0 -1
- package/dist/assets/entry-legacy.51aeae06.js +0 -1
- package/dist/assets/entry-legacy.6b206c19.js +0 -1
- package/dist/assets/entry-legacy.7f24b1a8.js +0 -1
- package/dist/assets/entry-legacy.83883032.js +0 -1
- package/dist/assets/entry-legacy.ac7fc7db.js +0 -1
- package/dist/assets/entry-legacy.b0173216.js +0 -1
- package/dist/assets/entry-legacy.d9d384d6.js +0 -1
- package/dist/assets/entry-legacy.ddc1c78f.js +0 -1
- package/dist/assets/entry-legacy.f5301e0c.js +0 -1
- package/dist/assets/html-305de758.js +0 -1
- package/dist/assets/markdown_with_word_wrap-9b5c6009.js +0 -1
- package/dist/assets/mySession-9ff4f61b.js +0 -1
- package/dist/assets/url-01cb764f.js +0 -1
- package/dist/assets/url-legacy.aa83e139.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as v,be as c,bv as u,b as w,B as i,x as t,S as x,ai as S,c2 as g,aM as C,am as _,ah as $,aC as k,L as I,Q as L,ap as M,ay as d,n as T,bw as D,bh as F,
|
|
1
|
+
import{d as v,be as c,bv as u,b as w,B as i,x as t,S as x,ai as S,c2 as g,aM as C,am as _,ah as $,aC as k,L as I,Q as L,ap as M,ay as d,n as T,bw as D,bh as F,dx as R}from"./index-0ac33e44.js";const A=()=>{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();D(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();F(e,()=>{R({...d(),otp:!0}),n()})};return t(M,{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(I,{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(L,{get loading(){return m()},onClick:o,get children(){return a("users.verify")}})]}})}})}})};export{A 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.7de89ac7.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.be,c=t.bv,f=t.b,l=t.B,s=t.x,h=t.S,p=t.ai,y=t.c2,v=t.aM,d=t.am,g=t.ah,m=t.aC,b=t.L,w=t.Q,x=t.ap,O=t.ay,L=t.n,j=t.bw,E=t.bh,S=t.dv}],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],I=A[1],N=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,I);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];N();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),C=$[0],q=$[1],M=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&&M()}}),s(w,{get loading(){return C()},onClick:M,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.eace8bff.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.be,c=t.bv,f=t.b,l=t.B,s=t.x,h=t.S,p=t.ai,y=t.c2,v=t.aM,d=t.am,g=t.ah,m=t.aC,b=t.L,w=t.Q,x=t.ap,O=t.ay,L=t.n,j=t.bw,E=t.bh,S=t.dx}],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],I=A[1],N=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,I);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];N();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),C=$[0],q=$[1],M=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&&M()}}),s(w,{get loading(){return C()},onClick:M,get children(){return k("users.verify")}})]}})}})}})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,al as n,x as e,aq as r,ap as s}from"./index-
|
|
1
|
+
import{b as t,al as n,x as e,aq as r,ap as s}from"./index-0ac33e44.js";import{b as o}from"./useTitle-98cd4016.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[a]=n(i);return e(s,{get loading(){return a.loading},get children(){return e(r,{get children(){return a()}})}})};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 p?r:p,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 p(){}function y(){}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=p.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 y.prototype=v,f(w,"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(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 p?r:p,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 p(){}function y(){}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=p.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 y.prototype=v,f(w,"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(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.eace8bff.js","./useTitle-legacy.80f4343f.js"],(function(t,e){"use strict";var i,a,u,c,f,l;return{setters:[function(t){i=t.b,a=t.al,u=t.x,c=t.aq,f=t.ap},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
|
|
1
|
+
import{b as y,B as l,H as F,dM as M,bw as B,x as e,M as T,I as k,bz as H,J as I,am as L,K as R,ai as C,bW as c,bJ as u,L as $,N as z,av as p,ao as A,cF as D,c2 as N,W as q,ah as w,aZ as E,O as J,Q as v,R as W,dN as h,dO as j,dP as K,aO as P}from"./index-0ac33e44.js";const m=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"],V=n=>{const t=y(),[r,i]=l(""),[o,s]=l(""),[S,b]=l(!1),[d,g]=l(m[0]),[x,f]=l([]);F(()=>{n.editingLabel?(i(n.editingLabel.name),s(n.editingLabel.description||""),g(n.editingLabel.bg_color),M(n.editingLabel.id).then(a=>{B(a,_=>{f(_||[])})})):(i(""),s(""),g(m[0]),f([]))});const O=async()=>{if(!r()){h.show({title:t("home.tag.name"),description:t("home.tag.name_required"),status:"warning"});return}try{b(!0),n.editingLabel?await j(n.editingLabel.id,r(),o(),d()):await K(r(),o(),d()),n.onSubmit(r(),o(),d()),i(""),s(""),n.onClose(),P.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{b(!1)}};return e(W,{get opened(){return n.isOpen},get onClose(){return n.onClose},get children(){return[e(T,{}),e(k,{get children(){return[e(H,{}),e(I,{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(z,{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(A,{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(D,{}),e(c,{get children(){return[e(N,{mb:"$4",get children(){return t("home.tag.related_files")}}),e(C,{spacing:"$2",alignItems:"stretch",get children(){return e(q,{get each(){return x()},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(J,{get children(){return[e(v,{colorScheme:"primary",get onClick(){return n.onClose},mr:"$2",get children(){return t("global.cancel")}}),e(v,{onClick:O,get loading(){return S()},get children(){return t("global.confirm")}})]}})]}})]}})};export{V 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.7de89ac7.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,N,A,G,P;return{setters:[function(t){i=t.b,a=t.B,c=t.H,u=t.dK,l=t.bw,s=t.x,f=t.M,h=t.I,d=t.bz,g=t.J,p=t.am,y=t.K,m=t.ai,v=t.bW,b=t.bJ,w=t.L,x=t.N,L=t.av,_=t.ao,E=t.cF,S=t.c2,O=t.W,$=t.ah,j=t.aZ,k=t.O,C=t.Q,I=t.R,N=t.dL,A=t.dM,G=t.dN,P=t.aO}],execute:function(){var o=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"];t("default",(function(t){var T=i(),F=n(a(""),2),z=F[0],M=F[1],q=n(a(""),2),J=q[0],K=q[1],W=n(a(!1),2),Y=W[0],B=W[1],H=n(a(o[0]),2),Q=H[0],R=H[1],U=n(a([]),2),Z=U[0],D=U[1];c((function(){t.editingLabel?(M(t.editingLabel.name),K(t.editingLabel.description||""),R(t.editingLabel.bg_color),u(t.editingLabel.id).then((function(t){l(t,(function(t){D(t||[])}))}))):(M(""),K(""),R(o[0]),D([]))}));var V=function(){var n,o=(n=e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z()){e.next=3;break}return N.show({title:T("home.tag.name"),description:T("home.tag.name_required"),status:"warning"}),e.abrupt("return");case 3:if(e.prev=3,B(!0),!t.editingLabel){e.next=10;break}return e.next=8,A(t.editingLabel.id,z(),J(),Q());case 8:e.next=12;break;case 10:return e.next=12,G(z(),J(),Q());case 12:t.onSubmit(z(),J(),Q()),M(""),K(""),t.onClose(),P.emit("refresh_labels"),N.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),N.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,B(!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 z()},maxLength:10,onInput:function(t){return M(t.currentTarget.value)}}),s(x,{pl:"$1",get children(){return[p((function(){return z().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 J()},onChange:function(t){return K(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:V,get loading(){return Y()},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.eace8bff.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,N,A,P,G;return{setters:[function(t){i=t.b,a=t.B,c=t.H,u=t.dM,l=t.bw,s=t.x,f=t.M,h=t.I,d=t.bz,g=t.J,p=t.am,y=t.K,m=t.ai,v=t.bW,b=t.bJ,w=t.L,x=t.N,L=t.av,_=t.ao,E=t.cF,S=t.c2,O=t.W,$=t.ah,j=t.aZ,k=t.O,C=t.Q,I=t.R,N=t.dN,A=t.dO,P=t.dP,G=t.aO}],execute:function(){var o=["#ff776e","#feb34a","#62e56f","#4e9cff","#d17bff"];t("default",(function(t){var T=i(),F=n(a(""),2),z=F[0],M=F[1],q=n(a(""),2),J=q[0],W=q[1],Y=n(a(!1),2),B=Y[0],H=Y[1],K=n(a(o[0]),2),Q=K[0],R=K[1],U=n(a([]),2),Z=U[0],D=U[1];c((function(){t.editingLabel?(M(t.editingLabel.name),W(t.editingLabel.description||""),R(t.editingLabel.bg_color),u(t.editingLabel.id).then((function(t){l(t,(function(t){D(t||[])}))}))):(M(""),W(""),R(o[0]),D([]))}));var V=function(){var n,o=(n=e().mark((function r(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(z()){e.next=3;break}return N.show({title:T("home.tag.name"),description:T("home.tag.name_required"),status:"warning"}),e.abrupt("return");case 3:if(e.prev=3,H(!0),!t.editingLabel){e.next=10;break}return e.next=8,A(t.editingLabel.id,z(),J(),Q());case 8:e.next=12;break;case 10:return e.next=12,P(z(),J(),Q());case 12:t.onSubmit(z(),J(),Q()),M(""),W(""),t.onClose(),G.emit("refresh_labels"),N.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),N.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,H(!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 z()},maxLength:10,onInput:function(t){return M(t.currentTarget.value)}}),s(x,{pl:"$1",get children(){return[p((function(){return z().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 J()},onChange:function(t){return W(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:V,get loading(){return B()},get children(){return T("global.confirm")}})]}})]}})]}})}))}}}))}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a$ as ae,b as le,B as y,H as Y,x as e,L as Z,ao as M,S as _,ah as T,W as z,dp as L,dq as A,aZ as pe,ai as q,am as J,M as ie,I as ce,bz as Se,J as ue,av as Q,K as de,O as ge,Q as R,R as he,dS as be,dO as we,dP as $e,A as re,be as G,ed as N,_ as ee,dQ as Ce,D as Pe,bg as fe,dR as ke,aC as X,aP as se,$ as _e,i as ye,bw as te,d as ve,cW as xe,ec as je,q as Oe,aY as W,ee as Ie,ef as Fe,c2 as Re,ap as Me,bW as E,bJ as H,bL as De,bM as Te,bN as ze,dr as Be,bQ as We,bR as Ee,bS as He,bT as Le,n as oe,j as Ae,bv as qe}from"./index-901660e1.js";import{r as Je,l as Qe}from"./index-4acf76ed.js";const Ue=(t,m,l)=>{const h=t.join("/");if(console.log("计算节点状态:",{当前路径:h,选中路径:m,子节点:l}),m.some(a=>{const w=a.join("/")===h;return w&&console.log("节点直接选中:",h),w}))return{checked:!0,indeterminate:!1};if(!(l!=null&&l.length))return m.some($=>$.join("/").startsWith(h+"/"))?(console.log("是选中路径的父节点:",h),{checked:!1,indeterminate:!0}):{checked:!1,indeterminate:!1};let s=0,f=!1;return l.forEach(a=>{const w=[...t,a.name].join("/"),i=m.some(n=>n.join("/")===w),r=m.some(n=>n.join("/").startsWith(w+"/"));i?s++:r&&(f=!0)}),console.log("子节点状态:",{路径:h,选中数:s,总数:l.length,有半选:f}),s===l.length?{checked:!0,indeterminate:!1}:s>0||f?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},me=t=>{const{isHidePath:m}=we(),[l,h]=y(),[d,s]=y(!1),{value:f,onChange:a,forceRoot:$,autoOpen:w,showEmptyIcon:i,showHiddenFolder:r,selectedPaths:n,onSelect:u,multiSelect:C}=$e(ne),S=re(()=>{if(!n||!n())return{checked:!1,indeterminate:!1};const c=Ue(t.segments,n(),l());return console.log("节点状态计算:",{path:t.segments.join("/"),state:c,selectedPaths:n(),children:l()}),c});re(()=>{if(!n||!n())return!1;const c=n(),b=t.segments.join("/"),I=c.some(k=>{const D=k.join("/");return b===""?k.length===1:D.startsWith(b+"/")&&D.split("/").length===b.split("/").length+1}),O=c.some(k=>k.join("/").startsWith(b+"/"));return console.log("检查选中子节点:",{当前路径:b,有直接子节点:I,有深层子节点:O,选中路径:c}),I||O});const v=async(c,b)=>{if(c.stopPropagation(),C&&u){const I=!S().checked;let O=[];if(l())O=l().map(k=>[...b,k.name]);else try{const k=await N("/"+b.join("/"),ee(),!0);k.code===200&&(O=k.data.map(D=>[...b,D.name]))}catch(k){console.error("获取子节点失败:",k)}u(b,I,O)}else a("/"+b.join("/"))},U=()=>{var c;return!!(i&&l()!==void 0&&!((c=l())!=null&&c.length))},[V,K]=G(()=>N(t.segments.join("/"),ee(),$)),x=async()=>{var b,I;if((b=l())!=null&&b.length)return;const c=await K();if(c.code===500&&((I=c.message)!=null&&I.includes("storage not found; please add a storage first"))){h([]);return}te(c,O=>{h(O)},()=>{j()&&o()})},{isOpen:j,onToggle:o}=ae(),g=()=>f()===t.segments.join("/"),p=Ce(t.segments.join("/")),P=c=>{c.stopPropagation(),j()?s(!0):(s(!1),x()),o()};Y(()=>{t.segments.length,n==null||n();const c=t.segments.join("/");(()=>(d(),!1))()&&!j()&&(console.log("展开节点:",c),o(),x())}),Y(Pe(f,async c=>{}));const F=()=>m(t.segments.join("/"))&&!p(f());return e(_,{get when(){return r||!F()},get children(){return e(M,{get children(){return[e(Q,{spacing:"$2",alignItems:"center",get children(){return[e(_,{when:C,get children(){return e(M,{get children(){return e(fe,{get checked(){return S().checked},get indeterminate(){return S().indeterminate}})}})}}),e(_,{get when(){return!V()},get fallback(){return e(ke,{size:"sm",get color(){return X()}})},get children(){return e(_,{get when(){return!U()},get fallback(){return e(se,{get color(){return X()},as:Je})},get children(){return e(se,{get color(){return X()},as:Qe,get transform(){return j()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:P})}})}}),e(T,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return g()?"$info8":"transparent"},get _hover(){return{backgroundColor:g()?"$info8":_e()}},onClick:c=>{c.stopPropagation(),v(c,t.segments)},get children(){return J(()=>t.segments.join("/")==="",!0)()?"root":ye(t.segments.join("/"))}})]}}),e(_,{get when(){return j()},get children(){return e(q,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return e(z,{get each(){return l()},children:c=>e(me,{get segments(){return[...t.segments,c.name]}})})}})}})]}})}})},ne=be(),Ve=t=>{var d;const[m,l]=y("/");(d=t.handle)==null||d.call(t,{setPath:l});const h=t.selectedPaths;return e(M,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return e(ne.Provider,{get value(){return{value:m,onChange:s=>{l(s),t.onChange(s)},autoOpen:t.autoOpen??!1,forceRoot:t.forceRoot??!1,showEmptyIcon:t.showEmptyIcon??!1,showHiddenFolder:t.showHiddenFolder??!0,multiSelect:t.multiSelect,selectedPaths:h,onSelect:t.onSelect}},get children(){return e(me,{segments:[]})}})}})},Ke=t=>{const{isOpen:m,onOpen:l,onClose:h}=ae(),d=le(),[s,f]=y(t.value.map(i=>i.split("/").filter(Boolean))),[a,$]=y(t.value.map(i=>i.split("/").filter(Boolean)));Y(()=>{if(t.value){const i=t.value.map(r=>r.split("/").filter(Boolean));f(i),$(i)}});const w=async(i,r,n)=>{console.log("选择处理开始:",{segments:i,checked:r,childPaths:n,当前选中:s(),当前显示:a()});let u=[...s()];const C=i.join("/");r?i.length===0?u=[[]]:(u.some(S=>S.join("/")===C)||u.push(i),n&&n.forEach(S=>{u.some(v=>v.join("/")===S.join("/"))||u.push(S)})):i.length===0?u=[]:u=u.filter(S=>{const v=S.join("/");return v!==C&&!v.startsWith(C+"/")}),f(u),$(u),t.onChange(u.map(S=>S.length===0?"/":"/"+S.join("/")))};return[e(M,{w:"$full",position:"relative",get children(){return[e(Z,{get id(){return t.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),e(M,{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:l,zIndex:1,get children(){return e(_,{get when(){return a().length>0},get fallback(){return e(T,{color:"$neutral10",get children(){return d("global.choose_folder")}})},get children(){return[e(z,{get each(){return a().slice(0,3)},children:i=>{const r="/"+i.join("/");return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:r,get children(){return e(A,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r})}})}}),e(_,{get when(){return a().length>3},get children(){return e(pe,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return e(q,{alignItems:"flex-start",spacing:"$1",get children(){return e(z,{get each(){return a().slice(3)},children:i=>e(T,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+i.join("/")}})})}})},get children(){return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(A,{get children(){return["+",J(()=>a().length-3)]}})}})}})}})]}})}})]}}),e(he,{size:"xl",get opened(){return m()},onClose:h,get children(){return[e(ie,{}),e(ce,{get children(){return[e(Se,{}),e(ue,{get children(){return e(Q,{spacing:"$2",alignItems:"center",get children(){return[e(T,{fontWeight:"bold",get children(){return d("global.choose_folder")}}),e(T,{fontSize:"$sm",get children(){return["(",J(()=>d("global.please_click_to_select")),")"]}})]}})}}),e(de,{get children(){return e(ne.Provider,{get value(){return{value:()=>"/",onChange:i=>{},forceRoot:!0,autoOpen:t.autoOpen??!1,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:a,onSelect:w,multiSelect:t.multiSelect}},get children(){return e(Ve,{forceRoot:!0,onChange:i=>{},get multiSelect(){return t.multiSelect},selectedPaths:a,onSelect:w,get autoOpen(){return t.autoOpen}})}})}}),e(ge,{get children(){return[e(R,{colorScheme:"neutral",onClick:h,mr:"$2",get children(){return d("global.cancel")}}),e(R,{onClick:h,get children(){return d("global.confirm")}})]}})]}})]}})]},Xe=async t=>{const m=new Map,l=async r=>{try{const n=await N(r,ee(),!0);if(n.code===200)return n.data.map(C=>Ae(r,C.name))}catch(n){console.error(`获取目录 [${r}] 内容失败:`,n)}return[]},h=r=>{if(r==="/"||!r.includes("/"))return"";const n=r.lastIndexOf("/");return n===0?"/":r.substring(0,n)},d=new Set;t.forEach(r=>d.add(r)),t.forEach(r=>{let n=h(r);for(;n!=="";)d.add(n),n=h(n)});for(const r of d)if(!m.has(r)){const n=await l(r);m.set(r,n)}const s=(r,n)=>n==="/"?r!=="/":r.startsWith(n+"/"),f=(r,n)=>{const u=m.get(r)||[];return u.length===0?!1:u.every(C=>n.has(C)||f(C,n))},a=new Set,$=new Set(t),w=[...t].sort((r,n)=>r.length-n.length);for(const r of w){let n=!1;for(const u of a)if(r!==u&&s(r,u)){n=!0;break}n||(f(r,$),a.add(r))}return a.size===0&&t.length>0&&a.add(t[0]),Array.from(a)},Ge=()=>{const t=le(),{params:m,back:l,to:h}=ve(),{id:d}=m,[s,f]=xe({name:"",description:"",permission_scopes:[],base_path:[]});y([]);const[a,$]=y(0),[w,i]=y(!1),[r,n]=y(!1),u=async()=>{var o;try{const g=await qe.get("/fs/list");return g.code===500&&((o=g.message)!=null&&o.includes("please add a storage first"))?(n(!0),!1):!0}catch(g){return console.error("Failed to check storage:",g),!1}},[C,S]=G(()=>je(parseInt(d))),v=async()=>{const o=await u();if(i(o),!!o&&d){const g=await S();te(g,p=>{var P,B;f({name:p.name||"",description:p.description||"",permission_scopes:p.permission_scopes||[],base_path:(P=p.permission_scopes)!=null&&P.length?p.permission_scopes.map(F=>F.path):[]}),((B=p.permission_scopes)==null?void 0:B.length)>0&&$(p.permission_scopes[0].permission)})}};Oe(()=>{v()});const U=()=>s.base_path.length===0||s.name.length===0?(oe.error(t("users.base_path")+" "+t("global.required")),!1):!0,[V,K]=G(async()=>{const o=W.reduce((P,B,F)=>(a()>>F&1)===1?P|1<<F:P,0),g=await Xe(s.base_path),p={name:s.name,description:s.description,permission_scopes:g.map(P=>({path:P,permission:o}))};return d?Ie({...p,id:parseInt(d)}):Fe(p)}),x=()=>W.filter((o,g)=>(a()>>g&1)===1),j=o=>{const g=1<<o,p=a()^g;$(p),s.base_path&&(p>>o&1?f("permission_scopes",[...s.permission_scopes,{permission:g,path:s.base_path[0]}]):f("permission_scopes",s.permission_scopes.filter(P=>P.permission!==g||P.path!==s.base_path[0])))};return e(q,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(Re,{get children(){return t(d?"global.edit":"global.add")}}),e(Me,{get loading(){return C()},get children(){return e(_,{get when(){return w()},get children(){return e(q,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(E,{required:!0,get children(){return[e(H,{get children(){return t("permissions.role.role_name")}}),e(Z,{get value(){return s.name},onInput:o=>f("name",o.currentTarget.value)})]}}),e(E,{get children(){return[e(H,{get children(){return t("permissions.role.role_description")}}),e(Z,{get value(){return s.description},onInput:o=>f("description",o.currentTarget.value)})]}}),e(E,{required:!0,get children(){return[e(H,{get children(){return t("users.base_path")}}),e(Ke,{id:"base_path",get value(){return s.base_path},onChange:o=>{f("base_path",o)},multiSelect:!0,autoOpen:!!d})]}}),e(E,{get children(){return[e(H,{get children(){return t("permissions.config.permissions_permissions")}}),e(De,{multiple:!0,get value(){return x()},get children(){return[e(Te,{get children(){return e(M,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(_,{get when(){return x().length>0},get fallback(){return e(ze,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[e(z,{get each(){return x().slice(0,3)},children:(o,g)=>e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(A,{get children(){return t(`users.permissions.${o}`)}}),e(Be,{onClick:p=>{p.stopPropagation(),j(W.indexOf(o))}})]}})}),e(_,{get when(){return x().length>3},get children(){return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(A,{get children(){return["+",J(()=>x().length-3)]}})}})}})]}})}})}}),e(We,{get children(){return e(Ee,{get children(){return e(z,{each:W,children:(o,g)=>e(He,{value:o,onClick:()=>j(g()),get children(){return e(Q,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(fe,{get checked(){return(a()>>g()&1)===1},readOnly:!0}),e(Le,{get children(){return t(`users.permissions.${o}`)}})]}})}})})}})}})]}})]}}),e(Q,{spacing:"$2",get children(){return[e(R,{get loading(){return V()},onClick:async()=>{if(!U())return;const o=await K();te(o,()=>{oe.success(t("global.save_success")),l()})},get children(){return t("global.save")}}),e(R,{colorScheme:"accent",onClick:()=>l(),get children(){return t("global.back")}})]}})]}})}})}}),e(he,{get opened(){return r()},onClose:()=>n(!1),get children(){return[e(ie,{}),e(ce,{get children(){return[e(ue,{}),e(de,{get children(){return t("storages.no_storage_content")}}),e(ge,{get children(){return[e(R,{colorScheme:"accent",onClick:()=>n(!1),get children(){return t("global.cancel")}}),e(R,{onClick:()=>{n(!1),h("/@manage/storages")},ml:"$2",get children(){return t("home.go_to_storages")}})]}})]}})]}})]}})};export{Ge as default};
|
|
1
|
+
import{a$ as ae,b as le,B as y,H as Y,x as e,L as Z,ao as M,S as _,ah as T,W as z,dr as L,ds as A,aZ as pe,ai as q,am as J,M as ie,I as ce,bz as Se,J as ue,av as Q,K as de,O as ge,Q as R,R as he,dU as be,dQ as we,dR as $e,A as re,be as G,ef as N,_ as ee,dS as Ce,D as Pe,bg as fe,dT as ke,aC as X,aP as se,$ as _e,i as ye,bw as te,d as ve,cW as xe,ee as je,q as Oe,aY as W,eg as Ie,eh as Fe,c2 as Re,ap as Me,bW as E,bJ as H,bL as De,bM as Te,bN as ze,dt as Be,bQ as We,bR as Ee,bS as He,bT as Le,n as oe,j as Ae,bv as qe}from"./index-0ac33e44.js";import{s as Je,l as Qe}from"./index-06a2e1d1.js";const Ue=(t,m,l)=>{const h=t.join("/");if(console.log("计算节点状态:",{当前路径:h,选中路径:m,子节点:l}),m.some(a=>{const w=a.join("/")===h;return w&&console.log("节点直接选中:",h),w}))return{checked:!0,indeterminate:!1};if(!(l!=null&&l.length))return m.some($=>$.join("/").startsWith(h+"/"))?(console.log("是选中路径的父节点:",h),{checked:!1,indeterminate:!0}):{checked:!1,indeterminate:!1};let s=0,f=!1;return l.forEach(a=>{const w=[...t,a.name].join("/"),i=m.some(n=>n.join("/")===w),r=m.some(n=>n.join("/").startsWith(w+"/"));i?s++:r&&(f=!0)}),console.log("子节点状态:",{路径:h,选中数:s,总数:l.length,有半选:f}),s===l.length?{checked:!0,indeterminate:!1}:s>0||f?{checked:!1,indeterminate:!0}:{checked:!1,indeterminate:!1}},me=t=>{const{isHidePath:m}=we(),[l,h]=y(),[d,s]=y(!1),{value:f,onChange:a,forceRoot:$,autoOpen:w,showEmptyIcon:i,showHiddenFolder:r,selectedPaths:n,onSelect:u,multiSelect:C}=$e(ne),S=re(()=>{if(!n||!n())return{checked:!1,indeterminate:!1};const c=Ue(t.segments,n(),l());return console.log("节点状态计算:",{path:t.segments.join("/"),state:c,selectedPaths:n(),children:l()}),c});re(()=>{if(!n||!n())return!1;const c=n(),b=t.segments.join("/"),I=c.some(k=>{const D=k.join("/");return b===""?k.length===1:D.startsWith(b+"/")&&D.split("/").length===b.split("/").length+1}),O=c.some(k=>k.join("/").startsWith(b+"/"));return console.log("检查选中子节点:",{当前路径:b,有直接子节点:I,有深层子节点:O,选中路径:c}),I||O});const v=async(c,b)=>{if(c.stopPropagation(),C&&u){const I=!S().checked;let O=[];if(l())O=l().map(k=>[...b,k.name]);else try{const k=await N("/"+b.join("/"),ee(),!0);k.code===200&&(O=k.data.map(D=>[...b,D.name]))}catch(k){console.error("获取子节点失败:",k)}u(b,I,O)}else a("/"+b.join("/"))},U=()=>{var c;return!!(i&&l()!==void 0&&!((c=l())!=null&&c.length))},[V,K]=G(()=>N(t.segments.join("/"),ee(),$)),x=async()=>{var b,I;if((b=l())!=null&&b.length)return;const c=await K();if(c.code===500&&((I=c.message)!=null&&I.includes("storage not found; please add a storage first"))){h([]);return}te(c,O=>{h(O)},()=>{j()&&o()})},{isOpen:j,onToggle:o}=ae(),g=()=>f()===t.segments.join("/"),p=Ce(t.segments.join("/")),P=c=>{c.stopPropagation(),j()?s(!0):(s(!1),x()),o()};Y(()=>{t.segments.length,n==null||n();const c=t.segments.join("/");(()=>(d(),!1))()&&!j()&&(console.log("展开节点:",c),o(),x())}),Y(Pe(f,async c=>{}));const F=()=>m(t.segments.join("/"))&&!p(f());return e(_,{get when(){return r||!F()},get children(){return e(M,{get children(){return[e(Q,{spacing:"$2",alignItems:"center",get children(){return[e(_,{when:C,get children(){return e(M,{get children(){return e(fe,{get checked(){return S().checked},get indeterminate(){return S().indeterminate}})}})}}),e(_,{get when(){return!V()},get fallback(){return e(ke,{size:"sm",get color(){return X()}})},get children(){return e(_,{get when(){return!U()},get fallback(){return e(se,{get color(){return X()},as:Je})},get children(){return e(se,{get color(){return X()},as:Qe,get transform(){return j()?"rotate(90deg)":"none"},transition:"transform 0.2s",cursor:"pointer",onClick:P})}})}}),e(T,{css:{whiteSpace:"nowrap"},fontSize:"$md",cursor:"pointer",px:"$1",rounded:"$md",get bgColor(){return g()?"$info8":"transparent"},get _hover(){return{backgroundColor:g()?"$info8":_e()}},onClick:c=>{c.stopPropagation(),v(c,t.segments)},get children(){return J(()=>t.segments.join("/")==="",!0)()?"root":ye(t.segments.join("/"))}})]}}),e(_,{get when(){return j()},get children(){return e(q,{mt:"$1",pl:"$4",alignItems:"start",spacing:"$1",get children(){return e(z,{get each(){return l()},children:c=>e(me,{get segments(){return[...t.segments,c.name]}})})}})}})]}})}})},ne=be(),Ve=t=>{var d;const[m,l]=y("/");(d=t.handle)==null||d.call(t,{setPath:l});const h=t.selectedPaths;return e(M,{class:"folder-tree-box",w:"$full",overflowX:"auto",get children(){return e(ne.Provider,{get value(){return{value:m,onChange:s=>{l(s),t.onChange(s)},autoOpen:t.autoOpen??!1,forceRoot:t.forceRoot??!1,showEmptyIcon:t.showEmptyIcon??!1,showHiddenFolder:t.showHiddenFolder??!0,multiSelect:t.multiSelect,selectedPaths:h,onSelect:t.onSelect}},get children(){return e(me,{segments:[]})}})}})},Ke=t=>{const{isOpen:m,onOpen:l,onClose:h}=ae(),d=le(),[s,f]=y(t.value.map(i=>i.split("/").filter(Boolean))),[a,$]=y(t.value.map(i=>i.split("/").filter(Boolean)));Y(()=>{if(t.value){const i=t.value.map(r=>r.split("/").filter(Boolean));f(i),$(i)}});const w=async(i,r,n)=>{console.log("选择处理开始:",{segments:i,checked:r,childPaths:n,当前选中:s(),当前显示:a()});let u=[...s()];const C=i.join("/");r?i.length===0?u=[[]]:(u.some(S=>S.join("/")===C)||u.push(i),n&&n.forEach(S=>{u.some(v=>v.join("/")===S.join("/"))||u.push(S)})):i.length===0?u=[]:u=u.filter(S=>{const v=S.join("/");return v!==C&&!v.startsWith(C+"/")}),f(u),$(u),t.onChange(u.map(S=>S.length===0?"/":"/"+S.join("/")))};return[e(M,{w:"$full",position:"relative",get children(){return[e(Z,{get id(){return t.id},readOnly:!0,h:"44px",pl:"$4",pointerEvents:"none",_focus:{border:"none",boxShadow:"none"}}),e(M,{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:l,zIndex:1,get children(){return e(_,{get when(){return a().length>0},get fallback(){return e(T,{color:"$neutral10",get children(){return d("global.choose_folder")}})},get children(){return[e(z,{get each(){return a().slice(0,3)},children:i=>{const r="/"+i.join("/");return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",maxW:"300px",title:r,get children(){return e(A,{css:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r})}})}}),e(_,{get when(){return a().length>3},get children(){return e(pe,{placement:"bottom",withArrow:!0,closeDelay:0,get label(){return e(q,{alignItems:"flex-start",spacing:"$1",get children(){return e(z,{get each(){return a().slice(3)},children:i=>e(T,{fontSize:"$sm",color:"$neutral8",css:{wordBreak:"break-all"},get children(){return"/"+i.join("/")}})})}})},get children(){return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(A,{get children(){return["+",J(()=>a().length-3)]}})}})}})}})]}})}})]}}),e(he,{size:"xl",get opened(){return m()},onClose:h,get children(){return[e(ie,{}),e(ce,{get children(){return[e(Se,{}),e(ue,{get children(){return e(Q,{spacing:"$2",alignItems:"center",get children(){return[e(T,{fontWeight:"bold",get children(){return d("global.choose_folder")}}),e(T,{fontSize:"$sm",get children(){return["(",J(()=>d("global.please_click_to_select")),")"]}})]}})}}),e(de,{get children(){return e(ne.Provider,{get value(){return{value:()=>"/",onChange:i=>{},forceRoot:!0,autoOpen:t.autoOpen??!1,showEmptyIcon:!1,showHiddenFolder:!0,selectedPaths:a,onSelect:w,multiSelect:t.multiSelect}},get children(){return e(Ve,{forceRoot:!0,onChange:i=>{},get multiSelect(){return t.multiSelect},selectedPaths:a,onSelect:w,get autoOpen(){return t.autoOpen}})}})}}),e(ge,{get children(){return[e(R,{colorScheme:"neutral",onClick:h,mr:"$2",get children(){return d("global.cancel")}}),e(R,{onClick:h,get children(){return d("global.confirm")}})]}})]}})]}})]},Xe=async t=>{const m=new Map,l=async r=>{try{const n=await N(r,ee(),!0);if(n.code===200)return n.data.map(C=>Ae(r,C.name))}catch(n){console.error(`获取目录 [${r}] 内容失败:`,n)}return[]},h=r=>{if(r==="/"||!r.includes("/"))return"";const n=r.lastIndexOf("/");return n===0?"/":r.substring(0,n)},d=new Set;t.forEach(r=>d.add(r)),t.forEach(r=>{let n=h(r);for(;n!=="";)d.add(n),n=h(n)});for(const r of d)if(!m.has(r)){const n=await l(r);m.set(r,n)}const s=(r,n)=>n==="/"?r!=="/":r.startsWith(n+"/"),f=(r,n)=>{const u=m.get(r)||[];return u.length===0?!1:u.every(C=>n.has(C)||f(C,n))},a=new Set,$=new Set(t),w=[...t].sort((r,n)=>r.length-n.length);for(const r of w){let n=!1;for(const u of a)if(r!==u&&s(r,u)){n=!0;break}n||(f(r,$),a.add(r))}return a.size===0&&t.length>0&&a.add(t[0]),Array.from(a)},Ge=()=>{const t=le(),{params:m,back:l,to:h}=ve(),{id:d}=m,[s,f]=xe({name:"",description:"",permission_scopes:[],base_path:[]});y([]);const[a,$]=y(0),[w,i]=y(!1),[r,n]=y(!1),u=async()=>{var o;try{const g=await qe.get("/fs/list");return g.code===500&&((o=g.message)!=null&&o.includes("please add a storage first"))?(n(!0),!1):!0}catch(g){return console.error("Failed to check storage:",g),!1}},[C,S]=G(()=>je(parseInt(d))),v=async()=>{const o=await u();if(i(o),!!o&&d){const g=await S();te(g,p=>{var P,B;f({name:p.name||"",description:p.description||"",permission_scopes:p.permission_scopes||[],base_path:(P=p.permission_scopes)!=null&&P.length?p.permission_scopes.map(F=>F.path):[]}),((B=p.permission_scopes)==null?void 0:B.length)>0&&$(p.permission_scopes[0].permission)})}};Oe(()=>{v()});const U=()=>s.base_path.length===0||s.name.length===0?(oe.error(t("users.base_path")+" "+t("global.required")),!1):!0,[V,K]=G(async()=>{const o=W.reduce((P,B,F)=>(a()>>F&1)===1?P|1<<F:P,0),g=await Xe(s.base_path),p={name:s.name,description:s.description,permission_scopes:g.map(P=>({path:P,permission:o}))};return d?Ie({...p,id:parseInt(d)}):Fe(p)}),x=()=>W.filter((o,g)=>(a()>>g&1)===1),j=o=>{const g=1<<o,p=a()^g;$(p),s.base_path&&(p>>o&1?f("permission_scopes",[...s.permission_scopes,{permission:g,path:s.base_path[0]}]):f("permission_scopes",s.permission_scopes.filter(P=>P.permission!==g||P.path!==s.base_path[0])))};return e(q,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(Re,{get children(){return t(d?"global.edit":"global.add")}}),e(Me,{get loading(){return C()},get children(){return e(_,{get when(){return w()},get children(){return e(q,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(E,{required:!0,get children(){return[e(H,{get children(){return t("permissions.role.role_name")}}),e(Z,{get value(){return s.name},onInput:o=>f("name",o.currentTarget.value)})]}}),e(E,{get children(){return[e(H,{get children(){return t("permissions.role.role_description")}}),e(Z,{get value(){return s.description},onInput:o=>f("description",o.currentTarget.value)})]}}),e(E,{required:!0,get children(){return[e(H,{get children(){return t("users.base_path")}}),e(Ke,{id:"base_path",get value(){return s.base_path},onChange:o=>{f("base_path",o)},multiSelect:!0,autoOpen:!!d})]}}),e(E,{get children(){return[e(H,{get children(){return t("permissions.config.permissions_permissions")}}),e(De,{multiple:!0,get value(){return x()},get children(){return[e(Te,{get children(){return e(M,{display:"flex",flexWrap:"wrap",gap:"$2",pr:"$6",py:"$2",minH:"40px",alignItems:"center",get children(){return e(_,{get when(){return x().length>0},get fallback(){return e(ze,{get children(){return t("permissions.config.select_permissions")}})},get children(){return[e(z,{get each(){return x().slice(0,3)},children:(o,g)=>e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return[e(A,{get children(){return t(`users.permissions.${o}`)}}),e(Be,{onClick:p=>{p.stopPropagation(),j(W.indexOf(o))}})]}})}),e(_,{get when(){return x().length>3},get children(){return e(L,{size:"lg",variant:"subtle",bgColor:"$neutral2",rounded:"$sm",px:"$3",py:"$1",get children(){return e(A,{get children(){return["+",J(()=>x().length-3)]}})}})}})]}})}})}}),e(We,{get children(){return e(Ee,{get children(){return e(z,{each:W,children:(o,g)=>e(He,{value:o,onClick:()=>j(g()),get children(){return e(Q,{spacing:"$2",w:"$full",pl:"$4",fontSize:"$lg",get children(){return[e(fe,{get checked(){return(a()>>g()&1)===1},readOnly:!0}),e(Le,{get children(){return t(`users.permissions.${o}`)}})]}})}})})}})}})]}})]}}),e(Q,{spacing:"$2",get children(){return[e(R,{get loading(){return V()},onClick:async()=>{if(!U())return;const o=await K();te(o,()=>{oe.success(t("global.save_success")),l()})},get children(){return t("global.save")}}),e(R,{colorScheme:"accent",onClick:()=>l(),get children(){return t("global.back")}})]}})]}})}})}}),e(he,{get opened(){return r()},onClose:()=>n(!1),get children(){return[e(ie,{}),e(ce,{get children(){return[e(ue,{}),e(de,{get children(){return t("storages.no_storage_content")}}),e(ge,{get children(){return[e(R,{colorScheme:"accent",onClick:()=>n(!1),get children(){return t("global.cancel")}}),e(R,{onClick:()=>{n(!1),h("/@manage/storages")},ml:"$2",get children(){return t("home.go_to_storages")}})]}})]}})]}})]}})};export{Ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as V,d as A,B as x,cW as E,be as
|
|
1
|
+
import{b as V,d as A,B as x,cW as E,be as h,e3 as J,bv as w,x as e,c2 as j,ap as G,ai as $,S as p,bW as i,bJ as u,L as c,bL as v,bM as y,bO as K,bQ as _,bR as S,W as f,bS as I,bT as T,bU as X,ao as Y,bN as Z,dr as ee,ds as re,dt as te,av as ne,bg as k,Q as se,n as C,bw as d,ee as le}from"./index-0ac33e44.js";const ie=()=>{const n=V(),{params:L,back:R}=A(),{id:o}=L,[m,D]=x([]),[O,q]=x([]),[t,a]=E({id:0,username:"",password:"",base_path:"",role:[],permission:0,disabled:!1,sso_id:"",role_info:[],permissions:[],max_devices:void 0,session_ttl:void 0}),[F,B]=h(()=>J()),[N,P]=h(()=>w.get(`/admin/user/get?id=${o}`)),W=async()=>{const r=await B();if(d(r,s=>{D(s.content)}),o){const s=await P();d(s,l=>{a(l),z(l.role)})}else a("base_path","/")},z=async r=>{const s=new Set;s.add("/");for(const l of r){const g=await le(l);d(g,Q=>{for(const b of Q.permission_scopes||[])b.path&&s.add(b.path)})}q([...s].map(l=>l.toString()))};W();const[H,U]=h(()=>w.post(`/admin/user/${o?"update":"create"}`,t)),M=()=>!o;return e($,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(j,{get children(){return n(o?"global.edit":"global.add")}}),e(G,{get loading(){return N()||F()},get children(){return e($,{spacing:"$2",alignItems:"start",w:"$full",get children(){return[e(p,{get when(){return!o||!(t.role_info||[]).includes(1)},get children(){return[e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(u,{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(u,{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(u,{for:"base_path",display:"flex",alignItems:"center",get children(){return n("users.base_path")}}),e(v,{get value(){return t.base_path},onChange:r=>a("base_path",r),get children(){return[e(y,{get children(){return e(K,{})}}),e(_,{get children(){return e(S,{get children(){return e(f,{get each(){return O()},children:r=>e(I,{value:r,get children(){return[e(T,{children:r}),e(X,{})]}})})}})}})]}})]}})}}),e(i,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[e(u,{display:"flex",alignItems:"center",get children(){return n("users.role")}}),e(v,{get value(){return t.role},onChange:r=>a("role",r),get children(){return[e(y,{get children(){return e(Y,{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(Z,{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(k,{get checked(){return t.role.includes(r.id)},readOnly:!0}),e(T,{get children(){return r.name}})]}})}})})}})}})]}})]}}),e(i,{w:"fit-content",display:"flex",get children(){return e(k,{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(u,{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(u,{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 H()},onClick:async()=>{if(!t.role||t.role.length===0){C.error(n("users.role")+" "+n("global.required"));return}const r=await U();d(r,()=>{C.success(n("global.save_success")),R()})},get children(){return n("global.save")}})]}})}})]}})};export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as I,x as t,bJ as J,ab as M,aT as W,ac as o,L as b,bV as G,T as H,bL as
|
|
1
|
+
import{b as I,x as t,bJ as J,ab as M,aT as W,ac as o,L as b,bV as G,T as H,bL as z,bY as P,S as $,N as Q,bW as Y,d as K,be as v,bv as f,B as U,cW as x,A as X,c2 as Z,ai as p,ed as ee,dy as te,dz as ne,am as re,W as k,V as O,Q as ae,n as _,a1 as ie,bw as y,ap as de}from"./index-0ac33e44.js";import{T as d}from"./item_type-32dc6fdf.js";import{R as ue}from"./ResponsiveGrid-31af9f08.js";const w=e=>{const u=I();return t(Y,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){return[t(J,{get for(){return e.name},display:"flex",alignItems:"center",get children(){return u(e.full_name_path??e.driver==="common"?`storages.common.${e.name}`:`drivers.${e.driver}.${e.name}`)}}),t(M,{get fallback(){return t(W,{get children(){return u("settings.unknown_type")}})},get children(){return[t(o,{get when(){return e.type===d.String},get children(){return t(b,{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===d.String?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,i.currentTarget.value)}:void 0}})}}),t(o,{get when(){return e.type===d.Number},get children(){return t(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===d.Number?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,parseInt(i.currentTarget.value))}:void 0}})}}),t(o,{get when(){return e.type===d.Float},get children(){return t(b,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===d.Float?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,parseFloat(i.currentTarget.value))}:void 0}})}}),t(o,{get when(){return e.type===d.Bool},get children(){return t(G,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===d.Bool?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,i.currentTarget.checked)}:void 0}})}}),t(o,{get when(){return e.type===d.Text},get children(){return t(H,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===d.Text?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,i.currentTarget.value)}:void 0}})}}),t(o,{get when(){return e.type===d.Select},get children(){return t(z,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===d.Select?i=>{var a;return(a=e.onChange)==null?void 0:a.call(e,i)}:void 0},get children(){return t(P,{get readonly(){return e.readonly},get searchable(){return e.type===d.Select&&e.searchable},get options(){return e.options.split(",").map(i=>({key:i,label:u((e.options_prefix??(e.driver==="common"?`storages.common.${e.name}s`:`drivers.${e.driver}.${e.name}s`))+`.${i}`)}))}})}})}})]}}),t($,{get when(){return e.help},get children(){return t(Q,{get children(){return u(e.driver==="common"?`storages.common.${e.name}-tips`:`drivers.${e.driver}.${e.name}-tips`)}})}})]}})};function F(e,u){switch(e){case d.Bool:return u?u==="true":!1;case d.Number:return u?parseInt(u):0;default:return u||""}}const se=()=>{const e=I(),{params:u,back:i,to:a}=K(),{id:l}=u,[L,A]=v(()=>f.get("/admin/driver/list"),!0),[c,S]=U({}),B=async()=>{const n=await A();y(n,S)},[N,R]=v(()=>f.get(`/admin/storage/get?id=${l}`),!0),[V,D]=v(()=>f.get(`/admin/driver/info?driver=${g.driver}`),!0);l?(async()=>{const n=await R();y(n,async r=>{s(r),m(JSON.parse(r.addition));const h=await D();y(h,E=>S({[g.driver]:E}))})})():B();const[g,s]=x({}),[C,m]=x({}),[j,q]=v(()=>(s("addition",JSON.stringify(C)),f.post(`/admin/storage/${l?"update":"create"}`,g))),T=X(()=>{var r;const n=(r=c()[g.driver])==null?void 0:r.config.alert;if(console.log(n),n)return n.split("|")[0]});return t(de,{get loading(){return l?N()||V():L()},get children(){return[t(Z,{mb:"$2",get children(){return e(`global.${l?"edit":"add"}`)}}),t(p,{mb:"$2",spacing:"$2",get children(){return[t(w,{name:"driver",default:"",readonly:l!==void 0,required:!0,searchable:!0,get type(){return d.Select},get options(){return l?g.driver:Object.keys(c()).join(",")},get value(){return g.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:n=>{for(const r of c()[n].common)s(r.name,F(r.type,r.default));m(ee(r=>{for(const h in r)delete r[h]}));for(const r of c()[n].additional)m(r.name,F(r.type,r.default));s("driver",n)}}),t($,{get when(){return T()},get children(){return t(te,{get status(){return T()},w:"$full",get children(){return[t(ne,{}),re(()=>e(`drivers.config.${g.driver}.alert`))]}})}})]}}),t(ue,{get children(){return t($,{get when(){return c()[g.driver]},get children(){return[t(k,{get each(){return c()[g.driver].common},children:n=>t(w,O(n,{driver:"common",get value(){return g[n.name]},onChange:r=>{s(n.name,r)}}))}),t(k,{get each(){return c()[g.driver].additional},children:n=>t(w,O(n,{get driver(){return g.driver},get value(){return C[n.name]},onChange:r=>{m(n.name,r)}}))})]}})}}),t(ae,{mt:"$2",get loading(){return j()},onClick:async()=>{c()[g.driver].config.need_ms&&(_.info(e("manage.add_storage-tips")),window.open(ie("/@manage/messenger"),"_blank"));const n=await q();y(n,()=>{_.success(e("global.save_success")),i()},(r,h)=>{n.data.id&&a(`/@manage/storages/edit/${n.data.id}`)})},get children(){return e(`global.${l?"save":"add"}`)}})]}})};export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m,d as x,cW as $,be as o,bv as g,x as t,ai as _,c2 as C,bW as d,bJ as b,W as v,Q as k,bw as h,n as S,ap as T,c3 as F,am as i,L as I,bV as L,T as E,bg as M,S as W,N as D}from"./index-
|
|
1
|
+
import{b as m,d as x,cW as $,be as o,bv as g,x as t,ai as _,c2 as C,bW as d,bJ as b,W as v,Q as k,bw as h,n as S,ap as T,c3 as F,am as i,L as I,bV as L,T as E,bg as M,S as W,N as D}from"./index-0ac33e44.js";import{a as H}from"./FolderTree-3887d06d.js";import"./index-06a2e1d1.js";const R=e=>{const r=m();return t(d,{w:"$full",display:"flex",flexDirection:"column",get children(){return[t(b,{get for(){return e.name},display:"flex",alignItems:"center",get children(){return r(`metas.${e.name}`)}}),t(F,{w:"$full",get direction(){return e.type==="bool"?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[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(d,{w:"fit-content",display:"flex",get children(){return t(M,{css:{whiteSpace:"nowrap"},get id(){return`${e.name}_sub`},onChange:n=>e.onSub(n.currentTarget.checked),color:"$neutral10",fontSize:"$sm",get checked(){return e.sub},get children(){return r("metas.apply_sub")}})}})]}}),t(W,{get when(){return e.help},get children(){return t(D,{get children(){return r(`metas.${e.name}_help`)}})}})]}})},B=()=>{const e=m(),{params:r,back:n}=x(),{id:u}=r,[s,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}),[f,w]=o(()=>g.get(`/admin/meta/get?id=${u}`));u&&(async()=>{const a=await w();h(a,l)})();const[y,p]=o(()=>g.post(`/admin/meta/${u?"update":"create"}`,s));return t(T,{get loading(){return f()},get children(){return t(_,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[t(C,{get children(){return e(`global.${u?"edit":"add"}`)}}),t(d,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(b,{for:"path",display:"flex",alignItems:"center",get children(){return e("metas.path")}}),t(H,{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(R,{get name(){return a.name},get type(){return a.type},get value(){return s[a.name]},onChange:c=>l(a.name,c),get sub(){return s[a.sub]},onSub:c=>l(a.sub,c),get help(){return a.help}})}),t(k,{get loading(){return y()},onClick:async()=>{const a=await p();h(a,()=>{S.success(e("global.save_success")),n()})},get children(){return e(`global.${u?"save":"add"}`)}})]}})}})};export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(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,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)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(k){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}t.wrap=f;var d={};function h(){}function v(){}function g(){}var p={};l(p,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(j([])));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 f=l.arg,d=f.value;return d&&"object"==e(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(d).then((function(e){f.value=e,u(f)}),(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 S(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,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function j(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:E}}function E(){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(f(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=j,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},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 function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function u(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 c(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 l(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.7de89ac7.js","./item_type-legacy.1b6076a1.js","./ResponsiveGrid-legacy.4fdab710.js"],(function(e,n){"use strict";var a,u,f,s,d,h,v,g,p,y,m,b,w,x,S,L,O,_,j,E,k,T,C,N,I,P,A,G,F,$,B,q,J,V,W;return{setters:[function(e){a=e.b,u=e.x,f=e.bJ,s=e.ab,d=e.aT,h=e.ac,v=e.L,g=e.bV,p=e.T,y=e.bL,m=e.bY,b=e.S,w=e.N,x=e.bW,S=e.d,L=e.be,O=e.bv,_=e.B,j=e.cW,E=e.A,k=e.c2,T=e.ai,C=e.eb,N=e.dw,I=e.dx,P=e.am,A=e.W,G=e.V,F=e.Q,$=e.n,B=e.a1,q=e.bw,J=e.ap},function(e){V=e.T},function(e){W=e.R}],execute:function(){var n=function(e){var t=a();return u(x,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){var r,n;return[u(f,(r={},"for",n={},n.for=n.for||{},n.for.get=function(){return e.name},l(r,"display","flex"),l(r,"alignItems","center"),"children",n.children=n.children||{},n.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))},c(r,n),r)),u(s,{get fallback(){return u(d,{get children(){return t("settings.unknown_type")}})},get children(){return[u(h,{get when(){return e.type===V.String},get children(){return u(v,{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===V.String?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),u(h,{get when(){return e.type===V.Number},get children(){return u(v,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===V.Number?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseInt(t.currentTarget.value))}:void 0}})}}),u(h,{get when(){return e.type===V.Float},get children(){return u(v,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===V.Float?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseFloat(t.currentTarget.value))}:void 0}})}}),u(h,{get when(){return e.type===V.Bool},get children(){return u(g,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===V.Bool?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.checked)}:void 0}})}}),u(h,{get when(){return e.type===V.Text},get children(){return u(p,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===V.Text?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),u(h,{get when(){return e.type===V.Select},get children(){return u(y,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===V.Select?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t)}:void 0},get children(){return u(m,{get readonly(){return e.readonly},get searchable(){return e.type===V.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))}}))}})}})}})]}}),u(b,{get when(){return e.help},get children(){return u(w,{get children(){return t("common"===e.driver?"storages.common.".concat(e.name,"-tips"):"drivers.".concat(e.driver,".").concat(e.name,"-tips"))}})}})]}})};function Y(e,t){switch(e){case V.Bool:return!!t&&"true"===t;case V.Number:return t?parseInt(t):0;default:return t||""}}e("default",(function(){var e=a(),c=S(),f=c.params,s=c.back,d=c.to,h=f.id,v=i(L((function(){return O.get("/admin/driver/list")}),!0),2),g=v[0],p=v[1],y=i(_({}),2),m=y[0],w=y[1],x=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,p();case 2:t=e.sent,q(t,w);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=i(L((function(){return O.get("/admin/storage/get?id=".concat(h))}),!0),2),D=R[0],M=R[1],Q=i(L((function(){return O.get("/admin/driver/info?driver=".concat(X.driver))}),!0),2),U=Q[0],z=Q[1],H=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,M();case 2:t=e.sent,q(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 Z(t),re(JSON.parse(t.addition)),e.next=4,z();case 4:n=e.sent,q(n,(function(e){return w(l({},X.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)}}();h?H():x();var K=i(j({}),2),X=K[0],Z=K[1],ee=i(j({}),2),te=ee[0],re=ee[1],ne=i(L((function(){return Z("addition",JSON.stringify(te)),O.post("/admin/storage/".concat(h?"update":"create"),X)})),2),oe=ne[0],ie=ne[1],ae=E((function(){var e,t=null===(e=m()[X.driver])||void 0===e?void 0:e.config.alert;if(console.log(t),t)return t.split("|")[0]}));return u(J,{get loading(){return h?D()||U():g()},get children(){return[u(k,{mb:"$2",get children(){return e("global.".concat(h?"edit":"add"))}}),u(T,{mb:"$2",spacing:"$2",get children(){return[u(n,{name:"driver",default:"",readonly:void 0!==h,required:!0,searchable:!0,get type(){return V.Select},get options(){return h?X.driver:Object.keys(m()).join(",")},get value(){return X.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:function(e){var r,n=t(m()[e].common);try{for(n.s();!(r=n.n()).done;){var o=r.value;Z(o.name,Y(o.type,o.default))}}catch(c){n.e(c)}finally{n.f()}re(C((function(e){for(var t in e)delete e[t]})));var i,a=t(m()[e].additional);try{for(a.s();!(i=a.n()).done;){var u=i.value;re(u.name,Y(u.type,u.default))}}catch(c){a.e(c)}finally{a.f()}Z("driver",e)}}),u(b,{get when(){return ae()},get children(){return u(N,{get status(){return ae()},w:"$full",get children(){return[u(I,{}),P((function(){return e("drivers.config.".concat(X.driver,".alert"))}))]}})}})]}}),u(W,{get children(){return u(b,{get when(){return m()[X.driver]},get children(){return[u(A,{get each(){return m()[X.driver].common},children:function(e){return u(n,G(e,{driver:"common",get value(){return X[e.name]},onChange:function(t){Z(e.name,t)}}))}}),u(A,{get each(){return m()[X.driver].additional},children:function(e){return u(n,G(e,{get driver(){return X.driver},get value(){return te[e.name]},onChange:function(t){re(e.name,t)}}))}})]}})}}),u(F,{mt:"$2",get loading(){return oe()},onClick:(i=o(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return m()[X.driver].config.need_ms&&($.info(e("manage.add_storage-tips")),window.open(B("/@manage/messenger"),"_blank")),t.next=3,ie();case 3:n=t.sent,q(n,(function(){$.success(e("global.save_success")),s()}),(function(e,t){n.data.id&&d("/@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(h?"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=a(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,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)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(k){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=S(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}t.wrap=f;var d={};function h(){}function v(){}function g(){}var p={};l(p,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(j([])));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 f=l.arg,d=f.value;return d&&"object"==e(d)&&o.call(d,"__await")?r.resolve(d.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):r.resolve(d).then((function(e){f.value=e,u(f)}),(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 S(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,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function j(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:E}}function E(){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(f(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=j,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},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 function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function u(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 c(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 l(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.eace8bff.js","./item_type-legacy.1b6076a1.js","./ResponsiveGrid-legacy.4a47f200.js"],(function(e,n){"use strict";var a,u,f,s,d,h,v,g,p,y,m,b,w,x,S,L,O,_,j,E,k,T,C,N,I,P,A,G,F,$,B,q,J,V,W;return{setters:[function(e){a=e.b,u=e.x,f=e.bJ,s=e.ab,d=e.aT,h=e.ac,v=e.L,g=e.bV,p=e.T,y=e.bL,m=e.bY,b=e.S,w=e.N,x=e.bW,S=e.d,L=e.be,O=e.bv,_=e.B,j=e.cW,E=e.A,k=e.c2,T=e.ai,C=e.ed,N=e.dy,I=e.dz,P=e.am,A=e.W,G=e.V,F=e.Q,$=e.n,B=e.a1,q=e.bw,J=e.ap},function(e){V=e.T},function(e){W=e.R}],execute:function(){var n=function(e){var t=a();return u(x,{w:"$full",display:"flex",flexDirection:"column",get required(){return e.required},get children(){var r,n;return[u(f,(r={},"for",n={},n.for=n.for||{},n.for.get=function(){return e.name},l(r,"display","flex"),l(r,"alignItems","center"),"children",n.children=n.children||{},n.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))},c(r,n),r)),u(s,{get fallback(){return u(d,{get children(){return t("settings.unknown_type")}})},get children(){return[u(h,{get when(){return e.type===V.String},get children(){return u(v,{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===V.String?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),u(h,{get when(){return e.type===V.Number},get children(){return u(v,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===V.Number?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseInt(t.currentTarget.value))}:void 0}})}}),u(h,{get when(){return e.type===V.Float},get children(){return u(v,{type:"number",get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onInput(){return e.type===V.Float?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,parseFloat(t.currentTarget.value))}:void 0}})}}),u(h,{get when(){return e.type===V.Bool},get children(){return u(g,{get id(){return e.name},get readOnly(){return e.readonly},get defaultChecked(){return e.value},get onChange(){return e.type===V.Bool?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.checked)}:void 0}})}}),u(h,{get when(){return e.type===V.Text},get children(){return u(p,{get id(){return e.name},get readOnly(){return e.readonly},get value(){return e.value},get onChange(){return e.type===V.Text?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t.currentTarget.value)}:void 0}})}}),u(h,{get when(){return e.type===V.Select},get children(){return u(y,{get id(){return e.name},get readOnly(){return e.readonly},get defaultValue(){return e.value},get onChange(){return e.type===V.Select?function(t){var r;return null===(r=e.onChange)||void 0===r?void 0:r.call(e,t)}:void 0},get children(){return u(m,{get readonly(){return e.readonly},get searchable(){return e.type===V.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))}}))}})}})}})]}}),u(b,{get when(){return e.help},get children(){return u(w,{get children(){return t("common"===e.driver?"storages.common.".concat(e.name,"-tips"):"drivers.".concat(e.driver,".").concat(e.name,"-tips"))}})}})]}})};function Y(e,t){switch(e){case V.Bool:return!!t&&"true"===t;case V.Number:return t?parseInt(t):0;default:return t||""}}e("default",(function(){var e=a(),c=S(),f=c.params,s=c.back,d=c.to,h=f.id,v=i(L((function(){return O.get("/admin/driver/list")}),!0),2),g=v[0],p=v[1],y=i(_({}),2),m=y[0],w=y[1],x=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,p();case 2:t=e.sent,q(t,w);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=i(L((function(){return O.get("/admin/storage/get?id=".concat(h))}),!0),2),z=R[0],D=R[1],M=i(L((function(){return O.get("/admin/driver/info?driver=".concat(X.driver))}),!0),2),Q=M[0],U=M[1],H=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,D();case 2:t=e.sent,q(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 Z(t),re(JSON.parse(t.addition)),e.next=4,U();case 4:n=e.sent,q(n,(function(e){return w(l({},X.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)}}();h?H():x();var K=i(j({}),2),X=K[0],Z=K[1],ee=i(j({}),2),te=ee[0],re=ee[1],ne=i(L((function(){return Z("addition",JSON.stringify(te)),O.post("/admin/storage/".concat(h?"update":"create"),X)})),2),oe=ne[0],ie=ne[1],ae=E((function(){var e,t=null===(e=m()[X.driver])||void 0===e?void 0:e.config.alert;if(console.log(t),t)return t.split("|")[0]}));return u(J,{get loading(){return h?z()||Q():g()},get children(){return[u(k,{mb:"$2",get children(){return e("global.".concat(h?"edit":"add"))}}),u(T,{mb:"$2",spacing:"$2",get children(){return[u(n,{name:"driver",default:"",readonly:void 0!==h,required:!0,searchable:!0,get type(){return V.Select},get options(){return h?X.driver:Object.keys(m()).join(",")},get value(){return X.driver},full_name_path:"storages.common.driver",options_prefix:"drivers.drivers",driver:"drivers",onChange:function(e){var r,n=t(m()[e].common);try{for(n.s();!(r=n.n()).done;){var o=r.value;Z(o.name,Y(o.type,o.default))}}catch(c){n.e(c)}finally{n.f()}re(C((function(e){for(var t in e)delete e[t]})));var i,a=t(m()[e].additional);try{for(a.s();!(i=a.n()).done;){var u=i.value;re(u.name,Y(u.type,u.default))}}catch(c){a.e(c)}finally{a.f()}Z("driver",e)}}),u(b,{get when(){return ae()},get children(){return u(N,{get status(){return ae()},w:"$full",get children(){return[u(I,{}),P((function(){return e("drivers.config.".concat(X.driver,".alert"))}))]}})}})]}}),u(W,{get children(){return u(b,{get when(){return m()[X.driver]},get children(){return[u(A,{get each(){return m()[X.driver].common},children:function(e){return u(n,G(e,{driver:"common",get value(){return X[e.name]},onChange:function(t){Z(e.name,t)}}))}}),u(A,{get each(){return m()[X.driver].additional},children:function(e){return u(n,G(e,{get driver(){return X.driver},get value(){return te[e.name]},onChange:function(t){re(e.name,t)}}))}})]}})}}),u(F,{mt:"$2",get loading(){return oe()},onClick:(i=o(r().mark((function t(){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return m()[X.driver].config.need_ms&&($.info(e("manage.add_storage-tips")),window.open(B("/@manage/messenger"),"_blank")),t.next=3,ie();case 3:n=t.sent,q(n,(function(){$.success(e("global.save_success")),s()}),(function(e,t){n.data.id&&d("/@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(h?"save":"add"))}})];var i}})}))}}}))}();
|
|
@@ -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=L(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 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=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 _(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(_,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.7de89ac7.js","./FolderTree-legacy.be5dcfc5.js","./index-legacy.b6a8a799.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.cW,f=t.be,s=t.bv,h=t.x,p=t.ai,d=t.c2,y=t.bW,g=t.bJ,v=t.W,m=t.Q,b=t.bw,w=t.n,x=t.ap,L=t.c3,_=t.am,S=t.L,E=t.bV,j=t.T,O=t.bg,k=t.S,P=t.N},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(L,{w:"$full",get direction(){return"bool"===t.type?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[_((function(){return _((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)}}):_((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,L=a.back,_=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(_))})),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)}}();_&&C();var I=o(f((function(){return s.post("/admin/meta/".concat(_?"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(_?"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")),L()}));case 4:case"end":return e.stop()}}),r)}))),function(){return o.apply(this,arguments)}),get children(){return t("global.".concat(_?"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=L(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 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=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 _(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(_,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.eace8bff.js","./FolderTree-legacy.5e170387.js","./index-legacy.f9a28a3c.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.cW,f=t.be,s=t.bv,h=t.x,p=t.ai,d=t.c2,y=t.bW,g=t.bJ,v=t.W,m=t.Q,b=t.bw,w=t.n,x=t.ap,L=t.c3,_=t.am,S=t.L,E=t.bV,j=t.T,O=t.bg,k=t.S,P=t.N},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(L,{w:"$full",get direction(){return"bool"===t.type?"row":{"@initial":"column","@md":"row"}},gap:"$2",get children(){return[_((function(){return _((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)}}):_((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,L=a.back,_=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(_))})),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)}}();_&&C();var I=o(f((function(){return s.post("/admin/meta/".concat(_?"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(_?"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")),L()}));case 4:case"end":return e.stop()}}),r)}))),function(){return o.apply(this,arguments)}),get children(){return t("global.".concat(_?"save":"add"))}})];var o}})}})}))}}}))}();
|