@abtnode/blocklet-services 1.16.43-beta-20250424-125523-08a65a5c → 1.16.43-beta-20250427-132304-6da95c55
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/api/routes/oauth/client.js +2 -0
- package/api/routes/oauth/server.js +75 -0
- package/api/routes/user-session.js +5 -5
- package/api/routes/user.js +3 -2
- package/api/services/auth/session.js +23 -35
- package/api/services/oauth/server.js +31 -1
- package/api/util/attach-shared-utils.js +2 -2
- package/dist/assets/{AdapterDayjs-DT-SVlwP.js → AdapterDayjs-BUGplkxR.js} +1 -1
- package/dist/assets/{ArrowDropDown-D0s0w2rW.js → ArrowDropDown-B0sLkJoY.js} +1 -1
- package/dist/assets/{CheckCircle-BMPTHnwd.js → CheckCircle-BNrN9mgy.js} +1 -1
- package/dist/assets/{ChevronLeft-BV65HBup.js → ChevronLeft-Dq00IS01.js} +1 -1
- package/dist/assets/{ChevronRight-CSrWhu1k.js → ChevronRight-ZTqWK-Ga.js} +1 -1
- package/dist/assets/{Community-B6sqs6QK.js → Community-DZCTPNMP.js} +1 -1
- package/dist/assets/{DeleteOutline-BwlJCwaD.js → DeleteOutline-C2sY6hfm.js} +1 -1
- package/dist/assets/{Done-ClKUqna8.js → Done-JLiLhELm.js} +1 -1
- package/dist/assets/{Download-DydXtD3g.js → Download-Ch4RfGRW.js} +1 -1
- package/dist/assets/{Edit-Cydc64DB.js → Edit-CY6fFHQM.js} +1 -1
- package/dist/assets/{EditIcon-B3vzcBhw.js → EditIcon-Bi2cR-_u.js} +1 -1
- package/dist/assets/{Email-DscM5ZVr.js → Email-Dz2Eyqu0.js} +1 -1
- package/dist/assets/{Error-BUxloyCF.js → Error-CSFUqG0m.js} +1 -1
- package/dist/assets/{ExpandLess-D3psCjh2.js → ExpandLess-BiMmSOBl.js} +1 -1
- package/dist/assets/{Google-nw2S1BAe.js → Google-GOp5YvmZ.js} +1 -1
- package/dist/assets/{Holiday-COvP72sQ.js → Holiday-Lc6woG1j.js} +1 -1
- package/dist/assets/{InfoOutlined-K2cm3ASV.js → InfoOutlined-CQB5qKm-.js} +1 -1
- package/dist/assets/{Launch-DSlNzUJo.js → Launch-fxgQvk19.js} +1 -1
- package/dist/assets/{LaunchOutlined-DB41H1FZ.js → LaunchOutlined-BV4_W1pb.js} +1 -1
- package/dist/assets/{Location-DSdE-EW4.js → Location-B8EOY3d0.js} +1 -1
- package/dist/assets/{LockIcon-Yic1ETPw.js → LockIcon-fuTfhB_G.js} +1 -1
- package/dist/assets/{Meeting-DlfumstQ.js → Meeting-Epdyx36z.js} +1 -1
- package/dist/assets/{MoreHoriz-BWdkQIhx.js → MoreHoriz-CX_pwfPT.js} +1 -1
- package/dist/assets/{OffSick-CG2hJbSq.js → OffSick-VYgugWxu.js} +1 -1
- package/dist/assets/{Phone-DkIl-1KJ.js → Phone-KP65huHK.js} +1 -1
- package/dist/assets/{PlayArrow-DfQEcw-G.js → PlayArrow-DFH1Psjx.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-TVw9KuLr.js → QuestionMarkCircle-p6m3avKp.js} +1 -1
- package/dist/assets/{ServerLogo-DQ3yw9lw.js → ServerLogo-Bssx1Eou.js} +1 -1
- package/dist/assets/{Timezone-B77bSXNW.js → Timezone-Ce4E1Xey.js} +1 -1
- package/dist/assets/{TuneOutlined-8KrrUCQF.js → TuneOutlined-Dy2qPFGI.js} +1 -1
- package/dist/assets/{ViewList-Bql1EC1c.js → ViewList-e3CoNi3K.js} +1 -1
- package/dist/assets/{WorkingRemotely-DNUERtUR.js → WorkingRemotely-CXFJ6pz8.js} +1 -1
- package/dist/assets/{access-control-Bcd_n74E.js → access-control-B20P1UrY.js} +1 -1
- package/dist/assets/{actions-f0wKxzR1.js → actions-DA-6s_nQ.js} +1 -1
- package/dist/assets/{add-component-core-BUAlsG4_.js → add-component-core-DG9mQFsr.js} +1 -1
- package/dist/assets/{add-resource-Djfsmv61.js → add-resource-BoS5YkVy.js} +1 -1
- package/dist/assets/{addon-BkBy38_b.js → addon-Bcc-Xwbf.js} +1 -1
- package/dist/assets/{advanced-BPM38tnR.js → advanced-DTe2fs5L.js} +1 -1
- package/dist/assets/{appearance-DUNDV_8X.js → appearance-DYi32tlk.js} +1 -1
- package/dist/assets/{ar-wbCXBm9M.js → ar-CmhpkjwX.js} +1 -1
- package/dist/assets/{ar-BNaEJSr3.js → ar-DupP3pla.js} +1 -1
- package/dist/assets/{audit-logs-ClIsZeWB.js → audit-logs-CydL26ZC.js} +2 -2
- package/dist/assets/{authorize-Czqr5dx0.js → authorize-DUyL7MEU.js} +1 -1
- package/dist/assets/{base32-CXHhcaAE.js → base32-p9VcJrwv.js} +1 -1
- package/dist/assets/{branding-CDVXldZI.js → branding-CAMtNLMU.js} +1 -1
- package/dist/assets/{branding-Dr6iifVv.js → branding-_VO2ZZ3t.js} +2 -2
- package/dist/assets/{bundle-avatar-CXZCyfoQ.js → bundle-avatar-D0t7RLGx.js} +1 -1
- package/dist/assets/button-BeZibzB9.js +1 -0
- package/dist/assets/{click-to-copy-CYn1U-tf.js → click-to-copy-BGyXQL2i.js} +1 -1
- package/dist/assets/{complete-C-F4GC22.js → complete-BzCBoyhn.js} +1 -1
- package/dist/assets/{component-DsEe2qX3.js → component-5gjaNHCg.js} +1 -1
- package/dist/assets/{config-DYPbZpg_.js → config-1xq1_d84.js} +1 -1
- package/dist/assets/{config-A_My2cMO.js → config-Bh19ZUJ-.js} +1 -1
- package/dist/assets/{config-navigation-Bi-pxL5K.js → config-navigation-Dvjz9nAh.js} +3 -3
- package/dist/assets/{config-space-DVjhjgJC.js → config-space-CYg-72ab.js} +1 -1
- package/dist/assets/{confirm-BshZuFnD.js → confirm-DqvNmeoz.js} +1 -1
- package/dist/assets/{connect-BPsVsyF2.js → connect-Bbc2y5nS.js} +1 -1
- package/dist/assets/{connect-DQxK32G8.js → connect-DM2xKEWk.js} +1 -1
- package/dist/assets/{connect-to-DXXf0Nkb.js → connect-to-Ck5O2M1K.js} +1 -1
- package/dist/assets/{content-layout-AHDEW7YQ.js → content-layout-BPaAeaMQ.js} +1 -1
- package/dist/assets/{dashboard-CCzZLCC4.js → dashboard-8QXGSoVu.js} +3 -3
- package/dist/assets/{de-8GAnQkrt.js → de-Doy9B4I7.js} +1 -1
- package/dist/assets/{de-BsZVQmUM.js → de-TcDcBkI0.js} +1 -1
- package/dist/assets/{delete-confirm-DuoSMgmG.js → delete-confirm-_BzUlhv2.js} +1 -1
- package/dist/assets/{did-address-Cg-ez88b.js → did-address-DUThaBlf.js} +1 -1
- package/dist/assets/domain-action-card-D3w6jyPR.js +24 -0
- package/dist/assets/domain-ag7_Ivc1.js +9 -0
- package/dist/assets/domains-BDxEOJh6.js +1 -0
- package/dist/assets/{dot-tsWWWiOg.js → dot-BE1YP292.js} +1 -1
- package/dist/assets/{email-DWoydsl3.js → email-DKpgximx.js} +1 -1
- package/dist/assets/{empty-spinner-D_1iEwTc.js → empty-spinner-DmDm8XzF.js} +1 -1
- package/dist/assets/{es-ntlJbt-a.js → es-CDD0y3ur.js} +1 -1
- package/dist/assets/{es-DsjXdm2X.js → es-CruF8tDk.js} +1 -1
- package/dist/assets/{exchange-passport-DysHnVpr.js → exchange-passport-Izkf8qpM.js} +1 -1
- package/dist/assets/{fr-B-64BlVz.js → fr-Bajh_D8H.js} +1 -1
- package/dist/assets/{fr-Bv4B0MVB.js → fr-zYSSKlBw.js} +1 -1
- package/dist/assets/{fuel-TLPi2Hr-.js → fuel-CcBzY6Bt.js} +1 -1
- package/dist/assets/{gen-access-key-D4caSeDS.js → gen-access-key-DxKwgiGT.js} +1 -1
- package/dist/assets/{get-safe-url-Bz4L9R5-.js → get-safe-url-Bq9SFfX6.js} +1 -1
- package/dist/assets/{get-safe-url-Dex6FTwp.js → get-safe-url-DBsPGn--.js} +1 -1
- package/dist/assets/hi-BsP-0YrU.js +5 -0
- package/dist/assets/{hi-CY-kyCxp.js → hi-DOsApYK0.js} +1 -1
- package/dist/assets/{home-CBFACtB_.js → home-Bi8fA3jh.js} +1 -1
- package/dist/assets/{id-BT_84X-S.js → id-BderyGO5.js} +1 -1
- package/dist/assets/{id-DZBgOnwF.js → id-CY2FWdMB.js} +1 -1
- package/dist/assets/{iframe-B4jzt2b3.js → iframe-DZ181i8X.js} +1 -1
- package/dist/assets/{index-BplAimRX.js → index-B2yOcqTl.js} +2 -2
- package/dist/assets/{index-CSARD20E.js → index-BGgGfqEc.js} +1 -1
- package/dist/assets/{index-BG5LYRZd.js → index-BT0GBmWF.js} +1 -1
- package/dist/assets/{index-B0-4M8vb.js → index-B_vrglsK.js} +1 -1
- package/dist/assets/{index-BOEhBltr.js → index-BnmeT4Bk.js} +1 -1
- package/dist/assets/{index-CGe7n5Gc.js → index-C8QMe2NL.js} +2 -2
- package/dist/assets/{index-ARVZ7FJv.js → index-CGBZONPv.js} +1 -1
- package/dist/assets/{index-BowdADDJ.js → index-CHbpkZwO.js} +1 -1
- package/dist/assets/{index-NRj7GpkA.js → index-Cjjg2_Xp.js} +1 -1
- package/dist/assets/{index-Cks6t9cs.js → index-DKhrYmrN.js} +1 -1
- package/dist/assets/index-DNG6b9sp.js +224 -0
- package/dist/assets/{index-CVvs-hHV.js → index-DO3_1y-L.js} +15 -15
- package/dist/assets/{index-DPpP2Hz6.js → index-DO4cSlUf.js} +1 -1
- package/dist/assets/{index-DomukIqT.js → index-DcBUShKK.js} +1 -1
- package/dist/assets/{index-BXkEM7e9.js → index-Dl4W1N74.js} +1 -1
- package/dist/assets/{index-DO1hKTlI.js → index-DuH8q5ir.js} +1 -1
- package/dist/assets/{index-C3f1mXja.js → index-DyxFC42L.js} +3 -3
- package/dist/assets/{index-MbAvBCGD.js → index-EnQ254k3.js} +1 -1
- package/dist/assets/{index-Bdp7LpPc.js → index-SDdS_qt8.js} +1 -1
- package/dist/assets/{index-DKq7-33g.js → index-bb90BUf4.js} +2 -2
- package/dist/assets/{index-CU8fxqsS.js → index-mDKG4SiY.js} +1 -1
- package/dist/assets/index-n0Q-fETi.js +99 -0
- package/dist/assets/{index-3r4UtN8A.js → index-slEV_y-C.js} +1 -1
- package/dist/assets/{invitation-7bE4cIXB.js → invitation-BrAZQXQL.js} +1 -1
- package/dist/assets/{invite-COQN-rNg.js → invite-Cbz8B2uW.js} +1 -1
- package/dist/assets/{issue-passport-11S7tmQW.js → issue-passport-Dd_yyO08.js} +1 -1
- package/dist/assets/{item-BeeQ2vgS.js → item-nK3D7WH5.js} +1 -1
- package/dist/assets/{ja-BMmtgJml.js → ja-99RIjwwl.js} +1 -1
- package/dist/assets/{ja-8jRYJGVw.js → ja-BLPXqHM4.js} +1 -1
- package/dist/assets/{ko-ChmGYnnx.js → ko-8oFi6wHH.js} +1 -1
- package/dist/assets/{ko-C4pbuwv8.js → ko-Cxgk34co.js} +1 -1
- package/dist/assets/{landing-page-DfhVYZ3b.js → landing-page-BMM_oJb1.js} +1 -1
- package/dist/assets/{launch-result-message-CCo4xyOd.js → launch-result-message-C9huWJUf.js} +1 -1
- package/dist/assets/{layout-DToDlHEw.js → layout-Cw-hwCHs.js} +1 -1
- package/dist/assets/{list-ChvGKHw5.js → list-Dmtz4mRb.js} +1 -1
- package/dist/assets/{list-header-C7I2nEkf.js → list-header-CgF1S4js.js} +1 -1
- package/dist/assets/localization-DATb3Y_j.js +1 -0
- package/dist/assets/{log-DwhNr5TA.js → log-Chqr_or_.js} +1 -1
- package/dist/assets/{logger-DwVuCvCH.js → logger-zix81YaM.js} +1 -1
- package/dist/assets/{login-_FUfsuwA.js → login-DjB23H9M.js} +1 -1
- package/dist/assets/{login-oauth-callback-BfAWMSC0.js → login-oauth-callback-ILeP59KT.js} +1 -1
- package/dist/assets/{logo-uploader-CYJXgjdA.js → logo-uploader-CJrdpVcQ.js} +3 -3
- package/dist/assets/{lost-passport-bl0QaFCp.js → lost-passport-Do1Pl0xI.js} +1 -1
- package/dist/assets/{open-window-BTH_1q7i.js → open-window-D8MZhu_7.js} +1 -1
- package/dist/assets/{overview-D4gQwSex.js → overview-DLA9wj6a.js} +1 -1
- package/dist/assets/{page-header-DWEFpJCI.js → page-header-CWY8mxlT.js} +1 -1
- package/dist/assets/{passport-item-Z9x6DkU5.js → passport-item-CWtlyIE_.js} +1 -1
- package/dist/assets/{permission-CDRSpazM.js → permission-BGM09622.js} +1 -1
- package/dist/assets/{preferences-Dck4NebC.js → preferences-DYdbb0kG.js} +1 -1
- package/dist/assets/{profile-embed-CJdf2c_q.js → profile-embed-CeEMHxEc.js} +1 -1
- package/dist/assets/pt-BINIHul4.js +5 -0
- package/dist/assets/{pt-DjThuHre.js → pt-ChXuTrrd.js} +1 -1
- package/dist/assets/publish-resource-BEc_A5mC.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CP-WHcip.js → react-beautiful-dnd.esm-ByydTUk4.js} +1 -1
- package/dist/assets/{relative-time-4f6xdgg-.js → relative-time-Djw-K4Zu.js} +1 -1
- package/dist/assets/ru-BifF7u-P.js +5 -0
- package/dist/assets/{ru-CI1dkyMC.js → ru-IkTTTY0K.js} +1 -1
- package/dist/assets/{runtime-r0b7mSwp.js → runtime-DXl0lfXF.js} +1 -1
- package/dist/assets/sdk-CTe6rL6c.js +1 -0
- package/dist/assets/{security-CLc8EI2b.js → security-BhkfG23R.js} +4 -4
- package/dist/assets/{session-CmpGpqja.js → session-VIMbdc9j.js} +1 -1
- package/dist/assets/{setup-C0tLi0hm.js → setup-BmYxTt6Z.js} +9 -3
- package/dist/assets/{shorten-label-CE57Fd6E.js → shorten-label-DFzv9EKX.js} +1 -1
- package/dist/assets/{simple-select-rdkVpCfB.js → simple-select-DlrdVbaI.js} +1 -1
- package/dist/assets/{slicedToArray-BBoi0da6.js → slicedToArray-CPl5_eGD.js} +1 -1
- package/dist/assets/{spaces-Cf25Nw85.js → spaces-WkJCApHO.js} +1 -1
- package/dist/assets/{start-CrRC75qe.js → start-CVexuuAk.js} +1 -1
- package/dist/assets/{status-BSBLuo2u.js → status-CygZ0LuY.js} +1 -1
- package/dist/assets/{step-actions-YXGJQMCB.js → step-actions-D_1PFeFs.js} +1 -1
- package/dist/assets/{studio-wUJ0pUIv.js → studio-Byjzwg8q.js} +1 -1
- package/dist/assets/{switch-control-D0bd_WCg.js → switch-control-5fEOPVKs.js} +1 -1
- package/dist/assets/th-CBxM23U5.js +5 -0
- package/dist/assets/{th-4Bnumejd.js → th-OF8xr--T.js} +1 -1
- package/dist/assets/{traffic-BhA3A82Z.js → traffic-T11hxc--.js} +1 -1
- package/dist/assets/{transfer-BmP7JwN2.js → transfer-ROpxn9LD.js} +1 -1
- package/dist/assets/{unsubscribe-zK0TSWH3.js → unsubscribe-Cd3XOnSp.js} +1 -1
- package/dist/assets/{use-app-logo-DAnHvb1d.js → use-app-logo-B8Kl9EZt.js} +1 -1
- package/dist/assets/{use-mobile-CwehvZ0f.js → use-mobile-C_flBrm-.js} +1 -1
- package/dist/assets/{use-mobile-KRs0Yv73.js → use-mobile-DlKplWTG.js} +1 -1
- package/dist/assets/{useLocalStorage-CNdV3Qx_.js → useLocalStorage-DldnaMbZ.js} +1 -1
- package/dist/assets/{user-center-CTXkd8hW.js → user-center-CzyCbtWm.js} +1 -1
- package/dist/assets/util-Bjy-tP7q.js +1 -0
- package/dist/assets/{util-DrL3FFCf.js → util-Dw9Eiuko.js} +1 -1
- package/dist/assets/{vendor-arcblock-JGYMkSwE.js → vendor-arcblock-ScFEr-lj.js} +5 -5
- package/dist/assets/{vendor-mui-core-8zafwTFh.js → vendor-mui-core-CQ38ohp2.js} +20 -20
- package/dist/assets/{vendor-mui-x-Df6DxoLi.js → vendor-mui-x-B0hsmEJ3.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-D2f9rdKK.js → vendor-ux-did-connect-BdkhddhO.js} +4 -4
- package/dist/assets/{vi-Bc6q0tph.js → vi-DCBJBc4G.js} +1 -1
- package/dist/assets/vi-DY_Y13jR.js +5 -0
- package/dist/assets/wrap-locale-DMTYAE64.js +1 -0
- package/dist/assets/{zh-_GYrLCB8.js → zh-BRAYg0sY.js} +1 -1
- package/dist/assets/{zh-DZlGQAU9.js → zh-BYRCoK6F.js} +1 -1
- package/dist/assets/{zh-tw-Be5lgYGX.js → zh-tw-BG0rlH8p.js} +1 -1
- package/dist/assets/{zh-tw-CLcDyLaC.js → zh-tw-D5-DkgwC.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +29 -29
- package/dist/assets/button-n0UOGLKx.js +0 -1
- package/dist/assets/domain-B57opALw.js +0 -9
- package/dist/assets/domain-action-card-DGNzWGpO.js +0 -24
- package/dist/assets/domains-DSFXU6AI.js +0 -1
- package/dist/assets/hi-DIf_hqVB.js +0 -5
- package/dist/assets/index-Birdle6P.js +0 -224
- package/dist/assets/index-DEAA6iri.js +0 -92
- package/dist/assets/localization-DfJCYesK.js +0 -1
- package/dist/assets/pt-CMeQ7KWn.js +0 -5
- package/dist/assets/publish-resource-CaRrvCS8.js +0 -1
- package/dist/assets/ru-8cWKcW3b.js +0 -5
- package/dist/assets/sdk-fuEXLKzh.js +0 -1
- package/dist/assets/th-DYYGBboI.js +0 -5
- package/dist/assets/util-C4Ha7L5d.js +0 -1
- package/dist/assets/vi-CfH0km8q.js +0 -5
- package/dist/assets/wrap-locale-5dMXj7tV.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{a as nn,e as Le,r as T,d as Ot,g as ho,b as q}from"./vendor-react-DEoibe3W.js";import{bP as Di,aL as Oi,bQ as ki,br as Ni,j as Ct,u as De,bR as Li,bS as z,bT as Mi,bU as nr,bV as Ei,bW as rr,bX as Ai,bY as ji,I as he,a1 as Ln,s as fo,b9 as po,l as go,Y as _t,al as Fi,B as Gi,bq as vo,c as Wi}from"./vendor-ux-did-connect-D2f9rdKK.js";import{a as kt,u as ie,z as $i,i as mo,e as So,A as Hi,f as Bi}from"./vendor-hooks-DftG_2gV.js";import{j as v,E as Ui,b2 as yo,cj as Vi,ck as se,cl as E,_ as ce,cm as qi,H as I,ci as Ki,cn as Xi,co as Yi,cp as Qi,cq as Ji,cr as Zi,cs as ea,ct as ta,cu as na,cv as ra,a9 as Z,T as Re,U as oa,W as or,I as Te,b3 as xn,y as Jt,v as Mn,O as ot,N as bn,ac as ia,aa,bo as Co,b_ as la,ag as sa,bb as ir,ah as hn,s as Je,w as Xt,e as ca,F as da,bk as ar,br as ua,bn as lr,q as sr,bw as fn,c7 as cr}from"./vendor-mui-core-8zafwTFh.js";import{aB as ha,aC as fa,aD as pa,y as Ze,L as we,C as It,o as ga,b as va,q as gt,g as ma,az as Sa,A as st,aE as _o,aF as ya,a1 as dr,aG as Ca,z as _a,I as wa,G as xa,n as Oe}from"./vendor-utils-BNHJB5U7.js";import{r as ba}from"./omit-bLid3PKQ.js";import{r as Ra}from"./cloneDeep-SfcdeqEN.js";import{r as Ia,c as Qe,a0 as $e,_ as Ta,a1 as za,n as Pa,a2 as Da}from"./vendor-arcblock-JGYMkSwE.js";import{p as Oa}from"./index-YbJjfDTR.js";import{ay as ka,a0 as Na,a7 as La,C as et,f as Ma,z as Ea,az as Aa,aA as ja,E as Fa,aB as Ga,F as Fe,aC as Wa}from"./index-CVvs-hHV.js";import{_ as ae,a as it,b as me,c as Se,d as ye,r as $a}from"./slicedToArray-BBoi0da6.js";import{S as Rn}from"./simple-select-rdkVpCfB.js";import{u as wo}from"./dashboard-CCzZLCC4.js";import{d as Ha}from"./ArrowDropDown-D0s0w2rW.js";import{a as Ba}from"./api-BrU7j0QA.js";import{u as Ua}from"./use-app-logo-DAnHvb1d.js";import{D as Va,C as qa,P as Ka}from"./react-beautiful-dnd.esm-CP-WHcip.js";import{I as Xa}from"./iframe-B4jzt2b3.js";import{f as ur}from"./format-error-BrmqJs5a.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-CNdV3Qx_.js";import"./confirm-BshZuFnD.js";import"./PlayArrow-DfQEcw-G.js";import"./get-safe-url-Bz4L9R5-.js";import"./session-CmpGpqja.js";import"./index-DomukIqT.js";import"./InfoOutlined-K2cm3ASV.js";import"./dot-tsWWWiOg.js";import"./useAsync-CGW40D2-.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-KRs0Yv73.js";import"./raf-schd.esm-B3j6BePR.js";var pe={};const Ya=nn(ha),Qa=nn(fa),Ja=nn(pa);(function(t){var o=Le&&Le.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortRootNavigation=t.cleanOldNavigationHistory=t.checkLink=void 0,t.parseNavigation=V,t.deepWalk=N,t.isMatchSection=P,t.nestNavigationList=Y,t.filterNavigation=oe,t.cleanOrphanNavigation=le,t.joinLink=_,t.flattenNavigation=L,t.splitNavigationBySection=X;const r=o(Ya),e=o(Di),n=o(Oi),i=o(Qa),a=o(ba),l=o(Ra),s=Ia,d=o(Oa),c=o(ka),u=o(ki),h=o(Ni),f=o(Ja),p=La,g=Na;Object.defineProperty(t,"checkLink",{enumerable:!0,get:function(){return g.checkLink}});const C="header",w="/",y="/",x="/";function N(G,$=()=>{},{key:A="children",order:M="first"}={}){function D(b,{index:O=0,parent:j=null,level:H=0}={}){Array.isArray(b)?b.forEach((U,ne)=>{D(U,{index:ne,parent:j,level:H+1})}):b&&(M==="first"&&$(b,j,{index:O,level:H}),D(b[A],{parent:b,level:H}),M==="last"&&$(b,j,{index:O,level:H}))}D(G)}function P(G,$){return $===C&&(0,i.default)(G)?!0:Array.isArray(G)?G.includes($):G===$}function R(G){try{return JSON.parse(G)}catch{return G}}function k(G){return G.map($=>{const A={...$};return A.role&&(A.role=R(A.role)),A.section&&(A.section=R(A.section)),A.title&&(A.title=R(A.title)),A.description&&(A.description=R(A.description)),A.link&&(A.link=R(A.link)),A})}function m(G="/",$=""){if((0,c.default)($||""))return $;const A=d.default.join(G,$||y);return A.length>1&&A.endsWith("/")?A.slice(0,A.length-1):A}function S(G,$,{strict:A=!0}={}){let M=G,D=$;return A||(M=M||"/",D=D||"/"),(0,u.default)(M)&&(0,h.default)(D)&&(0,g.checkLink)(D)?Object.keys(M).reduce((b,O)=>(b[O]=m(M[O],D),b),{}):(0,h.default)(M)&&(0,g.checkLink)(M)&&(0,u.default)(D)?Object.keys(D).reduce((b,O)=>(b[O]=m(M,D[O]),b),{}):(0,h.default)(M)&&(0,h.default)(D)?(0,g.checkLink)(M)||(0,g.checkLink)(D)?m(M,D):D:(0,u.default)(M)&&(0,u.default)(D)?[...new Set([...Object.keys(M),...Object.keys(D)])].reduce((O,j)=>(O[j]=m(M[j],D[j]),O),{}):D}function _(G,$){const A=(0,l.default)(G);return N(A,(M,D)=>{const b=M.component||M.child;if(b){const O=$.find(j=>j.name===b);O&&(M.link=S(O.link,M.link,{strict:!1}))}else D&&(M.link=S(D.link,M.link))},{key:"items"}),A}function L(G=[],{depth:$=1,transform:A=M=>M}={}){const M=(0,l.default)(G),D=[];return N(M,(b,O,{level:j})=>{if(j>=$){const{items:H=[]}=b;if(H&&Array.isArray(H)&&H.length>0){delete b.items;const U=H.map(ne=>A(ne,b));if(O)O.items.push(...U);else{const ne=A((0,a.default)(b,["items"]),O);D.push(ne,...U)}}else if(j===1){const U=A((0,a.default)(b,["items"]),O);D.push(U)}}else j===1&&D.push(b)},{key:"items",order:"last"}),D}function F(G={}){const $=[];function A(D,b={}){var Q,te,_e,je,Ft,Gt;const O=[],{children:j=[],meta:H={}}=D,U=(0,l.default)((H==null?void 0:H.navigation)||[]);(0,p.hasStartEngine)(H)&&((te=(Q=D.meta)==null?void 0:Q.capabilities)==null?void 0:te.navigation)!==!1&&O.push(...U);const ne=b.name||"",Ce=b.mountPoint||w,xe=D===G?"":H.name||"",Ae=D===G?"":D.mountPoint||w;for(const de of j){if(!(0,p.hasStartEngine)(de.meta))continue;const un=de.meta.name,Ii=de.mountPoint,Ti=[ne,xe,un].filter(Boolean).join("."),zi=de.meta.navigation||[],Pi=(0,s.joinURL)(Ce,Ae,Ii);((je=(_e=de.meta)==null?void 0:_e.capabilities)==null?void 0:je.navigation)!==!1&&$.push({did:de.meta.did,name:Ti,link:Pi,title:de.meta.title||"",navigation:zi.map(ze=>({section:C,...ze}))});const tt=U.find(ze=>ze.component?ze.component===un:!1);if(tt){if(!tt.link)if(de.meta.navigation&&de.meta.navigation.length>0){const ze=A(de,{mountPoint:Ae,name:xe});ze.length>0&&(tt.items=tt.items??[],tt.items.push(...ze))}else tt.link=y}else if(((Gt=(Ft=de.meta)==null?void 0:Ft.capabilities)==null?void 0:Gt.navigation)!==!1){const ze=A(de,{mountPoint:Ae,name:xe}),Wt={title:de.meta.title,component:un,id:de.meta.did};ze.length>0?(Wt.items=ze,Wt.link=void 0):Wt.link=y,O.push(Wt)}}return O}return{navigationList:A(G),components:$}}function W(G){const $=(0,l.default)(G).filter(A=>A.id);return N($,(A,M)=>{if(A.items&&A.items.length){for(let D=A.items.length-1;D>=0;D--)A.items[D].id||A.items.splice(D,1);A.items.length===0&&A.component&&(A.link=A.link||y)}M&&(A.parent=M.id,A.id=[M.id,A.id].join(x)),A.from=A.from||"yaml",A.visible=A.visible??!0},{key:"items"}),$}function B(G,$=2){const A=(0,l.default)(G),M=L(A,{depth:$,transform:(D,b)=>(b&&(D._parent||(D._parent=b.id,b.component||(D.link=S(b.link,D.link))),D.section=D.section||b.section||[C],D.visible=D.visible??b.visible,b.role&&(D.role=D.role||b.role)),D.component=[b.component,D.component].filter(Boolean).join("."),D)});return N(M,D=>{D.items&&D.items.length>0&&D.items.reduceRight((b,O)=>{if(O._parent){const j=D.items.findIndex(H=>H.id===O._parent);j>=0&&D.items.splice(j,1),delete O._parent}return null},null)},{key:"items"}),M}function J(G,$){return $&&Array.isArray(G.items)?G.items.filter(A=>(0,i.default)(A.section)?P(G.section,$):!!P(A.section,$)).map(A=>({...A,section:$})):[]}function X(G){const $=(0,l.default)(G),A=[];for(const M of $){let O=function(j,H){const U=J(j,H);b.push({...D,section:H,items:U})};const D=(0,l.default)((0,a.default)(M,["items"])),b=[];if(Array.isArray(M.section))for(const j of M.section)O(M,j);else if(M.section){const{section:j}=M;O(M,j)}else if(M.items&&M.items.length>0){const j=M.items.reduce((U,ne)=>{const{section:Ce=[C]}=ne||{};return U.push(...Ce),U},[]),H=[...new Set(j)];for(const U of H)O(M,U)}else b.push({...M,section:C});A.push(...b)}return A}function Y(G=[]){const $=(0,l.default)(G);return $.reduceRight((A,M,D)=>{if(M.parent){const b=$.find(O=>M.section&&O.section?O.section===M.section&&O.id===M.parent:O.id===M.parent);b&&(b.items||(b.items=[]),b.items=[M,...b.items]),$.splice(D,1)}return null},null),$}function oe(G,$=[]){const A=Y(G);return N(A,D=>{if(D!=null&&D.component&&($.some(b=>b.name===D.component)||(D.visible=!1)),D.items&&D.items.length)for(let b=D.items.length-1;b>=0;b--)D.items[b].visible===!1&&D.items.splice(b,1)},{key:"items"}),A.filter(D=>{var b;return!(D.visible===!1||D.items&&Array.isArray(D.items)&&D.items.length>0&&((b=D.items)!=null&&b.every(O=>O.visible===!1)))})}function le(G){return G.map($=>$.items&&Array.isArray($.items)&&$.items.length===1&&["header","footer","",void 0,null].includes($.section)?$.items[0]:$)}const ge=G=>{const[$,A]=(0,f.default)(G,M=>M.id==="/team");return[...$,...A]};t.sortRootNavigation=ge;const re=G=>{const[,$]=(0,f.default)(G,A=>{var D;const M=typeof A.title=="string"?A.title:(D=A.title)==null?void 0:D.en;return A.id==="/team"&&M==="Access"||A.id==="/dashboard"&&M==="Blocklet"});return $};t.cleanOldNavigationHistory=re;function V(G={},$={}){var xe,Ae;const{beforeProcess:A=Q=>Q}=$,{navigationList:M,components:D}=F(G);(xe=G==null?void 0:G.settings)!=null&&xe.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(Q=>!((Q==null?void 0:Q.parent)==="/team"&&Q.from==="tmpl")):G.settings.navigations=[]);const b=re(((Ae=G==null?void 0:G.settings)==null?void 0:Ae.navigations)||[]),O=B(A(M)),j=W(O),U=X(j).reduce((Q,te)=>["bottom","social","sessionManager","userCenter"].includes(te.section)&&te.items&&te.items.length>0?(Q.push(...te.items.map(je=>{const{section:Ft}=te,Gt=S(te.link,je.link),de=[te.component,je.component].filter(Boolean).join(".");return{...je,section:Ft,link:Gt,component:de,parent:""}})),Q):(Q.push(te),Q),[]),ne=L(U,{transform(Q,te){let{component:_e}=Q;return te!=null&&te.component&&(_e=[te.component,Q.component].filter(Boolean).join(".")),{...Q,component:_e}}});return{navigationList:(0,r.default)(k(b),ne,(Q,te)=>{const _e=["id","section"];return(0,e.default)((0,n.default)(Q,_e),(0,n.default)(te,_e))}),components:D,builtinList:ne}}})(pe);const xo=T.createContext(null),hr="/",Za="header",fr={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ze(Ct.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function pn(t,o){return t.section&&o.section?t.section===o.section&&t.id===o.id:t.id===o.id}const Ge=(t,o,r,e,n=!0)=>({id:t,from:"team-tmpl",title:o,icon:r,link:Ze(Ct.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:n}),el=(t,o,r)=>({id:t,from:"team-tmpl",title:o,role:["owner","admin","member"],section:["dashboard"],link:"",items:r}),tl=(t,o)=>{const r=pe.cleanOldNavigationHistory(o);return r.findIndex(n=>n.id==="/team")===-1&&r.unshift(el("/team",t("navigation.blockletService"),[Ge("dashboard",t("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),Ge("did-connect",t("navigation.didConnect"),"hugeicons:connect","/admin/did-connect"),Ge("website",t("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),Ge("operation",t("navigation.operations"),"grommet-icons:configure","/admin/operations"),Ge("integration",t("navigation.integration"),"hugeicons:webhook","/admin/integrations"),Ge("developer",t("navigation.developer"),"heroicons:command-line","/admin/developers"),Ge("did-spaces",t("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),Ge("studio",t("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),r};function pr({name:t}){return v.jsx(Ui,{label:`Uninstalled: ${t}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function nl({children:t}){const{blocklet:o,actions:r}=et(),{t:e}=De(),{navigationList:n,components:i,builtinList:a}=pe.parseNavigation(o,{beforeProcess(R){const k=we(R);return["dashboard","userCenter"].forEach(m=>{Object.prototype.hasOwnProperty.call(fr,m)&&fr[m].forEach(S=>{k.some(_=>_.id===S.id)||k.push(S)})}),tl(e,k)}}),l=kt({rawNavigation:we(n),activeSection:Za,components:i}),s=T.useMemo(()=>pe.nestNavigationList(we(l.rawNavigation)),[l.rawNavigation]),d=T.useMemo(()=>{const R=pe.filterNavigation(we(l.rawNavigation),i);return pe.joinLink(R,i)},[i,l.rawNavigation]),c=T.useCallback(R=>{if(!R.id)return"";const k=pe.flattenNavigation(pe.joinLink(s,i)),m=k.find(S=>S.id===R.id);if(m!=null&&m.component){if(!i.some(S=>S.name===m.component))return v.jsx(pr,{name:m.component})}else if(m.parent){const S=k.find(_=>_.id===m.parent);if(S!=null&&S.component&&!i.some(_=>_.name===S.component))return v.jsx(pr,{name:S.component})}return m==null?void 0:m.link},[s,i]),u=T.useCallback(R=>{l.activeSection=R},[l]),h=T.useCallback(R=>{const k=[];pe.deepWalk(R,(S,_)=>{const L={...It(S,["children","expand"]),parent:_==null?void 0:_.id};k.push(L)});const m=we(l.rawNavigation).filter(S=>{if(!l.activeSection)return!1;const _=k.find(L=>pn(L,S));return _?!pe.isMatchSection(_.section,l.activeSection):!0});l.rawNavigation=[...m,...k]},[l]),f=T.useCallback((R=[])=>{const k=we(l.rawNavigation).map(m=>{const S=R.find(_=>pn({..._,section:l.activeSection},m));return S?{...m,...S}:m});l.rawNavigation=k},[l]),p=T.useCallback((R,k=hr)=>R.map(S=>{const _=i.find(B=>B.name===S.component),L=(_==null?void 0:_.link)||k,F=S.items||[],{link:W}=S;return{title:S.title,description:S.description,subtitle:c(S),link:W,icon:S.icon,children:p(F,W||hr),section:S.section,visible:S.visible,parent:S.parent,component:S.component,id:S.id,role:S.role,from:S.from,__base:L}}),[i,c]),g=T.useCallback(R=>{f([R])},[f]),C=T.useCallback(R=>{const k=l.rawNavigation.filter(m=>m.id===R||m.parent===R).map(m=>m.id);l.rawNavigation=we(l.rawNavigation).filter(m=>!k.includes(m.id))},[l]),w=T.useCallback((R={},k=-1)=>{const m={...R,id:Ma.nanoid(),section:l.activeSection,visible:!0},S=[...l.rawNavigation],_=S.filter(L=>L.section===l.activeSection);if(k<0||k>_.length-1)S.push(m);else{const L=_[k],F=S.findIndex(W=>pn(W,L));S.splice(F,0,m)}return l.rawNavigation=S,m},[l]),y=T.useCallback(R=>{const m=we(s).filter(S=>pe.isMatchSection(S.section,R));return p(m)},[s,p]),x=T.useCallback(async R=>{const m=R.map(S=>ga(S,va)).map(S=>{const _={...S};return _.role&&Array.isArray(_.role)&&(_.role=JSON.stringify(_.role)),_.section&&Array.isArray(_.section)&&(_.section=JSON.stringify(_.section)),_.title&&_.title instanceof Object&&(_.title=JSON.stringify(_.title)),_.description&&_.description instanceof Object&&(_.description=JSON.stringify(_.description)),_.link&&_.link instanceof Object&&(_.link=JSON.stringify(_.link)),_});await r.configNavigations(m)},[r]),N=T.useCallback(async()=>{await x([]),l.rawNavigation=we(a)},[x,l,a]),P=T.useMemo(()=>({state:l,navigation:d,components:i,getNavigationFullLink:c,updateActiveSection:u,updateNavigationItem:g,delNavigationItem:C,addNavigationItem:w,updateNavigationTree:h,getNavigation:y,saveNavigationList:x,resetNavigation:N}),[l,d,i,c,u,g,C,w,h,y,x,N]);return v.jsx(xo.Provider,{value:P,children:t})}function bo(){const t=T.useContext(xo);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}var Ee={},Ro="Expected a function",gr=NaN,rl="[object Symbol]",ol=/^\s+|\s+$/g,il=/^[-+]0x[0-9a-f]+$/i,al=/^0b[01]+$/i,ll=/^0o[0-7]+$/i,sl=parseInt,cl=typeof Le=="object"&&Le&&Le.Object===Object&&Le,dl=typeof self=="object"&&self&&self.Object===Object&&self,ul=cl||dl||Function("return this")(),hl=Object.prototype,fl=hl.toString,pl=Math.max,gl=Math.min,gn=function(){return ul.Date.now()};function vl(t,o,r){var e,n,i,a,l,s,d=0,c=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(Ro);o=vr(o)||0,Zt(r)&&(c=!!r.leading,u="maxWait"in r,i=u?pl(vr(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function f(R){var k=e,m=n;return e=n=void 0,d=R,a=t.apply(m,k),a}function p(R){return d=R,l=setTimeout(w,o),c?f(R):a}function g(R){var k=R-s,m=R-d,S=o-k;return u?gl(S,i-m):S}function C(R){var k=R-s,m=R-d;return s===void 0||k>=o||k<0||u&&m>=i}function w(){var R=gn();if(C(R))return y(R);l=setTimeout(w,g(R))}function y(R){return l=void 0,h&&e?f(R):(e=n=void 0,a)}function x(){l!==void 0&&clearTimeout(l),d=0,e=s=n=l=void 0}function N(){return l===void 0?a:y(gn())}function P(){var R=gn(),k=C(R);if(e=arguments,n=this,s=R,k){if(l===void 0)return p(s);if(u)return l=setTimeout(w,o),f(s)}return l===void 0&&(l=setTimeout(w,o)),a}return P.cancel=x,P.flush=N,P}function ml(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(Ro);return Zt(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),vl(t,o,{leading:e,maxWait:o,trailing:n})}function Zt(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function Sl(t){return!!t&&typeof t=="object"}function yl(t){return typeof t=="symbol"||Sl(t)&&fl.call(t)==rl}function vr(t){if(typeof t=="number")return t;if(yl(t))return gr;if(Zt(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=Zt(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(ol,"");var r=al.test(t);return r||ll.test(t)?sl(t.slice(2),r?2:8):il.test(t)?gr:+t}var Cl=ml,rn={exports:{}},wt={exports:{}};(function(){var t,o,r,e,n,i;typeof performance<"u"&&performance!==null&&performance.now?wt.exports=function(){return performance.now()}:typeof gt<"u"&>!==null&>.hrtime?(wt.exports=function(){return(t()-n)/1e6},o=gt.hrtime,t=function(){var a;return a=o(),a[0]*1e9+a[1]},e=t(),i=gt.uptime()*1e9,n=e-i):Date.now?(wt.exports=function(){return Date.now()-r},r=Date.now()):(wt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Le);var _l=wt.exports,wl=_l,Me=typeof window>"u"?Le:window,$t=["moz","webkit"],ct="AnimationFrame",ut=Me["request"+ct],Pt=Me["cancel"+ct]||Me["cancelRequest"+ct];for(var vt=0;!ut&&vt<$t.length;vt++)ut=Me[$t[vt]+"Request"+ct],Pt=Me[$t[vt]+"Cancel"+ct]||Me[$t[vt]+"CancelRequest"+ct];if(!ut||!Pt){var vn=0,mr=0,qe=[],xl=1e3/60;ut=function(t){if(qe.length===0){var o=wl(),r=Math.max(0,xl-(o-vn));vn=r+o,setTimeout(function(){var e=qe.slice(0);qe.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(vn)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return qe.push({handle:++mr,callback:t,cancelled:!1}),mr},Pt=function(t){for(var o=0;o<qe.length;o++)qe[o].handle===t&&(qe[o].cancelled=!0)}}rn.exports=function(t){return ut.call(Me,t)};rn.exports.cancel=function(){Pt.apply(Me,arguments)};rn.exports.polyfill=function(t){t||(t=Me),t.requestAnimationFrame=ut,t.cancelAnimationFrame=Pt};var bl=rn.exports,En={};Object.defineProperty(En,"__esModule",{value:!0});En.default=Rl;function Rl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.noop=Il;Nt.intBetween=Tl;Nt.getCoords=zl;function Il(){}function Tl(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function zl(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Ee,"__esModule",{value:!0});var Pl=Ee.createHorizontalStrength=To,Dl=Ee.createVerticalStrength=zo,Ol=Ee.createScrollingComponent=Oo,kl=Ee.default=Vl;Ee.defaultVerticalStrength=Ee.defaultHorizontalStrength=void 0;var Tt=jl(T),mt=Lt(yo),Nl=Ot,Ll=Lt(Cl),Sr=Lt(bl),Ml=Lt(En),El=Li,Al=Lt(Vi),Ht=Nt;function Lt(t){return t&&t.__esModule?t:{default:t}}function jl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Yt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yt=function(r){return typeof r}:Yt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yt(t)}function en(){return en=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},en.apply(this,arguments)}function Fl(t,o){if(t==null)return{};var r=Gl(t,o),e,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Gl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i<e.length;i++)n=e[i],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function Wl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function $l(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function Hl(t,o,r){return o&&$l(t.prototype,o),t}function Bl(t,o){return o&&(Yt(o)==="object"||typeof o=="function")?o:xt(t)}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},In(t)}function Ul(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Tn(t,o)}function Tn(t,o){return Tn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Tn(t,o)}function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function St(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var Io=150;function To(t){return function(r,e){var n=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,t),d=e.x>=n&&e.x<=n+i,c=d&&e.y>=a&&e.y<=a+l;if(c){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+i-s)return-(n+i-e.x-s)/s}return 0}}function zo(t){return function(r,e){var n=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,t),d=e.y>=n&&e.y<=n+i,c=d&&e.x>=a&&e.x<=a+l;if(c){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+i-s)return-(n+i-e.y-s)/s}return 0}}var Po=To(Io);Ee.defaultHorizontalStrength=Po;var Do=zo(Io);Ee.defaultVerticalStrength=Do;function Oo(t){var o=function(r){Ul(e,r);function e(n,i){var a;return Wl(this,e),a=Bl(this,In(e).call(this,n,i)),St(xt(xt(a)),"updateScrolling",(0,Ll.default)(function(l){var s=a.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,f={x:d,y:c,w:u,h},p=(0,Ht.getCoords)(l),g=a.props,C=g.horizontalStrength,w=g.verticalStrength;a.scaleX=C(f,p),a.scaleY=w(f,p),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),St(xt(xt(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=Tt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Hl(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,Nl.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var d=i.scaleX,c=i.scaleY,u=i.container,h=i.props,f=h.strengthMultiplier,p=h.onScrollChange;if(f===0||d+c===0){i.stopScrolling();return}if(a+=1,a%2){var g=u.scrollLeft,C=u.scrollTop,w=u.scrollWidth,y=u.scrollHeight,x=u.clientWidth,N=u.clientHeight,P=d?u.scrollLeft=(0,Ht.intBetween)(0,w-x,g+d*f):g,R=c?u.scrollTop=(0,Ht.intBetween)(0,y-N,C+c*f):C;p(P,R)}i.frame=(0,Sr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Sr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=Fl(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Tt.default.createElement(t,en({ref:this.wrappedInstance},a))}}]),e}(Tt.Component);return St(o,"displayName","Scrolling(".concat((0,Ml.default)(t),")")),St(o,"propTypes",{dragDropManager:mt.default.object.isRequired,onScrollChange:mt.default.func,verticalStrength:mt.default.func,horizontalStrength:mt.default.func,strengthMultiplier:mt.default.number}),St(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:Do,horizontalStrength:Po,strengthMultiplier:30}),(0,Al.default)(o,t)}function Vl(t){var o=Oo(t);return function(r){return Tt.default.createElement(El.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Tt.default.createElement(o,en({},r,{dragDropManager:n}))})}}function ko(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function No(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Lo(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}ko.__suppressDeprecationWarning=!0;No.__suppressDeprecationWarning=!0;Lo.__suppressDeprecationWarning=!0;function Mt(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var i=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DyxFC42L.js","assets/vendor-ux-did-connect-BdkhddhO.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-BNHJB5U7.js","assets/vendor-mui-core-CQ38ohp2.js","assets/vendor-hooks-DftG_2gV.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-ScFEr-lj.js","assets/index-YbJjfDTR.js","assets/index-DO3_1y-L.js","assets/index-B1ljmpu4.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as nn,e as Le,r as T,d as Ot,g as ho,b as q}from"./vendor-react-DEoibe3W.js";import{bP as Di,aL as Oi,bQ as ki,br as Ni,j as Ct,u as De,bR as Li,bS as z,bT as Mi,bU as nr,bV as Ei,bW as rr,bX as Ai,bY as ji,I as he,a1 as Ln,s as fo,b9 as po,l as go,Y as _t,al as Fi,B as Gi,bq as vo,c as Wi}from"./vendor-ux-did-connect-BdkhddhO.js";import{a as kt,u as ie,z as $i,i as mo,e as So,A as Hi,f as Bi}from"./vendor-hooks-DftG_2gV.js";import{j as v,E as Ui,b2 as yo,cp as Vi,cq as se,cr as E,_ as ce,cs as qi,H as I,co as Ki,ct as Xi,cu as Yi,cv as Qi,cw as Ji,cx as Zi,cy as ea,cz as ta,cA as na,cB as ra,a9 as Z,T as Re,U as oa,W as or,I as Te,b3 as xn,y as Jt,v as Mn,O as ot,N as bn,ac as ia,aa,bo as Co,b_ as la,ag as sa,bb as ir,ah as hn,s as Je,w as Xt,e as ca,F as da,bk as ar,br as ua,bn as lr,q as sr,bw as fn,c7 as cr}from"./vendor-mui-core-CQ38ohp2.js";import{aB as ha,aC as fa,aD as pa,y as Ze,L as we,C as It,o as ga,b as va,q as gt,g as ma,az as Sa,A as st,aE as _o,aF as ya,a1 as dr,aG as Ca,z as _a,I as wa,G as xa,n as Oe}from"./vendor-utils-BNHJB5U7.js";import{r as ba}from"./omit-bLid3PKQ.js";import{r as Ra}from"./cloneDeep-SfcdeqEN.js";import{r as Ia,c as Qe,a0 as $e,_ as Ta,a1 as za,n as Pa,a2 as Da}from"./vendor-arcblock-ScFEr-lj.js";import{p as Oa}from"./index-YbJjfDTR.js";import{ay as ka,a0 as Na,a7 as La,C as et,f as Ma,z as Ea,az as Aa,aA as ja,E as Fa,aB as Ga,F as Fe,aC as Wa}from"./index-DO3_1y-L.js";import{_ as ae,a as it,b as me,c as Se,d as ye,r as $a}from"./slicedToArray-CPl5_eGD.js";import{S as Rn}from"./simple-select-DlrdVbaI.js";import{u as wo}from"./dashboard-8QXGSoVu.js";import{d as Ha}from"./ArrowDropDown-B0sLkJoY.js";import{a as Ba}from"./api-BrU7j0QA.js";import{u as Ua}from"./use-app-logo-B8Kl9EZt.js";import{D as Va,C as qa,P as Ka}from"./react-beautiful-dnd.esm-ByydTUk4.js";import{I as Xa}from"./iframe-DZ181i8X.js";import{f as ur}from"./format-error-BrmqJs5a.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-DldnaMbZ.js";import"./confirm-DqvNmeoz.js";import"./PlayArrow-DFH1Psjx.js";import"./get-safe-url-DBsPGn--.js";import"./session-VIMbdc9j.js";import"./index-DcBUShKK.js";import"./InfoOutlined-CQB5qKm-.js";import"./dot-BE1YP292.js";import"./useAsync-CGW40D2-.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-C_flBrm-.js";import"./raf-schd.esm-B3j6BePR.js";var pe={};const Ya=nn(ha),Qa=nn(fa),Ja=nn(pa);(function(t){var o=Le&&Le.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(t,"__esModule",{value:!0}),t.sortRootNavigation=t.cleanOldNavigationHistory=t.checkLink=void 0,t.parseNavigation=V,t.deepWalk=N,t.isMatchSection=P,t.nestNavigationList=Y,t.filterNavigation=oe,t.cleanOrphanNavigation=le,t.joinLink=_,t.flattenNavigation=L,t.splitNavigationBySection=X;const r=o(Ya),e=o(Di),n=o(Oi),i=o(Qa),a=o(ba),l=o(Ra),s=Ia,d=o(Oa),c=o(ka),u=o(ki),h=o(Ni),f=o(Ja),p=La,g=Na;Object.defineProperty(t,"checkLink",{enumerable:!0,get:function(){return g.checkLink}});const C="header",w="/",y="/",x="/";function N(G,$=()=>{},{key:A="children",order:M="first"}={}){function D(b,{index:O=0,parent:j=null,level:H=0}={}){Array.isArray(b)?b.forEach((U,ne)=>{D(U,{index:ne,parent:j,level:H+1})}):b&&(M==="first"&&$(b,j,{index:O,level:H}),D(b[A],{parent:b,level:H}),M==="last"&&$(b,j,{index:O,level:H}))}D(G)}function P(G,$){return $===C&&(0,i.default)(G)?!0:Array.isArray(G)?G.includes($):G===$}function R(G){try{return JSON.parse(G)}catch{return G}}function k(G){return G.map($=>{const A={...$};return A.role&&(A.role=R(A.role)),A.section&&(A.section=R(A.section)),A.title&&(A.title=R(A.title)),A.description&&(A.description=R(A.description)),A.link&&(A.link=R(A.link)),A})}function m(G="/",$=""){if((0,c.default)($||""))return $;const A=d.default.join(G,$||y);return A.length>1&&A.endsWith("/")?A.slice(0,A.length-1):A}function S(G,$,{strict:A=!0}={}){let M=G,D=$;return A||(M=M||"/",D=D||"/"),(0,u.default)(M)&&(0,h.default)(D)&&(0,g.checkLink)(D)?Object.keys(M).reduce((b,O)=>(b[O]=m(M[O],D),b),{}):(0,h.default)(M)&&(0,g.checkLink)(M)&&(0,u.default)(D)?Object.keys(D).reduce((b,O)=>(b[O]=m(M,D[O]),b),{}):(0,h.default)(M)&&(0,h.default)(D)?(0,g.checkLink)(M)||(0,g.checkLink)(D)?m(M,D):D:(0,u.default)(M)&&(0,u.default)(D)?[...new Set([...Object.keys(M),...Object.keys(D)])].reduce((O,j)=>(O[j]=m(M[j],D[j]),O),{}):D}function _(G,$){const A=(0,l.default)(G);return N(A,(M,D)=>{const b=M.component||M.child;if(b){const O=$.find(j=>j.name===b);O&&(M.link=S(O.link,M.link,{strict:!1}))}else D&&(M.link=S(D.link,M.link))},{key:"items"}),A}function L(G=[],{depth:$=1,transform:A=M=>M}={}){const M=(0,l.default)(G),D=[];return N(M,(b,O,{level:j})=>{if(j>=$){const{items:H=[]}=b;if(H&&Array.isArray(H)&&H.length>0){delete b.items;const U=H.map(ne=>A(ne,b));if(O)O.items.push(...U);else{const ne=A((0,a.default)(b,["items"]),O);D.push(ne,...U)}}else if(j===1){const U=A((0,a.default)(b,["items"]),O);D.push(U)}}else j===1&&D.push(b)},{key:"items",order:"last"}),D}function F(G={}){const $=[];function A(D,b={}){var Q,te,_e,je,Ft,Gt;const O=[],{children:j=[],meta:H={}}=D,U=(0,l.default)((H==null?void 0:H.navigation)||[]);(0,p.hasStartEngine)(H)&&((te=(Q=D.meta)==null?void 0:Q.capabilities)==null?void 0:te.navigation)!==!1&&O.push(...U);const ne=b.name||"",Ce=b.mountPoint||w,xe=D===G?"":H.name||"",Ae=D===G?"":D.mountPoint||w;for(const de of j){if(!(0,p.hasStartEngine)(de.meta))continue;const un=de.meta.name,Ii=de.mountPoint,Ti=[ne,xe,un].filter(Boolean).join("."),zi=de.meta.navigation||[],Pi=(0,s.joinURL)(Ce,Ae,Ii);((je=(_e=de.meta)==null?void 0:_e.capabilities)==null?void 0:je.navigation)!==!1&&$.push({did:de.meta.did,name:Ti,link:Pi,title:de.meta.title||"",navigation:zi.map(ze=>({section:C,...ze}))});const tt=U.find(ze=>ze.component?ze.component===un:!1);if(tt){if(!tt.link)if(de.meta.navigation&&de.meta.navigation.length>0){const ze=A(de,{mountPoint:Ae,name:xe});ze.length>0&&(tt.items=tt.items??[],tt.items.push(...ze))}else tt.link=y}else if(((Gt=(Ft=de.meta)==null?void 0:Ft.capabilities)==null?void 0:Gt.navigation)!==!1){const ze=A(de,{mountPoint:Ae,name:xe}),Wt={title:de.meta.title,component:un,id:de.meta.did};ze.length>0?(Wt.items=ze,Wt.link=void 0):Wt.link=y,O.push(Wt)}}return O}return{navigationList:A(G),components:$}}function W(G){const $=(0,l.default)(G).filter(A=>A.id);return N($,(A,M)=>{if(A.items&&A.items.length){for(let D=A.items.length-1;D>=0;D--)A.items[D].id||A.items.splice(D,1);A.items.length===0&&A.component&&(A.link=A.link||y)}M&&(A.parent=M.id,A.id=[M.id,A.id].join(x)),A.from=A.from||"yaml",A.visible=A.visible??!0},{key:"items"}),$}function B(G,$=2){const A=(0,l.default)(G),M=L(A,{depth:$,transform:(D,b)=>(b&&(D._parent||(D._parent=b.id,b.component||(D.link=S(b.link,D.link))),D.section=D.section||b.section||[C],D.visible=D.visible??b.visible,b.role&&(D.role=D.role||b.role)),D.component=[b.component,D.component].filter(Boolean).join("."),D)});return N(M,D=>{D.items&&D.items.length>0&&D.items.reduceRight((b,O)=>{if(O._parent){const j=D.items.findIndex(H=>H.id===O._parent);j>=0&&D.items.splice(j,1),delete O._parent}return null},null)},{key:"items"}),M}function J(G,$){return $&&Array.isArray(G.items)?G.items.filter(A=>(0,i.default)(A.section)?P(G.section,$):!!P(A.section,$)).map(A=>({...A,section:$})):[]}function X(G){const $=(0,l.default)(G),A=[];for(const M of $){let O=function(j,H){const U=J(j,H);b.push({...D,section:H,items:U})};const D=(0,l.default)((0,a.default)(M,["items"])),b=[];if(Array.isArray(M.section))for(const j of M.section)O(M,j);else if(M.section){const{section:j}=M;O(M,j)}else if(M.items&&M.items.length>0){const j=M.items.reduce((U,ne)=>{const{section:Ce=[C]}=ne||{};return U.push(...Ce),U},[]),H=[...new Set(j)];for(const U of H)O(M,U)}else b.push({...M,section:C});A.push(...b)}return A}function Y(G=[]){const $=(0,l.default)(G);return $.reduceRight((A,M,D)=>{if(M.parent){const b=$.find(O=>M.section&&O.section?O.section===M.section&&O.id===M.parent:O.id===M.parent);b&&(b.items||(b.items=[]),b.items=[M,...b.items]),$.splice(D,1)}return null},null),$}function oe(G,$=[]){const A=Y(G);return N(A,D=>{if(D!=null&&D.component&&($.some(b=>b.name===D.component)||(D.visible=!1)),D.items&&D.items.length)for(let b=D.items.length-1;b>=0;b--)D.items[b].visible===!1&&D.items.splice(b,1)},{key:"items"}),A.filter(D=>{var b;return!(D.visible===!1||D.items&&Array.isArray(D.items)&&D.items.length>0&&((b=D.items)!=null&&b.every(O=>O.visible===!1)))})}function le(G){return G.map($=>$.items&&Array.isArray($.items)&&$.items.length===1&&["header","footer","",void 0,null].includes($.section)?$.items[0]:$)}const ge=G=>{const[$,A]=(0,f.default)(G,M=>M.id==="/team");return[...$,...A]};t.sortRootNavigation=ge;const re=G=>{const[,$]=(0,f.default)(G,A=>{var D;const M=typeof A.title=="string"?A.title:(D=A.title)==null?void 0:D.en;return A.id==="/team"&&M==="Access"||A.id==="/dashboard"&&M==="Blocklet"});return $};t.cleanOldNavigationHistory=re;function V(G={},$={}){var xe,Ae;const{beforeProcess:A=Q=>Q}=$,{navigationList:M,components:D}=F(G);(xe=G==null?void 0:G.settings)!=null&&xe.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(Q=>!((Q==null?void 0:Q.parent)==="/team"&&Q.from==="tmpl")):G.settings.navigations=[]);const b=re(((Ae=G==null?void 0:G.settings)==null?void 0:Ae.navigations)||[]),O=B(A(M)),j=W(O),U=X(j).reduce((Q,te)=>["bottom","social","sessionManager","userCenter"].includes(te.section)&&te.items&&te.items.length>0?(Q.push(...te.items.map(je=>{const{section:Ft}=te,Gt=S(te.link,je.link),de=[te.component,je.component].filter(Boolean).join(".");return{...je,section:Ft,link:Gt,component:de,parent:""}})),Q):(Q.push(te),Q),[]),ne=L(U,{transform(Q,te){let{component:_e}=Q;return te!=null&&te.component&&(_e=[te.component,Q.component].filter(Boolean).join(".")),{...Q,component:_e}}});return{navigationList:(0,r.default)(k(b),ne,(Q,te)=>{const _e=["id","section"];return(0,e.default)((0,n.default)(Q,_e),(0,n.default)(te,_e))}),components:D,builtinList:ne}}})(pe);const xo=T.createContext(null),hr="/",Za="header",fr={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ct.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ze(Ct.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function pn(t,o){return t.section&&o.section?t.section===o.section&&t.id===o.id:t.id===o.id}const Ge=(t,o,r,e,n=!0)=>({id:t,from:"team-tmpl",title:o,icon:r,link:Ze(Ct.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:n}),el=(t,o,r)=>({id:t,from:"team-tmpl",title:o,role:["owner","admin","member"],section:["dashboard"],link:"",items:r}),tl=(t,o)=>{const r=pe.cleanOldNavigationHistory(o);return r.findIndex(n=>n.id==="/team")===-1&&r.unshift(el("/team",t("navigation.blockletService"),[Ge("dashboard",t("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),Ge("did-connect",t("navigation.didConnect"),"hugeicons:connect","/admin/did-connect"),Ge("website",t("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),Ge("operation",t("navigation.operations"),"grommet-icons:configure","/admin/operations"),Ge("integration",t("navigation.integration"),"hugeicons:webhook","/admin/integrations"),Ge("developer",t("navigation.developer"),"heroicons:command-line","/admin/developers"),Ge("did-spaces",t("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),Ge("studio",t("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),r};function pr({name:t}){return v.jsx(Ui,{label:`Uninstalled: ${t}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function nl({children:t}){const{blocklet:o,actions:r}=et(),{t:e}=De(),{navigationList:n,components:i,builtinList:a}=pe.parseNavigation(o,{beforeProcess(R){const k=we(R);return["dashboard","userCenter"].forEach(m=>{Object.prototype.hasOwnProperty.call(fr,m)&&fr[m].forEach(S=>{k.some(_=>_.id===S.id)||k.push(S)})}),tl(e,k)}}),l=kt({rawNavigation:we(n),activeSection:Za,components:i}),s=T.useMemo(()=>pe.nestNavigationList(we(l.rawNavigation)),[l.rawNavigation]),d=T.useMemo(()=>{const R=pe.filterNavigation(we(l.rawNavigation),i);return pe.joinLink(R,i)},[i,l.rawNavigation]),c=T.useCallback(R=>{if(!R.id)return"";const k=pe.flattenNavigation(pe.joinLink(s,i)),m=k.find(S=>S.id===R.id);if(m!=null&&m.component){if(!i.some(S=>S.name===m.component))return v.jsx(pr,{name:m.component})}else if(m.parent){const S=k.find(_=>_.id===m.parent);if(S!=null&&S.component&&!i.some(_=>_.name===S.component))return v.jsx(pr,{name:S.component})}return m==null?void 0:m.link},[s,i]),u=T.useCallback(R=>{l.activeSection=R},[l]),h=T.useCallback(R=>{const k=[];pe.deepWalk(R,(S,_)=>{const L={...It(S,["children","expand"]),parent:_==null?void 0:_.id};k.push(L)});const m=we(l.rawNavigation).filter(S=>{if(!l.activeSection)return!1;const _=k.find(L=>pn(L,S));return _?!pe.isMatchSection(_.section,l.activeSection):!0});l.rawNavigation=[...m,...k]},[l]),f=T.useCallback((R=[])=>{const k=we(l.rawNavigation).map(m=>{const S=R.find(_=>pn({..._,section:l.activeSection},m));return S?{...m,...S}:m});l.rawNavigation=k},[l]),p=T.useCallback((R,k=hr)=>R.map(S=>{const _=i.find(B=>B.name===S.component),L=(_==null?void 0:_.link)||k,F=S.items||[],{link:W}=S;return{title:S.title,description:S.description,subtitle:c(S),link:W,icon:S.icon,children:p(F,W||hr),section:S.section,visible:S.visible,parent:S.parent,component:S.component,id:S.id,role:S.role,from:S.from,__base:L}}),[i,c]),g=T.useCallback(R=>{f([R])},[f]),C=T.useCallback(R=>{const k=l.rawNavigation.filter(m=>m.id===R||m.parent===R).map(m=>m.id);l.rawNavigation=we(l.rawNavigation).filter(m=>!k.includes(m.id))},[l]),w=T.useCallback((R={},k=-1)=>{const m={...R,id:Ma.nanoid(),section:l.activeSection,visible:!0},S=[...l.rawNavigation],_=S.filter(L=>L.section===l.activeSection);if(k<0||k>_.length-1)S.push(m);else{const L=_[k],F=S.findIndex(W=>pn(W,L));S.splice(F,0,m)}return l.rawNavigation=S,m},[l]),y=T.useCallback(R=>{const m=we(s).filter(S=>pe.isMatchSection(S.section,R));return p(m)},[s,p]),x=T.useCallback(async R=>{const m=R.map(S=>ga(S,va)).map(S=>{const _={...S};return _.role&&Array.isArray(_.role)&&(_.role=JSON.stringify(_.role)),_.section&&Array.isArray(_.section)&&(_.section=JSON.stringify(_.section)),_.title&&_.title instanceof Object&&(_.title=JSON.stringify(_.title)),_.description&&_.description instanceof Object&&(_.description=JSON.stringify(_.description)),_.link&&_.link instanceof Object&&(_.link=JSON.stringify(_.link)),_});await r.configNavigations(m)},[r]),N=T.useCallback(async()=>{await x([]),l.rawNavigation=we(a)},[x,l,a]),P=T.useMemo(()=>({state:l,navigation:d,components:i,getNavigationFullLink:c,updateActiveSection:u,updateNavigationItem:g,delNavigationItem:C,addNavigationItem:w,updateNavigationTree:h,getNavigation:y,saveNavigationList:x,resetNavigation:N}),[l,d,i,c,u,g,C,w,h,y,x,N]);return v.jsx(xo.Provider,{value:P,children:t})}function bo(){const t=T.useContext(xo);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}var Ee={},Ro="Expected a function",gr=NaN,rl="[object Symbol]",ol=/^\s+|\s+$/g,il=/^[-+]0x[0-9a-f]+$/i,al=/^0b[01]+$/i,ll=/^0o[0-7]+$/i,sl=parseInt,cl=typeof Le=="object"&&Le&&Le.Object===Object&&Le,dl=typeof self=="object"&&self&&self.Object===Object&&self,ul=cl||dl||Function("return this")(),hl=Object.prototype,fl=hl.toString,pl=Math.max,gl=Math.min,gn=function(){return ul.Date.now()};function vl(t,o,r){var e,n,i,a,l,s,d=0,c=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(Ro);o=vr(o)||0,Zt(r)&&(c=!!r.leading,u="maxWait"in r,i=u?pl(vr(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function f(R){var k=e,m=n;return e=n=void 0,d=R,a=t.apply(m,k),a}function p(R){return d=R,l=setTimeout(w,o),c?f(R):a}function g(R){var k=R-s,m=R-d,S=o-k;return u?gl(S,i-m):S}function C(R){var k=R-s,m=R-d;return s===void 0||k>=o||k<0||u&&m>=i}function w(){var R=gn();if(C(R))return y(R);l=setTimeout(w,g(R))}function y(R){return l=void 0,h&&e?f(R):(e=n=void 0,a)}function x(){l!==void 0&&clearTimeout(l),d=0,e=s=n=l=void 0}function N(){return l===void 0?a:y(gn())}function P(){var R=gn(),k=C(R);if(e=arguments,n=this,s=R,k){if(l===void 0)return p(s);if(u)return l=setTimeout(w,o),f(s)}return l===void 0&&(l=setTimeout(w,o)),a}return P.cancel=x,P.flush=N,P}function ml(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(Ro);return Zt(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),vl(t,o,{leading:e,maxWait:o,trailing:n})}function Zt(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function Sl(t){return!!t&&typeof t=="object"}function yl(t){return typeof t=="symbol"||Sl(t)&&fl.call(t)==rl}function vr(t){if(typeof t=="number")return t;if(yl(t))return gr;if(Zt(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=Zt(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(ol,"");var r=al.test(t);return r||ll.test(t)?sl(t.slice(2),r?2:8):il.test(t)?gr:+t}var Cl=ml,rn={exports:{}},wt={exports:{}};(function(){var t,o,r,e,n,i;typeof performance<"u"&&performance!==null&&performance.now?wt.exports=function(){return performance.now()}:typeof gt<"u"&>!==null&>.hrtime?(wt.exports=function(){return(t()-n)/1e6},o=gt.hrtime,t=function(){var a;return a=o(),a[0]*1e9+a[1]},e=t(),i=gt.uptime()*1e9,n=e-i):Date.now?(wt.exports=function(){return Date.now()-r},r=Date.now()):(wt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Le);var _l=wt.exports,wl=_l,Me=typeof window>"u"?Le:window,$t=["moz","webkit"],ct="AnimationFrame",ut=Me["request"+ct],Pt=Me["cancel"+ct]||Me["cancelRequest"+ct];for(var vt=0;!ut&&vt<$t.length;vt++)ut=Me[$t[vt]+"Request"+ct],Pt=Me[$t[vt]+"Cancel"+ct]||Me[$t[vt]+"CancelRequest"+ct];if(!ut||!Pt){var vn=0,mr=0,qe=[],xl=1e3/60;ut=function(t){if(qe.length===0){var o=wl(),r=Math.max(0,xl-(o-vn));vn=r+o,setTimeout(function(){var e=qe.slice(0);qe.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(vn)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return qe.push({handle:++mr,callback:t,cancelled:!1}),mr},Pt=function(t){for(var o=0;o<qe.length;o++)qe[o].handle===t&&(qe[o].cancelled=!0)}}rn.exports=function(t){return ut.call(Me,t)};rn.exports.cancel=function(){Pt.apply(Me,arguments)};rn.exports.polyfill=function(t){t||(t=Me),t.requestAnimationFrame=ut,t.cancelAnimationFrame=Pt};var bl=rn.exports,En={};Object.defineProperty(En,"__esModule",{value:!0});En.default=Rl;function Rl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.noop=Il;Nt.intBetween=Tl;Nt.getCoords=zl;function Il(){}function Tl(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function zl(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Ee,"__esModule",{value:!0});var Pl=Ee.createHorizontalStrength=To,Dl=Ee.createVerticalStrength=zo,Ol=Ee.createScrollingComponent=Oo,kl=Ee.default=Vl;Ee.defaultVerticalStrength=Ee.defaultHorizontalStrength=void 0;var Tt=jl(T),mt=Lt(yo),Nl=Ot,Ll=Lt(Cl),Sr=Lt(bl),Ml=Lt(En),El=Li,Al=Lt(Vi),Ht=Nt;function Lt(t){return t&&t.__esModule?t:{default:t}}function jl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Yt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yt=function(r){return typeof r}:Yt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yt(t)}function en(){return en=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},en.apply(this,arguments)}function Fl(t,o){if(t==null)return{};var r=Gl(t,o),e,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Gl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i<e.length;i++)n=e[i],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function Wl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function $l(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function Hl(t,o,r){return o&&$l(t.prototype,o),t}function Bl(t,o){return o&&(Yt(o)==="object"||typeof o=="function")?o:xt(t)}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},In(t)}function Ul(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Tn(t,o)}function Tn(t,o){return Tn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Tn(t,o)}function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function St(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var Io=150;function To(t){return function(r,e){var n=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,t),d=e.x>=n&&e.x<=n+i,c=d&&e.y>=a&&e.y<=a+l;if(c){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+i-s)return-(n+i-e.x-s)/s}return 0}}function zo(t){return function(r,e){var n=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,t),d=e.y>=n&&e.y<=n+i,c=d&&e.x>=a&&e.x<=a+l;if(c){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+i-s)return-(n+i-e.y-s)/s}return 0}}var Po=To(Io);Ee.defaultHorizontalStrength=Po;var Do=zo(Io);Ee.defaultVerticalStrength=Do;function Oo(t){var o=function(r){Ul(e,r);function e(n,i){var a;return Wl(this,e),a=Bl(this,In(e).call(this,n,i)),St(xt(xt(a)),"updateScrolling",(0,Ll.default)(function(l){var s=a.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,f={x:d,y:c,w:u,h},p=(0,Ht.getCoords)(l),g=a.props,C=g.horizontalStrength,w=g.verticalStrength;a.scaleX=C(f,p),a.scaleY=w(f,p),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),St(xt(xt(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=Tt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Hl(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,Nl.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var d=i.scaleX,c=i.scaleY,u=i.container,h=i.props,f=h.strengthMultiplier,p=h.onScrollChange;if(f===0||d+c===0){i.stopScrolling();return}if(a+=1,a%2){var g=u.scrollLeft,C=u.scrollTop,w=u.scrollWidth,y=u.scrollHeight,x=u.clientWidth,N=u.clientHeight,P=d?u.scrollLeft=(0,Ht.intBetween)(0,w-x,g+d*f):g,R=c?u.scrollTop=(0,Ht.intBetween)(0,y-N,C+c*f):C;p(P,R)}i.frame=(0,Sr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Sr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=Fl(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Tt.default.createElement(t,en({ref:this.wrappedInstance},a))}}]),e}(Tt.Component);return St(o,"displayName","Scrolling(".concat((0,Ml.default)(t),")")),St(o,"propTypes",{dragDropManager:mt.default.object.isRequired,onScrollChange:mt.default.func,verticalStrength:mt.default.func,horizontalStrength:mt.default.func,strengthMultiplier:mt.default.number}),St(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:Do,horizontalStrength:Po,strengthMultiplier:30}),(0,Al.default)(o,t)}function Vl(t){var o=Oo(t);return function(r){return Tt.default.createElement(El.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Tt.default.createElement(o,en({},r,{dragDropManager:n}))})}}function ko(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function No(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Lo(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}ko.__suppressDeprecationWarning=!0;No.__suppressDeprecationWarning=!0;Lo.__suppressDeprecationWarning=!0;function Mt(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var i=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
3
3
|
|
|
4
4
|
`+i+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?`
|
|
5
5
|
`+r:"")+(e!==null?`
|
|
@@ -16,7 +16,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStat
|
|
|
16
16
|
`+n:"")+`
|
|
17
17
|
|
|
18
18
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
19
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(o.componentWillMount=ii,o.componentWillReceiveProps=ai),typeof o.getSnapshotBeforeUpdate=="function"){if(typeof o.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");o.componentWillUpdate=li;var l=o.componentDidUpdate;o.componentDidUpdate=function(d,c,u){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;l.call(this,d,c,h)}}return t}function si(t){var o=t.targetIndex,r=t.node,e=t.currentIndex,n=t.getNodeKey,i=t.path,a=i===void 0?[]:i,l=t.lowerSiblingCounts,s=l===void 0?[]:l,d=t.ignoreCollapsed,c=d===void 0?!0:d,u=t.isPseudoRoot,h=u===void 0?!1:u,f=h?[]:[].concat(ee(a),[n({node:r,treeIndex:e})]);if(e===o)return{node:r,lowerSiblingCounts:s,path:f};if(!r.children||c&&r.expanded!==!0)return{nextIndex:e+1};for(var p=e+1,g=r.children.length,C=0;C<g;C+=1){var w=si({ignoreCollapsed:c,getNodeKey:n,targetIndex:o,node:r.children[C],currentIndex:p,lowerSiblingCounts:[].concat(ee(s),[g-C-1]),path:f});if(w.node)return w;p=w.nextIndex}return{nextIndex:p}}function Bn(t){var o=t.node,r=t.ignoreCollapsed,e=r===void 0?!0:r;return si({getNodeKey:function(){},ignoreCollapsed:e,node:o,currentIndex:0,targetIndex:-1}).nextIndex-1}function ci(t){var o=t.callback,r=t.getNodeKey,e=t.ignoreCollapsed,n=t.isPseudoRoot,i=n===void 0?!1:n,a=t.node,l=t.parentNode,s=l===void 0?null:l,d=t.currentIndex,c=t.path,u=c===void 0?[]:c,h=t.lowerSiblingCounts,f=h===void 0?[]:h,p=i?[]:[].concat(ee(u),[r({node:a,treeIndex:d})]),g=i?null:{node:a,parentNode:s,path:p,lowerSiblingCounts:f,treeIndex:d};if(!i){var C=o(g);if(C===!1)return!1}if(!a.children||a.expanded!==!0&&e&&!i)return d;var w=d,y=a.children.length;if(typeof a.children!="function"){for(var x=0;x<y;x+=1)if(w=ci({callback:o,getNodeKey:r,ignoreCollapsed:e,node:a.children[x],parentNode:i?null:a,currentIndex:w+1,lowerSiblingCounts:[].concat(ee(f),[y-x-1]),path:p}),w===!1)return!1}return w}function di(t){var o=t.callback,r=t.getNodeKey,e=t.ignoreCollapsed,n=t.isPseudoRoot,i=n===void 0?!1:n,a=t.node,l=t.parentNode,s=l===void 0?null:l,d=t.currentIndex,c=t.path,u=c===void 0?[]:c,h=t.lowerSiblingCounts,f=h===void 0?[]:h,p=K({},a),g=i?[]:[].concat(ee(u),[r({node:p,treeIndex:d})]),C={node:p,parentNode:s,path:g,lowerSiblingCounts:f,treeIndex:d};if(!p.children||p.expanded!==!0&&e&&!i)return{treeIndex:d,node:o(C)};var w=d,y=p.children.length;return typeof p.children!="function"&&(p.children=p.children.map(function(x,N){var P=di({callback:o,getNodeKey:r,ignoreCollapsed:e,node:x,parentNode:i?null:p,currentIndex:w+1,lowerSiblingCounts:[].concat(ee(f),[y-N-1]),path:g});return w=P.treeIndex,P.node})),{node:o(C),treeIndex:w}}function ui(t){var o=t.treeData,r=t.getNodeKey,e=t.callback,n=t.ignoreCollapsed,i=n===void 0?!0:n;!o||o.length<1||ci({callback:e,getNodeKey:r,ignoreCollapsed:i,isPseudoRoot:!0,node:{children:o},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function oc(t){var o=t.treeData,r=t.getNodeKey,e=t.callback,n=t.ignoreCollapsed,i=n===void 0?!0:n;return!o||o.length<1?[]:di({callback:e,getNodeKey:r,ignoreCollapsed:i,isPseudoRoot:!0,node:{children:o},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function ic(t){var o=t.treeData,r=t.expanded,e=r===void 0?!0:r;return oc({treeData:o,callback:function(i){var a=i.node;return K(K({},a),{},{expanded:e})},getNodeKey:function(i){var a=i.treeIndex;return a},ignoreCollapsed:!1})}function Rt(t){var o=t.treeData,r=t.path,e=t.newNode,n=t.getNodeKey,i=t.ignoreCollapsed,a=i===void 0?!0:i,l="RESULT_MISS",s=function c(u){var h=u.isPseudoRoot,f=h===void 0?!1:h,p=u.node,g=u.currentTreeIndex,C=u.pathIndex;if(!f&&n({node:p,treeIndex:g})!==r[C])return l;if(C>=r.length-1)return typeof e=="function"?e({node:p,treeIndex:g}):e;if(!p.children)throw new Error("Path referenced children of node with no children.");for(var w=g+1,y=0;y<p.children.length;y+=1){var x=c({node:p.children[y],currentTreeIndex:w,pathIndex:C+1});if(x!==l)return x?K(K({},p),{},{children:[].concat(ee(p.children.slice(0,y)),[x],ee(p.children.slice(y+1)))}):K(K({},p),{},{children:[].concat(ee(p.children.slice(0,y)),ee(p.children.slice(y+1)))});w+=1+Bn({node:p.children[y],ignoreCollapsed:a})}return l},d=s({node:{children:o},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(d===l)throw new Error("No node found at the given path.");return d.children}function ac(t){var o=t.treeData,r=t.path,e=t.getNodeKey,n=t.ignoreCollapsed,i=n===void 0?!0:n,a=null,l=null,s=Rt({treeData:o,path:r,getNodeKey:e,ignoreCollapsed:i,newNode:function(c){var u=c.node,h=c.treeIndex;return a=u,l=h,null}});return{treeData:s,node:a,treeIndex:l}}function hi(t){var o=t.targetDepth,r=t.minimumTreeIndex,e=t.newNode,n=t.ignoreCollapsed,i=t.expandParent,a=t.isPseudoRoot,l=a===void 0?!1:a,s=t.isLastChild,d=t.node,c=t.currentIndex,u=t.currentDepth,h=t.getNodeKey,f=t.path,p=f===void 0?[]:f,g=function(J){return l?[]:[].concat(ee(p),[h({node:J,treeIndex:c})])};if(c>=r-1||s&&!(d.children&&d.children.length)){if(typeof d.children=="function")throw new Error("Cannot add to children defined by a function");var C=i?{expanded:!0}:{},w=K(K(K({},d),C),{},{children:d.children?[e].concat(ee(d.children)):[e]});return{node:w,nextIndex:c+2,insertedTreeIndex:c+1,parentPath:g(w),parentNode:l?null:w}}if(u>=o-1){if(!d.children||typeof d.children=="function"||d.expanded!==!0&&n&&!l)return{node:d,nextIndex:c+1};for(var y=c+1,x=null,N=null,P=0;P<d.children.length;P+=1){if(y>=r){x=y,N=P;break}y+=1+Bn({node:d.children[P],ignoreCollapsed:n})}if(N===null){if(y<r&&!s)return{node:d,nextIndex:y};x=y,N=d.children.length}var R=K(K({},d),{},{children:[].concat(ee(d.children.slice(0,N)),[e],ee(d.children.slice(N)))});return{node:R,nextIndex:y,insertedTreeIndex:x,parentPath:g(R),parentNode:l?null:R}}if(!d.children||typeof d.children=="function"||d.expanded!==!0&&n&&!l)return{node:d,nextIndex:c+1};var k=null,m=null,S=null,_=c+1,L=d.children;typeof L!="function"&&(L=L.map(function(B,J){if(k!==null)return B;var X=hi({targetDepth:o,minimumTreeIndex:r,newNode:e,ignoreCollapsed:n,expandParent:i,isLastChild:s&&J===L.length-1,node:B,currentIndex:_,currentDepth:u+1,getNodeKey:h,path:[]});return"insertedTreeIndex"in X&&(k=X.insertedTreeIndex,S=X.parentNode,m=X.parentPath),_=X.nextIndex,X.node}));var F=K(K({},d),{},{children:L}),W={node:F,nextIndex:_};return k!==null&&(W.insertedTreeIndex=k,W.parentPath=[].concat(ee(g(F)),ee(m)),W.parentNode=S),W}function fi(t){var o=t.treeData,r=t.depth,e=t.minimumTreeIndex,n=t.newNode,i=t.getNodeKey,a=i===void 0?function(){}:i,l=t.ignoreCollapsed,s=l===void 0?!0:l,d=t.expandParent,c=d===void 0?!1:d;if(!o&&r===0)return{treeData:[n],treeIndex:0,path:[a({node:n,treeIndex:0})],parentNode:null};var u=hi({targetDepth:r,minimumTreeIndex:e,newNode:n,ignoreCollapsed:s,expandParent:c,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:o},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in u))throw new Error("No suitable position found to insert.");var h=u.insertedTreeIndex;return{treeData:u.node.children,treeIndex:h,path:[].concat(ee(u.parentPath),[a({node:n,treeIndex:h})]),parentNode:u.parentNode}}function lc(t){var o=t.treeData,r=t.getNodeKey,e=t.ignoreCollapsed,n=e===void 0?!0:e;if(!o||o.length<1)return[];var i=[];return ui({treeData:o,getNodeKey:r,ignoreCollapsed:n,callback:function(l){i.push(l)}}),i}function pi(t,o){return!!t.children&&typeof t.children!="function"&&t.children.some(function(r){return r===o||pi(r,o)})}function gi(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.children?typeof t.children=="function"?o+1:t.children.reduce(function(r,e){return Math.max(r,gi(e,o+1))},o):o}function sc(t){var o=t.getNodeKey,r=t.treeData,e=t.searchQuery,n=t.searchMethod,i=t.searchFocusOffset,a=t.expandAllMatchPaths,l=a===void 0?!1:a,s=t.expandFocusMatchPaths,d=s===void 0?!0:s,c=0,u=function f(p){var g=p.isPseudoRoot,C=g===void 0?!1:g,w=p.node,y=p.currentIndex,x=p.path,N=x===void 0?[]:x,P=[],R=!1,k=!1,m=C?[]:[].concat(ee(N),[o({node:w,treeIndex:y})]),S=C?null:{path:m,treeIndex:y},_=w.children&&typeof w.children!="function"&&w.children.length>0;!C&&n(K(K({},S),{},{node:w,searchQuery:e}))&&(c===i&&(k=!0),c+=1,R=!0);var L=y,F=K({},w);return _&&(F.children=F.children.map(function(W){var B=f({node:W,currentIndex:L+1,path:m});return B.node.expanded?L=B.treeIndex:L+=1,(B.matches.length>0||B.hasFocusMatch)&&(P=[].concat(ee(P),ee(B.matches)),B.hasFocusMatch&&(k=!0),(l&&B.matches.length>0||(l||d)&&B.hasFocusMatch)&&(F.expanded=!0)),B.node})),!C&&!F.expanded&&(P=P.map(function(W){return K(K({},W),{},{treeIndex:null})})),R&&(P=[K(K({},S),{},{node:F})].concat(ee(P))),{node:P.length>0?F:w,matches:P,hasFocusMatch:k,treeIndex:L}},h=u({node:{children:r},isPseudoRoot:!0,currentIndex:-1});return{matches:h.matches,treeData:h.node.children}}function ve(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return o.filter(Boolean).join(" ")}function cc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var Un=function(t){an(r,t);var o=cc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.scaffoldBlockPxWidth,a=n.toggleChildrenVisibility,l=n.connectDragPreview,s=n.connectDragSource,d=n.isDragging,c=n.canDrop,u=n.canDrag,h=n.node,f=n.title,p=n.subtitle,g=n.draggedNode,C=n.path,w=n.treeIndex,y=n.isSearchMatch,x=n.isSearchFocus,N=n.buttons,P=n.className,R=n.style,k=n.didDrop;n.treeId,n.isOver,n.parentNode;var m=n.rowDirection,S=Hn(n,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),_=f||h.title,L=p||h.subtitle,F=m==="rtl"?"rst__rtl":null,W;u&&(typeof h.children=="function"&&h.expanded?W=q.createElement("div",{className:"rst__loadingHandle"},q.createElement("div",{className:"rst__loadingCircle"},ee(new Array(12)).map(function(Y,oe){return q.createElement("div",{key:oe,className:ve("rst__loadingCirclePoint",F)})}))):W=s(q.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var B=g&&pi(g,h),J=!k&&d,X={left:-.5*i};return m==="rtl"&&(X={right:-.5*i}),q.createElement("div",Ve({style:{height:"100%"}},S),a&&h.children&&(h.children.length>0||typeof h.children=="function")&&q.createElement("div",null,q.createElement("button",{type:"button","aria-label":h.expanded?"Collapse":"Expand",className:ve(h.expanded?"rst__collapseButton":"rst__expandButton",F),style:X,onClick:function(){return a({node:h,path:C,treeIndex:w})}}),h.expanded&&!d&&q.createElement("div",{style:{width:i},className:ve("rst__lineChildren",F)})),q.createElement("div",{className:ve("rst__rowWrapper",F)},l(q.createElement("div",{className:ve("rst__row",J&&"rst__rowLandingPad",J&&!c&&"rst__rowCancelPad",y&&"rst__rowSearchMatch",x&&"rst__rowSearchFocus",F,P),style:K({opacity:B?.5:1},R)},W,q.createElement("div",{className:ve("rst__rowContents",!u&&"rst__rowContentsDragDisabled",F)},q.createElement("div",{className:ve("rst__rowLabel",F)},q.createElement("span",{className:ve("rst__rowTitle",h.subtitle&&"rst__rowTitleWithSubtitle")},typeof _=="function"?_({node:h,path:C,treeIndex:w}):_),L&&q.createElement("span",{className:"rst__rowSubtitle"},typeof L=="function"?L({node:h,path:C,treeIndex:w}):L)),q.createElement("div",{className:"rst__rowToolbar"},N.map(function(Y,oe){return q.createElement("div",{key:oe,className:"rst__toolbarButton"},Y)})))))))}}]),r}(T.Component);Un.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Un.propTypes={node:I.shape({}).isRequired,title:I.oneOfType([I.func,I.node]),subtitle:I.oneOfType([I.func,I.node]),path:I.arrayOf(I.oneOfType([I.string,I.number])).isRequired,treeIndex:I.number.isRequired,treeId:I.string.isRequired,isSearchMatch:I.bool,isSearchFocus:I.bool,canDrag:I.bool,scaffoldBlockPxWidth:I.number.isRequired,toggleChildrenVisibility:I.func,buttons:I.arrayOf(I.node),className:I.string,style:I.shape({}),connectDragPreview:I.func.isRequired,connectDragSource:I.func.isRequired,parentNode:I.shape({}),isDragging:I.bool.isRequired,didDrop:I.bool.isRequired,draggedNode:I.shape({}),isOver:I.bool.isRequired,canDrop:I.bool,rowDirection:I.string};var Vn=function(o){var r=o.isOver,e=o.canDrop;return q.createElement("div",{className:ve("rst__placeholder",e&&"rst__placeholderLandingPad",e&&!r&&"rst__placeholderCancelPad")})};Vn.defaultProps={isOver:!1,canDrop:!1};Vn.propTypes={isOver:I.bool,canDrop:I.bool};function dc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var qn=function(t){an(r,t);var o=dc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.children,a=n.listIndex,l=n.swapFrom,s=n.swapLength,d=n.swapDepth,c=n.scaffoldBlockPxWidth,u=n.lowerSiblingCounts,h=n.connectDropTarget,f=n.isOver,p=n.draggedNode,g=n.canDrop,C=n.treeIndex;n.treeId,n.getPrevRow,n.node,n.path;var w=n.rowDirection,y=Hn(n,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),x=w==="rtl"?"rst__rtl":null,N=u.length,P=[];u.forEach(function(k,m){var S="";if(k>0?a===0?S="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":m===N-1?S="rst__lineHalfHorizontalRight rst__lineFullVertical":S="rst__lineFullVertical":a===0?S="rst__lineHalfHorizontalRight":m===N-1&&(S="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),P.push(q.createElement("div",{key:"pre_".concat(1+m),style:{width:c},className:ve("rst__lineBlock",S,x)})),C!==a&&m===d){var _="";a===l+s-1?_="rst__highlightBottomLeftCorner":C===l?_="rst__highlightTopLeftCorner":_="rst__highlightLineVertical";var L;w==="rtl"?L={width:c,right:c*m}:L={width:c,left:c*m},P.push(q.createElement("div",{key:m,style:L,className:ve("rst__absoluteLineBlock",_,x)}))}});var R;return w==="rtl"?R={right:c*N}:R={left:c*N},h(q.createElement("div",Ve({},y,{className:ve("rst__node",x)}),P,q.createElement("div",{className:"rst__nodeContent",style:R},T.Children.map(i,function(k){return T.cloneElement(k,{isOver:f,canDrop:g,draggedNode:p})}))))}}]),r}(T.Component);qn.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};qn.propTypes={treeIndex:I.number.isRequired,treeId:I.string.isRequired,swapFrom:I.number,swapDepth:I.number,swapLength:I.number,scaffoldBlockPxWidth:I.number.isRequired,lowerSiblingCounts:I.arrayOf(I.number).isRequired,listIndex:I.number.isRequired,children:I.node.isRequired,connectDropTarget:I.func.isRequired,isOver:I.bool.isRequired,canDrop:I.bool,draggedNode:I.shape({}),getPrevRow:I.func.isRequired,node:I.shape({}).isRequired,path:I.arrayOf(I.oneOfType([I.string,I.number])).isRequired,rowDirection:I.string};function uc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var Kn=function(t){an(r,t);var o=uc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.children,a=n.connectDropTarget;n.treeId,n.drop;var l=Hn(n,["children","connectDropTarget","treeId","drop"]);return a(q.createElement("div",null,T.Children.map(i,function(s){return T.cloneElement(s,K({},l))})))}}]),r}(T.Component);Kn.defaultProps={canDrop:!1,draggedNode:null};Kn.propTypes={children:I.node.isRequired,connectDropTarget:I.func.isRequired,isOver:I.bool.isRequired,canDrop:I.bool,draggedNode:I.shape({}),treeId:I.string.isRequired,drop:I.func.isRequired};function hc(t){var o=t.treeIndex;return o}function vi(t){return typeof t=="string"?t:t===null||dt(t)!=="object"||!t.props||!t.props.children||typeof t.props.children!="string"&&dt(t.props.children)!=="object"?"":typeof t.props.children=="string"?t.props.children:t.props.children.map(function(o){return vi(o)}).join("")}function to(t,o,r,e,n){return typeof r[t]=="function"?String(r[t]({node:r,path:e,treeIndex:n})).indexOf(o)>-1:dt(r[t])==="object"?vi(r[t]).indexOf(o)>-1:r[t]&&String(r[t]).indexOf(o)>-1}function fc(t){var o=t.node,r=t.path,e=t.treeIndex,n=t.searchQuery;return to("title",n,o,r,e)||to("subtitle",n,o,r,e)}var Xn=function(o){var r=[],e=[],n=null;return function(i){var a=Object.keys(i).sort(),l=a.map(function(s){return i[s]});return(l.length!==r.length||l.some(function(s,d){return s!==r[d]})||a.some(function(s,d){return s!==e[d]}))&&(r=l,e=a,n=o(i)),n}},Dn=Xn(fi),pc=Xn(lc),gc=Xn(Bn),vc=function(){function t(o){At(this,t),this.treeRef=o}return jt(t,[{key:"getTargetDepth",value:function(r,e,n){var i=0,a=r.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),i=Math.min(l.length,r.path.length)}var d,c=(e.getItem().path||[]).length;if(e.getItem().treeId!==this.treeId)if(c=0,n){var u=Ot.findDOMNode(n).getBoundingClientRect(),h=e.getSourceClientOffset().x-u.left;d=Math.round(h/r.scaffoldBlockPxWidth)}else d=r.path.length;else{var f=r.rowDirection==="rtl"?-1:1;d=Math.round(f*e.getDifferenceFromInitialOffset().x/r.scaffoldBlockPxWidth)}var p=Math.min(i,Math.max(0,c+d-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var g=e.getItem().node,C=gi(g);p=Math.max(0,Math.min(p,this.maxDepth-C-1))}return p}},{key:"canDrop",value:function(r,e){if(!e.isOver())return!1;var n=r.getPrevRow(),i=n?n.path:[],a=n?n.node:{},l=this.getTargetDepth(r,e,null);if(l>=i.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=e.getItem(),d=s.node,c=Dn({treeData:this.treeData,newNode:d,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:r.listIndex,expandParent:!0});return this.customCanDrop({node:d,prevPath:e.getItem().path,prevParent:e.getItem().parentNode,prevTreeIndex:e.getItem().treeIndex,nextPath:c.path,nextParent:c.parentNode,nextTreeIndex:c.treeIndex})}return!0}},{key:"wrapSource",value:function(r){var e=this,n={beginDrag:function(l){return e.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){e.endDrag(s.getDropResult())},isDragging:function(l,s){var d=s.getItem().node,c=l.node;return c===d}};function i(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Ei(this.dndType,n,i)(r)}},{key:"wrapTarget",value:function(r){var e=this,n={drop:function(l,s,d){var c={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:e.treeId,minimumTreeIndex:l.treeIndex,depth:e.getTargetDepth(l,s,d)};return e.drop(c),c},hover:function(l,s,d){var c=e.getTargetDepth(l,s,d),u=s.getItem().node,h=l.node!==u||c!==l.path.length-1;h&&(cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.dragHover({node:u,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:c})}))},canDrop:this.canDrop.bind(this)};function i(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return rr(this.dndType,n,i)(r)}},{key:"wrapPlaceholder",value:function(r){var e=this,n={drop:function(l,s){var d=s.getItem(),c=d.node,u=d.path,h=d.treeIndex,f={node:c,path:u,treeIndex:h,treeId:e.treeId,minimumTreeIndex:0,depth:0};return e.drop(f),f}};function i(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return rr(this.dndType,n,i)(r)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),t}();function mc(t,o,r){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,n=[].concat(ee(t.slice(0,o)),ee(t.slice(o+e)));return[].concat(ee(n.slice(0,r)),ee(t.slice(o,o+e)),ee(n.slice(r)))}function Sc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var no=1,_n=function(o){var r=K(K({},o),{},{style:K(K({},o.theme.style),o.style),innerStyle:K(K({},o.theme.innerStyle),o.innerStyle),reactVirtualizedListProps:K(K({},o.theme.reactVirtualizedListProps),o.reactVirtualizedListProps)}),e={nodeContentRenderer:Un,placeholderRenderer:Vn,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:qn};return Object.keys(e).forEach(function(n){o[n]===null&&(r[n]=typeof o.theme[n]<"u"?o.theme[n]:e[n])}),r},sn=function(t){an(r,t);var o=Sc(r);function r(e){var n;At(this,r),n=o.call(this,e);var i=_n(e),a=i.dndType,l=i.nodeContentRenderer,s=i.treeNodeRenderer,d=i.isVirtualized,c=i.slideRegionSize;return n.dndManager=new vc(Ne(n)),n.treeId="rst__".concat(no),no+=1,n.dndType=a||n.treeId,n.nodeContentRenderer=n.dndManager.wrapSource(l),n.treePlaceholderRenderer=n.dndManager.wrapPlaceholder(Kn),n.treeNodeRenderer=n.dndManager.wrapTarget(s),d&&(n.scrollZoneVirtualList=(Ol||kl)($o),n.vStrength=Dl(c),n.hStrength=Pl(c)),n.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},n.toggleChildrenVisibility=n.toggleChildrenVisibility.bind(Ne(n)),n.moveNode=n.moveNode.bind(Ne(n)),n.startDrag=n.startDrag.bind(Ne(n)),n.dragHover=n.dragHover.bind(Ne(n)),n.endDrag=n.endDrag.bind(Ne(n)),n.drop=n.drop.bind(Ne(n)),n.handleDndMonitorChange=n.handleDndMonitorChange.bind(Ne(n)),n}return jt(r,[{key:"componentDidMount",value:function(){r.loadLazyChildren(this.props,this.state);var n=r.search(this.props,this.state,!0,!0,!1);this.setState(n),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(n,i){this.state.dragging!==i.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(n){return pc({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:n})}},{key:"handleDndMonitorChange",value:function(){var n=this.props.dragDropManager.getMonitor();!n.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(n){var i=n.node,a=n.path,l=this.state.instanceProps,s=Rt({treeData:l.treeData,path:a,newNode:function(c){var u=c.node;return K(K({},u),{},{expanded:!u.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:i,expanded:!i.expanded,path:a})}},{key:"moveNode",value:function(n){var i=n.node,a=n.path,l=n.treeIndex,s=n.depth,d=n.minimumTreeIndex,c=fi({treeData:this.state.draggingTreeData,newNode:i,depth:s,minimumTreeIndex:d,expandParent:!0,getNodeKey:this.props.getNodeKey}),u=c.treeData,h=c.treeIndex,f=c.path,p=c.parentNode;this.props.onChange(u),this.props.onMoveNode({treeData:u,node:i,treeIndex:h,path:f,nextPath:f,nextTreeIndex:h,prevPath:a,prevTreeIndex:l,nextParentNode:p})}},{key:"startDrag",value:function(n){var i=this,a=n.path;this.setState(function(l){var s=ac({treeData:l.instanceProps.treeData,path:a,getNodeKey:i.props.getNodeKey}),d=s.treeData,c=s.node,u=s.treeIndex;return{draggingTreeData:d,draggedNode:c,draggedDepth:a.length-1,draggedMinimumTreeIndex:u,dragging:!0}})}},{key:"dragHover",value:function(n){var i=this,a=n.node,l=n.depth,s=n.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(d){var c=d.draggingTreeData,u=d.instanceProps,h=c||u.treeData,f=Dn({treeData:h,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:i.props.getNodeKey}),p=i.getRows(f.treeData),g=p[f.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:Rt({treeData:h,path:g.slice(0,-1),newNode:function(w){var y=w.node;return K(K({},y),{},{expanded:!0})},getNodeKey:i.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(n){var i=this,a=this.state.instanceProps,l=function(){return i.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!n)l();else if(n.treeId!==this.treeId){var s=n.node,d=n.path,c=n.treeIndex,u=this.props.shouldCopyOnOutsideDrop;typeof u=="function"&&(u=u({node:s,prevTreeIndex:c,prevPath:d}));var h=this.state.draggingTreeData||a.treeData;u&&(h=Rt({treeData:a.treeData,path:d,newNode:function(p){var g=p.node;return K({},g)},getNodeKey:this.props.getNodeKey})),this.props.onChange(h),this.props.onMoveNode({treeData:h,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:d,prevTreeIndex:c})}}},{key:"drop",value:function(n){this.moveNode(n)}},{key:"canNodeHaveChildren",value:function(n){var i=this.props.canNodeHaveChildren;return i?i(n):!0}},{key:"renderRow",value:function(n,i){var a=i.listIndex,l=i.style,s=i.getPrevRow,d=i.matchKeys,c=i.swapFrom,u=i.swapDepth,h=i.swapLength,f=n.node,p=n.parentNode,g=n.path,C=n.lowerSiblingCounts,w=n.treeIndex,y=_n(this.props),x=y.canDrag,N=y.generateNodeProps,P=y.scaffoldBlockPxWidth,R=y.searchFocusOffset,k=y.rowDirection,m=this.treeNodeRenderer,S=this.nodeContentRenderer,_=g[g.length-1],L=_ in d,F=L&&d[_]===R,W={node:f,parentNode:p,path:g,lowerSiblingCounts:C,treeIndex:w,isSearchMatch:L,isSearchFocus:F},B=N?N(W):{},J=typeof x!="function"?x:x(W),X={treeIndex:w,scaffoldBlockPxWidth:P,node:f,path:g,treeId:this.treeId,rowDirection:k};return q.createElement(m,Ve({style:l,key:_,listIndex:a,getPrevRow:s,lowerSiblingCounts:C,swapFrom:c,swapLength:h,swapDepth:u},X),q.createElement(S,Ve({parentNode:p,isSearchMatch:L,isSearchFocus:F,canDrag:J,toggleChildrenVisibility:this.toggleChildrenVisibility},X,B)))}},{key:"render",value:function(){var n=this,i=_n(this.props),a=i.dragDropManager,l=i.style,s=i.className,d=i.innerStyle,c=i.rowHeight,u=i.isVirtualized,h=i.placeholderRenderer,f=i.reactVirtualizedListProps,p=i.getNodeKey,g=i.rowDirection,C=this.state,w=C.searchMatches,y=C.searchFocusTreeIndex,x=C.draggedNode,N=C.draggedDepth,P=C.draggedMinimumTreeIndex,R=C.instanceProps,k=this.state.draggingTreeData||R.treeData,m=g==="rtl"?"rst__rtl":null,S,_=null,L=null;if(x&&P!==null){var F=Dn({treeData:k,newNode:x,depth:N,minimumTreeIndex:P,expandParent:!0,getNodeKey:p}),W=P;_=F.treeIndex,L=1+gc({node:x}),S=mc(this.getRows(F.treeData),_,W,L)}else S=this.getRows(k);var B={};w.forEach(function(re,V){var G=re.path;B[G[G.length-1]]=V});var J=y!==null?{scrollToIndex:y}:{},X=l,Y;if(S.length<1){var oe=this.treePlaceholderRenderer,le=h;Y=q.createElement(oe,{treeId:this.treeId,drop:this.drop},q.createElement(le,null))}else if(u){X=K({height:"100%"},X);var ge=this.scrollZoneVirtualList;Y=q.createElement(Fo,null,function(re){var V=re.height,G=re.width;return q.createElement(ge,Ve({},J,{dragDropManager:a,verticalStrength:n.vStrength,horizontalStrength:n.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:G,onScroll:function(A){var M=A.scrollTop;n.scrollTop=M},height:V,style:d,rowCount:S.length,estimatedRowSize:typeof c!="function"?c:void 0,rowHeight:typeof c!="function"?c:function($){var A=$.index;return c({index:A,treeIndex:A,node:S[A].node,path:S[A].path})},rowRenderer:function(A){var M=A.index,D=A.style;return n.renderRow(S[M],{listIndex:M,style:D,getPrevRow:function(){return S[M-1]||null},matchKeys:B,swapFrom:_,swapDepth:N,swapLength:L})}},f))})}else Y=S.map(function(re,V){return n.renderRow(re,{listIndex:V,style:{height:typeof c!="function"?c:c({index:V,treeIndex:V,node:re.node,path:re.path})},getPrevRow:function(){return S[V-1]||null},matchKeys:B,swapFrom:_,swapDepth:N,swapLength:L})});return q.createElement("div",{className:ve("rst__tree",s,m),style:X},Y)}}],[{key:"getDerivedStateFromProps",value:function(n,i){var a=i.instanceProps,l={},s=nr(a.treeData,n.treeData);return a.treeData=n.treeData,s?nr(a.searchQuery,n.searchQuery)?a.searchFocusOffset!==n.searchFocusOffset&&Object.assign(l,r.search(n,i,!0,!0,!0)):Object.assign(l,r.search(n,i,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,r.loadLazyChildren(n,i),Object.assign(l,r.search(n,i,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=n.searchQuery,a.searchFocusOffset=n.searchFocusOffset,l.instanceProps=K(K({},a),l.instanceProps),l}},{key:"search",value:function(n,i,a,l,s){var d=n.onChange,c=n.getNodeKey,u=n.searchFinishCallback,h=n.searchQuery,f=n.searchMethod,p=n.searchFocusOffset,g=n.onlyExpandSearchedNodes,C=i.instanceProps;if(!h&&!f)return u&&u([]),{searchMatches:[]};var w={instanceProps:{}},y=sc({getNodeKey:c,treeData:g?ic({treeData:C.treeData,expanded:!1}):C.treeData,searchQuery:h,searchMethod:f||fc,searchFocusOffset:p,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),x=y.treeData,N=y.matches;l&&(w.instanceProps.ignoreOneTreeUpdate=!0,d(x)),u&&u(N);var P=null;return a&&p!==null&&p<N.length&&(P=N[p].treeIndex),w.searchMatches=N,w.searchFocusTreeIndex=P,w}},{key:"loadLazyChildren",value:function(n,i){var a=i.instanceProps;ui({treeData:a.treeData,getNodeKey:n.getNodeKey,callback:function(s){var d=s.node,c=s.path,u=s.lowerSiblingCounts,h=s.treeIndex;d.children&&typeof d.children=="function"&&(d.expanded||n.loadCollapsedLazyChildren)&&d.children({node:d,path:c,lowerSiblingCounts:u,treeIndex:h,done:function(p){return n.onChange(Rt({treeData:a.treeData,path:c,newNode:function(C){var w=C.node;return w===d?K(K({},w),{},{children:p}):w},getNodeKey:n.getNodeKey}))}})}})}}]),r}(T.Component);sn.propTypes={dragDropManager:I.shape({getMonitor:I.func}).isRequired,treeData:I.arrayOf(I.object).isRequired,style:I.shape({}),className:I.string,innerStyle:I.shape({}),rowHeight:I.oneOfType([I.number,I.func]),slideRegionSize:I.number,reactVirtualizedListProps:I.shape({}),scaffoldBlockPxWidth:I.number,maxDepth:I.number,searchMethod:I.func,searchQuery:I.any,searchFocusOffset:I.number,searchFinishCallback:I.func,generateNodeProps:I.func,isVirtualized:I.bool,treeNodeRenderer:I.func,nodeContentRenderer:I.func,placeholderRenderer:I.func,theme:I.shape({style:I.shape({}),innerStyle:I.shape({}),reactVirtualizedListProps:I.shape({}),scaffoldBlockPxWidth:I.number,slideRegionSize:I.number,rowHeight:I.oneOfType([I.number,I.func]),treeNodeRenderer:I.func,nodeContentRenderer:I.func,placeholderRenderer:I.func}),getNodeKey:I.func,onChange:I.func.isRequired,onMoveNode:I.func,canDrag:I.oneOfType([I.func,I.bool]),canDrop:I.func,canNodeHaveChildren:I.func,shouldCopyOnOutsideDrop:I.oneOfType([I.func,I.bool]),onVisibilityToggle:I.func,dndType:I.string,onDragStateChanged:I.func,onlyExpandSearchedNodes:I.bool,rowDirection:I.string};sn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:hc,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};rc(sn);var yc=function(o){return q.createElement(Mi.Consumer,null,function(r){var e=r.dragDropManager;return e===void 0?null:q.createElement(sn,Ve({},o,{dragDropManager:e}))})},mi={exports:{}};function wn(t){return t&&Ki(t)==="object"&&t.constructor===Object}function Si(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},e=r.clone?ce({},t):t;return wn(t)&&wn(o)&&Object.keys(o).forEach(function(n){n!=="__proto__"&&(wn(o[n])&&n in t?e[n]=Si(t[n],o[n],r):e[n]=o[n])}),e}function yi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.baseClasses,r=t.newClasses;if(t.Component,!r)return o;var e=ce({},o);return Object.keys(r).forEach(function(n){r[n]&&(e[n]="".concat(o[n]," ").concat(r[n]))}),e}var lt={set:function(o,r,e,n){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(e,n)},get:function(o,r,e){var n=o.get(r);return n?n.get(e):void 0},delete:function(o,r,e){var n=o.get(r);n.delete(e)}},Cc=q.createContext(null);function _c(){var t=q.useContext(Cc);return t}var wc=typeof Symbol=="function"&&Symbol.for;const xc=wc?Symbol.for("mui.nested"):"__THEME_NESTED__";var bc=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Rc(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.disableGlobal,r=o===void 0?!1:o,e=t.productionPrefix,n=e===void 0?"jss":e,i=t.seed,a=i===void 0?"":i,l=a===""?"":"".concat(a,"-"),s=0,d=function(){return s+=1,s};return function(c,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(bc.indexOf(c.key)!==-1)return"Mui-".concat(c.key);var f="".concat(l).concat(h,"-").concat(c.key);return!u.options.theme[xc]||a!==""?f:"".concat(f,"-").concat(d())}return"".concat(l).concat(n).concat(d())}}function Ic(){return{plugins:[Xi(),Yi(),Qi(),Ji(),Zi(),typeof window>"u"?null:ea(),ta()]}}var Tc=na(Ic()),zc=Rc(),Pc=new Map,Dc={disableGeneration:!1,generateClassName:zc,jss:Tc,sheetsCache:null,sheetsManager:Pc,sheetsRegistry:null},Oc=q.createContext(Dc),ro=-1e9;function kc(){return ro+=1,ro}var Nc={};function Lc(t){var o=typeof t=="function";return{create:function(e,n){var i;try{i=o?t(e):t}catch(s){throw s}if(!n||!e.overrides||!e.overrides[n])return i;var a=e.overrides[n],l=ce({},i);return Object.keys(a).forEach(function(s){l[s]=Si(l[s],a[s])}),l},options:{}}}function Mc(t,o,r){var e=t.state,n=t.stylesOptions;if(n.disableGeneration)return o||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),o!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=o,i=!0),i&&(e.cacheClasses.value=yi({baseClasses:e.cacheClasses.lastJSS,newClasses:o,Component:r})),e.cacheClasses.value}function Ec(t,o){var r=t.state,e=t.theme,n=t.stylesOptions,i=t.stylesCreator,a=t.name;if(!n.disableGeneration){var l=lt.get(n.sheetsManager,i,e);l||(l={refs:0,staticSheet:null,dynamicStyles:null},lt.set(n.sheetsManager,i,e,l));var s=ce({},i.options,n,{theme:e,flip:typeof n.flip=="boolean"?n.flip:e.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var d=n.sheetsRegistry;if(l.refs===0){var c;n.sheetsCache&&(c=lt.get(n.sheetsCache,i,e));var u=i.create(e,a);c||(c=n.jss.createStyleSheet(u,ce({link:!1},s)),c.attach(),n.sheetsCache&<.set(n.sheetsCache,i,e,c)),d&&d.add(c),l.staticSheet=c,l.dynamicStyles=ra(u)}if(l.dynamicStyles){var h=n.jss.createStyleSheet(l.dynamicStyles,ce({link:!0},s));h.update(o),h.attach(),r.dynamicSheet=h,r.classes=yi({baseClasses:l.staticSheet.classes,newClasses:h.classes}),d&&d.add(h)}else r.classes=l.staticSheet.classes;l.refs+=1}}function Ac(t,o){var r=t.state;r.dynamicSheet&&r.dynamicSheet.update(o)}function jc(t){var o=t.state,r=t.theme,e=t.stylesOptions,n=t.stylesCreator;if(!e.disableGeneration){var i=lt.get(e.sheetsManager,n,r);i.refs-=1;var a=e.sheetsRegistry;i.refs===0&&(lt.delete(e.sheetsManager,n,r),e.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),o.dynamicSheet&&(e.jss.removeStyleSheet(o.dynamicSheet),a&&a.remove(o.dynamicSheet))}}function Fc(t,o){var r=q.useRef([]),e,n=q.useMemo(function(){return{}},o);r.current!==n&&(r.current=n,e=t()),q.useEffect(function(){return function(){e&&e()}},[n])}function Gc(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.name,e=o.classNamePrefix,n=o.Component,i=o.defaultTheme,a=i===void 0?Nc:i,l=it(o,["name","classNamePrefix","Component","defaultTheme"]),s=Lc(t),d=r||e||"makeStyles";s.options={index:kc(),name:r,meta:d,classNamePrefix:d};var c=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=_c()||a,p=ce({},q.useContext(Oc),l),g=q.useRef(),C=q.useRef();Fc(function(){var y={name:r,state:{},stylesCreator:s,stylesOptions:p,theme:f};return Ec(y,h),C.current=!1,g.current=y,function(){jc(y)}},[f,s]),q.useEffect(function(){C.current&&Ac(g.current,h),C.current=!0});var w=Mc(g.current,h.classes,n);return w};return c}const Wc=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),$c=nn(Wc);(function(t,o){(function(r,e){t.exports=e()})(typeof self<"u"?self:Le,function(){return function(r){function e(i){if(n[i])return n[i].exports;var a=n[i]={i,l:!1,exports:{}};return r[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var n={};return e.m=r,e.c=n,e.d=function(i,a,l){e.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:l})},e.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(a,"a",a),a},e.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},e.p="",e(e.s=3)}([function(r,e){r.exports=T},function(r,e){r.exports=yo},function(r,e){r.exports=$c},function(r,e,n){function i(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(4),l=i(a),s=n(6),d=i(s);e.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:d.default}},function(r,e,n){function i(y){return y&&y.__esModule?y:{default:y}}function a(y,x){return!!y.children&&typeof y.children!="function"&&y.children.some(function(N){return N===x||a(N,x)})}function l(y){var x=y.scaffoldBlockPxWidth,N=y.connectDragPreview,P=y.connectDragSource,R=y.isDragging,k=y.canDrop,m=y.canDrag,S=y.node,_=y.title,L=y.draggedNode,F=y.path,W=y.treeIndex,B=y.isSearchMatch,J=y.isSearchFocus,X=y.icons,Y=y.buttons,oe=y.className,le=y.style,ge=y.didDrop,re=y.lowerSiblingCounts,V=y.listIndex,G=y.swapFrom,$=y.swapLength,A=y.swapDepth,M=y.onItemClick,D=w(),b=_||S.title,O=L&&a(L,S),j=!ge&&R,H=[];re.forEach(function(ne,Ce){if(Ce>0&&(H.push(c.default.createElement("div",{className:D.lineBlock,key:"pre_"+(1+Ce),style:{width:x}})),W!==V&&Ce===A)){var xe="";xe=V===G+$-1?D.highlightBottomLeftCorner:W===G?D.highlightTopLeftCorner:D.highlightLineVertical,H.push(c.default.createElement("div",{className:D.absoluteLineBlock+" "+xe,key:"highlight_"+(1+Ce),style:{left:x*Ce,width:x}}))}});var U=c.default.createElement("div",{className:D.contentNode},N(c.default.createElement("div",{className:D.row+(S.active?" "+D.activeRow:"")+(j?" "+D.rowLandingPad:"")+(R?" "+D.rowLandingPadDisable:"")+(j&&!k?" "+D.rowCancelPad:"")+(B?" "+D.rowSearchMatch:"")+(J?" "+D.rowSearchFocus:"")+(m?"":" "+D.rowWrapperDragDisabled)+(oe?" "+oe:""),onClick:function(){return M?M(s({},S,{index:W})):null},style:s({opacity:O?.5:1},le)},S.type==="divider"?c.default.createElement("div",{className:D.divider}):c.default.createElement(d.Fragment,null,H,c.default.createElement("div",{className:D.rowIcon},X),c.default.createElement("div",{className:D.rowLabel},typeof b=="string"?c.default.createElement("span",{className:D.rowTitle},b):typeof b=="function"?b({node:S,path:F,treeIndex:W}):b),c.default.createElement("div",{className:D.rowToolbar},Y)))));return m?P(U,{dropEffect:"copy"}):U}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(y){for(var x=1;x<arguments.length;x++){var N=arguments[x];for(var P in N)Object.prototype.hasOwnProperty.call(N,P)&&(y[P]=N[P])}return y},d=n(0),c=i(d),u=n(1),h=i(u),f=n(2),p=i(f),g=n(5),C=i(g),w=(0,p.default)(C.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:h.default.node,canDrag:h.default.bool,canDrop:h.default.bool,className:h.default.string,connectDragPreview:h.default.func.isRequired,connectDragSource:h.default.func.isRequired,didDrop:h.default.bool.isRequired,draggedNode:h.default.shape({}),icons:h.default.node,isDragging:h.default.bool.isRequired,isOver:h.default.bool.isRequired,isSearchFocus:h.default.bool,isSearchMatch:h.default.bool,listIndex:h.default.number.isRequired,lowerSiblingCounts:h.default.arrayOf(h.default.number).isRequired,node:h.default.shape({}).isRequired,parentNode:h.default.shape({}),path:h.default.arrayOf(h.default.oneOfType([h.default.string,h.default.number])).isRequired,rowDirection:h.default.string.isRequired,scaffoldBlockPxWidth:h.default.number.isRequired,style:h.default.shape({}),swapDepth:h.default.number,swapFrom:h.default.number,swapLength:h.default.number,title:h.default.oneOfType([h.default.func,h.default.node]),toggleChildrenVisibility:h.default.func,treeId:h.default.string.isRequired,treeIndex:h.default.number.isRequired},e.default=l},function(r,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(r,e,n){function i(C){return C&&C.__esModule?C:{default:C}}function a(C){var w=C.children,y=C.listIndex,x=C.swapFrom,N=C.swapLength,P=C.swapDepth,R=C.lowerSiblingCounts,k=C.connectDropTarget,m=C.isOver,S=C.draggedNode,_=C.canDrop,L=g();return k(s.default.createElement("div",{className:L.node},l.Children.map(w,function(F){return(0,l.cloneElement)(F,{canDrop:_,draggedNode:S,isOver:m,listIndex:y,lowerSiblingCounts:R,swapDepth:P,swapFrom:x,swapLength:N})})))}Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),s=i(l),d=n(1),c=i(d),u=n(2),h=i(u),f=n(7),p=i(f),g=(0,h.default)(p.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:c.default.bool,children:c.default.node.isRequired,connectDropTarget:c.default.func.isRequired,draggedNode:c.default.shape({}),getPrevRow:c.default.func.isRequired,isOver:c.default.bool.isRequired,listIndex:c.default.number.isRequired,lowerSiblingCounts:c.default.arrayOf(c.default.number).isRequired,node:c.default.shape({}).isRequired,path:c.default.arrayOf(c.default.oneOfType([c.default.string,c.default.number])).isRequired,rowDirection:c.default.string.isRequired,scaffoldBlockPxWidth:c.default.number.isRequired,swapDepth:c.default.number,swapFrom:c.default.number,swapLength:c.default.number,treeId:c.default.string.isRequired,treeIndex:c.default.number.isRequired},e.default=a},function(r,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{node:{display:"flex"}}}}])})})(mi);var Hc=mi.exports;const Bc=ho(Hc),Uc=t=>t.from!=="team-tmpl";function Vc({prevPath:t,nextPath:o,node:r}){if(r.from==="team-tmpl")return!1;const e=t.length,n=o.length;return!!(e===n&&Sa(t.slice(0,e-1),o.slice(0,n-1)))}function Ci({treeNode:t}){const{locale:o}=De(),{blocklet:r}=et(),e=r.environments.find(a=>a.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),n=ie(a=>{if(a!=null&&a.startsWith("/"))try{return new URL(a,e==null?void 0:e.value).href}catch{console.error("Failed to parse url",{url:a,origin:e==null?void 0:e.value})}return a});function i(){const{title:a,subtitle:l}=t;let s=a,d=l;return st(a)&&(s=a[o]),!T.isValidElement(l)&&st(l)&&(d=l[o]),v.jsxs(Z,{display:"flex",alignItems:"center",children:[v.jsx(Re,{variant:"subtitle1",fontSize:16,children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:d})]})}return v.jsxs(v.Fragment,{children:[t.icon&&(Ln(n(t.icon))?v.jsx($e,{size:16,style:{marginRight:4},icon:n(t.icon)}):v.jsx(he,{size:16,style:{marginRight:4},icon:t.icon})),i()]})}Ci.propTypes={treeNode:I.object.isRequired};function Yn({treeData:t,setTreeData:o,renderActions:r}){const e=t.map(i=>({...i,expanded:!0})),n={};return typeof window<"u"&&(n.context=window),v.jsx(Ai,{backend:ji,...n,children:v.jsx(yc,{generateNodeProps:i=>{const a=Uc(i.node);return{buttons:r({data:i.node,className:"list-item-actions"}),icons:a?v.jsx(he,{icon:"ic:round-drag-indicator"}):v.jsx(Z,{width:16,height:16}),title:v.jsx(Ci,{treeNode:i.node})}},maxDepth:2,isVirtualized:!1,treeData:e,onChange:o,canDrop:Vc,theme:Bc})})}Yn.propTypes={treeData:I.object.isRequired,setTreeData:I.func,renderActions:I.func};Yn.defaultProps={setTreeData:()=>{},renderActions:()=>{}};const yt="en";function Qn({sx:t,onAdd:o,onChange:r,locales:e,localeMap:n,onRemoveLocale:i}){const{t:a}=De(),l=T.useRef(),[s,d]=T.useState(null),c=kt({currentLocale:yt,localeList:[],inputLocale:"",localeError:""}),u=T.useMemo(()=>!!s,[s]),h=T.useMemo(()=>e.includes(c.currentLocale)?c.currentLocale:yt,[e,c.currentLocale]),f=T.useMemo(()=>Object.keys(It(n,[...c.localeList,yt])).map(P=>({title:n[P],value:P})),[c.localeList]),p=T.useMemo(()=>{var R;return`Default (${n[yt]||((R=Object.values(n))==null?void 0:R[0])})`},[n]);T.useEffect(()=>{c.localeList=[...e]},[e,c]),$i("enter",()=>{setTimeout(()=>{w()})},{target:l});function g(P){return P?P==="en"||c.localeList.includes(P)?a("navigation.form.localeExists",{value:P}):!0:a("common.requiredErrorText",{name:"Locale"})}function C(P=""){const R=P==null?void 0:P.trim(),k=g(R);return k!==!0?c.localeError=k:c.localeError="",k}function w(){var k;const P=(k=c.inputLocale)==null?void 0:k.trim();C(P)===!0&&(y(),c.localeList.push(P),c.currentLocale=P,o(P))}function y(){d(null),c.inputLocale="",c.localeError=""}function x(P,R){P.preventDefault(),P.stopPropagation(),c.localeList=_o(c.localeList,R),i(R),R===c.currentLocale&&(c.currentLocale=yt)}function N(P){const{value:R}=P.target;C(R),c.inputLocale=R}return v.jsxs(v.Fragment,{children:[v.jsxs(oa,{sx:t,value:h,onChange:(P,R)=>{c.currentLocale=R,r(R)},children:[v.jsx(or,{label:p,value:"en"}),c.localeList.map(P=>v.jsx(or,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[n[P],v.jsx(Te,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{x(R,P)},children:v.jsx(he,{icon:"mdi:close",height:14})})]}),value:P},P)),v.jsx(Te,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:P=>{d(P.currentTarget)},children:v.jsx(he,{icon:"mdi:plus"})})]}),v.jsx(xn,{open:u,anchorEl:s,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(Z,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:a("navigation.form.localePlaceholder")}),v.jsx(Z,{mt:1,children:v.jsx(Rn,{required:!0,fullWidth:!0,label:"Locale",value:c.inputLocale,options:f,onChange:N,error:!!c.localeError,helperText:c.localeError||" "})}),v.jsx(Z,{display:"flex",justifyContent:"flex-end",children:v.jsx(Jt,{size:"small",variant:"contained",onClick:w,children:a("common.confirm")})})]})})]})}Qn.propTypes={sx:I.any,onAdd:I.func,onChange:I.func,onRemoveLocale:I.func,localeMap:I.object,locales:I.array};Qn.defaultProps={sx:null,onAdd:()=>{},onChange:()=>{},onRemoveLocale:()=>{},localeMap:{},locales:[]};const Jn=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function _i(t,o,r=5e3){for(const e of Jn){const n=Ze(e,t);try{return await Ba.get(n,{params:o,timeout:r})}catch(i){console.warn(`Failed to fetch from ${n}:`,i)}}throw new Error(`All icon API endpoints ${t} failed`)}async function qc({keyword:t,limit:o=999,start:r=0,palette:e=!1}){let n="",i=t;t.includes(":")&&([n,i]=t.split(":"));const{data:a}=await _i("/search",{query:`${i} palette=${e}`||t,start:r,limit:o,...n&&{prefix:n}});return a}const Vt=new Map;async function Kc(t){if(Vt.has(t))return Vt.get(t);const o=(async()=>{var n;const{data:r}=await _i("/collection",{prefix:t}),e=new Set;return(n=r.uncategorized)==null||n.forEach(i=>e.add(`${t}:${i}`)),Object.values(r.categories??{}).forEach(i=>{i.forEach(a=>e.add(`${t}:${a}`))}),Array.from(e)})();Vt.set(t,o);try{return await o}catch(r){throw Vt.delete(t),r}}function Xc(t){return Ze(Jn[0],`${t}.svg`)}function Yc(t){try{const o=new URL(t);for(const r of Jn)if(o.origin===r)return ya(o.pathname).replace(".svg","");return""}catch{return""}}function Qc(t){let o=!0,r=t;return t&&(t.startsWith("/")?(o=!1,r=""):Ln(t)&&(r=Yc(t))),{isIconId:o,iconId:r}}const Jc=T.lazy(()=>Ta(()=>import("./index-C3f1mXja.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(t=>({default:t.Uploader})));function wi({icon:t,...o}){const[r,e]=T.useState(!1);return mo(async()=>{e(!1),await go(t),e(!0)},[t]),t?r?v.jsx(he,{icon:t,...o}):v.jsx(he,{color:"#f06f6e",icon:"ic:baseline-error",...o}):v.jsx(he,{icon:"material-symbols-light:select-rounded",...o})}wi.propTypes={icon:I.string.isRequired};function On({value:t,helperText:o,label:r,placeholder:e,methods:n=["select"],iconifyShape:i="id",...a}){var re;const{getSessionInHeader:l,prefix:s}=Ea(),{blocklet:d}=et(),c=Mn(V=>V.breakpoints.down("md")),u=d.environments.find(V=>V.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),f=T.useRef(null),p=T.useRef(null),g=T.useRef(null),{t:C,locale:w}=De(),{isIconId:y,iconId:x}=Qc(t),[N,P]=T.useState(null),{onChange:R,onBlur:k,sx:m,...S}=a,_=n.includes("upload"),L=n.includes("select"),F=Ze(s,"/api/media/upload",d.appPid),W=kt({showPopover:!1}),B=ie(V=>{if(V!=null&&V.startsWith("/"))try{return new URL(V,u==null?void 0:u.value).href}catch{console.error("Failed to parse url",{url:V,origin:u==null?void 0:u.value})}return V}),J=ie(async V=>await f.current.getUploader().uploadFile(V)),X=ie(()=>{P(null)}),Y=ie(()=>{L&&P(g.current)}),oe=ie(async V=>{try{if(i==="url"){const G=Xc(V),$=await Aa(G,{width:128,height:128}),A=await ja($,V);await J(A)}else R==null||R(V)}catch(G){console.error("Failed to pick icon:",G)}X()}),le=ie(V=>{V.stopPropagation(),p.current.open(),X()}),ge=ie(V=>{var G;(G=a==null?void 0:a.onChange)==null||G.call(a,V.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(ot,{helperText:o,value:t,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...m},onClick:L?Y:void 0,...S,label:r,placeholder:e,InputProps:{ref:g,readOnly:!0,startAdornment:v.jsx(bn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{t&&(W.showPopover=!0)},onMouseLeave:()=>{W.showPopover=!1},children:v.jsx($e,{size:28,icon:B(t),alt:"Error"})}),endAdornment:v.jsxs(bn,{position:"end",children:[v.jsx(Te,{sx:{visibility:t?"visible":"hidden"},onClick:V=>{V.stopPropagation(),R("")},children:v.jsx(po,{style:{fontSize:18}})}),_&&v.jsx(ia,{title:C("common.upload"),children:v.jsx(Te,{disableFocusRipple:!1,disableRipple:!1,onClick:le,children:v.jsx(wi,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&v.jsx(Z,{component:Ha,sx:{mr:"-6px",fontSize:24,transform:N?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}),L&&v.jsx(xn,{open:!!N,anchorEl:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...c&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:X,children:v.jsx(xi,{label:r,placeholder:e,value:y?x:"",sx:{width:((re=g.current)==null?void 0:re.offsetWidth)??"auto"},onPick:oe,onClose:X})}),v.jsx(kn,{ref:f,locale:w,apiPath:F,headers:h,imageEditorProps:{},onUploadFinish:ge}),v.jsx(kn,{ref:p,locale:w,apiPath:F,headers:h,onUploadFinish:ge}),v.jsx(xn,{sx:{pointerEvents:"none"},open:W.showPopover,anchorEl:g.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{W.showPopover=!1},disableRestoreFocus:!0,children:v.jsx($e,{size:120,icon:B(t),alt:"Error"})})]})}On.propTypes={value:I.string.isRequired,label:I.any,placeholder:I.any,helperText:I.string,methods:I.arrayOf(I.oneOf(["select","upload"])),iconifyShape:I.oneOf(["id","url"])};function xi({label:t,placeholder:o,value:r="",sx:e,onPick:n,onClose:i,...a}){const[l,s]=T.useState([]),[d,c]=T.useState(!0),[u,h]=T.useState(r),[f,p]=T.useState(!1),g=T.useRef(null),C=T.useRef([]),w=T.useRef(1),y=T.useRef(!0),{t:x}=De(),N=96,P=ie(()=>{!y.current||d||(c(!0),setTimeout(()=>{const m=w.current+1,S=(m-1)*N,_=m*N,L=C.current.slice(S,_);s(F=>[...F,...L]),w.current=m,y.current=_<C.current.length,c(!1)},300))}),R=ie(m=>{C.current=m,w.current=1,y.current=m.length>N;const S=m.slice(0,N);s(S),p(m.length===0),y.current&&P()}),{run:k}=So(async m=>{if(m){c(!0);try{const{icons:S}=await qc({keyword:m});R(S)}catch(S){console.error("Failed to search icons:",S),p(!0)}finally{c(!1)}}},{wait:300,trailing:!0});return T.useEffect(()=>{const m=()=>{if(!g.current)return;const{scrollTop:_,scrollHeight:L,clientHeight:F}=g.current;(_+F>=L-150||L<=F)&&P()},S=g.current;return S&&(S.addEventListener("scroll",m),m()),()=>{S&&S.removeEventListener("scroll",m)}},[P,d]),mo(async()=>{if(u)k(u);else{c(!0);try{const m=await Kc("mdi-light");R(m)}catch(m){console.error("Failed to fetch default icons:",m),p(!0)}finally{c(!1)}}},[u,k,R]),v.jsxs(Zc,{ref:g,sx:e,...a,children:[v.jsxs(Z,{className:"icon-picker-input",children:[v.jsx(ot,{label:x("navigation.form.searchIcons"),placeholder:x("navigation.form.searchIconsPlaceholder"),size:"small",value:u,sx:{flexGrow:1},autoFocus:!0,onChange:m=>h(m.target.value),InputProps:{endAdornment:v.jsx(Te,{sx:{visibility:u?"visible":"hidden"},onClick:()=>h(""),children:v.jsx(po,{style:{fontSize:18}})})}}),v.jsx(Jt,{onClick:i,children:x("common.cancel")})]}),v.jsxs(Z,{children:[l.length>0&&v.jsx(Z,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(m=>v.jsx(ed,{$active:r===m,onClick:()=>{n(m)},children:v.jsx(he,{icon:m,width:"32",height:"32"})},m))}),f&&v.jsx(Z,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(Z,{sx:{textAlign:"center"},children:"No matching results"})}),d&&v.jsx(Z,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(aa,{size:20})})]})]})}xi.propTypes={label:I.any,placeholder:I.any,value:I.string,sx:I.object,onPick:I.func.isRequired,onClose:I.func.isRequired};const Zc=fo(Z)(({theme:t})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[t.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:t.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:t.spacing(2),paddingBottom:t.spacing(1),paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:t.spacing(1),top:0,zIndex:1,backgroundColor:t.palette.background.paper}})),ed=fo(Te,{shouldForwardProp:t=>t!=="$active"})(({$active:t,theme:o})=>({boxSizing:"content-box",backgroundColor:t?o.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:o.palette.action.hover}})),kn=T.forwardRef(({locale:t,apiPath:o,headers:r,imageEditorProps:e={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:n},i)=>v.jsx(T.Suspense,{children:v.jsx(Jc,{locale:t,ref:i,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>n==null?void 0:n(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:e,apiPathProps:{uploader:o,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:r}})}));kn.propTypes={locale:I.string,apiPath:I.string,headers:I.object,imageEditorProps:I.object,onUploadFinish:I.func};const oo=24,io=48,ao="add",be="en",lo={title:{[be]:""},description:{[be]:""},link:{[be]:""}},We=["title","description","link"];function so(t){return _o(Array.from(new Set(We.flatMap(o=>st(t[o])?Object.keys(t[o]):[]))),be)}I.string.isRequired;const cn=T.forwardRef(function({section:o,components:r,rawNavigations:e,onChange:n,...i},a){const{roles:l}=wo(),{t:s,locale:d}=De(),{blocklet:c}=et(),u=T.useMemo(()=>{const b=c.environments.find(j=>j.key==="BLOCKLET_APP_LANGUAGES");return(b?b.value.split(","):["en","zh"]).filter(j=>Qe.SUPPORTED_LANGUAGES[j]).reduce((j,H)=>(j[H]=Qe.SUPPORTED_LANGUAGES[H].nativeName,j),{})},[c.environments]),h=T.useRef(()=>{}),f=kt({isRoot:!0,type:ao,linkDisabled:!1,locale:be,formState:we(lo),get localeList(){return so(f.formState)}}),{handleSubmit:p,control:g,reset:C,setValue:w,clearErrors:y,formState:{errors:x}}=Fa({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});T.useEffect(()=>{We.forEach(b=>w(b,f.formState[b][f.locale]))},[w,f.locale]);const N=Ga({control:g}),P=N.component,R=N.title,k=N.description,m=N.link,S=N.parent;T.useEffect(()=>{f.formState.title[f.locale]=R},[R]),T.useEffect(()=>{f.formState.description[f.locale]=k},[k]),T.useEffect(()=>{f.formState.link[f.locale]=m},[m]),T.useEffect(()=>{n==null||n(N)},[N,n]);const _=T.useMemo(()=>e.find(O=>P?r.find(H=>H.name===P).did===O.id:O.id===S),[r,e,P,S]),L=T.useMemo(()=>{if(_!=null&&_.component){const b=r.find(U=>U.name===_.component),{link:O}=b||{},j=st(O)?O[f.locale]:O;if(P)return dr(j);const H=st(_.link)?_.link[f.locale]:_.link;return dr(Ze(j,H||"/"))}return null},[r,f.locale,_,P]),F=T.useMemo(()=>{const{component:b}=_||{},O=r.find(U=>U.name===b),{navigation:j=[]}=O||{};return pe.flattenNavigation(j,{transform(U,ne){return ne!=null&&ne.section&&(U.section=U.section||ne.section),U}}).filter(U=>U.link).filter(U=>pe.isMatchSection(U.section,o)).map(U=>({label:U.link,title:U.title[d]||U.title}))},[_,r,o,d]),W=T.useCallback(()=>{f.isRoot=!0,f.locale=be,f.type=ao,f.linkDisabled=!1,f.formState=we(lo),C(),y(),h.current=()=>{}},[y,C,f]),B=T.useCallback((b={})=>(f.localeList.length>0&&We.forEach(O=>{new Set(Ca(f.formState[O])).size>1&&(b[O]=f.formState[O])}),_a(b.role)&&(b.role=void 0),b),[f.localeList,f.formState]),J=T.useCallback(({parent:b}={},O=()=>{})=>{f.type="add",f.isRoot=!b,w("parent",b==null?void 0:b.id),h.current=j=>{O(j)}},[w,f]),X=T.useCallback((b={},O=()=>{})=>{const{id:j,icon:H,parent:U,component:ne,role:Ce=[]}=b;w("id",j),w("icon",H),b.from==="team-tmpl"&&(f.linkDisabled=!0);const xe=so(b),Ae=(Q,te)=>{xa(Q)?f.formState[te]=xe.reduce((_e,je)=>(_e[je]=Q,_e),{[be]:Q}):st(Q)?f.formState[te]=we(Q):f.formState[te]={}};We.forEach(Q=>Ae(b[Q],Q)),We.forEach(Q=>w(Q,f.formState[Q][f.locale])),w("component",ne),w("parent",U),w("role",Ce||[]),f.type="edit",f.isRoot=!U,h.current=Q=>{const te=wa(Q,["id","title","description","icon","component","link","role"]);O(te)}},[w,f]);function Y(b){const O=b==null?void 0:b.trim();if(o!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>oo)return s("navigation.form.titleTooLong",{len:oo})}return!0}function oe(b){const O=b==null?void 0:b.trim();return O&&O.length>io?s("navigation.form.descriptionTooLong",{len:io}):!0}const le=ie(b=>b!=null&&b.startsWith("/")?new URL(b,window.location.origin).href:b);async function ge(b){const O=b==null?void 0:b.trim();if(O){if(Ln(le(O)))return!0;try{await go(O)}catch{return s("navigation.form.invalidIcon")}}return!0}function re(b){const O=b==null?void 0:b.trim();return O?ge(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}function V(b){const O=b==null?void 0:b.trim();return O?pe.checkLink(O)?!0:s("navigation.form.invalidLink"):f.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}const G=T.useCallback(b=>{f.locale=b,We.forEach(O=>{f.formState[O][b]||(f.formState[O][b]="")}),setTimeout(()=>{y()})},[y,f]),$=T.useCallback(()=>{const{title:b,link:O}=f.formState;if(o!=="bottomNavigation")for(const j of Object.keys(b)){const H=Y(b[j]);if(H!==!0)return H}for(const j of Object.keys(O)){const H=V(O[j]);if(H!==!0)return H}return!0},[o,f.formState]),A=T.useCallback(b=>{const O=$();O===!0?h.current(B(b)):_t.error(O)},[$,B]),M=T.useCallback(b=>{We.forEach(O=>{f.formState[O]=It(f.formState[O],b)})},[f.formState]),D=T.useCallback(b=>{f.locale=b,We.forEach(O=>{f.formState[O][b]=f.formState[O][be]}),setTimeout(()=>{y()})},[y,f]);return T.useImperativeHandle(a,()=>({add:J,edit:X,reset:()=>setTimeout(()=>W(),0),submit:p(A)}),[J,W,X,p,A]),v.jsxs(Z,{...i,children:[v.jsx(Qn,{sx:{mb:1},onAdd:D,onChange:G,onRemoveLocale:M,localeMap:u,locales:f.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[o!=="bottomNavigation"&&v.jsx(Fe,{name:"title",control:g,rules:{validate:Y},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.title)!=null&&O.message),helperText:((j=x==null?void 0:x.title)==null?void 0:j.message)||" ",...b})}}),o==="bottomNavigation"?v.jsx(Fe,{name:"icon",control:g,rules:{validate:re},render:({field:b})=>{var O,j;return v.jsx(On,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((O=x==null?void 0:x.icon)!=null&&O.message),helperText:(j=x==null?void 0:x.icon)==null?void 0:j.message,disabled:f.locale!==be,methods:["select"],iconifyShape:"url",...b})}}):v.jsx(Fe,{name:"icon",control:g,rules:{validate:ge},render:({field:b})=>{var O,j;return v.jsx(On,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((O=x==null?void 0:x.icon)!=null&&O.message),helperText:(j=x==null?void 0:x.icon)==null?void 0:j.message,disabled:f.locale!==be,...b})}}),f.isRoot&&v.jsx(Fe,{name:"component",control:g,render:({field:b})=>{var O,j;return v.jsx(Rn,{fullWidth:!0,margin:"dense",disabled:f.locale!==be&&b.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:r.map(H=>({title:H.title,value:H.name,description:H.link})),error:!!((O=x==null?void 0:x.component)!=null&&O.message),helperText:((j=x==null?void 0:x.component)==null?void 0:j.message)||" ",...It(b,"ref")})}}),!f.isRoot&&["header"].includes(o)&&v.jsx(Fe,{name:"description",control:g,rules:{validate:oe},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.description)!=null&&O.message),helperText:((j=x==null?void 0:x.description)==null?void 0:j.message)||" ",...b})}}),v.jsx(Fe,{name:"link",control:g,rules:{validate:V},render:({field:b})=>v.jsx(Co,{fullWidth:!0,margin:"dense",children:v.jsx(la,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:f.linkDisabled,isOptionEqualToValue:O=>O.label,options:F,renderInput:O=>{var j,H;return v.jsx(ot,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!((j=x==null?void 0:x.link)!=null&&j.message),helperText:((H=x==null?void 0:x.link)==null?void 0:H.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:L?v.jsx(bn,{position:"start",sx:{textDecoration:Wa(m||"")?"line-through":""},children:L}):null}})},renderOption:(O,j)=>v.jsxs(Z,{component:"li",...O,children:[j.label,v.jsx(Re,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:j.title})]}),margin:"dense",...b,onChange:()=>{},onInputChange:(O,j)=>{b.onChange(j)}})})}),["dashboard","sessionManager"].includes(o)&&v.jsx(Fe,{name:"role",control:g,render:({field:b})=>{var O,j;return v.jsx(Rn,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:l.map(H=>({title:H.title,value:H.name})),error:!!((O=x==null?void 0:x.role)!=null&&O.message),helperText:((j=x==null?void 0:x.role)==null?void 0:j.message)||" ",...It(b,"ref")})}}),o==="bottomNavigation"&&v.jsx(Fe,{name:"title",control:g,rules:{validate:Y},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.title)!=null&&O.message),helperText:((j=x==null?void 0:x.title)==null?void 0:j.message)||" ",...b})}})]})]})});cn.propTypes={section:I.string,components:I.array,rawNavigations:I.array,onChange:I.func};cn.defaultProps={section:"",components:[],rawNavigations:[],onChange:()=>{}};const dn=T.forwardRef(function({section:o,components:r,rawNavigations:e},n){const{t:i}=De(),[a,{setTrue:l,setFalse:s}]=Hi(!1),[d,c]=T.useState("add"),u=T.useRef(null),h=T.useMemo(()=>{const w={add:i("common.create"),edit:i("common.edit")}[d];return w?`${w} ${i("navigation.navigation")}`:"--"},[i,d]),f=T.useCallback(()=>{var C;s(),(C=u.current)==null||C.reset()},[s]),p=T.useCallback((C={},w=()=>{})=>{var y;c("add"),(y=u.current)==null||y.add(C,x=>w(f,x)),l()},[l,f]),g=T.useCallback((C={},w=()=>{})=>{var y;c("edit"),(y=u.current)==null||y.edit(C,x=>w(f,x)),l()},[l,f]);return T.useImperativeHandle(n,()=>({add:p,edit:g,close:f}),[p,g,f]),v.jsx(Fi,{open:a,title:h,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(Gi,{color:"primary",variant:"contained",onClick:()=>{var C;return(C=u.current)==null?void 0:C.submit()},children:i("common.confirm")}),children:v.jsx(cn,{ref:u,section:o,components:r,rawNavigations:e})})});dn.propTypes={section:I.string,components:I.array,rawNavigations:I.array};dn.defaultProps={section:"",components:[],rawNavigations:[]};function Zn({className:t,add:o,edit:r,toggle:e,del:n,data:i,section:a}){const{t:l}=De(),s=["yaml","team-tmpl"].includes(i.from),d=T.isValidElement(i.subtitle);function c(g){g.preventDefault(),g.stopPropagation()}const u=T.useCallback(g=>{c(g),o(i)},[o,i]),h=T.useCallback(g=>{c(g),r(i)},[r,i]),f=T.useCallback(g=>{c(g),e(i)},[e,i]),p=T.useCallback(g=>{c(g),n(i)},[n,i]);return v.jsxs("div",{className:t,children:[!i.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Te,{size:"small",color:"success",onClick:u,disabled:d,children:v.jsx(he,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(d?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Te,{size:"small",color:"primary",onClick:h,disabled:d||i.from==="team-tmpl",children:v.jsx(he,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:d?l("navigation.action.noEdit"):i.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Te,{size:"small",color:"warning",onClick:f,disabled:d,children:i.visible===!1?v.jsx(he,{icon:"mdi:eye-off-outline"}):v.jsx(he,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!d?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Te,{disabled:s&&!d,size:"small",color:"error",onClick:p,children:v.jsx(he,{icon:"mdi:delete"})})})]})}Zn.propTypes={data:I.object.isRequired,className:I.string,add:I.func,edit:I.func,toggle:I.func,del:I.func,section:I.string};Zn.defaultProps={className:"",add:()=>{},edit:()=>{},toggle:()=>{},del:()=>{},section:""};function bi(t,o){return t?o===t.nodeName?!0:bi(t.parentNode,o):!1}function td({...t}){const o=r=>{bi(r.target,"A")&&r.preventDefault()};return v.jsx("div",{onClick:o,...t})}function er({className:t,navigation:o}){var s,d,c,u;const{blocklet:r}=et(),{logoUrl:e}=Ua({blocklet:r}),n=(d=(s=r==null?void 0:r.environments)==null?void 0:s.find(h=>h.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER))==null?void 0:d.value,i=(u=(c=r==null?void 0:r.environments)==null?void 0:c.find(h=>h.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR))==null?void 0:u.value,a=n||i?{owner:n,year:i}:void 0,l={appId:r.appDid,appLogo:e,appName:r.meta.title,enableConnect:!0,enableLocale:!1,navigation:o,copyright:a};return v.jsx(td,{children:v.jsxs(Z,{className:t,children:[v.jsx(za,{meta:l,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),v.jsx(Z,{children:v.jsx(Pa,{meta:l,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},showDomainWarningDialog:!1,children:v.jsx(ir,{container:!0,spacing:2,children:new Array(6).fill().map((h,f)=>v.jsxs(ir,{item:!0,xs:4,children:[v.jsx(hn,{animation:!1,variant:"rectangular",width:"100%",height:120}),v.jsxs(Z,{sx:{pt:.5},children:[v.jsx(hn,{animation:!1}),v.jsx(hn,{width:"60%",animation:!1})]})]},f))})})}),v.jsx(Da,{meta:l,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})}er.propTypes={className:I.string,navigation:I.array};er.defaultProps={className:"",navigation:[]};const nd=sa(er)`
|
|
19
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(o.componentWillMount=ii,o.componentWillReceiveProps=ai),typeof o.getSnapshotBeforeUpdate=="function"){if(typeof o.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");o.componentWillUpdate=li;var l=o.componentDidUpdate;o.componentDidUpdate=function(d,c,u){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;l.call(this,d,c,h)}}return t}function si(t){var o=t.targetIndex,r=t.node,e=t.currentIndex,n=t.getNodeKey,i=t.path,a=i===void 0?[]:i,l=t.lowerSiblingCounts,s=l===void 0?[]:l,d=t.ignoreCollapsed,c=d===void 0?!0:d,u=t.isPseudoRoot,h=u===void 0?!1:u,f=h?[]:[].concat(ee(a),[n({node:r,treeIndex:e})]);if(e===o)return{node:r,lowerSiblingCounts:s,path:f};if(!r.children||c&&r.expanded!==!0)return{nextIndex:e+1};for(var p=e+1,g=r.children.length,C=0;C<g;C+=1){var w=si({ignoreCollapsed:c,getNodeKey:n,targetIndex:o,node:r.children[C],currentIndex:p,lowerSiblingCounts:[].concat(ee(s),[g-C-1]),path:f});if(w.node)return w;p=w.nextIndex}return{nextIndex:p}}function Bn(t){var o=t.node,r=t.ignoreCollapsed,e=r===void 0?!0:r;return si({getNodeKey:function(){},ignoreCollapsed:e,node:o,currentIndex:0,targetIndex:-1}).nextIndex-1}function ci(t){var o=t.callback,r=t.getNodeKey,e=t.ignoreCollapsed,n=t.isPseudoRoot,i=n===void 0?!1:n,a=t.node,l=t.parentNode,s=l===void 0?null:l,d=t.currentIndex,c=t.path,u=c===void 0?[]:c,h=t.lowerSiblingCounts,f=h===void 0?[]:h,p=i?[]:[].concat(ee(u),[r({node:a,treeIndex:d})]),g=i?null:{node:a,parentNode:s,path:p,lowerSiblingCounts:f,treeIndex:d};if(!i){var C=o(g);if(C===!1)return!1}if(!a.children||a.expanded!==!0&&e&&!i)return d;var w=d,y=a.children.length;if(typeof a.children!="function"){for(var x=0;x<y;x+=1)if(w=ci({callback:o,getNodeKey:r,ignoreCollapsed:e,node:a.children[x],parentNode:i?null:a,currentIndex:w+1,lowerSiblingCounts:[].concat(ee(f),[y-x-1]),path:p}),w===!1)return!1}return w}function di(t){var o=t.callback,r=t.getNodeKey,e=t.ignoreCollapsed,n=t.isPseudoRoot,i=n===void 0?!1:n,a=t.node,l=t.parentNode,s=l===void 0?null:l,d=t.currentIndex,c=t.path,u=c===void 0?[]:c,h=t.lowerSiblingCounts,f=h===void 0?[]:h,p=K({},a),g=i?[]:[].concat(ee(u),[r({node:p,treeIndex:d})]),C={node:p,parentNode:s,path:g,lowerSiblingCounts:f,treeIndex:d};if(!p.children||p.expanded!==!0&&e&&!i)return{treeIndex:d,node:o(C)};var w=d,y=p.children.length;return typeof p.children!="function"&&(p.children=p.children.map(function(x,N){var P=di({callback:o,getNodeKey:r,ignoreCollapsed:e,node:x,parentNode:i?null:p,currentIndex:w+1,lowerSiblingCounts:[].concat(ee(f),[y-N-1]),path:g});return w=P.treeIndex,P.node})),{node:o(C),treeIndex:w}}function ui(t){var o=t.treeData,r=t.getNodeKey,e=t.callback,n=t.ignoreCollapsed,i=n===void 0?!0:n;!o||o.length<1||ci({callback:e,getNodeKey:r,ignoreCollapsed:i,isPseudoRoot:!0,node:{children:o},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function oc(t){var o=t.treeData,r=t.getNodeKey,e=t.callback,n=t.ignoreCollapsed,i=n===void 0?!0:n;return!o||o.length<1?[]:di({callback:e,getNodeKey:r,ignoreCollapsed:i,isPseudoRoot:!0,node:{children:o},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function ic(t){var o=t.treeData,r=t.expanded,e=r===void 0?!0:r;return oc({treeData:o,callback:function(i){var a=i.node;return K(K({},a),{},{expanded:e})},getNodeKey:function(i){var a=i.treeIndex;return a},ignoreCollapsed:!1})}function Rt(t){var o=t.treeData,r=t.path,e=t.newNode,n=t.getNodeKey,i=t.ignoreCollapsed,a=i===void 0?!0:i,l="RESULT_MISS",s=function c(u){var h=u.isPseudoRoot,f=h===void 0?!1:h,p=u.node,g=u.currentTreeIndex,C=u.pathIndex;if(!f&&n({node:p,treeIndex:g})!==r[C])return l;if(C>=r.length-1)return typeof e=="function"?e({node:p,treeIndex:g}):e;if(!p.children)throw new Error("Path referenced children of node with no children.");for(var w=g+1,y=0;y<p.children.length;y+=1){var x=c({node:p.children[y],currentTreeIndex:w,pathIndex:C+1});if(x!==l)return x?K(K({},p),{},{children:[].concat(ee(p.children.slice(0,y)),[x],ee(p.children.slice(y+1)))}):K(K({},p),{},{children:[].concat(ee(p.children.slice(0,y)),ee(p.children.slice(y+1)))});w+=1+Bn({node:p.children[y],ignoreCollapsed:a})}return l},d=s({node:{children:o},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(d===l)throw new Error("No node found at the given path.");return d.children}function ac(t){var o=t.treeData,r=t.path,e=t.getNodeKey,n=t.ignoreCollapsed,i=n===void 0?!0:n,a=null,l=null,s=Rt({treeData:o,path:r,getNodeKey:e,ignoreCollapsed:i,newNode:function(c){var u=c.node,h=c.treeIndex;return a=u,l=h,null}});return{treeData:s,node:a,treeIndex:l}}function hi(t){var o=t.targetDepth,r=t.minimumTreeIndex,e=t.newNode,n=t.ignoreCollapsed,i=t.expandParent,a=t.isPseudoRoot,l=a===void 0?!1:a,s=t.isLastChild,d=t.node,c=t.currentIndex,u=t.currentDepth,h=t.getNodeKey,f=t.path,p=f===void 0?[]:f,g=function(J){return l?[]:[].concat(ee(p),[h({node:J,treeIndex:c})])};if(c>=r-1||s&&!(d.children&&d.children.length)){if(typeof d.children=="function")throw new Error("Cannot add to children defined by a function");var C=i?{expanded:!0}:{},w=K(K(K({},d),C),{},{children:d.children?[e].concat(ee(d.children)):[e]});return{node:w,nextIndex:c+2,insertedTreeIndex:c+1,parentPath:g(w),parentNode:l?null:w}}if(u>=o-1){if(!d.children||typeof d.children=="function"||d.expanded!==!0&&n&&!l)return{node:d,nextIndex:c+1};for(var y=c+1,x=null,N=null,P=0;P<d.children.length;P+=1){if(y>=r){x=y,N=P;break}y+=1+Bn({node:d.children[P],ignoreCollapsed:n})}if(N===null){if(y<r&&!s)return{node:d,nextIndex:y};x=y,N=d.children.length}var R=K(K({},d),{},{children:[].concat(ee(d.children.slice(0,N)),[e],ee(d.children.slice(N)))});return{node:R,nextIndex:y,insertedTreeIndex:x,parentPath:g(R),parentNode:l?null:R}}if(!d.children||typeof d.children=="function"||d.expanded!==!0&&n&&!l)return{node:d,nextIndex:c+1};var k=null,m=null,S=null,_=c+1,L=d.children;typeof L!="function"&&(L=L.map(function(B,J){if(k!==null)return B;var X=hi({targetDepth:o,minimumTreeIndex:r,newNode:e,ignoreCollapsed:n,expandParent:i,isLastChild:s&&J===L.length-1,node:B,currentIndex:_,currentDepth:u+1,getNodeKey:h,path:[]});return"insertedTreeIndex"in X&&(k=X.insertedTreeIndex,S=X.parentNode,m=X.parentPath),_=X.nextIndex,X.node}));var F=K(K({},d),{},{children:L}),W={node:F,nextIndex:_};return k!==null&&(W.insertedTreeIndex=k,W.parentPath=[].concat(ee(g(F)),ee(m)),W.parentNode=S),W}function fi(t){var o=t.treeData,r=t.depth,e=t.minimumTreeIndex,n=t.newNode,i=t.getNodeKey,a=i===void 0?function(){}:i,l=t.ignoreCollapsed,s=l===void 0?!0:l,d=t.expandParent,c=d===void 0?!1:d;if(!o&&r===0)return{treeData:[n],treeIndex:0,path:[a({node:n,treeIndex:0})],parentNode:null};var u=hi({targetDepth:r,minimumTreeIndex:e,newNode:n,ignoreCollapsed:s,expandParent:c,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:o},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in u))throw new Error("No suitable position found to insert.");var h=u.insertedTreeIndex;return{treeData:u.node.children,treeIndex:h,path:[].concat(ee(u.parentPath),[a({node:n,treeIndex:h})]),parentNode:u.parentNode}}function lc(t){var o=t.treeData,r=t.getNodeKey,e=t.ignoreCollapsed,n=e===void 0?!0:e;if(!o||o.length<1)return[];var i=[];return ui({treeData:o,getNodeKey:r,ignoreCollapsed:n,callback:function(l){i.push(l)}}),i}function pi(t,o){return!!t.children&&typeof t.children!="function"&&t.children.some(function(r){return r===o||pi(r,o)})}function gi(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.children?typeof t.children=="function"?o+1:t.children.reduce(function(r,e){return Math.max(r,gi(e,o+1))},o):o}function sc(t){var o=t.getNodeKey,r=t.treeData,e=t.searchQuery,n=t.searchMethod,i=t.searchFocusOffset,a=t.expandAllMatchPaths,l=a===void 0?!1:a,s=t.expandFocusMatchPaths,d=s===void 0?!0:s,c=0,u=function f(p){var g=p.isPseudoRoot,C=g===void 0?!1:g,w=p.node,y=p.currentIndex,x=p.path,N=x===void 0?[]:x,P=[],R=!1,k=!1,m=C?[]:[].concat(ee(N),[o({node:w,treeIndex:y})]),S=C?null:{path:m,treeIndex:y},_=w.children&&typeof w.children!="function"&&w.children.length>0;!C&&n(K(K({},S),{},{node:w,searchQuery:e}))&&(c===i&&(k=!0),c+=1,R=!0);var L=y,F=K({},w);return _&&(F.children=F.children.map(function(W){var B=f({node:W,currentIndex:L+1,path:m});return B.node.expanded?L=B.treeIndex:L+=1,(B.matches.length>0||B.hasFocusMatch)&&(P=[].concat(ee(P),ee(B.matches)),B.hasFocusMatch&&(k=!0),(l&&B.matches.length>0||(l||d)&&B.hasFocusMatch)&&(F.expanded=!0)),B.node})),!C&&!F.expanded&&(P=P.map(function(W){return K(K({},W),{},{treeIndex:null})})),R&&(P=[K(K({},S),{},{node:F})].concat(ee(P))),{node:P.length>0?F:w,matches:P,hasFocusMatch:k,treeIndex:L}},h=u({node:{children:r},isPseudoRoot:!0,currentIndex:-1});return{matches:h.matches,treeData:h.node.children}}function ve(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return o.filter(Boolean).join(" ")}function cc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var Un=function(t){an(r,t);var o=cc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.scaffoldBlockPxWidth,a=n.toggleChildrenVisibility,l=n.connectDragPreview,s=n.connectDragSource,d=n.isDragging,c=n.canDrop,u=n.canDrag,h=n.node,f=n.title,p=n.subtitle,g=n.draggedNode,C=n.path,w=n.treeIndex,y=n.isSearchMatch,x=n.isSearchFocus,N=n.buttons,P=n.className,R=n.style,k=n.didDrop;n.treeId,n.isOver,n.parentNode;var m=n.rowDirection,S=Hn(n,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),_=f||h.title,L=p||h.subtitle,F=m==="rtl"?"rst__rtl":null,W;u&&(typeof h.children=="function"&&h.expanded?W=q.createElement("div",{className:"rst__loadingHandle"},q.createElement("div",{className:"rst__loadingCircle"},ee(new Array(12)).map(function(Y,oe){return q.createElement("div",{key:oe,className:ve("rst__loadingCirclePoint",F)})}))):W=s(q.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var B=g&&pi(g,h),J=!k&&d,X={left:-.5*i};return m==="rtl"&&(X={right:-.5*i}),q.createElement("div",Ve({style:{height:"100%"}},S),a&&h.children&&(h.children.length>0||typeof h.children=="function")&&q.createElement("div",null,q.createElement("button",{type:"button","aria-label":h.expanded?"Collapse":"Expand",className:ve(h.expanded?"rst__collapseButton":"rst__expandButton",F),style:X,onClick:function(){return a({node:h,path:C,treeIndex:w})}}),h.expanded&&!d&&q.createElement("div",{style:{width:i},className:ve("rst__lineChildren",F)})),q.createElement("div",{className:ve("rst__rowWrapper",F)},l(q.createElement("div",{className:ve("rst__row",J&&"rst__rowLandingPad",J&&!c&&"rst__rowCancelPad",y&&"rst__rowSearchMatch",x&&"rst__rowSearchFocus",F,P),style:K({opacity:B?.5:1},R)},W,q.createElement("div",{className:ve("rst__rowContents",!u&&"rst__rowContentsDragDisabled",F)},q.createElement("div",{className:ve("rst__rowLabel",F)},q.createElement("span",{className:ve("rst__rowTitle",h.subtitle&&"rst__rowTitleWithSubtitle")},typeof _=="function"?_({node:h,path:C,treeIndex:w}):_),L&&q.createElement("span",{className:"rst__rowSubtitle"},typeof L=="function"?L({node:h,path:C,treeIndex:w}):L)),q.createElement("div",{className:"rst__rowToolbar"},N.map(function(Y,oe){return q.createElement("div",{key:oe,className:"rst__toolbarButton"},Y)})))))))}}]),r}(T.Component);Un.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Un.propTypes={node:I.shape({}).isRequired,title:I.oneOfType([I.func,I.node]),subtitle:I.oneOfType([I.func,I.node]),path:I.arrayOf(I.oneOfType([I.string,I.number])).isRequired,treeIndex:I.number.isRequired,treeId:I.string.isRequired,isSearchMatch:I.bool,isSearchFocus:I.bool,canDrag:I.bool,scaffoldBlockPxWidth:I.number.isRequired,toggleChildrenVisibility:I.func,buttons:I.arrayOf(I.node),className:I.string,style:I.shape({}),connectDragPreview:I.func.isRequired,connectDragSource:I.func.isRequired,parentNode:I.shape({}),isDragging:I.bool.isRequired,didDrop:I.bool.isRequired,draggedNode:I.shape({}),isOver:I.bool.isRequired,canDrop:I.bool,rowDirection:I.string};var Vn=function(o){var r=o.isOver,e=o.canDrop;return q.createElement("div",{className:ve("rst__placeholder",e&&"rst__placeholderLandingPad",e&&!r&&"rst__placeholderCancelPad")})};Vn.defaultProps={isOver:!1,canDrop:!1};Vn.propTypes={isOver:I.bool,canDrop:I.bool};function dc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var qn=function(t){an(r,t);var o=dc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.children,a=n.listIndex,l=n.swapFrom,s=n.swapLength,d=n.swapDepth,c=n.scaffoldBlockPxWidth,u=n.lowerSiblingCounts,h=n.connectDropTarget,f=n.isOver,p=n.draggedNode,g=n.canDrop,C=n.treeIndex;n.treeId,n.getPrevRow,n.node,n.path;var w=n.rowDirection,y=Hn(n,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),x=w==="rtl"?"rst__rtl":null,N=u.length,P=[];u.forEach(function(k,m){var S="";if(k>0?a===0?S="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":m===N-1?S="rst__lineHalfHorizontalRight rst__lineFullVertical":S="rst__lineFullVertical":a===0?S="rst__lineHalfHorizontalRight":m===N-1&&(S="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),P.push(q.createElement("div",{key:"pre_".concat(1+m),style:{width:c},className:ve("rst__lineBlock",S,x)})),C!==a&&m===d){var _="";a===l+s-1?_="rst__highlightBottomLeftCorner":C===l?_="rst__highlightTopLeftCorner":_="rst__highlightLineVertical";var L;w==="rtl"?L={width:c,right:c*m}:L={width:c,left:c*m},P.push(q.createElement("div",{key:m,style:L,className:ve("rst__absoluteLineBlock",_,x)}))}});var R;return w==="rtl"?R={right:c*N}:R={left:c*N},h(q.createElement("div",Ve({},y,{className:ve("rst__node",x)}),P,q.createElement("div",{className:"rst__nodeContent",style:R},T.Children.map(i,function(k){return T.cloneElement(k,{isOver:f,canDrop:g,draggedNode:p})}))))}}]),r}(T.Component);qn.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};qn.propTypes={treeIndex:I.number.isRequired,treeId:I.string.isRequired,swapFrom:I.number,swapDepth:I.number,swapLength:I.number,scaffoldBlockPxWidth:I.number.isRequired,lowerSiblingCounts:I.arrayOf(I.number).isRequired,listIndex:I.number.isRequired,children:I.node.isRequired,connectDropTarget:I.func.isRequired,isOver:I.bool.isRequired,canDrop:I.bool,draggedNode:I.shape({}),getPrevRow:I.func.isRequired,node:I.shape({}).isRequired,path:I.arrayOf(I.oneOfType([I.string,I.number])).isRequired,rowDirection:I.string};function uc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var Kn=function(t){an(r,t);var o=uc(r);function r(){return At(this,r),o.apply(this,arguments)}return jt(r,[{key:"render",value:function(){var n=this.props,i=n.children,a=n.connectDropTarget;n.treeId,n.drop;var l=Hn(n,["children","connectDropTarget","treeId","drop"]);return a(q.createElement("div",null,T.Children.map(i,function(s){return T.cloneElement(s,K({},l))})))}}]),r}(T.Component);Kn.defaultProps={canDrop:!1,draggedNode:null};Kn.propTypes={children:I.node.isRequired,connectDropTarget:I.func.isRequired,isOver:I.bool.isRequired,canDrop:I.bool,draggedNode:I.shape({}),treeId:I.string.isRequired,drop:I.func.isRequired};function hc(t){var o=t.treeIndex;return o}function vi(t){return typeof t=="string"?t:t===null||dt(t)!=="object"||!t.props||!t.props.children||typeof t.props.children!="string"&&dt(t.props.children)!=="object"?"":typeof t.props.children=="string"?t.props.children:t.props.children.map(function(o){return vi(o)}).join("")}function to(t,o,r,e,n){return typeof r[t]=="function"?String(r[t]({node:r,path:e,treeIndex:n})).indexOf(o)>-1:dt(r[t])==="object"?vi(r[t]).indexOf(o)>-1:r[t]&&String(r[t]).indexOf(o)>-1}function fc(t){var o=t.node,r=t.path,e=t.treeIndex,n=t.searchQuery;return to("title",n,o,r,e)||to("subtitle",n,o,r,e)}var Xn=function(o){var r=[],e=[],n=null;return function(i){var a=Object.keys(i).sort(),l=a.map(function(s){return i[s]});return(l.length!==r.length||l.some(function(s,d){return s!==r[d]})||a.some(function(s,d){return s!==e[d]}))&&(r=l,e=a,n=o(i)),n}},Dn=Xn(fi),pc=Xn(lc),gc=Xn(Bn),vc=function(){function t(o){At(this,t),this.treeRef=o}return jt(t,[{key:"getTargetDepth",value:function(r,e,n){var i=0,a=r.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),i=Math.min(l.length,r.path.length)}var d,c=(e.getItem().path||[]).length;if(e.getItem().treeId!==this.treeId)if(c=0,n){var u=Ot.findDOMNode(n).getBoundingClientRect(),h=e.getSourceClientOffset().x-u.left;d=Math.round(h/r.scaffoldBlockPxWidth)}else d=r.path.length;else{var f=r.rowDirection==="rtl"?-1:1;d=Math.round(f*e.getDifferenceFromInitialOffset().x/r.scaffoldBlockPxWidth)}var p=Math.min(i,Math.max(0,c+d-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var g=e.getItem().node,C=gi(g);p=Math.max(0,Math.min(p,this.maxDepth-C-1))}return p}},{key:"canDrop",value:function(r,e){if(!e.isOver())return!1;var n=r.getPrevRow(),i=n?n.path:[],a=n?n.node:{},l=this.getTargetDepth(r,e,null);if(l>=i.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=e.getItem(),d=s.node,c=Dn({treeData:this.treeData,newNode:d,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:r.listIndex,expandParent:!0});return this.customCanDrop({node:d,prevPath:e.getItem().path,prevParent:e.getItem().parentNode,prevTreeIndex:e.getItem().treeIndex,nextPath:c.path,nextParent:c.parentNode,nextTreeIndex:c.treeIndex})}return!0}},{key:"wrapSource",value:function(r){var e=this,n={beginDrag:function(l){return e.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){e.endDrag(s.getDropResult())},isDragging:function(l,s){var d=s.getItem().node,c=l.node;return c===d}};function i(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Ei(this.dndType,n,i)(r)}},{key:"wrapTarget",value:function(r){var e=this,n={drop:function(l,s,d){var c={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:e.treeId,minimumTreeIndex:l.treeIndex,depth:e.getTargetDepth(l,s,d)};return e.drop(c),c},hover:function(l,s,d){var c=e.getTargetDepth(l,s,d),u=s.getItem().node,h=l.node!==u||c!==l.path.length-1;h&&(cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.dragHover({node:u,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:c})}))},canDrop:this.canDrop.bind(this)};function i(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return rr(this.dndType,n,i)(r)}},{key:"wrapPlaceholder",value:function(r){var e=this,n={drop:function(l,s){var d=s.getItem(),c=d.node,u=d.path,h=d.treeIndex,f={node:c,path:u,treeIndex:h,treeId:e.treeId,minimumTreeIndex:0,depth:0};return e.drop(f),f}};function i(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return rr(this.dndType,n,i)(r)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),t}();function mc(t,o,r){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,n=[].concat(ee(t.slice(0,o)),ee(t.slice(o+e)));return[].concat(ee(n.slice(0,r)),ee(t.slice(o,o+e)),ee(n.slice(r)))}function Sc(t){function o(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var r=Pe(t),e;if(o()){var n=Pe(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return ln(this,e)}}var no=1,_n=function(o){var r=K(K({},o),{},{style:K(K({},o.theme.style),o.style),innerStyle:K(K({},o.theme.innerStyle),o.innerStyle),reactVirtualizedListProps:K(K({},o.theme.reactVirtualizedListProps),o.reactVirtualizedListProps)}),e={nodeContentRenderer:Un,placeholderRenderer:Vn,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:qn};return Object.keys(e).forEach(function(n){o[n]===null&&(r[n]=typeof o.theme[n]<"u"?o.theme[n]:e[n])}),r},sn=function(t){an(r,t);var o=Sc(r);function r(e){var n;At(this,r),n=o.call(this,e);var i=_n(e),a=i.dndType,l=i.nodeContentRenderer,s=i.treeNodeRenderer,d=i.isVirtualized,c=i.slideRegionSize;return n.dndManager=new vc(Ne(n)),n.treeId="rst__".concat(no),no+=1,n.dndType=a||n.treeId,n.nodeContentRenderer=n.dndManager.wrapSource(l),n.treePlaceholderRenderer=n.dndManager.wrapPlaceholder(Kn),n.treeNodeRenderer=n.dndManager.wrapTarget(s),d&&(n.scrollZoneVirtualList=(Ol||kl)($o),n.vStrength=Dl(c),n.hStrength=Pl(c)),n.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},n.toggleChildrenVisibility=n.toggleChildrenVisibility.bind(Ne(n)),n.moveNode=n.moveNode.bind(Ne(n)),n.startDrag=n.startDrag.bind(Ne(n)),n.dragHover=n.dragHover.bind(Ne(n)),n.endDrag=n.endDrag.bind(Ne(n)),n.drop=n.drop.bind(Ne(n)),n.handleDndMonitorChange=n.handleDndMonitorChange.bind(Ne(n)),n}return jt(r,[{key:"componentDidMount",value:function(){r.loadLazyChildren(this.props,this.state);var n=r.search(this.props,this.state,!0,!0,!1);this.setState(n),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(n,i){this.state.dragging!==i.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(n){return pc({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:n})}},{key:"handleDndMonitorChange",value:function(){var n=this.props.dragDropManager.getMonitor();!n.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(n){var i=n.node,a=n.path,l=this.state.instanceProps,s=Rt({treeData:l.treeData,path:a,newNode:function(c){var u=c.node;return K(K({},u),{},{expanded:!u.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:i,expanded:!i.expanded,path:a})}},{key:"moveNode",value:function(n){var i=n.node,a=n.path,l=n.treeIndex,s=n.depth,d=n.minimumTreeIndex,c=fi({treeData:this.state.draggingTreeData,newNode:i,depth:s,minimumTreeIndex:d,expandParent:!0,getNodeKey:this.props.getNodeKey}),u=c.treeData,h=c.treeIndex,f=c.path,p=c.parentNode;this.props.onChange(u),this.props.onMoveNode({treeData:u,node:i,treeIndex:h,path:f,nextPath:f,nextTreeIndex:h,prevPath:a,prevTreeIndex:l,nextParentNode:p})}},{key:"startDrag",value:function(n){var i=this,a=n.path;this.setState(function(l){var s=ac({treeData:l.instanceProps.treeData,path:a,getNodeKey:i.props.getNodeKey}),d=s.treeData,c=s.node,u=s.treeIndex;return{draggingTreeData:d,draggedNode:c,draggedDepth:a.length-1,draggedMinimumTreeIndex:u,dragging:!0}})}},{key:"dragHover",value:function(n){var i=this,a=n.node,l=n.depth,s=n.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(d){var c=d.draggingTreeData,u=d.instanceProps,h=c||u.treeData,f=Dn({treeData:h,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:i.props.getNodeKey}),p=i.getRows(f.treeData),g=p[f.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:Rt({treeData:h,path:g.slice(0,-1),newNode:function(w){var y=w.node;return K(K({},y),{},{expanded:!0})},getNodeKey:i.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(n){var i=this,a=this.state.instanceProps,l=function(){return i.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!n)l();else if(n.treeId!==this.treeId){var s=n.node,d=n.path,c=n.treeIndex,u=this.props.shouldCopyOnOutsideDrop;typeof u=="function"&&(u=u({node:s,prevTreeIndex:c,prevPath:d}));var h=this.state.draggingTreeData||a.treeData;u&&(h=Rt({treeData:a.treeData,path:d,newNode:function(p){var g=p.node;return K({},g)},getNodeKey:this.props.getNodeKey})),this.props.onChange(h),this.props.onMoveNode({treeData:h,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:d,prevTreeIndex:c})}}},{key:"drop",value:function(n){this.moveNode(n)}},{key:"canNodeHaveChildren",value:function(n){var i=this.props.canNodeHaveChildren;return i?i(n):!0}},{key:"renderRow",value:function(n,i){var a=i.listIndex,l=i.style,s=i.getPrevRow,d=i.matchKeys,c=i.swapFrom,u=i.swapDepth,h=i.swapLength,f=n.node,p=n.parentNode,g=n.path,C=n.lowerSiblingCounts,w=n.treeIndex,y=_n(this.props),x=y.canDrag,N=y.generateNodeProps,P=y.scaffoldBlockPxWidth,R=y.searchFocusOffset,k=y.rowDirection,m=this.treeNodeRenderer,S=this.nodeContentRenderer,_=g[g.length-1],L=_ in d,F=L&&d[_]===R,W={node:f,parentNode:p,path:g,lowerSiblingCounts:C,treeIndex:w,isSearchMatch:L,isSearchFocus:F},B=N?N(W):{},J=typeof x!="function"?x:x(W),X={treeIndex:w,scaffoldBlockPxWidth:P,node:f,path:g,treeId:this.treeId,rowDirection:k};return q.createElement(m,Ve({style:l,key:_,listIndex:a,getPrevRow:s,lowerSiblingCounts:C,swapFrom:c,swapLength:h,swapDepth:u},X),q.createElement(S,Ve({parentNode:p,isSearchMatch:L,isSearchFocus:F,canDrag:J,toggleChildrenVisibility:this.toggleChildrenVisibility},X,B)))}},{key:"render",value:function(){var n=this,i=_n(this.props),a=i.dragDropManager,l=i.style,s=i.className,d=i.innerStyle,c=i.rowHeight,u=i.isVirtualized,h=i.placeholderRenderer,f=i.reactVirtualizedListProps,p=i.getNodeKey,g=i.rowDirection,C=this.state,w=C.searchMatches,y=C.searchFocusTreeIndex,x=C.draggedNode,N=C.draggedDepth,P=C.draggedMinimumTreeIndex,R=C.instanceProps,k=this.state.draggingTreeData||R.treeData,m=g==="rtl"?"rst__rtl":null,S,_=null,L=null;if(x&&P!==null){var F=Dn({treeData:k,newNode:x,depth:N,minimumTreeIndex:P,expandParent:!0,getNodeKey:p}),W=P;_=F.treeIndex,L=1+gc({node:x}),S=mc(this.getRows(F.treeData),_,W,L)}else S=this.getRows(k);var B={};w.forEach(function(re,V){var G=re.path;B[G[G.length-1]]=V});var J=y!==null?{scrollToIndex:y}:{},X=l,Y;if(S.length<1){var oe=this.treePlaceholderRenderer,le=h;Y=q.createElement(oe,{treeId:this.treeId,drop:this.drop},q.createElement(le,null))}else if(u){X=K({height:"100%"},X);var ge=this.scrollZoneVirtualList;Y=q.createElement(Fo,null,function(re){var V=re.height,G=re.width;return q.createElement(ge,Ve({},J,{dragDropManager:a,verticalStrength:n.vStrength,horizontalStrength:n.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:G,onScroll:function(A){var M=A.scrollTop;n.scrollTop=M},height:V,style:d,rowCount:S.length,estimatedRowSize:typeof c!="function"?c:void 0,rowHeight:typeof c!="function"?c:function($){var A=$.index;return c({index:A,treeIndex:A,node:S[A].node,path:S[A].path})},rowRenderer:function(A){var M=A.index,D=A.style;return n.renderRow(S[M],{listIndex:M,style:D,getPrevRow:function(){return S[M-1]||null},matchKeys:B,swapFrom:_,swapDepth:N,swapLength:L})}},f))})}else Y=S.map(function(re,V){return n.renderRow(re,{listIndex:V,style:{height:typeof c!="function"?c:c({index:V,treeIndex:V,node:re.node,path:re.path})},getPrevRow:function(){return S[V-1]||null},matchKeys:B,swapFrom:_,swapDepth:N,swapLength:L})});return q.createElement("div",{className:ve("rst__tree",s,m),style:X},Y)}}],[{key:"getDerivedStateFromProps",value:function(n,i){var a=i.instanceProps,l={},s=nr(a.treeData,n.treeData);return a.treeData=n.treeData,s?nr(a.searchQuery,n.searchQuery)?a.searchFocusOffset!==n.searchFocusOffset&&Object.assign(l,r.search(n,i,!0,!0,!0)):Object.assign(l,r.search(n,i,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,r.loadLazyChildren(n,i),Object.assign(l,r.search(n,i,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=n.searchQuery,a.searchFocusOffset=n.searchFocusOffset,l.instanceProps=K(K({},a),l.instanceProps),l}},{key:"search",value:function(n,i,a,l,s){var d=n.onChange,c=n.getNodeKey,u=n.searchFinishCallback,h=n.searchQuery,f=n.searchMethod,p=n.searchFocusOffset,g=n.onlyExpandSearchedNodes,C=i.instanceProps;if(!h&&!f)return u&&u([]),{searchMatches:[]};var w={instanceProps:{}},y=sc({getNodeKey:c,treeData:g?ic({treeData:C.treeData,expanded:!1}):C.treeData,searchQuery:h,searchMethod:f||fc,searchFocusOffset:p,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),x=y.treeData,N=y.matches;l&&(w.instanceProps.ignoreOneTreeUpdate=!0,d(x)),u&&u(N);var P=null;return a&&p!==null&&p<N.length&&(P=N[p].treeIndex),w.searchMatches=N,w.searchFocusTreeIndex=P,w}},{key:"loadLazyChildren",value:function(n,i){var a=i.instanceProps;ui({treeData:a.treeData,getNodeKey:n.getNodeKey,callback:function(s){var d=s.node,c=s.path,u=s.lowerSiblingCounts,h=s.treeIndex;d.children&&typeof d.children=="function"&&(d.expanded||n.loadCollapsedLazyChildren)&&d.children({node:d,path:c,lowerSiblingCounts:u,treeIndex:h,done:function(p){return n.onChange(Rt({treeData:a.treeData,path:c,newNode:function(C){var w=C.node;return w===d?K(K({},w),{},{children:p}):w},getNodeKey:n.getNodeKey}))}})}})}}]),r}(T.Component);sn.propTypes={dragDropManager:I.shape({getMonitor:I.func}).isRequired,treeData:I.arrayOf(I.object).isRequired,style:I.shape({}),className:I.string,innerStyle:I.shape({}),rowHeight:I.oneOfType([I.number,I.func]),slideRegionSize:I.number,reactVirtualizedListProps:I.shape({}),scaffoldBlockPxWidth:I.number,maxDepth:I.number,searchMethod:I.func,searchQuery:I.any,searchFocusOffset:I.number,searchFinishCallback:I.func,generateNodeProps:I.func,isVirtualized:I.bool,treeNodeRenderer:I.func,nodeContentRenderer:I.func,placeholderRenderer:I.func,theme:I.shape({style:I.shape({}),innerStyle:I.shape({}),reactVirtualizedListProps:I.shape({}),scaffoldBlockPxWidth:I.number,slideRegionSize:I.number,rowHeight:I.oneOfType([I.number,I.func]),treeNodeRenderer:I.func,nodeContentRenderer:I.func,placeholderRenderer:I.func}),getNodeKey:I.func,onChange:I.func.isRequired,onMoveNode:I.func,canDrag:I.oneOfType([I.func,I.bool]),canDrop:I.func,canNodeHaveChildren:I.func,shouldCopyOnOutsideDrop:I.oneOfType([I.func,I.bool]),onVisibilityToggle:I.func,dndType:I.string,onDragStateChanged:I.func,onlyExpandSearchedNodes:I.bool,rowDirection:I.string};sn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:hc,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};rc(sn);var yc=function(o){return q.createElement(Mi.Consumer,null,function(r){var e=r.dragDropManager;return e===void 0?null:q.createElement(sn,Ve({},o,{dragDropManager:e}))})},mi={exports:{}};function wn(t){return t&&Ki(t)==="object"&&t.constructor===Object}function Si(t,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},e=r.clone?ce({},t):t;return wn(t)&&wn(o)&&Object.keys(o).forEach(function(n){n!=="__proto__"&&(wn(o[n])&&n in t?e[n]=Si(t[n],o[n],r):e[n]=o[n])}),e}function yi(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.baseClasses,r=t.newClasses;if(t.Component,!r)return o;var e=ce({},o);return Object.keys(r).forEach(function(n){r[n]&&(e[n]="".concat(o[n]," ").concat(r[n]))}),e}var lt={set:function(o,r,e,n){var i=o.get(r);i||(i=new Map,o.set(r,i)),i.set(e,n)},get:function(o,r,e){var n=o.get(r);return n?n.get(e):void 0},delete:function(o,r,e){var n=o.get(r);n.delete(e)}},Cc=q.createContext(null);function _c(){var t=q.useContext(Cc);return t}var wc=typeof Symbol=="function"&&Symbol.for;const xc=wc?Symbol.for("mui.nested"):"__THEME_NESTED__";var bc=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Rc(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.disableGlobal,r=o===void 0?!1:o,e=t.productionPrefix,n=e===void 0?"jss":e,i=t.seed,a=i===void 0?"":i,l=a===""?"":"".concat(a,"-"),s=0,d=function(){return s+=1,s};return function(c,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(bc.indexOf(c.key)!==-1)return"Mui-".concat(c.key);var f="".concat(l).concat(h,"-").concat(c.key);return!u.options.theme[xc]||a!==""?f:"".concat(f,"-").concat(d())}return"".concat(l).concat(n).concat(d())}}function Ic(){return{plugins:[Xi(),Yi(),Qi(),Ji(),Zi(),typeof window>"u"?null:ea(),ta()]}}var Tc=na(Ic()),zc=Rc(),Pc=new Map,Dc={disableGeneration:!1,generateClassName:zc,jss:Tc,sheetsCache:null,sheetsManager:Pc,sheetsRegistry:null},Oc=q.createContext(Dc),ro=-1e9;function kc(){return ro+=1,ro}var Nc={};function Lc(t){var o=typeof t=="function";return{create:function(e,n){var i;try{i=o?t(e):t}catch(s){throw s}if(!n||!e.overrides||!e.overrides[n])return i;var a=e.overrides[n],l=ce({},i);return Object.keys(a).forEach(function(s){l[s]=Si(l[s],a[s])}),l},options:{}}}function Mc(t,o,r){var e=t.state,n=t.stylesOptions;if(n.disableGeneration)return o||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),o!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=o,i=!0),i&&(e.cacheClasses.value=yi({baseClasses:e.cacheClasses.lastJSS,newClasses:o,Component:r})),e.cacheClasses.value}function Ec(t,o){var r=t.state,e=t.theme,n=t.stylesOptions,i=t.stylesCreator,a=t.name;if(!n.disableGeneration){var l=lt.get(n.sheetsManager,i,e);l||(l={refs:0,staticSheet:null,dynamicStyles:null},lt.set(n.sheetsManager,i,e,l));var s=ce({},i.options,n,{theme:e,flip:typeof n.flip=="boolean"?n.flip:e.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var d=n.sheetsRegistry;if(l.refs===0){var c;n.sheetsCache&&(c=lt.get(n.sheetsCache,i,e));var u=i.create(e,a);c||(c=n.jss.createStyleSheet(u,ce({link:!1},s)),c.attach(),n.sheetsCache&<.set(n.sheetsCache,i,e,c)),d&&d.add(c),l.staticSheet=c,l.dynamicStyles=ra(u)}if(l.dynamicStyles){var h=n.jss.createStyleSheet(l.dynamicStyles,ce({link:!0},s));h.update(o),h.attach(),r.dynamicSheet=h,r.classes=yi({baseClasses:l.staticSheet.classes,newClasses:h.classes}),d&&d.add(h)}else r.classes=l.staticSheet.classes;l.refs+=1}}function Ac(t,o){var r=t.state;r.dynamicSheet&&r.dynamicSheet.update(o)}function jc(t){var o=t.state,r=t.theme,e=t.stylesOptions,n=t.stylesCreator;if(!e.disableGeneration){var i=lt.get(e.sheetsManager,n,r);i.refs-=1;var a=e.sheetsRegistry;i.refs===0&&(lt.delete(e.sheetsManager,n,r),e.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),o.dynamicSheet&&(e.jss.removeStyleSheet(o.dynamicSheet),a&&a.remove(o.dynamicSheet))}}function Fc(t,o){var r=q.useRef([]),e,n=q.useMemo(function(){return{}},o);r.current!==n&&(r.current=n,e=t()),q.useEffect(function(){return function(){e&&e()}},[n])}function Gc(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.name,e=o.classNamePrefix,n=o.Component,i=o.defaultTheme,a=i===void 0?Nc:i,l=it(o,["name","classNamePrefix","Component","defaultTheme"]),s=Lc(t),d=r||e||"makeStyles";s.options={index:kc(),name:r,meta:d,classNamePrefix:d};var c=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=_c()||a,p=ce({},q.useContext(Oc),l),g=q.useRef(),C=q.useRef();Fc(function(){var y={name:r,state:{},stylesCreator:s,stylesOptions:p,theme:f};return Ec(y,h),C.current=!1,g.current=y,function(){jc(y)}},[f,s]),q.useEffect(function(){C.current&&Ac(g.current,h),C.current=!0});var w=Mc(g.current,h.classes,n);return w};return c}const Wc=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),$c=nn(Wc);(function(t,o){(function(r,e){t.exports=e()})(typeof self<"u"?self:Le,function(){return function(r){function e(i){if(n[i])return n[i].exports;var a=n[i]={i,l:!1,exports:{}};return r[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var n={};return e.m=r,e.c=n,e.d=function(i,a,l){e.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:l})},e.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(a,"a",a),a},e.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},e.p="",e(e.s=3)}([function(r,e){r.exports=T},function(r,e){r.exports=yo},function(r,e){r.exports=$c},function(r,e,n){function i(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(4),l=i(a),s=n(6),d=i(s);e.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:d.default}},function(r,e,n){function i(y){return y&&y.__esModule?y:{default:y}}function a(y,x){return!!y.children&&typeof y.children!="function"&&y.children.some(function(N){return N===x||a(N,x)})}function l(y){var x=y.scaffoldBlockPxWidth,N=y.connectDragPreview,P=y.connectDragSource,R=y.isDragging,k=y.canDrop,m=y.canDrag,S=y.node,_=y.title,L=y.draggedNode,F=y.path,W=y.treeIndex,B=y.isSearchMatch,J=y.isSearchFocus,X=y.icons,Y=y.buttons,oe=y.className,le=y.style,ge=y.didDrop,re=y.lowerSiblingCounts,V=y.listIndex,G=y.swapFrom,$=y.swapLength,A=y.swapDepth,M=y.onItemClick,D=w(),b=_||S.title,O=L&&a(L,S),j=!ge&&R,H=[];re.forEach(function(ne,Ce){if(Ce>0&&(H.push(c.default.createElement("div",{className:D.lineBlock,key:"pre_"+(1+Ce),style:{width:x}})),W!==V&&Ce===A)){var xe="";xe=V===G+$-1?D.highlightBottomLeftCorner:W===G?D.highlightTopLeftCorner:D.highlightLineVertical,H.push(c.default.createElement("div",{className:D.absoluteLineBlock+" "+xe,key:"highlight_"+(1+Ce),style:{left:x*Ce,width:x}}))}});var U=c.default.createElement("div",{className:D.contentNode},N(c.default.createElement("div",{className:D.row+(S.active?" "+D.activeRow:"")+(j?" "+D.rowLandingPad:"")+(R?" "+D.rowLandingPadDisable:"")+(j&&!k?" "+D.rowCancelPad:"")+(B?" "+D.rowSearchMatch:"")+(J?" "+D.rowSearchFocus:"")+(m?"":" "+D.rowWrapperDragDisabled)+(oe?" "+oe:""),onClick:function(){return M?M(s({},S,{index:W})):null},style:s({opacity:O?.5:1},le)},S.type==="divider"?c.default.createElement("div",{className:D.divider}):c.default.createElement(d.Fragment,null,H,c.default.createElement("div",{className:D.rowIcon},X),c.default.createElement("div",{className:D.rowLabel},typeof b=="string"?c.default.createElement("span",{className:D.rowTitle},b):typeof b=="function"?b({node:S,path:F,treeIndex:W}):b),c.default.createElement("div",{className:D.rowToolbar},Y)))));return m?P(U,{dropEffect:"copy"}):U}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(y){for(var x=1;x<arguments.length;x++){var N=arguments[x];for(var P in N)Object.prototype.hasOwnProperty.call(N,P)&&(y[P]=N[P])}return y},d=n(0),c=i(d),u=n(1),h=i(u),f=n(2),p=i(f),g=n(5),C=i(g),w=(0,p.default)(C.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:h.default.node,canDrag:h.default.bool,canDrop:h.default.bool,className:h.default.string,connectDragPreview:h.default.func.isRequired,connectDragSource:h.default.func.isRequired,didDrop:h.default.bool.isRequired,draggedNode:h.default.shape({}),icons:h.default.node,isDragging:h.default.bool.isRequired,isOver:h.default.bool.isRequired,isSearchFocus:h.default.bool,isSearchMatch:h.default.bool,listIndex:h.default.number.isRequired,lowerSiblingCounts:h.default.arrayOf(h.default.number).isRequired,node:h.default.shape({}).isRequired,parentNode:h.default.shape({}),path:h.default.arrayOf(h.default.oneOfType([h.default.string,h.default.number])).isRequired,rowDirection:h.default.string.isRequired,scaffoldBlockPxWidth:h.default.number.isRequired,style:h.default.shape({}),swapDepth:h.default.number,swapFrom:h.default.number,swapLength:h.default.number,title:h.default.oneOfType([h.default.func,h.default.node]),toggleChildrenVisibility:h.default.func,treeId:h.default.string.isRequired,treeIndex:h.default.number.isRequired},e.default=l},function(r,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(r,e,n){function i(C){return C&&C.__esModule?C:{default:C}}function a(C){var w=C.children,y=C.listIndex,x=C.swapFrom,N=C.swapLength,P=C.swapDepth,R=C.lowerSiblingCounts,k=C.connectDropTarget,m=C.isOver,S=C.draggedNode,_=C.canDrop,L=g();return k(s.default.createElement("div",{className:L.node},l.Children.map(w,function(F){return(0,l.cloneElement)(F,{canDrop:_,draggedNode:S,isOver:m,listIndex:y,lowerSiblingCounts:R,swapDepth:P,swapFrom:x,swapLength:N})})))}Object.defineProperty(e,"__esModule",{value:!0});var l=n(0),s=i(l),d=n(1),c=i(d),u=n(2),h=i(u),f=n(7),p=i(f),g=(0,h.default)(p.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:c.default.bool,children:c.default.node.isRequired,connectDropTarget:c.default.func.isRequired,draggedNode:c.default.shape({}),getPrevRow:c.default.func.isRequired,isOver:c.default.bool.isRequired,listIndex:c.default.number.isRequired,lowerSiblingCounts:c.default.arrayOf(c.default.number).isRequired,node:c.default.shape({}).isRequired,path:c.default.arrayOf(c.default.oneOfType([c.default.string,c.default.number])).isRequired,rowDirection:c.default.string.isRequired,scaffoldBlockPxWidth:c.default.number.isRequired,swapDepth:c.default.number,swapFrom:c.default.number,swapLength:c.default.number,treeId:c.default.string.isRequired,treeIndex:c.default.number.isRequired},e.default=a},function(r,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{node:{display:"flex"}}}}])})})(mi);var Hc=mi.exports;const Bc=ho(Hc),Uc=t=>t.from!=="team-tmpl";function Vc({prevPath:t,nextPath:o,node:r}){if(r.from==="team-tmpl")return!1;const e=t.length,n=o.length;return!!(e===n&&Sa(t.slice(0,e-1),o.slice(0,n-1)))}function Ci({treeNode:t}){const{locale:o}=De(),{blocklet:r}=et(),e=r.environments.find(a=>a.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),n=ie(a=>{if(a!=null&&a.startsWith("/"))try{return new URL(a,e==null?void 0:e.value).href}catch{console.error("Failed to parse url",{url:a,origin:e==null?void 0:e.value})}return a});function i(){const{title:a,subtitle:l}=t;let s=a,d=l;return st(a)&&(s=a[o]),!T.isValidElement(l)&&st(l)&&(d=l[o]),v.jsxs(Z,{display:"flex",alignItems:"center",children:[v.jsx(Re,{variant:"subtitle1",fontSize:16,children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:d})]})}return v.jsxs(v.Fragment,{children:[t.icon&&(Ln(n(t.icon))?v.jsx($e,{size:16,style:{marginRight:4},icon:n(t.icon)}):v.jsx(he,{size:16,style:{marginRight:4},icon:t.icon})),i()]})}Ci.propTypes={treeNode:I.object.isRequired};function Yn({treeData:t,setTreeData:o,renderActions:r}){const e=t.map(i=>({...i,expanded:!0})),n={};return typeof window<"u"&&(n.context=window),v.jsx(Ai,{backend:ji,...n,children:v.jsx(yc,{generateNodeProps:i=>{const a=Uc(i.node);return{buttons:r({data:i.node,className:"list-item-actions"}),icons:a?v.jsx(he,{icon:"ic:round-drag-indicator"}):v.jsx(Z,{width:16,height:16}),title:v.jsx(Ci,{treeNode:i.node})}},maxDepth:2,isVirtualized:!1,treeData:e,onChange:o,canDrop:Vc,theme:Bc})})}Yn.propTypes={treeData:I.object.isRequired,setTreeData:I.func,renderActions:I.func};Yn.defaultProps={setTreeData:()=>{},renderActions:()=>{}};const yt="en";function Qn({sx:t,onAdd:o,onChange:r,locales:e,localeMap:n,onRemoveLocale:i}){const{t:a}=De(),l=T.useRef(),[s,d]=T.useState(null),c=kt({currentLocale:yt,localeList:[],inputLocale:"",localeError:""}),u=T.useMemo(()=>!!s,[s]),h=T.useMemo(()=>e.includes(c.currentLocale)?c.currentLocale:yt,[e,c.currentLocale]),f=T.useMemo(()=>Object.keys(It(n,[...c.localeList,yt])).map(P=>({title:n[P],value:P})),[c.localeList]),p=T.useMemo(()=>{var R;return`Default (${n[yt]||((R=Object.values(n))==null?void 0:R[0])})`},[n]);T.useEffect(()=>{c.localeList=[...e]},[e,c]),$i("enter",()=>{setTimeout(()=>{w()})},{target:l});function g(P){return P?P==="en"||c.localeList.includes(P)?a("navigation.form.localeExists",{value:P}):!0:a("common.requiredErrorText",{name:"Locale"})}function C(P=""){const R=P==null?void 0:P.trim(),k=g(R);return k!==!0?c.localeError=k:c.localeError="",k}function w(){var k;const P=(k=c.inputLocale)==null?void 0:k.trim();C(P)===!0&&(y(),c.localeList.push(P),c.currentLocale=P,o(P))}function y(){d(null),c.inputLocale="",c.localeError=""}function x(P,R){P.preventDefault(),P.stopPropagation(),c.localeList=_o(c.localeList,R),i(R),R===c.currentLocale&&(c.currentLocale=yt)}function N(P){const{value:R}=P.target;C(R),c.inputLocale=R}return v.jsxs(v.Fragment,{children:[v.jsxs(oa,{sx:t,value:h,onChange:(P,R)=>{c.currentLocale=R,r(R)},children:[v.jsx(or,{label:p,value:"en"}),c.localeList.map(P=>v.jsx(or,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[n[P],v.jsx(Te,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{x(R,P)},children:v.jsx(he,{icon:"mdi:close",height:14})})]}),value:P},P)),v.jsx(Te,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:P=>{d(P.currentTarget)},children:v.jsx(he,{icon:"mdi:plus"})})]}),v.jsx(xn,{open:u,anchorEl:s,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(Z,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:a("navigation.form.localePlaceholder")}),v.jsx(Z,{mt:1,children:v.jsx(Rn,{required:!0,fullWidth:!0,label:"Locale",value:c.inputLocale,options:f,onChange:N,error:!!c.localeError,helperText:c.localeError||" "})}),v.jsx(Z,{display:"flex",justifyContent:"flex-end",children:v.jsx(Jt,{size:"small",variant:"contained",onClick:w,children:a("common.confirm")})})]})})]})}Qn.propTypes={sx:I.any,onAdd:I.func,onChange:I.func,onRemoveLocale:I.func,localeMap:I.object,locales:I.array};Qn.defaultProps={sx:null,onAdd:()=>{},onChange:()=>{},onRemoveLocale:()=>{},localeMap:{},locales:[]};const Jn=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function _i(t,o,r=5e3){for(const e of Jn){const n=Ze(e,t);try{return await Ba.get(n,{params:o,timeout:r})}catch(i){console.warn(`Failed to fetch from ${n}:`,i)}}throw new Error(`All icon API endpoints ${t} failed`)}async function qc({keyword:t,limit:o=999,start:r=0,palette:e=!1}){let n="",i=t;t.includes(":")&&([n,i]=t.split(":"));const{data:a}=await _i("/search",{query:`${i} palette=${e}`||t,start:r,limit:o,...n&&{prefix:n}});return a}const Vt=new Map;async function Kc(t){if(Vt.has(t))return Vt.get(t);const o=(async()=>{var n;const{data:r}=await _i("/collection",{prefix:t}),e=new Set;return(n=r.uncategorized)==null||n.forEach(i=>e.add(`${t}:${i}`)),Object.values(r.categories??{}).forEach(i=>{i.forEach(a=>e.add(`${t}:${a}`))}),Array.from(e)})();Vt.set(t,o);try{return await o}catch(r){throw Vt.delete(t),r}}function Xc(t){return Ze(Jn[0],`${t}.svg`)}function Yc(t){try{const o=new URL(t);for(const r of Jn)if(o.origin===r)return ya(o.pathname).replace(".svg","");return""}catch{return""}}function Qc(t){let o=!0,r=t;return t&&(t.startsWith("/")?(o=!1,r=""):Ln(t)&&(r=Yc(t))),{isIconId:o,iconId:r}}const Jc=T.lazy(()=>Ta(()=>import("./index-DyxFC42L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(t=>({default:t.Uploader})));function wi({icon:t,...o}){const[r,e]=T.useState(!1);return mo(async()=>{e(!1),await go(t),e(!0)},[t]),t?r?v.jsx(he,{icon:t,...o}):v.jsx(he,{color:"#f06f6e",icon:"ic:baseline-error",...o}):v.jsx(he,{icon:"material-symbols-light:select-rounded",...o})}wi.propTypes={icon:I.string.isRequired};function On({value:t,helperText:o,label:r,placeholder:e,methods:n=["select"],iconifyShape:i="id",...a}){var re;const{getSessionInHeader:l,prefix:s}=Ea(),{blocklet:d}=et(),c=Mn(V=>V.breakpoints.down("md")),u=d.environments.find(V=>V.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),f=T.useRef(null),p=T.useRef(null),g=T.useRef(null),{t:C,locale:w}=De(),{isIconId:y,iconId:x}=Qc(t),[N,P]=T.useState(null),{onChange:R,onBlur:k,sx:m,...S}=a,_=n.includes("upload"),L=n.includes("select"),F=Ze(s,"/api/media/upload",d.appPid),W=kt({showPopover:!1}),B=ie(V=>{if(V!=null&&V.startsWith("/"))try{return new URL(V,u==null?void 0:u.value).href}catch{console.error("Failed to parse url",{url:V,origin:u==null?void 0:u.value})}return V}),J=ie(async V=>await f.current.getUploader().uploadFile(V)),X=ie(()=>{P(null)}),Y=ie(()=>{L&&P(g.current)}),oe=ie(async V=>{try{if(i==="url"){const G=Xc(V),$=await Aa(G,{width:128,height:128}),A=await ja($,V);await J(A)}else R==null||R(V)}catch(G){console.error("Failed to pick icon:",G)}X()}),le=ie(V=>{V.stopPropagation(),p.current.open(),X()}),ge=ie(V=>{var G;(G=a==null?void 0:a.onChange)==null||G.call(a,V.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(ot,{helperText:o,value:t,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...m},onClick:L?Y:void 0,...S,label:r,placeholder:e,InputProps:{ref:g,readOnly:!0,startAdornment:v.jsx(bn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{t&&(W.showPopover=!0)},onMouseLeave:()=>{W.showPopover=!1},children:v.jsx($e,{size:28,icon:B(t),alt:"Error"})}),endAdornment:v.jsxs(bn,{position:"end",children:[v.jsx(Te,{sx:{visibility:t?"visible":"hidden"},onClick:V=>{V.stopPropagation(),R("")},children:v.jsx(po,{style:{fontSize:18}})}),_&&v.jsx(ia,{title:C("common.upload"),children:v.jsx(Te,{disableFocusRipple:!1,disableRipple:!1,onClick:le,children:v.jsx(wi,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&v.jsx(Z,{component:Ha,sx:{mr:"-6px",fontSize:24,transform:N?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}),L&&v.jsx(xn,{open:!!N,anchorEl:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...c&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:X,children:v.jsx(xi,{label:r,placeholder:e,value:y?x:"",sx:{width:((re=g.current)==null?void 0:re.offsetWidth)??"auto"},onPick:oe,onClose:X})}),v.jsx(kn,{ref:f,locale:w,apiPath:F,headers:h,imageEditorProps:{},onUploadFinish:ge}),v.jsx(kn,{ref:p,locale:w,apiPath:F,headers:h,onUploadFinish:ge}),v.jsx(xn,{sx:{pointerEvents:"none"},open:W.showPopover,anchorEl:g.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{W.showPopover=!1},disableRestoreFocus:!0,children:v.jsx($e,{size:120,icon:B(t),alt:"Error"})})]})}On.propTypes={value:I.string.isRequired,label:I.any,placeholder:I.any,helperText:I.string,methods:I.arrayOf(I.oneOf(["select","upload"])),iconifyShape:I.oneOf(["id","url"])};function xi({label:t,placeholder:o,value:r="",sx:e,onPick:n,onClose:i,...a}){const[l,s]=T.useState([]),[d,c]=T.useState(!0),[u,h]=T.useState(r),[f,p]=T.useState(!1),g=T.useRef(null),C=T.useRef([]),w=T.useRef(1),y=T.useRef(!0),{t:x}=De(),N=96,P=ie(()=>{!y.current||d||(c(!0),setTimeout(()=>{const m=w.current+1,S=(m-1)*N,_=m*N,L=C.current.slice(S,_);s(F=>[...F,...L]),w.current=m,y.current=_<C.current.length,c(!1)},300))}),R=ie(m=>{C.current=m,w.current=1,y.current=m.length>N;const S=m.slice(0,N);s(S),p(m.length===0),y.current&&P()}),{run:k}=So(async m=>{if(m){c(!0);try{const{icons:S}=await qc({keyword:m});R(S)}catch(S){console.error("Failed to search icons:",S),p(!0)}finally{c(!1)}}},{wait:300,trailing:!0});return T.useEffect(()=>{const m=()=>{if(!g.current)return;const{scrollTop:_,scrollHeight:L,clientHeight:F}=g.current;(_+F>=L-150||L<=F)&&P()},S=g.current;return S&&(S.addEventListener("scroll",m),m()),()=>{S&&S.removeEventListener("scroll",m)}},[P,d]),mo(async()=>{if(u)k(u);else{c(!0);try{const m=await Kc("mdi-light");R(m)}catch(m){console.error("Failed to fetch default icons:",m),p(!0)}finally{c(!1)}}},[u,k,R]),v.jsxs(Zc,{ref:g,sx:e,...a,children:[v.jsxs(Z,{className:"icon-picker-input",children:[v.jsx(ot,{label:x("navigation.form.searchIcons"),placeholder:x("navigation.form.searchIconsPlaceholder"),size:"small",value:u,sx:{flexGrow:1},autoFocus:!0,onChange:m=>h(m.target.value),InputProps:{endAdornment:v.jsx(Te,{sx:{visibility:u?"visible":"hidden"},onClick:()=>h(""),children:v.jsx(po,{style:{fontSize:18}})})}}),v.jsx(Jt,{onClick:i,children:x("common.cancel")})]}),v.jsxs(Z,{children:[l.length>0&&v.jsx(Z,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(m=>v.jsx(ed,{$active:r===m,onClick:()=>{n(m)},children:v.jsx(he,{icon:m,width:"32",height:"32"})},m))}),f&&v.jsx(Z,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(Z,{sx:{textAlign:"center"},children:"No matching results"})}),d&&v.jsx(Z,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(aa,{size:20})})]})]})}xi.propTypes={label:I.any,placeholder:I.any,value:I.string,sx:I.object,onPick:I.func.isRequired,onClose:I.func.isRequired};const Zc=fo(Z)(({theme:t})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[t.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:t.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:t.spacing(2),paddingBottom:t.spacing(1),paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:t.spacing(1),top:0,zIndex:1,backgroundColor:t.palette.background.paper}})),ed=fo(Te,{shouldForwardProp:t=>t!=="$active"})(({$active:t,theme:o})=>({boxSizing:"content-box",backgroundColor:t?o.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:o.palette.action.hover}})),kn=T.forwardRef(({locale:t,apiPath:o,headers:r,imageEditorProps:e={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:n},i)=>v.jsx(T.Suspense,{children:v.jsx(Jc,{locale:t,ref:i,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>n==null?void 0:n(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:e,apiPathProps:{uploader:o,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:r}})}));kn.propTypes={locale:I.string,apiPath:I.string,headers:I.object,imageEditorProps:I.object,onUploadFinish:I.func};const oo=24,io=48,ao="add",be="en",lo={title:{[be]:""},description:{[be]:""},link:{[be]:""}},We=["title","description","link"];function so(t){return _o(Array.from(new Set(We.flatMap(o=>st(t[o])?Object.keys(t[o]):[]))),be)}I.string.isRequired;const cn=T.forwardRef(function({section:o,components:r,rawNavigations:e,onChange:n,...i},a){const{roles:l}=wo(),{t:s,locale:d}=De(),{blocklet:c}=et(),u=T.useMemo(()=>{const b=c.environments.find(j=>j.key==="BLOCKLET_APP_LANGUAGES");return(b?b.value.split(","):["en","zh"]).filter(j=>Qe.SUPPORTED_LANGUAGES[j]).reduce((j,H)=>(j[H]=Qe.SUPPORTED_LANGUAGES[H].nativeName,j),{})},[c.environments]),h=T.useRef(()=>{}),f=kt({isRoot:!0,type:ao,linkDisabled:!1,locale:be,formState:we(lo),get localeList(){return so(f.formState)}}),{handleSubmit:p,control:g,reset:C,setValue:w,clearErrors:y,formState:{errors:x}}=Fa({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});T.useEffect(()=>{We.forEach(b=>w(b,f.formState[b][f.locale]))},[w,f.locale]);const N=Ga({control:g}),P=N.component,R=N.title,k=N.description,m=N.link,S=N.parent;T.useEffect(()=>{f.formState.title[f.locale]=R},[R]),T.useEffect(()=>{f.formState.description[f.locale]=k},[k]),T.useEffect(()=>{f.formState.link[f.locale]=m},[m]),T.useEffect(()=>{n==null||n(N)},[N,n]);const _=T.useMemo(()=>e.find(O=>P?r.find(H=>H.name===P).did===O.id:O.id===S),[r,e,P,S]),L=T.useMemo(()=>{if(_!=null&&_.component){const b=r.find(U=>U.name===_.component),{link:O}=b||{},j=st(O)?O[f.locale]:O;if(P)return dr(j);const H=st(_.link)?_.link[f.locale]:_.link;return dr(Ze(j,H||"/"))}return null},[r,f.locale,_,P]),F=T.useMemo(()=>{const{component:b}=_||{},O=r.find(U=>U.name===b),{navigation:j=[]}=O||{};return pe.flattenNavigation(j,{transform(U,ne){return ne!=null&&ne.section&&(U.section=U.section||ne.section),U}}).filter(U=>U.link).filter(U=>pe.isMatchSection(U.section,o)).map(U=>({label:U.link,title:U.title[d]||U.title}))},[_,r,o,d]),W=T.useCallback(()=>{f.isRoot=!0,f.locale=be,f.type=ao,f.linkDisabled=!1,f.formState=we(lo),C(),y(),h.current=()=>{}},[y,C,f]),B=T.useCallback((b={})=>(f.localeList.length>0&&We.forEach(O=>{new Set(Ca(f.formState[O])).size>1&&(b[O]=f.formState[O])}),_a(b.role)&&(b.role=void 0),b),[f.localeList,f.formState]),J=T.useCallback(({parent:b}={},O=()=>{})=>{f.type="add",f.isRoot=!b,w("parent",b==null?void 0:b.id),h.current=j=>{O(j)}},[w,f]),X=T.useCallback((b={},O=()=>{})=>{const{id:j,icon:H,parent:U,component:ne,role:Ce=[]}=b;w("id",j),w("icon",H),b.from==="team-tmpl"&&(f.linkDisabled=!0);const xe=so(b),Ae=(Q,te)=>{xa(Q)?f.formState[te]=xe.reduce((_e,je)=>(_e[je]=Q,_e),{[be]:Q}):st(Q)?f.formState[te]=we(Q):f.formState[te]={}};We.forEach(Q=>Ae(b[Q],Q)),We.forEach(Q=>w(Q,f.formState[Q][f.locale])),w("component",ne),w("parent",U),w("role",Ce||[]),f.type="edit",f.isRoot=!U,h.current=Q=>{const te=wa(Q,["id","title","description","icon","component","link","role"]);O(te)}},[w,f]);function Y(b){const O=b==null?void 0:b.trim();if(o!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>oo)return s("navigation.form.titleTooLong",{len:oo})}return!0}function oe(b){const O=b==null?void 0:b.trim();return O&&O.length>io?s("navigation.form.descriptionTooLong",{len:io}):!0}const le=ie(b=>b!=null&&b.startsWith("/")?new URL(b,window.location.origin).href:b);async function ge(b){const O=b==null?void 0:b.trim();if(O){if(Ln(le(O)))return!0;try{await go(O)}catch{return s("navigation.form.invalidIcon")}}return!0}function re(b){const O=b==null?void 0:b.trim();return O?ge(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}function V(b){const O=b==null?void 0:b.trim();return O?pe.checkLink(O)?!0:s("navigation.form.invalidLink"):f.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}const G=T.useCallback(b=>{f.locale=b,We.forEach(O=>{f.formState[O][b]||(f.formState[O][b]="")}),setTimeout(()=>{y()})},[y,f]),$=T.useCallback(()=>{const{title:b,link:O}=f.formState;if(o!=="bottomNavigation")for(const j of Object.keys(b)){const H=Y(b[j]);if(H!==!0)return H}for(const j of Object.keys(O)){const H=V(O[j]);if(H!==!0)return H}return!0},[o,f.formState]),A=T.useCallback(b=>{const O=$();O===!0?h.current(B(b)):_t.error(O)},[$,B]),M=T.useCallback(b=>{We.forEach(O=>{f.formState[O]=It(f.formState[O],b)})},[f.formState]),D=T.useCallback(b=>{f.locale=b,We.forEach(O=>{f.formState[O][b]=f.formState[O][be]}),setTimeout(()=>{y()})},[y,f]);return T.useImperativeHandle(a,()=>({add:J,edit:X,reset:()=>setTimeout(()=>W(),0),submit:p(A)}),[J,W,X,p,A]),v.jsxs(Z,{...i,children:[v.jsx(Qn,{sx:{mb:1},onAdd:D,onChange:G,onRemoveLocale:M,localeMap:u,locales:f.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[o!=="bottomNavigation"&&v.jsx(Fe,{name:"title",control:g,rules:{validate:Y},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.title)!=null&&O.message),helperText:((j=x==null?void 0:x.title)==null?void 0:j.message)||" ",...b})}}),o==="bottomNavigation"?v.jsx(Fe,{name:"icon",control:g,rules:{validate:re},render:({field:b})=>{var O,j;return v.jsx(On,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((O=x==null?void 0:x.icon)!=null&&O.message),helperText:(j=x==null?void 0:x.icon)==null?void 0:j.message,disabled:f.locale!==be,methods:["select"],iconifyShape:"url",...b})}}):v.jsx(Fe,{name:"icon",control:g,rules:{validate:ge},render:({field:b})=>{var O,j;return v.jsx(On,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((O=x==null?void 0:x.icon)!=null&&O.message),helperText:(j=x==null?void 0:x.icon)==null?void 0:j.message,disabled:f.locale!==be,...b})}}),f.isRoot&&v.jsx(Fe,{name:"component",control:g,render:({field:b})=>{var O,j;return v.jsx(Rn,{fullWidth:!0,margin:"dense",disabled:f.locale!==be&&b.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:r.map(H=>({title:H.title,value:H.name,description:H.link})),error:!!((O=x==null?void 0:x.component)!=null&&O.message),helperText:((j=x==null?void 0:x.component)==null?void 0:j.message)||" ",...It(b,"ref")})}}),!f.isRoot&&["header"].includes(o)&&v.jsx(Fe,{name:"description",control:g,rules:{validate:oe},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.description)!=null&&O.message),helperText:((j=x==null?void 0:x.description)==null?void 0:j.message)||" ",...b})}}),v.jsx(Fe,{name:"link",control:g,rules:{validate:V},render:({field:b})=>v.jsx(Co,{fullWidth:!0,margin:"dense",children:v.jsx(la,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:f.linkDisabled,isOptionEqualToValue:O=>O.label,options:F,renderInput:O=>{var j,H;return v.jsx(ot,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!((j=x==null?void 0:x.link)!=null&&j.message),helperText:((H=x==null?void 0:x.link)==null?void 0:H.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:L?v.jsx(bn,{position:"start",sx:{textDecoration:Wa(m||"")?"line-through":""},children:L}):null}})},renderOption:(O,j)=>v.jsxs(Z,{component:"li",...O,children:[j.label,v.jsx(Re,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:j.title})]}),margin:"dense",...b,onChange:()=>{},onInputChange:(O,j)=>{b.onChange(j)}})})}),["dashboard","sessionManager"].includes(o)&&v.jsx(Fe,{name:"role",control:g,render:({field:b})=>{var O,j;return v.jsx(Rn,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:l.map(H=>({title:H.title,value:H.name})),error:!!((O=x==null?void 0:x.role)!=null&&O.message),helperText:((j=x==null?void 0:x.role)==null?void 0:j.message)||" ",...It(b,"ref")})}}),o==="bottomNavigation"&&v.jsx(Fe,{name:"title",control:g,rules:{validate:Y},render:({field:b})=>{var O,j;return v.jsx(ot,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:f.isEdit,error:!!((O=x==null?void 0:x.title)!=null&&O.message),helperText:((j=x==null?void 0:x.title)==null?void 0:j.message)||" ",...b})}})]})]})});cn.propTypes={section:I.string,components:I.array,rawNavigations:I.array,onChange:I.func};cn.defaultProps={section:"",components:[],rawNavigations:[],onChange:()=>{}};const dn=T.forwardRef(function({section:o,components:r,rawNavigations:e},n){const{t:i}=De(),[a,{setTrue:l,setFalse:s}]=Hi(!1),[d,c]=T.useState("add"),u=T.useRef(null),h=T.useMemo(()=>{const w={add:i("common.create"),edit:i("common.edit")}[d];return w?`${w} ${i("navigation.navigation")}`:"--"},[i,d]),f=T.useCallback(()=>{var C;s(),(C=u.current)==null||C.reset()},[s]),p=T.useCallback((C={},w=()=>{})=>{var y;c("add"),(y=u.current)==null||y.add(C,x=>w(f,x)),l()},[l,f]),g=T.useCallback((C={},w=()=>{})=>{var y;c("edit"),(y=u.current)==null||y.edit(C,x=>w(f,x)),l()},[l,f]);return T.useImperativeHandle(n,()=>({add:p,edit:g,close:f}),[p,g,f]),v.jsx(Fi,{open:a,title:h,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(Gi,{color:"primary",variant:"contained",onClick:()=>{var C;return(C=u.current)==null?void 0:C.submit()},children:i("common.confirm")}),children:v.jsx(cn,{ref:u,section:o,components:r,rawNavigations:e})})});dn.propTypes={section:I.string,components:I.array,rawNavigations:I.array};dn.defaultProps={section:"",components:[],rawNavigations:[]};function Zn({className:t,add:o,edit:r,toggle:e,del:n,data:i,section:a}){const{t:l}=De(),s=["yaml","team-tmpl"].includes(i.from),d=T.isValidElement(i.subtitle);function c(g){g.preventDefault(),g.stopPropagation()}const u=T.useCallback(g=>{c(g),o(i)},[o,i]),h=T.useCallback(g=>{c(g),r(i)},[r,i]),f=T.useCallback(g=>{c(g),e(i)},[e,i]),p=T.useCallback(g=>{c(g),n(i)},[n,i]);return v.jsxs("div",{className:t,children:[!i.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(d?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Te,{size:"small",color:"success",onClick:u,disabled:d,children:v.jsx(he,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(d?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Te,{size:"small",color:"primary",onClick:h,disabled:d||i.from==="team-tmpl",children:v.jsx(he,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:d?l("navigation.action.noEdit"):i.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Te,{size:"small",color:"warning",onClick:f,disabled:d,children:i.visible===!1?v.jsx(he,{icon:"mdi:eye-off-outline"}):v.jsx(he,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!d?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Te,{disabled:s&&!d,size:"small",color:"error",onClick:p,children:v.jsx(he,{icon:"mdi:delete"})})})]})}Zn.propTypes={data:I.object.isRequired,className:I.string,add:I.func,edit:I.func,toggle:I.func,del:I.func,section:I.string};Zn.defaultProps={className:"",add:()=>{},edit:()=>{},toggle:()=>{},del:()=>{},section:""};function bi(t,o){return t?o===t.nodeName?!0:bi(t.parentNode,o):!1}function td({...t}){const o=r=>{bi(r.target,"A")&&r.preventDefault()};return v.jsx("div",{onClick:o,...t})}function er({className:t,navigation:o}){var s,d,c,u;const{blocklet:r}=et(),{logoUrl:e}=Ua({blocklet:r}),n=(d=(s=r==null?void 0:r.environments)==null?void 0:s.find(h=>h.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER))==null?void 0:d.value,i=(u=(c=r==null?void 0:r.environments)==null?void 0:c.find(h=>h.key===Qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR))==null?void 0:u.value,a=n||i?{owner:n,year:i}:void 0,l={appId:r.appDid,appLogo:e,appName:r.meta.title,enableConnect:!0,enableLocale:!1,navigation:o,copyright:a};return v.jsx(td,{children:v.jsxs(Z,{className:t,children:[v.jsx(za,{meta:l,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),v.jsx(Z,{children:v.jsx(Pa,{meta:l,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},showDomainWarningDialog:!1,children:v.jsx(ir,{container:!0,spacing:2,children:new Array(6).fill().map((h,f)=>v.jsxs(ir,{item:!0,xs:4,children:[v.jsx(hn,{animation:!1,variant:"rectangular",width:"100%",height:120}),v.jsxs(Z,{sx:{pt:.5},children:[v.jsx(hn,{animation:!1}),v.jsx(hn,{width:"60%",animation:!1})]})]},f))})})}),v.jsx(Da,{meta:l,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})}er.propTypes={className:I.string,navigation:I.array};er.defaultProps={className:"",navigation:[]};const nd=sa(er)`
|
|
20
20
|
.dashboard {
|
|
21
21
|
height: auto !important;
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./vendor-react-DEoibe3W.js";import{j as w,b2 as x}from"./vendor-mui-core-
|
|
1
|
+
import{r as e}from"./vendor-react-DEoibe3W.js";import{j as w,b2 as x}from"./vendor-mui-core-CQ38ohp2.js";import{z as G,a6 as B}from"./vendor-utils-BNHJB5U7.js";import{c as P}from"./vendor-arcblock-ScFEr-lj.js";import{i as k}from"./vendor-hooks-DftG_2gV.js";import{Y as L}from"./vendor-ux-did-connect-BdkhddhO.js";import{C as u,z as T}from"./index-DO3_1y-L.js";import{g as h,a as A,b as N}from"./spaces-WkJCApHO.js";function _(){const[r,c]=e.useState(null),{blocklet:a}=u();return e.useEffect(()=>{c(h(a))},[a]),{storageEndpoint:r}}const l=e.createContext({}),{Provider:b,Consumer:Y}=l;function f({children:r}){const[c,a]=e.useState(!1),[o,n]=e.useState(null),{blocklet:d,actions:{refreshBlocklet:i}}=u(),{storageEndpoint:s}=_(),{api:m}=T();k(async()=>{try{if(a(!0),G(s)){n(null);return}const t=await A(s);n(t)}catch(t){console.error(t),L.error(t.message)}finally{a(!1)}},[s]);const y=()=>{n(null),i()},E=async t=>{n(t),await p(t.endpoint),i()},p=async t=>{await m.configBlocklet({input:{did:[d.meta.did],configs:[{key:P.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:t}]}}),i()};e.useEffect(()=>{async function t(){if(!o)return;const S=await N(o.endpoint,o.name),C=B(o,{name:S});n(C)}t()},[]);const g=!!(s&&o);return w.jsx(b,{value:{loading:c,spaceGateway:o,deleteSpaceGateway:y,updateSpaceGateway:E,storageEndpoint:s,settingStorageEndpoint:p,hasStorageEndpoint:g},children:r})}f.propTypes={children:x.node.isRequired};f.defaultProps={};function q(){return e.useContext(l)}export{f as C,q as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r}from"./vendor-react-DEoibe3W.js";import{bJ as _,v as x,e as F,j as e,ai as H,t as J,bx as N,aj as O,z as Q,aa as $,H as o,ag as G,D as I}from"./vendor-mui-core-
|
|
1
|
+
import{r}from"./vendor-react-DEoibe3W.js";import{bJ as _,v as x,e as F,j as e,ai as H,t as J,bx as N,aj as O,z as Q,aa as $,H as o,ag as G,D as I}from"./vendor-mui-core-CQ38ohp2.js";import{u as K,B as y}from"./vendor-ux-did-connect-BdkhddhO.js";import"./index-DO3_1y-L.js";import{f as U}from"./format-error-BrmqJs5a.js";function V(){const s=_();return{minWidth:x(s.breakpoints.down("md"))?300:s.breakpoints.values.sm}}function C({title:s,description:a,showCancel:c,showConfirm:b,cancel:j,confirm:w,color:k,params:D,onCancel:S,onConfirm:P,loading:l,displayError:T,children:E,...v}){const[t,B]=r.useState(D),[R,d]=r.useState(!0),[m,p]=r.useState(!1),[u,f]=r.useState(""),{t:W}=K(),q=F(),h=async n=>{if(typeof n=="function"){p(!0);try{if(await n(t)===!1)return;d(!1)}catch(i){f(U(i)),console.error(i)}finally{p(!1)}}else d(!1)},M=typeof s=="function"?s():s,z=typeof a=="function"?a(t,B,f):a,A=x(q.breakpoints.down("md")),L=n=>{n.stopPropagation()},{minWidth:g}=V();return e.jsxs(X,{onClick:L,fullScreen:A,open:R,style:{minWidth:g},...v,children:[e.jsx(H,{children:M}),e.jsxs(J,{style:{minWidth:g},children:[e.jsx(N,{component:"div",children:z}),!!u&&T&&e.jsx(O,{severity:"error",style:{width:"100%",marginTop:8},children:u}),E]}),e.jsxs(Q,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[c&&e.jsx(y,{onClick:n=>{n.stopPropagation(),h(S)},color:"inherit","data-cy":"cancel-confirm-dialog",children:j||W("common.cancel")}),b&&e.jsxs(y,{onClick:n=>{n.stopPropagation(),h(P)},color:k,disabled:t.__disableConfirm||m||l,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(m||l)&&e.jsx($,{size:16,sx:{mr:1}}),w]})]})]})}C.propTypes={title:o.any.isRequired,description:o.any.isRequired,showCancel:o.bool,showConfirm:o.bool,cancel:o.string,color:o.string,confirm:o.string,params:o.object,onCancel:o.func,onConfirm:o.func.isRequired,loading:o.bool,displayError:o.bool,children:o.any};C.defaultProps={children:void 0,onCancel:()=>{},showCancel:!0,showConfirm:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1,displayError:!0};const X=G(I)`
|
|
2
2
|
.delete-actions .Mui-disabled {
|
|
3
3
|
color: rgba(0, 0, 0, 0.26) !important;
|
|
4
4
|
box-shadow: none;
|