@abtnode/webapp 1.16.30-beta-5d9c2c41 → 1.16.30-beta-cd65989e
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-240wNjwq.js → Add-DcfqNj9w.js} +1 -1
- package/dist/assets/{ArrowDropDown-C_UcQOEh.js → ArrowDropDown-DYMMZRTO.js} +1 -1
- package/dist/assets/{Autocomplete-BcT7Oksd.js → Autocomplete-B3WY_LBb.js} +1 -1
- package/dist/assets/{Breadcrumbs-6lYKQe5b.js → Breadcrumbs-C3Ukk_Va.js} +1 -1
- package/dist/assets/{ButtonGroup-D2VNVq8p.js → ButtonGroup-Dyh7V3R_.js} +1 -1
- package/dist/assets/{CheckCircle-C3oHDZBR.js → CheckCircle-DFyRfRNK.js} +1 -1
- package/dist/assets/{ChevronLeft-CsFylH21.js → ChevronLeft-BP608n3q.js} +1 -1
- package/dist/assets/{ChevronRight-DB27L3xw.js → ChevronRight-DXthvSJU.js} +1 -1
- package/dist/assets/{Close-B0TqWuc9.js → Close-DRCHgHGm.js} +1 -1
- package/dist/assets/{Delete-DmepPquU.js → Delete-Db11NFpL.js} +1 -1
- package/dist/assets/DeleteOutline-CZIY0Jkx.js +1 -0
- package/dist/assets/DeleteOutline-FodRCvrE.js +1 -0
- package/dist/assets/{Done-DcWcwr60.js → Done-8K83c718.js} +1 -1
- package/dist/assets/{Edit-D1BvuH2M.js → Edit-D7NzY4U7.js} +1 -1
- package/dist/assets/{EditIcon-CDlQ1Y8-.js → EditIcon-C7JFIq8b.js} +1 -1
- package/dist/assets/{ExpandMore-CK0-Eu1n.js → ExpandMore-DQZgaGQn.js} +1 -1
- package/dist/assets/{FilterList-Bw1ZqePf.js → FilterList-FpqscjJw.js} +1 -1
- package/dist/assets/{Google-DmQIUmmK.js → Google-kRiNbyHh.js} +1 -1
- package/dist/assets/{Https-CdebkXl3.js → Https-s4r-e05W.js} +1 -1
- package/dist/assets/{InputAdornment-BRIOp0gH.js → InputAdornment-B5quKKO5.js} +1 -1
- package/dist/assets/{InputLabel-C31crC9j.js → InputLabel-Dh6H4BIb.js} +1 -1
- package/dist/assets/{LastPage-15pWD2wJ.js → LastPage-DT2e5BXx.js} +1 -1
- package/dist/assets/{Launch-CMM_hnCO.js → Launch-cwgW1pSn.js} +1 -1
- package/dist/assets/{Link-C4-IDwJx.js → Link-DEgDwuSo.js} +1 -1
- package/dist/assets/{LoadingButton-hwdCNe1X.js → LoadingButton-DDckTsBs.js} +1 -1
- package/dist/assets/{LockIcon-DGv96agC.js → LockIcon-DuSbMAm7.js} +1 -1
- package/dist/assets/{Loop-B2Vl1OiI.js → Loop-ZSIw_P5f.js} +1 -1
- package/dist/assets/{MoreHoriz-q-g-RPDL.js → MoreHoriz-DAjkNEHz.js} +1 -1
- package/dist/assets/{MoreVert-s3M1upT5.js → MoreVert-BWsZ-BJo.js} +1 -1
- package/dist/assets/{Pagination-B5dMIe8j.js → Pagination-BJP77u5l.js} +1 -1
- package/dist/assets/{Public-CF6xMrln.js → Public-DDWrr2XN.js} +1 -1
- package/dist/assets/{SchemaReference.es-BLQMCHdi.js → SchemaReference.es-k9Z767eT.js} +1 -1
- package/dist/assets/{Search-B0peOjeQ.js → Search-SYh-6ZOz.js} +1 -1
- package/dist/assets/{Select-C--LsVoO.js → Select-BLXgoX9k.js} +1 -1
- package/dist/assets/{Skeleton-CaItownp.js → Skeleton-Dyu5Ax0I.js} +1 -1
- package/dist/assets/{Slider-BA1jwO1h.js → Slider-B0276czb.js} +1 -1
- package/dist/assets/{Stepper-BQ3ikYJX.js → Stepper-CZPI8cC9.js} +1 -1
- package/dist/assets/{TextField-D1TVUQl2.js → TextField-DwK_GXoo.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CbsnXtMY.js → ToggleButtonGroup-DYNoxLKb.js} +1 -1
- package/dist/assets/{ViewList-C8_Q1ZaL.js → ViewList-BuaOPxVQ.js} +1 -1
- package/dist/assets/{actions-DkIxbagz.js → actions-CCXhc7Af.js} +1 -1
- package/dist/assets/actions-CWKaEmCe.js +11 -0
- package/dist/assets/{agreement-DxK9sfKx.js → agreement-zGj-Qfxf.js} +1 -1
- package/dist/assets/api-CG6YJvRD.js +1 -0
- package/dist/assets/{app-avatar-C7ZZG5lQ.js → app-avatar-CHPdyNGu.js} +1 -1
- package/dist/assets/{audit-logs-CrN9QYVu.js → audit-logs-D956eiA3.js} +1 -1
- package/dist/assets/blocklet-DsP8dvbD.js +1 -0
- package/dist/assets/{brace-fold.es-Byk4OhlU.js → brace-fold.es-Ceo3WJ-_.js} +1 -1
- package/dist/assets/{bundle-avatar-BDTyLzjh.js → bundle-avatar-BmpkX0gn.js} +1 -1
- package/dist/assets/{chart-BXerkWdt.js → chart-C1MBEatU.js} +1 -1
- package/dist/assets/{click-to-copy-CK-Mkhd0.js → click-to-copy-BE3dtZl9.js} +1 -1
- package/dist/assets/{closebrackets.es-CTZfsjeS.js → closebrackets.es-DRptbCUu.js} +1 -1
- package/dist/assets/{codemirror.es-CosWD2iy.js → codemirror.es-ZszZWF0R.js} +1 -1
- package/dist/assets/{comment.es-DxS_C5_M.js → comment.es-cnLgD8Uc.js} +1 -1
- package/dist/assets/{config-navigation-D8N_TmOY.js → config-navigation-BOrH5Hvb.js} +1 -1
- package/dist/assets/{delete-confirm-BKnCoOpO.js → delete-confirm-DpRBeIKH.js} +1 -1
- package/dist/assets/{detail-BmlatkjD.js → detail-vJPrtqvp.js} +3 -3
- package/dist/assets/{dialog.es-Bg0EeV0q.js → dialog.es-CfQUxsPX.js} +1 -1
- package/dist/assets/{download-C0fC4yYB.js → download-cFw_E2Hj.js} +1 -1
- package/dist/assets/{foldgutter.es-pqkwUOpu.js → foldgutter.es-CgkrTV35.js} +1 -1
- package/dist/assets/getValidReactChildren-BAhSJfgG.js +1 -0
- package/dist/assets/{hint.es-EAu4kf7y.js → hint.es-eNWKZSbN.js} +1 -1
- package/dist/assets/{hint.es2-BFhwDvJp.js → hint.es2-BhkzwSZo.js} +1 -1
- package/dist/assets/{iframe-DCJ7N4jM.js → iframe-BIwxy4ip.js} +1 -1
- package/dist/assets/{index-BH1hVJpW.js → index-77OEIYM-.js} +1 -1
- package/dist/assets/{index-CheSXyoA.js → index-AgJrAiSK.js} +3 -3
- package/dist/assets/{index-M9-_GBvS.js → index-B07CNOuw.js} +1 -1
- package/dist/assets/{index-CIV9Tvzf.js → index-BBKwIw61.js} +1 -1
- package/dist/assets/{index-c1dR1RcA.js → index-BHeHy1vA.js} +1 -1
- package/dist/assets/{index-B4PWSsiR.js → index-BL7aEYjP.js} +1 -1
- package/dist/assets/index-BReI-Zee.js +68 -0
- package/dist/assets/{index-BvnS-7-1.js → index-BSMELOgI.js} +1 -1
- package/dist/assets/{index-C8xCbxUE.js → index-Bd4i9E1O.js} +1 -1
- package/dist/assets/{index-Ch9-jINY.js → index-BkdBfB4w.js} +1 -1
- package/dist/assets/{index-Cu-S2eZJ.js → index-Bq5tRfCd.js} +1 -1
- package/dist/assets/{index-CDre3mnK.js → index-BtBRSL1d.js} +3 -3
- package/dist/assets/{index-de76ek1K.js → index-C42qq7Ec.js} +1 -1
- package/dist/assets/{index-CuOQXV32.js → index-C74bQC6L.js} +1 -1
- package/dist/assets/{index-D8KWuR1-.js → index-CInfPT7W.js} +1 -1
- package/dist/assets/{index-BI-i5kKF.js → index-CRniQIuD.js} +1 -1
- package/dist/assets/{index-BJXHdeeV.js → index-Cd1cCAJE.js} +1 -1
- package/dist/assets/{index-C1PiAS_Y.js → index-CrQS5iun.js} +1 -1
- package/dist/assets/index-Cw-_inHl.js +80 -0
- package/dist/assets/{index-CRLxFVWY.js → index-Cwi3bFQC.js} +3 -3
- package/dist/assets/{index-CZrhCkal.js → index-D1PLfduk.js} +1 -1
- package/dist/assets/{index-CGjwUKrb.js → index-D3Cozcmh.js} +1 -1
- package/dist/assets/{index-DdIvdpgD.js → index-D4xfc6Js.js} +1 -1
- package/dist/assets/{index-DIrIbW6w.js → index-D9Y3tfXV.js} +1 -1
- package/dist/assets/{index-D9XZ1bG6.js → index-DBx2-m_Y.js} +1 -1
- package/dist/assets/{index-wRDZOUMs.js → index-DD1cWFOC.js} +1 -1
- package/dist/assets/{index-CmFVyjgY.js → index-DEPFtOhR.js} +1 -1
- package/dist/assets/{index-nsaxnXRB.js → index-DMFar3I1.js} +1 -1
- package/dist/assets/{index-DnZQlEKp.js → index-Dcdxfmgi.js} +1 -1
- package/dist/assets/{index-BPY6z3Rs.js → index-Dd6xY134.js} +3 -3
- package/dist/assets/{index-BeN4ZgCH.js → index-Dntt1eil.js} +1 -1
- package/dist/assets/{index-ClZOvGLQ.js → index-Dp2GTeOn.js} +1 -1
- package/dist/assets/{index-DqnDo97c.js → index-Dpoqj6Jo.js} +1 -1
- package/dist/assets/{index-CDRbsQoL.js → index-Dqs8xtQE.js} +1 -1
- package/dist/assets/{index-DxuvuH9i.js → index-Dw1w1qL3.js} +1 -1
- package/dist/assets/index-FIMmdaZK.js +21 -0
- package/dist/assets/{index-Cx3miQZ4.js → index-H_NjEuu9.js} +3 -2
- package/dist/assets/{index-BUnnmW1r.js → index-KJ30jnaf.js} +1 -1
- package/dist/assets/{index-DivETz-Z.js → index-NkzSJ_BT.js} +5 -5
- package/dist/assets/{index-6XBeHuD_.js → index-YpvJfazn.js} +1 -1
- package/dist/assets/{index-BMfXnuvp.js → index-ZSHqTs4i.js} +1 -1
- package/dist/assets/{index-7fpoPAbz.js → index-bivCnspX.js} +1 -1
- package/dist/assets/{index-qU6j-u6W.js → index-cvAtg-Od.js} +14 -14
- package/dist/assets/{index-B_FDrImE.js → index-wZRHPQoX.js} +1 -1
- package/dist/assets/{index.es-CZDnnfg-.js → index.es-tDltq_DZ.js} +1 -1
- package/dist/assets/{index.esm-Dkpk3RMi.js → index.esm-DhpdxP8T.js} +1 -1
- package/dist/assets/{info-addon.es-B1aKFVvv.js → info-addon.es-DMX0vTB2.js} +1 -1
- package/dist/assets/{info.es-DTXDBN9z.js → info.es-C_it_PXd.js} +1 -1
- package/dist/assets/{install-from-url-DjctVTOl.js → install-from-url-BCD5VkoR.js} +1 -1
- package/dist/assets/{invitation-DSdBJgkC.js → invitation-BumVTtN2.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-C6zlDhVp.js → is-path-prefix-equal-DubKYq2T.js} +1 -1
- package/dist/assets/{isEqual-0cnx2qOS.js → isEqual-BkbmgPj_.js} +1 -1
- package/dist/assets/{item-Dln-w3Iq.js → item-DrPKfKmr.js} +1 -1
- package/dist/assets/{javascript.es-DKea0oPd.js → javascript.es-DMQy9e7V.js} +1 -1
- package/dist/assets/{jump-to-line.es-DmWSMR-E.js → jump-to-line.es-CnkPzf5y.js} +1 -1
- package/dist/assets/{jump.es-CQGzFoAd.js → jump.es-C9HLQdHA.js} +1 -1
- package/dist/assets/{line-BIpTQfTJ.js → line-4lY_Qb2m.js} +3 -3
- package/dist/assets/{lint.es-BAY5Woc0.js → lint.es-C5Vl7JPf.js} +1 -1
- package/dist/assets/{lint.es2-C4O9zzDQ.js → lint.es2-Bm4ZHXqa.js} +1 -1
- package/dist/assets/{lint.es3-q80vs6e3.js → lint.es3-BB9pBVnq.js} +1 -1
- package/dist/assets/{list-header-DuWvRnX_.js → list-header-BCtVonO4.js} +1 -1
- package/dist/assets/{log-U-Oy1msj.js → log-wlfixqXj.js} +1 -1
- package/dist/assets/{lottie-D0zUdkp5.js → lottie-iTUSD55o.js} +1 -1
- package/dist/assets/{matchbrackets.es-B_OCWqIS.js → matchbrackets.es-Bl0t_qCA.js} +1 -1
- package/dist/assets/{memory-CESYopLm.js → memory-wEAomQNC.js} +1 -1
- package/dist/assets/{mode.es-DVfsqtAx.js → mode.es-rKbkm8lU.js} +1 -1
- package/dist/assets/{mode.es2-gg_0Yels.js → mode.es2-ytsRZP0t.js} +1 -1
- package/dist/assets/{mode.es3-CWCOwidy.js → mode.es3-DfHDE8XK.js} +1 -1
- package/dist/assets/{onlineParser.es-CTZOlUJG.js → onlineParser.es-wDu05TUX.js} +1 -1
- package/dist/assets/{overview-D7OPOkGE.js → overview-1N_1lpT0.js} +1 -1
- package/dist/assets/{react-Blm3BSvE.js → react-B4m6RLMM.js} +3 -3
- package/dist/assets/{redux-CaV6uiOr.js → redux-CxE33JOf.js} +1 -1
- package/dist/assets/{resource-dialog-Cbfivwvi.js → resource-dialog-C-7qKAQl.js} +1 -1
- package/dist/assets/{runtime-BE0JWW3n.js → runtime-5KBAFD-g.js} +1 -1
- package/dist/assets/{schema-BKkMgYH9.js → schema-B4kKlOTb.js} +1 -1
- package/dist/assets/sdk-CV4QPi_Q.js +1 -0
- package/dist/assets/{search.es-CGDd2k_t.js → search.es-CQuNoVSc.js} +1 -1
- package/dist/assets/{searchcursor.es-xO-dGzm1.js → searchcursor.es-Bbgmgmrg.js} +1 -1
- package/dist/assets/service-Bwn6NSxE.js +1 -0
- package/dist/assets/{shorten-label-CZVhjulh.js → shorten-label-C_WwZ4ZV.js} +1 -1
- package/dist/assets/{show-hint.es-opE1QlXT.js → show-hint.es-tSocwxSB.js} +1 -1
- package/dist/assets/{slicedToArray-C3_toPJB.js → slicedToArray-CmalbWCs.js} +1 -1
- package/dist/assets/{spaces-Swq2BNwF.js → spaces-1KfYd8Qs.js} +1 -1
- package/dist/assets/{status-dc380TH5.js → status-V0qJ0HIh.js} +1 -1
- package/dist/assets/{sublime.es-Bw3Iznmf.js → sublime.es-CLH5NL12.js} +1 -1
- package/dist/assets/{switch-control-CcMPAAj7.js → switch-control-CdkyWsoc.js} +1 -1
- package/dist/assets/{table-icons-TmY--eR2.js → table-icons-Baq11dUV.js} +2 -2
- package/dist/assets/{team-CBZV1UuS.js → team-Cup7T2o5.js} +1 -1
- package/dist/assets/{toUpper-Bjz0AMGp.js → toUpper-Dy6OxPnp.js} +1 -1
- package/dist/assets/{traffic-wydTjZWz.js → traffic-BL6WX1d5.js} +1 -1
- package/dist/assets/{url-evaluation-Oli2ZbAu.js → url-evaluation-DDt3hytj.js} +1 -1
- package/dist/assets/{url-join-BPHLmPis.js → url-join-H8M29juk.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DRjxN2RW.js → use-blocklet-info-for-connect-did-spaces-Z2TSdCJw.js} +1 -1
- package/dist/assets/{useLocalStorage-DABDAbRI.js → useLocalStorage-6mPZ-rWo.js} +1 -1
- package/dist/assets/{useThemeProps-Cqic-E0U.js → useThemeProps-rDwpoqme.js} +1 -1
- package/dist/assets/{util-DMkhCe5T.js → util-DThpIciT.js} +1 -1
- package/dist/assets/{wait-container-7MRBml26.js → wait-container-DHDQHqIH.js} +1 -1
- package/dist/assets/{withStyles-mttjYCTj.js → withStyles-CXCpzdMR.js} +1 -1
- package/dist/assets/{wrap-locale-Dy0OLcMz.js → wrap-locale-Kr9QT-Cb.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-o5TFeql0.js +0 -1
- package/dist/assets/actions-Drufb-pQ.js +0 -11
- package/dist/assets/api-DOcnwqon.js +0 -1
- package/dist/assets/blocklet-DX4HGT6b.js +0 -1
- package/dist/assets/getValidReactChildren-Bwdvi5zb.js +0 -1
- package/dist/assets/index-B8Hu4oNh.js +0 -80
- package/dist/assets/index-CGyIRwUl.js +0 -21
- package/dist/assets/index-HwE3ySwC.js +0 -68
- package/dist/assets/sdk-DM3m0pIz.js +0 -1
- package/dist/assets/service-CqEmzSuD.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
var Gm=Object.defineProperty;var Km=(i,e,t)=>e in i?Gm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var He=(i,e,t)=>Km(i,typeof e!="symbol"?e+"":e,t);import{bJ as Xm,j as ot,hJ as Ym,dm as Qm,fb as Jm,g as Vt,hK as Zm,hL as Gp,hM as Kp,hN as Xp,hO as Yp,cL as Qp,eU as lo,dw as oi,hP as ir,P as U,r as de,cN as vc,c1 as bc,av as ef,fH as tf,bn as Jp,aO as af,J as nf,hQ as yc,dH as sf,Q as Zp,a2 as of,hb as xc,hR as rf,fg as lf,dk as cf}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Dd6xY134.js","./index-Cwi3bFQC.js","./index-BEj64JY8.css","./TextField-DwK_GXoo.js","./Select-BLXgoX9k.js","./InputLabel-Dh6H4BIb.js","./status-V0qJ0HIh.js","./Delete-Db11NFpL.js","./url-evaluation-DDt3hytj.js","./Slider-B0276czb.js","./Skeleton-Dyu5Ax0I.js","./Close-DRCHgHGm.js","./index-C42qq7Ec.js","./preact.module-DJUF--8d.js","./index-BBKwIw61.js","./index-D4xfc6Js.js","./memoize-one.esm-BdPwpGay.js","./index-B07CNOuw.js","./ExpandMore-DQZgaGQn.js","./resource-dialog-C-7qKAQl.js","./index-Cd1cCAJE.js","./index-KJ30jnaf.js","./index-BHeHy1vA.js","./index-D3Cozcmh.js","./index-ZSHqTs4i.js","./index-Dqs8xtQE.js","./FilterList-FpqscjJw.js","./useThemeProps-rDwpoqme.js","./LastPage-DT2e5BXx.js","./index-77OEIYM-.js","./redux-CxE33JOf.js","./Search-SYh-6ZOz.js","./MoreVert-BWsZ-BJo.js","./index-CrQS5iun.js","./url-join-H8M29juk.js","./toUpper-Dy6OxPnp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Gm=Object.defineProperty;var Km=(i,e,t)=>e in i?Gm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var He=(i,e,t)=>Km(i,typeof e!="symbol"?e+"":e,t);import{bJ as Xm,j as ot,hJ as Ym,dm as Qm,fb as Jm,g as Vt,hK as Zm,hL as Gp,hM as Kp,hN as Xp,hO as Yp,cL as Qp,eU as lo,dw as oi,hP as ir,P as U,r as de,cN as vc,c1 as bc,av as ef,fH as tf,bn as Jp,aO as af,J as nf,hQ as yc,dH as sf,Q as Zp,a2 as of,hb as xc,hR as rf,fg as lf,dk as cf}from"./index-Cwi3bFQC.js";import{u as uf}from"./index-C42qq7Ec.js";import{B as wc,_ as d,b as Gt,l as pf,k as si,H as Xt,m as df,E as ed}from"./preact.module-DJUF--8d.js";import{a as hf}from"./index-BBKwIw61.js";import{c as Pe}from"./index-D4xfc6Js.js";import{m as _c}from"./memoize-one.esm-BdPwpGay.js";import"./index-B07CNOuw.js";import{W as mf}from"./resource-dialog-C-7qKAQl.js";import"./index-KJ30jnaf.js";import"./index-BHeHy1vA.js";import"./index-D3Cozcmh.js";import"./index-ZSHqTs4i.js";import"./index-Dqs8xtQE.js";import{p as ff}from"./index-CrQS5iun.js";import{j as tl}from"./url-join-H8M29juk.js";import{u as td,t as gf}from"./toUpper-Dy6OxPnp.js";const vf=Xm(ot.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");function bf(i,e,t,a){for(var n=-1,s=i==null?0:i.length;++n<s;){var o=i[n];e(a,o,t(o),i)}return a}var yf=bf,xf=Ym;function wf(i,e,t,a){return xf(i,function(n,s,o){e(a,n,t(n),o)}),a}var _f=wf,Pf=yf,Sf=_f,Ff=Qm,Cf=Jm;function Tf(i,e){return function(t,a){var n=Cf(t)?Pf:Sf,s=e?e():{};return n(t,i,Ff(a),s)}}var Ef=Tf,kf=Zm,Af=Ef,Df=Af(function(i,e,t){kf(i,t,e)}),Of=Df;const id=Vt(Of);function jn(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var If=0;function ad(i){return"__private_"+If+++"_"+i}function Rf(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
5
5
|
*
|
|
@@ -53,5 +53,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
53
53
|
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
|
|
54
54
|
</div>
|
|
55
55
|
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));He(this,"convertImgToObject",ir(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(c=>c.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=s_(s.originalname),[".mp4",".webm"].find(c=>{var p;return(p=a.src)==null?void 0:p.endsWith(c)})){const c=document.createElement("video");c.src=a.src,c.width=a.width,c.height=a.height,c.autoplay=!0,c.setAttribute("playsinline","playsinline"),c.muted=!0,c.loop=!0,c.style="pointer-events: none;",o.appendChild(c)}else{const c=document.createElement("object");c.data=n,c.type=s.mimetype||"image/png",c.alt=s.originalname,c.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",c.loading="lazy",o.appendChild(c)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));He(this,"resetState",()=>{this.uploadedAPIData={...Dp},this.uploaded.setPluginState({...Op}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...Dp},this.addUploadItemFlag=!0,this.icon=()=>_e("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[_e("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),_e("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),_e("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),_e("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),_e("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new ql(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Op}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Ip={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},Rp={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},Om={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},Q_={...Om,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class J_ extends Ee{constructor(t,a){super(t,a);He(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await la.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=td([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=Ms(s);return n=Ms(s,400),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});He(this,"resetState",()=>{this.apiData={...Ip},this.resources.setPluginState({...Rp})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...Ip},this.icon=()=>_e("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[_e("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),_e("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),_e("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),_e("div",{id:"resources",className:"uploaded",children:[_e("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>_e("button",{style:this.apiData.componentDid===a.did?Q_:Om,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:gf(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new ql(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Rp}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("uploaded:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var Z_=tf();const e3=Vt(Z_);/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:Im,setPrototypeOf:Up,isFrozen:t3,getPrototypeOf:i3,getOwnPropertyDescriptor:a3}=Object;let{freeze:je,seal:lt,create:Rm}=Object,{apply:Qr,construct:Jr}=typeof Reflect<"u"&&Reflect;je||(je=function(e){return e});lt||(lt=function(e){return e});Qr||(Qr=function(e,t,a){return e.apply(t,a)});Jr||(Jr=function(e,t){return new e(...t)});const ns=nt(Array.prototype.forEach),Np=nt(Array.prototype.pop),La=nt(Array.prototype.push),Cs=nt(String.prototype.toLowerCase),Qo=nt(String.prototype.toString),Mp=nt(String.prototype.match),Ba=nt(String.prototype.replace),n3=nt(String.prototype.indexOf),s3=nt(String.prototype.trim),ft=nt(Object.prototype.hasOwnProperty),Le=nt(RegExp.prototype.test),za=o3(TypeError);function nt(i){return function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return Qr(i,e,a)}}function o3(i){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return Jr(i,t)}}function Y(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cs;Up&&Up(i,null);let a=e.length;for(;a--;){let n=e[a];if(typeof n=="string"){const s=t(n);s!==n&&(t3(e)||(e[a]=s),n=s)}i[n]=!0}return i}function r3(i){for(let e=0;e<i.length;e++)ft(i,e)||(i[e]=null);return i}function xi(i){const e=Rm(null);for(const[t,a]of Im(i))ft(i,t)&&(Array.isArray(a)?e[t]=r3(a):a&&typeof a=="object"&&a.constructor===Object?e[t]=xi(a):e[t]=a);return e}function ja(i,e){for(;i!==null;){const a=a3(i,e);if(a){if(a.get)return nt(a.get);if(typeof a.value=="function")return nt(a.value)}i=i3(i)}function t(){return null}return t}const Lp=je(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Jo=je(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zo=je(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),l3=je(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),er=je(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),c3=je(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Bp=je(["#text"]),zp=je(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),tr=je(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jp=je(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ss=je(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),u3=lt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),p3=lt(/<%[\w\W]*|[\w\W]*%>/gm),d3=lt(/\${[\w\W]*}/gm),h3=lt(/^data-[\-\w.\u00B7-\uFFFF]/),m3=lt(/^aria-[\-\w]+$/),Um=lt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f3=lt(/^(?:\w+script|data):/i),g3=lt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Nm=lt(/^html$/i),v3=lt(/^[a-z][.\w]*(-[.\w]+)+$/i);var $p=Object.freeze({__proto__:null,MUSTACHE_EXPR:u3,ERB_EXPR:p3,TMPLIT_EXPR:d3,DATA_ATTR:h3,ARIA_ATTR:m3,IS_ALLOWED_URI:Um,IS_SCRIPT_OR_DATA:f3,ATTR_WHITESPACE:g3,DOCTYPE_NAME:Nm,CUSTOM_ELEMENT:v3});const $a={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},b3=function(){return typeof window>"u"?null:window},y3=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(a=t.getAttribute(n));const s="dompurify"+(a?"#"+a:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Mm(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b3();const e=j=>Mm(j);if(e.version="3.1.6",e.removed=[],!i||!i.document||i.document.nodeType!==$a.document)return e.isSupported=!1,e;let{document:t}=i;const a=t,n=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:r,Element:l,NodeFilter:c,NamedNodeMap:p=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:m}=i,f=l.prototype,_=ja(f,"cloneNode"),x=ja(f,"remove"),g=ja(f,"nextSibling"),F=ja(f,"childNodes"),T=ja(f,"parentNode");if(typeof o=="function"){const j=t.createElement("template");j.content&&j.content.ownerDocument&&(t=j.content.ownerDocument)}let A,R="";const{implementation:y,createNodeIterator:P,createDocumentFragment:k,getElementsByTagName:N}=t,{importNode:H}=a;let V={};e.isSupported=typeof Im=="function"&&typeof T=="function"&&y&&y.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ee,ERB_EXPR:X,TMPLIT_EXPR:q,DATA_ATTR:Z,ARIA_ATTR:S,IS_SCRIPT_OR_DATA:v,ATTR_WHITESPACE:w,CUSTOM_ELEMENT:E}=$p;let{IS_ALLOWED_URI:D}=$p,C=null;const W=Y({},[...Lp,...Jo,...Zo,...er,...Bp]);let $=null;const Q=Y({},[...zp,...tr,...jp,...ss]);let K=Object.seal(Rm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,se=null,Gl=!0,Zs=!0,Kl=!1,Xl=!0,Ui=!1,eo=!0,ri=!1,to=!1,io=!1,Ni=!1,Nn=!1,Mn=!1,Yl=!0,Ql=!1;const Bm="user-content-";let ao=!0,ca=!1,Mi={},Li=null;const Jl=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zl=null;const ec=Y({},["audio","video","img","source","image","track"]);let no=null;const tc=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ln="http://www.w3.org/1998/Math/MathML",Bn="http://www.w3.org/2000/svg",At="http://www.w3.org/1999/xhtml";let Bi=At,so=!1,oo=null;const zm=Y({},[Ln,Bn,At],Qo);let ua=null;const jm=["application/xhtml+xml","text/html"],$m="text/html";let Se=null,zi=null;const Hm=t.createElement("form"),ic=function(b){return b instanceof RegExp||b instanceof Function},ro=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(zi&&zi===b)){if((!b||typeof b!="object")&&(b={}),b=xi(b),ua=jm.indexOf(b.PARSER_MEDIA_TYPE)===-1?$m:b.PARSER_MEDIA_TYPE,Se=ua==="application/xhtml+xml"?Qo:Cs,C=ft(b,"ALLOWED_TAGS")?Y({},b.ALLOWED_TAGS,Se):W,$=ft(b,"ALLOWED_ATTR")?Y({},b.ALLOWED_ATTR,Se):Q,oo=ft(b,"ALLOWED_NAMESPACES")?Y({},b.ALLOWED_NAMESPACES,Qo):zm,no=ft(b,"ADD_URI_SAFE_ATTR")?Y(xi(tc),b.ADD_URI_SAFE_ATTR,Se):tc,Zl=ft(b,"ADD_DATA_URI_TAGS")?Y(xi(ec),b.ADD_DATA_URI_TAGS,Se):ec,Li=ft(b,"FORBID_CONTENTS")?Y({},b.FORBID_CONTENTS,Se):Jl,ne=ft(b,"FORBID_TAGS")?Y({},b.FORBID_TAGS,Se):{},se=ft(b,"FORBID_ATTR")?Y({},b.FORBID_ATTR,Se):{},Mi=ft(b,"USE_PROFILES")?b.USE_PROFILES:!1,Gl=b.ALLOW_ARIA_ATTR!==!1,Zs=b.ALLOW_DATA_ATTR!==!1,Kl=b.ALLOW_UNKNOWN_PROTOCOLS||!1,Xl=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ui=b.SAFE_FOR_TEMPLATES||!1,eo=b.SAFE_FOR_XML!==!1,ri=b.WHOLE_DOCUMENT||!1,Ni=b.RETURN_DOM||!1,Nn=b.RETURN_DOM_FRAGMENT||!1,Mn=b.RETURN_TRUSTED_TYPE||!1,io=b.FORCE_BODY||!1,Yl=b.SANITIZE_DOM!==!1,Ql=b.SANITIZE_NAMED_PROPS||!1,ao=b.KEEP_CONTENT!==!1,ca=b.IN_PLACE||!1,D=b.ALLOWED_URI_REGEXP||Um,Bi=b.NAMESPACE||At,K=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&ic(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&ic(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ui&&(Zs=!1),Nn&&(Ni=!0),Mi&&(C=Y({},Bp),$=[],Mi.html===!0&&(Y(C,Lp),Y($,zp)),Mi.svg===!0&&(Y(C,Jo),Y($,tr),Y($,ss)),Mi.svgFilters===!0&&(Y(C,Zo),Y($,tr),Y($,ss)),Mi.mathMl===!0&&(Y(C,er),Y($,jp),Y($,ss))),b.ADD_TAGS&&(C===W&&(C=xi(C)),Y(C,b.ADD_TAGS,Se)),b.ADD_ATTR&&($===Q&&($=xi($)),Y($,b.ADD_ATTR,Se)),b.ADD_URI_SAFE_ATTR&&Y(no,b.ADD_URI_SAFE_ATTR,Se),b.FORBID_CONTENTS&&(Li===Jl&&(Li=xi(Li)),Y(Li,b.FORBID_CONTENTS,Se)),ao&&(C["#text"]=!0),ri&&Y(C,["html","head","body"]),C.table&&(Y(C,["tbody"]),delete ne.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw za('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw za('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=b.TRUSTED_TYPES_POLICY,R=A.createHTML("")}else A===void 0&&(A=y3(m,n)),A!==null&&typeof R=="string"&&(R=A.createHTML(""));je&&je(b),zi=b}},ac=Y({},["mi","mo","mn","ms","mtext"]),nc=Y({},["foreignobject","annotation-xml"]),qm=Y({},["title","style","font","a","script"]),sc=Y({},[...Jo,...Zo,...l3]),oc=Y({},[...er,...c3]),Wm=function(b){let I=T(b);(!I||!I.tagName)&&(I={namespaceURI:Bi,tagName:"template"});const z=Cs(b.tagName),ae=Cs(I.tagName);return oo[b.namespaceURI]?b.namespaceURI===Bn?I.namespaceURI===At?z==="svg":I.namespaceURI===Ln?z==="svg"&&(ae==="annotation-xml"||ac[ae]):!!sc[z]:b.namespaceURI===Ln?I.namespaceURI===At?z==="math":I.namespaceURI===Bn?z==="math"&&nc[ae]:!!oc[z]:b.namespaceURI===At?I.namespaceURI===Bn&&!nc[ae]||I.namespaceURI===Ln&&!ac[ae]?!1:!oc[z]&&(qm[z]||!sc[z]):!!(ua==="application/xhtml+xml"&&oo[b.namespaceURI]):!1},wt=function(b){La(e.removed,{element:b});try{T(b).removeChild(b)}catch{x(b)}},zn=function(b,I){try{La(e.removed,{attribute:I.getAttributeNode(b),from:I})}catch{La(e.removed,{attribute:null,from:I})}if(I.removeAttribute(b),b==="is"&&!$[b])if(Ni||Nn)try{wt(I)}catch{}else try{I.setAttribute(b,"")}catch{}},rc=function(b){let I=null,z=null;if(io)b="<remove></remove>"+b;else{const ke=Mp(b,/^[\r\n\t ]+/);z=ke&&ke[0]}ua==="application/xhtml+xml"&&Bi===At&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const ae=A?A.createHTML(b):b;if(Bi===At)try{I=new h().parseFromString(ae,ua)}catch{}if(!I||!I.documentElement){I=y.createDocument(Bi,"template",null);try{I.documentElement.innerHTML=so?R:ae}catch{}}const Ie=I.body||I.documentElement;return b&&z&&Ie.insertBefore(t.createTextNode(z),Ie.childNodes[0]||null),Bi===At?N.call(I,ri?"html":"body")[0]:ri?I.documentElement:Ie},lc=function(b){return P.call(b.ownerDocument||b,b,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},cc=function(b){return b instanceof u&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof p)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},uc=function(b){return typeof r=="function"&&b instanceof r},Dt=function(b,I,z){V[b]&&ns(V[b],ae=>{ae.call(e,I,z,zi)})},pc=function(b){let I=null;if(Dt("beforeSanitizeElements",b,null),cc(b))return wt(b),!0;const z=Se(b.nodeName);if(Dt("uponSanitizeElement",b,{tagName:z,allowedTags:C}),b.hasChildNodes()&&!uc(b.firstElementChild)&&Le(/<[/\w]/g,b.innerHTML)&&Le(/<[/\w]/g,b.textContent)||b.nodeType===$a.progressingInstruction||eo&&b.nodeType===$a.comment&&Le(/<[/\w]/g,b.data))return wt(b),!0;if(!C[z]||ne[z]){if(!ne[z]&&hc(z)&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(z)))return!1;if(ao&&!Li[z]){const ae=T(b)||b.parentNode,Ie=F(b)||b.childNodes;if(Ie&&ae){const ke=Ie.length;for(let $e=ke-1;$e>=0;--$e){const _t=_(Ie[$e],!0);_t.__removalCount=(b.__removalCount||0)+1,ae.insertBefore(_t,g(b))}}}return wt(b),!0}return b instanceof l&&!Wm(b)||(z==="noscript"||z==="noembed"||z==="noframes")&&Le(/<\/no(script|embed|frames)/i,b.innerHTML)?(wt(b),!0):(Ui&&b.nodeType===$a.text&&(I=b.textContent,ns([ee,X,q],ae=>{I=Ba(I,ae," ")}),b.textContent!==I&&(La(e.removed,{element:b.cloneNode()}),b.textContent=I)),Dt("afterSanitizeElements",b,null),!1)},dc=function(b,I,z){if(Yl&&(I==="id"||I==="name")&&(z in t||z in Hm))return!1;if(!(Zs&&!se[I]&&Le(Z,I))){if(!(Gl&&Le(S,I))){if(!$[I]||se[I]){if(!(hc(b)&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,b)||K.tagNameCheck instanceof Function&&K.tagNameCheck(b))&&(K.attributeNameCheck instanceof RegExp&&Le(K.attributeNameCheck,I)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(I))||I==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Le(K.tagNameCheck,z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(z))))return!1}else if(!no[I]){if(!Le(D,Ba(z,w,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&b!=="script"&&n3(z,"data:")===0&&Zl[b])){if(!(Kl&&!Le(v,Ba(z,w,"")))){if(z)return!1}}}}}}return!0},hc=function(b){return b!=="annotation-xml"&&Mp(b,E)},mc=function(b){Dt("beforeSanitizeAttributes",b,null);const{attributes:I}=b;if(!I)return;const z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};let ae=I.length;for(;ae--;){const Ie=I[ae],{name:ke,namespaceURI:$e,value:_t}=Ie,pa=Se(ke);let Ue=ke==="value"?_t:s3(_t);if(z.attrName=pa,z.attrValue=Ue,z.keepAttr=!0,z.forceKeepAttr=void 0,Dt("uponSanitizeAttribute",b,z),Ue=z.attrValue,eo&&Le(/((--!?|])>)|<\/(style|title)/i,Ue)){zn(ke,b);continue}if(z.forceKeepAttr||(zn(ke,b),!z.keepAttr))continue;if(!Xl&&Le(/\/>/i,Ue)){zn(ke,b);continue}Ui&&ns([ee,X,q],gc=>{Ue=Ba(Ue,gc," ")});const fc=Se(b.nodeName);if(dc(fc,pa,Ue)){if(Ql&&(pa==="id"||pa==="name")&&(zn(ke,b),Ue=Bm+Ue),A&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!$e)switch(m.getAttributeType(fc,pa)){case"TrustedHTML":{Ue=A.createHTML(Ue);break}case"TrustedScriptURL":{Ue=A.createScriptURL(Ue);break}}try{$e?b.setAttributeNS($e,ke,Ue):b.setAttribute(ke,Ue),cc(b)?wt(b):Np(e.removed)}catch{}}}Dt("afterSanitizeAttributes",b,null)},Vm=function j(b){let I=null;const z=lc(b);for(Dt("beforeSanitizeShadowDOM",b,null);I=z.nextNode();)Dt("uponSanitizeShadowNode",I,null),!pc(I)&&(I.content instanceof s&&j(I.content),mc(I));Dt("afterSanitizeShadowDOM",b,null)};return e.sanitize=function(j){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,z=null,ae=null,Ie=null;if(so=!j,so&&(j="<!-->"),typeof j!="string"&&!uc(j))if(typeof j.toString=="function"){if(j=j.toString(),typeof j!="string")throw za("dirty is not a string, aborting")}else throw za("toString is not a function");if(!e.isSupported)return j;if(to||ro(b),e.removed=[],typeof j=="string"&&(ca=!1),ca){if(j.nodeName){const _t=Se(j.nodeName);if(!C[_t]||ne[_t])throw za("root node is forbidden and cannot be sanitized in-place")}}else if(j instanceof r)I=rc("<!---->"),z=I.ownerDocument.importNode(j,!0),z.nodeType===$a.element&&z.nodeName==="BODY"||z.nodeName==="HTML"?I=z:I.appendChild(z);else{if(!Ni&&!Ui&&!ri&&j.indexOf("<")===-1)return A&&Mn?A.createHTML(j):j;if(I=rc(j),!I)return Ni?null:Mn?R:""}I&&io&&wt(I.firstChild);const ke=lc(ca?j:I);for(;ae=ke.nextNode();)pc(ae)||(ae.content instanceof s&&Vm(ae.content),mc(ae));if(ca)return j;if(Ni){if(Nn)for(Ie=k.call(I.ownerDocument);I.firstChild;)Ie.appendChild(I.firstChild);else Ie=I;return($.shadowroot||$.shadowrootmode)&&(Ie=H.call(a,Ie,!0)),Ie}let $e=ri?I.outerHTML:I.innerHTML;return ri&&C["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&Le(Nm,I.ownerDocument.doctype.name)&&($e="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
56
|
-
`+$e),Ui&&ns([ee,X,q],_t=>{$e=Ba($e,_t," ")}),A&&Mn?A.createHTML($e):$e},e.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(j),to=!0},e.clearConfig=function(){zi=null,to=!1},e.isValidAttribute=function(j,b,I){zi||ro({});const z=Se(j),ae=Se(b);return dc(z,ae,I)},e.addHook=function(j,b){typeof b=="function"&&(V[j]=V[j]||[],La(V[j],b))},e.removeHook=function(j){if(V[j])return Np(V[j])},e.removeHooks=function(j){V[j]&&(V[j]=[])},e.removeAllHooks=function(){V={}},e}var Hp=Mm();class x3 extends Ee{constructor(t,a){super(t,{...{},...a});He(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=e3.createHash("md5").update(await r.text()).digest("hex"),c=nn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});He(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});He(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=Hp.sanitize(o);if(o!==l){const c=nn(n),p=l.endsWith(`.${c}`)?l:`${l}.${c}`;this.uppy.setFileState(a,{name:p,meta:{...r,name:p,filename:p}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:c,name:p,type:u}=this.uppy.getFile(a),h=await c.text(),m=Hp.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==m){const f=new Blob([m],{type:u}),_=op(f,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:_})}}}});He(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.setMetaData(t)});He(this,"tryDownloadRemoteFile",async t=>{var A,R;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:p,remote:u,meta:h,errorCount:m=0}=t,f=!p&&r,_=`uploader:${c}:downloaded`,x=nn(t),g=(A=n==null?void 0:n.split("?"))==null?void 0:A[0],T=(()=>{const y=["jpg","jpeg"];return y.includes(x)&&y.some(P=>g==null?void 0:g.endsWith(P))?!0:g==null?void 0:g.endsWith(x)})()?g:`${g}${x?`.${x}`:""}`;if(f){const y=e_(s||((R=u==null?void 0:u.body)==null?void 0:R.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await la.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:y}}).then(P=>P==null?void 0:P.data).then(async P=>{const k=op(P,T);this.uppy.setFileState(c,{name:T,extension:x,type:a,data:k,preview:s||sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:T,filename:T}}),this.uppy.getFile(c),this.uppy.emit(_,c)}).catch(async P=>{console.error("Axios download remote file error: ",P),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(P=>{this.uppy.once(_,async()=>{P()})}))()});He(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:sp(s)})},o.indexOf("gif")>-1?1e3:0)}});He(this,"prepareUpload",t=>{const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w3 extends Ee{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>_e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:_e("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[_e("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),_e("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return _e("div",{id:"ai-image",className:"ai-image",children:_e("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",P3=de.lazy(()=>Jp(()=>import("./index-
|
|
56
|
+
`+$e),Ui&&ns([ee,X,q],_t=>{$e=Ba($e,_t," ")}),A&&Mn?A.createHTML($e):$e},e.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(j),to=!0},e.clearConfig=function(){zi=null,to=!1},e.isValidAttribute=function(j,b,I){zi||ro({});const z=Se(j),ae=Se(b);return dc(z,ae,I)},e.addHook=function(j,b){typeof b=="function"&&(V[j]=V[j]||[],La(V[j],b))},e.removeHook=function(j){if(V[j])return Np(V[j])},e.removeHooks=function(j){V[j]&&(V[j]=[])},e.removeAllHooks=function(){V={}},e}var Hp=Mm();class x3 extends Ee{constructor(t,a){super(t,{...{},...a});He(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=e3.createHash("md5").update(await r.text()).digest("hex"),c=nn(n),p=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});He(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});He(this,"preventXssAttack",async t=>{var s;const{id:a}=t,n=this.uppy.getFile(a);if(n){const{name:o,meta:r}=this.uppy.getFile(a),l=Hp.sanitize(o);if(o!==l){const c=nn(n),p=l.endsWith(`.${c}`)?l:`${l}.${c}`;this.uppy.setFileState(a,{name:p,meta:{...r,name:p,filename:p}})}if((s=n.type)!=null&&s.includes("image/svg")){const{data:c,name:p,type:u}=this.uppy.getFile(a),h=await c.text(),m=Hp.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==m){const f=new Blob([m],{type:u}),_=op(f,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:_})}}}});He(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.setMetaData(t)});He(this,"tryDownloadRemoteFile",async t=>{var A,R;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:p,remote:u,meta:h,errorCount:m=0}=t,f=!p&&r,_=`uploader:${c}:downloaded`,x=nn(t),g=(A=n==null?void 0:n.split("?"))==null?void 0:A[0],T=(()=>{const y=["jpg","jpeg"];return y.includes(x)&&y.some(P=>g==null?void 0:g.endsWith(P))?!0:g==null?void 0:g.endsWith(x)})()?g:`${g}${x?`.${x}`:""}`;if(f){const y=e_(s||((R=u==null?void 0:u.body)==null?void 0:R.url));if(m>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await la.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:y}}).then(P=>P==null?void 0:P.data).then(async P=>{const k=op(P,T);this.uppy.setFileState(c,{name:T,extension:x,type:a,data:k,preview:s||sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:T,filename:T}}),this.uppy.getFile(c),this.uppy.emit(_,c)}).catch(async P=>{console.error("Axios download remote file error: ",P),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(P=>{this.uppy.once(_,async()=>{P()})}))()});He(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:sp(s)})},o.indexOf("gif")>-1?1e3:0)}});He(this,"prepareUpload",t=>{const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w3 extends Ee{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>_e("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:_e("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[_e("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),_e("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return _e("div",{id:"ai-image",className:"ai-image",children:_e("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _3="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",P3=de.lazy(()=>Jp(()=>import("./index-Dd6xY134.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]),import.meta.url)),qp="uploader-container",os="uploader-dashboard",Zr=localStorage.getItem("uppy_debug"),S3=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,n=dm(e==null?void 0:e.companion),s=async l=>(await la.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Dh,options:{quality:1},alwayUse:!0},(Zr||sn()&&!rp())&&{id:"Uploaded",plugin:Y_,options:{params:a==null?void 0:a.params}},(Zr||sn()&&!rp())&&{id:"Resources",plugin:J_,options:{params:a==null?void 0:a.params}},sn()&&t_()&&t.AIImage&&{id:"AIImage",plugin:w3,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var u,h;const p=document.getElementById("ai-image");p?lf(p).render(ot.jsx(P3,{api:s,restrictions:o,i18n:(h=(u=l.current)==null?void 0:u.getUploader())==null?void 0:h.i18n,onSelect:m=>{const f=l.current.getUploader();f==null||f.emit("ai-image:selected",m),m.forEach((_,x)=>{const g=`AI Image [${x+1}].png`,F={name:g,type:"image/png",data:Zw(_,g),source:"AIImage",isRemote:!1};f==null||f.addFile(F)})}})):c()},100)}c()}},{id:"Url",plugin:An,options:{companionUrl:n}},{id:"Webcam",plugin:md,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Dd,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:x3,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:vl,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function Wl(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:p,restrictions:u}=i,h=id(p,"id"),m=dm(r==null?void 0:r.uploader);let f=new sl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Zr||""),locale:Rw[a||"en"],onBeforeFileAdded:(_,x)=>{if(Object.hasOwn(x,_.id))return!1;const g=!!Ei.extension(_.type),F=Ei.lookup(_.name)||"";if(!g&&F&&F!==_.type){const T=nn(_);T&&(_.extension=T),_.type=F}return _},...o,restrictions:u}).use(nm,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:m,async onBeforeRequest(_,x){var y;const{hashFileName:g,id:F,meta:T}=x,A=nn(x);_.setHeader("x-uploader-file-name",`${g}`),_.setHeader("x-uploader-file-id",`${F}`),_.setHeader("x-uploader-file-ext",`${A}`),_.setHeader("x-uploader-base-url",new URL(_.getURL()).pathname),_.setHeader("x-uploader-endpoint-url",m),_.setHeader("x-uploader-metadata",JSON.stringify(T,(P,k)=>typeof k=="string"?encodeURIComponent(k):k));const R=(window==null?void 0:window.uploaderComponentId)||((y=window==null?void 0:window.blocklet)==null?void 0:y.componentId);R&&_.setHeader("x-component-did",(R||"").split("/").pop())},onAfterResponse:async(_,x)=>{const g={},F=_.getUnderlyingObject();try{F.response&&(g.data=JSON.parse(F.response))}catch{g.data={}}g.method=_.getMethod().toUpperCase(),g.url=_.getURL(),g.status=F.status,g.headers={..._._headers};const T=F.getAllResponseHeaders();if(T&&T.split(`\r
|
|
57
57
|
`).forEach(P=>{const[k,N]=P.split(": ");k&&N&&(g.headers[k]=N)}),["PATCH","POST"].includes(g.method)&&[200,500].includes(g.status)){const y=[!0,"true"].includes(g.headers["x-uploader-file-exist"]),P=a_(g.url,g.headers["x-uploader-file-name"]),k=f.getFile(g.headers["x-uploader-file-id"]);g.file=k,g.uploadURL=P,y&&k&&(g.method==="POST"&&f.pauseResume(k.id),f.emit("upload-success",k,{uploadURL:P}),f.calculateTotalProgress()),g.status===200&&(await(s==null?void 0:s(g)),f.emitUploadSuccess(k,g))}n&&await(n==null?void 0:n(F));const A=f.getState().totalProgress===100,R=f.getFiles().every(y=>y.source==="DropTarget");A&&R&&f.close()},...l});return c&&f.use(fh,{target:document.body,onDrop:_=>{var x;(x=f==null?void 0:f.open)==null||x.call(f)},...c}),t==null||t.forEach(_=>{if(_){const{plugin:x,options:g}=h[_]||{};x&&f.use(x,g)}}),n_(f),f}const el=de.forwardRef((i,e)=>{const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=af({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),n=S3({...i,apiPathProps:t,availablePluginMap:a.availablePluginMap,restrictions:a.restrictions}),{plugins:s=n.map(y=>y.id),id:o="Uploader",popup:r=!1,uploadedProps:l,onOpen:c,onClose:p,locale:u,installerProps:h}=i,m=id(n,"id"),f=nf(y=>{var P;return(P=y==null?void 0:y.breakpoints)==null?void 0:P.down("md")}),_=yc([...s,...n.filter(y=>y.alwayUse).map(y=>y.id)]);de.useLayoutEffect(()=>{(async()=>{var k,N,H,V,ee,X;let P=xc((k=i==null?void 0:i.coreProps)==null?void 0:k.restrictions)?{}:(N=i==null?void 0:i.coreProps)==null?void 0:N.restrictions;sn()&&!t.disableMediaKitPrefix&&xc((H=i==null?void 0:i.coreProps)==null?void 0:H.restrictions)&&await la.get("/api/uploader/status").then(({data:q})=>{a.availablePluginMap=q.availablePluginMap,P=q.restrictions||{}}),!((V=P==null?void 0:P.allowedFileTypes)!=null&&V.length)&&(P!=null&&P.allowedFileExts)&&(P.allowedFileTypes=yc((X=(ee=(typeof(P==null?void 0:P.allowedFileExts)=="string"?P==null?void 0:P.allowedFileExts.split(","):P==null?void 0:P.allowedFileExts)||[])==null?void 0:ee.map(q=>Ei.lookup((q==null?void 0:q.replaceAll(" ",""))||"")))==null?void 0:X.filter(q=>q)),delete P.allowedFileExts),P.maxFileSize&&typeof P.maxFileSize=="string"&&(P.maxFileSize=ie.parseSize(P.maxFileSize,{iec:!1})||void 0),a.restrictions=P})()},[]),uf("esc",y=>{a.open&&(y.stopPropagation(),y.preventDefault(),F())},{useCapture:!0}),de.useEffect(()=>{a.uppy=Wl({...i,id:o,plugins:_,apiPathProps:t,pluginList:n,restrictions:a.restrictions}),a.uppy.open=g,a.uppy.close=F,a.uppy.openPlugin=x,a.uppy.on("dashboard:show-panel",y=>{const{onShowPanel:P}=m[y];P==null||P(e)}),(_.includes("Uploaded")||_.includes("Resources"))&&(a.uppy.off("uploaded:selected"),a.uppy.on("uploaded:selected",y=>{var P;y.forEach(k=>{a.uppy.emitUploadSuccess({id:k._id},{data:k,isMock:!0})}),(P=l==null?void 0:l.onSelectedFiles)==null||P.call(l,y),F()}))},[JSON.stringify({id:o,plugins:_,apiPathProps:t,locale:u,restrictions:a.restrictions})]);function x(y){var P,k,N;if(y=y.replace(/\s/g,""),["MyDevice",..._].map(H=>H.toLowerCase()).includes(y.toLowerCase())){let H=`div[data-uppy-acquirer-id="${y}"] > button`;(N=(k=(P=document==null?void 0:document.getElementById(os))==null?void 0:P.querySelector(H))==null?void 0:k.click)==null||N.call(k)}}function g(y){var k,N,H,V;a.open=!0,y&&setTimeout(()=>{x(y)},200),a.uppy.emitOpen(),c==null||c(),(N=(k=document.activeElement)==null?void 0:k.blur)==null||N.call(k);const P=a.uppy.getPlugin(os).el;(H=P==null?void 0:P.focus)==null||H.call(P),(V=P==null?void 0:P.click)==null||V.call(P)}function F(){var y;(y=a.uppy.getPlugin(os))==null||y.hideAllPanels(),a.open=!1,a.uppy.emitClose(),p==null||p(),setTimeout(()=>{a.uppy.getState().totalProgress===100&&(a.uppy.setState({files:{},currentUploads:{}}),a.uppy.calculateTotalProgress())},500)}de.useImperativeHandle(e,()=>({getUploader:()=>a.uppy,open:g,close:F})),de.useEffect(()=>{i_(t.disableMediaKitPrefix)},[t.disableMediaKitPrefix]);const T=r?rf:de.Fragment,A=r?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:a.open?"block":"none"}},invisible:!0,open:a.open,onClick:y=>{document.activeElement===document.body&&(y.stopPropagation(),F())},...i.wrapperProps}:{...i.wrapperProps},R=f?"42px":"40px";return ot.jsx(T,{...A,children:ot.jsxs(mf,{onClose:F,did:_3,disabled:!a.open,...h,children:[ot.jsx(sf,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),ot.jsxs(Zp,{id:qp,onClick:y=>y.stopPropagation(),sx:{position:"relative",width:f?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}}},children:[ot.jsx(of,{"aria-label":"close",onClick:F,sx:{color:"#fafafa",position:"absolute",...f?{bottom:`calc(0px - ${R} - 16px)`,left:`calc(50vw - ${R} - 8px)`}:{right:`calc(0px - ${R} - 16px)`,top:-12}},children:ot.jsx(vf,{sx:{fontSize:R}})}),a.uppy&&ot.jsx(sh,{inline:!0,target:`#${qp}`,id:os,uppy:a.uppy,plugins:_,fileManagerSelectionType:"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:F,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),F3=Object.freeze(Object.defineProperty({__proto__:null,Uploader:el,default:el,initUploader:Wl},Symbol.toStringTag,{value:"Module"})),C3=de.lazy(()=>Jp(()=>Promise.resolve().then(()=>F3),void 0,import.meta.url).then(i=>({default:i.Uploader}))),Vl=de.createContext(null);function Lm(){const i=de.useContext(Vl);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function T3({onChange:i,children:e,...t}){const a=Lm(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return ot.jsx(Zp,{onClick:n,...t,children:e})}function E3({children:i,...e}){const t=de.useRef(null);return ot.jsxs(Vl.Provider,{value:t,children:[i,cf.createPortal(ot.jsx(C3,{ref:t,popup:!0,...e},"uploader"),document.body)]})}const l2=Object.freeze(Object.defineProperty({__proto__:null,Uploader:el,UploaderContext:Vl,UploaderProvider:E3,UploaderTrigger:T3,initUploader:Wl,useUploaderContext:Lm},Symbol.toStringTag,{value:"Module"}));export{t_ as g,l2 as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dU as S}from"./index-
|
|
1
|
+
import{dU as S}from"./index-Cwi3bFQC.js";function I(r,t,n){return(t=S(t))in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function h(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,e)}return n}function m(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(e){I(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function i(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var E=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),v=function(){return Math.random().toString(36).substring(7).split("").join(".")},P={INIT:"@@redux/INIT"+v(),REPLACE:"@@redux/REPLACE"+v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v()}};function R(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function T(r,t,n){var e;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(i(1));return n(T)(r,t)}if(typeof r!="function")throw new Error(i(2));var u=r,a=t,p=[],c=p,f=!1;function w(){c===p&&(c=p.slice())}function g(){if(f)throw new Error(i(3));return a}function O(o){if(typeof o!="function")throw new Error(i(4));if(f)throw new Error(i(5));var b=!0;return w(),c.push(o),function(){if(b){if(f)throw new Error(i(6));b=!1,w();var s=c.indexOf(o);c.splice(s,1),p=null}}}function y(o){if(!R(o))throw new Error(i(7));if(typeof o.type>"u")throw new Error(i(8));if(f)throw new Error(i(9));try{f=!0,a=u(a,o)}finally{f=!1}for(var b=p=c,l=0;l<b.length;l++){var s=b[l];s()}return o}function N(o){if(typeof o!="function")throw new Error(i(10));u=o,y({type:P.REPLACE})}function A(){var o,b=O;return o={subscribe:function(s){if(typeof s!="object"||s===null)throw new Error(i(11));function d(){s.next&&s.next(g())}d();var x=b(d);return{unsubscribe:x}}},o[E]=function(){return this},o}return y({type:P.INIT}),e={dispatch:y,subscribe:O,getState:g,replaceReducer:N},e[E]=A,e}function j(r,t){return function(){return t(r.apply(this,arguments))}}function K(r,t){if(typeof r=="function")return j(r,t);if(typeof r!="object"||r===null)throw new Error(i(16));var n={};for(var e in r){var u=r[e];typeof u=="function"&&(n[e]=j(u,t))}return n}function L(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,u){return function(){return e(u.apply(void 0,arguments))}})}function M(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return function(e){return function(){var u=e.apply(void 0,arguments),a=function(){throw new Error(i(15))},p={getState:u.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(f){return f(p)});return a=L.apply(void 0,c)(u.dispatch),m(m({},u),{},{dispatch:a})}}}export{I as _,M as a,K as b,T as c,L as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as g,j as a,Q as x,d0 as q,fM as ee,dM as ce,r as A,q as Oe,cB as Le,t as Fe,ch as Ae,fz as We,fK as Ve,g3 as He,dO as Ye,f$ as Ge,dN as Ke,a2 as _e,fc as Re,gc as Xe,av as ze,n as Ne,cN as Ze,g as Je,cz as Qe,gd as $e}from"./index-
|
|
1
|
+
import{P as g,j as a,Q as x,d0 as q,fM as ee,dM as ce,r as A,q as Oe,cB as Le,t as Fe,ch as Ae,fz as We,fK as Ve,g3 as He,dO as Ye,f$ as Ge,dN as Ke,a2 as _e,fc as Re,gc as Xe,av as ze,n as Ne,cN as Ze,g as Je,cz as Qe,gd as $e}from"./index-Cwi3bFQC.js";import"./index-Cd1cCAJE.js";function ue({optionalComponent:r,index:u,installStatus:w,hasPermission:l,t:_}){const E=()=>{window.open(r==null?void 0:r.installUrl,"_blank")},R=()=>{window.open(r==null?void 0:r.storeUrl,"_blank")},j=()=>{window.location.reload()},O=w==="stopped"||w==="running",y=60;return a.jsxs(x,{children:[u===0?null:a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsxs(x,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[a.jsx("img",{style:{width:y,height:y,minWidth:y,minHeight:y},src:r.logoUrl,alt:r.meta.title}),a.jsxs(x,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[a.jsxs(x,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var S;return R((S=r.meta)==null?void 0:S.did)},children:[r.meta.title,a.jsxs(x,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[r.meta.version,a.jsx(ee,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:q.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),a.jsx(x,{sx:{marginTop:0,opacity:.7},children:r.meta.description}),a.jsx(x,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:w?a.jsx(x,{sx:{marginTop:2,opacity:.7},children:O?a.jsx(ce,{variant:"contained",onClick:j,children:_("componentInstallerRefresh")},"refresh"):a.jsx(ce,{disabled:!0,sx:{color:"#333"},startIcon:a.jsx(ee,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:w},"status")}):a.jsx(ce,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var S;return E((S=r.meta)==null?void 0:S.did)},children:_("componentInstallerInstall")},"install")}),O?a.jsx(x,{sx:{marginTop:2,opacity:.7},children:_("componentInstallerSuccessInstalled")}):null]})]})]})}ue.propTypes={t:g.func.isRequired,optionalComponent:g.object.isRequired,index:g.number.isRequired,installStatus:g.string,hasPermission:g.bool.isRequired};ue.defaultProps={installStatus:""};const ei={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},de=r=>typeof r=="string"?new Set(r.split(";;")):new Set(r);function ii({did:r,onInstalled:u,onError:w}){const l=Array.isArray(r)?r.join(";;"):r,[_,E]=A.useState({}),R=A.useRef({onInstalled:u,onError:w});R.current={onInstalled:u,onError:w};const{optionalComponents:j,componentMountPoints:O}=window.blocklet,y=A.useMemo(()=>{var o;if(!j||!j.length)return[];const m=de(l),e=j.filter(i=>m.has(i.meta.did));return(o=e?R.current.onError:R.current.onInstalled)==null||o(e),e},[l,j]),S=A.useMemo(()=>{if(y.length)return!0;const m=de(l);return(O||[]).find(e=>m.has(e.did))},[y,O,l]);return y.forEach(m=>{m.storeUrl=Oe(m.meta.homepage,"blocklets",m.meta.did),m.installUrl=Oe(window.blocklet.appUrl,Le,`/admin/components?install-component=${m.meta.did}`)}),A.useEffect(()=>{const m=e=>{var o,i,t,n,I;if(e.origin===window.blocklet.appUrl&&((o=e.data)==null?void 0:o.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let T=!1;const c=de(l);(I=(n=e.data)==null?void 0:n.blocklet)==null||I.children.forEach(s=>{var k;c.has((k=s.meta)==null?void 0:k.did)&&(T=!0,E(P=>{var D;return{...P,[(D=s.meta)==null?void 0:D.did]:s.status||"waiting"}}))}),T||E({})}};return window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}},[l]),{optComponents:y,installed:!y.length&&S,installStatus:_,setInstallStatus:E,definedInBlockletYML:S}}function H({warnIcon:r,did:u,noPermissionMute:w,onInstalled:l,onError:_,children:E,closeByOutSize:R,onClose:j,fallback:O,disabled:y,roles:S=["owner","admin"]}){const{locale:m}=Fe(),e=Ae((c,s={})=>We(ei,c,m,"en",s)),{installed:o,optComponents:i,installStatus:t,definedInBlockletYML:n}=ii({did:u,onInstalled:l,onError:_}),I=A.useContext(Ve),T=()=>{j==null||j(!1)};return y?E:a.jsx(He,{session:I==null?void 0:I.session,roles:S,children:({hasPermission:c})=>o?E:w&&!c?O||null:typeof E=="function"?a.jsxs(a.Fragment,{children:[O,E({hasPermission:c,optComponents:i,installStatus:t})]}):a.jsxs(a.Fragment,{children:[O,a.jsx(Ye,{onClickAway:s=>{s.preventDefault(),s.stopPropagation(),R&&T()},children:a.jsx(Ge,{in:!0,timeout:350,children:a.jsx(Ke,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:q.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${q.gray6}, 0px 0px 0px 1px ${q.gray6}`},children:n?a.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(x,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[r||a.jsx(ee,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(x,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),a.jsx(x,{sx:{flex:1}}),j?a.jsx(_e,{variant:"outlined",className:"button",onClick:T,children:a.jsx(Re,{})}):null]}),a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsx(x,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((s,k)=>{var P,D;return a.jsx(ue,{t:e,hasPermission:c,index:k,optionalComponent:s,installStatus:t[(P=s.meta)==null?void 0:P.did]},((D=s.meta)==null?void 0:D.did)||k)})}),c?null:a.jsxs(a.Fragment,{children:[a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsx(x,{sx:{padding:"20px 24px"},children:a.jsx(x,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):a.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(x,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[r||a.jsx(ee,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(x,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),a.jsx(x,{sx:{flex:1}}),j?a.jsx(_e,{variant:"outlined",className:"button",onClick:T,children:a.jsx(Re,{})}):null]}),a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsxs(x,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",u]})]})})})})]})})}H.propTypes={disabled:g.bool,warnIcon:g.node,did:g.oneOfType([g.string,g.arrayOf(g.string)]).isRequired,noPermissionMute:g.bool,onInstalled:g.func,onError:g.func,children:g.any.isRequired,closeByOutSize:g.bool,onClose:g.func,fallback:g.node,roles:g.array};H.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function De(r){return window.blocklet?a.jsx(H,{...r}):r.children}De.propTypes={...H.propTypes,children:g.any.isRequired};De.defaultProps={...H.defaultProps};var pe={};Object.defineProperty(pe,"__esModule",{value:!0});var ti=pe.default=void 0;oi(A);var Te=a;function oi(r){return r&&r.__esModule?r:{default:r}}function Pe(r,u){var w=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);u&&(l=l.filter(function(_){return Object.getOwnPropertyDescriptor(r,_).enumerable})),w.push.apply(w,l)}return w}function Me(r){for(var u=1;u<arguments.length;u++){var w=arguments[u]!=null?arguments[u]:{};u%2?Pe(Object(w),!0).forEach(function(l){ni(r,l,w[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(w)):Pe(Object(w)).forEach(function(l){Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(w,l))})}return r}function ni(r,u,w){return(u=ri(u))in r?Object.defineProperty(r,u,{value:w,enumerable:!0,configurable:!0,writable:!0}):r[u]=w,r}function ri(r){var u=ai(r,"string");return typeof u=="symbol"?u:u+""}function ai(r,u){if(typeof r!="object"||!r)return r;var w=r[Symbol.toPrimitive];if(w!==void 0){var l=w.call(r,u||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(r)}var we=function(u){return(0,Te.jsx)("svg",Me(Me({},u),{},{children:(0,Te.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};we.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};we.displayName="revoke";ti=pe.default=we;g.any.isRequired,g.any.isRequired,g.string.isRequired,g.func.isRequired,g.any,g.any,g.number;A.createContext({});const bi=new Xe;ze.defaults.timeout=10*1e3;ze.create();Ne(x)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-
|
|
1
|
+
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-Cwi3bFQC.js";import{D as U}from"./index-Dqs8xtQE.js";import{u as L}from"./blocklet-DsP8dvbD.js";import{C as N,M as C}from"./memory-wEAomQNC.js";import{B as D}from"./bundle-avatar-BmpkX0gn.js";import"./FilterList-FpqscjJw.js";import"./useThemeProps-rDwpoqme.js";import"./Select-BLXgoX9k.js";import"./Delete-Db11NFpL.js";import"./InputLabel-Dh6H4BIb.js";import"./TextField-DwK_GXoo.js";import"./LastPage-DT2e5BXx.js";import"./index-77OEIYM-.js";import"./redux-CxE33JOf.js";import"./Search-SYh-6ZOz.js";import"./index-BHeHy1vA.js";import"./MoreVert-BWsZ-BJo.js";import"./chart-C1MBEatU.js";function g({blocklet:r,cpuHistory:i,memoryHistory:n,...m}){const l=r.appRuntimeInfo||{};return e.jsx(M,{component:"div",...m,children:e.jsxs(y,{className:"page-metrics",container:!0,spacing:5,children:[e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!i.length&&e.jsx(N,{currentLoad:l.cpuUsage||0,history:i,style:{height:150}})},"cpu"),e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&e.jsx(C,{used:l.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}g.propTypes={blocklet:s.object.isRequired,cpuHistory:s.arrayOf(s.shape({date:s.number,value:s.number})),memoryHistory:s.arrayOf(s.shape({date:s.number,value:s.number}))};g.defaultProps={cpuHistory:[],memoryHistory:[]};const M=b(p)``;function P(){const{t:r,locale:i}=k(),{blocklet:n,runtimeHistory:m,actions:{refreshBlocklet:l}}=L(),a=x.useMemo(()=>{const t=[];return h.forEachBlockletSync(n,(o,{ancestors:f,id:d,level:c})=>{o.runtimeInfo&&t.push({type:"blocklet",groupId:n.meta.did,groupName:h.getDisplayName(n),id:d,name:h.getDisplayName(o,!0),blocklet:n,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:f})}),t},[n]);x.useEffect(()=>{const t=setInterval(()=>{l()},1e4);return()=>{clearInterval(t)}},[]);const I=t=>B(Number(t||0),{locale:R(i)}),j=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:f,level:d,ancestors:c}=a[t];return e.jsxs(u,{display:"flex",alignItems:"center",pl:d*2,children:[e.jsx(D,{size:14,blocklet:f,ancestors:c}),e.jsx(u,{ml:1,children:o})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return I(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return v((o==null?void 0:o.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return e.jsxs(H,{component:"div",children:[e.jsx(p,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),n.status==="running"?[e.jsx(u,{children:e.jsx(g,{blocklet:n,cpuHistory:m.cpu,memoryHistory:m.memory})}),e.jsx(u,{mt:3,children:e.jsx(U,{title:r("analytics.detail"),className:"monitor-table",locale:i,data:a,columns:j,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:e.jsx(p,{children:r("blocklet.runtimeInfo.noRunning")})]})}P.propTypes={};const H=b(p)``;export{P as default};
|