@abtnode/webapp 1.16.27-beta-8f022f16 → 1.16.27-beta-9397aa36
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-BlWdL5hq.js → Add-BYcTrfwq.js} +1 -1
- package/dist/assets/{ArrowDropDown-BRSuKRSZ.js → ArrowDropDown-Ce8utXjU.js} +1 -1
- package/dist/assets/{Autocomplete-DzQAgmMV.js → Autocomplete-BgbFIwgC.js} +1 -1
- package/dist/assets/{Breadcrumbs-BQD6r-rf.js → Breadcrumbs-DhzWQAd5.js} +1 -1
- package/dist/assets/{ButtonGroup-CqHbqvIj.js → ButtonGroup-DsDQPFq5.js} +1 -1
- package/dist/assets/{CheckCircle-CSPlY_20.js → CheckCircle-z0EmvxpD.js} +1 -1
- package/dist/assets/{ChevronLeft-zlmw0JTD.js → ChevronLeft-CwZ4eGkY.js} +1 -1
- package/dist/assets/{ChevronRight-hhdO2z__.js → ChevronRight-DF2TQuxF.js} +1 -1
- package/dist/assets/{Close-BfNzQHXc.js → Close-TD13_jXp.js} +1 -1
- package/dist/assets/{Delete-HYXbanP_.js → Delete-B32Y4H9I.js} +1 -1
- package/dist/assets/DeleteOutline-CfcGLGyQ.js +1 -0
- package/dist/assets/DeleteOutline-DvvZ31vT.js +1 -0
- package/dist/assets/{Done-1q2rveFh.js → Done-Dh00ds6i.js} +1 -1
- package/dist/assets/{Edit-BowBuCq8.js → Edit-BJLfjGzO.js} +1 -1
- package/dist/assets/{EditIcon-nFgXy_Ap.js → EditIcon-BM1-fNyQ.js} +1 -1
- package/dist/assets/{FilterList-CFsrQPpD.js → FilterList-0wFVrPUc.js} +1 -1
- package/dist/assets/{Google-Dm0Bt78U.js → Google-Bh_n6egY.js} +1 -1
- package/dist/assets/{Https-CspPw1QL.js → Https-C3LwivZ6.js} +1 -1
- package/dist/assets/{InfoOutlined-DD-Zg0Tj.js → InfoOutlined-Dv-PS_K9.js} +1 -1
- package/dist/assets/{InputAdornment-Dy1fA12v.js → InputAdornment-BsJrfw9W.js} +1 -1
- package/dist/assets/{InputLabel-BXQy_ZSg.js → InputLabel-3Wx_imEU.js} +1 -1
- package/dist/assets/{LastPage-C7awZPyV.js → LastPage-IxsHKdZG.js} +1 -1
- package/dist/assets/{Launch-Eb8N22dN.js → Launch-0VxvnuWe.js} +1 -1
- package/dist/assets/{Link-euuV_LRf.js → Link-D4THmfDH.js} +1 -1
- package/dist/assets/{LoadingButton-DVHwr9De.js → LoadingButton-kMo-bLLA.js} +1 -1
- package/dist/assets/{LockIcon-Ca85OyYH.js → LockIcon-DVMXWBuj.js} +1 -1
- package/dist/assets/{Loop-vUb_fmsc.js → Loop-8YHpWrw7.js} +1 -1
- package/dist/assets/{MoreVert-gaCnI5Xf.js → MoreVert-Dy-UXLSF.js} +1 -1
- package/dist/assets/{Pagination-DfzcotPN.js → Pagination-CvzuQKWn.js} +1 -1
- package/dist/assets/{Public-BEijyP_7.js → Public-Cy1SlD9D.js} +1 -1
- package/dist/assets/{SchemaReference.es-ncoplB18.js → SchemaReference.es-Wg6qjI2Q.js} +1 -1
- package/dist/assets/{Search-Cz2kpFbT.js → Search-CLqP6dSG.js} +1 -1
- package/dist/assets/{Select-D6ACs1xY.js → Select-DacRJUpT.js} +1 -1
- package/dist/assets/{Skeleton-DWKEXisW.js → Skeleton-B635xq9w.js} +1 -1
- package/dist/assets/{Slider-DKraNvrD.js → Slider-kWM3QD3U.js} +1 -1
- package/dist/assets/{Stepper-CZFVEfLi.js → Stepper-CfMuItAU.js} +1 -1
- package/dist/assets/{TextField-DRrSIaR4.js → TextField-ChYCqgnF.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CBvNwQed.js → ToggleButtonGroup-D-TzdChr.js} +1 -1
- package/dist/assets/{ViewList-CxKdhgAh.js → ViewList-C9rEsLfO.js} +1 -1
- package/dist/assets/{actions-QLA3pt8S.js → actions-BwC0xihZ.js} +1 -1
- package/dist/assets/{actions-jzQJLd83.js → actions-DLUCcZnb.js} +1 -1
- package/dist/assets/{agreement-Bd_YDn4J.js → agreement-C-3kwpSq.js} +1 -1
- package/dist/assets/api-Dg1aNjni.js +1 -0
- package/dist/assets/{app-avatar-DH3uT_Nr.js → app-avatar-CLoA8FKQ.js} +1 -1
- package/dist/assets/{audit-logs-DwuYsIhc.js → audit-logs-CQgLtoSJ.js} +1 -1
- package/dist/assets/{brace-fold.es-DBcYme5k.js → brace-fold.es-C7pAHsAz.js} +1 -1
- package/dist/assets/{bundle-avatar-4GKn5oRs.js → bundle-avatar-C0jAIMBi.js} +1 -1
- package/dist/assets/{chart-BhmgRFRd.js → chart-CCJil07D.js} +1 -1
- package/dist/assets/{click-to-copy-BJBKnF7C.js → click-to-copy-BxRY2T53.js} +1 -1
- package/dist/assets/{closebrackets.es-CLLTB-Rw.js → closebrackets.es-CW-znL7B.js} +1 -1
- package/dist/assets/{codemirror.es-DiBSlxeg.js → codemirror.es-BCKCN0pa.js} +1 -1
- package/dist/assets/{comment.es-DTp5sWbp.js → comment.es--JXaP270.js} +1 -1
- package/dist/assets/{config-navigation-Dh_BXFIi.js → config-navigation-9U1-i3qG.js} +1 -1
- package/dist/assets/{delete-confirm-CNU7dJ17.js → delete-confirm-Cu52-w9K.js} +1 -1
- package/dist/assets/{detail-CESxJL-2.js → detail-TSZFt17G.js} +3 -3
- package/dist/assets/{dialog.es-D1H3OJaa.js → dialog.es-DdP5pxPG.js} +1 -1
- package/dist/assets/{download-Htx7YW1G.js → download-BTNda_FN.js} +1 -1
- package/dist/assets/{foldgutter.es-C2ROsMEX.js → foldgutter.es-gix6KVwn.js} +1 -1
- package/dist/assets/getValidReactChildren-BSSAKXXh.js +1 -0
- package/dist/assets/{hint.es-QDCU5iC6.js → hint.es-BkoxNExU.js} +1 -1
- package/dist/assets/{hint.es2-BteAZTtw.js → hint.es2-D0UclqLD.js} +1 -1
- package/dist/assets/{iframe-CIfJru42.js → iframe-Dry0Q1RC.js} +1 -1
- package/dist/assets/{index-BFmN77vD.js → index-4SekL7Au.js} +1 -1
- package/dist/assets/{index-f3gCWa9h.js → index-58xom0se.js} +1 -1
- package/dist/assets/index-7VEn8pMG.js +21 -0
- package/dist/assets/{index-BsU6rGWy.js → index-BOyFzt02.js} +1 -1
- package/dist/assets/{index-DnYXtUxe.js → index-BPb4u19B.js} +1 -1
- package/dist/assets/{index-rJLRm37D.js → index-BYxU5EuJ.js} +1 -1
- package/dist/assets/{index-DWTs3F9i.js → index-BkfzVG1e.js} +1 -1
- package/dist/assets/{index-Bm4qa0nV.js → index-BmYduQjf.js} +1 -1
- package/dist/assets/{index-DNRVE0NP.js → index-Bq3EqJlL.js} +1 -1
- package/dist/assets/{index-CpNJmBAT.js → index-ByTAZBnH.js} +1 -1
- package/dist/assets/{index-BrX8n3kg.js → index-C6Wak-Bp.js} +1 -1
- package/dist/assets/{index-Dz5x-Zd5.js → index-C9snPGrA.js} +1 -1
- package/dist/assets/{index-BcsyQdON.js → index-CJjmaZOb.js} +1 -1
- package/dist/assets/{index-D4Db9ftV.js → index-CLLusFhD.js} +1 -1
- package/dist/assets/index-CPsoyw3K.js +54 -0
- package/dist/assets/{index-DFCC9v5j.js → index-CV5o0SmN.js} +5 -5
- package/dist/assets/{index-GQiNlTaJ.js → index-CZxztyyO.js} +1 -1
- package/dist/assets/{index-BZvR35Hj.js → index-CcI2gztc.js} +1 -1
- package/dist/assets/{index-DddM0S9V.js → index-CivlhCtE.js} +1 -1
- package/dist/assets/{index-Hkok7PnJ.js → index-CpMrB60J.js} +3 -3
- package/dist/assets/{index-DI-gzmKu.js → index-CwvvU6sG.js} +1 -1
- package/dist/assets/{index-uyaXmUh9.js → index-Cybcu3bZ.js} +1 -1
- package/dist/assets/{index-C39X5nSU.js → index-D1IHJL8V.js} +1 -1
- package/dist/assets/{index-C01qpSwK.js → index-D1qmIEQe.js} +1 -1
- package/dist/assets/{index-RLS72NCQ.js → index-D2aPyZEh.js} +3 -3
- package/dist/assets/{index-8fCm2Jic.js → index-D4mUNiA3.js} +1 -1
- package/dist/assets/{index-BNasUWiN.js → index-DHBWVWpd.js} +1 -1
- package/dist/assets/{index--hCEdE0S.js → index-DHy7fnHK.js} +1 -1
- package/dist/assets/{index-2dK67bGl.js → index-DKleljgS.js} +1 -1
- package/dist/assets/{index-CN4-jpgI.js → index-DYIWxxvc.js} +10 -10
- package/dist/assets/{index-CgLCDu24.js → index-DZ38lcnS.js} +2 -2
- package/dist/assets/{index-DBd7rWWn.js → index-DdImsIrU.js} +1 -1
- package/dist/assets/{index-D1-aBvtW.js → index-DdYi7g5A.js} +1 -1
- package/dist/assets/{index-CJRh33cD.js → index-DyLmBsrc.js} +1 -1
- package/dist/assets/{index-Bh-DJU8Z.js → index-MgqsR5Yr.js} +1 -1
- package/dist/assets/{index-DEBI0lGj.js → index-MraPT5rJ.js} +1 -1
- package/dist/assets/{index-Mdw0srMB.js → index-RXFOkpdO.js} +1 -1
- package/dist/assets/{index-rfYAdo12.js → index-Z23xnW60.js} +1 -1
- package/dist/assets/{index-DBlH-4qz.js → index-cto27BjI.js} +2 -2
- package/dist/assets/{index-CTyxnc1Q.js → index-fzAzVQZ7.js} +1 -1
- package/dist/assets/{index-B6H1TQgD.js → index-nk7Jeg9T.js} +1 -1
- package/dist/assets/{index-Bu9Gdw_x.js → index-tCtD2xpl.js} +1 -1
- package/dist/assets/{index-B2x_NkGk.js → index-udgf9h3j.js} +1 -1
- package/dist/assets/{index.es-BU-QQy1a.js → index.es-VZygEdns.js} +1 -1
- package/dist/assets/{index.esm-UN3QaGsN.js → index.esm-Bpp1W-0n.js} +1 -1
- package/dist/assets/{info-addon.es-30ukilBE.js → info-addon.es-Dz55t6aF.js} +1 -1
- package/dist/assets/{info.es-2lPs4qsI.js → info.es-DlvBMDVd.js} +1 -1
- package/dist/assets/{install-from-url-BQJWpTKl.js → install-from-url-BfQGdJqB.js} +1 -1
- package/dist/assets/{invitation-BpNMGSxV.js → invitation-Db4MC3JQ.js} +1 -1
- package/dist/assets/{isEqual-C9LQO0Wo.js → isEqual-SGvPf73-.js} +1 -1
- package/dist/assets/{item-CE4vGuWF.js → item-BftAM0Zi.js} +1 -1
- package/dist/assets/{javascript.es-C13fQY0O.js → javascript.es-BNj6-t-x.js} +1 -1
- package/dist/assets/{jump-to-line.es-BqUFIspc.js → jump-to-line.es-DgFeCONV.js} +1 -1
- package/dist/assets/{jump.es-E5FdtiiP.js → jump.es-DW68RHsu.js} +1 -1
- package/dist/assets/{line-ODorkEX8.js → line-1yBH41Wd.js} +3 -3
- package/dist/assets/{lint.es-CmOxC0-j.js → lint.es-DmdHzCyK.js} +1 -1
- package/dist/assets/{lint.es2-f8EXNnrq.js → lint.es2-CgJGCOHv.js} +1 -1
- package/dist/assets/{lint.es3-BxgO4Daf.js → lint.es3-BL6uCIJs.js} +1 -1
- package/dist/assets/{list-header-DF2AUmaz.js → list-header-CwzHI2Rt.js} +1 -1
- package/dist/assets/{log-CNVd8L59.js → log-Ec_QJxk0.js} +1 -1
- package/dist/assets/{lottie-BuomNMnt.js → lottie-LUS1MfCT.js} +1 -1
- package/dist/assets/{matchbrackets.es-Dhn5dtU-.js → matchbrackets.es-CHrUGVwe.js} +1 -1
- package/dist/assets/{memory-BSkx1Ub2.js → memory-yOjaiNVs.js} +1 -1
- package/dist/assets/{mode.es-BfudmPy3.js → mode.es-CmPIaKTd.js} +1 -1
- package/dist/assets/{mode.es2-DvlBoAjR.js → mode.es2-CpVpeZ6j.js} +1 -1
- package/dist/assets/{mode.es3-JiFk1pWJ.js → mode.es3-BhW-mRJe.js} +1 -1
- package/dist/assets/{onlineParser.es-BSW2adyc.js → onlineParser.es-DLbzJOgY.js} +1 -1
- package/dist/assets/{overview-CXRCvckQ.js → overview-BjZwvO3w.js} +1 -1
- package/dist/assets/{react-DwbfLI7Z.js → react-BX905qse.js} +3 -3
- package/dist/assets/{redux-Bu4pculE.js → redux-BfgfWfKE.js} +1 -1
- package/dist/assets/{resource-dialog-BL8JdZuL.js → resource-dialog-D46mQ3iv.js} +1 -1
- package/dist/assets/{runtime-KfScM6FA.js → runtime-BudjolOf.js} +1 -1
- package/dist/assets/{search.es-yd0fhcZk.js → search.es-J1x6rp7i.js} +1 -1
- package/dist/assets/{searchcursor.es-Dy_G_QZQ.js → searchcursor.es-DGZQjnVx.js} +1 -1
- package/dist/assets/service-1xIndkC2.js +1 -0
- package/dist/assets/{show-hint.es-BbqPLgHC.js → show-hint.es-DgCG1PfH.js} +1 -1
- package/dist/assets/{slicedToArray-CUj4BDqr.js → slicedToArray-j5L_xxoK.js} +1 -1
- package/dist/assets/{spaces-DbeGuVPF.js → spaces-BzjtPxcp.js} +1 -1
- package/dist/assets/{sublime.es-Bu1xK-a6.js → sublime.es-BmvW8WLk.js} +1 -1
- package/dist/assets/{switch-control-Oh1i031K.js → switch-control-2xhJNPLI.js} +1 -1
- package/dist/assets/{table-icons-gSPlUUro.js → table-icons-DNH5IpNS.js} +2 -2
- package/dist/assets/{tag-tXL4aJpc.js → tag-DwIjrotQ.js} +1 -1
- package/dist/assets/{team-B2Py-5R-.js → team-Bds6tH0s.js} +1 -1
- package/dist/assets/{toUpper-fPzt0_fA.js → toUpper-DmN3YmMF.js} +1 -1
- package/dist/assets/{traffic-C7SAOKwi.js → traffic-DRJFVCky.js} +1 -1
- package/dist/assets/{url-evaluation-OWrig3n8.js → url-evaluation-Dw2A031X.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-tLVaGUOx.js → use-blocklet-info-for-connect-did-spaces-CWFXmzXz.js} +1 -1
- package/dist/assets/{useLocalStorage-Den65TTd.js → useLocalStorage-C7ck6rDl.js} +1 -1
- package/dist/assets/{util-BjsuBWBH.js → util-BHhvzew-.js} +1 -1
- package/dist/assets/{wait-container-CnNsD3cH.js → wait-container-DrkB9Qje.js} +1 -1
- package/dist/assets/{withStyles-fo91W1eJ.js → withStyles-DQBIFjtv.js} +1 -1
- package/dist/assets/{wrap-locale-BSXKmMbJ.js → wrap-locale-BMwksOY3.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-mQ8p8X2l.js +0 -1
- package/dist/assets/api-sSit_7Kw.js +0 -1
- package/dist/assets/getValidReactChildren-BXQ8AiZt.js +0 -1
- package/dist/assets/index-C2H71CT1.js +0 -21
- package/dist/assets/index-DQZaP4Az.js +0 -54
- package/dist/assets/service-BUuflGft.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
1
|
+
const __vite__fileDeps=["./index-CLLusFhD.js","./index-D9k2I5J1.js","./index-CZxztyyO.js","./click-to-copy-BxRY2T53.js","./withStyles-DQBIFjtv.js","./index-BmYduQjf.js","./useLocalStorage-C7ck6rDl.js","./index-DHBWVWpd.js","./FilterList-0wFVrPUc.js","./Select-DacRJUpT.js","./Delete-B32Y4H9I.js","./InputLabel-3Wx_imEU.js","./TextField-ChYCqgnF.js","./LastPage-IxsHKdZG.js","./index-BOyFzt02.js","./redux-BfgfWfKE.js","./Search-CLqP6dSG.js","./index-58xom0se.js","./MoreVert-Dy-UXLSF.js","./url-evaluation-Dw2A031X.js","./tag-DwIjrotQ.js","./actions-DLUCcZnb.js","./ButtonGroup-DsDQPFq5.js","./getValidReactChildren-BSSAKXXh.js","./index-D4mUNiA3.js","./isEqual-SGvPf73-.js","./install-from-url-BfQGdJqB.js","./Stepper-CfMuItAU.js","./app-avatar-CLoA8FKQ.js","./Add-BYcTrfwq.js","./index-MgqsR5Yr.js","./index-DYIWxxvc.js","./index-BPb4u19B.js","./Skeleton-B635xq9w.js","./Close-TD13_jXp.js","./lottie-LUS1MfCT.js","./wait-container-DrkB9Qje.js","./Launch-0VxvnuWe.js","./DeleteOutline-CfcGLGyQ.js","./DeleteOutline-DvvZ31vT.js","./spaces-BzjtPxcp.js","./api-Dg1aNjni.js","./index-7VEn8pMG.js","./item-BftAM0Zi.js","./index-DKleljgS.js","./index-MraPT5rJ.js","./InputAdornment-BsJrfw9W.js","./preact.module-B1z5cdvs.js","./Done-Dh00ds6i.js","./delete-confirm-Cu52-w9K.js","./item-CxkJY_14.css","./ArrowDropDown-Ce8utXjU.js","./Breadcrumbs-DhzWQAd5.js","./index-CivlhCtE.js","./index-D1qmIEQe.js","./index.esm-Bpp1W-0n.js","./switch-control-2xhJNPLI.js","./Link-D4THmfDH.js","./logo-BKA11TRi.js","./LoadingButton-kMo-bLLA.js","./Public-Cy1SlD9D.js","./InfoOutlined-Dv-PS_K9.js","./CheckCircle-z0EmvxpD.js","./ChevronRight-DF2TQuxF.js","./Edit-BJLfjGzO.js","./Https-C3LwivZ6.js","./Slider-kWM3QD3U.js","./index-D1IHJL8V.js","./download-BTNda_FN.js","./download-D33dFtt_.css","./index-DyLmBsrc.js","./audit-logs-CQgLtoSJ.js","./index-4SekL7Au.js","./index-D4PP6P2d.css","./Pagination-CvzuQKWn.js","./index-Cybcu3bZ.js","./index-BYxU5EuJ.js","./Loop-8YHpWrw7.js","./ViewList-C9rEsLfO.js","./list-header-CwzHI2Rt.js","./index-nk7Jeg9T.js","./resource-dialog-D46mQ3iv.js","./index-DdYi7g5A.js","./team-Bds6tH0s.js","./actions-BwC0xihZ.js","./index-fzAzVQZ7.js","./EditIcon-BM1-fNyQ.js","./LockIcon-DVMXWBuj.js","./Google-Bh_n6egY.js","./ToggleButtonGroup-D-TzdChr.js","./detail-TSZFt17G.js","./index-CwvvU6sG.js","./index-tCtD2xpl.js","./invitation-Db4MC3JQ.js","./index-RXFOkpdO.js","./index-C6Wak-Bp.js","./wrap-locale-BMwksOY3.js","./index-D2aPyZEh.js","./index-ByTAZBnH.js","./index-Bq3EqJlL.js","./agreement-C-3kwpSq.js","./index-udgf9h3j.js","./index-CJjmaZOb.js","./index-CV5o0SmN.js","./index-C7igR7se.css","./index-BkfzVG1e.js","./traffic-DRJFVCky.js","./iframe-Dry0Q1RC.js","./ChevronLeft-CwZ4eGkY.js","./chart-CCJil07D.js","./bundle-avatar-C0jAIMBi.js","./memory-yOjaiNVs.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
2
|
function mG(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ui(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var gG={exports:{}},d4={},yG={exports:{}},Vn={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -2513,4 +2513,4 @@ ${r}
|
|
|
2513
2513
|
padding-top: 16px;
|
|
2514
2514
|
${e=>e.scrollable?"":"overflow: hidden"};
|
|
2515
2515
|
}
|
|
2516
|
-
`;function E8t(){const{t:e}=ho(),{session:t}=E0(),{info:n,refresh:r}=_l();return Yi(ui.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(fi.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Yi(gn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Yi(gn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var xt={},A8t=Iie;function R8t(e){return e&&e.length?A8t(e):[]}var gue=R8t;const RAt=Wt(gue);class k8t{constructor(t){this.value=t,this.next=void 0}}let D8t=class{constructor(){this.clear()}enqueue(t){const n=new k8t(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var O8t=D8t;const L8t=O8t,I8t=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new L8t;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var P8t=I8t,wI={};Object.defineProperty(wI,"__esModule",{value:!0});const M8t=e=>!!(e!=null&&e.main);var DAt=wI.default=M8t,D0=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.isPackBlocklet=xt.isGatewayBlocklet=oCt=xt.isAccessible=xt.isRunning=xt.isBeforeInstalled=iCt=xt.isInProgress=rCt=xt.getBlockletServices=nCt=xt.getBlockletAppIdList=eCt=xt.getRolesFromAuthConfig=xt.isPreferenceKey=kb=xt.isExternalBlocklet=xt.getBlockletChainInfo=xt.getChainInfo=xt.getConnectAppUrl=xt.getParentComponentName=xt.filterComponentsV2=xt.findComponentByIdV2=xt.findComponentV2=xt.findComponentById=xt.findComponent=xt.getComponentBundleId=xt.getComponentName=xt.getComponentId=Vue=xt.replaceSlotToIp=xt.getComponentWhoCanAccess=Q8t=xt.getWhoCanAccess=X8t=xt.findServiceFromMeta=xt.findWebInterfacePort=Z8t=xt.findWebInterface=xt.fixBlockletStatus=Y8t=xt.getAppDescription=J8t=xt.getDisplayName=K8t=xt.getAppName=G8t=xt.hasRunnableComponent=xt.wipeSensitiveData=j8t=xt.isEnvShareable=xt.isEnvShareableToClient=z8t=xt.getComponentMissingConfigs=V8t=xt.getAppMissingConfigs=q8t=xt.getSharedConfigObj=W8t=xt.isDeletableBlocklet=xt.forEachComponentV2Sync=xt.forEachComponentV2=U8t=xt.forEachChildSync=xt.forEachChild=Nf=xt.forEachBlockletSync=xt.forEachBlocklet=xt.isFreeComponent=H8t=xt.isFreeBlocklet=xt.getAppUrl=void 0;xt.hasResourceType=$8t=xt.hasStartEngine=void 0;const _f=D0(E6),N8t=D0(gue),sG=D0(vie),yue=D0(P8t),B8t=D0(gn),Jn=ui,TI=D0(wI);var $8t=xt.hasStartEngine=TI.default;const{NODE_SERVICES:l4,SLOT_FOR_IP_DNS_SITE:F8t,WHO_CAN_ACCESS:u4,WHO_CAN_ACCESS_PREFIX_ROLES:lG}=B8t.default,vy=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.did:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.did:""}`;xt.getComponentId=vy;const vue=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.name:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.name:""}`;xt.getComponentName=vue;const bue=e=>`${e.meta.bundleName}@${e.meta.version}`;xt.getComponentBundleId=bue;const wue=e=>{if(!e)return"";const t=e.split("/");return t.pop(),!t.length||(t[t.length-1].startsWith("@")&&t.pop(),!t.length)?"":t.join("/")};xt.getParentComponentName=wue;const uc=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i,params:o,_parent:a,_root:s,_level:l=0,_tasks:c,_ancestors:u=[],_limit:d}={})=>{const p=s||a||e,g=vy(e,u),v=u.concat(e);if(i){const x=t(e,{parent:a,root:p,level:l,params:o,ancestors:u,id:g});if(e.children)for(const D of e.children)uc(D,t,{sync:i,params:x,_parent:e,_root:p,_level:l+1,_ancestors:v});return null}if(!n)return new Promise(async(x,D)=>{try{const L=await t(e,{parent:a,root:p,level:l,ancestors:u,params:o,id:g});if(e.children)for(const P of e.children)await uc(P,t,{params:L,_parent:e,_root:p,_level:l+1,_ancestors:v});x(null)}catch(L){D(L)}});const b=d||(0,yue.default)(r),E=c||[];if(E.push(b(()=>t(e,{parent:a,root:p,level:l,ancestors:u,id:g}))),e.children)for(const x of e.children)uc(x,t,{parallel:n,_parent:e,_root:p,_level:l+1,_tasks:E,_ancestors:v,_limit:b});return c?null:Promise.all(E)};xt.forEachBlocklet=uc;const Mh=(e,t)=>uc(e,t,{sync:!0});var Nf=xt.forEachBlockletSync=Mh;const xI=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i}={})=>{if(i){if(e.children)for(const s of e.children)t(s);return null}if(!n)return new Promise(async(s,l)=>{try{if(e.children)for(const c of e.children)await t(c);s(null)}catch(c){l(c)}});const o=(0,yue.default)(r),a=[];if(e.children)for(const s of e.children)a.push(o(()=>t(s)));return Promise.all(a)};xt.forEachComponentV2=xI;const SI=(e,t)=>xI(e,t,{sync:!0});xt.forEachComponentV2Sync=SI;const _I=(e,t,n)=>uc(e,(r,i)=>i.level===0?{}:t(r,i),n);xt.forEachChild=_I;const CI=(e,t)=>_I(e,t,{sync:!0});var U8t=xt.forEachChildSync=CI;const vw=(e,t,{_ancestors:n=[],returnAncestors:r=!1}={})=>{if(!t)return null;if(t(e,{ancestors:n}))return r?{component:e,ancestors:n}:e;for(const i of e.children||[]){const o=n.concat(e),a=vw(i,t,{_ancestors:o,returnAncestors:r});if(a)return a}return null};xt.findComponent=vw;const Tue=(e,t,{returnAncestors:n=!1}={})=>(Array.isArray(t)&&(t=t.join("/")),vw(e,(r,{ancestors:i})=>{const o=vy(r,i);return t===o},{returnAncestors:n}));xt.findComponentById=Tue;const EI=(e,t)=>{if(!t)return null;for(const n of e.children||[])if(t(n,e))return n;return null};xt.findComponentV2=EI;const xue=(e,t)=>t?(Array.isArray(t)&&(t=t.join("/")),EI(e,(n,r)=>{if(t.includes("/")){const i=vy(n,[r]);return t===i}return t===n.meta.did})):null;xt.findComponentByIdV2=xue;const Sue=(e,t)=>{if(!t)return[];const n=[];for(const r of e.children||[])t(r,e)&&n.push(r);return n};xt.filterComponentsV2=Sue;const _ue=e=>!!e&&!!(e.key||e.name)&&!e.secure&&e.shared!==!1&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];xt.isEnvShareableToClient=_ue;const c4=e=>!!e&&!!(e.key||e.name)&&!e.secure&&!!e.shared&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];var j8t=xt.isEnvShareable=c4;const bw=(e,t)=>{const n={};return!e||!t||(Array.isArray(e.configs)&&e.configs.forEach(({key:r,value:i,secure:o})=>{if(!c4({key:r,secure:o,shared:!0}))return;const a=(e.configObj||{})[r]||i,s=(t.configs||[]).find(l=>l.key===r);(!s||c4(s)||!s.value&&!(t.configObj||{})[s.key])&&(n[r]=a)}),(e.configs||[]).forEach(({key:r,value:i})=>{[Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(r)&&(n[Jn.CHAIN_PROP_MAP[r]]=i)})),n};var q8t=xt.getSharedConfigObj=bw;const ww=e=>e.key.startsWith(Jn.BLOCKLET_PREFERENCE_PREFIX)===!0;xt.isPreferenceKey=ww;const Cue=(e,t)=>!!(e.required&&(!e.value&&!t[e.key]||Object.values(Jn.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(t).includes(e.key)&&!t[e.key])),Eue=(e={})=>{const t=[];return SI(e,n=>{var o;if(((o=n.meta)==null?void 0:o.group)===Jn.BlockletGroup.gateway)return;const r=n.configs||[],i=bw(e,n);r.forEach(a=>{Cue(a,i)&&t.push({did:n.meta.did,key:a.key,description:a.description})})}),t.filter(n=>!ww(n))};var V8t=xt.getAppMissingConfigs=Eue;const Aue=(e={},t={})=>{const n=[],r=e.configs||[],i=bw(t,e);return r.forEach(o=>{Cue(o,i)&&n.push({did:e.meta.did,key:o.key,description:o.description})}),n};var z8t=xt.getComponentMissingConfigs=Aue;const Rue=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0;var H8t=xt.isFreeBlocklet=Rue;const kue=e=>!e.payment||!e.payment.componentPrice?!0:!e.payment.componentPrice.length;xt.isFreeComponent=kue;const Due=e=>e&&(uc(e,t=>{t.configs&&(t.configs=t.configs.filter(n=>!ww(n)),t.configs.forEach(n=>{n.secure&&(n.value=n.value?"__encrypted__":"")})),(t.environments||[]).forEach(n=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(n.key)&&(n.value="__encrypted__")}),(t.migratedFrom||[]).forEach(n=>{n.appSk="__encrypted__"}),delete e.configObj,delete e.environmentObj},{sync:!0}),e);xt.wipeSensitiveData=Due;const Oue=e=>{if(!e)return!1;const t=e.environments.find(n=>n.key==="BLOCKLET_DELETABLE");return t?t.value==="yes":!0};var W8t=xt.isDeletableBlocklet=Oue;const Lue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.gateway;xt.isGatewayBlocklet=Lue;const Iue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.pack;xt.isPackBlocklet=Iue;const Pue=e=>{let t=!1;return Mh(e,n=>{n.meta.group!==Jn.BlockletGroup.gateway&&(t=!0)}),t};var G8t=xt.hasRunnableComponent=Pue;const f4=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_NAME");i&&i.value&&(r=i.value)}return r||n.title||n.name};var K8t=xt.getAppName=f4,J8t=xt.getDisplayName=f4;const Mue=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_DESCRIPTION");i&&i.value&&(r=i.value)}return r||n.description||n.name};var Y8t=xt.getAppDescription=Mue;function Nue(e){var r,i,o;const t=(o=(i=(r=e==null?void 0:e.site)==null?void 0:r.domainAliases)==null?void 0:i.sort((a,s)=>{var l,c,u,d;return(l=a.accessibility)!=null&&l.accessible&&((c=s.accessibility)!=null&&c.accessible)?+a.isProtected-+s.isProtected:+((u=s.accessibility)==null?void 0:u.accessible)-+((d=a.accessibility)==null?void 0:d.accessible)}))==null?void 0:o.map(a=>{var c;const s=(c=a==null?void 0:a.domainStatus)!=null&&c.isHttps?"https://":"http://",l=a==null?void 0:a.value;return`${s}${l}`}).filter(Boolean);return t==null?void 0:t[0]}xt.getAppUrl=Nue;const Bue=e=>{e&&(Mh(e,t=>{t.status=(0,Jn.fromBlockletStatus)(t.status),t.source!==void 0&&(t.source=(0,Jn.fromBlockletSource)(t.source))}),e.settings&&(e.settings.children||[]).forEach(t=>{Mh(t,n=>{n.status=(0,Jn.fromBlockletStatus)(n.status),n.source!==void 0&&(n.source=(0,Jn.fromBlockletSource)(n.source))})}))};xt.fixBlockletStatus=Bue;const Tw=e=>{if(!e)return null;const t=e.meta||e||{},{interfaces:n=[]}=t;return Array.isArray(n)?n.find(r=>r.type===Jn.BLOCKLET_INTERFACE_TYPE_WEB):null};var Z8t=xt.findWebInterface=Tw;const $ue=e=>{if(!e)return null;const t=Tw(e),{ports:n}=e;return!t||!n?null:n[t.port]};xt.findWebInterfacePort=$ue;const xw=(e,t)=>{const n=[t];t===l4.AUTH&&n.push(l4.AUTH_SERVICE);const r=Tw(e);return r?(r.services||[]).find(i=>n.includes(i.name)):null};var X8t=xt.findServiceFromMeta=xw;const Fue=e=>{if(!e)return u4.ALL;if((0,_f.default)(e,"settings.whoCanAccess"))return e.settings.whoCanAccess;const t=xw(e.meta,l4.AUTH);return(0,_f.default)(t,"config.whoCanAccess")?t.config.whoCanAccess:u4.ALL};var Q8t=xt.getWhoCanAccess=Fue;const Uue=(e,t)=>{const n=(e.configs||[]).find(i=>i.key===Jn.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(n)return n.value;if(t&&(0,_f.default)(t,"settings.whoCanAccess")&&(0,_f.default)(t,"settings.whoCanAccess")!==u4.ALL)return(0,_f.default)(t,"settings.whoCanAccess");const r=xw(e.meta,l4.AUTH);return(0,_f.default)(r,"config.whoCanAccess")?r.config.whoCanAccess:u4.ALL};xt.getComponentWhoCanAccess=Uue;const jue=({request:e,baseUrl:t})=>{const n=e.headers["x-blocklet-did"]||"",r=e.headers["x-blocklet-real-did"]||"",i=e.headers["x-path-prefix"]||"/",o=e.headers["x-group-path-prefix"]||"/";let a=t;return n!==r&&i!==o&&(a=(0,sG.default)((0,sG.default)(a,"/").replace(i,o),"")),a};xt.getConnectAppUrl=jue;const que=(e,t)=>{const n=(t||"").includes(":")?":":/\./;return(e||"").replace(F8t,(t||"").replace(new RegExp(n,"g"),"-"))};var Vue=xt.replaceSlotToIp=que;const b1=e=>{const t=Object.entries(Jn.CHAIN_INFO_CONFIG).reduce((n,r)=>{const[i,[o,a]]=r;return n[o]=(0,_f.default)(e,i)||a,n},{});return t.type==="ethereum"&&t.id==="none"&&(t.id="1"),t};xt.getChainInfo=b1;const zue=e=>{const t=b1({});if(!e)return t;const n=b1(e.configObj);if(n.host!=="none")return n;let r;return CI(e,i=>{if(r&&r.host!=="none")return;const o=b1(i.configObj);o.host!=="none"&&(r=o)}),r||t};xt.getBlockletChainInfo=zue;const Hue=e=>!!(e!=null&&e.controller);var kb=xt.isExternalBlocklet=Hue;const Wue=e=>e.whoCanAccess.startsWith(lG)?e.whoCanAccess.substring(lG.length).split(","):[];var eCt=xt.getRolesFromAuthConfig=Wue;const tCt=e=>{const t=Array.isArray(e.migratedFrom)?e.migratedFrom.map(n=>n.appDid):[];return(0,N8t.default)([e.appDid,e.appPid,...t].filter(Boolean))};var nCt=xt.getBlockletAppIdList=tCt;const Gue=e=>{const t=[];return e&&Mh(e,n=>{var i;(((i=n.meta)==null?void 0:i.interfaces)||[]).filter(o=>o.type===Jn.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(o=>{const a=o.port||{};t.push({name:o.name,protocol:o.protocol,port:Number(a.external),upstreamPort:Number((n.ports||{})[a.internal])})})}),t};var rCt=xt.getBlockletServices=Gue;const Kue=e=>[Jn.BlockletStatus.downloading,Jn.BlockletStatus.waiting,Jn.BlockletStatus.starting,Jn.BlockletStatus.installing,Jn.BlockletStatus.stopping,Jn.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(e);var iCt=xt.isInProgress=Kue;const Jue=e=>[Jn.BlockletStatus.added,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,Jn.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(e);xt.isBeforeInstalled=Jue;const Yue=e=>[Jn.BlockletStatus.running,"running"].includes(e);xt.isRunning=Yue;const Zue=e=>[Jn.BlockletStatus.running,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,"running","waiting","downloading"].includes(e);var oCt=xt.isAccessible=Zue;const Xue=(e,{type:t,did:n}={type:"",did:""})=>{var r,i,o;return e?!(0,TI.default)(e.meta)&&((o=(i=(r=e.meta)==null?void 0:r.resource)==null?void 0:i.bundles)==null?void 0:o.length)>0&&(e.meta.resource.bundles||[]).some(a=>a.type===t&&a.did===n):!1};xt.hasResourceType=Xue;xt.default={isFreeBlocklet:Rue,isFreeComponent:kue,forEachBlocklet:uc,forEachBlockletSync:Mh,forEachChild:_I,forEachChildSync:CI,forEachComponentV2:xI,forEachComponentV2Sync:SI,isDeletableBlocklet:Oue,getSharedConfigObj:bw,getAppMissingConfigs:Eue,getComponentMissingConfigs:Aue,isEnvShareableToClient:_ue,isEnvShareable:c4,wipeSensitiveData:Due,hasRunnableComponent:Pue,getAppName:f4,getAppDescription:Mue,getAppUrl:Nue,getDisplayName:f4,fixBlockletStatus:Bue,findWebInterface:Tw,findWebInterfacePort:$ue,findServiceFromMeta:xw,getWhoCanAccess:Fue,getComponentWhoCanAccess:Uue,replaceSlotToIp:que,getComponentId:vy,getComponentName:vue,getComponentBundleId:bue,findComponent:vw,findComponentById:Tue,findComponentV2:EI,findComponentByIdV2:xue,filterComponentsV2:Sue,getParentComponentName:wue,getConnectAppUrl:jue,getChainInfo:b1,getBlockletChainInfo:zue,isExternalBlocklet:Hue,isPreferenceKey:ww,getRolesFromAuthConfig:Wue,getBlockletServices:Gue,isInProgress:Kue,isBeforeInstalled:Jue,isRunning:Yue,isAccessible:Zue,isGatewayBlocklet:Lue,isPackBlocklet:Iue,hasStartEngine:TI.default,hasResourceType:Xue};const Que=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},OAt=(e,t,n)=>{const r=Que(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},aCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(gn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Vue(r.value,n),r}catch{return r}}).filter(Boolean):e},sCt=e=>{const t={didSpace:null};return Nf(e,n=>{var r,i;t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},uG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=aO(i.from.pathPrefix||"/")}),e.site.rules=Nie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await aCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Nf(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Nf(n,(o,{id:a})=>{i[a]=o}),Nf(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=sCt(e)},cG="arcblock",LAt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:cG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:cG)},IAt=e=>!zk(e==null?void 0:e.controller);let Q8=null;const lCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await ND.get(t)).data.address}catch{return null}},fG=()=>(Q8||(Q8=lCt()),Q8),ece=F.createContext({}),{Provider:uCt,Consumer:PAt}=ece,dG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function cCt({children:e}){const t=_l(),n=iw(),[r,i]=F.useState(null),[o,a]=F.useState(!1),[s,l]=F.useState([]),[c,u]=F.useState([]),[d,p]=F.useState(!1),g=(P,q)=>{kb(P)?u(q):l(q)},v=4,b=async({silent:P=!0,retries:q=v,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await uG(G,{getIP:fG});const ne=K.filter(G=>!kb(G)),le=K.filter(kb);l(G=>dG(G,ne,M)),u(G=>dG(G,le,M)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},E=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await uG(q,{getIP:fG}),g(q,M=>M.some(j=>j.meta.did===q.meta.did)?M.map(j=>j.meta.did===q.meta.did?q:j):[...M,q])}catch(q){i(q)}},x=P=>{t.refresh(),E(P)};F.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Nf(P,(M,{id:j})=>{q[j]=ui.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Nf(j,(K,{id:ne})=>{q[ne]&&(K.status=q[ne])}),j)))};Yi(ui.BlockletEvents.added,P=>{P.status=ui.fromBlockletStatus(P.status),g(P,q=>[...q,P])}),Yi(ui.BlockletEvents.removed,P=>{t.refresh(),g(P,q=>q.filter(M=>M.meta.did!==P.meta.did))}),Yi(ui.BlockletEvents.statusChange,D),Yi(ui.BlockletEvents.installed,x),Yi(ui.BlockletEvents.upgraded,x),Yi(ui.BlockletEvents.updated,E),Yi(ui.BlockletEvents.startFailed,E),Yi(ui.BlockletEvents.reloaded,E);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(uCt,{value:{blocklets:L},children:e})}function MAt(){const{blocklets:e}=F.useContext(ece);return e}const fCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},NAt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},BAt=async e=>{const t=Ndt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return tae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Udt(t)),n},tce=F.createContext({}),{Provider:dCt,Consumer:$At}=tce;function pCt({children:e}){const{session:t}=E0(),{t:n}=ho(),{api:r,info:i}=_l(),[o]=bY(),a=iw(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[v,b]=F.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),E=(le,G)=>b(N=>({...N,appDid:le,sessionId:G})),x=fCt({user:t.user,launchType:s,nftId:u}),[D,L]=F.useState(null),[P,q]=F.useState(!0),M=F.useMemo(()=>i?Que(i):"",[i]),j=async le=>{if(!le)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:le,attachConfig:!1}});if(!G)return null;const N=ui.BlockletStatus[G.status],T=!!u,f=N<ui.BlockletStatus.installed,h=N===ui.BlockletStatus.installed,w=N===ui.BlockletStatus.running;return b(C=>({...C,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:le,isFree:G},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!le)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&v.appDid&&(f=await j(v.appDid)),b(h=>({...h,...f,meta:le,isFree:G,launcherSession:N}))}catch(le){console.error(le),L(le.message)}finally{q(!1)}};F.useEffect(()=>{var le,G,N;((le=t==null?void 0:t.user)==null?void 0:le.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:N.nftId)!==u&&t.logout(),K()},[]),F.useEffect(()=>{P||!v.meta||(x?v.appDid&&j(v.appDid).catch(le=>{fi.error(le.message)}):(b(le=>({...le,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const ne={meta:v.meta,isFree:v.isFree,appDid:v.appDid,sessionId:v.sessionId,isInstalling:v.isInstalling,isInstalled:v.isInstalled,isExternal:v.isExternal,isRunning:v.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:E,launcherUrl:p,launcherSession:v.launcherSession,launcherSessionId:d};return I.jsx(dCt,{value:ne,children:e})}function FAt(){return F.useContext(tce)}function nce(){return new URLSearchParams(yi().search)}const rce=F.createContext(),{Provider:hCt,Consumer:UAt}=rce;function ice({children:e}){const n=nce().get("blocklet_meta_url"),r=G_t(async()=>{const{data:o}=await oO.get(n);return o});if(r.loading)return I.jsx(ra,{children:I.jsx(sa,{})});const i={meta:r.value,error:r.error};return I.jsx(hCt,{value:i,children:e})}ice.propTypes={children:Y.any.isRequired};function jAt(){return F.useContext(rce)}const mCt=F.lazy(()=>mn(()=>import("./index-D4Db9ftV.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),gCt=F.lazy(()=>mn(()=>import("./index-Bm4qa0nV.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),yCt=F.lazy(()=>mn(()=>import("./index-CN4-jpgI.js"),__vite__mapDeps([31,32,33,34,35,36,6,37,38,39,40,12,9,11,25,18,17]),import.meta.url)),vCt=F.lazy(()=>mn(()=>import("./index-C2H71CT1.js"),__vite__mapDeps([41,6,42,43,17,16,44,9,45,46,29,12,11,37,47,38,48,3,18,22,23,49,50,51]),import.meta.url)),bCt=F.lazy(()=>mn(()=>import("./index-DddM0S9V.js"),__vite__mapDeps([52,53,10,50,54,55,44,12,9,11,7,8,13,14,15,16,17,18,56,48,3,2,57,6,58,59,29,19,20,60,61,62,63,64,4,65]),import.meta.url)),wCt=F.lazy(()=>mn(()=>import("./index-C39X5nSU.js"),__vite__mapDeps([66,67,22,23,9,68]),import.meta.url)),TCt=F.lazy(()=>mn(()=>import("./index-CJRh33cD.js"),__vite__mapDeps([69,53,10,70,71,72,17,6,9,11,73,13,74,75,29,76,77,78,16,12,7,8,14,15,18,79,80,81,44,20,82,3,2,83,84,30,22,23,85,86,87,24,25,43,45,88,1,48,63]),import.meta.url)),xCt=F.lazy(()=>mn(()=>import("./detail-CESxJL-2.js").then(e=>e.d),__vite__mapDeps([89,53,10,19,20,21,6,18,22,23,28,82,39,40,51]),import.meta.url)),SCt=F.lazy(()=>mn(()=>import("./index-rfYAdo12.js"),[],import.meta.url)),_Ct=F.lazy(()=>mn(()=>import("./index-DI-gzmKu.js"),__vite__mapDeps([90,1,73,13]),import.meta.url)),CCt=F.lazy(()=>mn(()=>import("./index-Bu9Gdw_x.js"),__vite__mapDeps([91,92,93,94,61,95]),import.meta.url)),ECt=F.lazy(()=>mn(()=>import("./index-RLS72NCQ.js"),__vite__mapDeps([96,61,77,47,95,27]),import.meta.url)),ACt=F.lazy(()=>mn(()=>import("./index-CpNJmBAT.js"),__vite__mapDeps([97,95]),import.meta.url)),RCt=F.lazy(()=>mn(()=>import("./index-DNRVE0NP.js"),__vite__mapDeps([98,32,33,34,35,36,99,71,72,40,25,6,57]),import.meta.url)),kCt=F.lazy(()=>mn(()=>import("./index-B2x_NkGk.js"),__vite__mapDeps([100,93]),import.meta.url)),DCt=F.lazy(()=>mn(()=>import("./index-BcsyQdON.js"),__vite__mapDeps([101,92,93,94,61,95]),import.meta.url)),OCt=F.lazy(()=>mn(()=>import("./index-DFCC9v5j.js").then(e=>e.a2),__vite__mapDeps([102,103]),import.meta.url)),LCt=F.lazy(()=>mn(()=>import("./index-DWTs3F9i.js"),__vite__mapDeps([104,53,10,105,106,107,62,9,108,12,11,45,7,8,13,14,15,16,17,18,28,109,110,4,6,88,23]),import.meta.url));function oce(){const e=_l(),{session:t}=E0(),{wallet:n}=e0(),r=t.user&&t.user.did;return F.useEffect(()=>{const i=fw();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),F.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function ICt(){var a;const{t:e}=ho(),{node:t,session:n}=oce(),r=yi();F.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),F.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(sa,{});if(t.loading||n.loading)return I.jsx(ra,{children:i});if(!t.info.initialized)return A8e.getServerAuthMethod(t.info)==="nft"?I.jsx(uL,{action:"verify-owner"}):I.jsx(ra,{children:I.jsx(F5t,{})});if(t.info.upgradeSessionId)return I.jsx(ra,{children:I.jsx(cle,{})});if(!n.user)return I.jsx(fL,{loadingEle:i});const o=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(S8t,{children:I.jsxs(cCt,{children:[I.jsx(K5t,{}),I.jsx(nxt,{}),I.jsx(E8t,{}),I.jsx(F.Suspense,{fallback:o,children:I.jsxs(I4,{children:[I.jsx(sr,{path:"/dashboard",element:I.jsx(Xo,{fullWidth:!0,title:"Dashboard",children:I.jsx(mCt,{})})}),I.jsx(sr,{path:"/blocklets",element:I.jsx(Xo,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(gCt,{})})}),I.jsx(sr,{path:"/blocklets/:did/:tab",element:I.jsx(Xo,{fullWidth:!0,title:"Blocklets",children:I.jsx(xCt,{})})}),I.jsx(sr,{path:"/settings/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.setting"),children:I.jsx(bCt,{})})}),I.jsx(sr,{path:"/eula",element:I.jsx(Xo,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(SCt,{})})}),I.jsx(sr,{path:"/store",element:I.jsx(Xo,{fullWidth:!0,title:e("common.store"),children:I.jsx(vCt,{})})}),I.jsx(sr,{path:"/console",element:I.jsx(Xo,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(OCt,{})})}),I.jsx(sr,{path:"/notifications",element:I.jsx(Xo,{children:I.jsx(_Ct,{})})}),I.jsx(sr,{path:"/team/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.team"),children:I.jsx(TCt,{})})}),I.jsx(sr,{path:"/logs/:name",element:I.jsx(Xo,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(wCt,{})})}),I.jsx(sr,{path:"/analytics/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(LCt,{})})}),I.jsx(sr,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(sr,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(sr,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(sr,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(sr,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(sr,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(sr,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(sr,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(sr,{path:"*",element:I.jsx(kCt,{})})]})})]})})}function Qc({children:e}){const{node:t,session:n}=oce();return t.loading||!n.initialized&&n.loading?I.jsx(ra,{children:I.jsx(sa,{})}):t.info.upgradeSessionId?I.jsx(ra,{children:I.jsx(cle,{})}):e}function PCt(){const{changeLocale:e}=ho(),t=nce();F.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(F.Suspense,{fallback:n,children:I.jsxs(I4,{children:[I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Qc,{children:I.jsx(CCt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Qc,{children:I.jsx(ECt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Qc,{children:I.jsx(ACt,{})})}),I.jsx(sr,{path:"/accept-server",element:I.jsx(Qc,{children:I.jsx(uL,{action:"accept-server"})})}),I.jsx(sr,{path:"/launch-blocklet/*",element:I.jsx(Qc,{children:I.jsx(pCt,{children:I.jsx(RCt,{})})})}),I.jsx(sr,{path:"/blocklets/restore/*",element:I.jsx(Qc,{children:I.jsx(ice,{children:I.jsx(yCt,{})})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Qc,{children:I.jsx(DCt,{})})}),I.jsx(sr,{path:"/*",element:I.jsx(ICt,{})})]})})}function MCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(Y7,{}),I.jsx(mY,{history:aCe,basename:e,children:I.jsx(pxt,{children:I.jsx(PCt,{})})})]})}const NCt=kJ(document.getElementById("root"));NCt.render(I.jsx(MCt,{}));const pG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";Rye(`${pG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:pG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{HD as $,fi as A,Ds as B,sa as C,d9 as D,bY as E,gn as F,Tx as G,Ms as H,NL as I,Fat as J,pft as K,pQ as L,J8t as M,V8t as N,fl as O,Y as P,ct as Q,zk as R,YD as S,iue as T,J1 as U,yw as V,vL as W,ra as X,kc as Y,I2e as Z,ylt as _,Yi as a,HEt as a$,Qp as a0,gO as a1,Ln as a2,ro as a3,E5 as a4,QTt as a5,yAt as a6,mOe as a7,Ok as a8,SOe as a9,iAt as aA,T5 as aB,Fle as aC,$dt as aD,NOe as aE,aCt as aF,aO as aG,Nie as aH,fG as aI,WEt as aJ,pae as aK,ma as aL,po as aM,aCe as aN,Mdt as aO,bk as aP,qEt as aQ,FDe as aR,nAt as aS,G_t as aT,oO as aU,zEt as aV,cAt as aW,Pdt as aX,lQ as aY,eQ as aZ,uLe as a_,gQ as aa,Que as ab,jAt as ac,A8e as ad,yL as ae,mO as af,BAt as ag,_Et as ah,NAt as ai,fw as aj,nce as ak,QEt as al,aI as am,sL as an,P7 as ao,I4 as ap,sr as aq,Gs as ar,pu as as,vl as at,gz as au,OAt as av,ND as aw,E0 as ax,H8t as ay,Mo as az,ui as b,dl as b$,Lk as b0,H7e as b1,rke as b2,Bdt as b3,uAt as b4,Jle as b5,DCe as b6,Lct as b7,j6 as b8,q6 as b9,Bre as bA,$re as bB,s9 as bC,g9 as bD,Iie as bE,Qg as bF,XXe as bG,gie as bH,l9 as bI,Ple as bJ,iCt as bK,W8t as bL,FEt as bM,G8t as bN,CAt as bO,IEt as bP,tAt as bQ,bEt as bR,pa as bS,kt as bT,bc as bU,me as bV,i4e as bW,Nt as bX,un as bY,an as bZ,pn as b_,_Q as ba,en as bb,Wr as bc,Ju as bd,vh as be,eAt as bf,N5 as bg,nY as bh,ea as bi,CQ as bj,ig as bk,mAt as bl,Yie as bm,LAt as bn,Nf as bo,jQ as bp,mn as bq,$Et as br,S7e as bs,rCt as bt,kb as bu,gY as bv,gAt as bw,a9 as bx,Zh as by,Vg as bz,iw as c,iEt as c$,Pt as c0,sn as c1,hu as c2,wke as c3,pt as c4,Wn as c5,nE as c6,K7 as c7,Fr as c8,G7 as c9,G5t as cA,dw as cB,FAt as cC,LGe as cD,fCt as cE,oAt as cF,Udt as cG,DAt as cH,XEt as cI,If as cJ,yi as cK,hi as cL,BD as cM,BEt as cN,PEt as cO,MEt as cP,Dle as cQ,uxt as cR,pk as cS,Ui as cT,QCt as cU,Dm as cV,e1 as cW,mct as cX,mt as cY,bre as cZ,$Ct as c_,tEt as ca,kEt as cb,Ndt as cc,tae as cd,Ole as ce,sAt as cf,D5 as cg,uG as ch,nCt as ci,O7e as cj,I7e as ck,qdt as cl,kOe as cm,a7e as cn,pue as co,_8t as cp,HIe as cq,_t as cr,tIe as cs,Pr as ct,Th as cu,ou as cv,gi as cw,e0 as cx,Bg as cy,Zu as cz,MAt as d,lZ as d$,Gne as d0,V5 as d1,r8t as d2,T3e as d3,pAt as d4,Qa as d5,W7 as d6,gc as d7,b6 as d8,qa as d9,pd as dA,ey as dB,RJe as dC,sX as dD,Kn as dE,eEt as dF,eh as dG,lX as dH,Qt as dI,wu as dJ,z9 as dK,jZe as dL,moe as dM,VEt as dN,JRe as dO,m3 as dP,n5e as dQ,hc as dR,Ro as dS,AZ as dT,A5e as dU,N6 as dV,os as dW,t0 as dX,F6 as dY,n0 as dZ,J7 as d_,Ai as da,Rt as db,ZX as dc,GRe as dd,Ua as de,EEt as df,AEt as dg,GD as dh,KDe as di,K1 as dj,v3 as dk,vQ as dl,YOe as dm,mF as dn,hF as dp,HOe as dq,fEt as dr,on as ds,jCt as dt,UCt as du,FCt as dv,qCt as dw,Fh as dx,qD as dy,O5 as dz,Y_t as e,xie as e$,F6e as e0,j6e as e1,J2e as e2,$Y as e3,Eg as e4,HCt as e5,GCt as e6,WCt as e7,zCt as e8,a4e as e9,Hc as eA,OCe as eB,sEt as eC,lEe as eD,uEe as eE,EEe as eF,lEt as eG,nr as eH,Op as eI,URe as eJ,Dv as eK,R7e as eL,bx as eM,_ke as eN,Lm as eO,UDe as eP,BOe as eQ,b3 as eR,cLe as eS,cm as eT,OLe as eU,Jl as eV,a3 as eW,o3 as eX,HLe as eY,FLe as eZ,pEt as e_,wg as ea,jh as eb,KB as ec,VCt as ed,Wf as ee,M4e as ef,M7 as eg,MZ as eh,ZCt as ei,KCt as ej,g6e as ek,mc as el,bZ as em,j4e as en,v6e as eo,YCt as ep,tE as eq,p6e as er,m6e as es,bl as et,y6e as eu,e4e as ev,g6 as ew,V5e as ex,JCt as ey,$5e as ez,Oc as f,lk as f$,Ls as f0,UE as f1,Z7 as f2,oZ as f3,fQ as f4,JGe as f5,qh as f6,CZ as f7,i6 as f8,Cg as f9,NEt as fA,mI as fB,UQ as fC,BCt as fD,yc as fE,qYe as fF,Dc as fG,GEt as fH,yd as fI,JEt as fJ,REt as fK,ZEt as fL,Zie as fM,Uoe as fN,C5t as fO,E9 as fP,Ase as fQ,dae as fR,E6 as fS,$2t as fT,Die as fU,s5e as fV,NZ as fW,X7 as fX,Gn as fY,M6 as fZ,cOe as f_,$7 as fa,T3 as fb,TF as fc,Jf as fd,di as fe,eat as ff,jo as fg,m0 as fh,tn as fi,$g as fj,THe as fk,KIe as fl,kJ as fm,o0 as fn,Qn as fo,nte as fp,Qee as fq,O6 as fr,mft as fs,dZ as ft,v6 as fu,g3 as fv,g7 as fw,$Q as fx,Eee as fy,q5t as fz,Wt as g,vEe as g$,w8e as g0,ZL as g1,rEt as g2,tI as g3,eI as g4,I5 as g5,TEt as g6,jL as g7,my as g8,WL as g9,L6 as gA,Nre as gB,rk as gC,S_e as gD,ik as gE,Mct as gF,ak as gG,LEt as gH,vie as gI,lft as gJ,WD as gK,IAt as gL,dAt as gM,oCt as gN,Q8t as gO,jEt as gP,KEt as gQ,YEt as gR,R5 as gS,X8t as gT,eCt as gU,Hre as gV,Wre as gW,zre as gX,iie as gY,kZ as gZ,l3 as g_,OHe as ga,i0 as gb,Kle as gc,C5 as gd,Eot as ge,Bot as gf,Cne as gg,Mk as gh,mit as gi,Wie as gj,ed as gk,A5 as gl,z1 as gm,B6 as gn,wx as go,$6 as gp,iAe as gq,nQ as gr,xCe as gs,PX as gt,v2e as gu,UEt as gv,aAt as gw,tSt as gx,Pg as gy,gCe as gz,gL as h,p9 as h$,w3e as h0,Mwt as h1,jwt as h2,zwt as h3,Kwt as h4,Zwt as h5,LTt as h6,ITt as h7,gle as h8,yle as h9,XOe as hA,dEt as hB,eTt as hC,pE as hD,mE as hE,fle as hF,a5e as hG,zD as hH,PB as hI,q8t as hJ,z8t as hK,j8t as hL,$8t as hM,rAt as hN,Ybt as hO,hAt as hP,lAt as hQ,YH as hR,xEt as hS,Z8t as hT,Vct as hU,rQ as hV,EAt as hW,U8t as hX,K8t as hY,Y8t as hZ,Iot as h_,Vze as ha,dnt as hb,wI as hc,Ih as hd,vEt as he,Jze as hf,DEt as hg,mEt as hh,fAt as hi,FV as hj,l1 as hk,tPe as hl,VQ as hm,w3 as hn,hEt as ho,Y1 as hp,XCt as hq,R5e as hr,aEt as hs,SCe as ht,C7e as hu,A9e as hv,x9e as hw,uEt as hx,R9e as hy,cEt as hz,bh as i,FIe as i0,TAt as i1,wAt as i2,FQ as i3,gne as i4,RAt as i5,XX as i6,I as j,Rf as k,OEt as l,Xt as m,Za as n,q5 as o,QA as p,ho as q,F as r,tr as s,u8t as t,_l as u,X_t as v,hDe as w,B9 as x,hO as y,Ec as z};
|
|
2516
|
+
`;function E8t(){const{t:e}=ho(),{session:t}=E0(),{info:n,refresh:r}=_l();return Yi(ui.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(fi.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Yi(gn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Yi(gn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var xt={},A8t=Iie;function R8t(e){return e&&e.length?A8t(e):[]}var gue=R8t;const RAt=Wt(gue);class k8t{constructor(t){this.value=t,this.next=void 0}}let D8t=class{constructor(){this.clear()}enqueue(t){const n=new k8t(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var O8t=D8t;const L8t=O8t,I8t=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new L8t;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var P8t=I8t,wI={};Object.defineProperty(wI,"__esModule",{value:!0});const M8t=e=>!!(e!=null&&e.main);var DAt=wI.default=M8t,D0=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.isPackBlocklet=xt.isGatewayBlocklet=oCt=xt.isAccessible=xt.isRunning=xt.isBeforeInstalled=iCt=xt.isInProgress=rCt=xt.getBlockletServices=nCt=xt.getBlockletAppIdList=eCt=xt.getRolesFromAuthConfig=xt.isPreferenceKey=kb=xt.isExternalBlocklet=xt.getBlockletChainInfo=xt.getChainInfo=xt.getConnectAppUrl=xt.getParentComponentName=xt.filterComponentsV2=xt.findComponentByIdV2=xt.findComponentV2=xt.findComponentById=xt.findComponent=xt.getComponentBundleId=xt.getComponentName=xt.getComponentId=Vue=xt.replaceSlotToIp=xt.getComponentWhoCanAccess=Q8t=xt.getWhoCanAccess=X8t=xt.findServiceFromMeta=xt.findWebInterfacePort=Z8t=xt.findWebInterface=xt.fixBlockletStatus=Y8t=xt.getAppDescription=J8t=xt.getDisplayName=K8t=xt.getAppName=G8t=xt.hasRunnableComponent=xt.wipeSensitiveData=j8t=xt.isEnvShareable=xt.isEnvShareableToClient=z8t=xt.getComponentMissingConfigs=V8t=xt.getAppMissingConfigs=q8t=xt.getSharedConfigObj=W8t=xt.isDeletableBlocklet=xt.forEachComponentV2Sync=xt.forEachComponentV2=U8t=xt.forEachChildSync=xt.forEachChild=Nf=xt.forEachBlockletSync=xt.forEachBlocklet=xt.isFreeComponent=H8t=xt.isFreeBlocklet=xt.getAppUrl=void 0;xt.hasResourceType=$8t=xt.hasStartEngine=void 0;const _f=D0(E6),N8t=D0(gue),sG=D0(vie),yue=D0(P8t),B8t=D0(gn),Jn=ui,TI=D0(wI);var $8t=xt.hasStartEngine=TI.default;const{NODE_SERVICES:l4,SLOT_FOR_IP_DNS_SITE:F8t,WHO_CAN_ACCESS:u4,WHO_CAN_ACCESS_PREFIX_ROLES:lG}=B8t.default,vy=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.did:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.did:""}`;xt.getComponentId=vy;const vue=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.name:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.name:""}`;xt.getComponentName=vue;const bue=e=>`${e.meta.bundleName}@${e.meta.version}`;xt.getComponentBundleId=bue;const wue=e=>{if(!e)return"";const t=e.split("/");return t.pop(),!t.length||(t[t.length-1].startsWith("@")&&t.pop(),!t.length)?"":t.join("/")};xt.getParentComponentName=wue;const uc=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i,params:o,_parent:a,_root:s,_level:l=0,_tasks:c,_ancestors:u=[],_limit:d}={})=>{const p=s||a||e,g=vy(e,u),v=u.concat(e);if(i){const x=t(e,{parent:a,root:p,level:l,params:o,ancestors:u,id:g});if(e.children)for(const D of e.children)uc(D,t,{sync:i,params:x,_parent:e,_root:p,_level:l+1,_ancestors:v});return null}if(!n)return new Promise(async(x,D)=>{try{const L=await t(e,{parent:a,root:p,level:l,ancestors:u,params:o,id:g});if(e.children)for(const P of e.children)await uc(P,t,{params:L,_parent:e,_root:p,_level:l+1,_ancestors:v});x(null)}catch(L){D(L)}});const b=d||(0,yue.default)(r),E=c||[];if(E.push(b(()=>t(e,{parent:a,root:p,level:l,ancestors:u,id:g}))),e.children)for(const x of e.children)uc(x,t,{parallel:n,_parent:e,_root:p,_level:l+1,_tasks:E,_ancestors:v,_limit:b});return c?null:Promise.all(E)};xt.forEachBlocklet=uc;const Mh=(e,t)=>uc(e,t,{sync:!0});var Nf=xt.forEachBlockletSync=Mh;const xI=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i}={})=>{if(i){if(e.children)for(const s of e.children)t(s);return null}if(!n)return new Promise(async(s,l)=>{try{if(e.children)for(const c of e.children)await t(c);s(null)}catch(c){l(c)}});const o=(0,yue.default)(r),a=[];if(e.children)for(const s of e.children)a.push(o(()=>t(s)));return Promise.all(a)};xt.forEachComponentV2=xI;const SI=(e,t)=>xI(e,t,{sync:!0});xt.forEachComponentV2Sync=SI;const _I=(e,t,n)=>uc(e,(r,i)=>i.level===0?{}:t(r,i),n);xt.forEachChild=_I;const CI=(e,t)=>_I(e,t,{sync:!0});var U8t=xt.forEachChildSync=CI;const vw=(e,t,{_ancestors:n=[],returnAncestors:r=!1}={})=>{if(!t)return null;if(t(e,{ancestors:n}))return r?{component:e,ancestors:n}:e;for(const i of e.children||[]){const o=n.concat(e),a=vw(i,t,{_ancestors:o,returnAncestors:r});if(a)return a}return null};xt.findComponent=vw;const Tue=(e,t,{returnAncestors:n=!1}={})=>(Array.isArray(t)&&(t=t.join("/")),vw(e,(r,{ancestors:i})=>{const o=vy(r,i);return t===o},{returnAncestors:n}));xt.findComponentById=Tue;const EI=(e,t)=>{if(!t)return null;for(const n of e.children||[])if(t(n,e))return n;return null};xt.findComponentV2=EI;const xue=(e,t)=>t?(Array.isArray(t)&&(t=t.join("/")),EI(e,(n,r)=>{if(t.includes("/")){const i=vy(n,[r]);return t===i}return t===n.meta.did})):null;xt.findComponentByIdV2=xue;const Sue=(e,t)=>{if(!t)return[];const n=[];for(const r of e.children||[])t(r,e)&&n.push(r);return n};xt.filterComponentsV2=Sue;const _ue=e=>!!e&&!!(e.key||e.name)&&!e.secure&&e.shared!==!1&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];xt.isEnvShareableToClient=_ue;const c4=e=>!!e&&!!(e.key||e.name)&&!e.secure&&!!e.shared&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];var j8t=xt.isEnvShareable=c4;const bw=(e,t)=>{const n={};return!e||!t||(Array.isArray(e.configs)&&e.configs.forEach(({key:r,value:i,secure:o})=>{if(!c4({key:r,secure:o,shared:!0}))return;const a=(e.configObj||{})[r]||i,s=(t.configs||[]).find(l=>l.key===r);(!s||c4(s)||!s.value&&!(t.configObj||{})[s.key])&&(n[r]=a)}),(e.configs||[]).forEach(({key:r,value:i})=>{[Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(r)&&(n[Jn.CHAIN_PROP_MAP[r]]=i)})),n};var q8t=xt.getSharedConfigObj=bw;const ww=e=>e.key.startsWith(Jn.BLOCKLET_PREFERENCE_PREFIX)===!0;xt.isPreferenceKey=ww;const Cue=(e,t)=>!!(e.required&&(!e.value&&!t[e.key]||Object.values(Jn.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(t).includes(e.key)&&!t[e.key])),Eue=(e={})=>{const t=[];return SI(e,n=>{var o;if(((o=n.meta)==null?void 0:o.group)===Jn.BlockletGroup.gateway)return;const r=n.configs||[],i=bw(e,n);r.forEach(a=>{Cue(a,i)&&t.push({did:n.meta.did,key:a.key,description:a.description})})}),t.filter(n=>!ww(n))};var V8t=xt.getAppMissingConfigs=Eue;const Aue=(e={},t={})=>{const n=[],r=e.configs||[],i=bw(t,e);return r.forEach(o=>{Cue(o,i)&&n.push({did:e.meta.did,key:o.key,description:o.description})}),n};var z8t=xt.getComponentMissingConfigs=Aue;const Rue=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0;var H8t=xt.isFreeBlocklet=Rue;const kue=e=>!e.payment||!e.payment.componentPrice?!0:!e.payment.componentPrice.length;xt.isFreeComponent=kue;const Due=e=>e&&(uc(e,t=>{t.configs&&(t.configs=t.configs.filter(n=>!ww(n)),t.configs.forEach(n=>{n.secure&&(n.value=n.value?"__encrypted__":"")})),(t.environments||[]).forEach(n=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(n.key)&&(n.value="__encrypted__")}),(t.migratedFrom||[]).forEach(n=>{n.appSk="__encrypted__"}),delete e.configObj,delete e.environmentObj},{sync:!0}),e);xt.wipeSensitiveData=Due;const Oue=e=>{if(!e)return!1;const t=e.environments.find(n=>n.key==="BLOCKLET_DELETABLE");return t?t.value==="yes":!0};var W8t=xt.isDeletableBlocklet=Oue;const Lue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.gateway;xt.isGatewayBlocklet=Lue;const Iue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.pack;xt.isPackBlocklet=Iue;const Pue=e=>{let t=!1;return Mh(e,n=>{n.meta.group!==Jn.BlockletGroup.gateway&&(t=!0)}),t};var G8t=xt.hasRunnableComponent=Pue;const f4=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_NAME");i&&i.value&&(r=i.value)}return r||n.title||n.name};var K8t=xt.getAppName=f4,J8t=xt.getDisplayName=f4;const Mue=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_DESCRIPTION");i&&i.value&&(r=i.value)}return r||n.description||n.name};var Y8t=xt.getAppDescription=Mue;function Nue(e){var r,i,o;const t=(o=(i=(r=e==null?void 0:e.site)==null?void 0:r.domainAliases)==null?void 0:i.sort((a,s)=>{var l,c,u,d;return(l=a.accessibility)!=null&&l.accessible&&((c=s.accessibility)!=null&&c.accessible)?+a.isProtected-+s.isProtected:+((u=s.accessibility)==null?void 0:u.accessible)-+((d=a.accessibility)==null?void 0:d.accessible)}))==null?void 0:o.map(a=>{var c;const s=(c=a==null?void 0:a.domainStatus)!=null&&c.isHttps?"https://":"http://",l=a==null?void 0:a.value;return`${s}${l}`}).filter(Boolean);return t==null?void 0:t[0]}xt.getAppUrl=Nue;const Bue=e=>{e&&(Mh(e,t=>{t.status=(0,Jn.fromBlockletStatus)(t.status),t.source!==void 0&&(t.source=(0,Jn.fromBlockletSource)(t.source))}),e.settings&&(e.settings.children||[]).forEach(t=>{Mh(t,n=>{n.status=(0,Jn.fromBlockletStatus)(n.status),n.source!==void 0&&(n.source=(0,Jn.fromBlockletSource)(n.source))})}))};xt.fixBlockletStatus=Bue;const Tw=e=>{if(!e)return null;const t=e.meta||e||{},{interfaces:n=[]}=t;return Array.isArray(n)?n.find(r=>r.type===Jn.BLOCKLET_INTERFACE_TYPE_WEB):null};var Z8t=xt.findWebInterface=Tw;const $ue=e=>{if(!e)return null;const t=Tw(e),{ports:n}=e;return!t||!n?null:n[t.port]};xt.findWebInterfacePort=$ue;const xw=(e,t)=>{const n=[t];t===l4.AUTH&&n.push(l4.AUTH_SERVICE);const r=Tw(e);return r?(r.services||[]).find(i=>n.includes(i.name)):null};var X8t=xt.findServiceFromMeta=xw;const Fue=e=>{if(!e)return u4.ALL;if((0,_f.default)(e,"settings.whoCanAccess"))return e.settings.whoCanAccess;const t=xw(e.meta,l4.AUTH);return(0,_f.default)(t,"config.whoCanAccess")?t.config.whoCanAccess:u4.ALL};var Q8t=xt.getWhoCanAccess=Fue;const Uue=(e,t)=>{const n=(e.configs||[]).find(i=>i.key===Jn.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(n)return n.value;if(t&&(0,_f.default)(t,"settings.whoCanAccess")&&(0,_f.default)(t,"settings.whoCanAccess")!==u4.ALL)return(0,_f.default)(t,"settings.whoCanAccess");const r=xw(e.meta,l4.AUTH);return(0,_f.default)(r,"config.whoCanAccess")?r.config.whoCanAccess:u4.ALL};xt.getComponentWhoCanAccess=Uue;const jue=({request:e,baseUrl:t})=>{const n=e.headers["x-blocklet-did"]||"",r=e.headers["x-blocklet-real-did"]||"",i=e.headers["x-path-prefix"]||"/",o=e.headers["x-group-path-prefix"]||"/";let a=t;return n!==r&&i!==o&&(a=(0,sG.default)((0,sG.default)(a,"/").replace(i,o),"")),a};xt.getConnectAppUrl=jue;const que=(e,t)=>{const n=(t||"").includes(":")?":":/\./;return(e||"").replace(F8t,(t||"").replace(new RegExp(n,"g"),"-"))};var Vue=xt.replaceSlotToIp=que;const b1=e=>{const t=Object.entries(Jn.CHAIN_INFO_CONFIG).reduce((n,r)=>{const[i,[o,a]]=r;return n[o]=(0,_f.default)(e,i)||a,n},{});return t.type==="ethereum"&&t.id==="none"&&(t.id="1"),t};xt.getChainInfo=b1;const zue=e=>{const t=b1({});if(!e)return t;const n=b1(e.configObj);if(n.host!=="none")return n;let r;return CI(e,i=>{if(r&&r.host!=="none")return;const o=b1(i.configObj);o.host!=="none"&&(r=o)}),r||t};xt.getBlockletChainInfo=zue;const Hue=e=>!!(e!=null&&e.controller);var kb=xt.isExternalBlocklet=Hue;const Wue=e=>e.whoCanAccess.startsWith(lG)?e.whoCanAccess.substring(lG.length).split(","):[];var eCt=xt.getRolesFromAuthConfig=Wue;const tCt=e=>{const t=Array.isArray(e.migratedFrom)?e.migratedFrom.map(n=>n.appDid):[];return(0,N8t.default)([e.appDid,e.appPid,...t].filter(Boolean))};var nCt=xt.getBlockletAppIdList=tCt;const Gue=e=>{const t=[];return e&&Mh(e,n=>{var i;(((i=n.meta)==null?void 0:i.interfaces)||[]).filter(o=>o.type===Jn.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(o=>{const a=o.port||{};t.push({name:o.name,protocol:o.protocol,port:Number(a.external),upstreamPort:Number((n.ports||{})[a.internal])})})}),t};var rCt=xt.getBlockletServices=Gue;const Kue=e=>[Jn.BlockletStatus.downloading,Jn.BlockletStatus.waiting,Jn.BlockletStatus.starting,Jn.BlockletStatus.installing,Jn.BlockletStatus.stopping,Jn.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(e);var iCt=xt.isInProgress=Kue;const Jue=e=>[Jn.BlockletStatus.added,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,Jn.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(e);xt.isBeforeInstalled=Jue;const Yue=e=>[Jn.BlockletStatus.running,"running"].includes(e);xt.isRunning=Yue;const Zue=e=>[Jn.BlockletStatus.running,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,"running","waiting","downloading"].includes(e);var oCt=xt.isAccessible=Zue;const Xue=(e,{type:t,did:n}={type:"",did:""})=>{var r,i,o;return e?!(0,TI.default)(e.meta)&&((o=(i=(r=e.meta)==null?void 0:r.resource)==null?void 0:i.bundles)==null?void 0:o.length)>0&&(e.meta.resource.bundles||[]).some(a=>a.type===t&&a.did===n):!1};xt.hasResourceType=Xue;xt.default={isFreeBlocklet:Rue,isFreeComponent:kue,forEachBlocklet:uc,forEachBlockletSync:Mh,forEachChild:_I,forEachChildSync:CI,forEachComponentV2:xI,forEachComponentV2Sync:SI,isDeletableBlocklet:Oue,getSharedConfigObj:bw,getAppMissingConfigs:Eue,getComponentMissingConfigs:Aue,isEnvShareableToClient:_ue,isEnvShareable:c4,wipeSensitiveData:Due,hasRunnableComponent:Pue,getAppName:f4,getAppDescription:Mue,getAppUrl:Nue,getDisplayName:f4,fixBlockletStatus:Bue,findWebInterface:Tw,findWebInterfacePort:$ue,findServiceFromMeta:xw,getWhoCanAccess:Fue,getComponentWhoCanAccess:Uue,replaceSlotToIp:que,getComponentId:vy,getComponentName:vue,getComponentBundleId:bue,findComponent:vw,findComponentById:Tue,findComponentV2:EI,findComponentByIdV2:xue,filterComponentsV2:Sue,getParentComponentName:wue,getConnectAppUrl:jue,getChainInfo:b1,getBlockletChainInfo:zue,isExternalBlocklet:Hue,isPreferenceKey:ww,getRolesFromAuthConfig:Wue,getBlockletServices:Gue,isInProgress:Kue,isBeforeInstalled:Jue,isRunning:Yue,isAccessible:Zue,isGatewayBlocklet:Lue,isPackBlocklet:Iue,hasStartEngine:TI.default,hasResourceType:Xue};const Que=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},OAt=(e,t,n)=>{const r=Que(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},aCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(gn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Vue(r.value,n),r}catch{return r}}).filter(Boolean):e},sCt=e=>{const t={didSpace:null};return Nf(e,n=>{var r,i;t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},uG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=aO(i.from.pathPrefix||"/")}),e.site.rules=Nie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await aCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Nf(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Nf(n,(o,{id:a})=>{i[a]=o}),Nf(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=sCt(e)},cG="arcblock",LAt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:cG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:cG)},IAt=e=>!zk(e==null?void 0:e.controller);let Q8=null;const lCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await ND.get(t)).data.address}catch{return null}},fG=()=>(Q8||(Q8=lCt()),Q8),ece=F.createContext({}),{Provider:uCt,Consumer:PAt}=ece,dG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function cCt({children:e}){const t=_l(),n=iw(),[r,i]=F.useState(null),[o,a]=F.useState(!1),[s,l]=F.useState([]),[c,u]=F.useState([]),[d,p]=F.useState(!1),g=(P,q)=>{kb(P)?u(q):l(q)},v=4,b=async({silent:P=!0,retries:q=v,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await uG(G,{getIP:fG});const ne=K.filter(G=>!kb(G)),le=K.filter(kb);l(G=>dG(G,ne,M)),u(G=>dG(G,le,M)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},E=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await uG(q,{getIP:fG}),g(q,M=>M.some(j=>j.meta.did===q.meta.did)?M.map(j=>j.meta.did===q.meta.did?q:j):[...M,q])}catch(q){i(q)}},x=P=>{t.refresh(),E(P)};F.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Nf(P,(M,{id:j})=>{q[j]=ui.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Nf(j,(K,{id:ne})=>{q[ne]&&(K.status=q[ne])}),j)))};Yi(ui.BlockletEvents.added,P=>{P.status=ui.fromBlockletStatus(P.status),g(P,q=>[...q,P])}),Yi(ui.BlockletEvents.removed,P=>{t.refresh(),g(P,q=>q.filter(M=>M.meta.did!==P.meta.did))}),Yi(ui.BlockletEvents.statusChange,D),Yi(ui.BlockletEvents.installed,x),Yi(ui.BlockletEvents.upgraded,x),Yi(ui.BlockletEvents.updated,E),Yi(ui.BlockletEvents.startFailed,E),Yi(ui.BlockletEvents.reloaded,E);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(uCt,{value:{blocklets:L},children:e})}function MAt(){const{blocklets:e}=F.useContext(ece);return e}const fCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},NAt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},BAt=async e=>{const t=Ndt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return tae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Udt(t)),n},tce=F.createContext({}),{Provider:dCt,Consumer:$At}=tce;function pCt({children:e}){const{session:t}=E0(),{t:n}=ho(),{api:r,info:i}=_l(),[o]=bY(),a=iw(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[v,b]=F.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),E=(le,G)=>b(N=>({...N,appDid:le,sessionId:G})),x=fCt({user:t.user,launchType:s,nftId:u}),[D,L]=F.useState(null),[P,q]=F.useState(!0),M=F.useMemo(()=>i?Que(i):"",[i]),j=async le=>{if(!le)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:le,attachConfig:!1}});if(!G)return null;const N=ui.BlockletStatus[G.status],T=!!u,f=N<ui.BlockletStatus.installed,h=N===ui.BlockletStatus.installed,w=N===ui.BlockletStatus.running;return b(C=>({...C,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:le,isFree:G},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!le)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&v.appDid&&(f=await j(v.appDid)),b(h=>({...h,...f,meta:le,isFree:G,launcherSession:N}))}catch(le){console.error(le),L(le.message)}finally{q(!1)}};F.useEffect(()=>{var le,G,N;((le=t==null?void 0:t.user)==null?void 0:le.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:N.nftId)!==u&&t.logout(),K()},[]),F.useEffect(()=>{P||!v.meta||(x?v.appDid&&j(v.appDid).catch(le=>{fi.error(le.message)}):(b(le=>({...le,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const ne={meta:v.meta,isFree:v.isFree,appDid:v.appDid,sessionId:v.sessionId,isInstalling:v.isInstalling,isInstalled:v.isInstalled,isExternal:v.isExternal,isRunning:v.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:E,launcherUrl:p,launcherSession:v.launcherSession,launcherSessionId:d};return I.jsx(dCt,{value:ne,children:e})}function FAt(){return F.useContext(tce)}function nce(){return new URLSearchParams(yi().search)}const rce=F.createContext(),{Provider:hCt,Consumer:UAt}=rce;function ice({children:e}){const n=nce().get("blocklet_meta_url"),r=G_t(async()=>{const{data:o}=await oO.get(n);return o});if(r.loading)return I.jsx(ra,{children:I.jsx(sa,{})});const i={meta:r.value,error:r.error};return I.jsx(hCt,{value:i,children:e})}ice.propTypes={children:Y.any.isRequired};function jAt(){return F.useContext(rce)}const mCt=F.lazy(()=>mn(()=>import("./index-CLLusFhD.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),gCt=F.lazy(()=>mn(()=>import("./index-BmYduQjf.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),yCt=F.lazy(()=>mn(()=>import("./index-DYIWxxvc.js"),__vite__mapDeps([31,32,33,34,35,36,6,37,38,39,40,41,12,9,11,25,18,17]),import.meta.url)),vCt=F.lazy(()=>mn(()=>import("./index-7VEn8pMG.js"),__vite__mapDeps([42,6,43,44,17,16,45,9,46,47,29,12,11,37,48,38,39,49,3,18,22,23,50,51,52]),import.meta.url)),bCt=F.lazy(()=>mn(()=>import("./index-CivlhCtE.js"),__vite__mapDeps([53,54,10,51,55,56,45,12,9,11,7,8,13,14,15,16,17,18,57,49,3,2,58,6,59,60,29,19,20,61,62,63,64,65,4,66]),import.meta.url)),wCt=F.lazy(()=>mn(()=>import("./index-D1IHJL8V.js"),__vite__mapDeps([67,68,22,23,9,69]),import.meta.url)),TCt=F.lazy(()=>mn(()=>import("./index-DyLmBsrc.js"),__vite__mapDeps([70,54,10,71,72,73,17,6,9,11,74,13,75,76,29,77,78,79,16,12,7,8,14,15,18,80,81,82,45,20,83,3,2,84,85,30,22,23,86,87,88,24,25,44,46,89,1,49,64]),import.meta.url)),xCt=F.lazy(()=>mn(()=>import("./detail-TSZFt17G.js").then(e=>e.d),__vite__mapDeps([90,54,10,19,20,21,6,18,22,23,28,83,40,41,52]),import.meta.url)),SCt=F.lazy(()=>mn(()=>import("./index-Z23xnW60.js"),[],import.meta.url)),_Ct=F.lazy(()=>mn(()=>import("./index-CwvvU6sG.js"),__vite__mapDeps([91,1,74,13]),import.meta.url)),CCt=F.lazy(()=>mn(()=>import("./index-tCtD2xpl.js"),__vite__mapDeps([92,93,94,95,62,96]),import.meta.url)),ECt=F.lazy(()=>mn(()=>import("./index-D2aPyZEh.js"),__vite__mapDeps([97,62,78,48,96,27]),import.meta.url)),ACt=F.lazy(()=>mn(()=>import("./index-ByTAZBnH.js"),__vite__mapDeps([98,96]),import.meta.url)),RCt=F.lazy(()=>mn(()=>import("./index-Bq3EqJlL.js"),__vite__mapDeps([99,32,33,34,35,36,100,72,73,41,25,6,58]),import.meta.url)),kCt=F.lazy(()=>mn(()=>import("./index-udgf9h3j.js"),__vite__mapDeps([101,94]),import.meta.url)),DCt=F.lazy(()=>mn(()=>import("./index-CJjmaZOb.js"),__vite__mapDeps([102,93,94,95,62,96]),import.meta.url)),OCt=F.lazy(()=>mn(()=>import("./index-CV5o0SmN.js").then(e=>e.a2),__vite__mapDeps([103,104]),import.meta.url)),LCt=F.lazy(()=>mn(()=>import("./index-BkfzVG1e.js"),__vite__mapDeps([105,54,10,106,107,108,63,9,109,12,11,46,7,8,13,14,15,16,17,18,28,110,111,4,6,89,23]),import.meta.url));function oce(){const e=_l(),{session:t}=E0(),{wallet:n}=e0(),r=t.user&&t.user.did;return F.useEffect(()=>{const i=fw();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),F.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function ICt(){var a;const{t:e}=ho(),{node:t,session:n}=oce(),r=yi();F.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),F.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(sa,{});if(t.loading||n.loading)return I.jsx(ra,{children:i});if(!t.info.initialized)return A8e.getServerAuthMethod(t.info)==="nft"?I.jsx(uL,{action:"verify-owner"}):I.jsx(ra,{children:I.jsx(F5t,{})});if(t.info.upgradeSessionId)return I.jsx(ra,{children:I.jsx(cle,{})});if(!n.user)return I.jsx(fL,{loadingEle:i});const o=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(S8t,{children:I.jsxs(cCt,{children:[I.jsx(K5t,{}),I.jsx(nxt,{}),I.jsx(E8t,{}),I.jsx(F.Suspense,{fallback:o,children:I.jsxs(I4,{children:[I.jsx(sr,{path:"/dashboard",element:I.jsx(Xo,{fullWidth:!0,title:"Dashboard",children:I.jsx(mCt,{})})}),I.jsx(sr,{path:"/blocklets",element:I.jsx(Xo,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(gCt,{})})}),I.jsx(sr,{path:"/blocklets/:did/:tab",element:I.jsx(Xo,{fullWidth:!0,title:"Blocklets",children:I.jsx(xCt,{})})}),I.jsx(sr,{path:"/settings/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.setting"),children:I.jsx(bCt,{})})}),I.jsx(sr,{path:"/eula",element:I.jsx(Xo,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(SCt,{})})}),I.jsx(sr,{path:"/store",element:I.jsx(Xo,{fullWidth:!0,title:e("common.store"),children:I.jsx(vCt,{})})}),I.jsx(sr,{path:"/console",element:I.jsx(Xo,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(OCt,{})})}),I.jsx(sr,{path:"/notifications",element:I.jsx(Xo,{children:I.jsx(_Ct,{})})}),I.jsx(sr,{path:"/team/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.team"),children:I.jsx(TCt,{})})}),I.jsx(sr,{path:"/logs/:name",element:I.jsx(Xo,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(wCt,{})})}),I.jsx(sr,{path:"/analytics/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(LCt,{})})}),I.jsx(sr,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(sr,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(sr,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(sr,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(sr,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(sr,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(sr,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(sr,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(sr,{path:"*",element:I.jsx(kCt,{})})]})})]})})}function Qc({children:e}){const{node:t,session:n}=oce();return t.loading||!n.initialized&&n.loading?I.jsx(ra,{children:I.jsx(sa,{})}):t.info.upgradeSessionId?I.jsx(ra,{children:I.jsx(cle,{})}):e}function PCt(){const{changeLocale:e}=ho(),t=nce();F.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(F.Suspense,{fallback:n,children:I.jsxs(I4,{children:[I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Qc,{children:I.jsx(CCt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Qc,{children:I.jsx(ECt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Qc,{children:I.jsx(ACt,{})})}),I.jsx(sr,{path:"/accept-server",element:I.jsx(Qc,{children:I.jsx(uL,{action:"accept-server"})})}),I.jsx(sr,{path:"/launch-blocklet/*",element:I.jsx(Qc,{children:I.jsx(pCt,{children:I.jsx(RCt,{})})})}),I.jsx(sr,{path:"/blocklets/restore/*",element:I.jsx(Qc,{children:I.jsx(ice,{children:I.jsx(yCt,{})})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Qc,{children:I.jsx(DCt,{})})}),I.jsx(sr,{path:"/*",element:I.jsx(ICt,{})})]})})}function MCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(Y7,{}),I.jsx(mY,{history:aCe,basename:e,children:I.jsx(pxt,{children:I.jsx(PCt,{})})})]})}const NCt=kJ(document.getElementById("root"));NCt.render(I.jsx(MCt,{}));const pG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";Rye(`${pG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:pG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{HD as $,fi as A,Ds as B,sa as C,d9 as D,bY as E,gn as F,Tx as G,Ms as H,NL as I,Fat as J,pft as K,pQ as L,J8t as M,V8t as N,fl as O,Y as P,ct as Q,zk as R,YD as S,iue as T,J1 as U,yw as V,vL as W,ra as X,kc as Y,I2e as Z,ylt as _,Yi as a,HEt as a$,Qp as a0,gO as a1,Ln as a2,ro as a3,E5 as a4,QTt as a5,yAt as a6,mOe as a7,Ok as a8,SOe as a9,iAt as aA,T5 as aB,Fle as aC,$dt as aD,NOe as aE,aCt as aF,aO as aG,Nie as aH,fG as aI,WEt as aJ,pae as aK,ma as aL,po as aM,aCe as aN,Mdt as aO,bk as aP,qEt as aQ,FDe as aR,nAt as aS,G_t as aT,oO as aU,zEt as aV,cAt as aW,Pdt as aX,lQ as aY,eQ as aZ,uLe as a_,gQ as aa,Que as ab,jAt as ac,A8e as ad,yL as ae,mO as af,BAt as ag,_Et as ah,NAt as ai,fw as aj,nce as ak,QEt as al,aI as am,sL as an,P7 as ao,I4 as ap,sr as aq,Gs as ar,pu as as,vl as at,gz as au,OAt as av,ND as aw,E0 as ax,H8t as ay,Mo as az,ui as b,dl as b$,Lk as b0,H7e as b1,rke as b2,Bdt as b3,uAt as b4,Jle as b5,DCe as b6,Lct as b7,j6 as b8,q6 as b9,Bre as bA,$re as bB,s9 as bC,g9 as bD,Iie as bE,Qg as bF,XXe as bG,gie as bH,l9 as bI,Ple as bJ,iCt as bK,W8t as bL,FEt as bM,G8t as bN,CAt as bO,IEt as bP,tAt as bQ,bEt as bR,pa as bS,kt as bT,bc as bU,me as bV,i4e as bW,Nt as bX,un as bY,an as bZ,pn as b_,_Q as ba,en as bb,Wr as bc,Ju as bd,vh as be,eAt as bf,N5 as bg,nY as bh,ea as bi,CQ as bj,ig as bk,mAt as bl,Yie as bm,LAt as bn,Nf as bo,jQ as bp,mn as bq,$Et as br,S7e as bs,rCt as bt,kb as bu,gY as bv,gAt as bw,a9 as bx,Zh as by,Vg as bz,iw as c,iEt as c$,Pt as c0,sn as c1,hu as c2,wke as c3,pt as c4,Wn as c5,nE as c6,K7 as c7,Fr as c8,G7 as c9,G5t as cA,dw as cB,FAt as cC,LGe as cD,fCt as cE,oAt as cF,Udt as cG,DAt as cH,XEt as cI,If as cJ,yi as cK,hi as cL,BD as cM,BEt as cN,PEt as cO,MEt as cP,Dle as cQ,uxt as cR,pk as cS,Ui as cT,QCt as cU,Dm as cV,e1 as cW,mct as cX,mt as cY,bre as cZ,$Ct as c_,tEt as ca,kEt as cb,Ndt as cc,tae as cd,Ole as ce,sAt as cf,D5 as cg,uG as ch,nCt as ci,O7e as cj,I7e as ck,qdt as cl,kOe as cm,a7e as cn,pue as co,_8t as cp,HIe as cq,_t as cr,tIe as cs,Pr as ct,Th as cu,ou as cv,gi as cw,e0 as cx,Bg as cy,Zu as cz,MAt as d,lZ as d$,Gne as d0,V5 as d1,r8t as d2,T3e as d3,pAt as d4,Qa as d5,W7 as d6,gc as d7,b6 as d8,qa as d9,pd as dA,ey as dB,RJe as dC,sX as dD,Kn as dE,eEt as dF,eh as dG,lX as dH,Qt as dI,wu as dJ,z9 as dK,jZe as dL,moe as dM,VEt as dN,JRe as dO,m3 as dP,n5e as dQ,hc as dR,Ro as dS,AZ as dT,A5e as dU,N6 as dV,os as dW,t0 as dX,F6 as dY,n0 as dZ,J7 as d_,Ai as da,Rt as db,ZX as dc,GRe as dd,Ua as de,EEt as df,AEt as dg,GD as dh,KDe as di,K1 as dj,v3 as dk,vQ as dl,YOe as dm,mF as dn,hF as dp,HOe as dq,fEt as dr,on as ds,jCt as dt,UCt as du,FCt as dv,qCt as dw,Fh as dx,qD as dy,O5 as dz,Y_t as e,xie as e$,F6e as e0,j6e as e1,J2e as e2,$Y as e3,Eg as e4,HCt as e5,GCt as e6,WCt as e7,zCt as e8,a4e as e9,Hc as eA,OCe as eB,sEt as eC,lEe as eD,uEe as eE,EEe as eF,lEt as eG,nr as eH,Op as eI,URe as eJ,Dv as eK,R7e as eL,bx as eM,_ke as eN,Lm as eO,UDe as eP,BOe as eQ,b3 as eR,cLe as eS,cm as eT,OLe as eU,Jl as eV,a3 as eW,o3 as eX,HLe as eY,FLe as eZ,pEt as e_,wg as ea,jh as eb,KB as ec,VCt as ed,Wf as ee,M4e as ef,M7 as eg,MZ as eh,ZCt as ei,KCt as ej,g6e as ek,mc as el,bZ as em,j4e as en,v6e as eo,YCt as ep,tE as eq,p6e as er,m6e as es,bl as et,y6e as eu,e4e as ev,g6 as ew,V5e as ex,JCt as ey,$5e as ez,Oc as f,lk as f$,Ls as f0,UE as f1,Z7 as f2,oZ as f3,fQ as f4,JGe as f5,qh as f6,CZ as f7,i6 as f8,Cg as f9,NEt as fA,mI as fB,UQ as fC,BCt as fD,yc as fE,qYe as fF,Dc as fG,GEt as fH,yd as fI,JEt as fJ,REt as fK,ZEt as fL,Zie as fM,Uoe as fN,C5t as fO,E9 as fP,Ase as fQ,dae as fR,E6 as fS,$2t as fT,Die as fU,s5e as fV,NZ as fW,X7 as fX,Gn as fY,M6 as fZ,cOe as f_,$7 as fa,T3 as fb,TF as fc,Jf as fd,di as fe,eat as ff,jo as fg,m0 as fh,tn as fi,$g as fj,THe as fk,KIe as fl,kJ as fm,o0 as fn,Qn as fo,nte as fp,Qee as fq,O6 as fr,mft as fs,dZ as ft,v6 as fu,g3 as fv,g7 as fw,$Q as fx,Eee as fy,q5t as fz,Wt as g,vEe as g$,w8e as g0,ZL as g1,rEt as g2,tI as g3,eI as g4,I5 as g5,TEt as g6,jL as g7,my as g8,WL as g9,L6 as gA,Nre as gB,rk as gC,S_e as gD,ik as gE,Mct as gF,ak as gG,LEt as gH,vie as gI,lft as gJ,WD as gK,IAt as gL,dAt as gM,oCt as gN,Q8t as gO,jEt as gP,KEt as gQ,YEt as gR,R5 as gS,X8t as gT,eCt as gU,Hre as gV,Wre as gW,zre as gX,iie as gY,kZ as gZ,l3 as g_,OHe as ga,i0 as gb,Kle as gc,C5 as gd,Eot as ge,Bot as gf,Cne as gg,Mk as gh,mit as gi,Wie as gj,ed as gk,A5 as gl,z1 as gm,B6 as gn,wx as go,$6 as gp,iAe as gq,nQ as gr,xCe as gs,PX as gt,v2e as gu,UEt as gv,aAt as gw,tSt as gx,Pg as gy,gCe as gz,gL as h,p9 as h$,w3e as h0,Mwt as h1,jwt as h2,zwt as h3,Kwt as h4,Zwt as h5,LTt as h6,ITt as h7,gle as h8,yle as h9,XOe as hA,dEt as hB,eTt as hC,pE as hD,mE as hE,fle as hF,a5e as hG,zD as hH,PB as hI,q8t as hJ,z8t as hK,j8t as hL,$8t as hM,rAt as hN,Ybt as hO,hAt as hP,lAt as hQ,YH as hR,xEt as hS,Z8t as hT,Vct as hU,rQ as hV,EAt as hW,U8t as hX,K8t as hY,Y8t as hZ,Iot as h_,Vze as ha,dnt as hb,wI as hc,Ih as hd,vEt as he,Jze as hf,DEt as hg,mEt as hh,fAt as hi,FV as hj,l1 as hk,tPe as hl,VQ as hm,w3 as hn,hEt as ho,Y1 as hp,XCt as hq,R5e as hr,aEt as hs,SCe as ht,C7e as hu,A9e as hv,x9e as hw,uEt as hx,R9e as hy,cEt as hz,bh as i,FIe as i0,TAt as i1,wAt as i2,FQ as i3,gne as i4,RAt as i5,XX as i6,I as j,Rf as k,OEt as l,Xt as m,Za as n,q5 as o,QA as p,ho as q,F as r,tr as s,u8t as t,_l as u,X_t as v,hDe as w,B9 as x,hO as y,Ec as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as e,g as m3,bm as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bO as w,n as Q,cl as q,dG as z,fL as b3,aY as le,aZ as ce,a3 as j,ae as h3,A as R,fM as Ee,Q as h,fN as Ie,M as De,b as ue,aL as de,aM as Je,F as k3,U as w3,aO as a3,W as K3,cY as f3,fO as Fe,fP as pe,dM as X3,dI as fe,dJ as Z3,fQ as Ge,fR as me,dL as he,fS as ge,fT as Be,fU as ye,v as Ne,az as d3,T as Oe,f as Te,H as Se,V as M3}from"./index-
|
|
1
|
+
import{r as y,j as e,g as m3,bm as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bO as w,n as Q,cl as q,dG as z,fL as b3,aY as le,aZ as ce,a3 as j,ae as h3,A as R,fM as Ee,Q as h,fN as Ie,M as De,b as ue,aL as de,aM as Je,F as k3,U as w3,aO as a3,W as K3,cY as f3,fO as Fe,fP as pe,dM as X3,dI as fe,dJ as Z3,fQ as Ge,fR as me,dL as he,fS as ge,fT as Be,fU as ye,v as Ne,az as d3,T as Oe,f as Te,H as Se,V as M3}from"./index-cto27BjI.js";import{d as g3}from"./Add-BYcTrfwq.js";import{S as o3}from"./index-MgqsR5Yr.js";import{d as l3}from"./EditIcon-BM1-fNyQ.js";import{d as Ce}from"./LockIcon-DVMXWBuj.js";import{L as B3,S as y3,d as xe}from"./list-header-CwzHI2Rt.js";import{b as s3,u as Pe}from"./team-Bds6tH0s.js";import{T as W,F as ve}from"./TextField-ChYCqgnF.js";import{C as Re}from"./Google-Bh_n6egY.js";import{E as N3}from"./index-58xom0se.js";import{l as Q3}from"./index-D4mUNiA3.js";import{j as Me}from"./index-DKleljgS.js";import{I as Le}from"./InputAdornment-BsJrfw9W.js";import{I as Ve}from"./InputLabel-3Wx_imEU.js";import{T as _e,a as J3}from"./ToggleButtonGroup-D-TzdChr.js";import{O as We}from"./Select-DacRJUpT.js";import"./ButtonGroup-DsDQPFq5.js";import"./getValidReactChildren-BSSAKXXh.js";import"./Search-CLqP6dSG.js";import"./isEqual-SGvPf73-.js";var O3={};Object.defineProperty(O3,"__esModule",{value:!0});var i3=O3.default=void 0;Ue(y);var L3=e;function Ue(n){return n&&n.__esModule?n:{default:n}}function V3(n,o){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(n);o&&(H=H.filter(function(I){return Object.getOwnPropertyDescriptor(n,I).enumerable})),i.push.apply(i,H)}return i}function _3(n){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?V3(Object(i),!0).forEach(function(H){je(n,H,i[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V3(Object(i)).forEach(function(H){Object.defineProperty(n,H,Object.getOwnPropertyDescriptor(i,H))})}return n}function je(n,o,i){return o=be(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n}function be(n){var o=ke(n,"string");return typeof o=="symbol"?o:String(o)}function ke(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var H=i.call(n,o||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}var T3=function(o){return(0,L3.jsx)("svg",_3(_3({},o),{},{children:(0,L3.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};T3.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};T3.displayName="delete";i3=O3.default=T3;var Y3={exports:{}},q3={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(i,H){return i<<H|i>>>32-H},rotr:function(i,H){return i<<32-H|i>>>H},endian:function(i){if(i.constructor==Number)return o.rotl(i,8)&16711935|o.rotl(i,24)&4278255360;for(var H=0;H<i.length;H++)i[H]=o.endian(i[H]);return i},randomBytes:function(i){for(var H=[];i>0;i--)H.push(Math.floor(Math.random()*256));return H},bytesToWords:function(i){for(var H=[],I=0,c=0;I<i.length;I++,c+=8)H[c>>>5]|=i[I]<<24-c%32;return H},wordsToBytes:function(i){for(var H=[],I=0;I<i.length*32;I+=8)H.push(i[I>>>5]>>>24-I%32&255);return H},bytesToHex:function(i){for(var H=[],I=0;I<i.length;I++)H.push((i[I]>>>4).toString(16)),H.push((i[I]&15).toString(16));return H.join("")},hexToBytes:function(i){for(var H=[],I=0;I<i.length;I+=2)H.push(parseInt(i.substr(I,2),16));return H},bytesToBase64:function(i){for(var H=[],I=0;I<i.length;I+=3)for(var c=i[I]<<16|i[I+1]<<8|i[I+2],u=0;u<4;u++)I*8+u*6<=i.length*8?H.push(n.charAt(c>>>6*(3-u)&63)):H.push("=");return H.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var H=[],I=0,c=0;I<i.length;c=++I%4)c!=0&&H.push((n.indexOf(i.charAt(I-1))&Math.pow(2,-2*c+8)-1)<<c*2|n.indexOf(i.charAt(I))>>>6-c*2);return H}};q3.exports=o})();var we=q3.exports,G3={utf8:{stringToBytes:function(n){return G3.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(G3.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i<n.length;i++)o.push(n.charCodeAt(i)&255);return o},bytesToString:function(n){for(var o=[],i=0;i<n.length;i++)o.push(String.fromCharCode(n[i]));return o.join("")}}},W3=G3;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,cn as ce,fW as ot,fX as Dt,r as T,cw as Ut,cr as Bt,a3 as Qt,fY as _e,dZ as Vt,dX as Wt,fZ as Zt,dW as Gt,db as A,a8 as Jt,a9 as Xt,f_ as Yt,Q as L,f$ as Kt,m as en,g0 as tn,g1 as nn,B as on,g2 as rn,fI as rt,q as te,g3 as sn,g4 as cn,cx as an,g5 as ln,s as P,g6 as st,g7 as un,cg as it,g8 as fn,aC as ct,c0 as de,b5 as dn,bc as pn,cy as at,g9 as hn}from"./index-
|
|
1
|
+
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,cn as ce,fW as ot,fX as Dt,r as T,cw as Ut,cr as Bt,a3 as Qt,fY as _e,dZ as Vt,dX as Wt,fZ as Zt,dW as Gt,db as A,a8 as Jt,a9 as Xt,f_ as Yt,Q as L,f$ as Kt,m as en,g0 as tn,g1 as nn,B as on,g2 as rn,fI as rt,q as te,g3 as sn,g4 as cn,cx as an,g5 as ln,s as P,g6 as st,g7 as un,cg as it,g8 as fn,aC as ct,c0 as de,b5 as dn,bc as pn,cy as at,g9 as hn}from"./index-cto27BjI.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d,j as o,C as f,z as h,ax as v,cq as C,cr as u,Q as j,bl as I,af as P,F as R}from"./index-
|
|
1
|
+
import{u as d,j as o,C as f,z as h,ax as v,cq as C,cr as u,Q as j,bl as I,af as P,F as R}from"./index-cto27BjI.js";import{I as S}from"./invitation-Db4MC3JQ.js";import"./index-RXFOkpdO.js";import"./index-C6Wak-Bp.js";import"./CheckCircle-z0EmvxpD.js";import"./wrap-locale-BMwksOY3.js";function k(n){const{searchParams:i}=new URL(window.location.href),l=h(),{api:a,session:r}=v(),{info:g}=d(),c=i.get("redirect"),p=i.get("id"),s=C(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),x=u(async(e,w=t=>t)=>{e&&(e.sessionToken&&P(w(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?l(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,g),checkFn:a.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,f as n,j as t,n as e}from"./index-
|
|
1
|
+
import{r as o,f as n,j as t,n as e}from"./index-cto27BjI.js";import{R as r}from"./index-RXFOkpdO.js";function i(){const{t:s}=o.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(r,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=e.main``;export{i as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as q}from"./lottie-
|
|
1
|
+
import{l as q}from"./lottie-LUS1MfCT.js";import{r as D,bb as z}from"./index-cto27BjI.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,o,b=[],s=!0,A=!1;try{if(c=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);s=!0);}catch(g){A=!0,u=g}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var ie=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],oe=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,o=e.initialSegment,b=e.onComplete,s=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,ie),P=D.useState(!1),d=Z(P,2),C=d[0],I=d[1],i=D.useRef(),v=D.useRef(null),H=function(){var a;(a=i.current)===null||a===void 0||a.play()},M=function(){var a;(a=i.current)===null||a===void 0||a.stop()},F=function(){var a;(a=i.current)===null||a===void 0||a.pause()},V=function(a){var f;(f=i.current)===null||f===void 0||f.setSpeed(a)},N=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndPlay(a,f)},B=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndStop(a,f)},$=function(a){var f;(f=i.current)===null||f===void 0||f.setDirection(a)},k=function(a,f){var m;(m=i.current)===null||m===void 0||m.playSegments(a,f)},W=function(a){var f;(f=i.current)===null||f===void 0||f.setSubframe(a)},K=function(a){var f;return(f=i.current)===null||f===void 0?void 0:f.getDuration(a)},U=function(){var a;(a=i.current)===null||a===void 0||a.destroy(),i.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f;if(v.current){(f=i.current)===null||f===void 0||f.destroy();var m=T(T(T({},e),a),{},{container:v.current});return i.current=q.loadAnimation(m),I(!!i.current),function(){var R;(R=i.current)===null||R===void 0||R.destroy(),i.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){i.current&&(i.current.autoplay=!!c)},[c]),D.useEffect(function(){if(i.current){if(!o){i.current.resetSegments(!0);return}!Array.isArray(o)||!o.length||((i.current.currentRawFrame<o[0]||i.current.currentRawFrame>o[1])&&(i.current.currentRawFrame=o[0]),i.current.setSegment(o[0],o[1]))}},[o]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:s},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var f=a.map(function(m){var R;return(R=i.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var _;(_=i.current)===null||_===void 0||_.removeEventListener(m.name,m.handler)}});return function(){f.forEach(function(m){return m()})}}},[b,s,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",T({style:r,ref:v},p));return{View:Y,play:H,stop:M,pause:F,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:i.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,o=n.width,b=n.height,s=(e-c)/o,A=(r-u)/b;return{x:s,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var o=r.current;if(!(!o||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(o),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
|
|
3
3
|
n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},s=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(o,S,p);S=P.x,p=P.y}var d=c.find(function(i){var v=i.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(d){if(d.type==="seek"&&d.position&&Array.isArray(d.position.x)&&Array.isArray(d.position.y)&&d.frames.length===2){var C=(S-d.position.x[0])/(d.position.x[1]-d.position.x[0]),I=(p-d.position.y[0])/(d.position.y[1]-d.position.y[0]);n.playSegments(d.frames,!0),n.goToAndStop(Math.ceil((C+I)/2*(d.frames[1]-d.frames[0])),!0)}d.type==="loop"&&n.playSegments(d.frames,!0),d.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(d.frames)),d.type==="stop"&&n.goToAndStop(d.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return o.addEventListener("mousemove",O),o.addEventListener("mouseout",w),function(){o.removeEventListener("mousemove",O),o.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return s()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,o=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),o},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,o=e.interactivity,b=x(e,fe),s=oe(b,c),A=s.View,g=s.play,O=s.stop,w=s.pause,h=s.setSpeed,l=s.goToAndStop,L=s.goToAndPlay,S=s.setDirection,p=s.playSegments,P=s.setSubframe,d=s.getDuration,C=s.destroy,I=s.animationContainerRef,i=s.animationLoaded,v=s.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v},actions:(n=o==null?void 0:o.actions)!==null&&n!==void 0?n:[],mode:(u=o==null?void 0:o.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,oe as useLottie,de as useLottieInteractivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as D}from"./index-DBlH-4qz.js";var fe=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var R=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>R(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return R(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||R(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var ce=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!R(e))return t;const u=ce(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},W=e=>typeof e=="boolean";const _e={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},H={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var st=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==H.all&&(s._proxyFormState[y]=!u||H.all),t&&(t[y]=!0),e[y]}});return n},B=e=>R(e)&&!Object.keys(e).length,it=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||H.all))},he=e=>Array.isArray(e)?e:[e],ut=(e,s,t)=>!e||!s||e===s||he(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Te(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Te({disabled:u,next:v=>m.current&&ut(_.current,v.name,a)&&it(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),st(y,t,S.current,!1)}var $=e=>typeof e=="string",lt=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Te({disabled:a,subject:t._subjects.values,next:_=>{ut(h.current,_.name,y)&&S(p(lt(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}var Ue=e=>/^\w*$/.test(e),at=e=>ce(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Ue(s)?[s]:at(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=R(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}e[h]=m,e=e[h]}return e};function St(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...W(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,j)=>{const T=f(n._fields,N);T&&(T._f.mount=j)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...W(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:_e.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:_e.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(St(e));var kt=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===H.onSubmit,isOnBlur:e===H.onBlur,isOnChange:e===H.onChange,isOnAll:e===H.all,isOnTouch:e===H.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const oe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;oe(h,s)}else R(h)&&oe(h,s)}}};var Et=(e,s,t)=>{const u=ce(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",be=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ve=e=>$(e),pe=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(ve(e)||Array.isArray(e)&&e.every(ve)||W(e)&&!e)return{type:t,message:ve(e)?e:"",ref:s}}var se=e=>R(e)&&!Ve(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:j,name:T,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,T);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(W(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=fe(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||be(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=kt.bind(null,T,t,k),ye=(b,F,E,U=z.maxLength,q=z.minLength)=>{const I=b?F:E;k[T]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||W(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=ve(h)?{value:!!h,message:h}:se(h);if(b&&(k[T]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const E=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(E.value)||(b=q>E.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(E.value)&&V&&(b=ue?I(V)>I(E.value):le?V>E.value:q>new Date(E.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,E.message,U.message,z.max,z.min),!t))return G(k[T].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),E=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((E||U)&&(ye(E,b.message,F.message),!t))return G(k[T].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(Ve(b)&&!V.match(b)&&(k[T]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(j){if(X(j)){const b=await j(V,s),F=Xe(b,K);if(F&&(k[T]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(R(j)){let b={};for(const F in j){if(!B(b)&&!t)break;const E=Xe(await j[F](V,s),K,F);E&&(b={...E,...P(F,E.message)},G(E.message),t&&(k[T]=b))}if(!B(b)&&(k[T]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function C(e,s){const t=Array.isArray(s)?s:Ue(s)?[s]:at(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(R(u)&&B(u)||Array.isArray(u)&&Rt(u))&&C(e,t.slice(0,-1)),e}var ke=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Fe=e=>O(e)||!et(e);function Z(e,s){if(Fe(e)||Fe(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||R(a)&&R(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Lt=e=>pe(e)||fe(e),Ee=e=>be(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Ae(e,s={}){const t=Array.isArray(e);if(R(e)||t)for(const u in e)Array.isArray(e[u])||R(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Ae(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(R(e)||u)for(const n in e)Array.isArray(e[n])||R(e[n])&&!ct(e[n])?w(s)||Fe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Ae(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):fe(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Tt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:Ve(e)?e.source:R(e)?Ve(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Ue(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!ce(f(e,s)).length&&C(e,s);const Mt={mode:H.onSubmit,reValidateMode:H.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=R(s.defaultValues)||R(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:ke(),array:ke(),state:ke()},N=Ke(s.mode),j=Ke(s.reValidateMode),T=s.criteriaMode===H.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):C(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},L=!!(f(u,r)&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=L||Z(f(n,r),i);g=!!(!L&&f(t.dirtyFields,r)),M||L?C(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&W(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):C(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&W(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Tt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):C(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const L=await Ye(c,a,T,s.shouldUseNativeValidation&&!i,A);if(Q([d]),L[o.name]&&(l.valid=!1,i))break;!i&&(f(L,o.name)?A?Et(t.errors,L,o.name):x(t.errors,o.name,L[o.name]):C(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!Ee(l)):!Ee(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>lt(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),E=r=>ce(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=be(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Fe(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,L;const M=o(),re=r.type===_e.BLUR||r.type===_e.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,j,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Se=ee(l,M,re,!1),Vt=!B(Se)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Se});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,L=B(je)}}else Q([l],!0),A=(await Ye(c,a,T,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?L=!1:_.isValid&&(L=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,L,A,Se))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=he(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&oe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),isTouched:!!f((i||t).touchedFields,r),isValidating:!!f((i||t).validatingFields,r),error:f((i||t).errors,r)}),gt=r=>{r&&he(r).forEach(i=>C(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref;x(t.errors,r,{...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?he(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(C(u,l),C(a,l)),!i.keepError&&C(t.errors,l),!i.keepDirty&&C(t.dirtyFields,l),!i.keepTouched&&C(t.touchedFields,l),!i.keepIsValidating&&C(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&C(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(W(r)){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=W(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Lt(o),A=l._f.refs||[];if(g?A.find(L=>L===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(Ee),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&oe(u,le,h.mount),vt=r=>{W(r)&&(v.state.next({disabled:r}),oe(u,(i,l)=>{let d=r;const c=f(u,l);c&&W(c._f.disabled)&&(d||(d=c._f.disabled)),i.disabled=d},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(C(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||C(t.touchedFields,r),i.keepDirty||(C(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(C(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const L=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(be(L)){const M=L.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?[]:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:E,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Te({subject:a._subjects.state,next:y=>{it(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=st(u,a),s.current}export{Wt as C,wt as a,Ht as u};
|
|
1
|
+
import{bb as D}from"./index-cto27BjI.js";var fe=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var R=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>R(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return R(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||R(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var ce=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!R(e))return t;const u=ce(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},W=e=>typeof e=="boolean";const _e={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},H={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var st=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==H.all&&(s._proxyFormState[y]=!u||H.all),t&&(t[y]=!0),e[y]}});return n},B=e=>R(e)&&!Object.keys(e).length,it=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||H.all))},he=e=>Array.isArray(e)?e:[e],ut=(e,s,t)=>!e||!s||e===s||he(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Te(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Te({disabled:u,next:v=>m.current&&ut(_.current,v.name,a)&&it(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),st(y,t,S.current,!1)}var $=e=>typeof e=="string",lt=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Te({disabled:a,subject:t._subjects.values,next:_=>{ut(h.current,_.name,y)&&S(p(lt(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}var Ue=e=>/^\w*$/.test(e),at=e=>ce(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Ue(s)?[s]:at(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=R(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}e[h]=m,e=e[h]}return e};function St(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...W(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,j)=>{const T=f(n._fields,N);T&&(T._f.mount=j)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...W(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:_e.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:_e.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(St(e));var kt=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===H.onSubmit,isOnBlur:e===H.onBlur,isOnChange:e===H.onChange,isOnAll:e===H.all,isOnTouch:e===H.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const oe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;oe(h,s)}else R(h)&&oe(h,s)}}};var Et=(e,s,t)=>{const u=ce(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",be=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ve=e=>$(e),pe=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(ve(e)||Array.isArray(e)&&e.every(ve)||W(e)&&!e)return{type:t,message:ve(e)?e:"",ref:s}}var se=e=>R(e)&&!Ve(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:j,name:T,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,T);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(W(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=fe(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||be(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=kt.bind(null,T,t,k),ye=(b,F,E,U=z.maxLength,q=z.minLength)=>{const I=b?F:E;k[T]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||W(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=ve(h)?{value:!!h,message:h}:se(h);if(b&&(k[T]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const E=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(E.value)||(b=q>E.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(E.value)&&V&&(b=ue?I(V)>I(E.value):le?V>E.value:q>new Date(E.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,E.message,U.message,z.max,z.min),!t))return G(k[T].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),E=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((E||U)&&(ye(E,b.message,F.message),!t))return G(k[T].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(Ve(b)&&!V.match(b)&&(k[T]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(j){if(X(j)){const b=await j(V,s),F=Xe(b,K);if(F&&(k[T]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(R(j)){let b={};for(const F in j){if(!B(b)&&!t)break;const E=Xe(await j[F](V,s),K,F);E&&(b={...E,...P(F,E.message)},G(E.message),t&&(k[T]=b))}if(!B(b)&&(k[T]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function C(e,s){const t=Array.isArray(s)?s:Ue(s)?[s]:at(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(R(u)&&B(u)||Array.isArray(u)&&Rt(u))&&C(e,t.slice(0,-1)),e}var ke=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Fe=e=>O(e)||!et(e);function Z(e,s){if(Fe(e)||Fe(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||R(a)&&R(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Lt=e=>pe(e)||fe(e),Ee=e=>be(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Ae(e,s={}){const t=Array.isArray(e);if(R(e)||t)for(const u in e)Array.isArray(e[u])||R(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Ae(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(R(e)||u)for(const n in e)Array.isArray(e[n])||R(e[n])&&!ct(e[n])?w(s)||Fe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Ae(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):fe(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Tt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:Ve(e)?e.source:R(e)?Ve(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Ue(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!ce(f(e,s)).length&&C(e,s);const Mt={mode:H.onSubmit,reValidateMode:H.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=R(s.defaultValues)||R(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:ke(),array:ke(),state:ke()},N=Ke(s.mode),j=Ke(s.reValidateMode),T=s.criteriaMode===H.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):C(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},L=!!(f(u,r)&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=L||Z(f(n,r),i);g=!!(!L&&f(t.dirtyFields,r)),M||L?C(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&W(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):C(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&W(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Tt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):C(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const L=await Ye(c,a,T,s.shouldUseNativeValidation&&!i,A);if(Q([d]),L[o.name]&&(l.valid=!1,i))break;!i&&(f(L,o.name)?A?Et(t.errors,L,o.name):x(t.errors,o.name,L[o.name]):C(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!Ee(l)):!Ee(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>lt(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),E=r=>ce(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=be(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Fe(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,L;const M=o(),re=r.type===_e.BLUR||r.type===_e.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,j,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Se=ee(l,M,re,!1),Vt=!B(Se)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Se});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,L=B(je)}}else Q([l],!0),A=(await Ye(c,a,T,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?L=!1:_.isValid&&(L=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,L,A,Se))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=he(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&oe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),isTouched:!!f((i||t).touchedFields,r),isValidating:!!f((i||t).validatingFields,r),error:f((i||t).errors,r)}),gt=r=>{r&&he(r).forEach(i=>C(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref;x(t.errors,r,{...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?he(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(C(u,l),C(a,l)),!i.keepError&&C(t.errors,l),!i.keepDirty&&C(t.dirtyFields,l),!i.keepTouched&&C(t.touchedFields,l),!i.keepIsValidating&&C(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&C(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(W(r)){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=W(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Lt(o),A=l._f.refs||[];if(g?A.find(L=>L===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(Ee),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&oe(u,le,h.mount),vt=r=>{W(r)&&(v.state.next({disabled:r}),oe(u,(i,l)=>{let d=r;const c=f(u,l);c&&W(c._f.disabled)&&(d||(d=c._f.disabled)),i.disabled=d},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(C(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||C(t.touchedFields,r),i.keepDirty||(C(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(C(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const L=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(be(L)){const M=L.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?[]:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:E,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Te({subject:a._subjects.state,next:y=>{it(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=st(u,a),s.current}export{Wt as C,wt as a,Ht as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as i}from"./codemirror.es-
|
|
1
|
+
import{C as i}from"./codemirror.es-BCKCN0pa.js";import"./index-CV5o0SmN.js";import"./index-cto27BjI.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as h}from"./codemirror.es-
|
|
1
|
+
import{C as h}from"./codemirror.es-BCKCN0pa.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-Wg6qjI2Q.js";import"./info-addon.es-Dz55t6aF.js";import{Y as A,r as F}from"./index-CV5o0SmN.js";import"./index-cto27BjI.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as l,j as t,bm as G,t as J,r as s,q as V,M as H,W as Q,dN as X,m as Y,D as Z,B as E,C as I,w as _,J as ee,x as te,bn as ne,K as oe}from"./index-
|
|
1
|
+
import{P as l,j as t,bm as G,t as J,r as s,q as V,M as H,W as Q,dN as X,m as Y,D as Z,B as E,C as I,w as _,J as ee,x as te,bn as ne,K as oe}from"./index-cto27BjI.js";import{W as se}from"./tag-DwIjrotQ.js";import{I as w}from"./index-CZxztyyO.js";import{T as re}from"./TextField-ChYCqgnF.js";import{S as ae,a as le,b as ie}from"./Stepper-CfMuItAU.js";function ce({mode:r,...i}){return r==="development"?t.jsx(se,{type:"primary",...i,children:"DEV"}):null}ce.propTypes={mode:l.string.isRequired};function D({defaultUrl:r,onCancel:i,onSuccess:v,onError:W,mode:B,handleText:c}){const{api:F}=G(),{api:L}=J(),[d,m]=s.useState(!1),[y,p]=s.useState(""),{t:n}=V(),j={dist:{}},[u,M]=s.useState(r),[f,h]=s.useState(r?1:0),[o,k]=s.useState(j),[R,x]=s.useState(!1),[S,T]=s.useState({}),P=B==="component",g=P?!0:!r,C=async()=>{k(j),p(null),m(!0);try{const e=decodeURIComponent(u.trim());try{new URL(e)}catch{throw new Error("Invalid URL")}const{meta:b,inStore:$,registryUrl:z}=await F.getBlockletMetaFromUrl({input:{url:e}});k(b),T({inStore:$,registryUrl:z,inputUrl:u.trim()})}catch(e){console.error(e);const b=`Blocklet Install failed: ${oe(e)}`;p(b),W(e)}finally{m(!1)}},q=()=>{if(P){v({meta:o,...S}),i();return}m(!0),x(!0)},N=()=>{m(!1),x(!1),v({meta:o,...S}),i()},A=()=>{m(!1),x(!1)};s.useEffect(()=>{r&&C()},[r]);const K=[{name:n("common.name"),value:H({meta:o},!0)},{name:n("common.version"),value:o.version},{name:n("common.did"),value:t.jsx(Q,{did:o.did})},{name:n("common.author"),value:X(o.author)},{name:n("blocklet.dist.downloadLink"),value:o.dist.tarball}],O=()=>d?t.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:t.jsx(I,{})}):o.did?t.jsx("div",{style:{paddingLeft:"10%"},children:K.map(e=>e.name===n("common.did")?t.jsx(w,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>n("common.did"),children:e.value},e.name):t.jsx(w,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name))}):null,U=[{label:n("blocklet.fromUrl.step0"),body:t.jsx(Y,{component:"div",children:t.jsx(re,{label:n("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:n("blocklet.fromUrl.description"),value:u,onChange:e=>{p(null),M(e.target.value)},disabled:d,onKeyPress:e=>{e.key==="Enter"&&(e.preventDefault(),C(),h(1))}})}),cancel:n("common.cancel"),confirm:n("common.next"),onCancel:i,onConfirm:()=>{C(),h(1)}},{label:n("blocklet.fromUrl.step1"),body:O(),cancel:n(g?"common.pre":"common.cancel"),confirm:(c==null?void 0:c.confirm)||n("blocklet.fromUrl.confirm"),onCancel:()=>{g?h(e=>e-1):i()},onConfirm:()=>{q()}}],a=U[f];return t.jsxs(t.Fragment,{children:[t.jsxs(Z,{title:(c==null?void 0:c.title)||n("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>a.onCancel(),showCloseButton:f===0,disableEscapeKeyDown:!0,open:!0,actions:t.jsxs(t.Fragment,{children:[a.cancel&&t.jsx(E,{onClick:e=>{e.stopPropagation(),p(null),a.onCancel()},color:"inherit",children:a.cancel||n("common.cancel")}),t.jsxs(E,{onClick:e=>{e.stopPropagation(),a.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!u||y,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&f===0&&t.jsx(I,{size:16}),a.confirm]})]}),children:[g&&t.jsx(ae,{alternativeLabel:!0,activeStep:f,children:U.map(({label:e})=>t.jsx(le,{children:t.jsx(ie,{children:e})},e))}),t.jsx(_,{component:"div",style:{marginTop:24},children:a.body}),!!y&&t.jsx(ee,{type:"error",style:{width:"100%",marginTop:8},children:y})]}),o&&R&&t.jsx(te,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:L.get,checkTimeout:5*60*1e3,onSuccess:N,extraParams:{title:o.title,wt:ne(o),blockletMetaUrl:decodeURIComponent(u.trim())},messages:{title:n("setup.keyPair.title"),scan:n("setup.keyPair.scan"),confirm:n("setup.keyPair.confirm"),success:n("setup.keyPair.success")},onClose:A})]})}D.propTypes={defaultUrl:l.string,onCancel:l.func.isRequired,onSuccess:l.func.isRequired,onError:l.func,mode:l.oneOf(["install","component"]),handleText:l.object};D.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,D as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bS as $,j as i,P as n,n as f,r as p,f as D,D as H,q as j,t as U,a2 as E,cL as M,cM as A,cN as F,cA as O,cO as N,cP as P,at as S,Q as z,cq as B,C as V}from"./index-
|
|
1
|
+
import{bS as $,j as i,P as n,n as f,r as p,f as D,D as H,q as j,t as U,a2 as E,cL as M,cM as A,cN as F,cA as O,cO as N,cP as P,at as S,Q as z,cq as B,C as V}from"./index-cto27BjI.js";import{R as W}from"./index-RXFOkpdO.js";import{C as L}from"./index-C6Wak-Bp.js";import{d as X}from"./CheckCircle-z0EmvxpD.js";import{w as J}from"./wrap-locale-BMwksOY3.js";const Q=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function y({invitation:e,createPassportSvg:r,passportColor:a}){const[d,o]=p.useState(!1),{t}=p.useContext(D),c=p.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),l=p.useMemo(()=>r({title:c,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||a}),[e,c]),x=p.useCallback(()=>{o(!0)},[]),s=p.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(Y,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),i.jsx(H,{open:d,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(u=>i.jsx("li",{style:{listStyle:"circle"},children:u.description},u.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Q,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}y.propTypes={invitation:n.object.isRequired,createPassportSvg:n.func.isRequired,passportColor:n.string};y.defaultProps={passportColor:"auto"};const Y=f.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
max-width: 350px;
|
|
4
4
|
margin: 30px auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r,e$ as t}from"./index-
|
|
1
|
+
import{g as r,e$ as t}from"./index-cto27BjI.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
|