@abtnode/webapp 1.17.7-beta-20251227-001958-ea2ba3f5 → 1.17.7-beta-20251229-085620-84f09930
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/{AdapterDayjs-BdvIhlUS.js → AdapterDayjs-B3EPIF8V.js} +1 -1
- package/dist/assets/{Add-75JKngmd.js → Add-B60k0zLe.js} +1 -1
- package/dist/assets/ArrowDropDown-D9C6bexH.js +1 -0
- package/dist/assets/{Autocomplete-kOONI_Pq.js → Autocomplete-B4QHA8fQ.js} +1 -1
- package/dist/assets/{Breadcrumbs-cTLPSR0j.js → Breadcrumbs-C2AxMEIo.js} +1 -1
- package/dist/assets/{ButtonGroup-CHbmdfp0.js → ButtonGroup-CwgnAVvA.js} +1 -1
- package/dist/assets/{CSSTransition-D4VQqBYl.js → CSSTransition-CTMK0QDG.js} +1 -1
- package/dist/assets/{CallMerge-DlG0KEtx.js → CallMerge-Cdfeu5IS.js} +1 -1
- package/dist/assets/{CardContent-DzGFYCPu.js → CardContent-LxDdD1ia.js} +1 -1
- package/dist/assets/{ChevronLeft-BtZyYDNZ.js → ChevronLeft-BU5D6BrG.js} +1 -1
- package/dist/assets/{ChevronRight-RokC-KBT.js → ChevronRight-BntDfQzc.js} +1 -1
- package/dist/assets/{Clear-1FRwWVql.js → Clear-RDv89tkq.js} +1 -1
- package/dist/assets/{Delete-BwS0ZYTA.js → Delete-BeglY8dh.js} +1 -1
- package/dist/assets/{DeleteOutline-1X_2pN5H.js → DeleteOutline-BDLlQ3k7.js} +1 -1
- package/dist/assets/{Done-CL3etDC5.js → Done-CEn2z4YZ.js} +1 -1
- package/dist/assets/{Edit-CHx0TOIp.js → Edit-B8h0Te5z.js} +1 -1
- package/dist/assets/{ErrorOutline-C1GIrHWO.js → ErrorOutline-C8or5W5q.js} +1 -1
- package/dist/assets/{FilterList-CeGx1Nvy.js → FilterList-CLDlsWBv.js} +1 -1
- package/dist/assets/{Google-C7HwiVx9.js → Google-BjTL7Mbd.js} +1 -1
- package/dist/assets/{HelpOutline-v-SutwQQ.js → HelpOutline-BWiGx-E5.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-CUBW-wSD.js → KeyboardArrowDown-DEp_gv0Q.js} +1 -1
- package/dist/assets/{Launch-DW7r2j3F.js → Launch-dZPSseNQ.js} +1 -1
- package/dist/assets/{Link-JpBA3kOe.js → Link-CysJEW2j.js} +1 -1
- package/dist/assets/{ListItemButton-YCbqUifF.js → ListItemButton-d8kfS6hh.js} +1 -1
- package/dist/assets/{ListSubheader-B7asbL85.js → ListSubheader-fV4wdcMl.js} +1 -1
- package/dist/assets/{LoadingButton-KZUgibtr.js → LoadingButton-BsrnRHRU.js} +1 -1
- package/dist/assets/{MoreVert-CAHrwnnF.js → MoreVert-uETYsy_E.js} +1 -1
- package/dist/assets/{OpenInNew-qP3b9J2q.js → OpenInNew-BCfmTCS5.js} +1 -1
- package/dist/assets/{Refresh-kYd1krYv.js → Refresh-Cm8v0stG.js} +1 -1
- package/dist/assets/{Replay-SZk6LYf7.js → Replay-DHMSlrmF.js} +1 -1
- package/dist/assets/{Search-l7-Pwd1y.js → Search-btz9KaC-.js} +1 -1
- package/dist/assets/{Stepper-BGGXEyEh.js → Stepper-Dxn7bqpJ.js} +1 -1
- package/dist/assets/{TableSearch-7aO3QXBn.js → TableSearch-fEXgtTVk.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CavSDkQH.js → ToggleButtonGroup-C4kzOS0b.js} +1 -1
- package/dist/assets/{UnfoldMore-DGe5-aCR.js → UnfoldMore-DThRR6-N.js} +1 -1
- package/dist/assets/{Verified-D57Ev6tJ.js → Verified-C19edvAZ.js} +1 -1
- package/dist/assets/{VerifiedUser-BVjv0CVW.js → VerifiedUser-K3XyiGA_.js} +1 -1
- package/dist/assets/{ViewList-DnUToii8.js → ViewList-CgjJtd-c.js} +1 -1
- package/dist/assets/{_createAggregator-CvUwaNA9.js → _createAggregator-C6OGob0j.js} +1 -1
- package/dist/assets/{actions-DmtsArNi.js → actions-Cx5UWmFM.js} +2 -2
- package/dist/assets/actions-DLzRFvAK.js +1 -0
- package/dist/assets/{agreement-Cr1FBybU.js → agreement-DkKyZFRL.js} +4 -4
- package/dist/assets/api-BIW3WSyV.js +1 -0
- package/dist/assets/{appearance-349xWfPH.js → appearance-Dy0GAWnb.js} +1 -1
- package/dist/assets/{audit-logs-MqhyOVr_.js → audit-logs-DDH5oZ1m.js} +3 -3
- package/dist/assets/base-chart-BYW3DQfO.js +1 -0
- package/dist/assets/{blocklet-BWp5BZ2L.js → blocklet-DOEd7Lt0.js} +1 -1
- package/dist/assets/{chain-Cs69RHJH.js → chain-DxgLFRf-.js} +1 -1
- package/dist/assets/click-to-copy-DsEvNuW1.js +1 -0
- package/dist/assets/cloneDeep-Cig9fPty.js +1 -0
- package/dist/assets/{config-navigation-CB4CUmS1.js → config-navigation-B1zx14fz.js} +22 -22
- package/dist/assets/{connect-to-BOU_fUy1.js → connect-to-C32I6gO9.js} +3 -3
- package/dist/assets/{cssMode-irya--jO.js → cssMode-CtKJ93fE.js} +1 -1
- package/dist/assets/{de-CCwoF0w2.js → de-EFAP4yzZ.js} +1 -1
- package/dist/assets/{delete-confirm-Czdis-d2.js → delete-confirm-Rx1yldK0.js} +1 -1
- package/dist/assets/{depsEqual-DtNa6mfL.js → depsEqual-CzPGJZq9.js} +1 -1
- package/dist/assets/{detail-aen8Gspk.js → detail-BYhPDlPb.js} +3 -3
- package/dist/assets/{domains-BRAsjXjE.js → domains-oZZ_Ty-9.js} +2 -2
- package/dist/assets/{download-DJuVrKpX.js → download-Dpf3ldu1.js} +1 -1
- package/dist/assets/{edit.svg-H5puV-Kf.js → edit.svg-CuloKtQk.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-BSPYCi-c.js +1 -0
- package/dist/assets/engine-DsZ-2cMT.js +1 -0
- package/dist/assets/{freemarker2-PK6zL7Wa.js → freemarker2-BWRy4jrz.js} +1 -1
- package/dist/assets/{get-safe-url-GMIK5bS7.js → get-safe-url-BgeSRCM1.js} +1 -1
- package/dist/assets/getValidReactChildren-c-3WOl4y.js +1 -0
- package/dist/assets/{graphqlMode-DhfmM5z8.js → graphqlMode-0sRNcgDJ.js} +2 -2
- package/dist/assets/{handlebars-suZg9Rb2.js → handlebars-P_4TmNVs.js} +1 -1
- package/dist/assets/{html-DLf47i1s.js → html-Dhv8md5y.js} +1 -1
- package/dist/assets/{html-title-BhYkXb7K.js → html-title-DD44mmgD.js} +1 -1
- package/dist/assets/{htmlMode-CRO-0abo.js → htmlMode-DopggpcY.js} +1 -1
- package/dist/assets/{iframe-D8OX0v5x.js → iframe-Qu-nVscQ.js} +1 -1
- package/dist/assets/{index-DeYnJhWD.js → index-39sjM7w4.js} +1 -1
- package/dist/assets/{index-Devav5mO.js → index-3bdOGXYz.js} +12 -12
- package/dist/assets/{index-Bq_Xf-WS.js → index-AnwYvOD6.js} +1 -1
- package/dist/assets/{index--sTZZj1Y.js → index-B4-HrO4o.js} +2 -2
- package/dist/assets/index-B7s3fWmd.js +79 -0
- package/dist/assets/{index-BJDBjriy.js → index-BHdJvD_e.js} +4 -4
- package/dist/assets/{index-C43er3Ol.js → index-BU4T_Wvp.js} +1 -1
- package/dist/assets/{index-D94ou7Gi.js → index-BXHaVrfH.js} +2 -2
- package/dist/assets/index-B_uYaYXc.js +87 -0
- package/dist/assets/{index-CjSZc8j3.js → index-BrhUX_qe.js} +1 -1
- package/dist/assets/{index-B0YA0eex.js → index-BsR0_qFa.js} +2 -2
- package/dist/assets/{index-Dk8_eJCH.js → index-C-V9x4q4.js} +17 -17
- package/dist/assets/{index-B9IBU_20.js → index-CBUEmu4p.js} +1 -1
- package/dist/assets/{index-CUYDbdpc.js → index-CK33Cb9C.js} +1 -1
- package/dist/assets/{index-DV1T4J21.js → index-Cnw2Ig5U.js} +2 -2
- package/dist/assets/{index-RvLFbIq0.js → index-Cvq6zZB9.js} +2 -2
- package/dist/assets/index-CwUZ9am0.js +5 -0
- package/dist/assets/index-Czc8yQAA.js +1 -0
- package/dist/assets/{index-BuAy14Fb.js → index-D-xN2OZw.js} +1 -1
- package/dist/assets/{index-BbjlOuR9.js → index-D2KGQYNR.js} +3 -3
- package/dist/assets/{index-Y-QvttbJ.js → index-D78suzy2.js} +95 -95
- package/dist/assets/index-D7HZBvR8.js +1 -0
- package/dist/assets/{index-3eT72yhD.js → index-D7vqSOsg.js} +9 -9
- package/dist/assets/{index-BQYunZVD.js → index-D93L21zf.js} +1 -1
- package/dist/assets/{index-DwIPLdSZ.js → index-D9z9EJRg.js} +17 -17
- package/dist/assets/{index-DkSARRFf.js → index-DHkDWWjb.js} +1 -1
- package/dist/assets/{index-CV64vjhs.js → index-DWxJ8r2D.js} +3 -3
- package/dist/assets/{index-DZVqWhON.js → index-DbU5jvv5.js} +1 -1
- package/dist/assets/{index-0K1n4OCx.js → index-DefsJZKk.js} +2 -2
- package/dist/assets/{index-929LkcAj.js → index-Deye8jzv.js} +8 -8
- package/dist/assets/{index-sa-k6sge.js → index-Dj054slT.js} +1 -1
- package/dist/assets/{index-lJeVBvul.js → index-DlpmIKRl.js} +12 -12
- package/dist/assets/{index-B8RjSIJa.js → index-Do20OM4S.js} +1 -1
- package/dist/assets/{index-CfCUQn4l.js → index-DyaBkuYt.js} +4 -4
- package/dist/assets/{index-LHDtQAe7.js → index-Eiq737ML.js} +1 -1
- package/dist/assets/index-GJu0trt8.js +155 -0
- package/dist/assets/{index-DcB5G7mF.js → index-H0mlKY3H.js} +1 -1
- package/dist/assets/index-JJswhFbD.js +1 -0
- package/dist/assets/{index-C8P0cv0U.js → index-OMPkcLs4.js} +2 -2
- package/dist/assets/{index-HMHQfeWc.js → index-RogGDMH8.js} +9 -9
- package/dist/assets/{index-BLAEccy_.js → index-gGxk5WJM.js} +1 -1
- package/dist/assets/{index-DARZEe4H.js → index-j3UFl5Dq.js} +2 -2
- package/dist/assets/{index-DGClCi00.js → index-qkxVIYPT.js} +11 -11
- package/dist/assets/{index-D-GgAn4D.js → index-uV9pYRNo.js} +1 -1
- package/dist/assets/{index.esm-D4mbID4N.js → index.esm-mNR4f2BF.js} +1 -1
- package/dist/assets/{install-from-url-B3WY31cp.js → install-from-url-D52UYhXy.js} +1 -1
- package/dist/assets/{invitation--cbaLA7C.js → invitation-DlWLyqUv.js} +4 -4
- package/dist/assets/is-path-prefix-equal-BYQbaqqa.js +1 -0
- package/dist/assets/item-LsHOq-zm.js +273 -0
- package/dist/assets/{javascript-ChSXcPeU.js → javascript-DKLJNbgU.js} +1 -1
- package/dist/assets/{jsonMode-BRST5wef.js → jsonMode-6n4xGwpA.js} +1 -1
- package/dist/assets/{liquid-CpSF9izi.js → liquid-BvDNIxXF.js} +1 -1
- package/dist/assets/{list-header-CAyaG0bp.js → list-header-BHsvljit.js} +1 -1
- package/dist/assets/{lock.svg-DtLI8vnk.js → lock.svg-BzF_roTX.js} +1 -1
- package/dist/assets/{log-DZS6nYV_.js → log-CCqXzPvI.js} +2 -2
- package/dist/assets/{lottie-react.esm-D7vuHojB.js → lottie-react.esm-CA2-qLw0.js} +1 -1
- package/dist/assets/{mdx-BWUp_fub.js → mdx-CORwGL2F.js} +1 -1
- package/dist/assets/{memory-ClDXUWJ0.js → memory-DjgLsWG0.js} +1 -1
- package/dist/assets/{metric-DyS1o5oY.js → metric-CNMVZIll.js} +1 -1
- package/dist/assets/omit-BGJcae02.js +1 -0
- package/dist/assets/{overview-BZK8iTTP.js → overview-DZx8sNOc.js} +1 -1
- package/dist/assets/{permission-C73DtYHh.js → permission-CCNK9jT0.js} +1 -1
- package/dist/assets/{preference-A-YVUe6G.js → preference-CL8oQs4K.js} +9 -9
- package/dist/assets/{python-CxcQpe_X.js → python-DNPLg-Zx.js} +1 -1
- package/dist/assets/{raf-schd.esm-DUBpm6hM.js → raf-schd.esm-D_x0x_Qn.js} +1 -1
- package/dist/assets/{razor-CV7jqhrT.js → razor-BXbmyOQh.js} +1 -1
- package/dist/assets/{rotate-session-key-C16BchY6.js → rotate-session-key-B9uPds9f.js} +1 -1
- package/dist/assets/{runtime-DQsAvWqZ.js → runtime-CJZGBtjx.js} +1 -1
- package/dist/assets/schema-DqiLBSd2.js +1 -0
- package/dist/assets/sdk-CSPQYdiI.js +1 -0
- package/dist/assets/{service-DAzvPZkc.js → service-BB7jaRU2.js} +1 -1
- package/dist/assets/{shorten-label-CkQfhtXr.js → shorten-label-D6qdCHBK.js} +1 -1
- package/dist/assets/{simple-select-CuyjHO0U.js → simple-select-ZER_8WgH.js} +1 -1
- package/dist/assets/{spaces-CWPgDpWK.js → spaces-M88xnpCx.js} +1 -1
- package/dist/assets/status-CjV3xdMN.js +1 -0
- package/dist/assets/{status-Dzw7M8P_.js → status-Claw5V5z.js} +1 -1
- package/dist/assets/{switch-control-BclMvWCC.js → switch-control-CVj0L-9B.js} +2 -2
- package/dist/assets/{table-icons-9svpZs1q.js → table-icons-D5BFFDTU.js} +1 -1
- package/dist/assets/{team-j4eaMxpB.js → team-DI44e0Lq.js} +1 -1
- package/dist/assets/{toLower-8m1XzQqH.js → toLower-BR9mSuL0.js} +1 -1
- package/dist/assets/toUpper-cXhRv1n8.js +1 -0
- package/dist/assets/traffic-CtaSaEzh.js +1 -0
- package/dist/assets/{tsMode-CqXYRIKQ.js → tsMode-B4RcWbJF.js} +1 -1
- package/dist/assets/{typescript-KJ8oiy4w.js → typescript-ApR86vo0.js} +1 -1
- package/dist/assets/{url-evaluation-BstEsUAB.js → url-evaluation-Dz0qWdnw.js} +1 -1
- package/dist/assets/{url-join-0c-XnZLH.js → url-join-Bhp_MbCf.js} +1 -1
- package/dist/assets/{use-mobile-9lV1jqC7.js → use-mobile-D6doCW2D.js} +1 -1
- package/dist/assets/{use-mobile-BG1HQZl_.js → use-mobile-p7bScsU1.js} +1 -1
- package/dist/assets/{useAsync-Bbnkcz0c.js → useAsync-DeHRjN-F.js} +1 -1
- package/dist/assets/{useAsyncRetry-DwNYtCt1.js → useAsyncRetry-M7S8bZOZ.js} +1 -1
- package/dist/assets/{useLocalStorage-B2geQn_J.js → useLocalStorage-CGOwOi-p.js} +1 -1
- package/dist/assets/{useThemeProps-CqzVTStV.js → useThemeProps-xpQuNQBO.js} +1 -1
- package/dist/assets/{util-BRuccBUB.js → util-B4XNVjK7.js} +1 -1
- package/dist/assets/{wait-container-C4LPSsIr.js → wait-container-DE5vVesp.js} +3 -3
- package/dist/assets/{without-wallet--pvprqkp.js → without-wallet-CZASlBin.js} +1 -1
- package/dist/assets/wrap-locale-DqDO9Bmx.js +1 -0
- package/dist/assets/{xml-DQZh516a.js → xml-CqiM979f.js} +1 -1
- package/dist/assets/{yaml-CpaHe6nN.js → yaml-CHANqhAV.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-CbIxem1P.js +0 -1
- package/dist/assets/actions-BZl9shku.js +0 -1
- package/dist/assets/api-CZXns3iQ.js +0 -1
- package/dist/assets/base-chart-B_hYrlch.js +0 -1
- package/dist/assets/click-to-copy-CJg25x9s.js +0 -1
- package/dist/assets/cloneDeep-CvglcUIb.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CaLvcLFC.js +0 -1
- package/dist/assets/engine-C4nmXPyL.js +0 -1
- package/dist/assets/getValidReactChildren-BTFGvhfH.js +0 -1
- package/dist/assets/index-BKwmETrp.js +0 -1
- package/dist/assets/index-CHyDna8x.js +0 -79
- package/dist/assets/index-CK6zgnPU.js +0 -5
- package/dist/assets/index-CL23Woxs.js +0 -87
- package/dist/assets/index-DYn_D6bf.js +0 -155
- package/dist/assets/index-Di8tb0lj.js +0 -1
- package/dist/assets/index-Diu0oJmr.js +0 -1
- package/dist/assets/is-path-prefix-equal-BkAKRgRo.js +0 -1
- package/dist/assets/item-9qWg89Hm.js +0 -273
- package/dist/assets/omit-BgwU28m_.js +0 -1
- package/dist/assets/schema-CutOyNqB.js +0 -1
- package/dist/assets/sdk-vbwSpYyc.js +0 -1
- package/dist/assets/status-D1smxOIE.js +0 -1
- package/dist/assets/toUpper-B5GOxJoT.js +0 -1
- package/dist/assets/traffic-DIOEDjRI.js +0 -1
- package/dist/assets/wrap-locale-D8L6OQkL.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{aG as ue,j as e,hk as ln,hl as cn,bS as dn,r as D,s as ve,K as O,f7 as Dt,t as N,eQ as Rt,a5 as ce,C as ze,bk as sr,dN as un,o as T,hm as hn,b4 as ir,cC as mn,cW as fn,ds as pn,T as X,dJ as xt,bp as Q,bG as At,p as he,hn as gn,bH as Ot,b as Y,bi as te,bC as le,H as B,aX as ae,V as ne,n as ar,q as yn,w as or,ae as xn,i as lr,gg as vn,ho as bn,av as jn,aW as se,U as qe,$ as we,D as _n,X as wn,v as J,Y as vt,hp as kn,hq as Sn,eC as Cn,eE as Rn,F as Ce,aI as U,g5 as An,d2 as qt,W as On,fp as cr,O as oe,aS as Mt,hr as Pn,hs as $n,bf as Tn,gn as Ee,fb as je,aQ as pe,aU as E,ht as it,hu as bt,P as V,z as En,y as ke,bF as _e,dK as G,hv as Pt,aE as re,fJ as Ve,I as In,f as $e,cz as Ln,cQ as de,c9 as Oe,gm as be,hw as Re,hx as Me,a3 as dr,eF as Dn,hy as qn,bB as jt,M as Mn,cJ as ur,bu as zn,hz as Bn,bb as Hn,L as Nn,cx as We,aK as Xe,hA as Fn,R as Zn,br as Wn,ah as zt,a4 as hr,bl as Qe,hB as mr,b8 as Un,gG as Pe,fc as fr,d0 as pr,B as Vn,b7 as Bt,fe as Kn,fj as Jn,G as at,J as Gn,bz as Yn}from"./index-Y-QvttbJ.js";import{S as Xn}from"./actions-DmtsArNi.js";import{N as Ht}from"./ChevronRight-RokC-KBT.js";import{T as Ue}from"./html-title-BhYkXb7K.js";import{w as Be,P as Qn}from"./permission-C73DtYHh.js";import{u as $t}from"./index-Diu0oJmr.js";import{F as es,R as ts,S as M,a as _t,s as rs,L as Ae,A as ns,b as ss,c as is,d as as,B as os}from"./preference-A-YVUe6G.js";import{D as ls}from"./Done-CL3etDC5.js";import{A as cs,a as Nt}from"./Autocomplete-kOONI_Pq.js";import{C as ds,R as us,S as hs,P as ms}from"./rotate-session-key-C16BchY6.js";import{u as ie}from"./blocklet-BWp5BZ2L.js";import{C as gr}from"./click-to-copy-CJg25x9s.js";import{u as et}from"./team-j4eaMxpB.js";import{v as yr}from"./index-D-GgAn4D.js";import{g as fs}from"./chain-Cs69RHJH.js";import{V as ps}from"./status-D1smxOIE.js";import{a as me,S as gs,u as xr}from"./switch-control-BclMvWCC.js";import{u as fe,C as z,b as Ft}from"./index.esm-D4mbID4N.js";import{I as ys,J as xs,K as vs,L as bs}from"./index-929LkcAj.js";import{S as Ye}from"./simple-select-CuyjHO0U.js";import{D as Zt}from"./Delete-BwS0ZYTA.js";import{A as Wt}from"./Add-75JKngmd.js";import{H as tt}from"./index-LHDtQAe7.js";import{u as vr}from"./use-mobile-BG1HQZl_.js";import{C as js}from"./CardContent-DzGFYCPu.js";import{R as br,a as jr}from"./url-evaluation-BstEsUAB.js";import"./useLocalStorage-B2geQn_J.js";import"./MoreVert-CAHrwnnF.js";import"./DeleteOutline-1X_2pN5H.js";import"./get-safe-url-GMIK5bS7.js";import"./ButtonGroup-CHbmdfp0.js";import"./getValidReactChildren-BTFGvhfH.js";import"./omit-BgwU28m_.js";import"./index-C43er3Ol.js";import"./edit.svg-H5puV-Kf.js";import"./ArrowDropDown-CbIxem1P.js";import"./index-CK6zgnPU.js";import"./iframe-D8OX0v5x.js";import"./ListSubheader-B7asbL85.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-C1GIrHWO.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-CeGx1Nvy.js";import"./CSSTransition-D4VQqBYl.js";import"./emotion-cache.browser.esm-CaLvcLFC.js";import"./depsEqual-DtNa6mfL.js";import"./TableSearch-7aO3QXBn.js";import"./Search-l7-Pwd1y.js";import"./Clear-1FRwWVql.js";const _r=ue([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),_s=ue([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),ws=ue(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),ks=ue(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),Ss=ue(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Cs=ue(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),Rs=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),As=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),wt=ue(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Os=ue([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Ps=ue(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),$s=ue(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),wr=ue(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Ts=ue(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Es=ue(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Is=Array.prototype,Ut=Is.splice;function Ls(v,C,A,R){var _=cn,x=-1,y=C.length,s=v;for(v===C&&(C=ln(C));++x<y;)for(var g=0,m=C[x],u=m;(g=_(s,u,g))>-1;)s!==v&&Ut.call(s,g,1),Ut.call(v,g,1);return v}function Ds(v,C){return v&&v.length&&C&&C.length?Ls(v,C):v}var qs=dn(Ds);const Ms={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function kr({label:v="",disabled:C=!1,required:A=!1,initialValue:R="",onChange:_=()=>{},style:x={},onSubmit:y=()=>{},triggers:s=[],options:g=[],formatterBeforeSubmit:m=i=>i.join(","),helperText:u="",placeholder:t="",renderImage:o=()=>null,renderLabel:a=()=>"",filterKeys:n=["name"],noEmpty:r=!1,...c}){const[i,l]=D.useState(!1),[d,p]=D.useState(!1),[f,k]=D.useState(""),S=D.useRef(null),[h,b]=D.useState(R),[j,w]=D.useState(h),P=D.useMemo(()=>{if(!g)return{};const F={};return g.forEach(L=>{F[L.code]=L}),F},[g]),$=()=>{if(!g)return[];if(!f)return g.map(L=>L.code);const F=new RegExp(f.toLowerCase());return g.filter(L=>{for(let H=0;H<n.length;H++){const W=n[H];if(F.test(L[W]?.toLowerCase()))return!0}return!1}).map(L=>L.code)},I=async()=>{p(!0);try{await y(typeof m=="function"?m(j):j)===!1?w(h):r&&!j.length?(w(R),b(R)):(w(j),b(j))}catch{w(h)}finally{p(!1),l(!1)}},q=(F,L)=>{if(!Array.isArray(L)){w([]),_([]);return}const H=L.filter(W=>P[W]);if(!H.length){w([]),_([]);return}w(H),_(H)},Z=F=>{F.stopPropagation(),l(!0),setTimeout(()=>{if(S.current){const L=S.current.querySelector("input");L&&L.focus()}},500)},K=i?e.jsx(cs,{ref:S,options:g,value:j,onChange:q,inputValue:f,onInputChange:(F,L)=>{k(L)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:$,getOptionLabel:F=>P[F]?.name,renderInput:F=>e.jsx(N,{...F,label:"",placeholder:t}),renderOption:(F,L)=>{const H=j.indexOf(L)!==-1;return D.createElement(zs,{component:"li",...F,key:L},o(P[L]||{}),e.jsx(O,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:H?"700":"normal"},children:a(L,P[L])||P[L]?.name}),e.jsx(O,{component:Dt,sx:{opacity:.5,width:18,height:18},style:{visibility:H?"visible":"hidden"}}))},...c,slots:{popper:Bs}}):e.jsx(O,{className:"form-item-input slot",onClick:Z,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:j.filter(F=>g.some(L=>L.code===F)).map(F=>e.jsx(Rt,{label:g.find(L=>L.code===F).name,style:{marginRight:8},size:"small"},F))});return e.jsx(es,{className:"form",style:x,children:e.jsxs(O,{className:"form-item",children:[e.jsxs(O,{className:"form-item-label",children:[v,A&&e.jsx(ts,{})]}),e.jsxs(O,{className:"form-item-body",children:[e.jsx(O,{className:"form-item-input",children:K}),i?e.jsx(O,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ce,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:C||d,size:"large",children:d?e.jsx(ze,{size:24}):e.jsx(ls,{})}),e.jsx(ce,{"data-cy":"schema-form-item-cancel",onClick:()=>{w(h),l(!1)},disabled:C||d,size:"large",children:e.jsx(Dt,{})})]})}):null]}),i&&u&&e.jsx(sr,{children:u})]})})}kr.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const zs=ve.div`
|
|
1
|
+
import{aF as ue,j as e,hk as ln,hl as cn,bR as dn,r as D,s as ve,J as P,f6 as Dt,t as N,eP as Rt,a4 as ce,C as Be,bj as sr,dM as un,o as T,hm as hn,b3 as ir,cB as mn,cV as fn,dr as pn,T as X,dI as xt,bo as Q,bF as At,p as he,hn as gn,bG as Pt,b as Y,bh as te,bB as le,H as z,aW as ae,V as ne,n as ar,q as yn,w as or,ad as xn,i as lr,gf as vn,ho as bn,au as jn,aV as se,R as qe,$ as we,D as _n,U as wn,v as J,X as vt,hp as kn,hq as Sn,eB as Cn,eD as Rn,gs as Ce,aH as V,g4 as An,d1 as qt,W as Pn,fo as cr,N as oe,aR as Mt,hr as On,hs as $n,be as Tn,gm as Ee,fa as je,aP as pe,aT as E,ht as it,hu as bt,O as U,z as En,y as ke,bE as _e,dJ as G,hv as Ot,aD as re,fI as Ue,F as In,f as $e,cy as Ln,cP as de,c8 as Pe,gl as be,hw as Re,hx as Me,a2 as dr,eE as Dn,hy as qn,bA as jt,K as Mn,cI as ur,bt as Bn,hz as zn,ba as Hn,L as Nn,cw as We,aJ as Xe,hA as Fn,Q as Zn,bq as Wn,ag as Bt,a3 as hr,bk as Qe,hB as mr,b7 as Vn,gG as Oe,fb as fr,c$ as pr,B as Un,b6 as zt,fd as Kn,fi as Jn,G as at,I as Gn,by as Yn}from"./index-D78suzy2.js";import{S as Xn}from"./actions-Cx5UWmFM.js";import{N as Ht}from"./ChevronRight-BntDfQzc.js";import{T as Ve}from"./html-title-DD44mmgD.js";import{w as ze,P as Qn}from"./permission-CCNK9jT0.js";import{u as $t}from"./index-D7HZBvR8.js";import{F as es,R as ts,S as M,a as _t,s as rs,L as Ae,A as ns,b as ss,c as is,d as as,B as os}from"./preference-CL8oQs4K.js";import{D as ls}from"./Done-CEn2z4YZ.js";import{A as cs,a as Nt}from"./Autocomplete-B4QHA8fQ.js";import{C as ds,R as us,S as hs,P as ms}from"./rotate-session-key-B9uPds9f.js";import{u as ie}from"./blocklet-DOEd7Lt0.js";import{C as gr}from"./click-to-copy-DsEvNuW1.js";import{u as et}from"./team-DI44e0Lq.js";import{v as yr}from"./index-uV9pYRNo.js";import{g as fs}from"./chain-DxgLFRf-.js";import{V as ps}from"./status-CjV3xdMN.js";import{a as me,S as gs,u as xr}from"./switch-control-CVj0L-9B.js";import{u as fe,C as B,b as Ft}from"./index.esm-mNR4f2BF.js";import{I as ys,J as xs,K as vs,L as bs}from"./index-Deye8jzv.js";import{S as Ye}from"./simple-select-ZER_8WgH.js";import{D as Zt}from"./Delete-BeglY8dh.js";import{A as Wt}from"./Add-B60k0zLe.js";import{H as tt}from"./index-Eiq737ML.js";import{u as vr}from"./use-mobile-p7bScsU1.js";import{C as js}from"./CardContent-LxDdD1ia.js";import{R as br,a as jr}from"./url-evaluation-Dz0qWdnw.js";import"./useLocalStorage-CGOwOi-p.js";import"./MoreVert-uETYsy_E.js";import"./DeleteOutline-BDLlQ3k7.js";import"./get-safe-url-BgeSRCM1.js";import"./ButtonGroup-CwgnAVvA.js";import"./getValidReactChildren-c-3WOl4y.js";import"./omit-BGJcae02.js";import"./index-BU4T_Wvp.js";import"./edit.svg-CuloKtQk.js";import"./ArrowDropDown-D9C6bexH.js";import"./index-CwUZ9am0.js";import"./iframe-Qu-nVscQ.js";import"./ListSubheader-fV4wdcMl.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-C8or5W5q.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-CLDlsWBv.js";import"./CSSTransition-CTMK0QDG.js";import"./emotion-cache.browser.esm-BSPYCi-c.js";import"./depsEqual-CzPGJZq9.js";import"./TableSearch-fEXgtTVk.js";import"./Search-btz9KaC-.js";import"./Clear-RDv89tkq.js";const _r=ue([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),_s=ue([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),ws=ue(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),ks=ue(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),Ss=ue(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Cs=ue(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),Rs=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),As=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),wt=ue(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Ps=ue([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Os=ue(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),$s=ue(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),wr=ue(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Ts=ue(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Es=ue(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Is=Array.prototype,Vt=Is.splice;function Ls(v,C,A,R){var _=cn,x=-1,y=C.length,s=v;for(v===C&&(C=ln(C));++x<y;)for(var g=0,m=C[x],u=m;(g=_(s,u,g))>-1;)s!==v&&Vt.call(s,g,1),Vt.call(v,g,1);return v}function Ds(v,C){return v&&v.length&&C&&C.length?Ls(v,C):v}var qs=dn(Ds);const Ms={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function kr({label:v="",disabled:C=!1,required:A=!1,initialValue:R="",onChange:_=()=>{},style:x={},onSubmit:y=()=>{},triggers:s=[],options:g=[],formatterBeforeSubmit:m=i=>i.join(","),helperText:u="",placeholder:t="",renderImage:o=()=>null,renderLabel:a=()=>"",filterKeys:n=["name"],noEmpty:r=!1,...c}){const[i,l]=D.useState(!1),[d,p]=D.useState(!1),[f,k]=D.useState(""),S=D.useRef(null),[h,b]=D.useState(R),[j,w]=D.useState(h),O=D.useMemo(()=>{if(!g)return{};const F={};return g.forEach(L=>{F[L.code]=L}),F},[g]),$=()=>{if(!g)return[];if(!f)return g.map(L=>L.code);const F=new RegExp(f.toLowerCase());return g.filter(L=>{for(let H=0;H<n.length;H++){const W=n[H];if(F.test(L[W]?.toLowerCase()))return!0}return!1}).map(L=>L.code)},I=async()=>{p(!0);try{await y(typeof m=="function"?m(j):j)===!1?w(h):r&&!j.length?(w(R),b(R)):(w(j),b(j))}catch{w(h)}finally{p(!1),l(!1)}},q=(F,L)=>{if(!Array.isArray(L)){w([]),_([]);return}const H=L.filter(W=>O[W]);if(!H.length){w([]),_([]);return}w(H),_(H)},Z=F=>{F.stopPropagation(),l(!0),setTimeout(()=>{if(S.current){const L=S.current.querySelector("input");L&&L.focus()}},500)},K=i?e.jsx(cs,{ref:S,options:g,value:j,onChange:q,inputValue:f,onInputChange:(F,L)=>{k(L)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:$,getOptionLabel:F=>O[F]?.name,renderInput:F=>e.jsx(N,{...F,label:"",placeholder:t}),renderOption:(F,L)=>{const H=j.indexOf(L)!==-1;return D.createElement(Bs,{component:"li",...F,key:L},o(O[L]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:H?"700":"normal"},children:a(L,O[L])||O[L]?.name}),e.jsx(P,{component:Dt,sx:{opacity:.5,width:18,height:18},style:{visibility:H?"visible":"hidden"}}))},...c,slots:{popper:zs}}):e.jsx(P,{className:"form-item-input slot",onClick:Z,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:j.filter(F=>g.some(L=>L.code===F)).map(F=>e.jsx(Rt,{label:g.find(L=>L.code===F).name,style:{marginRight:8},size:"small"},F))});return e.jsx(es,{className:"form",style:x,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[v,A&&e.jsx(ts,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:K}),i?e.jsx(P,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ce,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:C||d,size:"large",children:d?e.jsx(Be,{size:24}):e.jsx(ls,{})}),e.jsx(ce,{"data-cy":"schema-form-item-cancel",onClick:()=>{w(h),l(!1)},disabled:C||d,size:"large",children:e.jsx(Dt,{})})]})}):null]}),i&&u&&e.jsx(sr,{children:u})]})})}kr.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const Bs=ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
5
5
|
height: 48px;
|
|
6
6
|
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
7
7
|
font-size: 1.1em;
|
|
8
|
-
`,Bs=ve(un)(()=>({[`& .${Nt.paper}`]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},[`& .${Nt.listbox}`]:{padding:0}}));function kt({name:v,icon:C,did:A,dark:R=!1}){return e.jsx(hn,{prefer:R?"dark":"light",children:e.jsx(O,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(ir,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(mn,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:C?e.jsx(fn,{src:C,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(pn,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(O,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(X,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v}),e.jsx(xt,{did:A,inline:!0,size:13})]})]})})})}kt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var Sr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Sr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Cr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Cr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Rr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .7569 .7608 .7647)",fillOpacity:"1"}}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Rr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Ar=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .3 .3 .3)",fillOpacity:"1"}}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Ar.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Or=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#1E4DCF",style:{fill:"color(display-p3 .1176 .302 .8118)",fillOpacity:"1"},d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("path",{d:"M32 44c0-6.627 5.373-12 12-12h760v184H32V44Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},shapeRendering:"crispEdges"}),e.jsx("path",{d:"M76.565 126H32v90h772V43H159.565c-11.017 0-16.525 0-20.822 1.928a22 22 0 0 0-11.065 11.065c-1.928 4.297-1.928 9.806-1.928 20.822 0 16.024 0 24.035-2.805 30.286a31.997 31.997 0 0 1-16.094 16.094C100.6 126 92.589 126 76.565 126Z",fill:"#F1F3F4",style:{fill:"color(display-p3 .9451 .9529 .9569)",fillOpacity:"1"}}),e.jsx("path",{d:"M206.571 72.046h2.991l4.56 7.934h.188l4.559-7.934h2.992l-6.333 10.602V89.5h-2.625v-6.852l-6.332-10.602Zm20.93 17.718c-1.228 0-2.299-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.506-1.012-.759-2.194-.759-3.546 0-1.358.253-2.545.759-3.562s1.216-1.807 2.131-2.37c.914-.562 1.985-.843 3.213-.843 1.227 0 2.298.28 3.213.843s1.625 1.353 2.13 2.37c.506 1.017.759 2.204.759 3.562 0 1.353-.253 2.534-.759 3.546-.505 1.011-1.215 1.798-2.13 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.522-.421.909-.98 1.159-1.68.255-.698.383-1.468.383-2.31 0-.834-.128-1.602-.383-2.3-.25-.705-.637-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.801 0-1.466.213-1.994.64-.523.426-.912.991-1.168 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.256.698.645 1.258 1.168 1.678.528.42 1.193.631 1.994.631Zm17.231-3.554v-7.662h2.557V89.5h-2.506v-2.267h-.136c-.301.699-.784 1.281-1.449 1.747-.659.46-1.48.69-2.463.69-.841 0-1.585-.184-2.233-.553-.642-.376-1.148-.93-1.517-1.663-.364-.732-.546-1.639-.546-2.718v-8.327h2.549v8.02c0 .892.247 1.602.741 2.13.495.53 1.137.793 1.926.793.478 0 .952-.119 1.424-.358.477-.238.872-.6 1.184-1.082.318-.483.475-1.097.469-1.841Zm5.981 5.429V76.41h2.463v2.079h.136a3.164 3.164 0 0 1 1.262-1.662 3.608 3.608 0 0 1 2.062-.614 10.87 10.87 0 0 1 1.083.06v2.437a4.633 4.633 0 0 0-.546-.093 5.2 5.2 0 0 0-.784-.06c-.602 0-1.139.128-1.611.383a2.851 2.851 0 0 0-1.517 2.566V89.5h-2.548Zm25.287-12.87c-.091-.806-.466-1.431-1.125-1.874-.659-.45-1.489-.674-2.489-.674-.716 0-1.335.114-1.858.341-.523.222-.929.529-1.219.92a2.173 2.173 0 0 0-.426 1.322c0 .414.097.772.29 1.074.199.3.457.554.776.758.324.199.67.367 1.039.503.37.13.725.239 1.066.324l1.704.443c.557.136 1.128.321 1.713.554.586.233 1.128.54 1.628.92.5.381.904.853 1.21 1.415.313.563.469 1.236.469 2.02 0 .989-.255 1.867-.767 2.634-.506.767-1.241 1.372-2.207 1.815-.96.443-2.122.665-3.486.665-1.307 0-2.438-.208-3.392-.622-.955-.415-1.702-1.003-2.242-1.765-.539-.767-.838-1.676-.894-2.727h2.642c.051.63.255 1.156.613 1.577a3.32 3.32 0 0 0 1.389.929 5.622 5.622 0 0 0 1.867.298c.744 0 1.406-.116 1.986-.35.585-.238 1.045-.567 1.38-.988.336-.426.503-.923.503-1.491 0-.517-.147-.94-.443-1.27-.29-.33-.685-.603-1.185-.819a11.558 11.558 0 0 0-1.679-.57l-2.062-.563c-1.398-.38-2.506-.94-3.324-1.679-.812-.739-1.219-1.716-1.219-2.932 0-1.005.273-1.883.819-2.633.545-.75 1.284-1.333 2.215-1.748.932-.42 1.983-.63 3.154-.63 1.182 0 2.224.207 3.128.622.909.415 1.625.986 2.147 1.713.523.722.796 1.551.819 2.489h-2.54Zm5.721 12.87V76.41h2.548V89.5h-2.548Zm1.287-15.11c-.444 0-.824-.148-1.142-.444a1.44 1.44 0 0 1-.469-1.074c0-.42.156-.778.469-1.074a1.602 1.602 0 0 1 1.142-.451c.443 0 .821.15 1.133.451.318.296.477.654.477 1.074 0 .415-.159.773-.477 1.074-.312.296-.69.443-1.133.443Zm10.8 2.02v2.044h-7.151V76.41h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.222 1.117.148.244.338.412.571.503.239.085.497.127.776.127.204 0 .383-.014.537-.042l.357-.068.461 2.105a4.29 4.29 0 0 1-.631.17 4.998 4.998 0 0 1-1.023.103 4.49 4.49 0 0 1-1.875-.359 3.22 3.22 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V73.273Zm13.553 16.491c-1.289 0-2.4-.275-3.332-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.21-1.82 2.114-2.395.909-.573 1.971-.86 3.187-.86.739 0 1.455.122 2.148.366a5.213 5.213 0 0 1 1.867 1.15c.551.523.985 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.137-1.264-.409-1.78a3.098 3.098 0 0 0-1.151-1.236c-.489-.302-1.062-.452-1.722-.452-.715 0-1.34.176-1.875.528a3.55 3.55 0 0 0-1.227 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.153 1.619.46 2.233.313.613.747 1.082 1.304 1.406.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.85 2.85 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.745.29-1.594.434-2.549.434Zm29.088-17.718V89.5h-2.42l-8.872-12.801h-.162V89.5h-2.634V72.046h2.438l8.881 12.818h.161V72.045h2.608Zm7.447 17.744c-.829 0-1.579-.154-2.25-.46a3.793 3.793 0 0 1-1.594-1.356c-.386-.59-.579-1.315-.579-2.173 0-.739.142-1.347.426-1.824a3.145 3.145 0 0 1 1.151-1.133 5.998 5.998 0 0 1 1.619-.63c.596-.143 1.204-.25 1.824-.325l1.909-.221c.488-.063.844-.162 1.065-.299.222-.136.333-.358.333-.665v-.06c0-.743-.211-1.32-.631-1.73-.415-.408-1.034-.613-1.858-.613-.858 0-1.534.19-2.028.571-.489.375-.827.793-1.015 1.253l-2.395-.546c.285-.795.699-1.437 1.245-1.926a5.043 5.043 0 0 1 1.9-1.074 7.424 7.424 0 0 1 2.259-.34c.523 0 1.077.062 1.662.187a4.86 4.86 0 0 1 1.653.665c.517.324.941.787 1.27 1.39.33.596.494 1.371.494 2.326V89.5h-2.488v-1.79h-.103c-.164.33-.411.654-.741.972-.33.318-.753.582-1.27.792-.517.21-1.136.316-1.858.316Zm.554-2.046c.705 0 1.307-.139 1.807-.417.506-.279.889-.642 1.151-1.091.267-.455.4-.94.4-1.458v-1.687c-.091.09-.267.176-.528.256-.256.074-.549.139-.878.196-.33.05-.651.099-.963.144-.313.04-.574.074-.784.103a6.307 6.307 0 0 0-1.355.315c-.404.148-.728.36-.972.64-.239.272-.358.636-.358 1.09 0 .63.233 1.108.699 1.432.466.318 1.06.477 1.781.477Zm9.301 1.756V76.41h2.446v2.13h.162a3.374 3.374 0 0 1 1.338-1.688c.619-.409 1.36-.613 2.224-.613.875 0 1.608.204 2.199.613.596.41 1.037.972 1.321 1.688h.136a3.687 3.687 0 0 1 1.492-1.67c.682-.421 1.494-.631 2.437-.631 1.188 0 2.157.372 2.907 1.116.755.744 1.133 1.867 1.133 3.367V89.5h-2.548v-8.54c0-.886-.242-1.528-.725-1.926-.483-.398-1.059-.597-1.73-.597-.829 0-1.474.256-1.934.767-.461.506-.691 1.157-.691 1.952V89.5h-2.54v-8.702c0-.71-.221-1.281-.664-1.713-.444-.432-1.02-.647-1.73-.647-.483 0-.929.127-1.339.383-.403.25-.73.6-.98 1.048-.244.45-.366.97-.366 1.56V89.5h-2.548Zm26.853.264c-1.29 0-2.401-.275-3.333-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.211-1.82 2.114-2.395.909-.573 1.972-.86 3.188-.86.738 0 1.454.122 2.147.366a5.205 5.205 0 0 1 1.867 1.15c.551.523.986 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.136-1.264-.409-1.78a3.091 3.091 0 0 0-1.151-1.236c-.488-.302-1.062-.452-1.721-.452-.716 0-1.341.176-1.875.528a3.545 3.545 0 0 0-1.228 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.154 1.619.46 2.233a3.336 3.336 0 0 0 1.304 1.406c.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.842 2.842 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.744.29-1.594.434-2.548.434ZM85 161.333H62.477l7.574-7.46-2.393-2.366L56 163.007l11.658 11.5 2.393-2.367-7.575-7.459H85v-3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{opacity:".4",d:"M106 164.681h22.524l-7.575 7.46 2.393 2.366 11.658-11.5-11.658-11.5-2.393 2.366 7.575 7.46H106v3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"m181.89 164.538-3.225-.385a9.734 9.734 0 0 1-8.859 8.543 9.74 9.74 0 0 1-5.382-18.303 9.738 9.738 0 0 1 12.074 2.387h-4.055v3.25h9.664v-9.664h-3.249v4.187a12.842 12.842 0 0 0-6.064-3.985 12.995 12.995 0 0 0-13.833 4.172 12.994 12.994 0 0 0-1.431 14.376 13.2 13.2 0 0 0 2.286 3.106 12.987 12.987 0 0 0 13.436 3.071 12.992 12.992 0 0 0 8.638-10.74v-.015Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"M208 161.7c0-12.321 0-18.482 2.398-23.188a22.002 22.002 0 0 1 9.614-9.614c4.706-2.398 10.867-2.398 23.188-2.398H804v73H243.2c-12.321 0-18.482 0-23.188-2.398a22.002 22.002 0 0 1-9.614-9.614C208 182.782 208 176.621 208 164.3v-2.6Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"}})]}),e.jsx("rect",{x:"229",y:"145",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}}),e.jsx("rect",{x:"203",y:"66",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},d:"M0 0h384v216H0z"})}),e.jsxs("filter",{id:"b",x:"-21.333",y:"-3.556",width:"878.667",height:"290.667",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_13_53"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_13_53",result:"shape"})]})]})]})};Or.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Hs=Object.keys(Y.SUPPORTED_LANGUAGES).map(v=>({code:v,name:Y.SUPPORTED_LANGUAGES[v].nativeName,enName:Y.SUPPORTED_LANGUAGES[v].name})),Ns=["name","enName","code"];function Tt({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1,showFields:R=[],..._}){const{api:x,prefix:y,getSessionInHeader:s}=Q(),{t:g}=D.useContext(he),[m,u]=$t({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=m.loading||!A,{logoUrl:o,logoDarkUrl:a,rectLogoUrl:n,rectLogoDarkUrl:r,faviconUrl:c,splashPortraitUrl:i,splashLandscapeUrl:l,ogImageUrl:d}=gn({blocklet:v});if(Ot(v.status))return null;const p=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),f=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),k=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),S=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),h=[{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:g("blocklet.config.name"),description:g("blocklet.config.nameDesc"),value:v.environments.find(j=>j.key==="BLOCKLET_APP_NAME").value},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:g("blocklet.config.description"),description:g("blocklet.config.descriptionDesc"),value:v.environments.find(j=>j.key==="BLOCKLET_APP_DESCRIPTION").value},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:g("blocklet.config.appUrl"),description:g("blocklet.config.appUrlDesc"),value:f?f.value:""},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:g("blocklet.config.copyrightOwner"),description:g("blocklet.config.copyrightDesc"),value:k?k.value:""},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:g("blocklet.config.copyrightYear"),description:g("blocklet.config.copyrightDesc"),value:S?S.value:""}],b=async(j,w)=>{const P=[{key:j,value:w}];try{u({loading:!0});const{blocklet:$}=await x.configBlocklet({input:{did:v.meta.did,configs:P}});C($)}catch($){B.error($.message)}finally{u({loading:!1})}};return e.jsxs(Us,{..._,children:[(!R.length||R.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.baseInfo")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.baseInfoDesc")})]}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}})]}),(R.length?h.filter(j=>R.includes(j.key)):h).map(j=>e.jsxs(e.Fragment,{children:[e.jsx(M,{title:j.title,desc:j.description,children:e.jsx(_t,{style:{marginTop:0},disabled:t,loading:m.loading,initialValue:rs.escapeTag(j.value),placeholder:j.title,onSubmit:w=>b(j.key,w),validate:j.validate})},j.key),e.jsx(O,{className:"config-form",component:te,sx:{my:3}})]})),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.languages"),desc:g("blocklet.config.languagesDesc"),children:e.jsx(kr,{style:{marginTop:0},disabled:t,loading:m.loading,options:Hs,noEmpty:!0,initialValue:p?p.value.split(","):["en","zh"],onSubmit:j=>b("BLOCKLET_APP_LANGUAGES",j),helperText:g("blocklet.config.selectLanguagesTip"),placeholder:g("blocklet.config.languagesSearch"),filterKeys:Ns,renderLabel:(j,w)=>w.name===w.enName?`${w.name} (${j.toUpperCase()})`:`${w.name}, ${w.enName} (${j.toUpperCase()})`})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{mt:6},children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.logoSettings")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.logoSettingsDesc")}),e.jsx(X,{variant:"body2",sx:{color:"warning.main"},children:g("blocklet.config.changeImageTip")})]}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}})]}),e.jsxs(Vs,{children:[(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoSquare"),desc:`${g("blocklet.config.logoSquareDesc")}
|
|
9
|
-
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(
|
|
10
|
-
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(
|
|
8
|
+
`,zs=ve(un)(()=>({[`& .${Nt.paper}`]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},[`& .${Nt.listbox}`]:{padding:0}}));function kt({name:v,icon:C,did:A,dark:R=!1}){return e.jsx(hn,{prefer:R?"dark":"light",children:e.jsx(P,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(ir,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(mn,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:C?e.jsx(fn,{src:C,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(pn,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(P,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(X,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v}),e.jsx(xt,{did:A,inline:!0,size:13})]})]})})})}kt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var Sr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Sr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Cr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Cr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Rr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .7569 .7608 .7647)",fillOpacity:"1"}}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Rr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Ar=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .3 .3 .3)",fillOpacity:"1"}}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Ar.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Pr=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#1E4DCF",style:{fill:"color(display-p3 .1176 .302 .8118)",fillOpacity:"1"},d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("path",{d:"M32 44c0-6.627 5.373-12 12-12h760v184H32V44Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},shapeRendering:"crispEdges"}),e.jsx("path",{d:"M76.565 126H32v90h772V43H159.565c-11.017 0-16.525 0-20.822 1.928a22 22 0 0 0-11.065 11.065c-1.928 4.297-1.928 9.806-1.928 20.822 0 16.024 0 24.035-2.805 30.286a31.997 31.997 0 0 1-16.094 16.094C100.6 126 92.589 126 76.565 126Z",fill:"#F1F3F4",style:{fill:"color(display-p3 .9451 .9529 .9569)",fillOpacity:"1"}}),e.jsx("path",{d:"M206.571 72.046h2.991l4.56 7.934h.188l4.559-7.934h2.992l-6.333 10.602V89.5h-2.625v-6.852l-6.332-10.602Zm20.93 17.718c-1.228 0-2.299-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.506-1.012-.759-2.194-.759-3.546 0-1.358.253-2.545.759-3.562s1.216-1.807 2.131-2.37c.914-.562 1.985-.843 3.213-.843 1.227 0 2.298.28 3.213.843s1.625 1.353 2.13 2.37c.506 1.017.759 2.204.759 3.562 0 1.353-.253 2.534-.759 3.546-.505 1.011-1.215 1.798-2.13 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.522-.421.909-.98 1.159-1.68.255-.698.383-1.468.383-2.31 0-.834-.128-1.602-.383-2.3-.25-.705-.637-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.801 0-1.466.213-1.994.64-.523.426-.912.991-1.168 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.256.698.645 1.258 1.168 1.678.528.42 1.193.631 1.994.631Zm17.231-3.554v-7.662h2.557V89.5h-2.506v-2.267h-.136c-.301.699-.784 1.281-1.449 1.747-.659.46-1.48.69-2.463.69-.841 0-1.585-.184-2.233-.553-.642-.376-1.148-.93-1.517-1.663-.364-.732-.546-1.639-.546-2.718v-8.327h2.549v8.02c0 .892.247 1.602.741 2.13.495.53 1.137.793 1.926.793.478 0 .952-.119 1.424-.358.477-.238.872-.6 1.184-1.082.318-.483.475-1.097.469-1.841Zm5.981 5.429V76.41h2.463v2.079h.136a3.164 3.164 0 0 1 1.262-1.662 3.608 3.608 0 0 1 2.062-.614 10.87 10.87 0 0 1 1.083.06v2.437a4.633 4.633 0 0 0-.546-.093 5.2 5.2 0 0 0-.784-.06c-.602 0-1.139.128-1.611.383a2.851 2.851 0 0 0-1.517 2.566V89.5h-2.548Zm25.287-12.87c-.091-.806-.466-1.431-1.125-1.874-.659-.45-1.489-.674-2.489-.674-.716 0-1.335.114-1.858.341-.523.222-.929.529-1.219.92a2.173 2.173 0 0 0-.426 1.322c0 .414.097.772.29 1.074.199.3.457.554.776.758.324.199.67.367 1.039.503.37.13.725.239 1.066.324l1.704.443c.557.136 1.128.321 1.713.554.586.233 1.128.54 1.628.92.5.381.904.853 1.21 1.415.313.563.469 1.236.469 2.02 0 .989-.255 1.867-.767 2.634-.506.767-1.241 1.372-2.207 1.815-.96.443-2.122.665-3.486.665-1.307 0-2.438-.208-3.392-.622-.955-.415-1.702-1.003-2.242-1.765-.539-.767-.838-1.676-.894-2.727h2.642c.051.63.255 1.156.613 1.577a3.32 3.32 0 0 0 1.389.929 5.622 5.622 0 0 0 1.867.298c.744 0 1.406-.116 1.986-.35.585-.238 1.045-.567 1.38-.988.336-.426.503-.923.503-1.491 0-.517-.147-.94-.443-1.27-.29-.33-.685-.603-1.185-.819a11.558 11.558 0 0 0-1.679-.57l-2.062-.563c-1.398-.38-2.506-.94-3.324-1.679-.812-.739-1.219-1.716-1.219-2.932 0-1.005.273-1.883.819-2.633.545-.75 1.284-1.333 2.215-1.748.932-.42 1.983-.63 3.154-.63 1.182 0 2.224.207 3.128.622.909.415 1.625.986 2.147 1.713.523.722.796 1.551.819 2.489h-2.54Zm5.721 12.87V76.41h2.548V89.5h-2.548Zm1.287-15.11c-.444 0-.824-.148-1.142-.444a1.44 1.44 0 0 1-.469-1.074c0-.42.156-.778.469-1.074a1.602 1.602 0 0 1 1.142-.451c.443 0 .821.15 1.133.451.318.296.477.654.477 1.074 0 .415-.159.773-.477 1.074-.312.296-.69.443-1.133.443Zm10.8 2.02v2.044h-7.151V76.41h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.222 1.117.148.244.338.412.571.503.239.085.497.127.776.127.204 0 .383-.014.537-.042l.357-.068.461 2.105a4.29 4.29 0 0 1-.631.17 4.998 4.998 0 0 1-1.023.103 4.49 4.49 0 0 1-1.875-.359 3.22 3.22 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V73.273Zm13.553 16.491c-1.289 0-2.4-.275-3.332-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.21-1.82 2.114-2.395.909-.573 1.971-.86 3.187-.86.739 0 1.455.122 2.148.366a5.213 5.213 0 0 1 1.867 1.15c.551.523.985 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.137-1.264-.409-1.78a3.098 3.098 0 0 0-1.151-1.236c-.489-.302-1.062-.452-1.722-.452-.715 0-1.34.176-1.875.528a3.55 3.55 0 0 0-1.227 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.153 1.619.46 2.233.313.613.747 1.082 1.304 1.406.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.85 2.85 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.745.29-1.594.434-2.549.434Zm29.088-17.718V89.5h-2.42l-8.872-12.801h-.162V89.5h-2.634V72.046h2.438l8.881 12.818h.161V72.045h2.608Zm7.447 17.744c-.829 0-1.579-.154-2.25-.46a3.793 3.793 0 0 1-1.594-1.356c-.386-.59-.579-1.315-.579-2.173 0-.739.142-1.347.426-1.824a3.145 3.145 0 0 1 1.151-1.133 5.998 5.998 0 0 1 1.619-.63c.596-.143 1.204-.25 1.824-.325l1.909-.221c.488-.063.844-.162 1.065-.299.222-.136.333-.358.333-.665v-.06c0-.743-.211-1.32-.631-1.73-.415-.408-1.034-.613-1.858-.613-.858 0-1.534.19-2.028.571-.489.375-.827.793-1.015 1.253l-2.395-.546c.285-.795.699-1.437 1.245-1.926a5.043 5.043 0 0 1 1.9-1.074 7.424 7.424 0 0 1 2.259-.34c.523 0 1.077.062 1.662.187a4.86 4.86 0 0 1 1.653.665c.517.324.941.787 1.27 1.39.33.596.494 1.371.494 2.326V89.5h-2.488v-1.79h-.103c-.164.33-.411.654-.741.972-.33.318-.753.582-1.27.792-.517.21-1.136.316-1.858.316Zm.554-2.046c.705 0 1.307-.139 1.807-.417.506-.279.889-.642 1.151-1.091.267-.455.4-.94.4-1.458v-1.687c-.091.09-.267.176-.528.256-.256.074-.549.139-.878.196-.33.05-.651.099-.963.144-.313.04-.574.074-.784.103a6.307 6.307 0 0 0-1.355.315c-.404.148-.728.36-.972.64-.239.272-.358.636-.358 1.09 0 .63.233 1.108.699 1.432.466.318 1.06.477 1.781.477Zm9.301 1.756V76.41h2.446v2.13h.162a3.374 3.374 0 0 1 1.338-1.688c.619-.409 1.36-.613 2.224-.613.875 0 1.608.204 2.199.613.596.41 1.037.972 1.321 1.688h.136a3.687 3.687 0 0 1 1.492-1.67c.682-.421 1.494-.631 2.437-.631 1.188 0 2.157.372 2.907 1.116.755.744 1.133 1.867 1.133 3.367V89.5h-2.548v-8.54c0-.886-.242-1.528-.725-1.926-.483-.398-1.059-.597-1.73-.597-.829 0-1.474.256-1.934.767-.461.506-.691 1.157-.691 1.952V89.5h-2.54v-8.702c0-.71-.221-1.281-.664-1.713-.444-.432-1.02-.647-1.73-.647-.483 0-.929.127-1.339.383-.403.25-.73.6-.98 1.048-.244.45-.366.97-.366 1.56V89.5h-2.548Zm26.853.264c-1.29 0-2.401-.275-3.333-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.211-1.82 2.114-2.395.909-.573 1.972-.86 3.188-.86.738 0 1.454.122 2.147.366a5.205 5.205 0 0 1 1.867 1.15c.551.523.986 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.136-1.264-.409-1.78a3.091 3.091 0 0 0-1.151-1.236c-.488-.302-1.062-.452-1.721-.452-.716 0-1.341.176-1.875.528a3.545 3.545 0 0 0-1.228 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.154 1.619.46 2.233a3.336 3.336 0 0 0 1.304 1.406c.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.842 2.842 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.744.29-1.594.434-2.548.434ZM85 161.333H62.477l7.574-7.46-2.393-2.366L56 163.007l11.658 11.5 2.393-2.367-7.575-7.459H85v-3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{opacity:".4",d:"M106 164.681h22.524l-7.575 7.46 2.393 2.366 11.658-11.5-11.658-11.5-2.393 2.366 7.575 7.46H106v3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"m181.89 164.538-3.225-.385a9.734 9.734 0 0 1-8.859 8.543 9.74 9.74 0 0 1-5.382-18.303 9.738 9.738 0 0 1 12.074 2.387h-4.055v3.25h9.664v-9.664h-3.249v4.187a12.842 12.842 0 0 0-6.064-3.985 12.995 12.995 0 0 0-13.833 4.172 12.994 12.994 0 0 0-1.431 14.376 13.2 13.2 0 0 0 2.286 3.106 12.987 12.987 0 0 0 13.436 3.071 12.992 12.992 0 0 0 8.638-10.74v-.015Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"M208 161.7c0-12.321 0-18.482 2.398-23.188a22.002 22.002 0 0 1 9.614-9.614c4.706-2.398 10.867-2.398 23.188-2.398H804v73H243.2c-12.321 0-18.482 0-23.188-2.398a22.002 22.002 0 0 1-9.614-9.614C208 182.782 208 176.621 208 164.3v-2.6Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"}})]}),e.jsx("rect",{x:"229",y:"145",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}}),e.jsx("rect",{x:"203",y:"66",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},d:"M0 0h384v216H0z"})}),e.jsxs("filter",{id:"b",x:"-21.333",y:"-3.556",width:"878.667",height:"290.667",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_13_53"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_13_53",result:"shape"})]})]})]})};Pr.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Hs=Object.keys(Y.SUPPORTED_LANGUAGES).map(v=>({code:v,name:Y.SUPPORTED_LANGUAGES[v].nativeName,enName:Y.SUPPORTED_LANGUAGES[v].name})),Ns=["name","enName","code"];function Tt({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1,showFields:R=[],..._}){const{api:x,prefix:y,getSessionInHeader:s}=Q(),{t:g}=D.useContext(he),[m,u]=$t({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=m.loading||!A,{logoUrl:o,logoDarkUrl:a,rectLogoUrl:n,rectLogoDarkUrl:r,faviconUrl:c,splashPortraitUrl:i,splashLandscapeUrl:l,ogImageUrl:d}=gn({blocklet:v});if(Pt(v.status))return null;const p=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),f=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),k=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),S=v.environments.find(j=>j.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),h=[{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:g("blocklet.config.name"),description:g("blocklet.config.nameDesc"),value:v.environments.find(j=>j.key==="BLOCKLET_APP_NAME").value},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:g("blocklet.config.description"),description:g("blocklet.config.descriptionDesc"),value:v.environments.find(j=>j.key==="BLOCKLET_APP_DESCRIPTION").value},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:g("blocklet.config.appUrl"),description:g("blocklet.config.appUrlDesc"),value:f?f.value:""},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:g("blocklet.config.copyrightOwner"),description:g("blocklet.config.copyrightDesc"),value:k?k.value:""},{key:Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:g("blocklet.config.copyrightYear"),description:g("blocklet.config.copyrightDesc"),value:S?S.value:""}],b=async(j,w)=>{const O=[{key:j,value:w}];try{u({loading:!0});const{blocklet:$}=await x.configBlocklet({input:{did:v.meta.did,configs:O}});C($)}catch($){z.error($.message)}finally{u({loading:!1})}};return e.jsxs(Vs,{..._,children:[(!R.length||R.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.baseInfo")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.baseInfoDesc")})]}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(R.length?h.filter(j=>R.includes(j.key)):h).map(j=>e.jsxs(e.Fragment,{children:[e.jsx(M,{title:j.title,desc:j.description,children:e.jsx(_t,{style:{marginTop:0},disabled:t,loading:m.loading,initialValue:rs.escapeTag(j.value),placeholder:j.title,onSubmit:w=>b(j.key,w),validate:j.validate})},j.key),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]})),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.languages"),desc:g("blocklet.config.languagesDesc"),children:e.jsx(kr,{style:{marginTop:0},disabled:t,loading:m.loading,options:Hs,noEmpty:!0,initialValue:p?p.value.split(","):["en","zh"],onSubmit:j=>b("BLOCKLET_APP_LANGUAGES",j),helperText:g("blocklet.config.selectLanguagesTip"),placeholder:g("blocklet.config.languagesSearch"),filterKeys:Ns,renderLabel:(j,w)=>w.name===w.enName?`${w.name} (${j.toUpperCase()})`:`${w.name}, ${w.enName} (${j.toUpperCase()})`})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{sx:{mt:6},children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.logoSettings")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.logoSettingsDesc")}),e.jsx(X,{variant:"body2",sx:{color:"warning.main"},children:g("blocklet.config.changeImageTip")})]}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),e.jsxs(Us,{children:[(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoSquare"),desc:`${g("blocklet.config.logoSquareDesc")}
|
|
9
|
+
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(P,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(X,{variant:"body2",children:g("common.lightMode")}),e.jsx(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(kt,{name:v.environments.find(j=>j.key==="BLOCKLET_APP_NAME").value,icon:o,did:v.meta.did})}),e.jsx(Ae,{did:v.meta.did,width:80,type:"square",prefix:y,url:o,enabled:A,headers:s,aspectRatio:1,children:e.jsx(le,{variant:"outlined",color:"primary",children:g("common.upload")})})]}),e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(X,{variant:"body2",children:g("common.darkMode")}),e.jsx(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(kt,{dark:!0,name:v.environments.find(j=>j.key==="BLOCKLET_APP_NAME").value,icon:a,did:v.meta.did})}),e.jsx(Ae,{did:v.meta.did,width:80,type:"square-dark",prefix:y,url:a,enabled:A,headers:s,aspectRatio:1,children:e.jsx(le,{variant:"outlined",color:"primary",children:g("common.upload")})})]})]})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoRect"),desc:`${g("blocklet.config.logoRectDesc")}`,children:e.jsxs(P,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(X,{variant:"body2",children:g("common.lightMode")}),e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[n?e.jsx(Sr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(Rr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),n&&e.jsx(P,{component:"img",src:n,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Ae,{did:v.meta.did,width:80,height:"auto",type:"rect",prefix:y,url:n,enabled:A,headers:s,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(le,{variant:"outlined",children:g("common.upload")})})]}),e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(X,{variant:"body2",children:g("common.darkMode")}),e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[r?e.jsx(Cr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(Ar,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),r&&e.jsx(P,{component:"img",src:r,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Ae,{did:v.meta.did,width:80,height:"auto",type:"rect-dark",prefix:y,url:r,enabled:A,headers:s,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(le,{variant:"outlined",children:g("common.upload")})})]})]})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoFavicon"),desc:`${g("blocklet.config.logoFaviconDesc")}
|
|
10
|
+
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(Pr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),c&&e.jsx(P,{component:"img",src:c,alt:"app-logo",sx:{position:"absolute",top:45,left:115,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(Ae,{did:v.meta.did,width:80,type:"favicon",prefix:y,url:c,enabled:A,headers:s,aspectRatio:1,children:e.jsx(le,{variant:"outlined",children:g("common.upload")})})]})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.splashPortrait"),desc:g("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs(P,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(Ae,{did:v.meta.did,height:400,width:225,type:"splash-portrait",prefix:y,url:i,enabled:A,headers:s,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx(P,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(Ae,{did:v.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:y,url:l,enabled:A,headers:s,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),(!R.length||R.includes(Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))&&e.jsx(M,{title:g("blocklet.config.ogImage"),desc:g("blocklet.config.ogImageDesc"),children:e.jsx(P,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(Ae,{did:v.meta.did,height:"100%",width:"100%",type:"og-image",prefix:y,url:d,enabled:A,headers:s,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const Fs=ze(Tt,"mutate_blocklets"),Zs=ze(Tt,"",At);function Ws(v){const{inService:C}=Q();return C?e.jsx(Zs,{...v}):e.jsx(Fs,{...v})}Tt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool,showFields:T.array};const Vs=ve(P)`
|
|
11
11
|
max-width: 1536px;
|
|
12
12
|
|
|
13
13
|
.config-form {
|
|
@@ -41,13 +41,13 @@ ${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
41
41
|
.form-item {
|
|
42
42
|
margin-top: 0;
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
44
|
+
`,Us=ve(ae)``,Ks=localStorage.getItem("enableDebug")==="true";function Or({onChange:v=()=>{},disabled:C=!1,loading:A=!1,inService:R=!1}){const{t:_}=ne(),{api:x,session:y}=ar(),{blocklet:s}=ie(),[g,m]=yn({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),u=()=>m({isConnectOpen:!1}),t=()=>{if(lr.isInProgress(s.status)){z.error(_("blocklet.error.isInProgress"));return}m({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(M,{title:_("blocklet.config.migrate.button"),desc:_("blocklet.config.migrate.description"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(le,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:C||A,onClick:t,children:[e.jsx(As,{style:{fontSize:"1.3em",marginRight:4}}),_("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[g.isConnectOpen&&e.jsx(or,{popup:!0,open:g.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:x.get,checkTimeout:5*60*1e3,onSuccess:()=>{v(),R&&y.logout(),u()},extraParams:{appDid:s.appDid},messages:{title:_("setup.keyPair.title"),scan:_("setup.keyPair.scan"),confirm:_("setup.keyPair.confirm"),success:_("setup.keyPair.success")},onClose:u}),g.confirmDialogOpen&&e.jsx(xn,{title:e.jsx(X,{sx:{fontSize:"20px",fontWeight:"500"},children:_("blocklet.config.migrate.title")}),description:e.jsx(X,{sx:{fontSize:"14px",color:"#9397A1"},children:_("blocklet.config.migrate.confirm")}),confirm:_("common.confirm"),cancel:_("common.cancel"),onConfirm:()=>m({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>m({confirmDialogOpen:!1})})]})]})}Or.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function $r({onCancel:v,onSuccess:C,onError:A=()=>{}}){const{api:R}=D.useContext(vn),[_,x]=D.useState(!1),{t:y,locale:s}=ne(),[g,m]=D.useState(""),[u,t]=D.useState(!1),[o,a]=D.useState(0),[n,r]=D.useState(""),{endpoint:c}=et(),[i,l]=D.useState(!1),d=h=>{m(null),x(!0);try{r(h.result),a(k.length-1)}catch(b){const j=vt(b);m(j),A(b)}finally{x(!1)}},p=()=>{t(!0),a(1)},f=()=>{t(!1),a(0)},k=[{body:e.jsxs(P,{children:[e.jsx(X,{children:y("team.transferApp.transferDialog.tips.progress")}),e.jsx(X,{sx:{mt:3,mb:2},children:y("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:y("common.cancel"),confirm:y("team.transferApp.transferDialog.createTransferLink"),onCancel:v,onConfirm:p},{cancel:y("common.cancel"),confirm:y("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(or,{action:"transfer-app-owner",open:u,locale:s,checkFn:R.get,onClose:f,onSuccess:d,checkTimeout:5*60*1e3,extraParams:{},messages:{title:y("team.transferApp.connectDialog.title"),scan:y("team.transferApp.connectDialog.scan"),confirm:y("team.transferApp.connectDialog.confirm"),success:y("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const h=bn({transferId:n.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx(P,{component:Ie,dangerouslySetInnerHTML:{__html:y("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx(P,{component:Ie,sx:{mt:2},children:e.jsx(Ie,{children:y("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs(P,{children:[e.jsx(P,{component:Ie,sx:{mt:2},children:e.jsx(Ie,{children:y("team.transferApp.transferDialog.createSuccessTip2",{expireDate:jn(n.expireDate,s)})})}),e.jsx(P,{sx:{my:1},children:e.jsx(gr,{children:h})})]}),e.jsx("div",{children:e.jsx(se,{value:"end",control:e.jsx(qe,{checked:i,onChange:b=>l(b.target.checked)}),label:y("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:y("common.confirm"),onConfirm:C}],S=k[o];return e.jsxs(we,{title:e.jsx(Ie,{className:"title",children:y("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[S.cancel&&e.jsx(J,{onClick:S.onCancel,color:"inherit",children:S.cancel}),e.jsxs(J,{onClick:S.onConfirm,color:"error",disabled:_||o===k.length-1&&!i,variant:"contained",autoFocus:!0,children:[_&&e.jsx(Be,{size:16}),S.confirm]})]}),children:[e.jsx(_n,{component:"div",children:typeof S.body=="function"?S.body():S.body}),!!g&&e.jsx(wn,{severity:"error",variant:"icon",children:g})]})}$r.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const Ie=ve.div`
|
|
45
45
|
font-size: 16px;
|
|
46
46
|
font-weight: bold;
|
|
47
47
|
&.title {
|
|
48
48
|
font-size: 20px;
|
|
49
49
|
}
|
|
50
|
-
`;var Fe={},ot={exports:{}},Vt;function Js(){return Vt||(Vt=1,function(v,C){(function(A,R){v.exports=R()})(self,()=>{return A={7629:(_,x,y)=>{const s=y(375),g=y(8571),m=y(9474),u=y(1687),t=y(8652),o=y(8160),a=y(3292),n=y(6354),r=y(8901),c=y(9708),i=y(6914),l=y(2294),d=y(6133),p=y(1152),f=y(8863),k=y(2036),S={Base:class{constructor(h){this.type=h,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new l.Ids,this._preferences=null,this._refs=new d.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return s(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...h){return o.verifyFlat(h,"allow"),this._values(h,"_valids")}alter(h){s(h&&typeof h=="object"&&!Array.isArray(h),"Invalid targets argument"),s(!this._inRuleset(),"Cannot set alterations inside a ruleset");const b=this.clone();b.$_terms.alterations=b.$_terms.alterations||[];for(const j in h){const w=h[j];s(typeof w=="function","Alteration adjuster for",j,"must be a function"),b.$_terms.alterations.push({target:j,adjuster:w})}return b.$_temp.ruleset=!1,b}artifact(h){return s(h!==void 0,"Artifact cannot be undefined"),s(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",h)}cast(h){return s(h===!1||typeof h=="string","Invalid to value"),s(h===!1||this._definition.cast[h],"Type",this.type,"does not support casting to",h),this.$_setFlag("cast",h===!1?void 0:h)}default(h,b){return this._default("default",h,b)}description(h){return s(h&&typeof h=="string","Description must be a non-empty string"),this.$_setFlag("description",h)}empty(h){const b=this.clone();return h!==void 0&&(h=b.$_compile(h,{override:!1})),b.$_setFlag("empty",h,{clone:!1})}error(h){return s(h,"Missing error"),s(h instanceof Error||typeof h=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",h)}example(h,b={}){return s(h!==void 0,"Missing example"),o.assertOptions(b,["override"]),this._inner("examples",h,{single:!0,override:b.override})}external(h,b){return typeof h=="object"&&(s(!b,"Cannot combine options with description"),b=h.description,h=h.method),s(typeof h=="function","Method must be a function"),s(b===void 0||b&&typeof b=="string","Description must be a non-empty string"),this._inner("externals",{method:h,description:b},{single:!0})}failover(h,b){return this._default("failover",h,b)}forbidden(){return this.presence("forbidden")}id(h){return h?(s(typeof h=="string","id must be a non-empty string"),s(/^[^\.]+$/.test(h),"id cannot contain period character"),this.$_setFlag("id",h)):this.$_setFlag("id",void 0)}invalid(...h){return this._values(h,"_invalids")}label(h){return s(h&&typeof h=="string","Label name must be a non-empty string"),this.$_setFlag("label",h)}meta(h){return s(h!==void 0,"Meta cannot be undefined"),this._inner("metas",h,{single:!0})}note(...h){s(h.length,"Missing notes");for(const b of h)s(b&&typeof b=="string","Notes must be non-empty strings");return this._inner("notes",h)}only(h=!0){return s(typeof h=="boolean","Invalid mode:",h),this.$_setFlag("only",h)}optional(){return this.presence("optional")}prefs(h){s(h,"Missing preferences"),s(h.context===void 0,"Cannot override context"),s(h.externals===void 0,"Cannot override externals"),s(h.warnings===void 0,"Cannot override warnings"),s(h.debug===void 0,"Cannot override debug"),o.checkPreferences(h);const b=this.clone();return b._preferences=o.preferences(b._preferences,h),b}presence(h){return s(["optional","required","forbidden"].includes(h),"Unknown presence mode",h),this.$_setFlag("presence",h)}raw(h=!0){return this.$_setFlag("result",h?"raw":void 0)}result(h){return s(["raw","strip"].includes(h),"Unknown result mode",h),this.$_setFlag("result",h)}required(){return this.presence("required")}strict(h){const b=this.clone(),j=h!==void 0&&!h;return b._preferences=o.preferences(b._preferences,{convert:j}),b}strip(h=!0){return this.$_setFlag("result",h?"strip":void 0)}tag(...h){s(h.length,"Missing tags");for(const b of h)s(b&&typeof b=="string","Tags must be non-empty strings");return this._inner("tags",h)}unit(h){return s(h&&typeof h=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",h)}valid(...h){o.verifyFlat(h,"valid");const b=this.allow(...h);return b.$_setFlag("only",!!b._valids,{clone:!1}),b}when(h,b){const j=this.clone();j.$_terms.whens||(j.$_terms.whens=[]);const w=a.when(j,h,b);if(!["any","link"].includes(j.type)){const P=w.is?[w]:w.switch;for(const $ of P)s(!$.then||$.then.type==="any"||$.then.type===j.type,"Cannot combine",j.type,"with",$.then&&$.then.type),s(!$.otherwise||$.otherwise.type==="any"||$.otherwise.type===j.type,"Cannot combine",j.type,"with",$.otherwise&&$.otherwise.type)}return j.$_terms.whens.push(w),j.$_mutateRebuild()}cache(h){s(!this._inRuleset(),"Cannot set caching inside a ruleset"),s(!this._cache,"Cannot override schema cache"),s(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const b=this.clone();return b._cache=h||t.provider.provision(),b.$_temp.ruleset=!1,b}clone(){const h=Object.create(Object.getPrototypeOf(this));return this._assign(h)}concat(h){s(o.isSchema(h),"Invalid schema object"),s(this.type==="any"||h.type==="any"||h.type===this.type,"Cannot merge type",this.type,"with another type:",h.type),s(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),s(!h._inRuleset(),"Cannot concatenate a schema with open ruleset");let b=this.clone();if(this.type==="any"&&h.type!=="any"){const j=h.clone();for(const w of Object.keys(b))w!=="type"&&(j[w]=b[w]);b=j}b._ids.concat(h._ids),b._refs.register(h,d.toSibling),b._preferences=b._preferences?o.preferences(b._preferences,h._preferences):h._preferences,b._valids=k.merge(b._valids,h._valids,h._invalids),b._invalids=k.merge(b._invalids,h._invalids,h._valids);for(const j of h._singleRules.keys())b._singleRules.has(j)&&(b._rules=b._rules.filter(w=>w.keep||w.name!==j),b._singleRules.delete(j));for(const j of h._rules)h._definition.rules[j.method].multi||b._singleRules.set(j.name,j),b._rules.push(j);if(b._flags.empty&&h._flags.empty){b._flags.empty=b._flags.empty.concat(h._flags.empty);const j=Object.assign({},h._flags);delete j.empty,u(b._flags,j)}else if(h._flags.empty){b._flags.empty=h._flags.empty;const j=Object.assign({},h._flags);delete j.empty,u(b._flags,j)}else u(b._flags,h._flags);for(const j in h.$_terms){const w=h.$_terms[j];w?b.$_terms[j]?b.$_terms[j]=b.$_terms[j].concat(w):b.$_terms[j]=w.slice():b.$_terms[j]||(b.$_terms[j]=w)}return this.$_root._tracer&&this.$_root._tracer._combine(b,[this,h]),b.$_mutateRebuild()}extend(h){return s(!h.base,"Cannot extend type with another base"),r.type(this,h)}extract(h){return h=Array.isArray(h)?h:h.split("."),this._ids.reach(h)}fork(h,b){s(!this._inRuleset(),"Cannot fork inside a ruleset");let j=this;for(let w of[].concat(h))w=Array.isArray(w)?w:w.split("."),j=j._ids.fork(w,b,j);return j.$_temp.ruleset=!1,j}rule(h){const b=this._definition;o.assertOptions(h,Object.keys(b.modifiers)),s(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const j=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;s(j>=0&&j<this._rules.length,"Cannot apply rules to empty ruleset");const w=this.clone();for(let P=j;P<w._rules.length;++P){const $=w._rules[P],I=g($);for(const q in h)b.modifiers[q](I,h[q]),s(I.name===$.name,"Cannot change rule name");w._rules[P]=I,w._singleRules.get(I.name)===$&&w._singleRules.set(I.name,I)}return w.$_temp.ruleset=!1,w.$_mutateRebuild()}get ruleset(){s(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const h=this.clone();return h.$_temp.ruleset=h._rules.length,h}get $(){return this.ruleset}tailor(h){h=[].concat(h),s(!this._inRuleset(),"Cannot tailor inside a ruleset");let b=this;if(this.$_terms.alterations)for(const{target:j,adjuster:w}of this.$_terms.alterations)h.includes(j)&&(b=w(b),s(o.isSchema(b),"Alteration adjuster for",j,"failed to return a schema object"));return b=b.$_modify({each:j=>j.tailor(h),ref:!1}),b.$_temp.ruleset=!1,b.$_mutateRebuild()}tracer(){return p.location?p.location(this):this}validate(h,b){return f.entry(h,this,b)}validateAsync(h,b){return f.entryAsync(h,this,b)}$_addRule(h){typeof h=="string"&&(h={name:h}),s(h&&typeof h=="object","Invalid options"),s(h.name&&typeof h.name=="string","Invalid rule name");for(const $ in h)s($[0]!=="_","Cannot set private rule properties");const b=Object.assign({},h);b._resolve=[],b.method=b.method||b.name;const j=this._definition.rules[b.method],w=b.args;s(j,"Unknown rule",b.method);const P=this.clone();if(w){s(Object.keys(w).length===1||Object.keys(w).length===this._definition.rules[b.name].args.length,"Invalid rule definition for",this.type,b.name);for(const $ in w){let I=w[$];if(j.argsByName){const q=j.argsByName.get($);if(q.ref&&o.isResolvable(I))b._resolve.push($),P.$_mutateRegister(I);else if(q.normalize&&(I=q.normalize(I),w[$]=I),q.assert){const Z=o.validateArg(I,$,q);s(!Z,Z,"or reference")}}I!==void 0?w[$]=I:delete w[$]}}return j.multi||(P._ruleRemove(b.name,{clone:!1}),P._singleRules.set(b.name,b)),P.$_temp.ruleset===!1&&(P.$_temp.ruleset=null),j.priority?P._rules.unshift(b):P._rules.push(b),P}$_compile(h,b){return a.schema(this.$_root,h,b)}$_createError(h,b,j,w,P,$={}){const I=$.flags!==!1?this._flags:{},q=$.messages?i.merge(this._definition.messages,$.messages):this._definition.messages;return new n.Report(h,b,j,I,q,w,P)}$_getFlag(h){return this._flags[h]}$_getRule(h){return this._singleRules.get(h)}$_mapLabels(h){return h=Array.isArray(h)?h:h.split("."),this._ids.labels(h)}$_match(h,b,j,w){(j=Object.assign({},j)).abortEarly=!0,j._externals=!1,b.snapshot();const P=!f.validate(h,this,b,j,w).errors;return b.restore(),P}$_modify(h){return o.assertOptions(h,["each","once","ref","schema"]),l.schema(this,h)||this}$_mutateRebuild(){return s(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(h,{source:b,name:j,path:w,key:P})=>{const $=this._definition[b][j]&&this._definition[b][j].register;$!==!1&&this.$_mutateRegister(h,{family:$,key:P})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(h,{family:b,key:j}={}){this._refs.register(h,b),this._ids.register(h,{key:j})}$_property(h){return this._definition.properties[h]}$_reach(h){return this._ids.reach(h)}$_rootReferences(){return this._refs.roots()}$_setFlag(h,b,j={}){s(h[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[h]||{};if(m(b,w.default)&&(b=void 0),m(b,this._flags[h]))return this;const P=j.clone!==!1?this.clone():this;return b!==void 0?(P._flags[h]=b,P.$_mutateRegister(b)):delete P._flags[h],h[0]!=="_"&&(P.$_temp.ruleset=!1),P}$_parent(h,...b){return this[h][o.symbols.parent].call(this,...b)}$_validate(h,b,j){return f.validate(h,this,b,j)}_assign(h){h.type=this.type,h.$_root=this.$_root,h.$_temp=Object.assign({},this.$_temp),h.$_temp.whens={},h._ids=this._ids.clone(),h._preferences=this._preferences,h._valids=this._valids&&this._valids.clone(),h._invalids=this._invalids&&this._invalids.clone(),h._rules=this._rules.slice(),h._singleRules=g(this._singleRules,{shallow:!0}),h._refs=this._refs.clone(),h._flags=Object.assign({},this._flags),h._cache=null,h.$_terms={};for(const b in this.$_terms)h.$_terms[b]=this.$_terms[b]?this.$_terms[b].slice():null;h.$_super={};for(const b in this.$_super)h.$_super[b]=this._super[b].bind(h);return h}_bare(){const h=this.clone();h._reset();const b=h._definition.terms;for(const j in b){const w=b[j];h.$_terms[j]=w.init}return h.$_mutateRebuild()}_default(h,b,j={}){return o.assertOptions(j,"literal"),s(b!==void 0,"Missing",h,"value"),s(typeof b=="function"||!j.literal,"Only function value supports literal option"),typeof b=="function"&&j.literal&&(b={[o.symbols.literal]:!0,literal:b}),this.$_setFlag(h,b)}_generate(h,b,j){if(!this.$_terms.whens)return{schema:this};const w=[],P=[];for(let q=0;q<this.$_terms.whens.length;++q){const Z=this.$_terms.whens[q];if(Z.concat){w.push(Z.concat),P.push(`${q}.concat`);continue}const K=Z.ref?Z.ref.resolve(h,b,j):h,F=Z.is?[Z]:Z.switch,L=P.length;for(let H=0;H<F.length;++H){const{is:W,then:ee,otherwise:ge}=F[H],Se=`${q}${Z.switch?"."+H:""}`;if(W.$_match(K,b.nest(W,`${Se}.is`),j)){if(ee){const He=b.localize([...b.path,`${Se}.then`],b.ancestors,b.schemas),{schema:st,id:Ne}=ee._generate(h,He,j);w.push(st),P.push(`${Se}.then${Ne?`(${Ne})`:""}`);break}}else if(ge){const He=b.localize([...b.path,`${Se}.otherwise`],b.ancestors,b.schemas),{schema:st,id:Ne}=ge._generate(h,He,j);w.push(st),P.push(`${Se}.otherwise${Ne?`(${Ne})`:""}`);break}}if(Z.break&&P.length>L)break}const $=P.join(", ");if(b.mainstay.tracer.debug(b,"rule","when",$),!$)return{schema:this};if(!b.mainstay.tracer.active&&this.$_temp.whens[$])return{schema:this.$_temp.whens[$],id:$};let I=this;this._definition.generate&&(I=this._definition.generate(this,h,b,j));for(const q of w)I=I.concat(q);return this.$_root._tracer&&this.$_root._tracer._combine(I,[this,...w]),this.$_temp.whens[$]=I,{schema:I,id:$}}_inner(h,b,j={}){s(!this._inRuleset(),`Cannot set ${h} inside a ruleset`);const w=this.clone();return w.$_terms[h]&&!j.override||(w.$_terms[h]=[]),j.single?w.$_terms[h].push(b):w.$_terms[h].push(...b),w.$_temp.ruleset=!1,w}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(h,b={}){if(!this._singleRules.has(h))return this;const j=b.clone!==!1?this.clone():this;j._singleRules.delete(h);const w=[];for(let P=0;P<j._rules.length;++P){const $=j._rules[P];$.name!==h||$.keep?w.push($):j._inRuleset()&&P<j.$_temp.ruleset&&--j.$_temp.ruleset}return j._rules=w,j}_values(h,b){o.verifyFlat(h,b.slice(1,-1));const j=this.clone(),w=h[0]===o.symbols.override;if(w&&(h=h.slice(1)),!j[b]&&h.length?j[b]=new k:w&&(j[b]=h.length?new k:null,j.$_mutateRebuild()),!j[b])return j;w&&j[b].override();for(const P of h){s(P!==void 0,"Cannot call allow/valid/invalid with undefined"),s(P!==o.symbols.override,"Override must be the first value");const $=b==="_invalids"?"_valids":"_invalids";j[$]&&(j[$].remove(P),j[$].length||(s(b==="_valids"||!j._flags.only,"Setting invalid value",P,"leaves schema rejecting all values due to previous valid rule"),j[$]=null)),j[b].add(P,j._refs)}return j}}};S.Base.prototype[o.symbols.any]={version:o.version,compile:a.compile,root:"$_root"},S.Base.prototype.isImmutable=!0,S.Base.prototype.deny=S.Base.prototype.invalid,S.Base.prototype.disallow=S.Base.prototype.invalid,S.Base.prototype.equal=S.Base.prototype.valid,S.Base.prototype.exist=S.Base.prototype.required,S.Base.prototype.not=S.Base.prototype.invalid,S.Base.prototype.options=S.Base.prototype.prefs,S.Base.prototype.preferences=S.Base.prototype.prefs,_.exports=new S.Base},8652:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};x.provider={provision:t=>new u.Cache(t)},u.Cache=class{constructor(t={}){m.assertOptions(t,["max"]),s(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(t,o){if(t!==null&&!u.supported.has(typeof t))return;let a=this._map.get(t);if(a)return a.value=o,void this._list.first(a);a=this._list.unshift({key:t,value:o}),this._map.set(t,a),this._compact()}get(t){const o=this._map.get(t);if(o)return this._list.first(o),g(o.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:o,prev:a}=t;return o.prev=a,a&&(a.next=o),t===this.tail&&(this.tail=o),t.prev=null,t.next=null,t}}},8160:(_,x,y)=>{const s=y(375),g=y(7916),m=y(5934);let u,t;const o={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};x.version=m.version,x.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},x.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},x.assertOptions=function(a,n,r="Options"){s(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const c=Object.keys(a).filter(i=>!n.includes(i));s(c.length===0,`${r} contain unknown keys: ${c}`)},x.checkPreferences=function(a){t=t||y(3378);const n=t.preferences.validate(a);if(n.error)throw new g([n.error.details[0].message])},x.compare=function(a,n,r){switch(r){case"=":return a===n;case">":return a>n;case"<":return a<n;case">=":return a>=n;case"<=":return a<=n}},x.default=function(a,n){return a===void 0?n:a},x.isIsoDate=function(a){return o.isoDate.test(a)},x.isNumber=function(a){return typeof a=="number"&&!isNaN(a)},x.isResolvable=function(a){return!!a&&(a[x.symbols.ref]||a[x.symbols.template])},x.isSchema=function(a,n={}){const r=a&&a[x.symbols.any];return!!r&&(s(n.legacy||r.version===x.version,"Cannot mix different versions of joi schemas"),!0)},x.isValues=function(a){return a[x.symbols.values]},x.limit=function(a){return Number.isSafeInteger(a)&&a>=0},x.preferences=function(a,n){u=u||y(6914),a=a||{},n=n||{};const r=Object.assign({},a,n);return n.errors&&a.errors&&(r.errors=Object.assign({},a.errors,n.errors),r.errors.wrap=Object.assign({},a.errors.wrap,n.errors.wrap)),n.messages&&(r.messages=u.compile(n.messages,a.messages)),delete r[x.symbols.prefs],r},x.tryWithPath=function(a,n,r={}){try{return a()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,r.append&&(c.message=`${c.message} (${c.path})`),c}},x.validateArg=function(a,n,{assert:r,message:c}){if(x.isSchema(r)){const i=r.validate(a);return i.error?i.error.message:void 0}if(!r(a))return n?`${n} ${c}`:c},x.verifyFlat=function(a,n){for(const r of a)s(!Array.isArray(r),"Method no longer accepts array arguments:",n)}},3292:(_,x,y)=>{const s=y(375),g=y(8160),m=y(6133),u={};x.schema=function(t,o,a={}){g.assertOptions(a,["appendPath","override"]);try{return u.schema(t,o,a)}catch(n){throw a.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},u.schema=function(t,o,a){s(o!==void 0,"Invalid undefined schema"),Array.isArray(o)&&(s(o.length,"Invalid empty array schema"),o.length===1&&(o=o[0]));const n=(r,...c)=>a.override!==!1?r.valid(t.override,...c):r.valid(...c);if(u.simple(o))return n(t,o);if(typeof o=="function")return t.custom(o);if(s(typeof o=="object","Invalid schema content:",typeof o),g.isResolvable(o))return n(t,o);if(g.isSchema(o))return o;if(Array.isArray(o)){for(const r of o)if(!u.simple(r))return t.alternatives().try(...o);return n(t,...o)}return o instanceof RegExp?t.string().regex(o):o instanceof Date?n(t.date(),o):(s(Object.getPrototypeOf(o)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(o))},x.ref=function(t,o){return m.isRef(t)?t:m.create(t,o)},x.compile=function(t,o,a={}){g.assertOptions(a,["legacy"]);const n=o&&o[g.symbols.any];if(n)return s(a.legacy||n.version===g.version,"Cannot mix different versions of joi schemas:",n.version,g.version),o;if(typeof o!="object"||!a.legacy)return x.schema(t,o,{appendPath:!0});const r=u.walk(o);return r?r.compile(r.root,o):x.schema(t,o,{appendPath:!0})},u.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const a of t){const n=u.walk(a);if(n)return n}return null}const o=t[g.symbols.any];if(o)return{root:t[o.root],compile:o.compile};s(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const a in t){const n=u.walk(t[a]);if(n)return n}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},x.when=function(t,o,a){if(a===void 0&&(s(o&&typeof o=="object","Missing options"),a=o,o=m.create(".")),Array.isArray(a)&&(a={switch:a}),g.assertOptions(a,["is","not","then","otherwise","switch","break"]),g.isSchema(o))return s(a.is===void 0,'"is" can not be used with a schema condition'),s(a.not===void 0,'"not" can not be used with a schema condition'),s(a.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:o,then:a.then,otherwise:a.otherwise,break:a.break});if(s(m.isRef(o)||typeof o=="string","Invalid condition:",o),s(a.not===void 0||a.is===void 0,'Cannot combine "is" with "not"'),a.switch===void 0){let r=a;a.not!==void 0&&(r={is:a.not,then:a.otherwise,otherwise:a.then,break:a.break});let c=r.is!==void 0?t.$_compile(r.is):t.$_root.invalid(null,!1,0,"").required();return s(r.then!==void 0||r.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),s(r.break===void 0||r.then===void 0||r.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),a.is===void 0||m.isRef(a.is)||g.isSchema(a.is)||(c=c.required()),u.condition(t,{ref:x.ref(o),is:c,then:r.then,otherwise:r.otherwise,break:r.break})}s(Array.isArray(a.switch),'"switch" must be an array'),s(a.is===void 0,'Cannot combine "switch" with "is"'),s(a.not===void 0,'Cannot combine "switch" with "not"'),s(a.then===void 0,'Cannot combine "switch" with "then"');const n={ref:x.ref(o),switch:[],break:a.break};for(let r=0;r<a.switch.length;++r){const c=a.switch[r],i=r===a.switch.length-1;g.assertOptions(c,i?["is","then","otherwise"]:["is","then"]),s(c.is!==void 0,'Switch statement missing "is"'),s(c.then!==void 0,'Switch statement missing "then"');const l={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(m.isRef(c.is)||g.isSchema(c.is)||(l.is=l.is.required()),i){s(a.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const d=a.otherwise!==void 0?a.otherwise:c.otherwise;d!==void 0&&(s(n.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=t.$_compile(d))}n.switch.push(l)}return n},u.condition=function(t,o){for(const a of["then","otherwise"])o[a]===void 0?delete o[a]:o[a]=t.$_compile(o[a]);return o}},6354:(_,x,y)=>{const s=y(5688),g=y(8160),m=y(3328);x.Report=class{constructor(u,t,o,a,n,r,c){if(this.code=u,this.flags=a,this.messages=n,this.path=r.path,this.prefs=c,this.state=r,this.value=t,this.message=null,this.template=null,this.local=o||{},this.local.label=x.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const i=this.path[this.path.length-1];typeof i!="object"&&(this.local.key=i)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,t){return x.template(this.value,u,t||this.code,this.state,this.prefs)}},x.path=function(u){let t="";for(const o of u)typeof o!="object"&&(typeof o=="string"?(t&&(t+="."),t+=o):t+=`[${o}]`);return t},x.template=function(u,t,o,a,n){if(!t)return;if(m.isTemplate(t))return o!=="root"?t:null;let r=n.errors.language;if(g.isResolvable(r)&&(r=r.resolve(u,a,n)),r&&t[r]){if(t[r][o]!==void 0)return t[r][o];if(t[r]["*"]!==void 0)return t[r]["*"]}return t[o]?t[o]:t["*"]},x.label=function(u,t,o,a){if(!o.errors.label)return"";if(u.label)return u.label;let n=t.path;return o.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),x.path(n)||x.template(null,o.messages,"root",t,o)||a&&x.template(null,a,"root",t,o)||"value"},x.process=function(u,t,o){if(!u)return null;const{override:a,message:n,details:r}=x.details(u);if(a)return a;if(o.errors.stack)return new x.ValidationError(n,r,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const i=new x.ValidationError(n,r,t);return Error.stackTraceLimit=c,i},x.details=function(u,t={}){let o=[];const a=[];for(const n of u){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();o.push(c),a.push({message:c,type:"override",context:{error:n}});continue}const r=n.toString();o.push(r),a.push({message:r,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return o.length>1&&(o=[...new Set(o)]),{message:o.join(". "),details:a}},x.ValidationError=class extends Error{constructor(u,t,o){super(u),this._original=o,this.details=t}static isError(u){return u instanceof x.ValidationError}},x.ValidationError.prototype.isJoi=!0,x.ValidationError.prototype.name="ValidationError",x.ValidationError.prototype.annotate=s.error},8901:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8160),u=y(6914),t={};x.type=function(o,a){const n=Object.getPrototypeOf(o),r=g(n),c=o._assign(Object.create(r)),i=Object.assign({},a);delete i.base,r._definition=i;const l=n._definition||{};i.messages=u.merge(l.messages,i.messages),i.properties=Object.assign({},l.properties,i.properties),c.type=i.type,i.flags=Object.assign({},l.flags,i.flags);const d=Object.assign({},l.terms);if(i.terms)for(const S in i.terms){const h=i.terms[S];s(c.$_terms[S]===void 0,"Invalid term override for",i.type,S),c.$_terms[S]=h.init,d[S]=h}i.terms=d,i.args||(i.args=l.args),i.prepare=t.prepare(i.prepare,l.prepare),i.coerce&&(typeof i.coerce=="function"&&(i.coerce={method:i.coerce}),i.coerce.from&&!Array.isArray(i.coerce.from)&&(i.coerce={method:i.coerce.method,from:[].concat(i.coerce.from)})),i.coerce=t.coerce(i.coerce,l.coerce),i.validate=t.validate(i.validate,l.validate);const p=Object.assign({},l.rules);if(i.rules)for(const S in i.rules){const h=i.rules[S];s(typeof h=="object","Invalid rule definition for",i.type,S);let b=h.method;if(b===void 0&&(b=function(){return this.$_addRule(S)}),b&&(s(!r[S],"Rule conflict in",i.type,S),r[S]=b),s(!p[S],"Rule conflict in",i.type,S),p[S]=h,h.alias){const j=[].concat(h.alias);for(const w of j)r[w]=h.method}h.args&&(h.argsByName=new Map,h.args=h.args.map(j=>(typeof j=="string"&&(j={name:j}),s(!h.argsByName.has(j.name),"Duplicated argument name",j.name),m.isSchema(j.assert)&&(j.assert=j.assert.strict().label(j.name)),h.argsByName.set(j.name,j),j)))}i.rules=p;const f=Object.assign({},l.modifiers);if(i.modifiers)for(const S in i.modifiers){s(!r[S],"Rule conflict in",i.type,S);const h=i.modifiers[S];s(typeof h=="function","Invalid modifier definition for",i.type,S);const b=function(j){return this.rule({[S]:j})};r[S]=b,f[S]=h}if(i.modifiers=f,i.overrides){r._super=n,c.$_super={};for(const S in i.overrides)s(n[S],"Cannot override missing",S),i.overrides[S][m.symbols.parent]=n[S],c.$_super[S]=n[S].bind(c);Object.assign(r,i.overrides)}i.cast=Object.assign({},l.cast,i.cast);const k=Object.assign({},l.manifest,i.manifest);return k.build=t.build(i.manifest&&i.manifest.build,l.manifest&&l.manifest.build),i.manifest=k,i.rebuild=t.rebuild(i.rebuild,l.rebuild),c},t.build=function(o,a){return o&&a?function(n,r){return a(o(n,r),r)}:o||a},t.coerce=function(o,a){return o&&a?{from:o.from&&a.from?[...new Set([...o.from,...a.from])]:null,method(n,r){let c;if((!a.from||a.from.includes(typeof n))&&(c=a.method(n,r),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!o.from||o.from.includes(typeof n)){const i=o.method(n,r);if(i)return i}return c}}:o||a},t.prepare=function(o,a){return o&&a?function(n,r){const c=o(n,r);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return a(n,r)||c}:o||a},t.rebuild=function(o,a){return o&&a?function(n){a(n),o(n)}:o||a},t.validate=function(o,a){return o&&a?function(n,r){const c=a(n,r);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return o(n,r)||c}:o||a}},5107:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8652),u=y(8160),t=y(3292),o=y(6354),a=y(8901),n=y(9708),r=y(6133),c=y(3328),i=y(1152);let l;const d={types:{alternatives:y(4946),any:y(8068),array:y(546),boolean:y(4937),date:y(7500),function:y(390),link:y(8785),number:y(3832),object:y(8966),string:y(7417),symbol:y(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const p={_types:new Set(Object.keys(d.types))};for(const f of p._types)p[f]=function(...k){return s(!k.length||["alternatives","link","object"].includes(f),"The",f,"type does not allow arguments"),d.generate(this,d.types[f],k)};for(const f of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])p[f]=function(...k){return this.any()[f](...k)};Object.assign(p,d.methods);for(const f in d.aliases){const k=d.aliases[f];p[f]=p[k]}return p.x=p.expression,i.setup&&i.setup(p),p}};d.methods={ValidationError:o.ValidationError,version:u.version,cache:m.provider,assert(p,f,...k){d.assert(p,f,!0,k)},attempt:(p,f,...k)=>d.assert(p,f,!1,k),build(p){return s(typeof n.build=="function","Manifest functionality disabled"),n.build(this,p)},checkPreferences(p){u.checkPreferences(p)},compile(p,f){return t.compile(this,p,f)},defaults(p){s(typeof p=="function","modifier must be a function");const f=Object.assign({},this);for(const k of f._types){const S=p(f[k]());s(u.isSchema(S),"modifier must return a valid schema object"),f[k]=function(...h){return d.generate(this,S,h)}}return f},expression:(...p)=>new c(...p),extend(...p){u.verifyFlat(p,"extend"),l=l||y(3378),s(p.length,"You need to provide at least one extension"),this.assert(p,l.extensions);const f=Object.assign({},this);f._types=new Set(f._types);for(let k of p){typeof k=="function"&&(k=k(f)),this.assert(k,l.extension);const S=d.expandExtension(k,f);for(const h of S){s(f[h.type]===void 0||f._types.has(h.type),"Cannot override name",h.type);const b=h.base||this.any(),j=a.type(b,h);f._types.add(h.type),f[h.type]=function(...w){return d.generate(this,j,w)}}}return f},isError:o.ValidationError.isError,isExpression:c.isTemplate,isRef:r.isRef,isSchema:u.isSchema,in:(...p)=>r.in(...p),override:u.symbols.override,ref:(...p)=>r.create(...p),types(){const p={};for(const f of this._types)p[f]=this[f]();for(const f in d.aliases)p[f]=this[f]();return p}},d.assert=function(p,f,k,S){const h=S[0]instanceof Error||typeof S[0]=="string"?S[0]:null,b=h!==null?S[1]:S[0],j=f.validate(p,u.preferences({errors:{stack:!0}},b||{}));let w=j.error;if(!w)return j.value;if(h instanceof Error)throw h;const P=k&&typeof w.annotate=="function"?w.annotate():w.message;throw w instanceof o.ValidationError==0&&(w=g(w)),w.message=h?`${h} ${P}`:P,w},d.generate=function(p,f,k){return s(p,"Must be invoked on a Joi instance."),f.$_root=p,f._definition.args&&k.length?f._definition.args(f,...k):f},d.expandExtension=function(p,f){if(typeof p.type=="string")return[p];const k=[];for(const S of f._types)if(p.type.test(S)){const h=Object.assign({},p);h.type=S,h.base=f[S](),k.push(h)}return k},_.exports=d.root()},6914:(_,x,y)=>{const s=y(375),g=y(8571),m=y(3328);x.compile=function(u,t){if(typeof u=="string")return s(!t,"Cannot set single message string"),new m(u);if(m.isTemplate(u))return s(!t,"Cannot set single message template"),u;s(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),t=t?g(t):{};for(let o in u){const a=u[o];if(o==="root"||m.isTemplate(a)){t[o]=a;continue}if(typeof a=="string"){t[o]=new m(a);continue}s(typeof a=="object"&&!Array.isArray(a),"Invalid message for",o);const n=o;for(o in t[n]=t[n]||{},a){const r=a[o];o==="root"||m.isTemplate(r)?t[n][o]=r:(s(typeof r=="string","Invalid message for",o,"in",n),t[n][o]=new m(r))}}return t},x.decompile=function(u){const t={};for(let o in u){const a=u[o];if(o==="root"){t.root=a;continue}if(m.isTemplate(a)){t[o]=a.describe({compact:!0});continue}const n=o;for(o in t[n]={},a){const r=a[o];o!=="root"?t[n][o]=r.describe({compact:!0}):t[n].root=r}}return t},x.merge=function(u,t){if(!u)return x.compile(t);if(!t)return u;if(typeof t=="string")return new m(t);if(m.isTemplate(t))return t;const o=g(u);for(let a in t){const n=t[a];if(a==="root"||m.isTemplate(n)){o[a]=n;continue}if(typeof n=="string"){o[a]=new m(n);continue}s(typeof n=="object"&&!Array.isArray(n),"Invalid message for",a);const r=a;for(a in o[r]=o[r]||{},n){const c=n[a];a==="root"||m.isTemplate(c)?o[r][a]=c:(s(typeof c=="string","Invalid message for",a,"in",r),o[r][a]=new m(c))}}return o}},2294:(_,x,y)=>{const s=y(375),g=y(8160),m=y(6133),u={};x.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new u.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[o,a]of t._byId.entries())s(!this._byKey.has(o),"Schema id conflicts with existing key:",o),this._byId.set(o,a);for(const[o,a]of t._byKey.entries())s(!this._byId.has(o),"Schema key conflicts with existing id:",o),this._byKey.set(o,a)}fork(t,o,a){const n=this._collect(t);n.push({schema:a});const r=n.shift();let c={id:r.id,schema:o(r.schema)};s(g.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const i of n)c={id:i.id,schema:u.fork(i.schema,c.id,c.schema)};return c.schema}labels(t,o=[]){const a=t[0],n=this._get(a);if(!n)return[...o,...t].join(".");const r=t.slice(1);return o=[...o,n.schema._flags.label||a],r.length?n.schema._ids.labels(r,o):o.join(".")}reach(t,o=[]){const a=t[0],n=this._get(a);s(n,"Schema does not contain path",[...o,...t].join("."));const r=t.slice(1);return r.length?n.schema._ids.reach(r,[...o,a]):n.schema}register(t,{key:o}={}){if(!t||!g.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const a=t._flags.id;if(a){const n=this._byId.get(a);s(!n||n.schema===t,"Cannot add different schemas with the same id:",a),s(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:t,id:a})}o&&(s(!this._byKey.has(o),"Schema already contains key:",o),s(!this._byId.has(o),"Schema key conflicts with existing id:",o),this._byKey.set(o,{schema:t,id:o}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,o=[],a=[]){const n=t[0],r=this._get(n);s(r,"Schema does not contain path",[...o,...t].join(".")),a=[r,...a];const c=t.slice(1);return c.length?r.schema._ids._collect(c,[...o,n],a):a}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,o,a){const n=x.schema(t,{each:(r,{key:c})=>{if(o===(r._flags.id||c))return a},ref:!1});return n?n.$_mutateRebuild():t},x.schema=function(t,o){let a;for(const n in t._flags){if(n[0]==="_")continue;const r=u.scan(t._flags[n],{source:"flags",name:n},o);r!==void 0&&(a=a||t.clone(),a._flags[n]=r)}for(let n=0;n<t._rules.length;++n){const r=t._rules[n],c=u.scan(r.args,{source:"rules",name:r.name},o);if(c!==void 0){a=a||t.clone();const i=Object.assign({},r);i.args=c,a._rules[n]=i,a._singleRules.get(r.name)===r&&a._singleRules.set(r.name,i)}}for(const n in t.$_terms){if(n[0]==="_")continue;const r=u.scan(t.$_terms[n],{source:"terms",name:n},o);r!==void 0&&(a=a||t.clone(),a.$_terms[n]=r)}return a},u.scan=function(t,o,a,n,r){const c=n||[];if(t===null||typeof t!="object")return;let i;if(Array.isArray(t)){for(let l=0;l<t.length;++l){const d=o.source==="terms"&&o.name==="keys"&&t[l].key,p=u.scan(t[l],o,a,[l,...c],d);p!==void 0&&(i=i||t.slice(),i[l]=p)}return i}if(a.schema!==!1&&g.isSchema(t)||a.ref!==!1&&m.isRef(t)){const l=a.each(t,{...o,path:c,key:r});return l===t?void 0:l}for(const l in t){if(l[0]==="_")continue;const d=u.scan(t[l],o,a,[l,...c],r);d!==void 0&&(i=i||Object.assign({},t),i[l]=d)}return i}},6133:(_,x,y)=>{const s=y(375),g=y(8571),m=y(9621),u=y(8160);let t;const o={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};x.create=function(a,n={}){s(typeof a=="string","Invalid reference key:",a),u.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),s(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const r=Object.assign({},o.defaults,n);delete r.prefix;const c=r.separator,i=o.context(a,c,n.prefix);if(r.type=i.type,a=i.key,r.type==="value")if(i.root&&(s(!c||a[0]!==c,"Cannot specify relative path with root prefix"),r.ancestor="root",a||(a=null)),c&&c===a)a=null,r.ancestor=0;else if(r.ancestor!==void 0)s(!c||!a||a[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,d]=o.ancestor(a,c);d&&(a=a.slice(d))===""&&(a=null),r.ancestor=l}return r.path=c?a===null?[]:a.split(c):[a],new o.Ref(r)},x.in=function(a,n={}){return x.create(a,{...n,in:!0})},x.isRef=function(a){return!!a&&!!a[u.symbols.ref]},o.Ref=class{constructor(a){s(typeof a=="object","Invalid reference construction"),u.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),s([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),s(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),s(!a.map||Array.isArray(a.map),"options.map must be an array"),s(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,o.defaults,a),s(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(a,n,r,c,i={}){return s(!this.in||i.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(r.context,n,i):this.type==="local"?this._resolve(c,n,i):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,i):(s(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,i)):this._resolve(a,n,i)}_resolve(a,n,r){let c;if(this.type==="value"&&n.mainstay.shadow&&r.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=m(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const i=this.map.get(c);i!==void 0&&(c=i)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(a){return[...a.path.slice(0,-this.ancestor),...this.path]}clone(){return new o.Ref(this)}describe(){const a={path:this.path};this.type!=="value"&&(a.type=this.type),this.separator!=="."&&(a.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(a.ancestor=this.ancestor),this.map&&(a.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(a[n]=this[n]);return this.in!==!1&&(a.in=!0),{ref:a}}updateDisplay(){const a=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${a}`);if(!this.separator)return void(this.display=`ref:${a}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${a}`);if(this.ancestor==="root")return void(this.display=`ref:root:${a}`);if(this.ancestor===1)return void(this.display=`ref:${a||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${a||""}`}},o.Ref.prototype[u.symbols.ref]=!0,x.build=function(a){return(a=Object.assign({},o.defaults,a)).type==="value"&&a.ancestor===void 0&&(a.ancestor=1),new o.Ref(a)},o.context=function(a,n,r={}){if(a=a.trim(),r){const c=r.global===void 0?"$":r.global;if(c!==n&&a.startsWith(c))return{key:a.slice(c.length),type:"global"};const i=r.local===void 0?"#":r.local;if(i!==n&&a.startsWith(i))return{key:a.slice(i.length),type:"local"};const l=r.root===void 0?"/":r.root;if(l!==n&&a.startsWith(l))return{key:a.slice(l.length),type:"value",root:!0}}return{key:a,type:"value"}},o.ancestor=function(a,n){if(!n)return[1,0];if(a[0]!==n)return[1,0];if(a[1]!==n)return[0,1];let r=2;for(;a[r]===n;)++r;return[r-1,r]},x.toSibling=0,x.toParent=1,x.Manager=class{constructor(){this.refs=[]}register(a,n){if(a)if(n=n===void 0?x.toParent:n,Array.isArray(a))for(const r of a)this.register(r,n);else if(u.isSchema(a))for(const r of a._refs.refs)r.ancestor-n>=0&&this.refs.push({ancestor:r.ancestor-n,root:r.root});else x.isRef(a)&&a.type==="value"&&a.ancestor-n>=0&&this.refs.push({ancestor:a.ancestor-n,root:a.root}),t=t||y(3328),t.isTemplate(a)&&this.register(a.refs(),n)}get length(){return this.refs.length}clone(){const a=new x.Manager;return a.refs=g(this.refs),a}reset(){this.refs=[]}roots(){return this.refs.filter(a=>!a.ancestor).map(a=>a.root)}}},3378:(_,x,y)=>{const s=y(5107),g={};g.wrap=s.string().min(1).max(2).allow(!1),x.preferences=s.object({allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),context:s.object(),convert:s.boolean(),dateFormat:s.valid("date","iso","string","time","utc"),debug:s.boolean(),errors:{escapeHtml:s.boolean(),label:s.valid("path","key",!1),language:[s.string(),s.object().ref()],render:s.boolean(),stack:s.boolean(),wrap:{label:g.wrap,array:g.wrap,string:g.wrap}},externals:s.boolean(),messages:s.object(),noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:s.valid("required","optional","forbidden"),skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(!0,!1),warnings:s.boolean()}).strict(),g.nameRx=/^[a-zA-Z0-9]\w*$/,g.rule=s.object({alias:s.array().items(s.string().pattern(g.nameRx)).single(),args:s.array().items(s.string(),s.object({name:s.string().pattern(g.nameRx).required(),ref:s.boolean(),assert:s.alternatives([s.function(),s.object().schema()]).conditional("ref",{is:!0,then:s.required()}),normalize:s.function(),message:s.string().when("assert",{is:s.function(),then:s.required()})})),convert:s.boolean(),manifest:s.boolean(),method:s.function().allow(!1),multi:s.boolean(),validate:s.function()}),x.extension=s.object({type:s.alternatives([s.string(),s.object().regex()]).required(),args:s.function(),cast:s.object().pattern(g.nameRx,s.object({from:s.function().maxArity(1).required(),to:s.function().minArity(1).maxArity(2).required()})),base:s.object().schema().when("type",{is:s.object().regex(),then:s.forbidden()}),coerce:[s.function().maxArity(3),s.object({method:s.function().maxArity(3).required(),from:s.array().items(s.string()).single()})],flags:s.object().pattern(g.nameRx,s.object({setter:s.string(),default:s.any()})),manifest:{build:s.function().arity(2)},messages:[s.object(),s.string()],modifiers:s.object().pattern(g.nameRx,s.function().minArity(1).maxArity(2)),overrides:s.object().pattern(g.nameRx,s.function()),prepare:s.function().maxArity(3),rebuild:s.function().arity(1),rules:s.object().pattern(g.nameRx,g.rule),terms:s.object().pattern(g.nameRx,s.object({init:s.array().allow(null).required(),manifest:s.object().pattern(/.+/,[s.valid("schema","single"),s.object({mapped:s.object({from:s.string().required(),to:s.string().required()}).required()})])})),validate:s.function().maxArity(3)}).strict(),x.extensions=s.array().items(s.object(),s.function().arity(1)).strict(),g.desc={buffer:s.object({buffer:s.string()}),func:s.object({function:s.function().required(),options:{literal:!0}}),override:s.object({override:!0}),ref:s.object({ref:s.object({type:s.valid("value","global","local"),path:s.array().required(),separator:s.string().length(1).allow(!1),ancestor:s.number().min(0).integer().allow("root"),map:s.array().items(s.array().length(2)).min(1),adjust:s.function(),iterables:s.boolean(),in:s.boolean(),render:s.boolean()}).required()}),regex:s.object({regex:s.string().min(3)}),special:s.object({special:s.valid("deep").required()}),template:s.object({template:s.string().required(),options:s.object()}),value:s.object({value:s.alternatives([s.object(),s.array()]).required()})},g.desc.entity=s.alternatives([s.array().items(s.link("...")),s.boolean(),s.function(),s.number(),s.string(),g.desc.buffer,g.desc.func,g.desc.ref,g.desc.regex,g.desc.special,g.desc.template,g.desc.value,s.link("/")]),g.desc.values=s.array().items(null,s.boolean(),s.function(),s.number().allow(1/0,-1/0),s.string().allow(""),s.symbol(),g.desc.buffer,g.desc.func,g.desc.override,g.desc.ref,g.desc.regex,g.desc.template,g.desc.value),g.desc.messages=s.object().pattern(/.+/,[s.string(),g.desc.template,s.object().pattern(/.+/,[s.string(),g.desc.template])]),x.description=s.object({type:s.string().required(),flags:s.object({cast:s.string(),default:s.any(),description:s.string(),empty:s.link("/"),failover:g.desc.entity,id:s.string(),label:s.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:s.boolean(),unit:s.string()}).unknown(),preferences:{allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),convert:s.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:s.boolean(),label:["path","key"],language:[s.string(),g.desc.ref],wrap:{label:g.wrap,array:g.wrap}},externals:s.boolean(),messages:g.desc.messages,noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:["required","optional","forbidden"],skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(!0,!1),warnings:s.boolean()},allow:g.desc.values,invalid:g.desc.values,rules:s.array().min(1).items({name:s.string().required(),args:s.object().min(1),keep:s.boolean(),message:[s.string(),g.desc.messages],warn:s.boolean()}),keys:s.object().pattern(/.*/,s.link("/")),link:g.desc.ref}).pattern(/^[a-z]\w*$/,s.any())},493:(_,x,y)=>{const s=y(8571),g=y(9621),m=y(8160),u={value:Symbol("value")};_.exports=u.State=class{constructor(t,o,a){this.path=t,this.ancestors=o,this.mainstay=a.mainstay,this.schemas=a.schemas,this.debug=null}localize(t,o=null,a=null){const n=new u.State(t,o,this);return a&&n.schemas&&(n.schemas=[u.schemas(a),...n.schemas]),n}nest(t,o){const a=new u.State(this.path,this.ancestors,this);return a.schemas=a.schemas&&[u.schemas(t),...a.schemas],a.debug=o,a}shadow(t,o){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,t,o)}snapshot(){this.mainstay.shadow&&(this._snapshot=s(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(t){return m.isSchema(t)?{schema:t}:t},u.Shadow=class{constructor(){this._values=null}set(t,o,a){if(!t.length||a==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let r=0;r<t.length;++r){const c=t[r];let i=n.get(c);i||(i=new Map,n.set(c,i)),n=i}n[u.value]=o}get(t){const o=this.node(t);if(o)return o[u.value]}node(t){if(this._values)return g(this._values,t,{iterables:!0})}override(t,o){if(!this._values)return;const a=t.slice(0,-1),n=t[t.length-1],r=g(this._values,a,{iterables:!0});o?r.set(n,o):r&&r.delete(n)}}},3328:(_,x,y)=>{const s=y(375),g=y(8571),m=y(5277),u=y(1447),t=y(8160),o=y(6354),a=y(6133),n={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};_.exports=n.Template=class{constructor(r,c){if(s(typeof r=="string","Template source must be a string"),s(!r.includes("\0")&&!r.includes(""),"Template source cannot contain reserved control characters"),this.source=r,this.rendered=r,this._template=null,c){const{functions:i,...l}=c;this._settings=Object.keys(l).length?g(l):void 0,this._functions=i,this._functions&&(s(Object.keys(this._functions).every(d=>typeof d=="string"),"Functions keys must be strings"),s(Object.values(this._functions).every(d=>typeof d=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const r=n.encode(this.source),c=n.split(r);let i=!1;const l=[],d=c.shift();d&&l.push(d);for(const p of c){const f=p[0]!=="{",k=f?"}":"}}",S=p.indexOf(k);if(S===-1||p[1]==="{"){l.push(`{${n.decode(p)}`);continue}let h=p.slice(f?0:1,S);const b=h[0]===":";b&&(h=h.slice(1));const j=this._ref(n.decode(h),{raw:f,wrapped:b});l.push(j),typeof j!="string"&&(i=!0);const w=p.slice(S+k.length);w&&l.push(n.decode(w))}i?this._template=l:this.rendered=l.join("")}static date(r,c){return n.dateFormat[c.dateFormat].call(r)}describe(r={}){if(!this._settings&&r.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(r){return new n.Template(r.template,r.options||r.functions?{...r.options,functions:r.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(r){return!!r&&!!r[t.symbols.template]}refs(){if(!this._template)return;const r=[];for(const c of this._template)typeof c!="string"&&r.push(...c.refs);return r}resolve(r,c,i,l){return this._template&&this._template.length===1?this._part(this._template[0],r,c,i,l,{}):this.render(r,c,i,l)}_part(r,...c){return r.ref?r.ref.resolve(...c):r.formula.evaluate(c)}render(r,c,i,l,d={}){if(!this.isDynamic())return this.rendered;const p=[];for(const f of this._template)if(typeof f=="string")p.push(f);else{const k=this._part(f,r,c,i,l,d),S=n.stringify(k,r,c,i,l,d);if(S!==void 0){const h=f.raw||(d.errors&&d.errors.escapeHtml)===!1?S:m(S);p.push(n.wrap(h,f.wrapped&&i.errors.wrap.label))}}return p.join("")}_ref(r,{raw:c,wrapped:i}){const l=[],d=f=>{const k=a.create(f,this._settings);return l.push(k),S=>{const h=k.resolve(...S);return h!==void 0?h:null}};try{const f=this._functions?{...n.functions,...this._functions}:n.functions;var p=new u.Parser(r,{reference:d,functions:f,constants:n.constants})}catch(f){throw f.message=`Invalid template variable "${r}" fails due to: ${f.message}`,f}if(p.single){if(p.single.type==="reference"){const f=l[0];return{ref:f,raw:c,refs:l,wrapped:i||f.type==="local"&&f.key==="label"}}return n.stringify(p.single.value)}return{formula:p,raw:c,refs:l}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(r){return r.replace(/\\(\{+)/g,(c,i)=>n.opens.slice(0,i.length)).replace(/\\(\}+)/g,(c,i)=>n.closes.slice(0,i.length))},n.decode=function(r){return r.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(r){const c=[];let i="";for(let l=0;l<r.length;++l){const d=r[l];if(d==="{"){let p="";for(;l+1<r.length&&r[l+1]==="{";)p+="{",++l;c.push(i),i=p}else i+=d}return c.push(i),c},n.wrap=function(r,c){return c?c.length===1?`${c}${r}${c}`:`${c[0]}${r}${c[1]}`:r},n.stringify=function(r,c,i,l,d,p={}){const f=typeof r,k=l&&l.errors&&l.errors.wrap||{};let S=!1;if(a.isRef(r)&&r.render&&(S=r.in,r=r.resolve(c,i,l,d,{in:r.in,...p})),r===null)return"null";if(f==="string")return n.wrap(r,p.arrayItems&&k.string);if(f==="number"||f==="function"||f==="symbol")return r.toString();if(f!=="object")return JSON.stringify(r);if(r instanceof Date)return n.Template.date(r,l);if(r instanceof Map){const b=[];for(const[j,w]of r.entries())b.push(`${j.toString()} -> ${w.toString()}`);r=b}if(!Array.isArray(r))return r.toString();const h=[];for(const b of r)h.push(n.stringify(b,c,i,l,d,{arrayItems:!0,...p}));return n.wrap(h.join(", "),!S&&k.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(r,c,i)=>r?c:i,length:r=>typeof r=="string"?r.length:r&&typeof r=="object"?Array.isArray(r)?r.length:Object.keys(r).length:null,msg(r){const[c,i,l,d,p]=this,f=p.messages;if(!f)return"";const k=o.template(c,f[0],r,i,l)||o.template(c,f[1],r,i,l);return k?k.render(c,i,l,d,p):""},number:r=>typeof r=="number"?r:typeof r=="string"?parseFloat(r):typeof r=="boolean"?r?1:0:r instanceof Date?r.getTime():null}},4946:(_,x,y)=>{const s=y(375),g=y(1687),m=y(8068),u=y(8160),t=y(3292),o=y(6354),a=y(6133),n={};_.exports=m.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(r,...c)=>c.length===1&&Array.isArray(c[0])?r.try(...c[0]):r.try(...c),validate(r,c){const{schema:i,error:l,state:d,prefs:p}=c;if(i._flags.match){const k=[],S=[];for(let b=0;b<i.$_terms.matches.length;++b){const j=i.$_terms.matches[b],w=d.nest(j.schema,`match.${b}`);w.snapshot();const P=j.schema.$_validate(r,w,p);P.errors?(S.push(P.errors),w.restore()):(k.push(P.value),w.commit())}if(k.length===0)return{errors:l("alternatives.any",{details:S.map(b=>o.details(b,{override:!1}))})};if(i._flags.match==="one")return k.length===1?{value:k[0]}:{errors:l("alternatives.one")};if(k.length!==i.$_terms.matches.length)return{errors:l("alternatives.all",{details:S.map(b=>o.details(b,{override:!1}))})};const h=b=>b.$_terms.matches.some(j=>j.schema.type==="object"||j.schema.type==="alternatives"&&h(j.schema));return h(i)?{value:k.reduce((b,j)=>g(b,j,{mergeArrays:!1}))}:{value:k[k.length-1]}}const f=[];for(let k=0;k<i.$_terms.matches.length;++k){const S=i.$_terms.matches[k];if(S.schema){const j=d.nest(S.schema,`match.${k}`);j.snapshot();const w=S.schema.$_validate(r,j,p);if(!w.errors)return j.commit(),w;j.restore(),f.push({schema:S.schema,reports:w.errors});continue}const h=S.ref?S.ref.resolve(r,d,p):r,b=S.is?[S]:S.switch;for(let j=0;j<b.length;++j){const w=b[j],{is:P,then:$,otherwise:I}=w,q=`match.${k}${S.switch?"."+j:""}`;if(P.$_match(h,d.nest(P,`${q}.is`),p)){if($)return $.$_validate(r,d.nest($,`${q}.then`),p)}else if(I)return I.$_validate(r,d.nest(I,`${q}.otherwise`),p)}}return n.errors(f,c)},rules:{conditional:{method(r,c){s(!this._flags._endedSwitch,"Unreachable condition"),s(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),s(c.break===void 0,"Cannot use break option with alternatives conditional");const i=this.clone(),l=t.when(i,r,c),d=l.is?[l]:l.switch;for(const p of d)if(p.then&&p.otherwise){i.$_setFlag("_endedSwitch",!0,{clone:!1});break}return i.$_terms.matches.push(l),i.$_mutateRebuild()}},match:{method(r){if(s(["any","one","all"].includes(r),"Invalid alternatives match mode",r),r!=="any")for(const c of this.$_terms.matches)s(c.schema,"Cannot combine match mode",r,"with conditional rules");return this.$_setFlag("match",r)}},try:{method(...r){s(r.length,"Missing alternative schemas"),u.verifyFlat(r,"try"),s(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const i of r)c.$_terms.matches.push({schema:c.$_compile(i)});return c.$_mutateRebuild()}}},overrides:{label(r){return this.$_parent("label",r).$_modify({each:(c,i)=>i.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(r):void 0,ref:!1})}},rebuild(r){r.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&r.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(r,c){if(c.matches)for(const i of c.matches){const{schema:l,ref:d,is:p,not:f,then:k,otherwise:S}=i;r=l?r.try(l):d?r.conditional(d,{is:p,then:k,not:f,otherwise:S,switch:i.switch}):r.conditional(p,{then:k,otherwise:S})}return r}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),n.errors=function(r,{error:c,state:i}){if(!r.length)return{errors:c("alternatives.any")};if(r.length===1)return{errors:r[0].reports};const l=new Set,d=[];for(const{reports:p,schema:f}of r){if(p.length>1)return n.unmatched(r,c);const k=p[0];if(k instanceof o.Report==0)return n.unmatched(r,c);if(k.state.path.length!==i.path.length){d.push({type:f.type,report:k});continue}if(k.code==="any.only"){for(const b of k.local.valids)l.add(b);continue}const[S,h]=k.code.split(".");h!=="base"?d.push({type:f.type,report:k}):k.code==="object.base"?l.add(k.local.type):l.add(S)}return d.length?d.length===1?{errors:d[0].report}:n.unmatched(r,c):{errors:c("alternatives.types",{types:[...l]})}},n.unmatched=function(r,c){const i=[];for(const l of r)i.push(...l.reports);return{errors:c("alternatives.match",o.details(i,{override:!1}))}}},8068:(_,x,y)=>{const s=y(375),g=y(7629),m=y(8160),u=y(6914);_.exports=g.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(t,o){return s(typeof t=="function","Method must be a function"),s(o===void 0||o&&typeof o=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:o}})},validate(t,o,{method:a}){try{return a(t,o)}catch(n){return o.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){s(m.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const o=this.clone();return o.$_terms.shared=o.$_terms.shared||[],o.$_terms.shared.push(t),o.$_mutateRegister(t),o}},warning:{method(t,o){return s(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:o},warn:!0})},validate:(t,o,{code:a,local:n})=>o.error(a,n),args:["code","local"],multi:!0}},modifiers:{keep(t,o=!0){t.keep=o},message(t,o){t.message=u.compile(o)},warn(t,o=!0){t.warn=o}},manifest:{build(t,o){for(const a in o){const n=o[a];if(["examples","externals","metas","notes","tags"].includes(a))for(const r of n)t=t[a.slice(0,-1)](r);else if(a!=="alterations")if(a!=="whens"){if(a==="shared")for(const r of n)t=t.shared(r)}else for(const r of n){const{ref:c,is:i,not:l,then:d,otherwise:p,concat:f}=r;t=f?t.concat(f):c?t.when(c,{is:i,not:l,then:d,otherwise:p,switch:r.switch,break:r.break}):t.when(i,{then:d,otherwise:p,break:r.break})}else{const r={};for(const{target:c,adjuster:i}of n)r[c]=i;t=t.alter(r)}}return t}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(_,x,y)=>{const s=y(375),g=y(9474),m=y(9621),u=y(8068),t=y(8160),o=y(3292),a={};_.exports=u.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(n,{schema:r,state:c,prefs:i}){if(!Array.isArray(n))return;const l=r.$_getRule("sort");return l?a.sort(r,n,l.args.options,c,i):void 0}},validate(n,{schema:r,error:c}){if(!Array.isArray(n)){if(r._flags.single){const i=[n];return i[t.symbols.arraySingle]=!0,{value:i}}return{errors:c("array.base")}}if(r.$_getRule("items")||r.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const r=this.$_addRule({name:"has",args:{schema:n}});return r.$_mutateRegister(n),r},validate(n,{state:r,prefs:c,error:i},{schema:l}){const d=[n,...r.ancestors];for(let f=0;f<n.length;++f){const k=r.localize([...r.path,f],d,l);if(l.$_match(n[f],k,c))return n}const p=l._flags.label;return p?i("array.hasKnown",{patternLabel:p}):i("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const r=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});r.$_terms.items.push(i)}return r.$_mutateRebuild()},validate(n,{schema:r,error:c,state:i,prefs:l,errorsArray:d}){const p=r.$_terms._requireds.slice(),f=r.$_terms.ordered.slice(),k=[...r.$_terms._inclusions,...p],S=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const h=d();let b=n.length;for(let j=0;j<b;++j){const w=n[j];let P=!1,$=!1;const I=S?j:new Number(j),q=[...i.path,I];if(!r._flags.sparse&&w===void 0){if(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly)return h;f.shift();continue}const Z=[n,...i.ancestors];for(const H of r.$_terms._exclusions)if(H.$_match(w,i.localize(q,Z,H),l,{presence:"ignore"})){if(h.push(c("array.excludes",{pos:j,value:w},i.localize(q))),l.abortEarly)return h;P=!0,f.shift();break}if(P)continue;if(r.$_terms.ordered.length){if(f.length){const H=f.shift(),W=H.$_validate(w,i.localize(q,Z,H),l);if(W.errors){if(h.push(...W.errors),l.abortEarly)return h}else if(H._flags.result==="strip")a.fastSplice(n,j),--j,--b;else{if(!r._flags.sparse&&W.value===void 0){if(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly)return h;continue}n[j]=W.value}continue}if(!r.$_terms.items.length){if(h.push(c("array.orderedLength",{pos:j,limit:r.$_terms.ordered.length})),l.abortEarly)return h;break}}const K=[];let F=p.length;for(let H=0;H<F;++H){const W=i.localize(q,Z,p[H]);W.snapshot();const ee=p[H].$_validate(w,W,l);if(K[H]=ee,!ee.errors){if(W.commit(),n[j]=ee.value,$=!0,a.fastSplice(p,H),--H,--F,!r._flags.sparse&&ee.value===void 0&&(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly))return h;break}W.restore()}if($)continue;const L=l.stripUnknown&&!!l.stripUnknown.arrays||!1;F=k.length;for(const H of k){let W;const ee=p.indexOf(H);if(ee!==-1)W=K[ee];else{const ge=i.localize(q,Z,H);if(ge.snapshot(),W=H.$_validate(w,ge,l),!W.errors){ge.commit(),H._flags.result==="strip"?(a.fastSplice(n,j),--j,--b):r._flags.sparse||W.value!==void 0?n[j]=W.value:(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),P=!0),$=!0;break}ge.restore()}if(F===1){if(L){a.fastSplice(n,j),--j,--b,$=!0;break}if(h.push(...W.errors),l.abortEarly)return h;P=!0;break}}if(!P&&(r.$_terms._inclusions.length||r.$_terms._requireds.length)&&!$){if(L){a.fastSplice(n,j),--j,--b;continue}if(h.push(c("array.includes",{pos:j,value:w},i.localize(q))),l.abortEarly)return h}}return p.length&&a.fillMissedErrors(r,h,p,n,i,l),f.length&&(a.fillOrderedErrors(r,h,f,n,i,l),h.length||a.fillDefault(f,n,i,l)),h.length?h:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,r,{limit:c},{name:i,operator:l,args:d})=>t.compare(n.length,c,l)?n:r.error("array."+i,{limit:d.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const r=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});a.validateSingle(i,r),r.$_mutateRegister(i),r.$_terms.ordered.push(i)}return r.$_mutateRebuild()}},single:{method(n){const r=n===void 0||!!n;return s(!r||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",r)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const r={order:n.order||"ascending"};return n.by&&(r.by=o.ref(n.by,{ancestor:0}),s(!r.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:r}})},validate(n,{error:r,state:c,prefs:i,schema:l},{options:d}){const{value:p,errors:f}=a.sort(l,n,d,c,i);if(f)return f;for(let k=0;k<n.length;++k)if(n[k]!==p[k])return r("array.sort",{order:d.order,by:d.by?d.by.key:"value"});return n},convert:!0},sparse:{method(n){const r=n===void 0||!!n;return this._flags.sparse===r?this:(r?this.clone():this.$_addRule("items")).$_setFlag("sparse",r,{clone:!1})}},unique:{method(n,r={}){s(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(r,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:r,comparator:n}};if(n)if(typeof n=="string"){const i=t.default(r.separator,".");c.path=i?n.split(i):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:r,error:c,schema:i},{comparator:l,options:d},{comparator:p,path:f}){const k={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},S=p||g,h=d.ignoreUndefined;for(let b=0;b<n.length;++b){const j=f?m(n[b],f):n[b],w=p?k.custom:k[typeof j];if(s(w,"Failed to find unique map container for type",typeof j),w instanceof Map){const P=w.entries();let $;for(;!($=P.next()).done;)if(S($.value[0],j)){const I=r.localize([...r.path,b],[n,...r.ancestors]),q={pos:b,value:n[b],dupePos:$.value[1],dupeValue:n[$.value[1]]};return f&&(q.path=l),c("array.unique",q,I)}w.set(j,b)}else{if((!h||j!==void 0)&&w[j]!==void 0){const P={pos:b,value:n[b],dupePos:w[j],dupeValue:n[w[j]]};return f&&(P.path=l),c("array.unique",P,r.localize([...r.path,b],[n,...r.ancestors]))}w[j]=b}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,r)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const r of n.$_terms.items)a.validateSingle(r,n),r._flags.presence==="required"?n.$_terms._requireds.push(r):r._flags.presence==="forbidden"?n.$_terms._exclusions.push(r):n.$_terms._inclusions.push(r);for(const r of n.$_terms.ordered)a.validateSingle(r,n)},manifest:{build:(n,r)=>(r.items&&(n=n.items(...r.items)),r.ordered&&(n=n.ordered(...r.ordered)),n)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),a.fillMissedErrors=function(n,r,c,i,l,d){const p=[];let f=0;for(const k of c){const S=k._flags.label;S?p.push(S):++f}p.length?f?r.push(n.$_createError("array.includesRequiredBoth",i,{knownMisses:p,unknownMisses:f},l,d)):r.push(n.$_createError("array.includesRequiredKnowns",i,{knownMisses:p},l,d)):r.push(n.$_createError("array.includesRequiredUnknowns",i,{unknownMisses:f},l,d))},a.fillOrderedErrors=function(n,r,c,i,l,d){const p=[];for(const f of c)f._flags.presence==="required"&&p.push(f);p.length&&a.fillMissedErrors(n,r,p,i,l,d)},a.fillDefault=function(n,r,c,i){const l=[];let d=!0;for(let p=n.length-1;p>=0;--p){const f=n[p],k=[r,...c.ancestors],S=f.$_validate(void 0,c.localize(c.path,k,f),i).value;if(d){if(S===void 0)continue;d=!1}l.unshift(S)}l.length&&r.push(...l)},a.fastSplice=function(n,r){let c=r;for(;c<n.length;)n[c++]=n[c];--n.length},a.validateSingle=function(n,r){(n.type==="array"||n._flags._arrayItems)&&(s(!r._flags.single,"Cannot specify array item with single rule enabled"),r.$_setFlag("_arrayItems",!0,{clone:!1}))},a.sort=function(n,r,c,i,l){const d=c.order==="ascending"?1:-1,p=-1*d,f=d,k=(S,h)=>{let b=a.compare(S,h,p,f);if(b!==null||(c.by&&(S=c.by.resolve(S,i,l),h=c.by.resolve(h,i,l)),b=a.compare(S,h,p,f),b!==null))return b;const j=typeof S;if(j!==typeof h)throw n.$_createError("array.sort.mismatching",r,null,i,l);if(j!=="number"&&j!=="string")throw n.$_createError("array.sort.unsupported",r,{type:j},i,l);return j==="number"?(S-h)*d:S<h?p:f};try{return{value:r.slice().sort(k)}}catch(S){return{errors:S}}},a.compare=function(n,r,c,i){return n===r?0:n===void 0?1:r===void 0?-1:n===null?i:r===null?c:null}},4937:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(2036),t={isBool:function(o){return typeof o=="boolean"}};_.exports=g.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(o,{schema:a}){if(typeof o!="boolean"){if(typeof o=="string"){const n=a._flags.sensitive?o:o.toLowerCase();o=n==="true"||n!=="false"&&o}return typeof o!="boolean"&&(o=a.$_terms.truthy&&a.$_terms.truthy.has(o,null,null,!a._flags.sensitive)||(!a.$_terms.falsy||!a.$_terms.falsy.has(o,null,null,!a._flags.sensitive))&&o),{value:o}}},validate(o,{error:a}){if(typeof o!="boolean")return{value:o,errors:a("boolean.base")}},rules:{truthy:{method(...o){m.verifyFlat(o,"truthy");const a=this.clone();a.$_terms.truthy=a.$_terms.truthy||new u;for(let n=0;n<o.length;++n){const r=o[n];s(r!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(r)}return a}},falsy:{method(...o){m.verifyFlat(o,"falsy");const a=this.clone();a.$_terms.falsy=a.$_terms.falsy||new u;for(let n=0;n<o.length;++n){const r=o[n];s(r!==void 0,"Cannot call falsy with undefined"),a.$_terms.falsy.add(r)}return a}},sensitive:{method(o=!0){return this.$_setFlag("sensitive",o)}}},cast:{number:{from:t.isBool,to:(o,a)=>o?1:0},string:{from:t.isBool,to:(o,a)=>o?"true":"false"}},manifest:{build:(o,a)=>(a.truthy&&(o=o.truthy(...a.truthy)),a.falsy&&(o=o.falsy(...a.falsy)),o)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(3328),t={isDate:function(o){return o instanceof Date}};_.exports=g.extend({type:"date",coerce:{from:["number","string"],method:(o,{schema:a})=>({value:t.parse(o,a._flags.format)||o})},validate(o,{schema:a,error:n,prefs:r}){if(o instanceof Date&&!isNaN(o.getTime()))return;const c=a._flags.format;return r.convert&&c&&typeof o=="string"?{value:o,errors:n("date.format",{format:c})}:{value:o,errors:n("date.base")}},rules:{compare:{method:!1,validate(o,a,{date:n},{name:r,operator:c,args:i}){const l=n==="now"?Date.now():n.getTime();return m.compare(o.getTime(),l,c)?o:a.error("date."+r,{limit:i.date,value:o})},args:[{name:"date",ref:!0,normalize:o=>o==="now"?o:t.parse(o),assert:o=>o!==null,message:"must have a valid date format"}]},format:{method(o){return s(["iso","javascript","unix"].includes(o),"Unknown date format",o),this.$_setFlag("format",o)}},greater:{method(o){return this.$_addRule({name:"greater",method:"compare",args:{date:o},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(o){return this.$_addRule({name:"less",method:"compare",args:{date:o},operator:"<"})}},max:{method(o){return this.$_addRule({name:"max",method:"compare",args:{date:o},operator:"<="})}},min:{method(o){return this.$_addRule({name:"min",method:"compare",args:{date:o},operator:">="})}},timestamp:{method(o="javascript"){return s(["javascript","unix"].includes(o),'"type" must be one of "javascript, unix"'),this.format(o)}}},cast:{number:{from:t.isDate,to:(o,a)=>o.getTime()},string:{from:t.isDate,to:(o,{prefs:a})=>u.date(o,a)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),t.parse=function(o,a){if(o instanceof Date)return o;if(typeof o!="string"&&(isNaN(o)||!isFinite(o))||/^\s*$/.test(o))return null;if(a==="iso")return m.isIsoDate(o)?t.date(o.toString()):null;const n=o;if(typeof o=="string"&&/^[+-]?\d+(\.\d+)?$/.test(o)&&(o=parseFloat(o)),a){if(a==="javascript")return t.date(1*o);if(a==="unix")return t.date(1e3*o);if(typeof n=="string")return null}return t.date(o)},t.date=function(o){const a=new Date(o);return isNaN(a.getTime())?null:a}},390:(_,x,y)=>{const s=y(375),g=y(7824);_.exports=g.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(m){return s(Number.isSafeInteger(m)&&m>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:m}})},validate:(m,u,{n:t})=>m.length===t?m:u.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(m,u)=>/^\s*class\s/.test(m.toString())?m:u.error("function.class",{value:m})},minArity:{method(m){return s(Number.isSafeInteger(m)&&m>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:m}})},validate:(m,u,{n:t})=>m.length>=t?m:u.error("function.minArity",{n:t})},maxArity:{method(m){return s(Number.isSafeInteger(m)&&m>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:m}})},validate:(m,u,{n:t})=>m.length<=t?m:u.error("function.maxArity",{n:t})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(_,x,y)=>{const s=y(978),g=y(375),m=y(8571),u=y(3652),t=y(8068),o=y(8160),a=y(3292),n=y(6354),r=y(6133),c=y(3328),i={renameDefaults:{alias:!1,multiple:!1,override:!1}};_.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(l,d)=>l.keys(d),validate(l,{schema:d,error:p,state:f,prefs:k}){if(!l||typeof l!==d.$_property("typeof")||Array.isArray(l))return{value:l,errors:p("object.base",{type:d.$_property("typeof")})};if(!(d.$_terms.renames||d.$_terms.dependencies||d.$_terms.keys||d.$_terms.patterns||d.$_terms.externals))return;l=i.clone(l,k);const S=[];if(d.$_terms.renames&&!i.rename(d,l,f,k,S))return{value:l,errors:S};if(!d.$_terms.keys&&!d.$_terms.patterns&&!d.$_terms.dependencies)return{value:l,errors:S};const h=new Set(Object.keys(l));if(d.$_terms.keys){const b=[l,...f.ancestors];for(const j of d.$_terms.keys){const w=j.key,P=l[w];h.delete(w);const $=f.localize([...f.path,w],b,j),I=j.schema.$_validate(P,$,k);if(I.errors){if(k.abortEarly)return{value:l,errors:I.errors};I.value!==void 0&&(l[w]=I.value),S.push(...I.errors)}else j.schema._flags.result==="strip"||I.value===void 0&&P!==void 0?delete l[w]:I.value!==void 0&&(l[w]=I.value)}}if(h.size||d._flags._hasPatternMatch){const b=i.unknown(d,l,h,S,f,k);if(b)return b}if(d.$_terms.dependencies)for(const b of d.$_terms.dependencies){if(b.key!==null&&i.isPresent(b.options)(b.key.resolve(l,f,k,null,{shadow:!1}))===!1)continue;const j=i.dependencies[b.rel](d,b,l,f,k);if(j){const w=d.$_createError(j.code,l,j.context,f,k);if(k.abortEarly)return{value:l,errors:w};S.push(w)}}return{value:l,errors:S}},rules:{and:{method(...l){return o.verifyFlat(l,"and"),i.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,d,p){c.isTemplate(l)||(l=a.ref(l)),g(p===void 0||typeof p=="string","Message must be a string"),d=this.$_compile(d,{appendPath:!0});const f=this.$_addRule({name:"assert",args:{subject:l,schema:d,message:p}});return f.$_mutateRegister(l),f.$_mutateRegister(d),f},validate(l,{error:d,prefs:p,state:f},{subject:k,schema:S,message:h}){const b=k.resolve(l,f,p),j=r.isRef(k)?k.absolute(f):[];return S.$_match(b,f.localize(j,[l,...f.ancestors],S),p)?l:d("object.assert",{subject:k,message:h})},args:["subject","schema","message"],multi:!0},instance:{method(l,d){return g(typeof l=="function","constructor must be a function"),d=d||l.name,this.$_addRule({name:"instance",args:{constructor:l,name:d}})},validate:(l,d,{constructor:p,name:f})=>l instanceof p?l:d.error("object.instance",{type:f,value:l}),args:["constructor","name"]},keys:{method(l){g(l===void 0||typeof l=="object","Object schema must be a valid object"),g(!o.isSchema(l),"Object schema cannot be a joi schema");const d=this.clone();if(l)if(Object.keys(l).length){d.$_terms.keys=d.$_terms.keys?d.$_terms.keys.filter(p=>!l.hasOwnProperty(p.key)):new i.Keys;for(const p in l)o.tryWithPath(()=>d.$_terms.keys.push({key:p,schema:this.$_compile(l[p])}),p)}else d.$_terms.keys=new i.Keys;else d.$_terms.keys=null;return d.$_mutateRebuild()}},length:{method(l){return this.$_addRule({name:"length",args:{limit:l},operator:"="})},validate:(l,d,{limit:p},{name:f,operator:k,args:S})=>o.compare(Object.keys(l).length,p,k)?l:d.error("object."+f,{limit:S.limit,value:l}),args:[{name:"limit",ref:!0,assert:o.limit,message:"must be a positive integer"}]},max:{method(l){return this.$_addRule({name:"max",method:"length",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"length",args:{limit:l},operator:">="})}},nand:{method(...l){return o.verifyFlat(l,"nand"),i.dependency(this,"nand",null,l)}},or:{method(...l){return o.verifyFlat(l,"or"),i.dependency(this,"or",null,l)}},oxor:{method(...l){return i.dependency(this,"oxor",null,l)}},pattern:{method(l,d,p={}){const f=l instanceof RegExp;f||(l=this.$_compile(l,{appendPath:!0})),g(d!==void 0,"Invalid rule"),o.assertOptions(p,["fallthrough","matches"]),f&&g(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),d=this.$_compile(d,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const S={[f?"regex":"schema"]:l,rule:d};return p.matches&&(S.matches=this.$_compile(p.matches),S.matches.type!=="array"&&(S.matches=S.matches.$_root.array().items(S.matches)),k.$_mutateRegister(S.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),p.fallthrough&&(S.fallthrough=!0),k.$_terms.patterns.push(S),k.$_mutateRegister(d),k}},ref:{method(){return this.$_addRule("ref")},validate:(l,d)=>r.isRef(l)?l:d.error("object.refType",{value:l})},regex:{method(){return this.$_addRule("regex")},validate:(l,d)=>l instanceof RegExp?l:d.error("object.regex",{value:l})},rename:{method(l,d,p={}){g(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),g(typeof d=="string"||d instanceof c,"Invalid rename to argument"),g(d!==l,"Cannot rename key to same name:",l),o.assertOptions(p,["alias","ignoreUndefined","override","multiple"]);const f=this.clone();f.$_terms.renames=f.$_terms.renames||[];for(const k of f.$_terms.renames)g(k.from!==l,"Cannot rename the same key multiple times");return d instanceof c&&f.$_mutateRegister(d),f.$_terms.renames.push({from:l,to:d,options:s(i.renameDefaults,p)}),f}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,d,{type:p})=>!o.isSchema(l)||p!=="any"&&l.type!==p?d.error("object.schema",{type:p}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,d,p={}){return i.dependency(this,"with",l,d,p)}},without:{method(l,d,p={}){return i.dependency(this,"without",l,d,p)}},xor:{method(...l){return o.verifyFlat(l,"xor"),i.dependency(this,"xor",null,l)}}},overrides:{default(l,d){return l===void 0&&(l=o.symbols.deepDefault),this.$_parent("default",l,d)}},rebuild(l){if(l.$_terms.keys){const d=new u.Sorter;for(const p of l.$_terms.keys)o.tryWithPath(()=>d.add(p,{after:p.schema.$_rootReferences(),group:p.key}),p.key);l.$_terms.keys=new i.Keys(...d.nodes)}},manifest:{build(l,d){if(d.keys&&(l=l.keys(d.keys)),d.dependencies)for(const{rel:p,key:f=null,peers:k,options:S}of d.dependencies)l=i.dependency(l,p,f,k,S);if(d.patterns)for(const{regex:p,schema:f,rule:k,fallthrough:S,matches:h}of d.patterns)l=l.pattern(p||f,k,{fallthrough:S,matches:h});if(d.renames)for(const{from:p,to:f,options:k}of d.renames)l=l.rename(p,f,k);return l}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),i.clone=function(l,d){if(typeof l=="object"){if(d.nonEnumerables)return m(l,{shallow:!0});const f=Object.create(Object.getPrototypeOf(l));return Object.assign(f,l),f}const p=function(...f){return l.apply(this,f)};return p.prototype=m(l.prototype),Object.defineProperty(p,"name",{value:l.name,writable:!1}),Object.defineProperty(p,"length",{value:l.length,writable:!1}),Object.assign(p,l),p},i.dependency=function(l,d,p,f,k){g(p===null||typeof p=="string",d,"key must be a strings"),k||(k=f.length>1&&typeof f[f.length-1]=="object"?f.pop():{}),o.assertOptions(k,["separator","isPresent"]),f=[].concat(f);const S=o.default(k.separator,"."),h=[];for(const j of f)g(typeof j=="string",d,"peers must be strings"),h.push(a.ref(j,{separator:S,ancestor:0,prefix:!1}));p!==null&&(p=a.ref(p,{separator:S,ancestor:0,prefix:!1}));const b=l.clone();return b.$_terms.dependencies=b.$_terms.dependencies||[],b.$_terms.dependencies.push(new i.Dependency(d,p,h,f,k)),b},i.dependencies={and(l,d,p,f,k){const S=[],h=[],b=d.peers.length,j=i.isPresent(d.options);for(const w of d.peers)j(w.resolve(p,f,k,null,{shadow:!1}))===!1?S.push(w.key):h.push(w.key);if(S.length!==b&&h.length!==b)return{code:"object.and",context:{present:h,presentWithLabels:i.keysToLabels(l,h),missing:S,missingWithLabels:i.keysToLabels(l,S)}}},nand(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const w of d.peers)h(w.resolve(p,f,k,null,{shadow:!1}))&&S.push(w.key);if(S.length!==d.peers.length)return;const b=d.paths[0],j=d.paths.slice(1);return{code:"object.nand",context:{main:b,mainWithLabel:i.keysToLabels(l,b),peers:j,peersWithLabels:i.keysToLabels(l,j)}}},or(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)}}},oxor(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const j of d.peers)h(j.resolve(p,f,k,null,{shadow:!1}))&&S.push(j.key);if(!S.length||S.length===1)return;const b={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return b.present=S,b.presentWithLabels=i.keysToLabels(l,S),{code:"object.oxor",context:b}},with(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:i.keysToLabels(l,h.key)}}},without(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1})))return{code:"object.without",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:i.keysToLabels(l,h.key)}}},xor(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const j of d.peers)h(j.resolve(p,f,k,null,{shadow:!1}))&&S.push(j.key);if(S.length===1)return;const b={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return S.length===0?{code:"object.missing",context:b}:(b.present=S,b.presentWithLabels=i.keysToLabels(l,S),{code:"object.xor",context:b})}},i.keysToLabels=function(l,d){return Array.isArray(d)?d.map(p=>l.$_mapLabels(p)):l.$_mapLabels(d)},i.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:d=>d!==void 0},i.rename=function(l,d,p,f,k){const S={};for(const h of l.$_terms.renames){const b=[],j=typeof h.from!="string";if(j)for(const w in d){if(d[w]===void 0&&h.options.ignoreUndefined||w===h.to)continue;const P=h.from.exec(w);P&&b.push({from:w,to:h.to,match:P})}else!Object.prototype.hasOwnProperty.call(d,h.from)||d[h.from]===void 0&&h.options.ignoreUndefined||b.push(h);for(const w of b){const P=w.from;let $=w.to;if($ instanceof c&&($=$.render(d,p,f,w.match)),P!==$){if(!h.options.multiple&&S[$]&&(k.push(l.$_createError("object.rename.multiple",d,{from:P,to:$,pattern:j},p,f)),f.abortEarly)||Object.prototype.hasOwnProperty.call(d,$)&&!h.options.override&&!S[$]&&(k.push(l.$_createError("object.rename.override",d,{from:P,to:$,pattern:j},p,f)),f.abortEarly))return!1;d[P]===void 0?delete d[$]:d[$]=d[P],S[$]=!0,h.options.alias||delete d[P]}}}return!0},i.unknown=function(l,d,p,f,k,S){if(l.$_terms.patterns){let h=!1;const b=l.$_terms.patterns.map(w=>{if(w.matches)return h=!0,[]}),j=[d,...k.ancestors];for(const w of p){const P=d[w],$=[...k.path,w];for(let I=0;I<l.$_terms.patterns.length;++I){const q=l.$_terms.patterns[I];if(q.regex){const F=q.regex.test(w);if(k.mainstay.tracer.debug(k,"rule",`pattern.${I}`,F?"pass":"error"),!F)continue}else if(!q.schema.$_match(w,k.nest(q.schema,`pattern.${I}`),S))continue;p.delete(w);const Z=k.localize($,j,{schema:q.rule,key:w}),K=q.rule.$_validate(P,Z,S);if(K.errors){if(S.abortEarly)return{value:d,errors:K.errors};f.push(...K.errors)}if(q.matches&&b[I].push(w),d[w]=K.value,!q.fallthrough)break}}if(h)for(let w=0;w<b.length;++w){const P=b[w];if(!P)continue;const $=l.$_terms.patterns[w].matches,I=k.localize(k.path,j,$),q=$.$_validate(P,I,S);if(q.errors){const Z=n.details(q.errors,{override:!1});Z.matches=P;const K=l.$_createError("object.pattern.match",d,Z,k,S);if(S.abortEarly)return{value:d,errors:K};f.push(K)}}}if(p.size&&(l.$_terms.keys||l.$_terms.patterns)){if(S.stripUnknown&&l._flags.unknown===void 0||S.skipFunctions){const h=!(!S.stripUnknown||S.stripUnknown!==!0&&!S.stripUnknown.objects);for(const b of p)h?(delete d[b],p.delete(b)):typeof d[b]=="function"&&p.delete(b)}if(!o.default(l._flags.unknown,S.allowUnknown))for(const h of p){const b=k.localize([...k.path,h],[]),j=l.$_createError("object.unknown",d[h],{child:h},b,S,{flags:!1});if(S.abortEarly)return{value:d,errors:j};f.push(j)}}},i.Dependency=class{constructor(l,d,p,f,k){this.rel=l,this.key=d,this.peers=p,this.paths=f,this.options=k}describe(){const l={rel:this.rel,peers:this.paths};return this.key!==null&&(l.key=this.key.key),this.peers[0].separator!=="."&&(l.options={...l.options,separator:this.peers[0].separator}),this.options.isPresent&&(l.options={...l.options,isPresent:this.options.isPresent}),l}},i.Keys=class extends Array{concat(l){const d=this.slice(),p=new Map;for(let f=0;f<d.length;++f)p.set(d[f].key,f);for(const f of l){const k=f.key,S=p.get(k);S!==void 0?d[S]={key:k,schema:d[S].schema.concat(f.schema)}:d.push(f)}return d}}},8785:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(3292),t=y(6354),o={};_.exports=g.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(a,n)=>a.ref(n),validate(a,{schema:n,state:r,prefs:c}){s(n.$_terms.link,"Uninitialized link schema");const i=o.generate(n,a,r,c),l=n.$_terms.link[0].ref;return i.$_validate(a,r.nest(i,`link:${l.display}:${i.type}`),c)},generate:(a,n,r,c)=>o.generate(a,n,r,c),rules:{ref:{method(a){s(!this.$_terms.link,"Cannot reinitialize schema"),a=u.ref(a),s(a.type==="value"||a.type==="local","Invalid reference type:",a.type),s(a.type==="local"||a.ancestor==="root"||a.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:a}],n}},relative:{method(a=!0){return this.$_setFlag("relative",a)}}},overrides:{concat(a){s(this.$_terms.link,"Uninitialized link schema"),s(m.isSchema(a),"Invalid schema object"),s(a.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:a}),n.$_mutateRebuild()}},manifest:{build:(a,n)=>(s(n.link,"Invalid link description missing link"),a.ref(n.link))}}),o.generate=function(a,n,r,c){let i=r.mainstay.links.get(a);if(i)return i._generate(n,r,c).schema;const l=a.$_terms.link[0].ref,{perspective:d,path:p}=o.perspective(l,r);o.assert(d,"which is outside of schema boundaries",l,a,r,c);try{i=p.length?d.$_reach(p):d}catch{o.assert(!1,"to non-existing schema",l,a,r,c)}return o.assert(i.type!=="link","which is another link",l,a,r,c),a._flags.relative||r.mainstay.links.set(a,i),i._generate(n,r,c).schema},o.perspective=function(a,n){if(a.type==="local"){for(const{schema:r,key:c}of n.schemas){if((r._flags.id||c)===a.path[0])return{perspective:r,path:a.path.slice(1)};if(r.$_terms.shared){for(const i of r.$_terms.shared)if(i._flags.id===a.path[0])return{perspective:i,path:a.path.slice(1)}}}return{perspective:null,path:null}}return a.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:a.path}:{perspective:n.schemas[a.ancestor]&&n.schemas[a.ancestor].schema,path:a.path}},o.assert=function(a,n,r,c,i,l){a||s(!1,`"${t.label(c._flags,i,l)}" contains link reference "${r.display}" ${n}`)}},3832:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const o=t.toString(),a=o.indexOf("."),n=o.indexOf("e");return(a<0?0:(n<0?o.length:n)-a-1)+(n<0?0:Math.max(0,-parseInt(o.slice(n+1))))}};_.exports=g.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:o,error:a}){if(!t.match(u.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!o._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(n.value)))return n.errors=a("number.unsafe"),n}else{const r=n.value.toString();if(r.match(/e/i))return n;if(r!==u.normalizeDecimal(t))return n.errors=a("number.unsafe"),n}return n}},validate(t,{schema:o,error:a,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:a("number.infinity")};if(!m.isNumber(t))return{value:t,errors:a("number.base")};const r={value:t};if(n.convert){const c=o.$_getRule("precision");if(c){const i=Math.pow(10,c.args.limit);r.value=Math.round(r.value*i)/i}}return r.value===0&&(r.value=0),!o._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(r.errors=a("number.unsafe")),r},rules:{compare:{method:!1,validate:(t,o,{limit:a},{name:n,operator:r,args:c})=>m.compare(t,a,r)?t:o.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:m.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,o)=>Math.trunc(t)-t==0?t:o.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const o=typeof t=="number"?u.decimalPlaces(t):null,a=Math.pow(10,o);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:o,pfactor:a}})},validate:(t,o,{base:a,baseDecimalPlace:n,pfactor:r},c)=>u.decimalPlaces(t)>n?o.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(r*t)%Math.round(r*a)==0?t:o.error("number.multiple",{multiple:c.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,o)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:o.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return s(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,o,{limit:a}){const n=t.toString().match(u.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=a?t:o.error("number.precision",{limit:a,value:t})},convert:!0},sign:{method(t){return s(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,o,{sign:a})=>a==="negative"&&t<0||a==="positive"&&t>0?t:o.error(`number.${a}`)},unsafe:{method(t=!0){return s(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,o)=>t.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(t){return t.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(_,x,y)=>{const s=y(7824);_.exports=s.extend({type:"object",cast:{map:{from:g=>g&&typeof g=="object",to:(g,m)=>new Map(Object.entries(g))}}})},7417:(_,x,y)=>{const s=y(375),g=y(5380),m=y(1745),u=y(9959),t=y(6064),o=y(9926),a=y(5752),n=y(8068),r=y(8160),c={tlds:o instanceof Set&&{tlds:{allow:o,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:u.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};_.exports=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(i,{schema:l,state:d,prefs:p}){const f=l.$_getRule("normalize");f&&(i=i.normalize(f.args.form));const k=l.$_getRule("case");k&&(i=k.args.direction==="upper"?i.toLocaleUpperCase():i.toLocaleLowerCase());const S=l.$_getRule("trim");if(S&&S.args.enabled&&(i=i.trim()),l.$_terms.replacements)for(const b of l.$_terms.replacements)i=i.replace(b.pattern,b.replacement);const h=l.$_getRule("hex");if(h&&h.args.options.byteAligned&&i.length%2!=0&&(i=`0${i}`),l.$_getRule("isoDate")){const b=c.isoDate(i);b&&(i=b)}if(l._flags.truncate){const b=l.$_getRule("max");if(b){let j=b.args.limit;if(r.isResolvable(j)&&(j=j.resolve(i,d,p),!r.limit(j)))return{value:i,errors:l.$_createError("any.ref",j,{ref:b.args.limit,arg:"limit",reason:"must be a positive integer"},d,p)};i=i.slice(0,j)}}return{value:i}}},validate(i,{schema:l,error:d}){if(typeof i!="string")return{value:i,errors:d("string.base")};if(i===""){const p=l.$_getRule("min");return p&&p.args.limit===0?void 0:{value:i,errors:d("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(i,l)=>/^[a-zA-Z0-9]+$/.test(i)?i:l.error("string.alphanum")},base64:{method(i={}){return r.assertOptions(i,["paddingRequired","urlSafe"]),i={urlSafe:!1,paddingRequired:!0,...i},s(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),s(typeof i.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:i}})},validate:(i,l,{options:d})=>c.base64Regex[d.paddingRequired][d.urlSafe].test(i)?i:l.error("string.base64")},case:{method(i){return s(["lower","upper"].includes(i),"Invalid case:",i),this.$_addRule({name:"case",args:{direction:i}})},validate:(i,l,{direction:d})=>d==="lower"&&i===i.toLocaleLowerCase()||d==="upper"&&i===i.toLocaleUpperCase()?i:l.error(`string.${d}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(i,l){let d=i.length,p=0,f=1;for(;d--;){const k=i.charAt(d)*f;p+=k-9*(k>9),f^=3}return p>0&&p%10==0?i:l.error("string.creditCard")}},dataUri:{method(i={}){return r.assertOptions(i,["paddingRequired"]),i={paddingRequired:!0,...i},s(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:i}})},validate(i,l,{options:d}){const p=i.match(c.dataUriRegex);return p&&(!p[2]||p[2]!=="base64"||c.base64Regex[d.paddingRequired].false.test(p[3]))?i:l.error("string.dataUri")}},domain:{method(i){i&&r.assertOptions(i,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(i);return this.$_addRule({name:"domain",args:{options:i},address:l})},validate:(i,l,d,{address:p})=>g.isValid(i,p)?i:l.error("string.domain")},email:{method(i={}){r.assertOptions(i,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),s(i.multiple===void 0||typeof i.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(i),d=new RegExp(`\\s*[${i.separator?t(i.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:i},regex:d,address:l})},validate(i,l,{options:d},{regex:p,address:f}){const k=d.multiple?i.split(p):[i],S=[];for(const h of k)m.isValid(h,f)||S.push(h);return S.length?l.error("string.email",{value:i,invalids:S}):i}},guid:{alias:"uuid",method(i={}){r.assertOptions(i,["version","separator"]);let l="";if(i.version){const f=[].concat(i.version);s(f.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let S=0;S<f.length;++S){const h=f[S];s(typeof h=="string","version at position "+S+" must be a string");const b=c.guidVersions[h.toLowerCase()];s(b,"version at position "+S+" must be one of "+Object.keys(c.guidVersions).join(", ")),s(!k.has(b),"version at position "+S+" must not be a duplicate"),l+=b,k.add(b)}}s(c.guidSeparators.has(i.separator),'separator must be one of true, false, "-", or ":"');const d=i.separator===void 0?"[:-]?":i.separator===!0?"[:-]":i.separator===!1?"[]?":`\\${i.separator}`,p=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${d})[0-9A-F]{4}\\2?[${l||"0-9A-F"}][0-9A-F]{3}\\2?[${l?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:i},regex:p})},validate(i,l,d,{regex:p}){const f=p.exec(i);return f?c.guidBrackets[f[1]]!==f[f.length-1]?l.error("string.guid"):i:l.error("string.guid")}},hex:{method(i={}){return r.assertOptions(i,["byteAligned","prefix"]),i={byteAligned:!1,prefix:!1,...i},s(typeof i.byteAligned=="boolean","byteAligned must be boolean"),s(typeof i.prefix=="boolean"||i.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:i}})},validate:(i,l,{options:d})=>(d.prefix==="optional"?c.hexRegex.withOptionalPrefix:d.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(i)?d.byteAligned&&i.length%2!=0?l.error("string.hexAlign"):i:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(i,l)=>g.isValid(i,{minDomainSegments:1})||c.ipRegex.test(i)?i:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(i={}){r.assertOptions(i,["cidr","version"]);const{cidr:l,versions:d,regex:p}=u.regex(i),f=i.version?d:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:f}},regex:p})},validate:(i,l,{options:d},{regex:p})=>p.test(i)?i:d.version?l.error("string.ipVersion",{value:i,cidr:d.cidr,version:d.version}):l.error("string.ip",{value:i,cidr:d.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(i,{error:l})=>c.isoDate(i)?i:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(i,l)=>c.isoDurationRegex.test(i)?i:l.error("string.isoDuration")},length:{method(i,l){return c.length(this,"length",i,"=",l)},validate(i,l,{limit:d,encoding:p},{name:f,operator:k,args:S}){const h=!p&&i.length;return r.compare(h,d,k)?i:l.error("string."+f,{limit:S.limit,value:i,encoding:p})},args:[{name:"limit",ref:!0,assert:r.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(i,l){return c.length(this,"max",i,"<=",l)},args:["limit","encoding"]},min:{method(i,l){return c.length(this,"min",i,">=",l)},args:["limit","encoding"]},normalize:{method(i="NFC"){return s(c.normalizationForms.includes(i),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:i}})},validate:(i,{error:l},{form:d})=>i===i.normalize(d)?i:l("string.normalize",{value:i,form:d}),convert:!0},pattern:{alias:"regex",method(i,l={}){s(i instanceof RegExp,"regex must be a RegExp"),s(!i.flags.includes("g")&&!i.flags.includes("y"),"regex should not use global or sticky mode"),typeof l=="string"&&(l={name:l}),r.assertOptions(l,["invert","name"]);const d=["string.pattern",l.invert?".invert":"",l.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:i,options:l},errorCode:d})},validate:(i,l,{regex:d,options:p},{errorCode:f})=>d.test(i)^p.invert?i:l.error(f,{name:p.name,regex:d,value:i}),args:["regex","options"],multi:!0},replace:{method(i,l){typeof i=="string"&&(i=new RegExp(t(i),"g")),s(i instanceof RegExp,"pattern must be a RegExp"),s(typeof l=="string","replacement must be a String");const d=this.clone();return d.$_terms.replacements||(d.$_terms.replacements=[]),d.$_terms.replacements.push({pattern:i,replacement:l}),d}},token:{method(){return this.$_addRule("token")},validate:(i,l)=>/^\w+$/.test(i)?i:l.error("string.token")},trim:{method(i=!0){return s(typeof i=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:i}})},validate:(i,l,{enabled:d})=>d&&i!==i.trim()?l.error("string.trim"):i,convert:!0},truncate:{method(i=!0){return s(typeof i=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",i)}},uppercase:{method(){return this.case("upper")}},uri:{method(i={}){r.assertOptions(i,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),i.domain&&r.assertOptions(i.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:d}=a.regex(i),p=i.domain?c.addressOptions(i.domain):null;return this.$_addRule({name:"uri",args:{options:i},regex:l,domain:p,scheme:d})},validate(i,l,{options:d},{regex:p,domain:f,scheme:k}){if(["http:/","https:/"].includes(i))return l.error("string.uri");let S=p.exec(i);if(!S&&l.prefs.convert&&d.encodeUri){const h=encodeURI(i);S=p.exec(h),S&&(i=h)}if(S){const h=S[1]||S[2];return!f||d.allowRelative&&!h||g.isValid(h,f)?i:l.error("string.domain",{value:h})}return d.relativeOnly?l.error("string.uriRelativeOnly"):d.scheme?l.error("string.uriCustomScheme",{scheme:k,value:i}):l.error("string.uri")}}},manifest:{build(i,l){if(l.replacements)for(const{pattern:d,replacement:p}of l.replacements)i=i.replace(d,p);return i}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(i){if(!i)return c.tlds||i;if(s(i.minDomainSegments===void 0||Number.isSafeInteger(i.minDomainSegments)&&i.minDomainSegments>0,"minDomainSegments must be a positive integer"),s(i.maxDomainSegments===void 0||Number.isSafeInteger(i.maxDomainSegments)&&i.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),i.tlds===!1)return i;if(i.tlds===!0||i.tlds===void 0)return s(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds);s(typeof i.tlds=="object","tlds must be true, false, or an object");const l=i.tlds.deny;if(l)return Array.isArray(l)&&(i=Object.assign({},i,{tlds:{deny:new Set(l)}})),s(i.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),s(!i.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(i.tlds.deny,"tlds.deny"),i;const d=i.tlds.allow;return d?d===!0?(s(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds)):(Array.isArray(d)&&(i=Object.assign({},i,{tlds:{allow:new Set(d)}})),s(i.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(i.tlds.allow,"tlds.allow"),i):i},c.validateTlds=function(i,l){for(const d of i)s(g.isValid(d,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(i){if(!r.isIsoDate(i))return null;/.*T.*[+-]\d\d$/.test(i)&&(i+="00");const l=new Date(i);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(i,l,d,p,f){return s(!f||!1,"Invalid encoding:",f),i.$_addRule({name:l,method:"length",args:{limit:d,encoding:f},operator:p})}},8826:(_,x,y)=>{const s=y(375),g=y(8068),m={};m.Map=class extends Map{slice(){return new m.Map(this)}},_.exports=g.extend({type:"symbol",terms:{map:{init:new m.Map}},coerce:{method(u,{schema:t,error:o}){const a=t.$_terms.map.get(u);return a&&(u=a),t._flags.only&&typeof u!="symbol"?{value:u,errors:o("symbol.map",{map:t.$_terms.map})}:{value:u}}},validate(u,{error:t}){if(typeof u!="symbol")return{value:u,errors:t("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),s(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),o=[];for(const a of u){s(a&&a[Symbol.iterator],"Entry must be an iterable");const[n,r]=a;s(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),s(typeof r=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,r),o.push(r)}return t.valid(...o)}}},manifest:{build:(u,t)=>(t.map&&(u=u.map(t.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,x,y)=>{const s=y(375),g=y(8571),m=y(738),u=y(9621),t=y(8160),o=y(6354),a=y(493),n={result:Symbol("result")};x.entry=function(r,c,i){let l=t.defaults;i&&(s(i.warnings===void 0,"Cannot override warnings preference in synchronous validation"),s(i.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=t.preferences(t.defaults,i));const d=n.entry(r,c,l);s(!d.mainstay.externals.length,"Schema with external rules must use validateAsync()");const p={value:d.value};return d.error&&(p.error=d.error),d.mainstay.warnings.length&&(p.warning=o.details(d.mainstay.warnings)),d.mainstay.debug&&(p.debug=d.mainstay.debug),d.mainstay.artifacts&&(p.artifacts=d.mainstay.artifacts),p},x.entryAsync=async function(r,c,i){let l=t.defaults;i&&(l=t.preferences(t.defaults,i));const d=n.entry(r,c,l),p=d.mainstay;if(d.error)throw p.debug&&(d.error.debug=p.debug),d.error;if(p.externals.length){let k=d.value;const S=[];for(const h of p.externals){const b=h.state.path,j=h.schema.type==="link"?p.links.get(h.schema):null;let w,P,$=k;const I=b.length?[k]:[],q=b.length?u(r,b):r;if(b.length){w=b[b.length-1];let Z=k;for(const K of b.slice(0,-1))Z=Z[K],I.unshift(Z);P=I[0],$=P[w]}try{const Z=(F,L)=>(j||h.schema).$_createError(F,$,L,h.state,l),K=await h.method($,{schema:h.schema,linked:j,state:h.state,prefs:i,original:q,error:Z,errorsArray:n.errorsArray,warn:(F,L)=>p.warnings.push((j||h.schema).$_createError(F,$,L,h.state,l)),message:(F,L)=>(j||h.schema).$_createError("external",$,L,h.state,l,{messages:F})});if(K===void 0||K===$)continue;if(K instanceof o.Report){if(p.tracer.log(h.schema,h.state,"rule","external","error"),S.push(K),l.abortEarly)break;continue}if(Array.isArray(K)&&K[t.symbols.errors]){if(p.tracer.log(h.schema,h.state,"rule","external","error"),S.push(...K),l.abortEarly)break;continue}P?(p.tracer.value(h.state,"rule",$,K,"external"),P[w]=K):(p.tracer.value(h.state,"rule",k,K,"external"),k=K)}catch(Z){throw l.errors.label&&(Z.message+=` (${h.label})`),Z}}if(d.value=k,S.length)throw d.error=o.process(S,r,l),p.debug&&(d.error.debug=p.debug),d.error}if(!l.warnings&&!l.debug&&!l.artifacts)return d.value;const f={value:d.value};return p.warnings.length&&(f.warning=o.details(p.warnings)),p.debug&&(f.debug=p.debug),p.artifacts&&(f.artifacts=p.artifacts),f},n.Mainstay=class{constructor(r,c,i){this.externals=[],this.warnings=[],this.tracer=r,this.debug=c,this.links=i,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const r=this._snapshots.pop();this.externals=r.externals,this.warnings=r.warnings}commit(){this._snapshots.pop()}},n.entry=function(r,c,i){const{tracer:l,cleanup:d}=n.tracer(c,i),p=i.debug?[]:null,f=c._ids._schemaChain?new Map:null,k=new n.Mainstay(l,p,f),S=c._ids._schemaChain?[{schema:c}]:null,h=new a([],[],{mainstay:k,schemas:S}),b=x.validate(r,c,h,i);d&&c.$_root.untrace();const j=o.process(b.errors,r,i);return{value:b.value,error:j,mainstay:k}},n.tracer=function(r,c){return r.$_root._tracer?{tracer:r.$_root._tracer._register(r)}:c.debug?(s(r.$_root.trace,"Debug mode not supported"),{tracer:r.$_root.trace()._register(r),cleanup:!0}):{tracer:n.ignore}},x.validate=function(r,c,i,l,d={}){if(c.$_terms.whens&&(c=c._generate(r,i,l).schema),c._preferences&&(l=n.prefs(c,l)),c._cache&&l.cache){const j=c._cache.get(r);if(i.mainstay.tracer.debug(i,"validate","cached",!!j),j)return j}const p=(j,w,P)=>c.$_createError(j,r,w,P||i,l),f={original:r,prefs:l,schema:c,state:i,error:p,errorsArray:n.errorsArray,warn:(j,w,P)=>i.mainstay.warnings.push(p(j,w,P)),message:(j,w)=>c.$_createError("custom",r,w,i,l,{messages:j})};i.mainstay.tracer.entry(c,i);const k=c._definition;if(k.prepare&&r!==void 0&&l.convert){const j=k.prepare(r,f);if(j){if(i.mainstay.tracer.value(i,"prepare",r,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),f);r=j.value}}if(k.coerce&&r!==void 0&&l.convert&&(!k.coerce.from||k.coerce.from.includes(typeof r))){const j=k.coerce.method(r,f);if(j){if(i.mainstay.tracer.value(i,"coerced",r,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),f);r=j.value}}const S=c._flags.empty;S&&S.$_match(n.trim(r,c),i.nest(S),t.defaults)&&(i.mainstay.tracer.value(i,"empty",r,void 0),r=void 0);const h=d.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(r===void 0){if(h==="forbidden")return n.finalize(r,null,f);if(h==="required")return n.finalize(r,[c.$_createError("any.required",r,null,i,l)],f);if(h==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(r,null,f);i.mainstay.tracer.value(i,"default",r,{}),r={}}}else if(h==="forbidden")return n.finalize(r,[c.$_createError("any.unknown",r,null,i,l)],f);const b=[];if(c._valids){const j=c._valids.get(r,i,l,c._flags.insensitive);if(j)return l.convert&&(i.mainstay.tracer.value(i,"valids",r,j.value),r=j.value),i.mainstay.tracer.filter(c,i,"valid",j),n.finalize(r,null,f);if(c._flags.only){const w=c.$_createError("any.only",r,{valids:c._valids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(r,[w],f);b.push(w)}}if(c._invalids){const j=c._invalids.get(r,i,l,c._flags.insensitive);if(j){i.mainstay.tracer.filter(c,i,"invalid",j);const w=c.$_createError("any.invalid",r,{invalids:c._invalids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(r,[w],f);b.push(w)}}if(k.validate){const j=k.validate(r,f);if(j&&(i.mainstay.tracer.value(i,"base",r,j.value),r=j.value,j.errors)){if(!Array.isArray(j.errors))return b.push(j.errors),n.finalize(r,b,f);if(j.errors.length)return b.push(...j.errors),n.finalize(r,b,f)}}return c._rules.length?n.rules(r,b,f):n.finalize(r,b,f)},n.rules=function(r,c,i){const{schema:l,state:d,prefs:p}=i;for(const f of l._rules){const k=l._definition.rules[f.method];if(k.convert&&p.convert){d.mainstay.tracer.log(l,d,"rule",f.name,"full");continue}let S,h=f.args;if(f._resolve.length){h=Object.assign({},h);for(const j of f._resolve){const w=k.argsByName.get(j),P=h[j].resolve(r,d,p),$=w.normalize?w.normalize(P):P,I=t.validateArg($,null,w);if(I){S=l.$_createError("any.ref",P,{arg:j,ref:h[j],reason:I},d,p);break}h[j]=$}}S=S||k.validate(r,i,h,f);const b=n.rule(S,f);if(b.errors){if(d.mainstay.tracer.log(l,d,"rule",f.name,"error"),f.warn){d.mainstay.warnings.push(...b.errors);continue}if(p.abortEarly)return n.finalize(r,b.errors,i);c.push(...b.errors)}else d.mainstay.tracer.log(l,d,"rule",f.name,"pass"),d.mainstay.tracer.value(d,"rule",r,b.value,f.name),r=b.value}return n.finalize(r,c,i)},n.rule=function(r,c){return r instanceof o.Report?(n.error(r,c),{errors:[r],value:null}):Array.isArray(r)&&r[t.symbols.errors]?(r.forEach(i=>n.error(i,c)),{errors:r,value:null}):{errors:null,value:r}},n.error=function(r,c){return c.message&&r._setTemplate(c.message),r},n.finalize=function(r,c,i){c=c||[];const{schema:l,state:d,prefs:p}=i;if(c.length){const k=n.default("failover",void 0,c,i);k!==void 0&&(d.mainstay.tracer.value(d,"failover",r,k),r=k,c=[])}if(c.length&&l._flags.error)if(typeof l._flags.error=="function"){c=l._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)s(k instanceof Error||k instanceof o.Report,"error() must return an Error object")}else c=[l._flags.error];if(r===void 0){const k=n.default("default",r,c,i);d.mainstay.tracer.value(d,"default",r,k),r=k}if(l._flags.cast&&r!==void 0){const k=l._definition.cast[l._flags.cast];if(k.from(r)){const S=k.to(r,i);d.mainstay.tracer.value(d,"cast",r,S,l._flags.cast),r=S}}if(l.$_terms.externals&&p.externals&&p._externals!==!1)for(const{method:k}of l.$_terms.externals)d.mainstay.externals.push({method:k,schema:l,state:d,label:o.label(l._flags,d,p)});const f={value:r,errors:c.length?c:null};return l._flags.result&&(f.value=l._flags.result==="strip"?void 0:i.original,d.mainstay.tracer.value(d,l._flags.result,r,f.value),d.shadow(r,l._flags.result)),l._cache&&p.cache!==!1&&!l._refs.length&&l._cache.set(i.original,f),r===void 0||f.errors||l._flags.artifact===void 0||(d.mainstay.artifacts=d.mainstay.artifacts||new Map,d.mainstay.artifacts.has(l._flags.artifact)||d.mainstay.artifacts.set(l._flags.artifact,[]),d.mainstay.artifacts.get(l._flags.artifact).push(d.path)),f},n.prefs=function(r,c){const i=c===t.defaults;return i&&r._preferences[t.symbols.prefs]?r._preferences[t.symbols.prefs]:(c=t.preferences(c,r._preferences),i&&(r._preferences[t.symbols.prefs]=c),c)},n.default=function(r,c,i,l){const{schema:d,state:p,prefs:f}=l,k=d._flags[r];if(f.noDefaults||k===void 0)return c;if(p.mainstay.tracer.log(d,p,"rule",r,"full"),!k)return k;if(typeof k=="function"){const S=k.length?[g(p.ancestors[0]),l]:[];try{return k(...S)}catch(h){return void i.push(d.$_createError(`any.${r}`,null,{error:h},p,f))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,p,f):g(k)},n.trim=function(r,c){if(typeof r!="string")return r;const i=c.$_getRule("trim");return i&&i.args.enabled?r.trim():r},n.ignore={active:!1,debug:m,entry:m,filter:m,log:m,resolve:m,value:m},n.errorsArray=function(){const r=[];return r[t.symbols.errors]=!0,r}},2036:(_,x,y)=>{const s=y(375),g=y(9474),m=y(8160),u={};_.exports=u.Values=class{constructor(t,o){this._values=new Set(t),this._refs=new Set(o),this._lowercase=u.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,o){m.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),o&&o.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,o,a){if(t=t||new u.Values,o){if(o._override)return o.clone();for(const n of[...o._values,...o._refs])t.add(n)}if(a)for(const n of[...a._values,...a._refs])t.remove(n);return t.length?t:null}remove(t){m.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,o,a,n){return!!this.get(t,o,a,n)}get(t,o,a,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const r=this._lowercase.get(t.toLowerCase());if(r)return{value:r}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const r of this._values)if(g(r,t))return{value:r}}if(o)for(const r of this._refs){const c=r.resolve(t,o,a,null,{in:!0});if(c===void 0)continue;const i=r.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of i)if(typeof l==typeof t){if(n&&t&&typeof t=="string"){if(l.toLowerCase()===t.toLowerCase())return{value:l,ref:r}}else if(g(l,t))return{value:l,ref:r}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const o=[];for(const a of[...this._values,...this._refs])a!==void 0&&o.push(a);return o}return Array.from([...this._values,...this._refs])}clone(){const t=new u.Values(this._values,this._refs);return t._override=this._override,t}concat(t){s(!t._override,"Cannot concat override set of values");const o=new u.Values([...this._values,...t._values],[...this._refs,...t._refs]);return o._override=this._override,o}describe(){const t=[];this._override&&t.push({override:!0});for(const o of this._values.values())t.push(o&&typeof o=="object"?{value:o}:o);for(const o of this._refs.values())t.push(o.describe());return t}},u.Values.prototype[m.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(t){const o=new Map;if(t)for(const a of t)typeof a=="string"&&o.set(a.toLowerCase(),a);return o}},978:(_,x,y)=>{const s=y(375),g=y(8571),m=y(1687),u=y(9621),t={};_.exports=function(o,a,n={}){if(s(o&&typeof o=="object","Invalid defaults value: must be an object"),s(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),s(typeof n=="object","Invalid options: must be an object"),!a)return null;if(n.shallow)return t.applyToDefaultsWithShallow(o,a,n);const r=g(o);if(a===!0)return r;const c=n.nullOverride!==void 0&&n.nullOverride;return m(r,a,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(o,a,n){const r=n.shallow;s(Array.isArray(r),"Invalid keys");const c=new Map,i=a===!0?null:new Set;for(let p of r){p=Array.isArray(p)?p:p.split(".");const f=u(o,p);f&&typeof f=="object"?c.set(f,i&&u(a,p)||f):i&&i.add(p)}const l=g(o,{},c);if(!i)return l;for(const p of i)t.reachCopy(l,a,p);const d=n.nullOverride!==void 0&&n.nullOverride;return m(l,a,{nullOverride:d,mergeArrays:!1})},t.reachCopy=function(o,a,n){for(const i of n){if(!(i in a))return;const l=a[i];if(typeof l!="object"||l===null)return;a=l}const r=a;let c=o;for(let i=0;i<n.length-1;++i){const l=n[i];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[n[n.length-1]]=r}},375:(_,x,y)=>{const s=y(7916);_.exports=function(g,...m){if(!g)throw m.length===1&&m[0]instanceof Error?m[0]:new s(m)}},8571:(_,x,y)=>{const s=y(9621),g=y(4277),m=y(7043),u={needsProtoHack:new Set([g.set,g.map,g.weakSet,g.weakMap])};_.exports=u.clone=function(t,o={},a=null){if(typeof t!="object"||t===null)return t;let n=u.clone,r=a;if(o.shallow){if(o.shallow!==!0)return u.cloneWithShallow(t,o);n=d=>d}else if(r){const d=r.get(t);if(d)return d}else r=new Map;const c=g.getInternalProto(t);if(c===g.buffer)return!1;if(c===g.date)return new Date(t.getTime());if(c===g.regex)return new RegExp(t);const i=u.base(t,c,o);if(i===t)return t;if(r&&r.set(t,i),c===g.set)for(const d of t)i.add(n(d,o,r));else if(c===g.map)for(const[d,p]of t)i.set(d,n(p,o,r));const l=m.keys(t,o);for(const d of l){if(d==="__proto__")continue;if(c===g.array&&d==="length"){i.length=t.length;continue}const p=Object.getOwnPropertyDescriptor(t,d);p?p.get||p.set?Object.defineProperty(i,d,p):p.enumerable?i[d]=n(t[d],o,r):Object.defineProperty(i,d,{enumerable:!1,writable:!0,configurable:!0,value:n(t[d],o,r)}):Object.defineProperty(i,d,{enumerable:!0,writable:!0,configurable:!0,value:n(t[d],o,r)})}return i},u.cloneWithShallow=function(t,o){const a=o.shallow;(o=Object.assign({},o)).shallow=!1;const n=new Map;for(const r of a){const c=s(t,r);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return u.clone(t,o,n)},u.base=function(t,o,a){if(a.prototype===!1)return u.needsProtoHack.has(o)?new o.constructor:o===g.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(o===g.array){const r=[];return n!==o&&Object.setPrototypeOf(r,n),r}if(u.needsProtoHack.has(o)){const r=new n.constructor;return n!==o&&Object.setPrototypeOf(r,n),r}return Object.create(n)}},9474:(_,x,y)=>{const s=y(4277),g={mismatched:null};_.exports=function(m,u,t){return t=Object.assign({prototype:!0},t),!!g.isDeepEqual(m,u,t,[])},g.isDeepEqual=function(m,u,t,o){if(m===u)return m!==0||1/m==1/u;const a=typeof m;if(a!==typeof u||m===null||u===null)return!1;if(a==="function"){if(!t.deepFunction||m.toString()!==u.toString())return!1}else if(a!=="object")return m!=m&&u!=u;const n=g.getSharedType(m,u,!!t.prototype);switch(n){case s.buffer:return!1;case s.promise:return m===u;case s.regex:return m.toString()===u.toString();case g.mismatched:return!1}for(let r=o.length-1;r>=0;--r)if(o[r].isSame(m,u))return!0;o.push(new g.SeenEntry(m,u));try{return!!g.isDeepEqualObj(n,m,u,t,o)}finally{o.pop()}},g.getSharedType=function(m,u,t){if(t)return Object.getPrototypeOf(m)!==Object.getPrototypeOf(u)?g.mismatched:s.getInternalProto(m);const o=s.getInternalProto(m);return o!==s.getInternalProto(u)?g.mismatched:o},g.valueOf=function(m){const u=m.valueOf;if(u===void 0)return m;try{return u.call(m)}catch(t){return t}},g.hasOwnEnumerableProperty=function(m,u){return Object.prototype.propertyIsEnumerable.call(m,u)},g.isSetSimpleEqual=function(m,u){for(const t of Set.prototype.values.call(m))if(!Set.prototype.has.call(u,t))return!1;return!0},g.isDeepEqualObj=function(m,u,t,o,a){const{isDeepEqual:n,valueOf:r,hasOwnEnumerableProperty:c}=g,{keys:i,getOwnPropertySymbols:l}=Object;if(m===s.array){if(!o.part){if(u.length!==t.length)return!1;for(let S=0;S<u.length;++S)if(!n(u[S],t[S],o,a))return!1;return!0}for(const S of u)for(const h of t)if(n(S,h,o,a))return!0}else if(m===s.set){if(u.size!==t.size)return!1;if(!g.isSetSimpleEqual(u,t)){const S=new Set(Set.prototype.values.call(t));for(const h of Set.prototype.values.call(u)){if(S.delete(h))continue;let b=!1;for(const j of S)if(n(h,j,o,a)){S.delete(j),b=!0;break}if(!b)return!1}}}else if(m===s.map){if(u.size!==t.size)return!1;for(const[S,h]of Map.prototype.entries.call(u))if(h===void 0&&!Map.prototype.has.call(t,S)||!n(h,Map.prototype.get.call(t,S),o,a))return!1}else if(m===s.error&&(u.name!==t.name||u.message!==t.message))return!1;const d=r(u),p=r(t);if((u!==d||t!==p)&&!n(d,p,o,a))return!1;const f=i(u);if(!o.part&&f.length!==i(t).length&&!o.skip)return!1;let k=0;for(const S of f)if(o.skip&&o.skip.includes(S))t[S]===void 0&&++k;else if(!c(t,S)||!n(u[S],t[S],o,a))return!1;if(!o.part&&f.length-k!==i(t).length)return!1;if(o.symbols!==!1){const S=l(u),h=new Set(l(t));for(const b of S){if(!o.skip||!o.skip.includes(b)){if(c(u,b)){if(!c(t,b)||!n(u[b],t[b],o,a))return!1}else if(c(t,b))return!1}h.delete(b)}for(const b of h)if(c(t,b))return!1}return!0},g.SeenEntry=class{constructor(m,u){this.obj=m,this.ref=u}isSame(m,u){return this.obj===m&&this.ref===u}}},7916:(_,x,y)=>{const s=y(8761);_.exports=class extends Error{constructor(g){super(g.filter(m=>m!=="").map(m=>typeof m=="string"?m:m instanceof Error?m.message:s(m)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x.assert)}}},5277:_=>{const x={};_.exports=function(y){if(!y)return"";let s="";for(let g=0;g<y.length;++g){const m=y.charCodeAt(g);x.isSafe(m)?s+=y[g]:s+=x.escapeHtmlChar(m)}return s},x.escapeHtmlChar=function(y){return x.namedHtml.get(y)||(y>=256?"&#"+y+";":`&#x${y.toString(16).padStart(2,"0")};`)},x.isSafe=function(y){return x.safeCharCodes.has(y)},x.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),x.safeCharCodes=function(){const y=new Set;for(let s=32;s<123;++s)(s>=97||s>=65&&s<=90||s>=48&&s<=57||s===32||s===46||s===44||s===45||s===58||s===95)&&y.add(s);return y}()},6064:_=>{_.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,x,y)=>{const s=y(375),g=y(8571),m=y(7043),u={};_.exports=u.merge=function(t,o,a){if(s(t&&typeof t=="object","Invalid target value: must be an object"),s(o==null||typeof o=="object","Invalid source value: must be null, undefined, or an object"),!o)return t;if(a=Object.assign({nullOverride:!0,mergeArrays:!0},a),Array.isArray(o)){s(Array.isArray(t),"Cannot merge array onto an object"),a.mergeArrays||(t.length=0);for(let r=0;r<o.length;++r)t.push(g(o[r],{symbols:a.symbols}));return t}const n=m.keys(o,a);for(let r=0;r<n.length;++r){const c=n[r];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,c))continue;const i=o[c];if(i&&typeof i=="object"){if(t[c]===i)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(i)||i instanceof Date||i instanceof RegExp?t[c]=g(i,{symbols:a.symbols}):u.merge(t[c],i,a)}else(i!=null||a.nullOverride)&&(t[c]=i)}return t}},9621:(_,x,y)=>{const s=y(375),g={};_.exports=function(m,u,t){if(u===!1||u==null)return m;typeof(t=t||{})=="string"&&(t={separator:t});const o=Array.isArray(u);s(!o||!t.separator,"Separator option is not valid for array-based chain");const a=o?u:u.split(t.separator||".");let n=m;for(let r=0;r<a.length;++r){let c=a[r];const i=t.iterables&&g.iterables(n);if(Array.isArray(n)||i==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?n.length+l:l)}if(!n||typeof n=="function"&&t.functions===!1||!i&&n[c]===void 0){s(!t.strict||r+1===a.length,"Missing segment",c,"in reach path ",u),s(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",u),n=t.default;break}n=i?i==="set"?[...n][c]:n.get(c):n[c]}return n},g.iterables=function(m){return m instanceof Set?"set":m instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...x){try{return JSON.stringify(...x)}catch(y){return"[Cannot display object: "+y.message+"]"}}},4277:(_,x)=>{const y={};x=_.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},y.typeMap=new Map([["[object Error]",x.error],["[object Map]",x.map],["[object Promise]",x.promise],["[object Set]",x.set],["[object WeakMap]",x.weakMap],["[object WeakSet]",x.weakSet]]),x.getInternalProto=function(s){if(Array.isArray(s))return x.array;if(s instanceof Date)return x.date;if(s instanceof RegExp)return x.regex;if(s instanceof Error)return x.error;const g=Object.prototype.toString.call(s);return y.typeMap.get(g)||x.generic}},7043:(_,x)=>{x.keys=function(y,s={}){return s.symbols!==!1?Reflect.ownKeys(y):Object.getOwnPropertyNames(y)}},3652:(_,x,y)=>{const s=y(375),g={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(m,u){const t=[].concat((u=u||{}).before||[]),o=[].concat(u.after||[]),a=u.group||"?",n=u.sort||0;s(!t.includes(a),`Item cannot come before itself: ${a}`),s(!t.includes("?"),"Item cannot come before unassociated items"),s(!o.includes(a),`Item cannot come after itself: ${a}`),s(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(m)||(m=[m]);for(const r of m){const c={seq:this._items.length,sort:n,before:t,after:o,group:a,node:r};this._items.push(c)}if(!u.manual){const r=this._sort();s(r,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(m){Array.isArray(m)||(m=[m]);for(const t of m)if(t)for(const o of t._items)this._items.push(Object.assign({},o));this._items.sort(g.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const u=this._sort();return s(u,"merge created a dependencies error"),this.nodes}sort(){const m=this._sort();return s(m,"sort created a dependencies error"),this.nodes}_sort(){const m={},u=Object.create(null),t=Object.create(null);for(const c of this._items){const i=c.seq,l=c.group;t[l]=t[l]||[],t[l].push(i),m[i]=c.before;for(const d of c.after)u[d]=u[d]||[],u[d].push(i)}for(const c in m){const i=[];for(const l in m[c]){const d=m[c][l];t[d]=t[d]||[],i.push(...t[d])}m[c]=i}for(const c in u)if(t[c])for(const i of t[c])m[i].push(...u[c]);const o={};for(const c in m){const i=m[c];for(const l of i)o[l]=o[l]||[],o[l].push(c)}const a={},n=[];for(let c=0;c<this._items.length;++c){let i=c;if(o[c]){i=null;for(let l=0;l<this._items.length;++l){if(a[l]===!0)continue;o[l]||(o[l]=[]);const d=o[l].length;let p=0;for(let f=0;f<d;++f)a[o[l][f]]&&++p;if(p===d){i=l;break}}}i!==null&&(a[i]=!0,n.push(i))}if(n.length!==this._items.length)return!1;const r={};for(const c of this._items)r[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const i=r[c];this.nodes.push(i.node),this._items.push(i)}return!0}},g.mergeSort=(m,u)=>m.sort===u.sort?0:m.sort<u.sort?-1:1},5380:(_,x,y)=>{const s=y(443),g=y(2178),m={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:s.URL||URL};x.analyze=function(u,t={}){if(!u)return g.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return g.code("DOMAIN_TOO_LONG");if(m.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return g.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(m.domainControlRx.test(u))return g.code("DOMAIN_INVALID_CHARS");u=m.punycode(u),t.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const o=t.minDomainSegments||m.minDomainSegments,a=u.split(".");if(a.length<o)return g.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&a.length>t.maxDomainSegments)return g.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const r=a[a.length-1].toLowerCase();if(n.deny&&n.deny.has(r)||n.allow&&!n.allow.has(r))return g.code("DOMAIN_FORBIDDEN_TLDS")}for(let r=0;r<a.length;++r){const c=a[r];if(!c.length)return g.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return g.code("DOMAIN_LONG_SEGMENT");if(r<a.length-1){if(!m.domainSegmentRx.test(c))return g.code("DOMAIN_INVALID_CHARS")}else if(!m.tldSegmentRx.test(c))return g.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(u,t){return!x.analyze(u,t)},m.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new m.URL(`http://${u}`).host}catch{return u}}},1745:(_,x,y)=>{const s=y(9848),g=y(5380),m=y(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(s.TextEncoder||TextEncoder)};x.analyze=function(t,o){return u.email(t,o)},x.isValid=function(t,o){return!u.email(t,o)},u.email=function(t,o={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return m.code("EMPTY_STRING");const a=!u.nonAsciiRx.test(t);if(!a){if(o.allowUnicode===!1)return m.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?m.code("MULTIPLE_AT_CHAR"):m.code("MISSING_AT_CHAR");const[r,c]=n;if(!r)return m.code("EMPTY_LOCAL");if(!o.ignoreLength){if(t.length>254)return m.code("ADDRESS_TOO_LONG");if(u.encoder.encode(r).length>64)return m.code("LOCAL_TOO_LONG")}return u.local(r,a)||g.analyze(c,o)},u.local=function(t,o){const a=t.split(".");for(const n of a){if(!n.length)return m.code("EMPTY_LOCAL_SEGMENT");if(o){if(!u.atextRx.test(n))return m.code("INVALID_LOCAL_CHARS")}else for(const r of n){if(u.atextRx.test(r))continue;const c=u.binary(r);if(!u.atomRx.test(c))return m.code("INVALID_LOCAL_CHARS")}}},u.binary=function(t){return Array.from(u.encoder.encode(t)).map(o=>String.fromCharCode(o)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(_,x)=>{x.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},x.code=function(y){return{code:y,error:x.codes[y]}}},9959:(_,x,y)=>{const s=y(375),g=y(5752);x.regex=function(m={}){s(m.cidr===void 0||typeof m.cidr=="string","options.cidr must be a string");const u=m.cidr?m.cidr.toLowerCase():"optional";s(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),s(m.version===void 0||typeof m.version=="string"||Array.isArray(m.version),"options.version must be a string or an array of string");let t=m.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),s(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)s(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),s(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const o=`(?:${t.map(n=>{if(u==="forbidden")return g.ip[n];const r=`\\/${n==="ipv4"?g.ip.v4Cidr:g.ip.v6Cidr}`;return u==="required"?`${g.ip[n]}${r}`:`${g.ip[n]}(?:${r})?`}).join("|")})`,a=new RegExp(`^${o}$`);return{cidr:u,versions:t,regex:a,raw:o}}},5752:(_,x,y)=>{const s=y(375),g=y(6064),m={generate:function(){const u={},t="\\dA-Fa-f",o="["+t+"]",a="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",r="%"+t,c=a+r+n+":@",i="["+c+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+l+"\\.){3}"+l;const d=o+"{1,4}",p="(?:"+d+":"+d+"|"+u.ipv4address+")",f="(?:"+d+":){6}"+p,k="::(?:"+d+":){5}"+p,S="(?:"+d+")?::(?:"+d+":){4}"+p,h="(?:(?:"+d+":){0,1}"+d+")?::(?:"+d+":){3}"+p,b="(?:(?:"+d+":){0,2}"+d+")?::(?:"+d+":){2}"+p,j="(?:(?:"+d+":){0,3}"+d+")?::"+d+":"+p,w="(?:(?:"+d+":){0,4}"+d+")?::"+p,P="(?:(?:"+d+":){0,5}"+d+")?::"+d,$="(?:(?:"+d+":){0,6}"+d+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+f+"|"+k+"|"+S+"|"+h+"|"+b+"|"+j+"|"+w+"|"+P+"|"+$+")",u.ipvFuture="v"+o+"+\\.["+a+n+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const I="["+a+r+n+":]*",q="["+a+r+n+"]{1,255}",Z="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+q+")",K="(?:"+I+"@)?"+Z+"(?::\\d*)?",F="(?:"+I+"@)?("+Z+")(?::\\d*)?",L=i+"*",H=i+"+",W="(?:\\/"+L+")*",ee="\\/(?:"+H+W+")?",ge=H+W,Se="["+a+r+n+"@]+"+W,He="(?:\\/\\/\\/"+L+W+")";return u.hierPart="(?:(?:\\/\\/"+K+W+")|"+ee+"|"+ge+"|"+He+")",u.hierPartCapture="(?:(?:\\/\\/"+F+W+")|"+ee+"|"+ge+")",u.relativeRef="(?:(?:\\/\\/"+K+W+")|"+ee+"|"+Se+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+F+W+")|"+ee+"|"+Se+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};m.rfc3986=m.generate(),x.ip={v4Cidr:m.rfc3986.ipv4Cidr,v6Cidr:m.rfc3986.ipv6Cidr,ipv4:m.rfc3986.ipv4address,ipv6:m.rfc3986.ipv6address,ipvfuture:m.rfc3986.ipvFuture},m.createRegex=function(u){const t=m.rfc3986,o="(?:\\?"+(u.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",a=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return m.wrap(a+o);let n="";if(u.scheme){s(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const i=[].concat(u.scheme);s(i.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let d=0;d<i.length;++d){const p=i[d];s(p instanceof RegExp||typeof p=="string","scheme at position "+d+" must be a RegExp or String"),p instanceof RegExp?l.push(p.source.toString()):(s(t.schemeRegex.test(p),"scheme at position "+d+" must be a valid scheme"),l.push(g(p)))}n=l.join("|")}const r="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+r+"|"+a+")":r;return m.wrap(c+o,n)},m.wrap=function(u,t){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:t}},m.uriRegex=m.createRegex({}),x.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?m.createRegex(u):m.uriRegex}},1447:(_,x)=>{const y={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};x.Parser=class{constructor(s,g={}){if(!g[y.settings]&&g.constants)for(const m in g.constants){const u=g.constants[m];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${m} contains invalid ${typeof u} value type`)}this.settings=g[y.settings]?g:Object.assign({[y.settings]:!0,constants:{},functions:{}},g),this.single=null,this._parts=null,this._parse(s)}_parse(s){let g=[],m="",u=0,t=!1;const o=n=>{if(u)throw new Error("Formula missing closing parenthesis");const r=g.length?g[g.length-1]:null;if(t||m||n){if(r&&r.type==="reference"&&n===")")return r.type="function",r.value=this._subFormula(m,r.value),void(m="");if(n===")"){const c=new x.Parser(m,this.settings);g.push({type:"segment",value:c})}else if(t){if(t==="]")return g.push({type:"reference",value:m}),void(m="");g.push({type:"literal",value:m})}else if(y.operatorCharacters.includes(m))r&&r.type==="operator"&&y.operators.includes(r.value+m)?r.value+=m:g.push({type:"operator",value:m});else if(m.match(y.numberRx))g.push({type:"constant",value:parseFloat(m)});else if(this.settings.constants[m]!==void 0)g.push({type:"constant",value:this.settings.constants[m]});else{if(!m.match(y.tokenRx))throw new Error(`Formula contains invalid token: ${m}`);g.push({type:"reference",value:m})}m=""}};for(const n of s)t?n===t?(o(),t=!1):m+=n:u?n==="("?(m+=n,++u):n===")"?(--u,u?m+=n:o(n)):m+=n:n in y.literals?t=y.literals[n]:n==="("?(o(),++u):y.operatorCharacters.includes(n)?(o(),m=n,o()):n!==" "?m+=n:o();o(),g=g.map((n,r)=>n.type!=="operator"||n.value!=="-"||r&&g[r-1].type!=="operator"?n:{type:"operator",value:"n"});let a=!1;for(const n of g){if(n.type==="operator"){if(y.operatorsPrefix.includes(n.value))continue;if(!a)throw new Error("Formula contains an operator in invalid position");if(!y.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(a)throw new Error("Formula missing expected operator");a=!a}if(!a)throw new Error("Formula contains invalid trailing operator");g.length===1&&["reference","literal","constant"].includes(g[0].type)&&(this.single={type:g[0].type==="reference"?"reference":"value",value:g[0].value}),this._parts=g.map(n=>{if(n.type==="operator")return y.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):y.reference(n.value)})}_subFormula(s,g){const m=this.settings.functions[g];if(typeof m!="function")throw new Error(`Formula contains unknown function ${g}`);let u=[];if(s){let t="",o=0,a=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${g} with invalid arguments ${s}`);u.push(t),t=""};for(let r=0;r<s.length;++r){const c=s[r];a?(t+=c,c===a&&(a=!1)):c in y.literals&&!o?(t+=c,a=y.literals[c]):c!==","||o?(t+=c,c==="("?++o:c===")"&&--o):n()}n()}return u=u.map(t=>new x.Parser(t,this.settings)),function(t){const o=[];for(const a of u)o.push(a.evaluate(t));return m.call(t,...o)}}evaluate(s){const g=this._parts.slice();for(let m=g.length-2;m>=0;--m){const u=g[m];if(u&&u.type==="operator"){const t=g[m+1];g.splice(m+1,1);const o=y.evaluate(t,s);g[m]=y.single(u.value,o)}}return y.operatorsOrder.forEach(m=>{for(let u=1;u<g.length-1;)if(m.includes(g[u])){const t=g[u],o=y.evaluate(g[u-1],s),a=y.evaluate(g[u+1],s);g.splice(u,2);const n=y.calculate(t,o,a);g[u-1]=n===0?0:n}else u+=2}),y.evaluate(g[0],s)}},x.Parser.prototype[y.symbol]=!0,y.reference=function(s){return function(g){return g&&g[s]!==void 0?g[s]:null}},y.evaluate=function(s,g){return s===null?null:typeof s=="function"?s(g):s[y.symbol]?s.evaluate(g):s},y.single=function(s,g){if(s==="!")return!g;const m=-g;return m===0?0:m},y.calculate=function(s,g,m){if(s==="??")return y.exists(g)?g:m;if(typeof g=="string"||typeof m=="string"){if(s==="+")return(g=y.exists(g)?g:"")+(y.exists(m)?m:"")}else switch(s){case"^":return Math.pow(g,m);case"*":return g*m;case"/":return g/m;case"%":return g%m;case"+":return g+m;case"-":return g-m}switch(s){case"<":return g<m;case"<=":return g<=m;case">":return g>m;case">=":return g>=m;case"==":return g===m;case"!=":return g!==m;case"&&":return g&&m;case"||":return g||m}return null},y.exists=function(s){return s!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function _(x){var y=R[x];if(y!==void 0)return y.exports;var s=R[x]={exports:{}};return A[x](s,s.exports,_),s.exports}(5107);var A,R})}(ot)),ot.exports}var Le={},Kt;function Gs(){if(Kt)return Le;Kt=1;var v=Le&&Le.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.BNExtension=A;const C=v(kn());function A(R){return{type:"BN",base:R.any(),messages:{"bn.nan":"{{#label}} is not a big number","bn.max":'{{#label}} needs to be less than or equal to "{{#threshold}}"',"bn.min":'{{#label}} needs to be greater than or equal to "{{#threshold}}"',"bn.less":'{{#label}} needs to be less than "{{#threshold}}"',"bn.greater":'{{#label}} needs to be greater than "{{#threshold}}"',"bn.positive":"{{#label}} needs to be positive","bn.negative":"{{#label}} needs to be negative"},prepare(_,x){try{return{value:new C.default(_)}}catch{return{errors:x.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,x,y){const s=new C.default(_);return y.equal&&s.lt(y.threshold)?x.error("bn.min",y):!y.equal&&s.lte(y.threshold)?x.error("bn.greater",y):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,x,y){const s=new C.default(_);return y.equal&&s.gt(y.threshold)?x.error("bn.max",y):!y.equal&&s.gte(y.threshold)?x.error("bn.less",y):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!1}})}},positive:{method(){return this.$_addRule({name:"gt",args:{threshold:0,equal:!1}})}},negative:{method(){return this.$_addRule({name:"lt",args:{threshold:0,equal:!1}})}}}}}return Le}var De={},Jt;function Ys(){if(Jt)return De;Jt=1;var v=De&&De.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(De,"__esModule",{value:!0}),De.DIDExtension=x;const C=v(Sn),A=Cn(),R=Rn(),_={pk:Object.keys(A.types.KeyType),hash:Object.keys(A.types.HashType),role:Object.keys(A.types.RoleType)};function x(y){return{type:"DID",base:y.string().trim(),messages:{"did.empty":"Expect {{#label}} to be non-empty string","did.invalid":"Expect {{#label}} to be valid did","did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(s,g){return!s||typeof s!="string"?{errors:g.error("did.empty",{value:s})}:(0,R.isValid)(s)===!1?{errors:g.error("did.invalid",{value:s})}:{value:s}},rules:{type:{args:[{name:"key",ref:!0,assert:s=>Object.keys(_).includes(s),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:s=>Object.keys(_).some(g=>_[g].includes(s)),message:"must be valid type"}],validate(s,g,m){const u=(0,R.toTypeInfoStr)(s);return m.key==="pk"&&u.pk!==m.expected?g.error("did.pk",{...m,actual:u.pk}):m.key==="hash"&&u.hash!==m.expected?g.error("did.hash",{...m,actual:u.hash}):m.key==="role"&&u.role!==m.expected?g.error("did.role",{...m,actual:u.role}):s}},pk:{method(s){return this.$_addRule({name:"type",args:{key:"pk",expected:s}})}},hash:{method(s){return this.$_addRule({name:"type",args:{key:"hash",expected:s}})}},role:{method(s){return this.$_addRule({name:"type",args:{key:"role",expected:s}})}},wallet:{method(s){return this.$_addRule({name:"wallet",args:{type:s}})},args:[{name:"type",ref:!0,assert:s=>["arcblock","ethereum","default","eth","passkey"].includes(s),message:"must be a string",normalize:s=>s.trim()}],validate(s,g,m={}){const u=(0,R.toTypeInfo)(s),t=(0,R.toTypeInfoStr)(s);return["ethereum","eth"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_ETHEREUM)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_ARCBLOCK)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):["passkey"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_PASSKEY)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):s}},prefix:{method(s=""){return this.$_addRule({name:"prefix",args:{str:s}})},args:[{name:"str",ref:!0,assert:s=>["",R.DID_PREFIX].includes(s),message:"must be a string",normalize:s=>s.trim()}],validate(s,g,m={}){return m.str&&s.startsWith(m.str)===!1?g.error("did.prefix",{expected:m.str}):!m.str&&(0,R.toAddress)(s)!==s?g.error("did.prefix",{expected:m.str}):s}}}}}return De}var Gt;function Xs(){return Gt||(Gt=1,function(v){var C=Fe&&Fe.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(v,"__esModule",{value:!0}),v.patterns=v.schemas=v.Joi=void 0;const A=C(Js()),R=Gs(),_=Ys();v.Joi=A.default.extend(_.DIDExtension).extend(R.BNExtension);const x=/^(0x)?([A-Fa-f0-9]{64})$/,y=v.Joi.object({genesisTime:v.Joi.date().iso().required().raw(),genesisTx:v.Joi.string().regex(x).required().allow(""),renaissanceTime:v.Joi.date().iso().required().raw(),renaissanceTx:v.Joi.string().regex(x).required().allow("")}),s=v.Joi.object({address:v.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:v.Joi.BN().min(0).required()}),g=v.Joi.object({name:v.Joi.string().min(1).max(256).required(),value:v.Joi.string().min(1).max(1024).required(),description:v.Joi.string().min(1).max(256).optional().allow(""),required:v.Joi.boolean().optional().default(!1)}),m=v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ACCOUNT"),v.Joi.DID().prefix().role("ROLE_APPLICATION"),v.Joi.DID().prefix().role("ROLE_BLOCKLET"),v.Joi.DID().prefix().wallet("ethereum"),v.Joi.DID().prefix().wallet("passkey")),u=v.Joi.array().items(v.Joi.object({owner:m.required(),tokensList:v.Joi.array().items(s).default([]),assetsList:v.Joi.array().items(v.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=v.Joi.array().items({signer:v.Joi.DID().prefix().required(),pk:v.Joi.any().required(),signature:v.Joi.any().required(),delegator:v.Joi.DID().prefix().valid("").optional(),data:v.Joi.any().optional()}),o=v.Joi.object({type:v.Joi.string().min(1).max(32).required(),contractAddress:v.Joi.DID().prefix().wallet("ethereum").required(),chainType:v.Joi.string().min(1).max(32).required(),chainName:v.Joi.string().min(1).max(32).required(),chainId:v.Joi.number().positive().required()}),a=v.Joi.object({type:v.Joi.string().valid("svg","url","uri").required(),content:v.Joi.string().when("type",{is:"uri",then:v.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),n=v.Joi.object({id:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:v.Joi.string().valid("public","private").default("public")}),r=v.Joi.object({id:v.Joi.DID().prefix().required(),pk:v.Joi.string().required(),name:v.Joi.string().min(1).max(256).required()}),c={address:v.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.DID().prefix().optional().allow(""),issuer:v.Joi.DID().prefix().optional().allow(""),endpoint:n.optional().allow(null).default(null),display:a.optional().allow(null).default(null),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()},i={address:v.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:v.Joi.string().min(2).max(255).required(),description:v.Joi.string().min(2).max(255).required(),settlement:v.Joi.string().valid("instant","periodic").default("instant"),limit:v.Joi.number().integer().min(0).default(0),trustedIssuers:v.Joi.array().items(v.Joi.DID().prefix()).max(8).optional(),data:v.Joi.any().optional().allow(null).default(null),display:a.optional().allow(null).default(null),input:v.Joi.object({value:v.Joi.BN().positive().min("0").default("0"),tokens:v.Joi.array().items(s).max(8).optional(),assets:v.Joi.array().items(v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ASSET"),v.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:v.Joi.array().items(v.Joi.object({name:v.Joi.string().min(1).max(255).required(),description:v.Joi.string().max(255).optional().allow(""),required:v.Joi.boolean().required()})).optional()}),output:v.Joi.object({moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.string().max(255).required(),issuer:v.Joi.string().max(255).required(),endpoint:n.optional(),display:a.optional(),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()}),hooks:v.Joi.array().items(v.Joi.object({name:v.Joi.string().valid("mint","postMint","preMint").required(),type:v.Joi.string().valid("url","contract").required(),hook:v.Joi.string().min(1).max(4096).required(),compiled:v.Joi.array().items(v.Joi.object()).optional()})).optional()};v.schemas={context:y,tokenInput:s,multiInput:u,multiSig:t,foreignToken:o,variableInput:g,nftDisplay:a,nftEndpoint:n,nftIssuer:r,tokenHolder:m,assetProps:c,assetSchema:v.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:i,factorySchema:v.Joi.object(i).options({stripUnknown:!0,noDefaults:!1})},v.patterns={txHash:x}}(Fe)),Fe}var Qs=Xs();function Tr({onCancel:v,onSuccess:C,blocklet:A}){const{vaults:R=[],appPid:_}=A,{t:x,locale:y}=ne(),{connectApi:s}=ar(),{api:g}=Q(),{teamDid:m}=et(),[u,t]=$t({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});D.useEffect(()=>{if(!Ce.isValid(u.address))return;const c=Ce.toAddress(u.address),i=u.fetched.find(d=>d.address===c),l=u.errored.find(d=>d.address===c);!u.fetching&&!i&&!l&&(t({fetching:!0}),fs(U.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(p=>{p.state?t({fetching:!1,fetched:[...u.fetched.filter(f=>f.address!==c),p.state]}):t({fetching:!1,errored:[...u.errored.filter(f=>f.address!==c),{address:c}]})}).catch(p=>{console.error(p),t({fetching:!1,error:vt(p)})}))},[u.address,u.fetching]),D.useEffect(()=>{if(u.address){const c=Ce.toAddress(u.address);if(!Ce.isValid(c)){t({error:x("blocklet.config.vault.error.invalid")});return}if(Qs.schemas.tokenHolder.validate(c).error){t({error:x("blocklet.config.vault.error.holder")});return}if(R.find(l=>l.did===c)){t({error:x("blocklet.config.vault.error.duplicate")});return}if(An([A.appDid,A.appPid,...A.migratedFrom.map(l=>l.appDid)].filter(Boolean)).includes(c)){t({error:x("blocklet.config.vault.error.appDid")});return}}t({error:""})},[u.address]);const o=async()=>{t({loading:!0});try{const c=await g.configVault({input:{teamDid:m,vaultDid:Ce.toAddress(u.address)}});s.open({locale:y,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:x("blocklet.config.vault.approve.title"),scan:x(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:x("blocklet.config.vault.approve.confirm"),success:x("blocklet.config.vault.approve.success")},onSuccess:()=>{s.open({locale:y,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:x("blocklet.config.vault.commit.title"),scan:x("blocklet.config.vault.commit.scan"),confirm:x("blocklet.config.vault.commit.confirm"),success:x("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),C()},onClose:()=>{t({loading:!1}),s.close()}})},onClose:()=>{t({loading:!1}),s.close()}})}catch(c){t({loading:!1,error:vt(c)})}},a=Ce.toAddress(u.address),n=[];Ce.isValid(a)&&n.push({key:x("blocklet.config.vault.role"),value:e.jsx(Rt,{color:"primary",variant:"outlined",size:"small",label:Ce.toTypeInfoStr(a).role||"-"})});const r=u.fetched.find(c=>c.address===a);return r&&n.push({key:x("blocklet.config.vault.firstSeen"),value:qt(r.context?.genesisTime,"-")},{key:x("blocklet.config.vault.lastSeen"),value:qt(r.context?.renaissanceTime,"-")},{key:x("blocklet.config.vault.migratedFrom"),value:r.migratedFrom.length?r.migratedFrom.map(c=>e.jsx(xt,{did:c,showQrcode:!0,compact:!0,size:14,locale:y},c)):"-"},{key:x("blocklet.config.vault.migratedTo"),value:r.migratedTo.length?r.migratedTo.map(c=>e.jsx(xt,{did:c,showQrcode:!0,compact:!0,size:14,locale:y},c)):"-"}),e.jsx(we,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:v,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(_r,{}),x("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(J,{onClick:v,children:x("common.cancel")}),e.jsx(J,{onClick:o,variant:"contained",disabled:!!u.error||u.loading,children:x("common.confirm")})]}),children:e.jsxs(ae,{direction:"column",spacing:3,children:[e.jsxs(X,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.desc")," ",x("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(O,{children:[e.jsxs(X,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.current"),":"]}),e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(On,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(ps,{vaults:R,appPid:_})]})]}),e.jsx(N,{fullWidth:!0,"data-cy":"input-factory-address",label:x("blocklet.config.vault.address"),error:!!u.error,helperText:u.error,value:u.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:u.fetching?e.jsx(cr,{position:"end",children:e.jsx(ze,{size:16})}):null}}}),e.jsx(O,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(yr,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}Tr.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function Et({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1}){const{info:R,api:_,inService:x}=Q(),{t:y,locale:s}=D.useContext(he),[g,m]=$t({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=D.useState(()=>v?.settings?.gateway?.wafPolicy?.enabled??!0),[o,a]=D.useState(()=>!!v?.settings?.enableSessionHardening),[n,r]=D.useState(()=>!!v?.settings?.invite?.enabled),[c,i]=D.useState(()=>{const L=v?.settings?.org||{};return{enabled:L.enabled||!1,maxMemberPerOrg:L.maxMemberPerOrg||100,maxOrgPerUser:L.maxOrgPerUser||10}}),l=g.loading||!A,{did:d}=v.meta,p=x?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(Ot(v.status))return null;const f=v.environments.find(L=>L.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),k=!f||f.value==="yes",h=v.environments.find(L=>L.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||Y.BLOCKLET_TENANT_MODES.SINGLE,b=(L,H)=>async W=>{if(!g.loading){m({loading:!0});try{const{checked:ee}=W.target,{blocklet:ge}=await _.configBlocklet({input:{did:v.meta.did,configs:[{key:Y.BLOCKLET_CONFIGURABLE_KEY[L],value:H(ee)}]}});C(ge)}catch(ee){B.error(ee.message)}finally{m({loading:!1})}}},j=b("BLOCKLET_DELETABLE",L=>L?"no":"yes"),w=b("BLOCKLET_APP_TENANT_MODE",L=>L?Y.BLOCKLET_TENANT_MODES.MULTIPLE:Y.BLOCKLET_TENANT_MODES.SINGLE),P=(L,H)=>async W=>{if(!g.loading){m({loading:!0});try{const ee=W.target.checked;await _.updateBlockletSettings({input:L(ee)}),H&&H(ee)}catch(ee){B.error(ee.message)}finally{m({loading:!1})}}},$=P(L=>({did:v.meta.did,invite:{enabled:L}}),r),I=P(L=>({did:v.meta.did,org:{enabled:L,maxMemberPerOrg:100,maxOrgPerUser:10}}),L=>{i({...c,enabled:L})}),q=async(L,H)=>{if(!g.loading){m({loading:!0});try{await _.updateBlockletSettings({input:{did:v.meta.did,org:{...c,[L]:H}}}),i({...c,[L]:H})}catch(W){B.error(W.message)}finally{m({loading:!1})}}},Z=P(L=>({did:v.meta.did,gateway:{wafPolicy:{enabled:L}}}),t),K=P(L=>({did:v.meta.did,enableSessionHardening:L}),L=>{a(L),Pn()}),F=async()=>{if(!g.loading){m({loading:!0});try{const{blocklet:L}=await _.getBlocklet({input:{did:v.meta.did}});C(L)}catch(L){B.error(L.message)}finally{m({loading:!1})}}};return e.jsxs(ae,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!x&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:y("blocklet.config.deletable.name"),desc:y(k?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:!k,defaultChecked:!0,onChange:j})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}})]}),e.jsx(Pr,{inService:x,disabled:l,loading:g.loading,onChange:F}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),x&&e.jsx(Qn,{role:"owner",children:L=>(L||Ks)&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:y("blocklet.config.vault.title"),desc:y("blocklet.config.vault.desc"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(J,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>m({showConfigVault:!0}),children:[e.jsx(_r,{style:{fontSize:"1.3em",marginRight:4}}),y("blocklet.config.vault.title")]})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),g.showConfigVault&&e.jsx(Tr,{blocklet:v,onCancel:()=>m({showConfigVault:!1}),onSuccess:()=>m({showConfigVault:!1})}),e.jsx(M,{title:y("team.transferApp.name"),desc:y("team.transferApp.description"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(J,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>m({showTransferOwner:!0}),children:[e.jsx(Es,{style:{fontSize:"1.3em",marginRight:4}}),y("team.transferApp.name")]})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),g.showTransferOwner&&e.jsx($r,{onCancel:()=>m({showTransferOwner:!1}),onSuccess:()=>m({showTransferOwner:!1})})]})}),e.jsx(M,{title:y("blocklet.config.clearCache.name"),desc:y("blocklet.config.clearCache.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(ds,{teamDid:d})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("blocklet.config.rotateSessionKey.name"),desc:y("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(us,{style:{whiteSpace:"nowrap"},teamDid:d})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("blocklet.config.tenantMode.name"),desc:y(`blocklet.config.tenantMode.${h}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:h===Y.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:w})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("team.invite.setting"),desc:y(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:n,onChange:$})})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[y("setting.form.enableSessionHardening.switchLabel"),e.jsx(oe,{title:y("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Mt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:o,onChange:K})})}),p&&e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[y("router.gateway.wafPolicy.title"),e.jsx(oe,{title:e.jsx(O,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(O,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${s}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:y("dashboard.document")})}),children:e.jsx(Mt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:y("router.gateway.wafPolicy.switchLabel"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:u,onChange:Z})})})]}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsx(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:y("common.orgs")}),desc:y("team.orgs.explain"),children:e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(me,{disabled:l,checked:c.enabled,onChange:I}),c.enabled&&e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(_t,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:y("team.orgs.invite.maxOrgs"),placeholder:y("team.orgs.invite.maxOrgs"),onSubmit:L=>q("maxOrgPerUser",L)}),e.jsx(_t,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:y("team.orgs.invite.maxMembers"),placeholder:y("team.orgs.invite.maxMembers"),onSubmit:L=>q("maxMemberPerOrg",L)})]})]})})]})}const ei=Be(Et,"mutate_blocklets"),ti=Be(Et,"",At);function ri(v){const{inService:C}=Q();return C?e.jsx(ti,{...v}):e.jsx(ei,{...v})}Et.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function It({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1,...R}){const{t:_}=D.useContext(he);return Ot(v.status)?null:e.jsxs(ai,{...R,children:[e.jsx(Ws,{blocklet:v,onUpdate:C,hasPermission:A}),e.jsx(O,{sx:{mt:6},children:e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx(O,{className:"config-form",component:te,sx:{my:3}}),e.jsx(O,{sx:{maxWidth:1536},children:e.jsx(ri,{blocklet:v,onUpdate:C,hasPermission:A})})]})}const ni=Be(It,"mutate_blocklets"),si=Be(It,"",At);function ii(v){const{inService:C}=Q();return C?e.jsx(si,{...v}):e.jsx(ni,{...v})}It.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const ai=ve(O)`
|
|
50
|
+
`;var Fe={},ot={exports:{}},Ut;function Js(){return Ut||(Ut=1,function(v,C){(function(A,R){v.exports=R()})(self,()=>{return A={7629:(_,x,y)=>{const s=y(375),g=y(8571),m=y(9474),u=y(1687),t=y(8652),o=y(8160),a=y(3292),n=y(6354),r=y(8901),c=y(9708),i=y(6914),l=y(2294),d=y(6133),p=y(1152),f=y(8863),k=y(2036),S={Base:class{constructor(h){this.type=h,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new l.Ids,this._preferences=null,this._refs=new d.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return s(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...h){return o.verifyFlat(h,"allow"),this._values(h,"_valids")}alter(h){s(h&&typeof h=="object"&&!Array.isArray(h),"Invalid targets argument"),s(!this._inRuleset(),"Cannot set alterations inside a ruleset");const b=this.clone();b.$_terms.alterations=b.$_terms.alterations||[];for(const j in h){const w=h[j];s(typeof w=="function","Alteration adjuster for",j,"must be a function"),b.$_terms.alterations.push({target:j,adjuster:w})}return b.$_temp.ruleset=!1,b}artifact(h){return s(h!==void 0,"Artifact cannot be undefined"),s(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",h)}cast(h){return s(h===!1||typeof h=="string","Invalid to value"),s(h===!1||this._definition.cast[h],"Type",this.type,"does not support casting to",h),this.$_setFlag("cast",h===!1?void 0:h)}default(h,b){return this._default("default",h,b)}description(h){return s(h&&typeof h=="string","Description must be a non-empty string"),this.$_setFlag("description",h)}empty(h){const b=this.clone();return h!==void 0&&(h=b.$_compile(h,{override:!1})),b.$_setFlag("empty",h,{clone:!1})}error(h){return s(h,"Missing error"),s(h instanceof Error||typeof h=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",h)}example(h,b={}){return s(h!==void 0,"Missing example"),o.assertOptions(b,["override"]),this._inner("examples",h,{single:!0,override:b.override})}external(h,b){return typeof h=="object"&&(s(!b,"Cannot combine options with description"),b=h.description,h=h.method),s(typeof h=="function","Method must be a function"),s(b===void 0||b&&typeof b=="string","Description must be a non-empty string"),this._inner("externals",{method:h,description:b},{single:!0})}failover(h,b){return this._default("failover",h,b)}forbidden(){return this.presence("forbidden")}id(h){return h?(s(typeof h=="string","id must be a non-empty string"),s(/^[^\.]+$/.test(h),"id cannot contain period character"),this.$_setFlag("id",h)):this.$_setFlag("id",void 0)}invalid(...h){return this._values(h,"_invalids")}label(h){return s(h&&typeof h=="string","Label name must be a non-empty string"),this.$_setFlag("label",h)}meta(h){return s(h!==void 0,"Meta cannot be undefined"),this._inner("metas",h,{single:!0})}note(...h){s(h.length,"Missing notes");for(const b of h)s(b&&typeof b=="string","Notes must be non-empty strings");return this._inner("notes",h)}only(h=!0){return s(typeof h=="boolean","Invalid mode:",h),this.$_setFlag("only",h)}optional(){return this.presence("optional")}prefs(h){s(h,"Missing preferences"),s(h.context===void 0,"Cannot override context"),s(h.externals===void 0,"Cannot override externals"),s(h.warnings===void 0,"Cannot override warnings"),s(h.debug===void 0,"Cannot override debug"),o.checkPreferences(h);const b=this.clone();return b._preferences=o.preferences(b._preferences,h),b}presence(h){return s(["optional","required","forbidden"].includes(h),"Unknown presence mode",h),this.$_setFlag("presence",h)}raw(h=!0){return this.$_setFlag("result",h?"raw":void 0)}result(h){return s(["raw","strip"].includes(h),"Unknown result mode",h),this.$_setFlag("result",h)}required(){return this.presence("required")}strict(h){const b=this.clone(),j=h!==void 0&&!h;return b._preferences=o.preferences(b._preferences,{convert:j}),b}strip(h=!0){return this.$_setFlag("result",h?"strip":void 0)}tag(...h){s(h.length,"Missing tags");for(const b of h)s(b&&typeof b=="string","Tags must be non-empty strings");return this._inner("tags",h)}unit(h){return s(h&&typeof h=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",h)}valid(...h){o.verifyFlat(h,"valid");const b=this.allow(...h);return b.$_setFlag("only",!!b._valids,{clone:!1}),b}when(h,b){const j=this.clone();j.$_terms.whens||(j.$_terms.whens=[]);const w=a.when(j,h,b);if(!["any","link"].includes(j.type)){const O=w.is?[w]:w.switch;for(const $ of O)s(!$.then||$.then.type==="any"||$.then.type===j.type,"Cannot combine",j.type,"with",$.then&&$.then.type),s(!$.otherwise||$.otherwise.type==="any"||$.otherwise.type===j.type,"Cannot combine",j.type,"with",$.otherwise&&$.otherwise.type)}return j.$_terms.whens.push(w),j.$_mutateRebuild()}cache(h){s(!this._inRuleset(),"Cannot set caching inside a ruleset"),s(!this._cache,"Cannot override schema cache"),s(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const b=this.clone();return b._cache=h||t.provider.provision(),b.$_temp.ruleset=!1,b}clone(){const h=Object.create(Object.getPrototypeOf(this));return this._assign(h)}concat(h){s(o.isSchema(h),"Invalid schema object"),s(this.type==="any"||h.type==="any"||h.type===this.type,"Cannot merge type",this.type,"with another type:",h.type),s(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),s(!h._inRuleset(),"Cannot concatenate a schema with open ruleset");let b=this.clone();if(this.type==="any"&&h.type!=="any"){const j=h.clone();for(const w of Object.keys(b))w!=="type"&&(j[w]=b[w]);b=j}b._ids.concat(h._ids),b._refs.register(h,d.toSibling),b._preferences=b._preferences?o.preferences(b._preferences,h._preferences):h._preferences,b._valids=k.merge(b._valids,h._valids,h._invalids),b._invalids=k.merge(b._invalids,h._invalids,h._valids);for(const j of h._singleRules.keys())b._singleRules.has(j)&&(b._rules=b._rules.filter(w=>w.keep||w.name!==j),b._singleRules.delete(j));for(const j of h._rules)h._definition.rules[j.method].multi||b._singleRules.set(j.name,j),b._rules.push(j);if(b._flags.empty&&h._flags.empty){b._flags.empty=b._flags.empty.concat(h._flags.empty);const j=Object.assign({},h._flags);delete j.empty,u(b._flags,j)}else if(h._flags.empty){b._flags.empty=h._flags.empty;const j=Object.assign({},h._flags);delete j.empty,u(b._flags,j)}else u(b._flags,h._flags);for(const j in h.$_terms){const w=h.$_terms[j];w?b.$_terms[j]?b.$_terms[j]=b.$_terms[j].concat(w):b.$_terms[j]=w.slice():b.$_terms[j]||(b.$_terms[j]=w)}return this.$_root._tracer&&this.$_root._tracer._combine(b,[this,h]),b.$_mutateRebuild()}extend(h){return s(!h.base,"Cannot extend type with another base"),r.type(this,h)}extract(h){return h=Array.isArray(h)?h:h.split("."),this._ids.reach(h)}fork(h,b){s(!this._inRuleset(),"Cannot fork inside a ruleset");let j=this;for(let w of[].concat(h))w=Array.isArray(w)?w:w.split("."),j=j._ids.fork(w,b,j);return j.$_temp.ruleset=!1,j}rule(h){const b=this._definition;o.assertOptions(h,Object.keys(b.modifiers)),s(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const j=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;s(j>=0&&j<this._rules.length,"Cannot apply rules to empty ruleset");const w=this.clone();for(let O=j;O<w._rules.length;++O){const $=w._rules[O],I=g($);for(const q in h)b.modifiers[q](I,h[q]),s(I.name===$.name,"Cannot change rule name");w._rules[O]=I,w._singleRules.get(I.name)===$&&w._singleRules.set(I.name,I)}return w.$_temp.ruleset=!1,w.$_mutateRebuild()}get ruleset(){s(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const h=this.clone();return h.$_temp.ruleset=h._rules.length,h}get $(){return this.ruleset}tailor(h){h=[].concat(h),s(!this._inRuleset(),"Cannot tailor inside a ruleset");let b=this;if(this.$_terms.alterations)for(const{target:j,adjuster:w}of this.$_terms.alterations)h.includes(j)&&(b=w(b),s(o.isSchema(b),"Alteration adjuster for",j,"failed to return a schema object"));return b=b.$_modify({each:j=>j.tailor(h),ref:!1}),b.$_temp.ruleset=!1,b.$_mutateRebuild()}tracer(){return p.location?p.location(this):this}validate(h,b){return f.entry(h,this,b)}validateAsync(h,b){return f.entryAsync(h,this,b)}$_addRule(h){typeof h=="string"&&(h={name:h}),s(h&&typeof h=="object","Invalid options"),s(h.name&&typeof h.name=="string","Invalid rule name");for(const $ in h)s($[0]!=="_","Cannot set private rule properties");const b=Object.assign({},h);b._resolve=[],b.method=b.method||b.name;const j=this._definition.rules[b.method],w=b.args;s(j,"Unknown rule",b.method);const O=this.clone();if(w){s(Object.keys(w).length===1||Object.keys(w).length===this._definition.rules[b.name].args.length,"Invalid rule definition for",this.type,b.name);for(const $ in w){let I=w[$];if(j.argsByName){const q=j.argsByName.get($);if(q.ref&&o.isResolvable(I))b._resolve.push($),O.$_mutateRegister(I);else if(q.normalize&&(I=q.normalize(I),w[$]=I),q.assert){const Z=o.validateArg(I,$,q);s(!Z,Z,"or reference")}}I!==void 0?w[$]=I:delete w[$]}}return j.multi||(O._ruleRemove(b.name,{clone:!1}),O._singleRules.set(b.name,b)),O.$_temp.ruleset===!1&&(O.$_temp.ruleset=null),j.priority?O._rules.unshift(b):O._rules.push(b),O}$_compile(h,b){return a.schema(this.$_root,h,b)}$_createError(h,b,j,w,O,$={}){const I=$.flags!==!1?this._flags:{},q=$.messages?i.merge(this._definition.messages,$.messages):this._definition.messages;return new n.Report(h,b,j,I,q,w,O)}$_getFlag(h){return this._flags[h]}$_getRule(h){return this._singleRules.get(h)}$_mapLabels(h){return h=Array.isArray(h)?h:h.split("."),this._ids.labels(h)}$_match(h,b,j,w){(j=Object.assign({},j)).abortEarly=!0,j._externals=!1,b.snapshot();const O=!f.validate(h,this,b,j,w).errors;return b.restore(),O}$_modify(h){return o.assertOptions(h,["each","once","ref","schema"]),l.schema(this,h)||this}$_mutateRebuild(){return s(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(h,{source:b,name:j,path:w,key:O})=>{const $=this._definition[b][j]&&this._definition[b][j].register;$!==!1&&this.$_mutateRegister(h,{family:$,key:O})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(h,{family:b,key:j}={}){this._refs.register(h,b),this._ids.register(h,{key:j})}$_property(h){return this._definition.properties[h]}$_reach(h){return this._ids.reach(h)}$_rootReferences(){return this._refs.roots()}$_setFlag(h,b,j={}){s(h[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[h]||{};if(m(b,w.default)&&(b=void 0),m(b,this._flags[h]))return this;const O=j.clone!==!1?this.clone():this;return b!==void 0?(O._flags[h]=b,O.$_mutateRegister(b)):delete O._flags[h],h[0]!=="_"&&(O.$_temp.ruleset=!1),O}$_parent(h,...b){return this[h][o.symbols.parent].call(this,...b)}$_validate(h,b,j){return f.validate(h,this,b,j)}_assign(h){h.type=this.type,h.$_root=this.$_root,h.$_temp=Object.assign({},this.$_temp),h.$_temp.whens={},h._ids=this._ids.clone(),h._preferences=this._preferences,h._valids=this._valids&&this._valids.clone(),h._invalids=this._invalids&&this._invalids.clone(),h._rules=this._rules.slice(),h._singleRules=g(this._singleRules,{shallow:!0}),h._refs=this._refs.clone(),h._flags=Object.assign({},this._flags),h._cache=null,h.$_terms={};for(const b in this.$_terms)h.$_terms[b]=this.$_terms[b]?this.$_terms[b].slice():null;h.$_super={};for(const b in this.$_super)h.$_super[b]=this._super[b].bind(h);return h}_bare(){const h=this.clone();h._reset();const b=h._definition.terms;for(const j in b){const w=b[j];h.$_terms[j]=w.init}return h.$_mutateRebuild()}_default(h,b,j={}){return o.assertOptions(j,"literal"),s(b!==void 0,"Missing",h,"value"),s(typeof b=="function"||!j.literal,"Only function value supports literal option"),typeof b=="function"&&j.literal&&(b={[o.symbols.literal]:!0,literal:b}),this.$_setFlag(h,b)}_generate(h,b,j){if(!this.$_terms.whens)return{schema:this};const w=[],O=[];for(let q=0;q<this.$_terms.whens.length;++q){const Z=this.$_terms.whens[q];if(Z.concat){w.push(Z.concat),O.push(`${q}.concat`);continue}const K=Z.ref?Z.ref.resolve(h,b,j):h,F=Z.is?[Z]:Z.switch,L=O.length;for(let H=0;H<F.length;++H){const{is:W,then:ee,otherwise:ge}=F[H],Se=`${q}${Z.switch?"."+H:""}`;if(W.$_match(K,b.nest(W,`${Se}.is`),j)){if(ee){const He=b.localize([...b.path,`${Se}.then`],b.ancestors,b.schemas),{schema:st,id:Ne}=ee._generate(h,He,j);w.push(st),O.push(`${Se}.then${Ne?`(${Ne})`:""}`);break}}else if(ge){const He=b.localize([...b.path,`${Se}.otherwise`],b.ancestors,b.schemas),{schema:st,id:Ne}=ge._generate(h,He,j);w.push(st),O.push(`${Se}.otherwise${Ne?`(${Ne})`:""}`);break}}if(Z.break&&O.length>L)break}const $=O.join(", ");if(b.mainstay.tracer.debug(b,"rule","when",$),!$)return{schema:this};if(!b.mainstay.tracer.active&&this.$_temp.whens[$])return{schema:this.$_temp.whens[$],id:$};let I=this;this._definition.generate&&(I=this._definition.generate(this,h,b,j));for(const q of w)I=I.concat(q);return this.$_root._tracer&&this.$_root._tracer._combine(I,[this,...w]),this.$_temp.whens[$]=I,{schema:I,id:$}}_inner(h,b,j={}){s(!this._inRuleset(),`Cannot set ${h} inside a ruleset`);const w=this.clone();return w.$_terms[h]&&!j.override||(w.$_terms[h]=[]),j.single?w.$_terms[h].push(b):w.$_terms[h].push(...b),w.$_temp.ruleset=!1,w}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(h,b={}){if(!this._singleRules.has(h))return this;const j=b.clone!==!1?this.clone():this;j._singleRules.delete(h);const w=[];for(let O=0;O<j._rules.length;++O){const $=j._rules[O];$.name!==h||$.keep?w.push($):j._inRuleset()&&O<j.$_temp.ruleset&&--j.$_temp.ruleset}return j._rules=w,j}_values(h,b){o.verifyFlat(h,b.slice(1,-1));const j=this.clone(),w=h[0]===o.symbols.override;if(w&&(h=h.slice(1)),!j[b]&&h.length?j[b]=new k:w&&(j[b]=h.length?new k:null,j.$_mutateRebuild()),!j[b])return j;w&&j[b].override();for(const O of h){s(O!==void 0,"Cannot call allow/valid/invalid with undefined"),s(O!==o.symbols.override,"Override must be the first value");const $=b==="_invalids"?"_valids":"_invalids";j[$]&&(j[$].remove(O),j[$].length||(s(b==="_valids"||!j._flags.only,"Setting invalid value",O,"leaves schema rejecting all values due to previous valid rule"),j[$]=null)),j[b].add(O,j._refs)}return j}}};S.Base.prototype[o.symbols.any]={version:o.version,compile:a.compile,root:"$_root"},S.Base.prototype.isImmutable=!0,S.Base.prototype.deny=S.Base.prototype.invalid,S.Base.prototype.disallow=S.Base.prototype.invalid,S.Base.prototype.equal=S.Base.prototype.valid,S.Base.prototype.exist=S.Base.prototype.required,S.Base.prototype.not=S.Base.prototype.invalid,S.Base.prototype.options=S.Base.prototype.prefs,S.Base.prototype.preferences=S.Base.prototype.prefs,_.exports=new S.Base},8652:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};x.provider={provision:t=>new u.Cache(t)},u.Cache=class{constructor(t={}){m.assertOptions(t,["max"]),s(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(t,o){if(t!==null&&!u.supported.has(typeof t))return;let a=this._map.get(t);if(a)return a.value=o,void this._list.first(a);a=this._list.unshift({key:t,value:o}),this._map.set(t,a),this._compact()}get(t){const o=this._map.get(t);if(o)return this._list.first(o),g(o.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:o,prev:a}=t;return o.prev=a,a&&(a.next=o),t===this.tail&&(this.tail=o),t.prev=null,t.next=null,t}}},8160:(_,x,y)=>{const s=y(375),g=y(7916),m=y(5934);let u,t;const o={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};x.version=m.version,x.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},x.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},x.assertOptions=function(a,n,r="Options"){s(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const c=Object.keys(a).filter(i=>!n.includes(i));s(c.length===0,`${r} contain unknown keys: ${c}`)},x.checkPreferences=function(a){t=t||y(3378);const n=t.preferences.validate(a);if(n.error)throw new g([n.error.details[0].message])},x.compare=function(a,n,r){switch(r){case"=":return a===n;case">":return a>n;case"<":return a<n;case">=":return a>=n;case"<=":return a<=n}},x.default=function(a,n){return a===void 0?n:a},x.isIsoDate=function(a){return o.isoDate.test(a)},x.isNumber=function(a){return typeof a=="number"&&!isNaN(a)},x.isResolvable=function(a){return!!a&&(a[x.symbols.ref]||a[x.symbols.template])},x.isSchema=function(a,n={}){const r=a&&a[x.symbols.any];return!!r&&(s(n.legacy||r.version===x.version,"Cannot mix different versions of joi schemas"),!0)},x.isValues=function(a){return a[x.symbols.values]},x.limit=function(a){return Number.isSafeInteger(a)&&a>=0},x.preferences=function(a,n){u=u||y(6914),a=a||{},n=n||{};const r=Object.assign({},a,n);return n.errors&&a.errors&&(r.errors=Object.assign({},a.errors,n.errors),r.errors.wrap=Object.assign({},a.errors.wrap,n.errors.wrap)),n.messages&&(r.messages=u.compile(n.messages,a.messages)),delete r[x.symbols.prefs],r},x.tryWithPath=function(a,n,r={}){try{return a()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,r.append&&(c.message=`${c.message} (${c.path})`),c}},x.validateArg=function(a,n,{assert:r,message:c}){if(x.isSchema(r)){const i=r.validate(a);return i.error?i.error.message:void 0}if(!r(a))return n?`${n} ${c}`:c},x.verifyFlat=function(a,n){for(const r of a)s(!Array.isArray(r),"Method no longer accepts array arguments:",n)}},3292:(_,x,y)=>{const s=y(375),g=y(8160),m=y(6133),u={};x.schema=function(t,o,a={}){g.assertOptions(a,["appendPath","override"]);try{return u.schema(t,o,a)}catch(n){throw a.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},u.schema=function(t,o,a){s(o!==void 0,"Invalid undefined schema"),Array.isArray(o)&&(s(o.length,"Invalid empty array schema"),o.length===1&&(o=o[0]));const n=(r,...c)=>a.override!==!1?r.valid(t.override,...c):r.valid(...c);if(u.simple(o))return n(t,o);if(typeof o=="function")return t.custom(o);if(s(typeof o=="object","Invalid schema content:",typeof o),g.isResolvable(o))return n(t,o);if(g.isSchema(o))return o;if(Array.isArray(o)){for(const r of o)if(!u.simple(r))return t.alternatives().try(...o);return n(t,...o)}return o instanceof RegExp?t.string().regex(o):o instanceof Date?n(t.date(),o):(s(Object.getPrototypeOf(o)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(o))},x.ref=function(t,o){return m.isRef(t)?t:m.create(t,o)},x.compile=function(t,o,a={}){g.assertOptions(a,["legacy"]);const n=o&&o[g.symbols.any];if(n)return s(a.legacy||n.version===g.version,"Cannot mix different versions of joi schemas:",n.version,g.version),o;if(typeof o!="object"||!a.legacy)return x.schema(t,o,{appendPath:!0});const r=u.walk(o);return r?r.compile(r.root,o):x.schema(t,o,{appendPath:!0})},u.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const a of t){const n=u.walk(a);if(n)return n}return null}const o=t[g.symbols.any];if(o)return{root:t[o.root],compile:o.compile};s(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const a in t){const n=u.walk(t[a]);if(n)return n}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},x.when=function(t,o,a){if(a===void 0&&(s(o&&typeof o=="object","Missing options"),a=o,o=m.create(".")),Array.isArray(a)&&(a={switch:a}),g.assertOptions(a,["is","not","then","otherwise","switch","break"]),g.isSchema(o))return s(a.is===void 0,'"is" can not be used with a schema condition'),s(a.not===void 0,'"not" can not be used with a schema condition'),s(a.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:o,then:a.then,otherwise:a.otherwise,break:a.break});if(s(m.isRef(o)||typeof o=="string","Invalid condition:",o),s(a.not===void 0||a.is===void 0,'Cannot combine "is" with "not"'),a.switch===void 0){let r=a;a.not!==void 0&&(r={is:a.not,then:a.otherwise,otherwise:a.then,break:a.break});let c=r.is!==void 0?t.$_compile(r.is):t.$_root.invalid(null,!1,0,"").required();return s(r.then!==void 0||r.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),s(r.break===void 0||r.then===void 0||r.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),a.is===void 0||m.isRef(a.is)||g.isSchema(a.is)||(c=c.required()),u.condition(t,{ref:x.ref(o),is:c,then:r.then,otherwise:r.otherwise,break:r.break})}s(Array.isArray(a.switch),'"switch" must be an array'),s(a.is===void 0,'Cannot combine "switch" with "is"'),s(a.not===void 0,'Cannot combine "switch" with "not"'),s(a.then===void 0,'Cannot combine "switch" with "then"');const n={ref:x.ref(o),switch:[],break:a.break};for(let r=0;r<a.switch.length;++r){const c=a.switch[r],i=r===a.switch.length-1;g.assertOptions(c,i?["is","then","otherwise"]:["is","then"]),s(c.is!==void 0,'Switch statement missing "is"'),s(c.then!==void 0,'Switch statement missing "then"');const l={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(m.isRef(c.is)||g.isSchema(c.is)||(l.is=l.is.required()),i){s(a.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const d=a.otherwise!==void 0?a.otherwise:c.otherwise;d!==void 0&&(s(n.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=t.$_compile(d))}n.switch.push(l)}return n},u.condition=function(t,o){for(const a of["then","otherwise"])o[a]===void 0?delete o[a]:o[a]=t.$_compile(o[a]);return o}},6354:(_,x,y)=>{const s=y(5688),g=y(8160),m=y(3328);x.Report=class{constructor(u,t,o,a,n,r,c){if(this.code=u,this.flags=a,this.messages=n,this.path=r.path,this.prefs=c,this.state=r,this.value=t,this.message=null,this.template=null,this.local=o||{},this.local.label=x.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const i=this.path[this.path.length-1];typeof i!="object"&&(this.local.key=i)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,t){return x.template(this.value,u,t||this.code,this.state,this.prefs)}},x.path=function(u){let t="";for(const o of u)typeof o!="object"&&(typeof o=="string"?(t&&(t+="."),t+=o):t+=`[${o}]`);return t},x.template=function(u,t,o,a,n){if(!t)return;if(m.isTemplate(t))return o!=="root"?t:null;let r=n.errors.language;if(g.isResolvable(r)&&(r=r.resolve(u,a,n)),r&&t[r]){if(t[r][o]!==void 0)return t[r][o];if(t[r]["*"]!==void 0)return t[r]["*"]}return t[o]?t[o]:t["*"]},x.label=function(u,t,o,a){if(!o.errors.label)return"";if(u.label)return u.label;let n=t.path;return o.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),x.path(n)||x.template(null,o.messages,"root",t,o)||a&&x.template(null,a,"root",t,o)||"value"},x.process=function(u,t,o){if(!u)return null;const{override:a,message:n,details:r}=x.details(u);if(a)return a;if(o.errors.stack)return new x.ValidationError(n,r,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const i=new x.ValidationError(n,r,t);return Error.stackTraceLimit=c,i},x.details=function(u,t={}){let o=[];const a=[];for(const n of u){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();o.push(c),a.push({message:c,type:"override",context:{error:n}});continue}const r=n.toString();o.push(r),a.push({message:r,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return o.length>1&&(o=[...new Set(o)]),{message:o.join(". "),details:a}},x.ValidationError=class extends Error{constructor(u,t,o){super(u),this._original=o,this.details=t}static isError(u){return u instanceof x.ValidationError}},x.ValidationError.prototype.isJoi=!0,x.ValidationError.prototype.name="ValidationError",x.ValidationError.prototype.annotate=s.error},8901:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8160),u=y(6914),t={};x.type=function(o,a){const n=Object.getPrototypeOf(o),r=g(n),c=o._assign(Object.create(r)),i=Object.assign({},a);delete i.base,r._definition=i;const l=n._definition||{};i.messages=u.merge(l.messages,i.messages),i.properties=Object.assign({},l.properties,i.properties),c.type=i.type,i.flags=Object.assign({},l.flags,i.flags);const d=Object.assign({},l.terms);if(i.terms)for(const S in i.terms){const h=i.terms[S];s(c.$_terms[S]===void 0,"Invalid term override for",i.type,S),c.$_terms[S]=h.init,d[S]=h}i.terms=d,i.args||(i.args=l.args),i.prepare=t.prepare(i.prepare,l.prepare),i.coerce&&(typeof i.coerce=="function"&&(i.coerce={method:i.coerce}),i.coerce.from&&!Array.isArray(i.coerce.from)&&(i.coerce={method:i.coerce.method,from:[].concat(i.coerce.from)})),i.coerce=t.coerce(i.coerce,l.coerce),i.validate=t.validate(i.validate,l.validate);const p=Object.assign({},l.rules);if(i.rules)for(const S in i.rules){const h=i.rules[S];s(typeof h=="object","Invalid rule definition for",i.type,S);let b=h.method;if(b===void 0&&(b=function(){return this.$_addRule(S)}),b&&(s(!r[S],"Rule conflict in",i.type,S),r[S]=b),s(!p[S],"Rule conflict in",i.type,S),p[S]=h,h.alias){const j=[].concat(h.alias);for(const w of j)r[w]=h.method}h.args&&(h.argsByName=new Map,h.args=h.args.map(j=>(typeof j=="string"&&(j={name:j}),s(!h.argsByName.has(j.name),"Duplicated argument name",j.name),m.isSchema(j.assert)&&(j.assert=j.assert.strict().label(j.name)),h.argsByName.set(j.name,j),j)))}i.rules=p;const f=Object.assign({},l.modifiers);if(i.modifiers)for(const S in i.modifiers){s(!r[S],"Rule conflict in",i.type,S);const h=i.modifiers[S];s(typeof h=="function","Invalid modifier definition for",i.type,S);const b=function(j){return this.rule({[S]:j})};r[S]=b,f[S]=h}if(i.modifiers=f,i.overrides){r._super=n,c.$_super={};for(const S in i.overrides)s(n[S],"Cannot override missing",S),i.overrides[S][m.symbols.parent]=n[S],c.$_super[S]=n[S].bind(c);Object.assign(r,i.overrides)}i.cast=Object.assign({},l.cast,i.cast);const k=Object.assign({},l.manifest,i.manifest);return k.build=t.build(i.manifest&&i.manifest.build,l.manifest&&l.manifest.build),i.manifest=k,i.rebuild=t.rebuild(i.rebuild,l.rebuild),c},t.build=function(o,a){return o&&a?function(n,r){return a(o(n,r),r)}:o||a},t.coerce=function(o,a){return o&&a?{from:o.from&&a.from?[...new Set([...o.from,...a.from])]:null,method(n,r){let c;if((!a.from||a.from.includes(typeof n))&&(c=a.method(n,r),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!o.from||o.from.includes(typeof n)){const i=o.method(n,r);if(i)return i}return c}}:o||a},t.prepare=function(o,a){return o&&a?function(n,r){const c=o(n,r);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return a(n,r)||c}:o||a},t.rebuild=function(o,a){return o&&a?function(n){a(n),o(n)}:o||a},t.validate=function(o,a){return o&&a?function(n,r){const c=a(n,r);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return o(n,r)||c}:o||a}},5107:(_,x,y)=>{const s=y(375),g=y(8571),m=y(8652),u=y(8160),t=y(3292),o=y(6354),a=y(8901),n=y(9708),r=y(6133),c=y(3328),i=y(1152);let l;const d={types:{alternatives:y(4946),any:y(8068),array:y(546),boolean:y(4937),date:y(7500),function:y(390),link:y(8785),number:y(3832),object:y(8966),string:y(7417),symbol:y(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const p={_types:new Set(Object.keys(d.types))};for(const f of p._types)p[f]=function(...k){return s(!k.length||["alternatives","link","object"].includes(f),"The",f,"type does not allow arguments"),d.generate(this,d.types[f],k)};for(const f of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])p[f]=function(...k){return this.any()[f](...k)};Object.assign(p,d.methods);for(const f in d.aliases){const k=d.aliases[f];p[f]=p[k]}return p.x=p.expression,i.setup&&i.setup(p),p}};d.methods={ValidationError:o.ValidationError,version:u.version,cache:m.provider,assert(p,f,...k){d.assert(p,f,!0,k)},attempt:(p,f,...k)=>d.assert(p,f,!1,k),build(p){return s(typeof n.build=="function","Manifest functionality disabled"),n.build(this,p)},checkPreferences(p){u.checkPreferences(p)},compile(p,f){return t.compile(this,p,f)},defaults(p){s(typeof p=="function","modifier must be a function");const f=Object.assign({},this);for(const k of f._types){const S=p(f[k]());s(u.isSchema(S),"modifier must return a valid schema object"),f[k]=function(...h){return d.generate(this,S,h)}}return f},expression:(...p)=>new c(...p),extend(...p){u.verifyFlat(p,"extend"),l=l||y(3378),s(p.length,"You need to provide at least one extension"),this.assert(p,l.extensions);const f=Object.assign({},this);f._types=new Set(f._types);for(let k of p){typeof k=="function"&&(k=k(f)),this.assert(k,l.extension);const S=d.expandExtension(k,f);for(const h of S){s(f[h.type]===void 0||f._types.has(h.type),"Cannot override name",h.type);const b=h.base||this.any(),j=a.type(b,h);f._types.add(h.type),f[h.type]=function(...w){return d.generate(this,j,w)}}}return f},isError:o.ValidationError.isError,isExpression:c.isTemplate,isRef:r.isRef,isSchema:u.isSchema,in:(...p)=>r.in(...p),override:u.symbols.override,ref:(...p)=>r.create(...p),types(){const p={};for(const f of this._types)p[f]=this[f]();for(const f in d.aliases)p[f]=this[f]();return p}},d.assert=function(p,f,k,S){const h=S[0]instanceof Error||typeof S[0]=="string"?S[0]:null,b=h!==null?S[1]:S[0],j=f.validate(p,u.preferences({errors:{stack:!0}},b||{}));let w=j.error;if(!w)return j.value;if(h instanceof Error)throw h;const O=k&&typeof w.annotate=="function"?w.annotate():w.message;throw w instanceof o.ValidationError==0&&(w=g(w)),w.message=h?`${h} ${O}`:O,w},d.generate=function(p,f,k){return s(p,"Must be invoked on a Joi instance."),f.$_root=p,f._definition.args&&k.length?f._definition.args(f,...k):f},d.expandExtension=function(p,f){if(typeof p.type=="string")return[p];const k=[];for(const S of f._types)if(p.type.test(S)){const h=Object.assign({},p);h.type=S,h.base=f[S](),k.push(h)}return k},_.exports=d.root()},6914:(_,x,y)=>{const s=y(375),g=y(8571),m=y(3328);x.compile=function(u,t){if(typeof u=="string")return s(!t,"Cannot set single message string"),new m(u);if(m.isTemplate(u))return s(!t,"Cannot set single message template"),u;s(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),t=t?g(t):{};for(let o in u){const a=u[o];if(o==="root"||m.isTemplate(a)){t[o]=a;continue}if(typeof a=="string"){t[o]=new m(a);continue}s(typeof a=="object"&&!Array.isArray(a),"Invalid message for",o);const n=o;for(o in t[n]=t[n]||{},a){const r=a[o];o==="root"||m.isTemplate(r)?t[n][o]=r:(s(typeof r=="string","Invalid message for",o,"in",n),t[n][o]=new m(r))}}return t},x.decompile=function(u){const t={};for(let o in u){const a=u[o];if(o==="root"){t.root=a;continue}if(m.isTemplate(a)){t[o]=a.describe({compact:!0});continue}const n=o;for(o in t[n]={},a){const r=a[o];o!=="root"?t[n][o]=r.describe({compact:!0}):t[n].root=r}}return t},x.merge=function(u,t){if(!u)return x.compile(t);if(!t)return u;if(typeof t=="string")return new m(t);if(m.isTemplate(t))return t;const o=g(u);for(let a in t){const n=t[a];if(a==="root"||m.isTemplate(n)){o[a]=n;continue}if(typeof n=="string"){o[a]=new m(n);continue}s(typeof n=="object"&&!Array.isArray(n),"Invalid message for",a);const r=a;for(a in o[r]=o[r]||{},n){const c=n[a];a==="root"||m.isTemplate(c)?o[r][a]=c:(s(typeof c=="string","Invalid message for",a,"in",r),o[r][a]=new m(c))}}return o}},2294:(_,x,y)=>{const s=y(375),g=y(8160),m=y(6133),u={};x.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new u.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[o,a]of t._byId.entries())s(!this._byKey.has(o),"Schema id conflicts with existing key:",o),this._byId.set(o,a);for(const[o,a]of t._byKey.entries())s(!this._byId.has(o),"Schema key conflicts with existing id:",o),this._byKey.set(o,a)}fork(t,o,a){const n=this._collect(t);n.push({schema:a});const r=n.shift();let c={id:r.id,schema:o(r.schema)};s(g.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const i of n)c={id:i.id,schema:u.fork(i.schema,c.id,c.schema)};return c.schema}labels(t,o=[]){const a=t[0],n=this._get(a);if(!n)return[...o,...t].join(".");const r=t.slice(1);return o=[...o,n.schema._flags.label||a],r.length?n.schema._ids.labels(r,o):o.join(".")}reach(t,o=[]){const a=t[0],n=this._get(a);s(n,"Schema does not contain path",[...o,...t].join("."));const r=t.slice(1);return r.length?n.schema._ids.reach(r,[...o,a]):n.schema}register(t,{key:o}={}){if(!t||!g.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const a=t._flags.id;if(a){const n=this._byId.get(a);s(!n||n.schema===t,"Cannot add different schemas with the same id:",a),s(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:t,id:a})}o&&(s(!this._byKey.has(o),"Schema already contains key:",o),s(!this._byId.has(o),"Schema key conflicts with existing id:",o),this._byKey.set(o,{schema:t,id:o}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,o=[],a=[]){const n=t[0],r=this._get(n);s(r,"Schema does not contain path",[...o,...t].join(".")),a=[r,...a];const c=t.slice(1);return c.length?r.schema._ids._collect(c,[...o,n],a):a}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,o,a){const n=x.schema(t,{each:(r,{key:c})=>{if(o===(r._flags.id||c))return a},ref:!1});return n?n.$_mutateRebuild():t},x.schema=function(t,o){let a;for(const n in t._flags){if(n[0]==="_")continue;const r=u.scan(t._flags[n],{source:"flags",name:n},o);r!==void 0&&(a=a||t.clone(),a._flags[n]=r)}for(let n=0;n<t._rules.length;++n){const r=t._rules[n],c=u.scan(r.args,{source:"rules",name:r.name},o);if(c!==void 0){a=a||t.clone();const i=Object.assign({},r);i.args=c,a._rules[n]=i,a._singleRules.get(r.name)===r&&a._singleRules.set(r.name,i)}}for(const n in t.$_terms){if(n[0]==="_")continue;const r=u.scan(t.$_terms[n],{source:"terms",name:n},o);r!==void 0&&(a=a||t.clone(),a.$_terms[n]=r)}return a},u.scan=function(t,o,a,n,r){const c=n||[];if(t===null||typeof t!="object")return;let i;if(Array.isArray(t)){for(let l=0;l<t.length;++l){const d=o.source==="terms"&&o.name==="keys"&&t[l].key,p=u.scan(t[l],o,a,[l,...c],d);p!==void 0&&(i=i||t.slice(),i[l]=p)}return i}if(a.schema!==!1&&g.isSchema(t)||a.ref!==!1&&m.isRef(t)){const l=a.each(t,{...o,path:c,key:r});return l===t?void 0:l}for(const l in t){if(l[0]==="_")continue;const d=u.scan(t[l],o,a,[l,...c],r);d!==void 0&&(i=i||Object.assign({},t),i[l]=d)}return i}},6133:(_,x,y)=>{const s=y(375),g=y(8571),m=y(9621),u=y(8160);let t;const o={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};x.create=function(a,n={}){s(typeof a=="string","Invalid reference key:",a),u.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),s(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const r=Object.assign({},o.defaults,n);delete r.prefix;const c=r.separator,i=o.context(a,c,n.prefix);if(r.type=i.type,a=i.key,r.type==="value")if(i.root&&(s(!c||a[0]!==c,"Cannot specify relative path with root prefix"),r.ancestor="root",a||(a=null)),c&&c===a)a=null,r.ancestor=0;else if(r.ancestor!==void 0)s(!c||!a||a[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,d]=o.ancestor(a,c);d&&(a=a.slice(d))===""&&(a=null),r.ancestor=l}return r.path=c?a===null?[]:a.split(c):[a],new o.Ref(r)},x.in=function(a,n={}){return x.create(a,{...n,in:!0})},x.isRef=function(a){return!!a&&!!a[u.symbols.ref]},o.Ref=class{constructor(a){s(typeof a=="object","Invalid reference construction"),u.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),s([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),s(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),s(!a.map||Array.isArray(a.map),"options.map must be an array"),s(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,o.defaults,a),s(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(a,n,r,c,i={}){return s(!this.in||i.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(r.context,n,i):this.type==="local"?this._resolve(c,n,i):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,i):(s(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,i)):this._resolve(a,n,i)}_resolve(a,n,r){let c;if(this.type==="value"&&n.mainstay.shadow&&r.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=m(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const i=this.map.get(c);i!==void 0&&(c=i)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(a){return[...a.path.slice(0,-this.ancestor),...this.path]}clone(){return new o.Ref(this)}describe(){const a={path:this.path};this.type!=="value"&&(a.type=this.type),this.separator!=="."&&(a.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(a.ancestor=this.ancestor),this.map&&(a.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(a[n]=this[n]);return this.in!==!1&&(a.in=!0),{ref:a}}updateDisplay(){const a=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${a}`);if(!this.separator)return void(this.display=`ref:${a}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${a}`);if(this.ancestor==="root")return void(this.display=`ref:root:${a}`);if(this.ancestor===1)return void(this.display=`ref:${a||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${a||""}`}},o.Ref.prototype[u.symbols.ref]=!0,x.build=function(a){return(a=Object.assign({},o.defaults,a)).type==="value"&&a.ancestor===void 0&&(a.ancestor=1),new o.Ref(a)},o.context=function(a,n,r={}){if(a=a.trim(),r){const c=r.global===void 0?"$":r.global;if(c!==n&&a.startsWith(c))return{key:a.slice(c.length),type:"global"};const i=r.local===void 0?"#":r.local;if(i!==n&&a.startsWith(i))return{key:a.slice(i.length),type:"local"};const l=r.root===void 0?"/":r.root;if(l!==n&&a.startsWith(l))return{key:a.slice(l.length),type:"value",root:!0}}return{key:a,type:"value"}},o.ancestor=function(a,n){if(!n)return[1,0];if(a[0]!==n)return[1,0];if(a[1]!==n)return[0,1];let r=2;for(;a[r]===n;)++r;return[r-1,r]},x.toSibling=0,x.toParent=1,x.Manager=class{constructor(){this.refs=[]}register(a,n){if(a)if(n=n===void 0?x.toParent:n,Array.isArray(a))for(const r of a)this.register(r,n);else if(u.isSchema(a))for(const r of a._refs.refs)r.ancestor-n>=0&&this.refs.push({ancestor:r.ancestor-n,root:r.root});else x.isRef(a)&&a.type==="value"&&a.ancestor-n>=0&&this.refs.push({ancestor:a.ancestor-n,root:a.root}),t=t||y(3328),t.isTemplate(a)&&this.register(a.refs(),n)}get length(){return this.refs.length}clone(){const a=new x.Manager;return a.refs=g(this.refs),a}reset(){this.refs=[]}roots(){return this.refs.filter(a=>!a.ancestor).map(a=>a.root)}}},3378:(_,x,y)=>{const s=y(5107),g={};g.wrap=s.string().min(1).max(2).allow(!1),x.preferences=s.object({allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),context:s.object(),convert:s.boolean(),dateFormat:s.valid("date","iso","string","time","utc"),debug:s.boolean(),errors:{escapeHtml:s.boolean(),label:s.valid("path","key",!1),language:[s.string(),s.object().ref()],render:s.boolean(),stack:s.boolean(),wrap:{label:g.wrap,array:g.wrap,string:g.wrap}},externals:s.boolean(),messages:s.object(),noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:s.valid("required","optional","forbidden"),skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(!0,!1),warnings:s.boolean()}).strict(),g.nameRx=/^[a-zA-Z0-9]\w*$/,g.rule=s.object({alias:s.array().items(s.string().pattern(g.nameRx)).single(),args:s.array().items(s.string(),s.object({name:s.string().pattern(g.nameRx).required(),ref:s.boolean(),assert:s.alternatives([s.function(),s.object().schema()]).conditional("ref",{is:!0,then:s.required()}),normalize:s.function(),message:s.string().when("assert",{is:s.function(),then:s.required()})})),convert:s.boolean(),manifest:s.boolean(),method:s.function().allow(!1),multi:s.boolean(),validate:s.function()}),x.extension=s.object({type:s.alternatives([s.string(),s.object().regex()]).required(),args:s.function(),cast:s.object().pattern(g.nameRx,s.object({from:s.function().maxArity(1).required(),to:s.function().minArity(1).maxArity(2).required()})),base:s.object().schema().when("type",{is:s.object().regex(),then:s.forbidden()}),coerce:[s.function().maxArity(3),s.object({method:s.function().maxArity(3).required(),from:s.array().items(s.string()).single()})],flags:s.object().pattern(g.nameRx,s.object({setter:s.string(),default:s.any()})),manifest:{build:s.function().arity(2)},messages:[s.object(),s.string()],modifiers:s.object().pattern(g.nameRx,s.function().minArity(1).maxArity(2)),overrides:s.object().pattern(g.nameRx,s.function()),prepare:s.function().maxArity(3),rebuild:s.function().arity(1),rules:s.object().pattern(g.nameRx,g.rule),terms:s.object().pattern(g.nameRx,s.object({init:s.array().allow(null).required(),manifest:s.object().pattern(/.+/,[s.valid("schema","single"),s.object({mapped:s.object({from:s.string().required(),to:s.string().required()}).required()})])})),validate:s.function().maxArity(3)}).strict(),x.extensions=s.array().items(s.object(),s.function().arity(1)).strict(),g.desc={buffer:s.object({buffer:s.string()}),func:s.object({function:s.function().required(),options:{literal:!0}}),override:s.object({override:!0}),ref:s.object({ref:s.object({type:s.valid("value","global","local"),path:s.array().required(),separator:s.string().length(1).allow(!1),ancestor:s.number().min(0).integer().allow("root"),map:s.array().items(s.array().length(2)).min(1),adjust:s.function(),iterables:s.boolean(),in:s.boolean(),render:s.boolean()}).required()}),regex:s.object({regex:s.string().min(3)}),special:s.object({special:s.valid("deep").required()}),template:s.object({template:s.string().required(),options:s.object()}),value:s.object({value:s.alternatives([s.object(),s.array()]).required()})},g.desc.entity=s.alternatives([s.array().items(s.link("...")),s.boolean(),s.function(),s.number(),s.string(),g.desc.buffer,g.desc.func,g.desc.ref,g.desc.regex,g.desc.special,g.desc.template,g.desc.value,s.link("/")]),g.desc.values=s.array().items(null,s.boolean(),s.function(),s.number().allow(1/0,-1/0),s.string().allow(""),s.symbol(),g.desc.buffer,g.desc.func,g.desc.override,g.desc.ref,g.desc.regex,g.desc.template,g.desc.value),g.desc.messages=s.object().pattern(/.+/,[s.string(),g.desc.template,s.object().pattern(/.+/,[s.string(),g.desc.template])]),x.description=s.object({type:s.string().required(),flags:s.object({cast:s.string(),default:s.any(),description:s.string(),empty:s.link("/"),failover:g.desc.entity,id:s.string(),label:s.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:s.boolean(),unit:s.string()}).unknown(),preferences:{allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),convert:s.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:s.boolean(),label:["path","key"],language:[s.string(),g.desc.ref],wrap:{label:g.wrap,array:g.wrap}},externals:s.boolean(),messages:g.desc.messages,noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:["required","optional","forbidden"],skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or("arrays","objects").allow(!0,!1),warnings:s.boolean()},allow:g.desc.values,invalid:g.desc.values,rules:s.array().min(1).items({name:s.string().required(),args:s.object().min(1),keep:s.boolean(),message:[s.string(),g.desc.messages],warn:s.boolean()}),keys:s.object().pattern(/.*/,s.link("/")),link:g.desc.ref}).pattern(/^[a-z]\w*$/,s.any())},493:(_,x,y)=>{const s=y(8571),g=y(9621),m=y(8160),u={value:Symbol("value")};_.exports=u.State=class{constructor(t,o,a){this.path=t,this.ancestors=o,this.mainstay=a.mainstay,this.schemas=a.schemas,this.debug=null}localize(t,o=null,a=null){const n=new u.State(t,o,this);return a&&n.schemas&&(n.schemas=[u.schemas(a),...n.schemas]),n}nest(t,o){const a=new u.State(this.path,this.ancestors,this);return a.schemas=a.schemas&&[u.schemas(t),...a.schemas],a.debug=o,a}shadow(t,o){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,t,o)}snapshot(){this.mainstay.shadow&&(this._snapshot=s(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(t){return m.isSchema(t)?{schema:t}:t},u.Shadow=class{constructor(){this._values=null}set(t,o,a){if(!t.length||a==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let r=0;r<t.length;++r){const c=t[r];let i=n.get(c);i||(i=new Map,n.set(c,i)),n=i}n[u.value]=o}get(t){const o=this.node(t);if(o)return o[u.value]}node(t){if(this._values)return g(this._values,t,{iterables:!0})}override(t,o){if(!this._values)return;const a=t.slice(0,-1),n=t[t.length-1],r=g(this._values,a,{iterables:!0});o?r.set(n,o):r&&r.delete(n)}}},3328:(_,x,y)=>{const s=y(375),g=y(8571),m=y(5277),u=y(1447),t=y(8160),o=y(6354),a=y(6133),n={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};_.exports=n.Template=class{constructor(r,c){if(s(typeof r=="string","Template source must be a string"),s(!r.includes("\0")&&!r.includes(""),"Template source cannot contain reserved control characters"),this.source=r,this.rendered=r,this._template=null,c){const{functions:i,...l}=c;this._settings=Object.keys(l).length?g(l):void 0,this._functions=i,this._functions&&(s(Object.keys(this._functions).every(d=>typeof d=="string"),"Functions keys must be strings"),s(Object.values(this._functions).every(d=>typeof d=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const r=n.encode(this.source),c=n.split(r);let i=!1;const l=[],d=c.shift();d&&l.push(d);for(const p of c){const f=p[0]!=="{",k=f?"}":"}}",S=p.indexOf(k);if(S===-1||p[1]==="{"){l.push(`{${n.decode(p)}`);continue}let h=p.slice(f?0:1,S);const b=h[0]===":";b&&(h=h.slice(1));const j=this._ref(n.decode(h),{raw:f,wrapped:b});l.push(j),typeof j!="string"&&(i=!0);const w=p.slice(S+k.length);w&&l.push(n.decode(w))}i?this._template=l:this.rendered=l.join("")}static date(r,c){return n.dateFormat[c.dateFormat].call(r)}describe(r={}){if(!this._settings&&r.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(r){return new n.Template(r.template,r.options||r.functions?{...r.options,functions:r.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(r){return!!r&&!!r[t.symbols.template]}refs(){if(!this._template)return;const r=[];for(const c of this._template)typeof c!="string"&&r.push(...c.refs);return r}resolve(r,c,i,l){return this._template&&this._template.length===1?this._part(this._template[0],r,c,i,l,{}):this.render(r,c,i,l)}_part(r,...c){return r.ref?r.ref.resolve(...c):r.formula.evaluate(c)}render(r,c,i,l,d={}){if(!this.isDynamic())return this.rendered;const p=[];for(const f of this._template)if(typeof f=="string")p.push(f);else{const k=this._part(f,r,c,i,l,d),S=n.stringify(k,r,c,i,l,d);if(S!==void 0){const h=f.raw||(d.errors&&d.errors.escapeHtml)===!1?S:m(S);p.push(n.wrap(h,f.wrapped&&i.errors.wrap.label))}}return p.join("")}_ref(r,{raw:c,wrapped:i}){const l=[],d=f=>{const k=a.create(f,this._settings);return l.push(k),S=>{const h=k.resolve(...S);return h!==void 0?h:null}};try{const f=this._functions?{...n.functions,...this._functions}:n.functions;var p=new u.Parser(r,{reference:d,functions:f,constants:n.constants})}catch(f){throw f.message=`Invalid template variable "${r}" fails due to: ${f.message}`,f}if(p.single){if(p.single.type==="reference"){const f=l[0];return{ref:f,raw:c,refs:l,wrapped:i||f.type==="local"&&f.key==="label"}}return n.stringify(p.single.value)}return{formula:p,raw:c,refs:l}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(r){return r.replace(/\\(\{+)/g,(c,i)=>n.opens.slice(0,i.length)).replace(/\\(\}+)/g,(c,i)=>n.closes.slice(0,i.length))},n.decode=function(r){return r.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(r){const c=[];let i="";for(let l=0;l<r.length;++l){const d=r[l];if(d==="{"){let p="";for(;l+1<r.length&&r[l+1]==="{";)p+="{",++l;c.push(i),i=p}else i+=d}return c.push(i),c},n.wrap=function(r,c){return c?c.length===1?`${c}${r}${c}`:`${c[0]}${r}${c[1]}`:r},n.stringify=function(r,c,i,l,d,p={}){const f=typeof r,k=l&&l.errors&&l.errors.wrap||{};let S=!1;if(a.isRef(r)&&r.render&&(S=r.in,r=r.resolve(c,i,l,d,{in:r.in,...p})),r===null)return"null";if(f==="string")return n.wrap(r,p.arrayItems&&k.string);if(f==="number"||f==="function"||f==="symbol")return r.toString();if(f!=="object")return JSON.stringify(r);if(r instanceof Date)return n.Template.date(r,l);if(r instanceof Map){const b=[];for(const[j,w]of r.entries())b.push(`${j.toString()} -> ${w.toString()}`);r=b}if(!Array.isArray(r))return r.toString();const h=[];for(const b of r)h.push(n.stringify(b,c,i,l,d,{arrayItems:!0,...p}));return n.wrap(h.join(", "),!S&&k.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(r,c,i)=>r?c:i,length:r=>typeof r=="string"?r.length:r&&typeof r=="object"?Array.isArray(r)?r.length:Object.keys(r).length:null,msg(r){const[c,i,l,d,p]=this,f=p.messages;if(!f)return"";const k=o.template(c,f[0],r,i,l)||o.template(c,f[1],r,i,l);return k?k.render(c,i,l,d,p):""},number:r=>typeof r=="number"?r:typeof r=="string"?parseFloat(r):typeof r=="boolean"?r?1:0:r instanceof Date?r.getTime():null}},4946:(_,x,y)=>{const s=y(375),g=y(1687),m=y(8068),u=y(8160),t=y(3292),o=y(6354),a=y(6133),n={};_.exports=m.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(r,...c)=>c.length===1&&Array.isArray(c[0])?r.try(...c[0]):r.try(...c),validate(r,c){const{schema:i,error:l,state:d,prefs:p}=c;if(i._flags.match){const k=[],S=[];for(let b=0;b<i.$_terms.matches.length;++b){const j=i.$_terms.matches[b],w=d.nest(j.schema,`match.${b}`);w.snapshot();const O=j.schema.$_validate(r,w,p);O.errors?(S.push(O.errors),w.restore()):(k.push(O.value),w.commit())}if(k.length===0)return{errors:l("alternatives.any",{details:S.map(b=>o.details(b,{override:!1}))})};if(i._flags.match==="one")return k.length===1?{value:k[0]}:{errors:l("alternatives.one")};if(k.length!==i.$_terms.matches.length)return{errors:l("alternatives.all",{details:S.map(b=>o.details(b,{override:!1}))})};const h=b=>b.$_terms.matches.some(j=>j.schema.type==="object"||j.schema.type==="alternatives"&&h(j.schema));return h(i)?{value:k.reduce((b,j)=>g(b,j,{mergeArrays:!1}))}:{value:k[k.length-1]}}const f=[];for(let k=0;k<i.$_terms.matches.length;++k){const S=i.$_terms.matches[k];if(S.schema){const j=d.nest(S.schema,`match.${k}`);j.snapshot();const w=S.schema.$_validate(r,j,p);if(!w.errors)return j.commit(),w;j.restore(),f.push({schema:S.schema,reports:w.errors});continue}const h=S.ref?S.ref.resolve(r,d,p):r,b=S.is?[S]:S.switch;for(let j=0;j<b.length;++j){const w=b[j],{is:O,then:$,otherwise:I}=w,q=`match.${k}${S.switch?"."+j:""}`;if(O.$_match(h,d.nest(O,`${q}.is`),p)){if($)return $.$_validate(r,d.nest($,`${q}.then`),p)}else if(I)return I.$_validate(r,d.nest(I,`${q}.otherwise`),p)}}return n.errors(f,c)},rules:{conditional:{method(r,c){s(!this._flags._endedSwitch,"Unreachable condition"),s(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),s(c.break===void 0,"Cannot use break option with alternatives conditional");const i=this.clone(),l=t.when(i,r,c),d=l.is?[l]:l.switch;for(const p of d)if(p.then&&p.otherwise){i.$_setFlag("_endedSwitch",!0,{clone:!1});break}return i.$_terms.matches.push(l),i.$_mutateRebuild()}},match:{method(r){if(s(["any","one","all"].includes(r),"Invalid alternatives match mode",r),r!=="any")for(const c of this.$_terms.matches)s(c.schema,"Cannot combine match mode",r,"with conditional rules");return this.$_setFlag("match",r)}},try:{method(...r){s(r.length,"Missing alternative schemas"),u.verifyFlat(r,"try"),s(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const i of r)c.$_terms.matches.push({schema:c.$_compile(i)});return c.$_mutateRebuild()}}},overrides:{label(r){return this.$_parent("label",r).$_modify({each:(c,i)=>i.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(r):void 0,ref:!1})}},rebuild(r){r.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&r.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(r,c){if(c.matches)for(const i of c.matches){const{schema:l,ref:d,is:p,not:f,then:k,otherwise:S}=i;r=l?r.try(l):d?r.conditional(d,{is:p,then:k,not:f,otherwise:S,switch:i.switch}):r.conditional(p,{then:k,otherwise:S})}return r}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),n.errors=function(r,{error:c,state:i}){if(!r.length)return{errors:c("alternatives.any")};if(r.length===1)return{errors:r[0].reports};const l=new Set,d=[];for(const{reports:p,schema:f}of r){if(p.length>1)return n.unmatched(r,c);const k=p[0];if(k instanceof o.Report==0)return n.unmatched(r,c);if(k.state.path.length!==i.path.length){d.push({type:f.type,report:k});continue}if(k.code==="any.only"){for(const b of k.local.valids)l.add(b);continue}const[S,h]=k.code.split(".");h!=="base"?d.push({type:f.type,report:k}):k.code==="object.base"?l.add(k.local.type):l.add(S)}return d.length?d.length===1?{errors:d[0].report}:n.unmatched(r,c):{errors:c("alternatives.types",{types:[...l]})}},n.unmatched=function(r,c){const i=[];for(const l of r)i.push(...l.reports);return{errors:c("alternatives.match",o.details(i,{override:!1}))}}},8068:(_,x,y)=>{const s=y(375),g=y(7629),m=y(8160),u=y(6914);_.exports=g.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(t,o){return s(typeof t=="function","Method must be a function"),s(o===void 0||o&&typeof o=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:o}})},validate(t,o,{method:a}){try{return a(t,o)}catch(n){return o.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){s(m.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const o=this.clone();return o.$_terms.shared=o.$_terms.shared||[],o.$_terms.shared.push(t),o.$_mutateRegister(t),o}},warning:{method(t,o){return s(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:o},warn:!0})},validate:(t,o,{code:a,local:n})=>o.error(a,n),args:["code","local"],multi:!0}},modifiers:{keep(t,o=!0){t.keep=o},message(t,o){t.message=u.compile(o)},warn(t,o=!0){t.warn=o}},manifest:{build(t,o){for(const a in o){const n=o[a];if(["examples","externals","metas","notes","tags"].includes(a))for(const r of n)t=t[a.slice(0,-1)](r);else if(a!=="alterations")if(a!=="whens"){if(a==="shared")for(const r of n)t=t.shared(r)}else for(const r of n){const{ref:c,is:i,not:l,then:d,otherwise:p,concat:f}=r;t=f?t.concat(f):c?t.when(c,{is:i,not:l,then:d,otherwise:p,switch:r.switch,break:r.break}):t.when(i,{then:d,otherwise:p,break:r.break})}else{const r={};for(const{target:c,adjuster:i}of n)r[c]=i;t=t.alter(r)}}return t}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(_,x,y)=>{const s=y(375),g=y(9474),m=y(9621),u=y(8068),t=y(8160),o=y(3292),a={};_.exports=u.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(n,{schema:r,state:c,prefs:i}){if(!Array.isArray(n))return;const l=r.$_getRule("sort");return l?a.sort(r,n,l.args.options,c,i):void 0}},validate(n,{schema:r,error:c}){if(!Array.isArray(n)){if(r._flags.single){const i=[n];return i[t.symbols.arraySingle]=!0,{value:i}}return{errors:c("array.base")}}if(r.$_getRule("items")||r.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const r=this.$_addRule({name:"has",args:{schema:n}});return r.$_mutateRegister(n),r},validate(n,{state:r,prefs:c,error:i},{schema:l}){const d=[n,...r.ancestors];for(let f=0;f<n.length;++f){const k=r.localize([...r.path,f],d,l);if(l.$_match(n[f],k,c))return n}const p=l._flags.label;return p?i("array.hasKnown",{patternLabel:p}):i("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const r=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});r.$_terms.items.push(i)}return r.$_mutateRebuild()},validate(n,{schema:r,error:c,state:i,prefs:l,errorsArray:d}){const p=r.$_terms._requireds.slice(),f=r.$_terms.ordered.slice(),k=[...r.$_terms._inclusions,...p],S=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const h=d();let b=n.length;for(let j=0;j<b;++j){const w=n[j];let O=!1,$=!1;const I=S?j:new Number(j),q=[...i.path,I];if(!r._flags.sparse&&w===void 0){if(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly)return h;f.shift();continue}const Z=[n,...i.ancestors];for(const H of r.$_terms._exclusions)if(H.$_match(w,i.localize(q,Z,H),l,{presence:"ignore"})){if(h.push(c("array.excludes",{pos:j,value:w},i.localize(q))),l.abortEarly)return h;O=!0,f.shift();break}if(O)continue;if(r.$_terms.ordered.length){if(f.length){const H=f.shift(),W=H.$_validate(w,i.localize(q,Z,H),l);if(W.errors){if(h.push(...W.errors),l.abortEarly)return h}else if(H._flags.result==="strip")a.fastSplice(n,j),--j,--b;else{if(!r._flags.sparse&&W.value===void 0){if(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly)return h;continue}n[j]=W.value}continue}if(!r.$_terms.items.length){if(h.push(c("array.orderedLength",{pos:j,limit:r.$_terms.ordered.length})),l.abortEarly)return h;break}}const K=[];let F=p.length;for(let H=0;H<F;++H){const W=i.localize(q,Z,p[H]);W.snapshot();const ee=p[H].$_validate(w,W,l);if(K[H]=ee,!ee.errors){if(W.commit(),n[j]=ee.value,$=!0,a.fastSplice(p,H),--H,--F,!r._flags.sparse&&ee.value===void 0&&(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),l.abortEarly))return h;break}W.restore()}if($)continue;const L=l.stripUnknown&&!!l.stripUnknown.arrays||!1;F=k.length;for(const H of k){let W;const ee=p.indexOf(H);if(ee!==-1)W=K[ee];else{const ge=i.localize(q,Z,H);if(ge.snapshot(),W=H.$_validate(w,ge,l),!W.errors){ge.commit(),H._flags.result==="strip"?(a.fastSplice(n,j),--j,--b):r._flags.sparse||W.value!==void 0?n[j]=W.value:(h.push(c("array.sparse",{key:I,path:q,pos:j,value:void 0},i.localize(q))),O=!0),$=!0;break}ge.restore()}if(F===1){if(L){a.fastSplice(n,j),--j,--b,$=!0;break}if(h.push(...W.errors),l.abortEarly)return h;O=!0;break}}if(!O&&(r.$_terms._inclusions.length||r.$_terms._requireds.length)&&!$){if(L){a.fastSplice(n,j),--j,--b;continue}if(h.push(c("array.includes",{pos:j,value:w},i.localize(q))),l.abortEarly)return h}}return p.length&&a.fillMissedErrors(r,h,p,n,i,l),f.length&&(a.fillOrderedErrors(r,h,f,n,i,l),h.length||a.fillDefault(f,n,i,l)),h.length?h:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,r,{limit:c},{name:i,operator:l,args:d})=>t.compare(n.length,c,l)?n:r.error("array."+i,{limit:d.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const r=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});a.validateSingle(i,r),r.$_mutateRegister(i),r.$_terms.ordered.push(i)}return r.$_mutateRebuild()}},single:{method(n){const r=n===void 0||!!n;return s(!r||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",r)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const r={order:n.order||"ascending"};return n.by&&(r.by=o.ref(n.by,{ancestor:0}),s(!r.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:r}})},validate(n,{error:r,state:c,prefs:i,schema:l},{options:d}){const{value:p,errors:f}=a.sort(l,n,d,c,i);if(f)return f;for(let k=0;k<n.length;++k)if(n[k]!==p[k])return r("array.sort",{order:d.order,by:d.by?d.by.key:"value"});return n},convert:!0},sparse:{method(n){const r=n===void 0||!!n;return this._flags.sparse===r?this:(r?this.clone():this.$_addRule("items")).$_setFlag("sparse",r,{clone:!1})}},unique:{method(n,r={}){s(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(r,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:r,comparator:n}};if(n)if(typeof n=="string"){const i=t.default(r.separator,".");c.path=i?n.split(i):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:r,error:c,schema:i},{comparator:l,options:d},{comparator:p,path:f}){const k={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},S=p||g,h=d.ignoreUndefined;for(let b=0;b<n.length;++b){const j=f?m(n[b],f):n[b],w=p?k.custom:k[typeof j];if(s(w,"Failed to find unique map container for type",typeof j),w instanceof Map){const O=w.entries();let $;for(;!($=O.next()).done;)if(S($.value[0],j)){const I=r.localize([...r.path,b],[n,...r.ancestors]),q={pos:b,value:n[b],dupePos:$.value[1],dupeValue:n[$.value[1]]};return f&&(q.path=l),c("array.unique",q,I)}w.set(j,b)}else{if((!h||j!==void 0)&&w[j]!==void 0){const O={pos:b,value:n[b],dupePos:w[j],dupeValue:n[w[j]]};return f&&(O.path=l),c("array.unique",O,r.localize([...r.path,b],[n,...r.ancestors]))}w[j]=b}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,r)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const r of n.$_terms.items)a.validateSingle(r,n),r._flags.presence==="required"?n.$_terms._requireds.push(r):r._flags.presence==="forbidden"?n.$_terms._exclusions.push(r):n.$_terms._inclusions.push(r);for(const r of n.$_terms.ordered)a.validateSingle(r,n)},manifest:{build:(n,r)=>(r.items&&(n=n.items(...r.items)),r.ordered&&(n=n.ordered(...r.ordered)),n)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),a.fillMissedErrors=function(n,r,c,i,l,d){const p=[];let f=0;for(const k of c){const S=k._flags.label;S?p.push(S):++f}p.length?f?r.push(n.$_createError("array.includesRequiredBoth",i,{knownMisses:p,unknownMisses:f},l,d)):r.push(n.$_createError("array.includesRequiredKnowns",i,{knownMisses:p},l,d)):r.push(n.$_createError("array.includesRequiredUnknowns",i,{unknownMisses:f},l,d))},a.fillOrderedErrors=function(n,r,c,i,l,d){const p=[];for(const f of c)f._flags.presence==="required"&&p.push(f);p.length&&a.fillMissedErrors(n,r,p,i,l,d)},a.fillDefault=function(n,r,c,i){const l=[];let d=!0;for(let p=n.length-1;p>=0;--p){const f=n[p],k=[r,...c.ancestors],S=f.$_validate(void 0,c.localize(c.path,k,f),i).value;if(d){if(S===void 0)continue;d=!1}l.unshift(S)}l.length&&r.push(...l)},a.fastSplice=function(n,r){let c=r;for(;c<n.length;)n[c++]=n[c];--n.length},a.validateSingle=function(n,r){(n.type==="array"||n._flags._arrayItems)&&(s(!r._flags.single,"Cannot specify array item with single rule enabled"),r.$_setFlag("_arrayItems",!0,{clone:!1}))},a.sort=function(n,r,c,i,l){const d=c.order==="ascending"?1:-1,p=-1*d,f=d,k=(S,h)=>{let b=a.compare(S,h,p,f);if(b!==null||(c.by&&(S=c.by.resolve(S,i,l),h=c.by.resolve(h,i,l)),b=a.compare(S,h,p,f),b!==null))return b;const j=typeof S;if(j!==typeof h)throw n.$_createError("array.sort.mismatching",r,null,i,l);if(j!=="number"&&j!=="string")throw n.$_createError("array.sort.unsupported",r,{type:j},i,l);return j==="number"?(S-h)*d:S<h?p:f};try{return{value:r.slice().sort(k)}}catch(S){return{errors:S}}},a.compare=function(n,r,c,i){return n===r?0:n===void 0?1:r===void 0?-1:n===null?i:r===null?c:null}},4937:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(2036),t={isBool:function(o){return typeof o=="boolean"}};_.exports=g.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(o,{schema:a}){if(typeof o!="boolean"){if(typeof o=="string"){const n=a._flags.sensitive?o:o.toLowerCase();o=n==="true"||n!=="false"&&o}return typeof o!="boolean"&&(o=a.$_terms.truthy&&a.$_terms.truthy.has(o,null,null,!a._flags.sensitive)||(!a.$_terms.falsy||!a.$_terms.falsy.has(o,null,null,!a._flags.sensitive))&&o),{value:o}}},validate(o,{error:a}){if(typeof o!="boolean")return{value:o,errors:a("boolean.base")}},rules:{truthy:{method(...o){m.verifyFlat(o,"truthy");const a=this.clone();a.$_terms.truthy=a.$_terms.truthy||new u;for(let n=0;n<o.length;++n){const r=o[n];s(r!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(r)}return a}},falsy:{method(...o){m.verifyFlat(o,"falsy");const a=this.clone();a.$_terms.falsy=a.$_terms.falsy||new u;for(let n=0;n<o.length;++n){const r=o[n];s(r!==void 0,"Cannot call falsy with undefined"),a.$_terms.falsy.add(r)}return a}},sensitive:{method(o=!0){return this.$_setFlag("sensitive",o)}}},cast:{number:{from:t.isBool,to:(o,a)=>o?1:0},string:{from:t.isBool,to:(o,a)=>o?"true":"false"}},manifest:{build:(o,a)=>(a.truthy&&(o=o.truthy(...a.truthy)),a.falsy&&(o=o.falsy(...a.falsy)),o)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(3328),t={isDate:function(o){return o instanceof Date}};_.exports=g.extend({type:"date",coerce:{from:["number","string"],method:(o,{schema:a})=>({value:t.parse(o,a._flags.format)||o})},validate(o,{schema:a,error:n,prefs:r}){if(o instanceof Date&&!isNaN(o.getTime()))return;const c=a._flags.format;return r.convert&&c&&typeof o=="string"?{value:o,errors:n("date.format",{format:c})}:{value:o,errors:n("date.base")}},rules:{compare:{method:!1,validate(o,a,{date:n},{name:r,operator:c,args:i}){const l=n==="now"?Date.now():n.getTime();return m.compare(o.getTime(),l,c)?o:a.error("date."+r,{limit:i.date,value:o})},args:[{name:"date",ref:!0,normalize:o=>o==="now"?o:t.parse(o),assert:o=>o!==null,message:"must have a valid date format"}]},format:{method(o){return s(["iso","javascript","unix"].includes(o),"Unknown date format",o),this.$_setFlag("format",o)}},greater:{method(o){return this.$_addRule({name:"greater",method:"compare",args:{date:o},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(o){return this.$_addRule({name:"less",method:"compare",args:{date:o},operator:"<"})}},max:{method(o){return this.$_addRule({name:"max",method:"compare",args:{date:o},operator:"<="})}},min:{method(o){return this.$_addRule({name:"min",method:"compare",args:{date:o},operator:">="})}},timestamp:{method(o="javascript"){return s(["javascript","unix"].includes(o),'"type" must be one of "javascript, unix"'),this.format(o)}}},cast:{number:{from:t.isDate,to:(o,a)=>o.getTime()},string:{from:t.isDate,to:(o,{prefs:a})=>u.date(o,a)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),t.parse=function(o,a){if(o instanceof Date)return o;if(typeof o!="string"&&(isNaN(o)||!isFinite(o))||/^\s*$/.test(o))return null;if(a==="iso")return m.isIsoDate(o)?t.date(o.toString()):null;const n=o;if(typeof o=="string"&&/^[+-]?\d+(\.\d+)?$/.test(o)&&(o=parseFloat(o)),a){if(a==="javascript")return t.date(1*o);if(a==="unix")return t.date(1e3*o);if(typeof n=="string")return null}return t.date(o)},t.date=function(o){const a=new Date(o);return isNaN(a.getTime())?null:a}},390:(_,x,y)=>{const s=y(375),g=y(7824);_.exports=g.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(m){return s(Number.isSafeInteger(m)&&m>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:m}})},validate:(m,u,{n:t})=>m.length===t?m:u.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(m,u)=>/^\s*class\s/.test(m.toString())?m:u.error("function.class",{value:m})},minArity:{method(m){return s(Number.isSafeInteger(m)&&m>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:m}})},validate:(m,u,{n:t})=>m.length>=t?m:u.error("function.minArity",{n:t})},maxArity:{method(m){return s(Number.isSafeInteger(m)&&m>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:m}})},validate:(m,u,{n:t})=>m.length<=t?m:u.error("function.maxArity",{n:t})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(_,x,y)=>{const s=y(978),g=y(375),m=y(8571),u=y(3652),t=y(8068),o=y(8160),a=y(3292),n=y(6354),r=y(6133),c=y(3328),i={renameDefaults:{alias:!1,multiple:!1,override:!1}};_.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(l,d)=>l.keys(d),validate(l,{schema:d,error:p,state:f,prefs:k}){if(!l||typeof l!==d.$_property("typeof")||Array.isArray(l))return{value:l,errors:p("object.base",{type:d.$_property("typeof")})};if(!(d.$_terms.renames||d.$_terms.dependencies||d.$_terms.keys||d.$_terms.patterns||d.$_terms.externals))return;l=i.clone(l,k);const S=[];if(d.$_terms.renames&&!i.rename(d,l,f,k,S))return{value:l,errors:S};if(!d.$_terms.keys&&!d.$_terms.patterns&&!d.$_terms.dependencies)return{value:l,errors:S};const h=new Set(Object.keys(l));if(d.$_terms.keys){const b=[l,...f.ancestors];for(const j of d.$_terms.keys){const w=j.key,O=l[w];h.delete(w);const $=f.localize([...f.path,w],b,j),I=j.schema.$_validate(O,$,k);if(I.errors){if(k.abortEarly)return{value:l,errors:I.errors};I.value!==void 0&&(l[w]=I.value),S.push(...I.errors)}else j.schema._flags.result==="strip"||I.value===void 0&&O!==void 0?delete l[w]:I.value!==void 0&&(l[w]=I.value)}}if(h.size||d._flags._hasPatternMatch){const b=i.unknown(d,l,h,S,f,k);if(b)return b}if(d.$_terms.dependencies)for(const b of d.$_terms.dependencies){if(b.key!==null&&i.isPresent(b.options)(b.key.resolve(l,f,k,null,{shadow:!1}))===!1)continue;const j=i.dependencies[b.rel](d,b,l,f,k);if(j){const w=d.$_createError(j.code,l,j.context,f,k);if(k.abortEarly)return{value:l,errors:w};S.push(w)}}return{value:l,errors:S}},rules:{and:{method(...l){return o.verifyFlat(l,"and"),i.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,d,p){c.isTemplate(l)||(l=a.ref(l)),g(p===void 0||typeof p=="string","Message must be a string"),d=this.$_compile(d,{appendPath:!0});const f=this.$_addRule({name:"assert",args:{subject:l,schema:d,message:p}});return f.$_mutateRegister(l),f.$_mutateRegister(d),f},validate(l,{error:d,prefs:p,state:f},{subject:k,schema:S,message:h}){const b=k.resolve(l,f,p),j=r.isRef(k)?k.absolute(f):[];return S.$_match(b,f.localize(j,[l,...f.ancestors],S),p)?l:d("object.assert",{subject:k,message:h})},args:["subject","schema","message"],multi:!0},instance:{method(l,d){return g(typeof l=="function","constructor must be a function"),d=d||l.name,this.$_addRule({name:"instance",args:{constructor:l,name:d}})},validate:(l,d,{constructor:p,name:f})=>l instanceof p?l:d.error("object.instance",{type:f,value:l}),args:["constructor","name"]},keys:{method(l){g(l===void 0||typeof l=="object","Object schema must be a valid object"),g(!o.isSchema(l),"Object schema cannot be a joi schema");const d=this.clone();if(l)if(Object.keys(l).length){d.$_terms.keys=d.$_terms.keys?d.$_terms.keys.filter(p=>!l.hasOwnProperty(p.key)):new i.Keys;for(const p in l)o.tryWithPath(()=>d.$_terms.keys.push({key:p,schema:this.$_compile(l[p])}),p)}else d.$_terms.keys=new i.Keys;else d.$_terms.keys=null;return d.$_mutateRebuild()}},length:{method(l){return this.$_addRule({name:"length",args:{limit:l},operator:"="})},validate:(l,d,{limit:p},{name:f,operator:k,args:S})=>o.compare(Object.keys(l).length,p,k)?l:d.error("object."+f,{limit:S.limit,value:l}),args:[{name:"limit",ref:!0,assert:o.limit,message:"must be a positive integer"}]},max:{method(l){return this.$_addRule({name:"max",method:"length",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"length",args:{limit:l},operator:">="})}},nand:{method(...l){return o.verifyFlat(l,"nand"),i.dependency(this,"nand",null,l)}},or:{method(...l){return o.verifyFlat(l,"or"),i.dependency(this,"or",null,l)}},oxor:{method(...l){return i.dependency(this,"oxor",null,l)}},pattern:{method(l,d,p={}){const f=l instanceof RegExp;f||(l=this.$_compile(l,{appendPath:!0})),g(d!==void 0,"Invalid rule"),o.assertOptions(p,["fallthrough","matches"]),f&&g(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),d=this.$_compile(d,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const S={[f?"regex":"schema"]:l,rule:d};return p.matches&&(S.matches=this.$_compile(p.matches),S.matches.type!=="array"&&(S.matches=S.matches.$_root.array().items(S.matches)),k.$_mutateRegister(S.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),p.fallthrough&&(S.fallthrough=!0),k.$_terms.patterns.push(S),k.$_mutateRegister(d),k}},ref:{method(){return this.$_addRule("ref")},validate:(l,d)=>r.isRef(l)?l:d.error("object.refType",{value:l})},regex:{method(){return this.$_addRule("regex")},validate:(l,d)=>l instanceof RegExp?l:d.error("object.regex",{value:l})},rename:{method(l,d,p={}){g(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),g(typeof d=="string"||d instanceof c,"Invalid rename to argument"),g(d!==l,"Cannot rename key to same name:",l),o.assertOptions(p,["alias","ignoreUndefined","override","multiple"]);const f=this.clone();f.$_terms.renames=f.$_terms.renames||[];for(const k of f.$_terms.renames)g(k.from!==l,"Cannot rename the same key multiple times");return d instanceof c&&f.$_mutateRegister(d),f.$_terms.renames.push({from:l,to:d,options:s(i.renameDefaults,p)}),f}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,d,{type:p})=>!o.isSchema(l)||p!=="any"&&l.type!==p?d.error("object.schema",{type:p}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,d,p={}){return i.dependency(this,"with",l,d,p)}},without:{method(l,d,p={}){return i.dependency(this,"without",l,d,p)}},xor:{method(...l){return o.verifyFlat(l,"xor"),i.dependency(this,"xor",null,l)}}},overrides:{default(l,d){return l===void 0&&(l=o.symbols.deepDefault),this.$_parent("default",l,d)}},rebuild(l){if(l.$_terms.keys){const d=new u.Sorter;for(const p of l.$_terms.keys)o.tryWithPath(()=>d.add(p,{after:p.schema.$_rootReferences(),group:p.key}),p.key);l.$_terms.keys=new i.Keys(...d.nodes)}},manifest:{build(l,d){if(d.keys&&(l=l.keys(d.keys)),d.dependencies)for(const{rel:p,key:f=null,peers:k,options:S}of d.dependencies)l=i.dependency(l,p,f,k,S);if(d.patterns)for(const{regex:p,schema:f,rule:k,fallthrough:S,matches:h}of d.patterns)l=l.pattern(p||f,k,{fallthrough:S,matches:h});if(d.renames)for(const{from:p,to:f,options:k}of d.renames)l=l.rename(p,f,k);return l}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),i.clone=function(l,d){if(typeof l=="object"){if(d.nonEnumerables)return m(l,{shallow:!0});const f=Object.create(Object.getPrototypeOf(l));return Object.assign(f,l),f}const p=function(...f){return l.apply(this,f)};return p.prototype=m(l.prototype),Object.defineProperty(p,"name",{value:l.name,writable:!1}),Object.defineProperty(p,"length",{value:l.length,writable:!1}),Object.assign(p,l),p},i.dependency=function(l,d,p,f,k){g(p===null||typeof p=="string",d,"key must be a strings"),k||(k=f.length>1&&typeof f[f.length-1]=="object"?f.pop():{}),o.assertOptions(k,["separator","isPresent"]),f=[].concat(f);const S=o.default(k.separator,"."),h=[];for(const j of f)g(typeof j=="string",d,"peers must be strings"),h.push(a.ref(j,{separator:S,ancestor:0,prefix:!1}));p!==null&&(p=a.ref(p,{separator:S,ancestor:0,prefix:!1}));const b=l.clone();return b.$_terms.dependencies=b.$_terms.dependencies||[],b.$_terms.dependencies.push(new i.Dependency(d,p,h,f,k)),b},i.dependencies={and(l,d,p,f,k){const S=[],h=[],b=d.peers.length,j=i.isPresent(d.options);for(const w of d.peers)j(w.resolve(p,f,k,null,{shadow:!1}))===!1?S.push(w.key):h.push(w.key);if(S.length!==b&&h.length!==b)return{code:"object.and",context:{present:h,presentWithLabels:i.keysToLabels(l,h),missing:S,missingWithLabels:i.keysToLabels(l,S)}}},nand(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const w of d.peers)h(w.resolve(p,f,k,null,{shadow:!1}))&&S.push(w.key);if(S.length!==d.peers.length)return;const b=d.paths[0],j=d.paths.slice(1);return{code:"object.nand",context:{main:b,mainWithLabel:i.keysToLabels(l,b),peers:j,peersWithLabels:i.keysToLabels(l,j)}}},or(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)}}},oxor(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const j of d.peers)h(j.resolve(p,f,k,null,{shadow:!1}))&&S.push(j.key);if(!S.length||S.length===1)return;const b={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return b.present=S,b.presentWithLabels=i.keysToLabels(l,S),{code:"object.oxor",context:b}},with(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:i.keysToLabels(l,h.key)}}},without(l,d,p,f,k){const S=i.isPresent(d.options);for(const h of d.peers)if(S(h.resolve(p,f,k,null,{shadow:!1})))return{code:"object.without",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:i.keysToLabels(l,h.key)}}},xor(l,d,p,f,k){const S=[],h=i.isPresent(d.options);for(const j of d.peers)h(j.resolve(p,f,k,null,{shadow:!1}))&&S.push(j.key);if(S.length===1)return;const b={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return S.length===0?{code:"object.missing",context:b}:(b.present=S,b.presentWithLabels=i.keysToLabels(l,S),{code:"object.xor",context:b})}},i.keysToLabels=function(l,d){return Array.isArray(d)?d.map(p=>l.$_mapLabels(p)):l.$_mapLabels(d)},i.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:d=>d!==void 0},i.rename=function(l,d,p,f,k){const S={};for(const h of l.$_terms.renames){const b=[],j=typeof h.from!="string";if(j)for(const w in d){if(d[w]===void 0&&h.options.ignoreUndefined||w===h.to)continue;const O=h.from.exec(w);O&&b.push({from:w,to:h.to,match:O})}else!Object.prototype.hasOwnProperty.call(d,h.from)||d[h.from]===void 0&&h.options.ignoreUndefined||b.push(h);for(const w of b){const O=w.from;let $=w.to;if($ instanceof c&&($=$.render(d,p,f,w.match)),O!==$){if(!h.options.multiple&&S[$]&&(k.push(l.$_createError("object.rename.multiple",d,{from:O,to:$,pattern:j},p,f)),f.abortEarly)||Object.prototype.hasOwnProperty.call(d,$)&&!h.options.override&&!S[$]&&(k.push(l.$_createError("object.rename.override",d,{from:O,to:$,pattern:j},p,f)),f.abortEarly))return!1;d[O]===void 0?delete d[$]:d[$]=d[O],S[$]=!0,h.options.alias||delete d[O]}}}return!0},i.unknown=function(l,d,p,f,k,S){if(l.$_terms.patterns){let h=!1;const b=l.$_terms.patterns.map(w=>{if(w.matches)return h=!0,[]}),j=[d,...k.ancestors];for(const w of p){const O=d[w],$=[...k.path,w];for(let I=0;I<l.$_terms.patterns.length;++I){const q=l.$_terms.patterns[I];if(q.regex){const F=q.regex.test(w);if(k.mainstay.tracer.debug(k,"rule",`pattern.${I}`,F?"pass":"error"),!F)continue}else if(!q.schema.$_match(w,k.nest(q.schema,`pattern.${I}`),S))continue;p.delete(w);const Z=k.localize($,j,{schema:q.rule,key:w}),K=q.rule.$_validate(O,Z,S);if(K.errors){if(S.abortEarly)return{value:d,errors:K.errors};f.push(...K.errors)}if(q.matches&&b[I].push(w),d[w]=K.value,!q.fallthrough)break}}if(h)for(let w=0;w<b.length;++w){const O=b[w];if(!O)continue;const $=l.$_terms.patterns[w].matches,I=k.localize(k.path,j,$),q=$.$_validate(O,I,S);if(q.errors){const Z=n.details(q.errors,{override:!1});Z.matches=O;const K=l.$_createError("object.pattern.match",d,Z,k,S);if(S.abortEarly)return{value:d,errors:K};f.push(K)}}}if(p.size&&(l.$_terms.keys||l.$_terms.patterns)){if(S.stripUnknown&&l._flags.unknown===void 0||S.skipFunctions){const h=!(!S.stripUnknown||S.stripUnknown!==!0&&!S.stripUnknown.objects);for(const b of p)h?(delete d[b],p.delete(b)):typeof d[b]=="function"&&p.delete(b)}if(!o.default(l._flags.unknown,S.allowUnknown))for(const h of p){const b=k.localize([...k.path,h],[]),j=l.$_createError("object.unknown",d[h],{child:h},b,S,{flags:!1});if(S.abortEarly)return{value:d,errors:j};f.push(j)}}},i.Dependency=class{constructor(l,d,p,f,k){this.rel=l,this.key=d,this.peers=p,this.paths=f,this.options=k}describe(){const l={rel:this.rel,peers:this.paths};return this.key!==null&&(l.key=this.key.key),this.peers[0].separator!=="."&&(l.options={...l.options,separator:this.peers[0].separator}),this.options.isPresent&&(l.options={...l.options,isPresent:this.options.isPresent}),l}},i.Keys=class extends Array{concat(l){const d=this.slice(),p=new Map;for(let f=0;f<d.length;++f)p.set(d[f].key,f);for(const f of l){const k=f.key,S=p.get(k);S!==void 0?d[S]={key:k,schema:d[S].schema.concat(f.schema)}:d.push(f)}return d}}},8785:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u=y(3292),t=y(6354),o={};_.exports=g.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(a,n)=>a.ref(n),validate(a,{schema:n,state:r,prefs:c}){s(n.$_terms.link,"Uninitialized link schema");const i=o.generate(n,a,r,c),l=n.$_terms.link[0].ref;return i.$_validate(a,r.nest(i,`link:${l.display}:${i.type}`),c)},generate:(a,n,r,c)=>o.generate(a,n,r,c),rules:{ref:{method(a){s(!this.$_terms.link,"Cannot reinitialize schema"),a=u.ref(a),s(a.type==="value"||a.type==="local","Invalid reference type:",a.type),s(a.type==="local"||a.ancestor==="root"||a.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:a}],n}},relative:{method(a=!0){return this.$_setFlag("relative",a)}}},overrides:{concat(a){s(this.$_terms.link,"Uninitialized link schema"),s(m.isSchema(a),"Invalid schema object"),s(a.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:a}),n.$_mutateRebuild()}},manifest:{build:(a,n)=>(s(n.link,"Invalid link description missing link"),a.ref(n.link))}}),o.generate=function(a,n,r,c){let i=r.mainstay.links.get(a);if(i)return i._generate(n,r,c).schema;const l=a.$_terms.link[0].ref,{perspective:d,path:p}=o.perspective(l,r);o.assert(d,"which is outside of schema boundaries",l,a,r,c);try{i=p.length?d.$_reach(p):d}catch{o.assert(!1,"to non-existing schema",l,a,r,c)}return o.assert(i.type!=="link","which is another link",l,a,r,c),a._flags.relative||r.mainstay.links.set(a,i),i._generate(n,r,c).schema},o.perspective=function(a,n){if(a.type==="local"){for(const{schema:r,key:c}of n.schemas){if((r._flags.id||c)===a.path[0])return{perspective:r,path:a.path.slice(1)};if(r.$_terms.shared){for(const i of r.$_terms.shared)if(i._flags.id===a.path[0])return{perspective:i,path:a.path.slice(1)}}}return{perspective:null,path:null}}return a.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:a.path}:{perspective:n.schemas[a.ancestor]&&n.schemas[a.ancestor].schema,path:a.path}},o.assert=function(a,n,r,c,i,l){a||s(!1,`"${t.label(c._flags,i,l)}" contains link reference "${r.display}" ${n}`)}},3832:(_,x,y)=>{const s=y(375),g=y(8068),m=y(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const o=t.toString(),a=o.indexOf("."),n=o.indexOf("e");return(a<0?0:(n<0?o.length:n)-a-1)+(n<0?0:Math.max(0,-parseInt(o.slice(n+1))))}};_.exports=g.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:o,error:a}){if(!t.match(u.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!o._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(n.value)))return n.errors=a("number.unsafe"),n}else{const r=n.value.toString();if(r.match(/e/i))return n;if(r!==u.normalizeDecimal(t))return n.errors=a("number.unsafe"),n}return n}},validate(t,{schema:o,error:a,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:a("number.infinity")};if(!m.isNumber(t))return{value:t,errors:a("number.base")};const r={value:t};if(n.convert){const c=o.$_getRule("precision");if(c){const i=Math.pow(10,c.args.limit);r.value=Math.round(r.value*i)/i}}return r.value===0&&(r.value=0),!o._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(r.errors=a("number.unsafe")),r},rules:{compare:{method:!1,validate:(t,o,{limit:a},{name:n,operator:r,args:c})=>m.compare(t,a,r)?t:o.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:m.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,o)=>Math.trunc(t)-t==0?t:o.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const o=typeof t=="number"?u.decimalPlaces(t):null,a=Math.pow(10,o);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:o,pfactor:a}})},validate:(t,o,{base:a,baseDecimalPlace:n,pfactor:r},c)=>u.decimalPlaces(t)>n?o.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(r*t)%Math.round(r*a)==0?t:o.error("number.multiple",{multiple:c.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,o)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:o.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return s(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,o,{limit:a}){const n=t.toString().match(u.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=a?t:o.error("number.precision",{limit:a,value:t})},convert:!0},sign:{method(t){return s(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,o,{sign:a})=>a==="negative"&&t<0||a==="positive"&&t>0?t:o.error(`number.${a}`)},unsafe:{method(t=!0){return s(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,o)=>t.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(t){return t.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(_,x,y)=>{const s=y(7824);_.exports=s.extend({type:"object",cast:{map:{from:g=>g&&typeof g=="object",to:(g,m)=>new Map(Object.entries(g))}}})},7417:(_,x,y)=>{const s=y(375),g=y(5380),m=y(1745),u=y(9959),t=y(6064),o=y(9926),a=y(5752),n=y(8068),r=y(8160),c={tlds:o instanceof Set&&{tlds:{allow:o,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:u.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};_.exports=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(i,{schema:l,state:d,prefs:p}){const f=l.$_getRule("normalize");f&&(i=i.normalize(f.args.form));const k=l.$_getRule("case");k&&(i=k.args.direction==="upper"?i.toLocaleUpperCase():i.toLocaleLowerCase());const S=l.$_getRule("trim");if(S&&S.args.enabled&&(i=i.trim()),l.$_terms.replacements)for(const b of l.$_terms.replacements)i=i.replace(b.pattern,b.replacement);const h=l.$_getRule("hex");if(h&&h.args.options.byteAligned&&i.length%2!=0&&(i=`0${i}`),l.$_getRule("isoDate")){const b=c.isoDate(i);b&&(i=b)}if(l._flags.truncate){const b=l.$_getRule("max");if(b){let j=b.args.limit;if(r.isResolvable(j)&&(j=j.resolve(i,d,p),!r.limit(j)))return{value:i,errors:l.$_createError("any.ref",j,{ref:b.args.limit,arg:"limit",reason:"must be a positive integer"},d,p)};i=i.slice(0,j)}}return{value:i}}},validate(i,{schema:l,error:d}){if(typeof i!="string")return{value:i,errors:d("string.base")};if(i===""){const p=l.$_getRule("min");return p&&p.args.limit===0?void 0:{value:i,errors:d("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(i,l)=>/^[a-zA-Z0-9]+$/.test(i)?i:l.error("string.alphanum")},base64:{method(i={}){return r.assertOptions(i,["paddingRequired","urlSafe"]),i={urlSafe:!1,paddingRequired:!0,...i},s(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),s(typeof i.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:i}})},validate:(i,l,{options:d})=>c.base64Regex[d.paddingRequired][d.urlSafe].test(i)?i:l.error("string.base64")},case:{method(i){return s(["lower","upper"].includes(i),"Invalid case:",i),this.$_addRule({name:"case",args:{direction:i}})},validate:(i,l,{direction:d})=>d==="lower"&&i===i.toLocaleLowerCase()||d==="upper"&&i===i.toLocaleUpperCase()?i:l.error(`string.${d}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(i,l){let d=i.length,p=0,f=1;for(;d--;){const k=i.charAt(d)*f;p+=k-9*(k>9),f^=3}return p>0&&p%10==0?i:l.error("string.creditCard")}},dataUri:{method(i={}){return r.assertOptions(i,["paddingRequired"]),i={paddingRequired:!0,...i},s(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:i}})},validate(i,l,{options:d}){const p=i.match(c.dataUriRegex);return p&&(!p[2]||p[2]!=="base64"||c.base64Regex[d.paddingRequired].false.test(p[3]))?i:l.error("string.dataUri")}},domain:{method(i){i&&r.assertOptions(i,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(i);return this.$_addRule({name:"domain",args:{options:i},address:l})},validate:(i,l,d,{address:p})=>g.isValid(i,p)?i:l.error("string.domain")},email:{method(i={}){r.assertOptions(i,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),s(i.multiple===void 0||typeof i.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(i),d=new RegExp(`\\s*[${i.separator?t(i.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:i},regex:d,address:l})},validate(i,l,{options:d},{regex:p,address:f}){const k=d.multiple?i.split(p):[i],S=[];for(const h of k)m.isValid(h,f)||S.push(h);return S.length?l.error("string.email",{value:i,invalids:S}):i}},guid:{alias:"uuid",method(i={}){r.assertOptions(i,["version","separator"]);let l="";if(i.version){const f=[].concat(i.version);s(f.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let S=0;S<f.length;++S){const h=f[S];s(typeof h=="string","version at position "+S+" must be a string");const b=c.guidVersions[h.toLowerCase()];s(b,"version at position "+S+" must be one of "+Object.keys(c.guidVersions).join(", ")),s(!k.has(b),"version at position "+S+" must not be a duplicate"),l+=b,k.add(b)}}s(c.guidSeparators.has(i.separator),'separator must be one of true, false, "-", or ":"');const d=i.separator===void 0?"[:-]?":i.separator===!0?"[:-]":i.separator===!1?"[]?":`\\${i.separator}`,p=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${d})[0-9A-F]{4}\\2?[${l||"0-9A-F"}][0-9A-F]{3}\\2?[${l?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:i},regex:p})},validate(i,l,d,{regex:p}){const f=p.exec(i);return f?c.guidBrackets[f[1]]!==f[f.length-1]?l.error("string.guid"):i:l.error("string.guid")}},hex:{method(i={}){return r.assertOptions(i,["byteAligned","prefix"]),i={byteAligned:!1,prefix:!1,...i},s(typeof i.byteAligned=="boolean","byteAligned must be boolean"),s(typeof i.prefix=="boolean"||i.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:i}})},validate:(i,l,{options:d})=>(d.prefix==="optional"?c.hexRegex.withOptionalPrefix:d.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(i)?d.byteAligned&&i.length%2!=0?l.error("string.hexAlign"):i:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(i,l)=>g.isValid(i,{minDomainSegments:1})||c.ipRegex.test(i)?i:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(i={}){r.assertOptions(i,["cidr","version"]);const{cidr:l,versions:d,regex:p}=u.regex(i),f=i.version?d:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:f}},regex:p})},validate:(i,l,{options:d},{regex:p})=>p.test(i)?i:d.version?l.error("string.ipVersion",{value:i,cidr:d.cidr,version:d.version}):l.error("string.ip",{value:i,cidr:d.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(i,{error:l})=>c.isoDate(i)?i:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(i,l)=>c.isoDurationRegex.test(i)?i:l.error("string.isoDuration")},length:{method(i,l){return c.length(this,"length",i,"=",l)},validate(i,l,{limit:d,encoding:p},{name:f,operator:k,args:S}){const h=!p&&i.length;return r.compare(h,d,k)?i:l.error("string."+f,{limit:S.limit,value:i,encoding:p})},args:[{name:"limit",ref:!0,assert:r.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(i,l){return c.length(this,"max",i,"<=",l)},args:["limit","encoding"]},min:{method(i,l){return c.length(this,"min",i,">=",l)},args:["limit","encoding"]},normalize:{method(i="NFC"){return s(c.normalizationForms.includes(i),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:i}})},validate:(i,{error:l},{form:d})=>i===i.normalize(d)?i:l("string.normalize",{value:i,form:d}),convert:!0},pattern:{alias:"regex",method(i,l={}){s(i instanceof RegExp,"regex must be a RegExp"),s(!i.flags.includes("g")&&!i.flags.includes("y"),"regex should not use global or sticky mode"),typeof l=="string"&&(l={name:l}),r.assertOptions(l,["invert","name"]);const d=["string.pattern",l.invert?".invert":"",l.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:i,options:l},errorCode:d})},validate:(i,l,{regex:d,options:p},{errorCode:f})=>d.test(i)^p.invert?i:l.error(f,{name:p.name,regex:d,value:i}),args:["regex","options"],multi:!0},replace:{method(i,l){typeof i=="string"&&(i=new RegExp(t(i),"g")),s(i instanceof RegExp,"pattern must be a RegExp"),s(typeof l=="string","replacement must be a String");const d=this.clone();return d.$_terms.replacements||(d.$_terms.replacements=[]),d.$_terms.replacements.push({pattern:i,replacement:l}),d}},token:{method(){return this.$_addRule("token")},validate:(i,l)=>/^\w+$/.test(i)?i:l.error("string.token")},trim:{method(i=!0){return s(typeof i=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:i}})},validate:(i,l,{enabled:d})=>d&&i!==i.trim()?l.error("string.trim"):i,convert:!0},truncate:{method(i=!0){return s(typeof i=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",i)}},uppercase:{method(){return this.case("upper")}},uri:{method(i={}){r.assertOptions(i,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),i.domain&&r.assertOptions(i.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:d}=a.regex(i),p=i.domain?c.addressOptions(i.domain):null;return this.$_addRule({name:"uri",args:{options:i},regex:l,domain:p,scheme:d})},validate(i,l,{options:d},{regex:p,domain:f,scheme:k}){if(["http:/","https:/"].includes(i))return l.error("string.uri");let S=p.exec(i);if(!S&&l.prefs.convert&&d.encodeUri){const h=encodeURI(i);S=p.exec(h),S&&(i=h)}if(S){const h=S[1]||S[2];return!f||d.allowRelative&&!h||g.isValid(h,f)?i:l.error("string.domain",{value:h})}return d.relativeOnly?l.error("string.uriRelativeOnly"):d.scheme?l.error("string.uriCustomScheme",{scheme:k,value:i}):l.error("string.uri")}}},manifest:{build(i,l){if(l.replacements)for(const{pattern:d,replacement:p}of l.replacements)i=i.replace(d,p);return i}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(i){if(!i)return c.tlds||i;if(s(i.minDomainSegments===void 0||Number.isSafeInteger(i.minDomainSegments)&&i.minDomainSegments>0,"minDomainSegments must be a positive integer"),s(i.maxDomainSegments===void 0||Number.isSafeInteger(i.maxDomainSegments)&&i.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),i.tlds===!1)return i;if(i.tlds===!0||i.tlds===void 0)return s(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds);s(typeof i.tlds=="object","tlds must be true, false, or an object");const l=i.tlds.deny;if(l)return Array.isArray(l)&&(i=Object.assign({},i,{tlds:{deny:new Set(l)}})),s(i.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),s(!i.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(i.tlds.deny,"tlds.deny"),i;const d=i.tlds.allow;return d?d===!0?(s(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds)):(Array.isArray(d)&&(i=Object.assign({},i,{tlds:{allow:new Set(d)}})),s(i.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(i.tlds.allow,"tlds.allow"),i):i},c.validateTlds=function(i,l){for(const d of i)s(g.isValid(d,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(i){if(!r.isIsoDate(i))return null;/.*T.*[+-]\d\d$/.test(i)&&(i+="00");const l=new Date(i);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(i,l,d,p,f){return s(!f||!1,"Invalid encoding:",f),i.$_addRule({name:l,method:"length",args:{limit:d,encoding:f},operator:p})}},8826:(_,x,y)=>{const s=y(375),g=y(8068),m={};m.Map=class extends Map{slice(){return new m.Map(this)}},_.exports=g.extend({type:"symbol",terms:{map:{init:new m.Map}},coerce:{method(u,{schema:t,error:o}){const a=t.$_terms.map.get(u);return a&&(u=a),t._flags.only&&typeof u!="symbol"?{value:u,errors:o("symbol.map",{map:t.$_terms.map})}:{value:u}}},validate(u,{error:t}){if(typeof u!="symbol")return{value:u,errors:t("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),s(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),o=[];for(const a of u){s(a&&a[Symbol.iterator],"Entry must be an iterable");const[n,r]=a;s(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),s(typeof r=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,r),o.push(r)}return t.valid(...o)}}},manifest:{build:(u,t)=>(t.map&&(u=u.map(t.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,x,y)=>{const s=y(375),g=y(8571),m=y(738),u=y(9621),t=y(8160),o=y(6354),a=y(493),n={result:Symbol("result")};x.entry=function(r,c,i){let l=t.defaults;i&&(s(i.warnings===void 0,"Cannot override warnings preference in synchronous validation"),s(i.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=t.preferences(t.defaults,i));const d=n.entry(r,c,l);s(!d.mainstay.externals.length,"Schema with external rules must use validateAsync()");const p={value:d.value};return d.error&&(p.error=d.error),d.mainstay.warnings.length&&(p.warning=o.details(d.mainstay.warnings)),d.mainstay.debug&&(p.debug=d.mainstay.debug),d.mainstay.artifacts&&(p.artifacts=d.mainstay.artifacts),p},x.entryAsync=async function(r,c,i){let l=t.defaults;i&&(l=t.preferences(t.defaults,i));const d=n.entry(r,c,l),p=d.mainstay;if(d.error)throw p.debug&&(d.error.debug=p.debug),d.error;if(p.externals.length){let k=d.value;const S=[];for(const h of p.externals){const b=h.state.path,j=h.schema.type==="link"?p.links.get(h.schema):null;let w,O,$=k;const I=b.length?[k]:[],q=b.length?u(r,b):r;if(b.length){w=b[b.length-1];let Z=k;for(const K of b.slice(0,-1))Z=Z[K],I.unshift(Z);O=I[0],$=O[w]}try{const Z=(F,L)=>(j||h.schema).$_createError(F,$,L,h.state,l),K=await h.method($,{schema:h.schema,linked:j,state:h.state,prefs:i,original:q,error:Z,errorsArray:n.errorsArray,warn:(F,L)=>p.warnings.push((j||h.schema).$_createError(F,$,L,h.state,l)),message:(F,L)=>(j||h.schema).$_createError("external",$,L,h.state,l,{messages:F})});if(K===void 0||K===$)continue;if(K instanceof o.Report){if(p.tracer.log(h.schema,h.state,"rule","external","error"),S.push(K),l.abortEarly)break;continue}if(Array.isArray(K)&&K[t.symbols.errors]){if(p.tracer.log(h.schema,h.state,"rule","external","error"),S.push(...K),l.abortEarly)break;continue}O?(p.tracer.value(h.state,"rule",$,K,"external"),O[w]=K):(p.tracer.value(h.state,"rule",k,K,"external"),k=K)}catch(Z){throw l.errors.label&&(Z.message+=` (${h.label})`),Z}}if(d.value=k,S.length)throw d.error=o.process(S,r,l),p.debug&&(d.error.debug=p.debug),d.error}if(!l.warnings&&!l.debug&&!l.artifacts)return d.value;const f={value:d.value};return p.warnings.length&&(f.warning=o.details(p.warnings)),p.debug&&(f.debug=p.debug),p.artifacts&&(f.artifacts=p.artifacts),f},n.Mainstay=class{constructor(r,c,i){this.externals=[],this.warnings=[],this.tracer=r,this.debug=c,this.links=i,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const r=this._snapshots.pop();this.externals=r.externals,this.warnings=r.warnings}commit(){this._snapshots.pop()}},n.entry=function(r,c,i){const{tracer:l,cleanup:d}=n.tracer(c,i),p=i.debug?[]:null,f=c._ids._schemaChain?new Map:null,k=new n.Mainstay(l,p,f),S=c._ids._schemaChain?[{schema:c}]:null,h=new a([],[],{mainstay:k,schemas:S}),b=x.validate(r,c,h,i);d&&c.$_root.untrace();const j=o.process(b.errors,r,i);return{value:b.value,error:j,mainstay:k}},n.tracer=function(r,c){return r.$_root._tracer?{tracer:r.$_root._tracer._register(r)}:c.debug?(s(r.$_root.trace,"Debug mode not supported"),{tracer:r.$_root.trace()._register(r),cleanup:!0}):{tracer:n.ignore}},x.validate=function(r,c,i,l,d={}){if(c.$_terms.whens&&(c=c._generate(r,i,l).schema),c._preferences&&(l=n.prefs(c,l)),c._cache&&l.cache){const j=c._cache.get(r);if(i.mainstay.tracer.debug(i,"validate","cached",!!j),j)return j}const p=(j,w,O)=>c.$_createError(j,r,w,O||i,l),f={original:r,prefs:l,schema:c,state:i,error:p,errorsArray:n.errorsArray,warn:(j,w,O)=>i.mainstay.warnings.push(p(j,w,O)),message:(j,w)=>c.$_createError("custom",r,w,i,l,{messages:j})};i.mainstay.tracer.entry(c,i);const k=c._definition;if(k.prepare&&r!==void 0&&l.convert){const j=k.prepare(r,f);if(j){if(i.mainstay.tracer.value(i,"prepare",r,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),f);r=j.value}}if(k.coerce&&r!==void 0&&l.convert&&(!k.coerce.from||k.coerce.from.includes(typeof r))){const j=k.coerce.method(r,f);if(j){if(i.mainstay.tracer.value(i,"coerced",r,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),f);r=j.value}}const S=c._flags.empty;S&&S.$_match(n.trim(r,c),i.nest(S),t.defaults)&&(i.mainstay.tracer.value(i,"empty",r,void 0),r=void 0);const h=d.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(r===void 0){if(h==="forbidden")return n.finalize(r,null,f);if(h==="required")return n.finalize(r,[c.$_createError("any.required",r,null,i,l)],f);if(h==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(r,null,f);i.mainstay.tracer.value(i,"default",r,{}),r={}}}else if(h==="forbidden")return n.finalize(r,[c.$_createError("any.unknown",r,null,i,l)],f);const b=[];if(c._valids){const j=c._valids.get(r,i,l,c._flags.insensitive);if(j)return l.convert&&(i.mainstay.tracer.value(i,"valids",r,j.value),r=j.value),i.mainstay.tracer.filter(c,i,"valid",j),n.finalize(r,null,f);if(c._flags.only){const w=c.$_createError("any.only",r,{valids:c._valids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(r,[w],f);b.push(w)}}if(c._invalids){const j=c._invalids.get(r,i,l,c._flags.insensitive);if(j){i.mainstay.tracer.filter(c,i,"invalid",j);const w=c.$_createError("any.invalid",r,{invalids:c._invalids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(r,[w],f);b.push(w)}}if(k.validate){const j=k.validate(r,f);if(j&&(i.mainstay.tracer.value(i,"base",r,j.value),r=j.value,j.errors)){if(!Array.isArray(j.errors))return b.push(j.errors),n.finalize(r,b,f);if(j.errors.length)return b.push(...j.errors),n.finalize(r,b,f)}}return c._rules.length?n.rules(r,b,f):n.finalize(r,b,f)},n.rules=function(r,c,i){const{schema:l,state:d,prefs:p}=i;for(const f of l._rules){const k=l._definition.rules[f.method];if(k.convert&&p.convert){d.mainstay.tracer.log(l,d,"rule",f.name,"full");continue}let S,h=f.args;if(f._resolve.length){h=Object.assign({},h);for(const j of f._resolve){const w=k.argsByName.get(j),O=h[j].resolve(r,d,p),$=w.normalize?w.normalize(O):O,I=t.validateArg($,null,w);if(I){S=l.$_createError("any.ref",O,{arg:j,ref:h[j],reason:I},d,p);break}h[j]=$}}S=S||k.validate(r,i,h,f);const b=n.rule(S,f);if(b.errors){if(d.mainstay.tracer.log(l,d,"rule",f.name,"error"),f.warn){d.mainstay.warnings.push(...b.errors);continue}if(p.abortEarly)return n.finalize(r,b.errors,i);c.push(...b.errors)}else d.mainstay.tracer.log(l,d,"rule",f.name,"pass"),d.mainstay.tracer.value(d,"rule",r,b.value,f.name),r=b.value}return n.finalize(r,c,i)},n.rule=function(r,c){return r instanceof o.Report?(n.error(r,c),{errors:[r],value:null}):Array.isArray(r)&&r[t.symbols.errors]?(r.forEach(i=>n.error(i,c)),{errors:r,value:null}):{errors:null,value:r}},n.error=function(r,c){return c.message&&r._setTemplate(c.message),r},n.finalize=function(r,c,i){c=c||[];const{schema:l,state:d,prefs:p}=i;if(c.length){const k=n.default("failover",void 0,c,i);k!==void 0&&(d.mainstay.tracer.value(d,"failover",r,k),r=k,c=[])}if(c.length&&l._flags.error)if(typeof l._flags.error=="function"){c=l._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)s(k instanceof Error||k instanceof o.Report,"error() must return an Error object")}else c=[l._flags.error];if(r===void 0){const k=n.default("default",r,c,i);d.mainstay.tracer.value(d,"default",r,k),r=k}if(l._flags.cast&&r!==void 0){const k=l._definition.cast[l._flags.cast];if(k.from(r)){const S=k.to(r,i);d.mainstay.tracer.value(d,"cast",r,S,l._flags.cast),r=S}}if(l.$_terms.externals&&p.externals&&p._externals!==!1)for(const{method:k}of l.$_terms.externals)d.mainstay.externals.push({method:k,schema:l,state:d,label:o.label(l._flags,d,p)});const f={value:r,errors:c.length?c:null};return l._flags.result&&(f.value=l._flags.result==="strip"?void 0:i.original,d.mainstay.tracer.value(d,l._flags.result,r,f.value),d.shadow(r,l._flags.result)),l._cache&&p.cache!==!1&&!l._refs.length&&l._cache.set(i.original,f),r===void 0||f.errors||l._flags.artifact===void 0||(d.mainstay.artifacts=d.mainstay.artifacts||new Map,d.mainstay.artifacts.has(l._flags.artifact)||d.mainstay.artifacts.set(l._flags.artifact,[]),d.mainstay.artifacts.get(l._flags.artifact).push(d.path)),f},n.prefs=function(r,c){const i=c===t.defaults;return i&&r._preferences[t.symbols.prefs]?r._preferences[t.symbols.prefs]:(c=t.preferences(c,r._preferences),i&&(r._preferences[t.symbols.prefs]=c),c)},n.default=function(r,c,i,l){const{schema:d,state:p,prefs:f}=l,k=d._flags[r];if(f.noDefaults||k===void 0)return c;if(p.mainstay.tracer.log(d,p,"rule",r,"full"),!k)return k;if(typeof k=="function"){const S=k.length?[g(p.ancestors[0]),l]:[];try{return k(...S)}catch(h){return void i.push(d.$_createError(`any.${r}`,null,{error:h},p,f))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,p,f):g(k)},n.trim=function(r,c){if(typeof r!="string")return r;const i=c.$_getRule("trim");return i&&i.args.enabled?r.trim():r},n.ignore={active:!1,debug:m,entry:m,filter:m,log:m,resolve:m,value:m},n.errorsArray=function(){const r=[];return r[t.symbols.errors]=!0,r}},2036:(_,x,y)=>{const s=y(375),g=y(9474),m=y(8160),u={};_.exports=u.Values=class{constructor(t,o){this._values=new Set(t),this._refs=new Set(o),this._lowercase=u.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,o){m.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),o&&o.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,o,a){if(t=t||new u.Values,o){if(o._override)return o.clone();for(const n of[...o._values,...o._refs])t.add(n)}if(a)for(const n of[...a._values,...a._refs])t.remove(n);return t.length?t:null}remove(t){m.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,o,a,n){return!!this.get(t,o,a,n)}get(t,o,a,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const r=this._lowercase.get(t.toLowerCase());if(r)return{value:r}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const r of this._values)if(g(r,t))return{value:r}}if(o)for(const r of this._refs){const c=r.resolve(t,o,a,null,{in:!0});if(c===void 0)continue;const i=r.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of i)if(typeof l==typeof t){if(n&&t&&typeof t=="string"){if(l.toLowerCase()===t.toLowerCase())return{value:l,ref:r}}else if(g(l,t))return{value:l,ref:r}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const o=[];for(const a of[...this._values,...this._refs])a!==void 0&&o.push(a);return o}return Array.from([...this._values,...this._refs])}clone(){const t=new u.Values(this._values,this._refs);return t._override=this._override,t}concat(t){s(!t._override,"Cannot concat override set of values");const o=new u.Values([...this._values,...t._values],[...this._refs,...t._refs]);return o._override=this._override,o}describe(){const t=[];this._override&&t.push({override:!0});for(const o of this._values.values())t.push(o&&typeof o=="object"?{value:o}:o);for(const o of this._refs.values())t.push(o.describe());return t}},u.Values.prototype[m.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(t){const o=new Map;if(t)for(const a of t)typeof a=="string"&&o.set(a.toLowerCase(),a);return o}},978:(_,x,y)=>{const s=y(375),g=y(8571),m=y(1687),u=y(9621),t={};_.exports=function(o,a,n={}){if(s(o&&typeof o=="object","Invalid defaults value: must be an object"),s(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),s(typeof n=="object","Invalid options: must be an object"),!a)return null;if(n.shallow)return t.applyToDefaultsWithShallow(o,a,n);const r=g(o);if(a===!0)return r;const c=n.nullOverride!==void 0&&n.nullOverride;return m(r,a,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(o,a,n){const r=n.shallow;s(Array.isArray(r),"Invalid keys");const c=new Map,i=a===!0?null:new Set;for(let p of r){p=Array.isArray(p)?p:p.split(".");const f=u(o,p);f&&typeof f=="object"?c.set(f,i&&u(a,p)||f):i&&i.add(p)}const l=g(o,{},c);if(!i)return l;for(const p of i)t.reachCopy(l,a,p);const d=n.nullOverride!==void 0&&n.nullOverride;return m(l,a,{nullOverride:d,mergeArrays:!1})},t.reachCopy=function(o,a,n){for(const i of n){if(!(i in a))return;const l=a[i];if(typeof l!="object"||l===null)return;a=l}const r=a;let c=o;for(let i=0;i<n.length-1;++i){const l=n[i];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[n[n.length-1]]=r}},375:(_,x,y)=>{const s=y(7916);_.exports=function(g,...m){if(!g)throw m.length===1&&m[0]instanceof Error?m[0]:new s(m)}},8571:(_,x,y)=>{const s=y(9621),g=y(4277),m=y(7043),u={needsProtoHack:new Set([g.set,g.map,g.weakSet,g.weakMap])};_.exports=u.clone=function(t,o={},a=null){if(typeof t!="object"||t===null)return t;let n=u.clone,r=a;if(o.shallow){if(o.shallow!==!0)return u.cloneWithShallow(t,o);n=d=>d}else if(r){const d=r.get(t);if(d)return d}else r=new Map;const c=g.getInternalProto(t);if(c===g.buffer)return!1;if(c===g.date)return new Date(t.getTime());if(c===g.regex)return new RegExp(t);const i=u.base(t,c,o);if(i===t)return t;if(r&&r.set(t,i),c===g.set)for(const d of t)i.add(n(d,o,r));else if(c===g.map)for(const[d,p]of t)i.set(d,n(p,o,r));const l=m.keys(t,o);for(const d of l){if(d==="__proto__")continue;if(c===g.array&&d==="length"){i.length=t.length;continue}const p=Object.getOwnPropertyDescriptor(t,d);p?p.get||p.set?Object.defineProperty(i,d,p):p.enumerable?i[d]=n(t[d],o,r):Object.defineProperty(i,d,{enumerable:!1,writable:!0,configurable:!0,value:n(t[d],o,r)}):Object.defineProperty(i,d,{enumerable:!0,writable:!0,configurable:!0,value:n(t[d],o,r)})}return i},u.cloneWithShallow=function(t,o){const a=o.shallow;(o=Object.assign({},o)).shallow=!1;const n=new Map;for(const r of a){const c=s(t,r);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return u.clone(t,o,n)},u.base=function(t,o,a){if(a.prototype===!1)return u.needsProtoHack.has(o)?new o.constructor:o===g.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(o===g.array){const r=[];return n!==o&&Object.setPrototypeOf(r,n),r}if(u.needsProtoHack.has(o)){const r=new n.constructor;return n!==o&&Object.setPrototypeOf(r,n),r}return Object.create(n)}},9474:(_,x,y)=>{const s=y(4277),g={mismatched:null};_.exports=function(m,u,t){return t=Object.assign({prototype:!0},t),!!g.isDeepEqual(m,u,t,[])},g.isDeepEqual=function(m,u,t,o){if(m===u)return m!==0||1/m==1/u;const a=typeof m;if(a!==typeof u||m===null||u===null)return!1;if(a==="function"){if(!t.deepFunction||m.toString()!==u.toString())return!1}else if(a!=="object")return m!=m&&u!=u;const n=g.getSharedType(m,u,!!t.prototype);switch(n){case s.buffer:return!1;case s.promise:return m===u;case s.regex:return m.toString()===u.toString();case g.mismatched:return!1}for(let r=o.length-1;r>=0;--r)if(o[r].isSame(m,u))return!0;o.push(new g.SeenEntry(m,u));try{return!!g.isDeepEqualObj(n,m,u,t,o)}finally{o.pop()}},g.getSharedType=function(m,u,t){if(t)return Object.getPrototypeOf(m)!==Object.getPrototypeOf(u)?g.mismatched:s.getInternalProto(m);const o=s.getInternalProto(m);return o!==s.getInternalProto(u)?g.mismatched:o},g.valueOf=function(m){const u=m.valueOf;if(u===void 0)return m;try{return u.call(m)}catch(t){return t}},g.hasOwnEnumerableProperty=function(m,u){return Object.prototype.propertyIsEnumerable.call(m,u)},g.isSetSimpleEqual=function(m,u){for(const t of Set.prototype.values.call(m))if(!Set.prototype.has.call(u,t))return!1;return!0},g.isDeepEqualObj=function(m,u,t,o,a){const{isDeepEqual:n,valueOf:r,hasOwnEnumerableProperty:c}=g,{keys:i,getOwnPropertySymbols:l}=Object;if(m===s.array){if(!o.part){if(u.length!==t.length)return!1;for(let S=0;S<u.length;++S)if(!n(u[S],t[S],o,a))return!1;return!0}for(const S of u)for(const h of t)if(n(S,h,o,a))return!0}else if(m===s.set){if(u.size!==t.size)return!1;if(!g.isSetSimpleEqual(u,t)){const S=new Set(Set.prototype.values.call(t));for(const h of Set.prototype.values.call(u)){if(S.delete(h))continue;let b=!1;for(const j of S)if(n(h,j,o,a)){S.delete(j),b=!0;break}if(!b)return!1}}}else if(m===s.map){if(u.size!==t.size)return!1;for(const[S,h]of Map.prototype.entries.call(u))if(h===void 0&&!Map.prototype.has.call(t,S)||!n(h,Map.prototype.get.call(t,S),o,a))return!1}else if(m===s.error&&(u.name!==t.name||u.message!==t.message))return!1;const d=r(u),p=r(t);if((u!==d||t!==p)&&!n(d,p,o,a))return!1;const f=i(u);if(!o.part&&f.length!==i(t).length&&!o.skip)return!1;let k=0;for(const S of f)if(o.skip&&o.skip.includes(S))t[S]===void 0&&++k;else if(!c(t,S)||!n(u[S],t[S],o,a))return!1;if(!o.part&&f.length-k!==i(t).length)return!1;if(o.symbols!==!1){const S=l(u),h=new Set(l(t));for(const b of S){if(!o.skip||!o.skip.includes(b)){if(c(u,b)){if(!c(t,b)||!n(u[b],t[b],o,a))return!1}else if(c(t,b))return!1}h.delete(b)}for(const b of h)if(c(t,b))return!1}return!0},g.SeenEntry=class{constructor(m,u){this.obj=m,this.ref=u}isSame(m,u){return this.obj===m&&this.ref===u}}},7916:(_,x,y)=>{const s=y(8761);_.exports=class extends Error{constructor(g){super(g.filter(m=>m!=="").map(m=>typeof m=="string"?m:m instanceof Error?m.message:s(m)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x.assert)}}},5277:_=>{const x={};_.exports=function(y){if(!y)return"";let s="";for(let g=0;g<y.length;++g){const m=y.charCodeAt(g);x.isSafe(m)?s+=y[g]:s+=x.escapeHtmlChar(m)}return s},x.escapeHtmlChar=function(y){return x.namedHtml.get(y)||(y>=256?"&#"+y+";":`&#x${y.toString(16).padStart(2,"0")};`)},x.isSafe=function(y){return x.safeCharCodes.has(y)},x.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),x.safeCharCodes=function(){const y=new Set;for(let s=32;s<123;++s)(s>=97||s>=65&&s<=90||s>=48&&s<=57||s===32||s===46||s===44||s===45||s===58||s===95)&&y.add(s);return y}()},6064:_=>{_.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,x,y)=>{const s=y(375),g=y(8571),m=y(7043),u={};_.exports=u.merge=function(t,o,a){if(s(t&&typeof t=="object","Invalid target value: must be an object"),s(o==null||typeof o=="object","Invalid source value: must be null, undefined, or an object"),!o)return t;if(a=Object.assign({nullOverride:!0,mergeArrays:!0},a),Array.isArray(o)){s(Array.isArray(t),"Cannot merge array onto an object"),a.mergeArrays||(t.length=0);for(let r=0;r<o.length;++r)t.push(g(o[r],{symbols:a.symbols}));return t}const n=m.keys(o,a);for(let r=0;r<n.length;++r){const c=n[r];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,c))continue;const i=o[c];if(i&&typeof i=="object"){if(t[c]===i)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(i)||i instanceof Date||i instanceof RegExp?t[c]=g(i,{symbols:a.symbols}):u.merge(t[c],i,a)}else(i!=null||a.nullOverride)&&(t[c]=i)}return t}},9621:(_,x,y)=>{const s=y(375),g={};_.exports=function(m,u,t){if(u===!1||u==null)return m;typeof(t=t||{})=="string"&&(t={separator:t});const o=Array.isArray(u);s(!o||!t.separator,"Separator option is not valid for array-based chain");const a=o?u:u.split(t.separator||".");let n=m;for(let r=0;r<a.length;++r){let c=a[r];const i=t.iterables&&g.iterables(n);if(Array.isArray(n)||i==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?n.length+l:l)}if(!n||typeof n=="function"&&t.functions===!1||!i&&n[c]===void 0){s(!t.strict||r+1===a.length,"Missing segment",c,"in reach path ",u),s(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",u),n=t.default;break}n=i?i==="set"?[...n][c]:n.get(c):n[c]}return n},g.iterables=function(m){return m instanceof Set?"set":m instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...x){try{return JSON.stringify(...x)}catch(y){return"[Cannot display object: "+y.message+"]"}}},4277:(_,x)=>{const y={};x=_.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},y.typeMap=new Map([["[object Error]",x.error],["[object Map]",x.map],["[object Promise]",x.promise],["[object Set]",x.set],["[object WeakMap]",x.weakMap],["[object WeakSet]",x.weakSet]]),x.getInternalProto=function(s){if(Array.isArray(s))return x.array;if(s instanceof Date)return x.date;if(s instanceof RegExp)return x.regex;if(s instanceof Error)return x.error;const g=Object.prototype.toString.call(s);return y.typeMap.get(g)||x.generic}},7043:(_,x)=>{x.keys=function(y,s={}){return s.symbols!==!1?Reflect.ownKeys(y):Object.getOwnPropertyNames(y)}},3652:(_,x,y)=>{const s=y(375),g={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(m,u){const t=[].concat((u=u||{}).before||[]),o=[].concat(u.after||[]),a=u.group||"?",n=u.sort||0;s(!t.includes(a),`Item cannot come before itself: ${a}`),s(!t.includes("?"),"Item cannot come before unassociated items"),s(!o.includes(a),`Item cannot come after itself: ${a}`),s(!o.includes("?"),"Item cannot come after unassociated items"),Array.isArray(m)||(m=[m]);for(const r of m){const c={seq:this._items.length,sort:n,before:t,after:o,group:a,node:r};this._items.push(c)}if(!u.manual){const r=this._sort();s(r,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(m){Array.isArray(m)||(m=[m]);for(const t of m)if(t)for(const o of t._items)this._items.push(Object.assign({},o));this._items.sort(g.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const u=this._sort();return s(u,"merge created a dependencies error"),this.nodes}sort(){const m=this._sort();return s(m,"sort created a dependencies error"),this.nodes}_sort(){const m={},u=Object.create(null),t=Object.create(null);for(const c of this._items){const i=c.seq,l=c.group;t[l]=t[l]||[],t[l].push(i),m[i]=c.before;for(const d of c.after)u[d]=u[d]||[],u[d].push(i)}for(const c in m){const i=[];for(const l in m[c]){const d=m[c][l];t[d]=t[d]||[],i.push(...t[d])}m[c]=i}for(const c in u)if(t[c])for(const i of t[c])m[i].push(...u[c]);const o={};for(const c in m){const i=m[c];for(const l of i)o[l]=o[l]||[],o[l].push(c)}const a={},n=[];for(let c=0;c<this._items.length;++c){let i=c;if(o[c]){i=null;for(let l=0;l<this._items.length;++l){if(a[l]===!0)continue;o[l]||(o[l]=[]);const d=o[l].length;let p=0;for(let f=0;f<d;++f)a[o[l][f]]&&++p;if(p===d){i=l;break}}}i!==null&&(a[i]=!0,n.push(i))}if(n.length!==this._items.length)return!1;const r={};for(const c of this._items)r[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const i=r[c];this.nodes.push(i.node),this._items.push(i)}return!0}},g.mergeSort=(m,u)=>m.sort===u.sort?0:m.sort<u.sort?-1:1},5380:(_,x,y)=>{const s=y(443),g=y(2178),m={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:s.URL||URL};x.analyze=function(u,t={}){if(!u)return g.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return g.code("DOMAIN_TOO_LONG");if(m.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return g.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(m.domainControlRx.test(u))return g.code("DOMAIN_INVALID_CHARS");u=m.punycode(u),t.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const o=t.minDomainSegments||m.minDomainSegments,a=u.split(".");if(a.length<o)return g.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&a.length>t.maxDomainSegments)return g.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const r=a[a.length-1].toLowerCase();if(n.deny&&n.deny.has(r)||n.allow&&!n.allow.has(r))return g.code("DOMAIN_FORBIDDEN_TLDS")}for(let r=0;r<a.length;++r){const c=a[r];if(!c.length)return g.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return g.code("DOMAIN_LONG_SEGMENT");if(r<a.length-1){if(!m.domainSegmentRx.test(c))return g.code("DOMAIN_INVALID_CHARS")}else if(!m.tldSegmentRx.test(c))return g.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(u,t){return!x.analyze(u,t)},m.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new m.URL(`http://${u}`).host}catch{return u}}},1745:(_,x,y)=>{const s=y(9848),g=y(5380),m=y(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(s.TextEncoder||TextEncoder)};x.analyze=function(t,o){return u.email(t,o)},x.isValid=function(t,o){return!u.email(t,o)},u.email=function(t,o={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return m.code("EMPTY_STRING");const a=!u.nonAsciiRx.test(t);if(!a){if(o.allowUnicode===!1)return m.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?m.code("MULTIPLE_AT_CHAR"):m.code("MISSING_AT_CHAR");const[r,c]=n;if(!r)return m.code("EMPTY_LOCAL");if(!o.ignoreLength){if(t.length>254)return m.code("ADDRESS_TOO_LONG");if(u.encoder.encode(r).length>64)return m.code("LOCAL_TOO_LONG")}return u.local(r,a)||g.analyze(c,o)},u.local=function(t,o){const a=t.split(".");for(const n of a){if(!n.length)return m.code("EMPTY_LOCAL_SEGMENT");if(o){if(!u.atextRx.test(n))return m.code("INVALID_LOCAL_CHARS")}else for(const r of n){if(u.atextRx.test(r))continue;const c=u.binary(r);if(!u.atomRx.test(c))return m.code("INVALID_LOCAL_CHARS")}}},u.binary=function(t){return Array.from(u.encoder.encode(t)).map(o=>String.fromCharCode(o)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(_,x)=>{x.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},x.code=function(y){return{code:y,error:x.codes[y]}}},9959:(_,x,y)=>{const s=y(375),g=y(5752);x.regex=function(m={}){s(m.cidr===void 0||typeof m.cidr=="string","options.cidr must be a string");const u=m.cidr?m.cidr.toLowerCase():"optional";s(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),s(m.version===void 0||typeof m.version=="string"||Array.isArray(m.version),"options.version must be a string or an array of string");let t=m.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),s(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)s(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),s(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const o=`(?:${t.map(n=>{if(u==="forbidden")return g.ip[n];const r=`\\/${n==="ipv4"?g.ip.v4Cidr:g.ip.v6Cidr}`;return u==="required"?`${g.ip[n]}${r}`:`${g.ip[n]}(?:${r})?`}).join("|")})`,a=new RegExp(`^${o}$`);return{cidr:u,versions:t,regex:a,raw:o}}},5752:(_,x,y)=>{const s=y(375),g=y(6064),m={generate:function(){const u={},t="\\dA-Fa-f",o="["+t+"]",a="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",r="%"+t,c=a+r+n+":@",i="["+c+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+l+"\\.){3}"+l;const d=o+"{1,4}",p="(?:"+d+":"+d+"|"+u.ipv4address+")",f="(?:"+d+":){6}"+p,k="::(?:"+d+":){5}"+p,S="(?:"+d+")?::(?:"+d+":){4}"+p,h="(?:(?:"+d+":){0,1}"+d+")?::(?:"+d+":){3}"+p,b="(?:(?:"+d+":){0,2}"+d+")?::(?:"+d+":){2}"+p,j="(?:(?:"+d+":){0,3}"+d+")?::"+d+":"+p,w="(?:(?:"+d+":){0,4}"+d+")?::"+p,O="(?:(?:"+d+":){0,5}"+d+")?::"+d,$="(?:(?:"+d+":){0,6}"+d+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+f+"|"+k+"|"+S+"|"+h+"|"+b+"|"+j+"|"+w+"|"+O+"|"+$+")",u.ipvFuture="v"+o+"+\\.["+a+n+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const I="["+a+r+n+":]*",q="["+a+r+n+"]{1,255}",Z="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+q+")",K="(?:"+I+"@)?"+Z+"(?::\\d*)?",F="(?:"+I+"@)?("+Z+")(?::\\d*)?",L=i+"*",H=i+"+",W="(?:\\/"+L+")*",ee="\\/(?:"+H+W+")?",ge=H+W,Se="["+a+r+n+"@]+"+W,He="(?:\\/\\/\\/"+L+W+")";return u.hierPart="(?:(?:\\/\\/"+K+W+")|"+ee+"|"+ge+"|"+He+")",u.hierPartCapture="(?:(?:\\/\\/"+F+W+")|"+ee+"|"+ge+")",u.relativeRef="(?:(?:\\/\\/"+K+W+")|"+ee+"|"+Se+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+F+W+")|"+ee+"|"+Se+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};m.rfc3986=m.generate(),x.ip={v4Cidr:m.rfc3986.ipv4Cidr,v6Cidr:m.rfc3986.ipv6Cidr,ipv4:m.rfc3986.ipv4address,ipv6:m.rfc3986.ipv6address,ipvfuture:m.rfc3986.ipvFuture},m.createRegex=function(u){const t=m.rfc3986,o="(?:\\?"+(u.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",a=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return m.wrap(a+o);let n="";if(u.scheme){s(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const i=[].concat(u.scheme);s(i.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let d=0;d<i.length;++d){const p=i[d];s(p instanceof RegExp||typeof p=="string","scheme at position "+d+" must be a RegExp or String"),p instanceof RegExp?l.push(p.source.toString()):(s(t.schemeRegex.test(p),"scheme at position "+d+" must be a valid scheme"),l.push(g(p)))}n=l.join("|")}const r="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+r+"|"+a+")":r;return m.wrap(c+o,n)},m.wrap=function(u,t){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:t}},m.uriRegex=m.createRegex({}),x.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?m.createRegex(u):m.uriRegex}},1447:(_,x)=>{const y={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};x.Parser=class{constructor(s,g={}){if(!g[y.settings]&&g.constants)for(const m in g.constants){const u=g.constants[m];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${m} contains invalid ${typeof u} value type`)}this.settings=g[y.settings]?g:Object.assign({[y.settings]:!0,constants:{},functions:{}},g),this.single=null,this._parts=null,this._parse(s)}_parse(s){let g=[],m="",u=0,t=!1;const o=n=>{if(u)throw new Error("Formula missing closing parenthesis");const r=g.length?g[g.length-1]:null;if(t||m||n){if(r&&r.type==="reference"&&n===")")return r.type="function",r.value=this._subFormula(m,r.value),void(m="");if(n===")"){const c=new x.Parser(m,this.settings);g.push({type:"segment",value:c})}else if(t){if(t==="]")return g.push({type:"reference",value:m}),void(m="");g.push({type:"literal",value:m})}else if(y.operatorCharacters.includes(m))r&&r.type==="operator"&&y.operators.includes(r.value+m)?r.value+=m:g.push({type:"operator",value:m});else if(m.match(y.numberRx))g.push({type:"constant",value:parseFloat(m)});else if(this.settings.constants[m]!==void 0)g.push({type:"constant",value:this.settings.constants[m]});else{if(!m.match(y.tokenRx))throw new Error(`Formula contains invalid token: ${m}`);g.push({type:"reference",value:m})}m=""}};for(const n of s)t?n===t?(o(),t=!1):m+=n:u?n==="("?(m+=n,++u):n===")"?(--u,u?m+=n:o(n)):m+=n:n in y.literals?t=y.literals[n]:n==="("?(o(),++u):y.operatorCharacters.includes(n)?(o(),m=n,o()):n!==" "?m+=n:o();o(),g=g.map((n,r)=>n.type!=="operator"||n.value!=="-"||r&&g[r-1].type!=="operator"?n:{type:"operator",value:"n"});let a=!1;for(const n of g){if(n.type==="operator"){if(y.operatorsPrefix.includes(n.value))continue;if(!a)throw new Error("Formula contains an operator in invalid position");if(!y.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(a)throw new Error("Formula missing expected operator");a=!a}if(!a)throw new Error("Formula contains invalid trailing operator");g.length===1&&["reference","literal","constant"].includes(g[0].type)&&(this.single={type:g[0].type==="reference"?"reference":"value",value:g[0].value}),this._parts=g.map(n=>{if(n.type==="operator")return y.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):y.reference(n.value)})}_subFormula(s,g){const m=this.settings.functions[g];if(typeof m!="function")throw new Error(`Formula contains unknown function ${g}`);let u=[];if(s){let t="",o=0,a=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${g} with invalid arguments ${s}`);u.push(t),t=""};for(let r=0;r<s.length;++r){const c=s[r];a?(t+=c,c===a&&(a=!1)):c in y.literals&&!o?(t+=c,a=y.literals[c]):c!==","||o?(t+=c,c==="("?++o:c===")"&&--o):n()}n()}return u=u.map(t=>new x.Parser(t,this.settings)),function(t){const o=[];for(const a of u)o.push(a.evaluate(t));return m.call(t,...o)}}evaluate(s){const g=this._parts.slice();for(let m=g.length-2;m>=0;--m){const u=g[m];if(u&&u.type==="operator"){const t=g[m+1];g.splice(m+1,1);const o=y.evaluate(t,s);g[m]=y.single(u.value,o)}}return y.operatorsOrder.forEach(m=>{for(let u=1;u<g.length-1;)if(m.includes(g[u])){const t=g[u],o=y.evaluate(g[u-1],s),a=y.evaluate(g[u+1],s);g.splice(u,2);const n=y.calculate(t,o,a);g[u-1]=n===0?0:n}else u+=2}),y.evaluate(g[0],s)}},x.Parser.prototype[y.symbol]=!0,y.reference=function(s){return function(g){return g&&g[s]!==void 0?g[s]:null}},y.evaluate=function(s,g){return s===null?null:typeof s=="function"?s(g):s[y.symbol]?s.evaluate(g):s},y.single=function(s,g){if(s==="!")return!g;const m=-g;return m===0?0:m},y.calculate=function(s,g,m){if(s==="??")return y.exists(g)?g:m;if(typeof g=="string"||typeof m=="string"){if(s==="+")return(g=y.exists(g)?g:"")+(y.exists(m)?m:"")}else switch(s){case"^":return Math.pow(g,m);case"*":return g*m;case"/":return g/m;case"%":return g%m;case"+":return g+m;case"-":return g-m}switch(s){case"<":return g<m;case"<=":return g<=m;case">":return g>m;case">=":return g>=m;case"==":return g===m;case"!=":return g!==m;case"&&":return g&&m;case"||":return g||m}return null},y.exists=function(s){return s!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function _(x){var y=R[x];if(y!==void 0)return y.exports;var s=R[x]={exports:{}};return A[x](s,s.exports,_),s.exports}(5107);var A,R})}(ot)),ot.exports}var Le={},Kt;function Gs(){if(Kt)return Le;Kt=1;var v=Le&&Le.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.BNExtension=A;const C=v(kn());function A(R){return{type:"BN",base:R.any(),messages:{"bn.nan":"{{#label}} is not a big number","bn.max":'{{#label}} needs to be less than or equal to "{{#threshold}}"',"bn.min":'{{#label}} needs to be greater than or equal to "{{#threshold}}"',"bn.less":'{{#label}} needs to be less than "{{#threshold}}"',"bn.greater":'{{#label}} needs to be greater than "{{#threshold}}"',"bn.positive":"{{#label}} needs to be positive","bn.negative":"{{#label}} needs to be negative"},prepare(_,x){try{return{value:new C.default(_)}}catch{return{errors:x.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,x,y){const s=new C.default(_);return y.equal&&s.lt(y.threshold)?x.error("bn.min",y):!y.equal&&s.lte(y.threshold)?x.error("bn.greater",y):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,x,y){const s=new C.default(_);return y.equal&&s.gt(y.threshold)?x.error("bn.max",y):!y.equal&&s.gte(y.threshold)?x.error("bn.less",y):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!1}})}},positive:{method(){return this.$_addRule({name:"gt",args:{threshold:0,equal:!1}})}},negative:{method(){return this.$_addRule({name:"lt",args:{threshold:0,equal:!1}})}}}}}return Le}var De={},Jt;function Ys(){if(Jt)return De;Jt=1;var v=De&&De.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(De,"__esModule",{value:!0}),De.DIDExtension=x;const C=v(Sn),A=Cn(),R=Rn(),_={pk:Object.keys(A.types.KeyType),hash:Object.keys(A.types.HashType),role:Object.keys(A.types.RoleType)};function x(y){return{type:"DID",base:y.string().trim(),messages:{"did.empty":"Expect {{#label}} to be non-empty string","did.invalid":"Expect {{#label}} to be valid did","did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(s,g){return!s||typeof s!="string"?{errors:g.error("did.empty",{value:s})}:(0,R.isValid)(s)===!1?{errors:g.error("did.invalid",{value:s})}:{value:s}},rules:{type:{args:[{name:"key",ref:!0,assert:s=>Object.keys(_).includes(s),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:s=>Object.keys(_).some(g=>_[g].includes(s)),message:"must be valid type"}],validate(s,g,m){const u=(0,R.toTypeInfoStr)(s);return m.key==="pk"&&u.pk!==m.expected?g.error("did.pk",{...m,actual:u.pk}):m.key==="hash"&&u.hash!==m.expected?g.error("did.hash",{...m,actual:u.hash}):m.key==="role"&&u.role!==m.expected?g.error("did.role",{...m,actual:u.role}):s}},pk:{method(s){return this.$_addRule({name:"type",args:{key:"pk",expected:s}})}},hash:{method(s){return this.$_addRule({name:"type",args:{key:"hash",expected:s}})}},role:{method(s){return this.$_addRule({name:"type",args:{key:"role",expected:s}})}},wallet:{method(s){return this.$_addRule({name:"wallet",args:{type:s}})},args:[{name:"type",ref:!0,assert:s=>["arcblock","ethereum","default","eth","passkey"].includes(s),message:"must be a string",normalize:s=>s.trim()}],validate(s,g,m={}){const u=(0,R.toTypeInfo)(s),t=(0,R.toTypeInfoStr)(s);return["ethereum","eth"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_ETHEREUM)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_ARCBLOCK)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):["passkey"].includes(m.type)&&(0,C.default)(u,R.DID_TYPE_PASSKEY)===!1?g.error("did.wallet",{expected:m.type,actual:JSON.stringify(t)}):s}},prefix:{method(s=""){return this.$_addRule({name:"prefix",args:{str:s}})},args:[{name:"str",ref:!0,assert:s=>["",R.DID_PREFIX].includes(s),message:"must be a string",normalize:s=>s.trim()}],validate(s,g,m={}){return m.str&&s.startsWith(m.str)===!1?g.error("did.prefix",{expected:m.str}):!m.str&&(0,R.toAddress)(s)!==s?g.error("did.prefix",{expected:m.str}):s}}}}}return De}var Gt;function Xs(){return Gt||(Gt=1,function(v){var C=Fe&&Fe.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(v,"__esModule",{value:!0}),v.patterns=v.schemas=v.Joi=void 0;const A=C(Js()),R=Gs(),_=Ys();v.Joi=A.default.extend(_.DIDExtension).extend(R.BNExtension);const x=/^(0x)?([A-Fa-f0-9]{64})$/,y=v.Joi.object({genesisTime:v.Joi.date().iso().required().raw(),genesisTx:v.Joi.string().regex(x).required().allow(""),renaissanceTime:v.Joi.date().iso().required().raw(),renaissanceTx:v.Joi.string().regex(x).required().allow("")}),s=v.Joi.object({address:v.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:v.Joi.BN().min(0).required()}),g=v.Joi.object({name:v.Joi.string().min(1).max(256).required(),value:v.Joi.string().min(1).max(1024).required(),description:v.Joi.string().min(1).max(256).optional().allow(""),required:v.Joi.boolean().optional().default(!1)}),m=v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ACCOUNT"),v.Joi.DID().prefix().role("ROLE_APPLICATION"),v.Joi.DID().prefix().role("ROLE_BLOCKLET"),v.Joi.DID().prefix().wallet("ethereum"),v.Joi.DID().prefix().wallet("passkey")),u=v.Joi.array().items(v.Joi.object({owner:m.required(),tokensList:v.Joi.array().items(s).default([]),assetsList:v.Joi.array().items(v.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=v.Joi.array().items({signer:v.Joi.DID().prefix().required(),pk:v.Joi.any().required(),signature:v.Joi.any().required(),delegator:v.Joi.DID().prefix().valid("").optional(),data:v.Joi.any().optional()}),o=v.Joi.object({type:v.Joi.string().min(1).max(32).required(),contractAddress:v.Joi.DID().prefix().wallet("ethereum").required(),chainType:v.Joi.string().min(1).max(32).required(),chainName:v.Joi.string().min(1).max(32).required(),chainId:v.Joi.number().positive().required()}),a=v.Joi.object({type:v.Joi.string().valid("svg","url","uri").required(),content:v.Joi.string().when("type",{is:"uri",then:v.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),n=v.Joi.object({id:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:v.Joi.string().valid("public","private").default("public")}),r=v.Joi.object({id:v.Joi.DID().prefix().required(),pk:v.Joi.string().required(),name:v.Joi.string().min(1).max(256).required()}),c={address:v.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.DID().prefix().optional().allow(""),issuer:v.Joi.DID().prefix().optional().allow(""),endpoint:n.optional().allow(null).default(null),display:a.optional().allow(null).default(null),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()},i={address:v.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:v.Joi.string().min(2).max(255).required(),description:v.Joi.string().min(2).max(255).required(),settlement:v.Joi.string().valid("instant","periodic").default("instant"),limit:v.Joi.number().integer().min(0).default(0),trustedIssuers:v.Joi.array().items(v.Joi.DID().prefix()).max(8).optional(),data:v.Joi.any().optional().allow(null).default(null),display:a.optional().allow(null).default(null),input:v.Joi.object({value:v.Joi.BN().positive().min("0").default("0"),tokens:v.Joi.array().items(s).max(8).optional(),assets:v.Joi.array().items(v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ASSET"),v.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:v.Joi.array().items(v.Joi.object({name:v.Joi.string().min(1).max(255).required(),description:v.Joi.string().max(255).optional().allow(""),required:v.Joi.boolean().required()})).optional()}),output:v.Joi.object({moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.string().max(255).required(),issuer:v.Joi.string().max(255).required(),endpoint:n.optional(),display:a.optional(),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()}),hooks:v.Joi.array().items(v.Joi.object({name:v.Joi.string().valid("mint","postMint","preMint").required(),type:v.Joi.string().valid("url","contract").required(),hook:v.Joi.string().min(1).max(4096).required(),compiled:v.Joi.array().items(v.Joi.object()).optional()})).optional()};v.schemas={context:y,tokenInput:s,multiInput:u,multiSig:t,foreignToken:o,variableInput:g,nftDisplay:a,nftEndpoint:n,nftIssuer:r,tokenHolder:m,assetProps:c,assetSchema:v.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:i,factorySchema:v.Joi.object(i).options({stripUnknown:!0,noDefaults:!1})},v.patterns={txHash:x}}(Fe)),Fe}var Qs=Xs();function Tr({onCancel:v,onSuccess:C,blocklet:A}){const{vaults:R=[],appPid:_}=A,{t:x,locale:y}=ne(),{connectApi:s}=ar(),{api:g}=Q(),{teamDid:m}=et(),[u,t]=$t({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});D.useEffect(()=>{if(!Ce.isValid(u.address))return;const c=Ce.toAddress(u.address),i=u.fetched.find(d=>d.address===c),l=u.errored.find(d=>d.address===c);!u.fetching&&!i&&!l&&(t({fetching:!0}),fs(V.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(p=>{p.state?t({fetching:!1,fetched:[...u.fetched.filter(f=>f.address!==c),p.state]}):t({fetching:!1,errored:[...u.errored.filter(f=>f.address!==c),{address:c}]})}).catch(p=>{console.error(p),t({fetching:!1,error:vt(p)})}))},[u.address,u.fetching]),D.useEffect(()=>{if(u.address){const c=Ce.toAddress(u.address);if(!Ce.isValid(c)){t({error:x("blocklet.config.vault.error.invalid")});return}if(Qs.schemas.tokenHolder.validate(c).error){t({error:x("blocklet.config.vault.error.holder")});return}if(R.find(l=>l.did===c)){t({error:x("blocklet.config.vault.error.duplicate")});return}if(An([A.appDid,A.appPid,...A.migratedFrom.map(l=>l.appDid)].filter(Boolean)).includes(c)){t({error:x("blocklet.config.vault.error.appDid")});return}}t({error:""})},[u.address]);const o=async()=>{t({loading:!0});try{const c=await g.configVault({input:{teamDid:m,vaultDid:Ce.toAddress(u.address)}});s.open({locale:y,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:x("blocklet.config.vault.approve.title"),scan:x(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:x("blocklet.config.vault.approve.confirm"),success:x("blocklet.config.vault.approve.success")},onSuccess:()=>{s.open({locale:y,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:x("blocklet.config.vault.commit.title"),scan:x("blocklet.config.vault.commit.scan"),confirm:x("blocklet.config.vault.commit.confirm"),success:x("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),C()},onClose:()=>{t({loading:!1}),s.close()}})},onClose:()=>{t({loading:!1}),s.close()}})}catch(c){t({loading:!1,error:vt(c)})}},a=Ce.toAddress(u.address),n=[];Ce.isValid(a)&&n.push({key:x("blocklet.config.vault.role"),value:e.jsx(Rt,{color:"primary",variant:"outlined",size:"small",label:Ce.toTypeInfoStr(a).role||"-"})});const r=u.fetched.find(c=>c.address===a);return r&&n.push({key:x("blocklet.config.vault.firstSeen"),value:qt(r.context?.genesisTime,"-")},{key:x("blocklet.config.vault.lastSeen"),value:qt(r.context?.renaissanceTime,"-")},{key:x("blocklet.config.vault.migratedFrom"),value:r.migratedFrom.length?r.migratedFrom.map(c=>e.jsx(xt,{did:c,showQrcode:!0,compact:!0,size:14,locale:y},c)):"-"},{key:x("blocklet.config.vault.migratedTo"),value:r.migratedTo.length?r.migratedTo.map(c=>e.jsx(xt,{did:c,showQrcode:!0,compact:!0,size:14,locale:y},c)):"-"}),e.jsx(we,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:v,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(_r,{}),x("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(J,{onClick:v,children:x("common.cancel")}),e.jsx(J,{onClick:o,variant:"contained",disabled:!!u.error||u.loading,children:x("common.confirm")})]}),children:e.jsxs(ae,{direction:"column",spacing:3,children:[e.jsxs(X,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.desc")," ",x("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(P,{children:[e.jsxs(X,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.current"),":"]}),e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Pn,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(ps,{vaults:R,appPid:_})]})]}),e.jsx(N,{fullWidth:!0,"data-cy":"input-factory-address",label:x("blocklet.config.vault.address"),error:!!u.error,helperText:u.error,value:u.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:u.fetching?e.jsx(cr,{position:"end",children:e.jsx(Be,{size:16})}):null}}}),e.jsx(P,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(yr,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}Tr.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function Et({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1}){const{info:R,api:_,inService:x}=Q(),{t:y,locale:s}=D.useContext(he),[g,m]=$t({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=D.useState(()=>v?.settings?.gateway?.wafPolicy?.enabled??!0),[o,a]=D.useState(()=>!!v?.settings?.enableSessionHardening),[n,r]=D.useState(()=>!!v?.settings?.invite?.enabled),[c,i]=D.useState(()=>{const L=v?.settings?.org||{};return{enabled:L.enabled||!1,maxMemberPerOrg:L.maxMemberPerOrg||100,maxOrgPerUser:L.maxOrgPerUser||10}}),l=g.loading||!A,{did:d}=v.meta,p=x?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(Pt(v.status))return null;const f=v.environments.find(L=>L.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),k=!f||f.value==="yes",h=v.environments.find(L=>L.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||Y.BLOCKLET_TENANT_MODES.SINGLE,b=(L,H)=>async W=>{if(!g.loading){m({loading:!0});try{const{checked:ee}=W.target,{blocklet:ge}=await _.configBlocklet({input:{did:v.meta.did,configs:[{key:Y.BLOCKLET_CONFIGURABLE_KEY[L],value:H(ee)}]}});C(ge)}catch(ee){z.error(ee.message)}finally{m({loading:!1})}}},j=b("BLOCKLET_DELETABLE",L=>L?"no":"yes"),w=b("BLOCKLET_APP_TENANT_MODE",L=>L?Y.BLOCKLET_TENANT_MODES.MULTIPLE:Y.BLOCKLET_TENANT_MODES.SINGLE),O=(L,H)=>async W=>{if(!g.loading){m({loading:!0});try{const ee=W.target.checked;await _.updateBlockletSettings({input:L(ee)}),H&&H(ee)}catch(ee){z.error(ee.message)}finally{m({loading:!1})}}},$=O(L=>({did:v.meta.did,invite:{enabled:L}}),r),I=O(L=>({did:v.meta.did,org:{enabled:L,maxMemberPerOrg:100,maxOrgPerUser:10}}),L=>{i({...c,enabled:L})}),q=async(L,H)=>{if(!g.loading){m({loading:!0});try{await _.updateBlockletSettings({input:{did:v.meta.did,org:{...c,[L]:H}}}),i({...c,[L]:H})}catch(W){z.error(W.message)}finally{m({loading:!1})}}},Z=O(L=>({did:v.meta.did,gateway:{wafPolicy:{enabled:L}}}),t),K=O(L=>({did:v.meta.did,enableSessionHardening:L}),L=>{a(L),On()}),F=async()=>{if(!g.loading){m({loading:!0});try{const{blocklet:L}=await _.getBlocklet({input:{did:v.meta.did}});C(L)}catch(L){z.error(L.message)}finally{m({loading:!1})}}};return e.jsxs(ae,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!x&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:y("blocklet.config.deletable.name"),desc:y(k?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:!k,defaultChecked:!0,onChange:j})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}})]}),e.jsx(Or,{inService:x,disabled:l,loading:g.loading,onChange:F}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),x&&e.jsx(Qn,{role:"owner",children:L=>(L||Ks)&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:y("blocklet.config.vault.title"),desc:y("blocklet.config.vault.desc"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(J,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>m({showConfigVault:!0}),children:[e.jsx(_r,{style:{fontSize:"1.3em",marginRight:4}}),y("blocklet.config.vault.title")]})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),g.showConfigVault&&e.jsx(Tr,{blocklet:v,onCancel:()=>m({showConfigVault:!1}),onSuccess:()=>m({showConfigVault:!1})}),e.jsx(M,{title:y("team.transferApp.name"),desc:y("team.transferApp.description"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(J,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>m({showTransferOwner:!0}),children:[e.jsx(Es,{style:{fontSize:"1.3em",marginRight:4}}),y("team.transferApp.name")]})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),g.showTransferOwner&&e.jsx($r,{onCancel:()=>m({showTransferOwner:!1}),onSuccess:()=>m({showTransferOwner:!1})})]})}),e.jsx(M,{title:y("blocklet.config.clearCache.name"),desc:y("blocklet.config.clearCache.purpose"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(ds,{teamDid:d})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("blocklet.config.rotateSessionKey.name"),desc:y("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(us,{style:{whiteSpace:"nowrap"},teamDid:d})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("blocklet.config.tenantMode.name"),desc:y(`blocklet.config.tenantMode.${h}`),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:h===Y.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:w})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:y("team.invite.setting"),desc:y(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:n,onChange:$})})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[y("setting.form.enableSessionHardening.switchLabel"),e.jsx(oe,{title:y("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Mt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:o,onChange:K})})}),p&&e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[y("router.gateway.wafPolicy.title"),e.jsx(oe,{title:e.jsx(P,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(P,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${s}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:y("dashboard.document")})}),children:e.jsx(Mt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:y("router.gateway.wafPolicy.switchLabel"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(me,{disabled:l,checked:u,onChange:Z})})})]}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(M,{title:e.jsx(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:y("common.orgs")}),desc:y("team.orgs.explain"),children:e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(me,{disabled:l,checked:c.enabled,onChange:I}),c.enabled&&e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(_t,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:y("team.orgs.invite.maxOrgs"),placeholder:y("team.orgs.invite.maxOrgs"),onSubmit:L=>q("maxOrgPerUser",L)}),e.jsx(_t,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:y("team.orgs.invite.maxMembers"),placeholder:y("team.orgs.invite.maxMembers"),onSubmit:L=>q("maxMemberPerOrg",L)})]})]})})]})}const ei=ze(Et,"mutate_blocklets"),ti=ze(Et,"",At);function ri(v){const{inService:C}=Q();return C?e.jsx(ti,{...v}):e.jsx(ei,{...v})}Et.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function It({blocklet:v,onUpdate:C=()=>{},hasPermission:A=!1,...R}){const{t:_}=D.useContext(he);return Pt(v.status)?null:e.jsxs(ai,{...R,children:[e.jsx(Ws,{blocklet:v,onUpdate:C,hasPermission:A}),e.jsx(P,{sx:{mt:6},children:e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx(P,{className:"config-form",component:te,sx:{my:3}}),e.jsx(P,{sx:{maxWidth:1536},children:e.jsx(ri,{blocklet:v,onUpdate:C,hasPermission:A})})]})}const ni=ze(It,"mutate_blocklets"),si=ze(It,"",At);function ii(v){const{inService:C}=Q();return C?e.jsx(si,{...v}):e.jsx(ni,{...v})}It.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const ai=ve(P)`
|
|
51
51
|
.config-form {
|
|
52
52
|
flex-grow: 1;
|
|
53
53
|
overflow-y: auto;
|
|
@@ -79,7 +79,7 @@ ${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
79
79
|
.form-item {
|
|
80
80
|
margin-top: 0;
|
|
81
81
|
}
|
|
82
|
-
`;var Ke={exports:{}},Je={exports:{}},Ge={exports:{}},Yt;function oi(){return Yt||(Yt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=A;function A(R){return R==null}v.exports=C.default,v.exports.default=C.default}(Ge,Ge.exports)),Ge.exports}var Xt;function li(){return Xt||(Xt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=s;var A=_($n()),R=_(oi());function _(g){return g&&g.__esModule?g:{default:g}}var x=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,y=/^[-+]?[0-9]+$/;function s(g,m){(0,A.default)(g),m=m||{};var u=m.allow_leading_zeroes===!1?x:y,t=!m.hasOwnProperty("min")||(0,R.default)(m.min)||g>=m.min,o=!m.hasOwnProperty("max")||(0,R.default)(m.max)||g<=m.max,a=!m.hasOwnProperty("lt")||(0,R.default)(m.lt)||g<m.lt,n=!m.hasOwnProperty("gt")||(0,R.default)(m.gt)||g>m.gt;return u.test(g)&&t&&o&&a&&n}v.exports=C.default,v.exports.default=C.default}(Je,Je.exports)),Je.exports}var Qt;function ci(){return Qt||(Qt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=_;var A=R(li());function R(x){return x&&x.__esModule?x:{default:x}}function _(x){return(0,A.default)(x,{allow_leading_zeroes:!1,min:0,max:65535})}v.exports=C.default,v.exports.default=C.default}(Ke,Ke.exports)),Ke.exports}var di=ci();const ui=Tn(di),lt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function hi(){const{api:v}=Q(),{blocklet:C}=ie(),{t:A}=ne(),{confirmApi:R,confirmHolder:_}=Ee(),[x,y]=D.useState(!1),s=C?.meta?.did,g=Object.assign({...lt},C?.settings?.notification?.email||{}),{handleSubmit:m,control:u,formState:t,watch:o,reset:a}=fe({defaultValues:je(g,Object.keys(lt))}),n=pe({testReceiver:"",testReceiverError:""}),r=o("enabled"),c=E(async(w,P,$=!0)=>{try{y(!0);const{blocklet:I}=await v.configNotification({input:{did:s,notification:JSON.stringify({email:w})}}),q=Object.assign({...lt},I?.settings?.notification?.email||{});a(q),$&&B.success(A("common.saveSuccess"))}catch(I){if($)B.error(I.message||A("common.saveFailed"));else throw I}finally{y(!1)}}),i=E(async(w,P,$)=>{try{y(!0),t.isDirty&&await c(w,P,!1),await v.sendEmail({input:{did:s,receiver:$,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),B.success(A("notification.email.testSuccess"))}catch(I){B.error(I.message||A("notification.email.testfailed"))}finally{y(!1)}}),l=E((w,P)=>{n.testReceiver=localStorage.getItem("test-receiver")||"",n.testReceiverError="",R.open({title:A("notification.email.testSendEmail"),content:()=>e.jsx(O,{sx:{width:"300px"},children:e.jsx(N,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.email.inputTestReceiver"),value:n.testReceiver,onChange:$=>{n.testReceiver=$.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm($){const I=n.testReceiver?.trim();if(!I){n.testReceiverError=A("notification.email.receiverRequired");return}if(!it(I)){n.testReceiverError=A("notification.email.receiverInvalid");return}n.testReceiverError="",await i(w,P,I),$()},onCancel:()=>{y(!1)}})}),d=E(w=>{const P=w?.trim();return P?it(P)?!0:A("notification.email.fromInvalid"):A("notification.email.fromRequired")}),p=E(w=>{const P=w?.trim();return P?bt(P,{require_host:!1,protocols:[]})?!0:A("notification.email.hostInvalid"):A("notification.email.hostRequired")}),f=E(w=>w?ui(w)?!0:A("notification.email.portInvalid"):A("notification.email.portRequired")),k=E(w=>w?.trim()?!0:A("notification.email.userRequired")),S=E(w=>w?.trim()?!0:A("notification.email.passwordRequired")),h=E(w=>w?.trim()&&!bt(w,{protocols:["http","https"],require_protocol:!0})?A("notification.email.linkInvalid"):!0),b=E(w=>w?.trim()&&!it(w)?A("notification.email.emailInvalid"):!0),j=E(()=>!0);return e.jsxs(O,{children:[e.jsxs(mi,{component:"form",onSubmit:m(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.email.enable"),my:2.5,children:e.jsx(z,{name:"enabled",control:u,render:({field:w})=>e.jsx(se,{control:e.jsx(me,{checked:w.value,...w})})})}),e.jsx(M,{title:A("notification.email.from"),children:e.jsx(z,{name:"from",control:u,rules:{validate:r?d:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,label:A("notification.email.from"),error:!!t.errors[w.name],helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.host"),children:e.jsx(z,{name:"host",control:u,rules:{validate:r?p:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,error:!!t.errors[w.name],label:A("notification.email.host"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.port"),children:e.jsx(z,{name:"port",control:u,rules:{validate:r?f:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,type:"number",error:!!t.errors[w.name],label:A("notification.email.port"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.user"),children:e.jsx(z,{name:"user",control:u,rules:{validate:r?k:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,error:!!t.errors[w.name],label:A("notification.email.user"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.password"),children:e.jsx(z,{name:"password",control:u,rules:{validate:r?S:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,type:"password",error:!!t.errors[w.name],label:A("notification.email.password"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.secure"),children:e.jsx(z,{name:"secure",control:u,rules:{validate:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(se,{control:e.jsx(me,{checked:w.value,...w,disabled:!r})})})})}),e.jsxs(ns,{children:[e.jsxs(ss,{expandIcon:e.jsx(is,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[A("notification.email.signature"),e.jsx(oe,{title:A("notification.email.signatureTooltip"),children:e.jsx(Cs,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(as,{children:[e.jsx(M,{title:A("notification.email.companyName"),children:e.jsx(z,{name:"companyName",control:u,rules:{validate:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyName"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.companyLink"),children:e.jsx(z,{name:"companyLink",control:u,rules:{validate:r?h:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyLink"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.companyAddress"),children:e.jsx(z,{name:"companyAddress",control:u,rules:{validate:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyAddress"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.supportEmail"),children:e.jsx(z,{name:"supportEmail",control:u,rules:{validate:r?b:j},render:({field:w})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",type:"email",error:!!t.errors[w.name],label:A("notification.email.supportEmail"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})})]})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(J,{variant:"outlined",loading:x,color:"warning",onClick:m(l),disabled:!r||x,children:A("common.runTest")}),e.jsx(J,{type:"submit",variant:"contained",loading:x,disabled:!t.isDirty||x,children:A("common.save")})]})]}),_]})}const mi=ve(ae)``,ct={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function fi(){const{api:v}=Q(),{blocklet:C}=ie(),{t:A}=ne(),{confirmApi:R,confirmHolder:_}=Ee(),[x,y]=D.useState(!1),s=C?.meta?.did,g=Object.assign({...ct},C?.settings?.notification?.pushKit||{}),{handleSubmit:m,control:u,formState:t,watch:o,reset:a}=fe({defaultValues:je(g,Object.keys(ct))}),n=pe({testReceiver:"",testReceiverError:""}),r=o("enabled"),c=E(async(f,k,S=!0)=>{try{y(!0);const{blocklet:h}=await v.configNotification({input:{did:s,notification:JSON.stringify({pushKit:f})}}),b=Object.assign({...ct},h?.settings?.notification?.pushKit||{});a(b),S&&B.success(A("common.saveSuccess"))}catch(h){if(S)B.error(h.message||A("common.saveFailed"));else throw h}finally{y(!1)}}),i=E(async(f,k)=>{try{y(!0),t.isDirty&&await c(f,k,!1);const S=(C?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,h=En(ke(S,U.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:C?.meta?.version,t:new Date(C?.updatedAt||0).getTime()}),b={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:C?.appDid,fullName:C?.meta?.title,avatar:h}}}};await v.sendPush({input:{did:s,receiver:n.testReceiver,notification:JSON.stringify(b)}}),B.success(A("notification.pushKit.testSuccess"))}catch(S){B.error(S.message||A("notification.pushKit.testfailed"))}finally{y(!1)}}),l=E((f,k)=>{n.testReceiverError="",R.open({title:A("notification.pushKit.testSend"),content:()=>e.jsx(O,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(N,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.pushKit.inputTestReceiver"),value:n.testReceiver,onChange:S=>{n.testReceiver=S.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm(S){if(!n.testReceiver?.trim()){n.testReceiverError=A("notification.pushKit.receiverRequired");return}n.testReceiverError="",await i(f,k),S()},onCancel:()=>{y(!1)}})}),d=E(f=>{const k=f?.trim();return k?bt(k)?!0:A("notification.pushKit.endpointInvalid"):A("notification.pushKit.endpointRequired")}),p=E(()=>!0);return e.jsxs(O,{children:[e.jsxs(pi,{component:"form",onSubmit:m(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.pushKit.enable"),my:2.5,children:e.jsx(z,{name:"enabled",control:u,render:({field:f})=>e.jsx(se,{control:e.jsx(me,{checked:f.value,...f})})})}),e.jsx(M,{title:A("notification.pushKit.endpoint"),children:e.jsx(z,{name:"endpoint",control:u,rules:{validate:r?d:p},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",required:!0,label:A("notification.pushKit.endpoint"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})})}),e.jsxs(M,{title:A("notification.pushKit.customOptions"),children:[e.jsx(z,{name:"did",control:u,render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:A("notification.pushKit.did"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})}),e.jsx(z,{name:"pushPath",control:u,render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:A("notification.pushKit.pushPath"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(J,{variant:"outlined",loading:x,color:"warning",onClick:m(l),disabled:!r||x,children:A("common.runTest")}),e.jsx(J,{type:"submit",variant:"contained",loading:x,disabled:!t.isDirty||x,children:A("common.save")})]})]}),_]})}const pi=ve(ae)``,er=[{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Wallet"}),value:"wallet"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Webhooks"}),value:"webhooks"}];function gi(){const[v,C]=D.useState(er[0].value),{t:A}=D.useContext(he),R=_e(()=>({email:e.jsx(hi,{}),pushKit:e.jsx(fi,{}),wallet:e.jsx(X,{variant:"body1",children:A("notification.wallet.description")}),webhooks:e.jsx(X,{variant:"body1",children:A("notification.webhooks.description")})}),[A]),_=D.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(O,{children:[e.jsx(Ue,{variant:"card",tabs:er,current:v,onChange:C}),e.jsx(O,{style:_,children:R[v]})]})}const dt={domain:"",clientId:"",clientSecret:""};function Er({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...dt},_?.settings?.authentication?.auth0||{}),m=(_.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(dt))}),n=E(async p=>{try{const{blocklet:f}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,auth0:{...p,order:A.auth0?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),k=Object.assign({...dt},f?.settings?.authentication?.auth0||{});a(k),B.success(x("common.saveSuccess")),C()}catch(f){B.error(f.message||x("common.saveFailed"))}}),r=E(p=>p?.trim()?!0:x("authentication.auth0.domainDescription")),c=E(p=>p?.trim()?!0:x("authentication.auth0.clientIdDescription")),i=E(p=>p?.trim()?!0:x("authentication.auth0.clientSecretDescription")),l=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[y]),d=ke(m,U.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[l,e.jsx(O,{component:re,icon:Pt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[d,e.jsx(Ve,{locale:y,content:d,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.auth0.domain"),children:e.jsx(z,{name:"domain",control:t,rules:{validate:r},render:({field:p})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",label:x("authentication.auth0.domain"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.auth0.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:c},render:({field:p})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",label:x("authentication.auth0.clientId"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.auth0.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:i},render:({field:p})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",type:"password",label:x("authentication.auth0.clientSecret"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})})]})})}Er.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ut={clientId:"",clientSecret:""};function Ir({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...ut},_?.settings?.authentication?.github||{}),m=(_.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(ut))}),n=E(async d=>{try{const{blocklet:p}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,github:{...d,order:A.github?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),f=Object.assign({...ut},p?.settings?.authentication?.github||{});a(f),B.success(x("common.saveSuccess")),C()}catch(p){B.error(p.message||x("common.saveFailed"))}}),r=E(d=>d?.trim()?!0:x("authentication.github.clientIdDescription")),c=E(d=>d?.trim()?!0:x("authentication.github.clientSecretDescription")),i=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[y]),l=ke(m,U.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:re,icon:Pt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ve,{locale:y,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.github.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:r},render:({field:d})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",label:x("authentication.github.clientId"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.github.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",type:"password",label:x("authentication.github.clientSecret"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})})]})})}Ir.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ht={showQrcode:!0};function Lr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=Object.assign({...ht},_?.settings?.authentication?.wallet||{}),{handleSubmit:g,control:m,reset:u}=fe({defaultValues:je(s,Object.keys(ht))}),t=E(async o=>{try{const{blocklet:a}=await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,wallet:{...o,order:A.wallet?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),n=Object.assign({...ht},a?.settings?.authentication?.wallet||{});u(n),B.success(x("common.saveSuccess")),C()}catch(a){B.error(a.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:g(t)}),[g,t]),e.jsx(O,{children:e.jsx("form",{children:e.jsx(M,{title:x("authentication.wallet.showQrcode"),children:e.jsx(z,{name:"showQrcode",control:m,render:({field:o})=>e.jsx(se,{control:e.jsx(gs,{sx:{ml:1},checked:o.value,...o})})})})})})}Lr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function Dr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=E(async()=>{try{await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,email:{order:A.email?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),B.success(x("common.saveSuccess")),C()}catch(g){B.error(g.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:s}),[s]),e.jsxs(O,{children:[x("authentication.emailLoginDescription"),e.jsx("br",{}),x("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(O,{component:In,to:ke(U.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(le,{size:"small",variant:"outlined",children:x("authentication.gotoEmailNotification")})})]})}Dr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function qr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=E(async()=>{try{await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,passkey:{order:A.passkey?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),B.success(x("common.saveSuccess")),C()}catch(g){B.error(g.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:s}),[s]),null}qr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const mt={clientId:"",clientSecret:""};function Mr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...mt},_?.settings?.authentication?.google||{}),m=(_.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(mt))}),n=E(async d=>{try{const{blocklet:p}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,google:{...d,order:A.google?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),f=Object.assign({...mt},p?.settings?.authentication?.google||{});a(f),B.success(x("common.saveSuccess")),C()}catch(p){B.error(p.message||x("common.saveFailed"))}}),r=E(d=>d?.trim()?!0:x("authentication.google.clientIdDescription")),c=E(d=>d?.trim()?!0:x("authentication.google.clientSecretDescription")),i=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[y]),l=ke(m,U.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:re,icon:Pt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ve,{locale:y,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.google.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:r},render:({field:d})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",label:x("authentication.google.clientId"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.google.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",type:"password",label:x("authentication.google.clientSecret"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})})]})})}Mr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ft={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function zr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...ft},_?.settings?.authentication?.apple||{}),m=(_.environments||[]).find(f=>f.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(ft))}),n=E(async f=>{try{const{blocklet:k}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,apple:{...f,order:A.apple?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),S=Object.assign({...ft},k?.settings?.authentication?.apple||{});a(S),B.success(x("common.saveSuccess")),C()}catch(k){B.error(k.message||x("common.saveFailed"))}}),r=E(f=>f?.trim()?!0:x("authentication.apple.teamIdDescription")),c=E(f=>f?.trim()?!0:x("authentication.apple.serviceIdDescription")),i=E(f=>f?.trim()?!0:x("authentication.apple.keyIdDescription")),l=E(f=>f?.trim()?!0:x("authentication.apple.authKeyDescription")),d=E(f=>f?.trim()?!0:x("authentication.apple.bundleIdDescription")),p=ke(m,U.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{children:[e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[p,e.jsx(Ve,{locale:y,content:p,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.apple.teamId"),children:e.jsx(z,{name:"teamId",control:t,rules:{validate:r},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.teamId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.bundleId"),children:e.jsx(z,{name:"bundleId",control:t,rules:{validate:d},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.bundleId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.serviceId"),children:e.jsx(z,{name:"serviceId",control:t,rules:{validate:c},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.serviceId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.keyId"),children:e.jsx(z,{name:"keyId",control:t,rules:{validate:i},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.keyId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.authKey"),children:e.jsx(z,{name:"authKey",control:t,rules:{validate:l},render:({field:f})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",type:"password",label:x("authentication.apple.authKey"),multiline:!0,rows:4,error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}zr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const pt={clientId:"",clientSecret:""};function Br({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...pt},_?.settings?.authentication?.twitter||{}),m=(_.environments||[]).find(l=>l.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(pt))}),n=E(async l=>{try{const{blocklet:d}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,twitter:{...l,order:A.twitter?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),p=Object.assign({...pt},d?.settings?.authentication?.twitter||{});a(p),B.success(x("common.saveSuccess")),C()}catch(d){B.error(d.message||x("common.saveFailed"))}}),r=E(l=>l?.trim()?!0:x("authentication.twitter.clientIdDescription")),c=E(l=>l?.trim()?!0:x("authentication.twitter.clientSecretDescription")),i=ke(m,U.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[i,e.jsx(Ve,{locale:y,content:i,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.twitter.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:r},render:({field:l})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...l,size:"small",label:x("authentication.twitter.clientId"),error:!!o.errors[l.name],helperText:o.errors[l.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.twitter.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:l})=>e.jsx(V,{fullWidth:!0,children:e.jsx(N,{...l,size:"small",type:"password",label:x("authentication.twitter.clientSecret"),error:!!o.errors[l.name],helperText:o.errors[l.name]?.message||" "})})})})]})})}Br.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const yi={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'},rt={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},nt={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function Hr({id:v,title:C,index:A,onBegin:R=G,onMove:_,onEnd:x,onEditItem:y=G,onDeleteItem:s=G,disableDelete:g=!1,icon:m=null}){const u=D.useRef(null),t=D.useRef(null),[{handlerId:o},a]=ys({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,l){if(!u.current)return;const d=i.index,p=A;if(d===p)return;const f=u.current?.getBoundingClientRect(),k=t.current?.getBoundingClientRect(),S=(k.bottom-k.top)/2,b=l.getClientOffset().y-f.top;d<p&&b<S||d>p&&b>S||(_(d,p),i.index=p)}}),[{isDragging:n},r]=xs({item:{index:A,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),begin:R,end:x});r(t),a(u);const c=n?.3:1;return e.jsx(O,{ref:u,children:e.jsxs(O,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":o,children:[e.jsxs(O,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(O,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(re,{fontSize:20,icon:yi})}),e.jsx(O,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:m}),e.jsx(X,{sx:{flex:1},children:C}),e.jsx(ce,{size:"small",color:"primary",onClick:()=>{y(v)},children:e.jsx(re,{icon:nt})}),e.jsx(ce,{size:"small",color:"error",onClick:()=>{s(v)},disabled:g,children:e.jsx(re,{icon:rt})})]}),e.jsx(te,{})]})})}Hr.propTypes={title:T.string.isRequired,id:T.string.isRequired,index:T.number.isRequired,onBegin:T.func,onMove:T.func.isRequired,onEnd:T.func.isRequired,onEditItem:T.func,onDeleteItem:T.func,disableDelete:T.bool,icon:T.any};function Nr({ref:v=null,providers:C=[],sortMaps:A={}}){const R=D.useRef(null),{t:_}=D.useContext(he),x=$e(),{control:y,watch:s,setValue:g,reset:m}=fe({mode:"onChange",defaultValues:{provider:""}}),u=s("provider"),t=C.find(p=>p.name===u),o=Ln(t),a=x?.transitions?.duration?.leavingScreen||300,n=pe({initMode:"add",mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?_("authentication.updateLoginProvider",{provider:o.current?.title}):_("authentication.addLoginProvider")}}),r=E(()=>{m(),n.mode="add",n.initMode="add"}),c=E(()=>{n.show=!1,setTimeout(()=>{r()},a)}),i=E((p,f=null)=>{if(n.show=!0,f)n.initMode="edit",n.mode="edit",g("provider",f.provider);else{const k=C.find(S=>S.enabled===!1)?.name||C[0]?.name||de.WALLET;g("provider",k)}p?n.callback=p:n.callback=G});D.useImperativeHandle(v,()=>({open:i,close:c}),[i,c]);const l=E(()=>{R.current.submit()}),d=C.map(p=>({value:p.name,title:p.title,description:p.enabled?_("common.enabled"):""}));return D.useEffect(()=>{t?.enabled?n.mode="edit":n.mode="add"},[t?.enabled]),e.jsxs(we,{open:n.show,title:n.dialogTitle,onClose:c,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:!u,children:n.mode==="add"?_("common.confirm"):_("common.update")}),children:[n.initMode==="edit"?null:e.jsx(z,{name:"provider",control:y,render:({field:p})=>e.jsx(Ye,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:_("authentication.chooseProvider"),placeholder:_("authentication.chooseProviderPlaceholder"),options:d,...Oe(p,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(O,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:t?.component&&e.jsx(t.component,{ref:R,onSuccess:c,sortMaps:A})})]})}Nr.propTypes={ref:T.any,providers:T.array,sortMaps:T.object};function xi(){const{confirmApi:v,confirmHolder:C}=Ee(),A=D.useRef(),{t:R}=ne(),{api:_}=Q(),{blocklet:x}=ie(),y=x?.meta?.did,s=x?.settings?.authentication||{},g=[{name:de.WALLET,title:be[de.WALLET],icon:e.jsx(Re,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Lr},{name:de.EMAIL,title:be[de.EMAIL],icon:e.jsx(Re,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:Dr},{name:de.PASSKEY,title:be[de.PASSKEY],icon:e.jsx(Re,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:qr},{name:de.GOOGLE,title:be[de.GOOGLE],icon:e.jsx(Re,{provider:"google",sx:{width:20,height:20}}),component:Mr},{name:de.APPLE,title:be[de.APPLE],icon:e.jsx(Re,{provider:"apple",sx:{width:20,height:20}}),component:zr},{name:de.GITHUB,title:be[de.GITHUB],icon:e.jsx(Re,{provider:"github",sx:{width:20,height:20}}),component:Ir},{name:de.TWITTER,title:be[de.TWITTER],icon:e.jsx(Re,{provider:"twitter",sx:{width:20,height:20}}),component:Br},{name:de.AUTH0,title:be[de.AUTH0],icon:e.jsx(Re,{provider:"auth0",sx:{width:20,height:20}}),component:Er,hidden:!0}].map(p=>({...p,enabled:s[p.name]?.enabled??!1,order:s[p.name]?.order??null})),m=g.filter(p=>p.enabled),u=m.sort((p,f)=>!Me(p?.order)&&!Me(f?.order)?p.order-f.order:Me(p?.order)?1:-1),t=u.reduce((p,f,k)=>Object.assign(p,{[f.name]:{order:k}}),{}),o=pe(u.reduce((p,f,k)=>Object.assign(p,{[f.name]:k}),{})),a=[...m].sort((p,f)=>o[p.name]-o[f.name]),n={};typeof window<"u"&&(n.context=window);const r=E((p,f)=>{const k=a[p],S=a[f];o[k.name]=f,o[S.name]=p}),c=E(async()=>{const p=Object.keys(o).reduce((f,k)=>(f[k]={order:o[k]},f),{});await _.configAuthentication({input:{did:y,authentication:JSON.stringify(p)}})}),i=()=>{A.current.open(()=>{A.current.close()})},l=E(p=>{A.current.open(G,{provider:p})}),d=E(p=>{v.open({title:R("authentication.deleteLoginProvider",{provider:be[p]}),content:R("authentication.deleteLoginProviderDescription",{provider:be[p]}),confirmButtonText:R("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:R("common.cancel"),async onConfirm(f){try{await _.configAuthentication({input:{did:y,authentication:JSON.stringify({[p]:{enabled:!1,order:null}})}}),delete o[p],B.success(R("common.deleteSuccess")),f()}catch(k){B.error(k.message||R("common.deleteFailed"))}}})});return e.jsxs(O,{children:[e.jsx(J,{variant:"contained",onClick:i,sx:{mb:1},children:R("authentication.addLoginProvider")}),e.jsx(vs,{backend:bs,...n,children:a.map((p,f)=>e.jsx(Hr,{index:f,id:p.name,title:p.title,icon:p.icon,onMove:r,onEnd:c,onEditItem:l,onDeleteItem:d,disableDelete:u.length<=1,children:p.component},p.name))}),e.jsx(Nr,{ref:A,providers:g,sortMaps:t}),C]})}const Te={ttl:U.SESSION_TTL,cacheTtl:U.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function ye(v){return e.jsx(xr,{...v,sx:{transform:"scale(0.75)"}})}function gt(v,C=!1){const A=C?v.ttl*86400:v.ttl/86400;return{...v,ttl:A}}function vi(){const{api:v}=Q(),{blocklet:C}=ie(),A=C?.meta?.did,R=dr({},Te,C?.settings?.session||{});Me(R.ttl)&&(R.ttl=Te.ttl),Me(R.cacheTtl)&&(R.cacheTtl=Te.cacheTtl),R.phone||(R.phone=Te.phone),R.email||(R.email=Te.email),Me(R.enableBlacklist)&&(R.enableBlacklist=Te.enableBlacklist);const{handleSubmit:_,control:x,formState:y,reset:s,watch:g}=fe({defaultValues:je(gt(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:m}=ne(),u=g("email.enabled"),t=g("phone.enabled"),o=g("email.enableDomainBlackList"),a=g("email.enableDomainWhiteList"),{fields:n,append:r,remove:c}=Ft({control:x,name:"email.domainBlackList"}),{fields:i,append:l,remove:d}=Ft({control:x,name:"email.domainWhiteList"}),p=E(async f=>{try{const{blocklet:k}=await v.updateAppSessionConfig({input:{did:A,config:Oe(gt(f,!0),["phone"])}}),S=Object.assign({},Te,je(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));s(gt(S)),B.success(m("common.configSuccess"))}catch(k){B.error(k.message)}});return e.jsx(bi,{onSubmit:_(p),children:e.jsxs(ae,{direction:"column",sx:{gap:6},children:[e.jsxs(O,{children:[e.jsxs(O,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.profile")}),e.jsx(O,{component:te,sx:{my:3}})]}),e.jsxs(ae,{sx:{gap:2},children:[e.jsx(M,{title:m("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:m("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:m("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enabled",control:x,render:({field:f})=>e.jsx(ye,{...f,checked:f.value})})})}),u&&e.jsxs(ae,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(M,{title:m("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.requireVerified",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.requireUnique",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.trustOauthProviders",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enableDomainBlackList",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),o&&e.jsxs(O,{children:[n.map((f,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(z,{name:`email.domainBlackList.${k}`,control:x,render:S=>e.jsx(N,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ce,{onClick:()=>c(k),children:e.jsx(Zt,{})})]},f.id)),e.jsx(le,{startIcon:e.jsx(Wt,{}),onClick:()=>r(""),children:m("blocklet.config.session.addDomain")})]}),e.jsx(M,{title:m("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enableDomainWhiteList",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),a&&e.jsxs(O,{children:[i.map((f,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(z,{name:`email.domainWhiteList.${k}`,control:x,render:S=>e.jsx(N,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ce,{onClick:()=>d(k),children:e.jsx(Zt,{})})]},f.id)),e.jsx(le,{startIcon:e.jsx(Wt,{}),onClick:()=>l(""),children:m("blocklet.config.session.addDomain")})]})]}),e.jsxs(O,{sx:{display:"none"},children:[e.jsx(M,{title:m("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.enabled",control:x,disabled:!0,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),t&&e.jsxs(ae,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(M,{title:m("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.requireVerified",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.requireUnique",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})})]})]})]})]}),e.jsxs(O,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.period")}),e.jsx(O,{component:te,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(z,{name:"ttl",control:x,rules:{min:1,max:30},render:({field:f})=>e.jsx(V,{fullWidth:!0,sx:{mb:2},children:e.jsx(M,{title:m("blocklet.config.session.ttl",{day:f.value}),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(hs,{...f,defaultValue:7,step:1,marks:[{value:1,label:m("blocklet.config.session.day",{day:1})},{value:7,label:m("blocklet.config.session.days",{day:7})},{value:14,label:m("blocklet.config.session.days",{day:14})},{value:21,label:m("blocklet.config.session.days",{day:21})},{value:30,label:m("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(O,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.experimentalSettings")}),e.jsx(O,{component:te,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(M,{title:m("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"enableBlacklist",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})})})]}),e.jsx(O,{children:e.jsx(le,{type:"submit",variant:"contained",disabled:!y.isDirty,children:m("common.save")})})]})})}const bi=ve.form`
|
|
82
|
+
`;var Ke={exports:{}},Je={exports:{}},Ge={exports:{}},Yt;function oi(){return Yt||(Yt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=A;function A(R){return R==null}v.exports=C.default,v.exports.default=C.default}(Ge,Ge.exports)),Ge.exports}var Xt;function li(){return Xt||(Xt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=s;var A=_($n()),R=_(oi());function _(g){return g&&g.__esModule?g:{default:g}}var x=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,y=/^[-+]?[0-9]+$/;function s(g,m){(0,A.default)(g),m=m||{};var u=m.allow_leading_zeroes===!1?x:y,t=!m.hasOwnProperty("min")||(0,R.default)(m.min)||g>=m.min,o=!m.hasOwnProperty("max")||(0,R.default)(m.max)||g<=m.max,a=!m.hasOwnProperty("lt")||(0,R.default)(m.lt)||g<m.lt,n=!m.hasOwnProperty("gt")||(0,R.default)(m.gt)||g>m.gt;return u.test(g)&&t&&o&&a&&n}v.exports=C.default,v.exports.default=C.default}(Je,Je.exports)),Je.exports}var Qt;function ci(){return Qt||(Qt=1,function(v,C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=_;var A=R(li());function R(x){return x&&x.__esModule?x:{default:x}}function _(x){return(0,A.default)(x,{allow_leading_zeroes:!1,min:0,max:65535})}v.exports=C.default,v.exports.default=C.default}(Ke,Ke.exports)),Ke.exports}var di=ci();const ui=Tn(di),lt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function hi(){const{api:v}=Q(),{blocklet:C}=ie(),{t:A}=ne(),{confirmApi:R,confirmHolder:_}=Ee(),[x,y]=D.useState(!1),s=C?.meta?.did,g=Object.assign({...lt},C?.settings?.notification?.email||{}),{handleSubmit:m,control:u,formState:t,watch:o,reset:a}=fe({defaultValues:je(g,Object.keys(lt))}),n=pe({testReceiver:"",testReceiverError:""}),r=o("enabled"),c=E(async(w,O,$=!0)=>{try{y(!0);const{blocklet:I}=await v.configNotification({input:{did:s,notification:JSON.stringify({email:w})}}),q=Object.assign({...lt},I?.settings?.notification?.email||{});a(q),$&&z.success(A("common.saveSuccess"))}catch(I){if($)z.error(I.message||A("common.saveFailed"));else throw I}finally{y(!1)}}),i=E(async(w,O,$)=>{try{y(!0),t.isDirty&&await c(w,O,!1),await v.sendEmail({input:{did:s,receiver:$,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),z.success(A("notification.email.testSuccess"))}catch(I){z.error(I.message||A("notification.email.testfailed"))}finally{y(!1)}}),l=E((w,O)=>{n.testReceiver=localStorage.getItem("test-receiver")||"",n.testReceiverError="",R.open({title:A("notification.email.testSendEmail"),content:()=>e.jsx(P,{sx:{width:"300px"},children:e.jsx(N,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.email.inputTestReceiver"),value:n.testReceiver,onChange:$=>{n.testReceiver=$.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm($){const I=n.testReceiver?.trim();if(!I){n.testReceiverError=A("notification.email.receiverRequired");return}if(!it(I)){n.testReceiverError=A("notification.email.receiverInvalid");return}n.testReceiverError="",await i(w,O,I),$()},onCancel:()=>{y(!1)}})}),d=E(w=>{const O=w?.trim();return O?it(O)?!0:A("notification.email.fromInvalid"):A("notification.email.fromRequired")}),p=E(w=>{const O=w?.trim();return O?bt(O,{require_host:!1,protocols:[]})?!0:A("notification.email.hostInvalid"):A("notification.email.hostRequired")}),f=E(w=>w?ui(w)?!0:A("notification.email.portInvalid"):A("notification.email.portRequired")),k=E(w=>w?.trim()?!0:A("notification.email.userRequired")),S=E(w=>w?.trim()?!0:A("notification.email.passwordRequired")),h=E(w=>w?.trim()&&!bt(w,{protocols:["http","https"],require_protocol:!0})?A("notification.email.linkInvalid"):!0),b=E(w=>w?.trim()&&!it(w)?A("notification.email.emailInvalid"):!0),j=E(()=>!0);return e.jsxs(P,{children:[e.jsxs(mi,{component:"form",onSubmit:m(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.email.enable"),my:2.5,children:e.jsx(B,{name:"enabled",control:u,render:({field:w})=>e.jsx(se,{control:e.jsx(me,{checked:w.value,...w})})})}),e.jsx(M,{title:A("notification.email.from"),children:e.jsx(B,{name:"from",control:u,rules:{validate:r?d:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,label:A("notification.email.from"),error:!!t.errors[w.name],helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.host"),children:e.jsx(B,{name:"host",control:u,rules:{validate:r?p:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,error:!!t.errors[w.name],label:A("notification.email.host"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.port"),children:e.jsx(B,{name:"port",control:u,rules:{validate:r?f:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,type:"number",error:!!t.errors[w.name],label:A("notification.email.port"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.user"),children:e.jsx(B,{name:"user",control:u,rules:{validate:r?k:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,error:!!t.errors[w.name],label:A("notification.email.user"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.password"),children:e.jsx(B,{name:"password",control:u,rules:{validate:r?S:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",required:!0,type:"password",error:!!t.errors[w.name],label:A("notification.email.password"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.secure"),children:e.jsx(B,{name:"secure",control:u,rules:{validate:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(se,{control:e.jsx(me,{checked:w.value,...w,disabled:!r})})})})}),e.jsxs(ns,{children:[e.jsxs(ss,{expandIcon:e.jsx(is,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[A("notification.email.signature"),e.jsx(oe,{title:A("notification.email.signatureTooltip"),children:e.jsx(Cs,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(as,{children:[e.jsx(M,{title:A("notification.email.companyName"),children:e.jsx(B,{name:"companyName",control:u,rules:{validate:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyName"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.companyLink"),children:e.jsx(B,{name:"companyLink",control:u,rules:{validate:r?h:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyLink"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.companyAddress"),children:e.jsx(B,{name:"companyAddress",control:u,rules:{validate:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",error:!!t.errors[w.name],label:A("notification.email.companyAddress"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})}),e.jsx(M,{title:A("notification.email.supportEmail"),children:e.jsx(B,{name:"supportEmail",control:u,rules:{validate:r?b:j},render:({field:w})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...w,size:"small",type:"email",error:!!t.errors[w.name],label:A("notification.email.supportEmail"),helperText:t.errors[w.name]?.message||" ",disabled:!r})})})})]})]}),e.jsxs(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(J,{variant:"outlined",loading:x,color:"warning",onClick:m(l),disabled:!r||x,children:A("common.runTest")}),e.jsx(J,{type:"submit",variant:"contained",loading:x,disabled:!t.isDirty||x,children:A("common.save")})]})]}),_]})}const mi=ve(ae)``,ct={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function fi(){const{api:v}=Q(),{blocklet:C}=ie(),{t:A}=ne(),{confirmApi:R,confirmHolder:_}=Ee(),[x,y]=D.useState(!1),s=C?.meta?.did,g=Object.assign({...ct},C?.settings?.notification?.pushKit||{}),{handleSubmit:m,control:u,formState:t,watch:o,reset:a}=fe({defaultValues:je(g,Object.keys(ct))}),n=pe({testReceiver:"",testReceiverError:""}),r=o("enabled"),c=E(async(f,k,S=!0)=>{try{y(!0);const{blocklet:h}=await v.configNotification({input:{did:s,notification:JSON.stringify({pushKit:f})}}),b=Object.assign({...ct},h?.settings?.notification?.pushKit||{});a(b),S&&z.success(A("common.saveSuccess"))}catch(h){if(S)z.error(h.message||A("common.saveFailed"));else throw h}finally{y(!1)}}),i=E(async(f,k)=>{try{y(!0),t.isDirty&&await c(f,k,!1);const S=(C?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,h=En(ke(S,V.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:C?.meta?.version,t:new Date(C?.updatedAt||0).getTime()}),b={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:C?.appDid,fullName:C?.meta?.title,avatar:h}}}};await v.sendPush({input:{did:s,receiver:n.testReceiver,notification:JSON.stringify(b)}}),z.success(A("notification.pushKit.testSuccess"))}catch(S){z.error(S.message||A("notification.pushKit.testfailed"))}finally{y(!1)}}),l=E((f,k)=>{n.testReceiverError="",R.open({title:A("notification.pushKit.testSend"),content:()=>e.jsx(P,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(N,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.pushKit.inputTestReceiver"),value:n.testReceiver,onChange:S=>{n.testReceiver=S.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm(S){if(!n.testReceiver?.trim()){n.testReceiverError=A("notification.pushKit.receiverRequired");return}n.testReceiverError="",await i(f,k),S()},onCancel:()=>{y(!1)}})}),d=E(f=>{const k=f?.trim();return k?bt(k)?!0:A("notification.pushKit.endpointInvalid"):A("notification.pushKit.endpointRequired")}),p=E(()=>!0);return e.jsxs(P,{children:[e.jsxs(pi,{component:"form",onSubmit:m(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.pushKit.enable"),my:2.5,children:e.jsx(B,{name:"enabled",control:u,render:({field:f})=>e.jsx(se,{control:e.jsx(me,{checked:f.value,...f})})})}),e.jsx(M,{title:A("notification.pushKit.endpoint"),children:e.jsx(B,{name:"endpoint",control:u,rules:{validate:r?d:p},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",required:!0,label:A("notification.pushKit.endpoint"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})})}),e.jsxs(M,{title:A("notification.pushKit.customOptions"),children:[e.jsx(B,{name:"did",control:u,render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:A("notification.pushKit.did"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})}),e.jsx(B,{name:"pushPath",control:u,render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:A("notification.pushKit.pushPath"),error:!!t.errors[f.name],helperText:t.errors[f.name]?.message||" ",disabled:!r})})})]}),e.jsxs(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(J,{variant:"outlined",loading:x,color:"warning",onClick:m(l),disabled:!r||x,children:A("common.runTest")}),e.jsx(J,{type:"submit",variant:"contained",loading:x,disabled:!t.isDirty||x,children:A("common.save")})]})]}),_]})}const pi=ve(ae)``,er=[{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Wallet"}),value:"wallet"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Webhooks"}),value:"webhooks"}];function gi(){const[v,C]=D.useState(er[0].value),{t:A}=D.useContext(he),R=_e(()=>({email:e.jsx(hi,{}),pushKit:e.jsx(fi,{}),wallet:e.jsx(X,{variant:"body1",children:A("notification.wallet.description")}),webhooks:e.jsx(X,{variant:"body1",children:A("notification.webhooks.description")})}),[A]),_=D.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(P,{children:[e.jsx(Ve,{variant:"card",tabs:er,current:v,onChange:C}),e.jsx(P,{style:_,children:R[v]})]})}const dt={domain:"",clientId:"",clientSecret:""};function Er({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...dt},_?.settings?.authentication?.auth0||{}),m=(_.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(dt))}),n=E(async p=>{try{const{blocklet:f}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,auth0:{...p,order:A.auth0?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),k=Object.assign({...dt},f?.settings?.authentication?.auth0||{});a(k),z.success(x("common.saveSuccess")),C()}catch(f){z.error(f.message||x("common.saveFailed"))}}),r=E(p=>p?.trim()?!0:x("authentication.auth0.domainDescription")),c=E(p=>p?.trim()?!0:x("authentication.auth0.clientIdDescription")),i=E(p=>p?.trim()?!0:x("authentication.auth0.clientSecretDescription")),l=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[y]),d=ke(m,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[l,e.jsx(P,{component:re,icon:Ot,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[d,e.jsx(Ue,{locale:y,content:d,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.auth0.domain"),children:e.jsx(B,{name:"domain",control:t,rules:{validate:r},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",label:x("authentication.auth0.domain"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.auth0.clientId"),children:e.jsx(B,{name:"clientId",control:t,rules:{validate:c},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",label:x("authentication.auth0.clientId"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.auth0.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:t,rules:{validate:i},render:({field:p})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...p,size:"small",type:"password",label:x("authentication.auth0.clientSecret"),error:!!o.errors[p.name],helperText:o.errors[p.name]?.message||" "})})})})]})})}Er.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ut={clientId:"",clientSecret:""};function Ir({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...ut},_?.settings?.authentication?.github||{}),m=(_.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(ut))}),n=E(async d=>{try{const{blocklet:p}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,github:{...d,order:A.github?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),f=Object.assign({...ut},p?.settings?.authentication?.github||{});a(f),z.success(x("common.saveSuccess")),C()}catch(p){z.error(p.message||x("common.saveFailed"))}}),r=E(d=>d?.trim()?!0:x("authentication.github.clientIdDescription")),c=E(d=>d?.trim()?!0:x("authentication.github.clientSecretDescription")),i=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[y]),l=ke(m,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(P,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(P,{component:re,icon:Ot,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ue,{locale:y,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.github.clientId"),children:e.jsx(B,{name:"clientId",control:t,rules:{validate:r},render:({field:d})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",label:x("authentication.github.clientId"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.github.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",type:"password",label:x("authentication.github.clientSecret"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})})]})})}Ir.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ht={showQrcode:!0};function Lr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=Object.assign({...ht},_?.settings?.authentication?.wallet||{}),{handleSubmit:g,control:m,reset:u}=fe({defaultValues:je(s,Object.keys(ht))}),t=E(async o=>{try{const{blocklet:a}=await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,wallet:{...o,order:A.wallet?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),n=Object.assign({...ht},a?.settings?.authentication?.wallet||{});u(n),z.success(x("common.saveSuccess")),C()}catch(a){z.error(a.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:g(t)}),[g,t]),e.jsx(P,{children:e.jsx("form",{children:e.jsx(M,{title:x("authentication.wallet.showQrcode"),children:e.jsx(B,{name:"showQrcode",control:m,render:({field:o})=>e.jsx(se,{control:e.jsx(gs,{sx:{ml:1},checked:o.value,...o})})})})})})}Lr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function Dr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=E(async()=>{try{await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,email:{order:A.email?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),z.success(x("common.saveSuccess")),C()}catch(g){z.error(g.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:s}),[s]),e.jsxs(P,{children:[x("authentication.emailLoginDescription"),e.jsx("br",{}),x("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(P,{component:In,to:ke(V.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(le,{size:"small",variant:"outlined",children:x("authentication.gotoEmailNotification")})})]})}Dr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function qr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x}=ne(),y=_?.meta?.did,s=E(async()=>{try{await R.configAuthentication({input:{did:y,authentication:JSON.stringify({...A,passkey:{order:A.passkey?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),z.success(x("common.saveSuccess")),C()}catch(g){z.error(g.message||x("common.saveFailed"))}});return D.useImperativeHandle(v,()=>({submit:s}),[s]),null}qr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const mt={clientId:"",clientSecret:""};function Mr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...mt},_?.settings?.authentication?.google||{}),m=(_.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(mt))}),n=E(async d=>{try{const{blocklet:p}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,google:{...d,order:A.google?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),f=Object.assign({...mt},p?.settings?.authentication?.google||{});a(f),z.success(x("common.saveSuccess")),C()}catch(p){z.error(p.message||x("common.saveFailed"))}}),r=E(d=>d?.trim()?!0:x("authentication.google.clientIdDescription")),c=E(d=>d?.trim()?!0:x("authentication.google.clientSecretDescription")),i=_e(()=>y==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[y]),l=ke(m,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(P,{component:re,icon:Ot,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ue,{locale:y,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.google.clientId"),children:e.jsx(B,{name:"clientId",control:t,rules:{validate:r},render:({field:d})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",label:x("authentication.google.clientId"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.google.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...d,size:"small",type:"password",label:x("authentication.google.clientSecret"),error:!!o.errors[d.name],helperText:o.errors[d.name]?.message||" "})})})})]})})}Mr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ft={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Br({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...ft},_?.settings?.authentication?.apple||{}),m=(_.environments||[]).find(f=>f.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(ft))}),n=E(async f=>{try{const{blocklet:k}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,apple:{...f,order:A.apple?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),S=Object.assign({...ft},k?.settings?.authentication?.apple||{});a(S),z.success(x("common.saveSuccess")),C()}catch(k){z.error(k.message||x("common.saveFailed"))}}),r=E(f=>f?.trim()?!0:x("authentication.apple.teamIdDescription")),c=E(f=>f?.trim()?!0:x("authentication.apple.serviceIdDescription")),i=E(f=>f?.trim()?!0:x("authentication.apple.keyIdDescription")),l=E(f=>f?.trim()?!0:x("authentication.apple.authKeyDescription")),d=E(f=>f?.trim()?!0:x("authentication.apple.bundleIdDescription")),p=ke(m,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(P,{children:e.jsxs("form",{children:[e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[p,e.jsx(Ue,{locale:y,content:p,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.apple.teamId"),children:e.jsx(B,{name:"teamId",control:t,rules:{validate:r},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.teamId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.bundleId"),children:e.jsx(B,{name:"bundleId",control:t,rules:{validate:d},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.bundleId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.serviceId"),children:e.jsx(B,{name:"serviceId",control:t,rules:{validate:c},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.serviceId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.keyId"),children:e.jsx(B,{name:"keyId",control:t,rules:{validate:i},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",label:x("authentication.apple.keyId"),error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.apple.authKey"),children:e.jsx(B,{name:"authKey",control:t,rules:{validate:l},render:({field:f})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...f,size:"small",type:"password",label:x("authentication.apple.authKey"),multiline:!0,rows:4,error:!!o.errors[f.name],helperText:o.errors[f.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Br.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const pt={clientId:"",clientSecret:""};function zr({ref:v=null,onSuccess:C=G,sortMaps:A={}}){const{api:R}=Q(),{blocklet:_}=ie(),{t:x,locale:y}=ne(),s=_?.meta?.did,g=Object.assign({...pt},_?.settings?.authentication?.twitter||{}),m=(_.environments||[]).find(l=>l.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:o,reset:a}=fe({defaultValues:je(g,Object.keys(pt))}),n=E(async l=>{try{const{blocklet:d}=await R.configAuthentication({input:{did:s,authentication:JSON.stringify({...A,twitter:{...l,order:A.twitter?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),p=Object.assign({...pt},d?.settings?.authentication?.twitter||{});a(p),z.success(x("common.saveSuccess")),C()}catch(d){z.error(d.message||x("common.saveFailed"))}}),r=E(l=>l?.trim()?!0:x("authentication.twitter.clientIdDescription")),c=E(l=>l?.trim()?!0:x("authentication.twitter.clientSecretDescription")),i=ke(m,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return D.useImperativeHandle(v,()=>({submit:u(n)}),[u,n]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(M,{title:x("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[i,e.jsx(Ue,{locale:y,content:i,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:x("authentication.twitter.clientId"),children:e.jsx(B,{name:"clientId",control:t,rules:{validate:r},render:({field:l})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...l,size:"small",label:x("authentication.twitter.clientId"),error:!!o.errors[l.name],helperText:o.errors[l.name]?.message||" "})})})}),e.jsx(M,{title:x("authentication.twitter.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:t,rules:{validate:c},render:({field:l})=>e.jsx(U,{fullWidth:!0,children:e.jsx(N,{...l,size:"small",type:"password",label:x("authentication.twitter.clientSecret"),error:!!o.errors[l.name],helperText:o.errors[l.name]?.message||" "})})})})]})})}zr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const yi={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'},rt={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},nt={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function Hr({id:v,title:C,index:A,onBegin:R=G,onMove:_,onEnd:x,onEditItem:y=G,onDeleteItem:s=G,disableDelete:g=!1,icon:m=null}){const u=D.useRef(null),t=D.useRef(null),[{handlerId:o},a]=ys({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,l){if(!u.current)return;const d=i.index,p=A;if(d===p)return;const f=u.current?.getBoundingClientRect(),k=t.current?.getBoundingClientRect(),S=(k.bottom-k.top)/2,b=l.getClientOffset().y-f.top;d<p&&b<S||d>p&&b>S||(_(d,p),i.index=p)}}),[{isDragging:n},r]=xs({item:{index:A,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),begin:R,end:x});r(t),a(u);const c=n?.3:1;return e.jsx(P,{ref:u,children:e.jsxs(P,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":o,children:[e.jsxs(P,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(P,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(re,{fontSize:20,icon:yi})}),e.jsx(P,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:m}),e.jsx(X,{sx:{flex:1},children:C}),e.jsx(ce,{size:"small",color:"primary",onClick:()=>{y(v)},children:e.jsx(re,{icon:nt})}),e.jsx(ce,{size:"small",color:"error",onClick:()=>{s(v)},disabled:g,children:e.jsx(re,{icon:rt})})]}),e.jsx(te,{})]})})}Hr.propTypes={title:T.string.isRequired,id:T.string.isRequired,index:T.number.isRequired,onBegin:T.func,onMove:T.func.isRequired,onEnd:T.func.isRequired,onEditItem:T.func,onDeleteItem:T.func,disableDelete:T.bool,icon:T.any};function Nr({ref:v=null,providers:C=[],sortMaps:A={}}){const R=D.useRef(null),{t:_}=D.useContext(he),x=$e(),{control:y,watch:s,setValue:g,reset:m}=fe({mode:"onChange",defaultValues:{provider:""}}),u=s("provider"),t=C.find(p=>p.name===u),o=Ln(t),a=x?.transitions?.duration?.leavingScreen||300,n=pe({initMode:"add",mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?_("authentication.updateLoginProvider",{provider:o.current?.title}):_("authentication.addLoginProvider")}}),r=E(()=>{m(),n.mode="add",n.initMode="add"}),c=E(()=>{n.show=!1,setTimeout(()=>{r()},a)}),i=E((p,f=null)=>{if(n.show=!0,f)n.initMode="edit",n.mode="edit",g("provider",f.provider);else{const k=C.find(S=>S.enabled===!1)?.name||C[0]?.name||de.WALLET;g("provider",k)}p?n.callback=p:n.callback=G});D.useImperativeHandle(v,()=>({open:i,close:c}),[i,c]);const l=E(()=>{R.current.submit()}),d=C.map(p=>({value:p.name,title:p.title,description:p.enabled?_("common.enabled"):""}));return D.useEffect(()=>{t?.enabled?n.mode="edit":n.mode="add"},[t?.enabled]),e.jsxs(we,{open:n.show,title:n.dialogTitle,onClose:c,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:!u,children:n.mode==="add"?_("common.confirm"):_("common.update")}),children:[n.initMode==="edit"?null:e.jsx(B,{name:"provider",control:y,render:({field:p})=>e.jsx(Ye,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:_("authentication.chooseProvider"),placeholder:_("authentication.chooseProviderPlaceholder"),options:d,...Pe(p,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(P,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:t?.component&&e.jsx(t.component,{ref:R,onSuccess:c,sortMaps:A})})]})}Nr.propTypes={ref:T.any,providers:T.array,sortMaps:T.object};function xi(){const{confirmApi:v,confirmHolder:C}=Ee(),A=D.useRef(),{t:R}=ne(),{api:_}=Q(),{blocklet:x}=ie(),y=x?.meta?.did,s=x?.settings?.authentication||{},g=[{name:de.WALLET,title:be[de.WALLET],icon:e.jsx(Re,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Lr},{name:de.EMAIL,title:be[de.EMAIL],icon:e.jsx(Re,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:Dr},{name:de.PASSKEY,title:be[de.PASSKEY],icon:e.jsx(Re,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:qr},{name:de.GOOGLE,title:be[de.GOOGLE],icon:e.jsx(Re,{provider:"google",sx:{width:20,height:20}}),component:Mr},{name:de.APPLE,title:be[de.APPLE],icon:e.jsx(Re,{provider:"apple",sx:{width:20,height:20}}),component:Br},{name:de.GITHUB,title:be[de.GITHUB],icon:e.jsx(Re,{provider:"github",sx:{width:20,height:20}}),component:Ir},{name:de.TWITTER,title:be[de.TWITTER],icon:e.jsx(Re,{provider:"twitter",sx:{width:20,height:20}}),component:zr},{name:de.AUTH0,title:be[de.AUTH0],icon:e.jsx(Re,{provider:"auth0",sx:{width:20,height:20}}),component:Er,hidden:!0}].map(p=>({...p,enabled:s[p.name]?.enabled??!1,order:s[p.name]?.order??null})),m=g.filter(p=>p.enabled),u=m.sort((p,f)=>!Me(p?.order)&&!Me(f?.order)?p.order-f.order:Me(p?.order)?1:-1),t=u.reduce((p,f,k)=>Object.assign(p,{[f.name]:{order:k}}),{}),o=pe(u.reduce((p,f,k)=>Object.assign(p,{[f.name]:k}),{})),a=[...m].sort((p,f)=>o[p.name]-o[f.name]),n={};typeof window<"u"&&(n.context=window);const r=E((p,f)=>{const k=a[p],S=a[f];o[k.name]=f,o[S.name]=p}),c=E(async()=>{const p=Object.keys(o).reduce((f,k)=>(f[k]={order:o[k]},f),{});await _.configAuthentication({input:{did:y,authentication:JSON.stringify(p)}})}),i=()=>{A.current.open(()=>{A.current.close()})},l=E(p=>{A.current.open(G,{provider:p})}),d=E(p=>{v.open({title:R("authentication.deleteLoginProvider",{provider:be[p]}),content:R("authentication.deleteLoginProviderDescription",{provider:be[p]}),confirmButtonText:R("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:R("common.cancel"),async onConfirm(f){try{await _.configAuthentication({input:{did:y,authentication:JSON.stringify({[p]:{enabled:!1,order:null}})}}),delete o[p],z.success(R("common.deleteSuccess")),f()}catch(k){z.error(k.message||R("common.deleteFailed"))}}})});return e.jsxs(P,{children:[e.jsx(J,{variant:"contained",onClick:i,sx:{mb:1},children:R("authentication.addLoginProvider")}),e.jsx(vs,{backend:bs,...n,children:a.map((p,f)=>e.jsx(Hr,{index:f,id:p.name,title:p.title,icon:p.icon,onMove:r,onEnd:c,onEditItem:l,onDeleteItem:d,disableDelete:u.length<=1,children:p.component},p.name))}),e.jsx(Nr,{ref:A,providers:g,sortMaps:t}),C]})}const Te={ttl:V.SESSION_TTL,cacheTtl:V.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function ye(v){return e.jsx(xr,{...v,sx:{transform:"scale(0.75)"}})}function gt(v,C=!1){const A=C?v.ttl*86400:v.ttl/86400;return{...v,ttl:A}}function vi(){const{api:v}=Q(),{blocklet:C}=ie(),A=C?.meta?.did,R=dr({},Te,C?.settings?.session||{});Me(R.ttl)&&(R.ttl=Te.ttl),Me(R.cacheTtl)&&(R.cacheTtl=Te.cacheTtl),R.phone||(R.phone=Te.phone),R.email||(R.email=Te.email),Me(R.enableBlacklist)&&(R.enableBlacklist=Te.enableBlacklist);const{handleSubmit:_,control:x,formState:y,reset:s,watch:g}=fe({defaultValues:je(gt(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:m}=ne(),u=g("email.enabled"),t=g("phone.enabled"),o=g("email.enableDomainBlackList"),a=g("email.enableDomainWhiteList"),{fields:n,append:r,remove:c}=Ft({control:x,name:"email.domainBlackList"}),{fields:i,append:l,remove:d}=Ft({control:x,name:"email.domainWhiteList"}),p=E(async f=>{try{const{blocklet:k}=await v.updateAppSessionConfig({input:{did:A,config:Pe(gt(f,!0),["phone"])}}),S=Object.assign({},Te,je(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));s(gt(S)),z.success(m("common.configSuccess"))}catch(k){z.error(k.message)}});return e.jsx(bi,{onSubmit:_(p),children:e.jsxs(ae,{direction:"column",sx:{gap:6},children:[e.jsxs(P,{children:[e.jsxs(P,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.profile")}),e.jsx(P,{component:te,sx:{my:3}})]}),e.jsxs(ae,{sx:{gap:2},children:[e.jsx(M,{title:m("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:m("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:m("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enabled",control:x,render:({field:f})=>e.jsx(ye,{...f,checked:f.value})})})}),u&&e.jsxs(ae,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(M,{title:m("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.requireVerified",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.requireUnique",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.trustOauthProviders",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enableDomainBlackList",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),o&&e.jsxs(P,{children:[n.map((f,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(B,{name:`email.domainBlackList.${k}`,control:x,render:S=>e.jsx(N,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ce,{onClick:()=>c(k),children:e.jsx(Zt,{})})]},f.id)),e.jsx(le,{startIcon:e.jsx(Wt,{}),onClick:()=>r(""),children:m("blocklet.config.session.addDomain")})]}),e.jsx(M,{title:m("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enableDomainWhiteList",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),a&&e.jsxs(P,{children:[i.map((f,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(B,{name:`email.domainWhiteList.${k}`,control:x,render:S=>e.jsx(N,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ce,{onClick:()=>d(k),children:e.jsx(Zt,{})})]},f.id)),e.jsx(le,{startIcon:e.jsx(Wt,{}),onClick:()=>l(""),children:m("blocklet.config.session.addDomain")})]})]}),e.jsxs(P,{sx:{display:"none"},children:[e.jsx(M,{title:m("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.enabled",control:x,disabled:!0,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),t&&e.jsxs(ae,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(M,{title:m("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.requireVerified",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})}),e.jsx(M,{title:m("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.requireUnique",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})})]})]})]})]}),e.jsxs(P,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.period")}),e.jsx(P,{component:te,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(B,{name:"ttl",control:x,rules:{min:1,max:30},render:({field:f})=>e.jsx(U,{fullWidth:!0,sx:{mb:2},children:e.jsx(M,{title:m("blocklet.config.session.ttl",{day:f.value}),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(hs,{...f,defaultValue:7,step:1,marks:[{value:1,label:m("blocklet.config.session.day",{day:1})},{value:7,label:m("blocklet.config.session.days",{day:7})},{value:14,label:m("blocklet.config.session.days",{day:14})},{value:21,label:m("blocklet.config.session.days",{day:21})},{value:30,label:m("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(P,{children:[e.jsx(X,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.session.experimentalSettings")}),e.jsx(P,{component:te,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(M,{title:m("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"enableBlacklist",control:x,render:({field:f})=>e.jsx(se,{sx:{ml:0},control:e.jsx(ye,{...f,checked:f.value})})})})})})]}),e.jsx(P,{children:e.jsx(le,{type:"submit",variant:"contained",disabled:!y.isDirty,children:m("common.save")})})]})})}const bi=ve.form`
|
|
83
83
|
max-width: 1536px;
|
|
84
84
|
|
|
85
85
|
.advanced-config {
|
|
@@ -119,7 +119,7 @@ ${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
119
119
|
.form-item {
|
|
120
120
|
margin-top: 0;
|
|
121
121
|
}
|
|
122
|
-
`,ji={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var yt,tr;function _i(){if(tr)return yt;tr=1;const{DEFAULT_IP_DOMAIN_SUFFIX:v,SLOT_FOR_IP_DNS_SITE:C,DEFAULT_DID_DOMAIN:A}=Dn(),{encode:R}=qn();return yt={getIpDnsDomainForBlocklet:y=>`${R(y.meta.did)}-${C}.${v}`,getDidDomainForBlocklet:({did:y,didDomain:s=A})=>`${R(y)}.${s}`},yt}var wi=_i();function Fr({ref:v=null}){const{t:C}=D.useContext(he),{blocklet:A}=ie(),{api:R}=Q(),_=pe({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:G}),y=$e()?.transitions?.duration?.leavingScreen||300,s=E(()=>{_.mode="view",_.data={},_.callback=G}),g=E(()=>{_.show=!1,setTimeout(()=>{s()},y)}),m=E(r=>{_.mode="view",_.show=!0,_.data=r}),u=E((r,c=G)=>{_.mode="approve",_.show=!0,_.data=r,_.callback=c});D.useImperativeHandle(v,()=>({open:m,close:g,approve:u}),[m,g,u]);const t=_e(()=>{if(!_.show)return[];_.data.migratedFrom=[_.data.appId,_.data.appPid];const r=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return _.data.isMaster!==!1&&qs(r,"appliedAt","status"),r.map(c=>{const i=C(`federated.info.${c}`);let l=_.data[c];if(c==="appName"&&_.data.isMaster&&(l=e.jsxs(O,{children:[e.jsx(ur,{component:wr}),l]})),["appId","appPid","serverId"].includes(c)&&(l=e.jsx(jt,{children:l})),["appUrl"].includes(c)&&(l=e.jsx(O,{component:"a",href:l,target:"_blank",children:l})),["appLogo"].includes(c)){const d=ke(`https://${wi.getDidDomainForBlocklet({did:_.data.appPid})}`,U.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const p=new URL(d);p.searchParams.set("imageFilter","resize"),p.searchParams.set("w","80"),p.searchParams.set("h","80"),l=e.jsx("img",{src:p.href,width:"60",height:"60",alt:_.data.appName})}catch{l=e.jsx("img",{src:d,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(l=l&&C(`federated.status.${l}`)),c==="migratedFrom"&&(l=(_.data.migratedFrom||[]).filter(f=>![_.data.appId,_.data.appPid].includes(f)).map(f=>e.jsx(jt,{children:f}))),Mn(l)&&(l="-"),{name:i,value:l}})},[_.data]),o=_.mode==="approve",a=E(async()=>{try{_.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:A.appPid,status:"rejected"}}),g(),_?.callback(!1)}finally{_.loadingReject=!1}}),n=E(async()=>{try{_.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:A.appPid,status:"approved"}}),g(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(we,{open:_.show,title:C(o?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:g,actions:o?e.jsxs(e.Fragment,{children:[e.jsxs(le,{color:"error",variant:"contained",onClick:a,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(ze,{size:16,color:"grey"}):null,C("common.reject")]}),e.jsxs(le,{variant:"contained",onClick:n,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(ze,{size:16,color:"grey"}):null,C("common.approve")]})]}):e.jsx(le,{variant:"outlined",onClick:g,children:C("common.close")}),children:t.map(r=>e.jsx(yr,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:r.name,children:r.value},r.name))})}Fr.propTypes={ref:T.any};function Lt({ref:v=null}){const A=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=D.useContext(he),_=pe({show:!1,data:{link:""}}),x=E(()=>{_.data.link=""}),y=E(()=>{_.show=!1,setTimeout(()=>{x()},A)}),s=E(({link:m})=>{_.show=!0,_.data.link=m});D.useImperativeHandle(v,()=>({open:s,close:y}),[s,y]);const g=E(()=>{zn(_.data.link),y()});return e.jsxs(we,{open:_.show,title:R("federated.joinFederatedLogin"),onClose:y,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:g,children:R("common.copyAndClose")}),children:[e.jsx(O,{sx:{mb:2},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(O,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(gr,{children:_.data.link})})]})}Lt.propTypes={ref:T.any};function Zr({mode:v="member"}){const C=D.useRef(null),A=D.useRef(null),{t:R,locale:_}=D.useContext(he),{blocklet:x,actions:{refreshBlocklet:y}}=ie(),{confirmApi:s,confirmHolder:g}=Ee(),{api:m}=Q(),u=x.settings.federated?.sites||[],t=x.settings.federated?.config||{},o=t.isMaster!==!1,a=u.find(w=>w.appPid===x.appPid),n=pe({loadingSync:!1}),r=E(w=>{A.current?.open(w)}),c=E(w=>{A.current?.approve(w,y)}),i=E(w=>{s.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await m.quitFederatedLogin({input:{did:x.appPid,targetDid:w.appPid}}),P()}})}),l=E(w=>{s.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await m.auditFederatedLogin({input:{memberPid:w.appPid,did:x.appPid,status:"revoked"}}),P()}})}),d=E(w=>{s.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(P){await m.auditFederatedLogin({input:{memberPid:w.appPid,did:x.appPid,status:"approved"}}),P()}})}),p=_e(()=>{const w=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:P=>{const $=u[P],I=$.isMaster!==!1;return e.jsx(O,{sx:{display:"inline-block"},children:e.jsxs(O,{component:"a",href:$.appUrl,target:"_blank",onClick:q=>{q.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[I&&e.jsx(ur,{component:wr,style:{marginRight:"4px"}}),$.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:P=>{const $=u[P];return e.jsx(jt,{children:$.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:P=>{const $=u[P],I=$.isMaster!==!1;return e.jsx(O,{children:I?"-":R(`federated.status.${$.status}`)})}}}];return o&&w.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:P=>{const $=u[P],I=$.isMaster!==!1;return e.jsx(O,{sx:{display:"flex",gap:1},children:I?e.jsxs(e.Fragment,{children:[$.status==="rejected"&&e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation()},children:R("federated.status.rejected")}),$.status==="revoked"&&e.jsx(J,{variant:"contained",color:"secondary",size:"small",onClick:q=>{q.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation(),i($)},children:R("federated.quitMember")},"quiteSite"),$.status==="pending"&&e.jsx(J,{variant:"contained",color:"primary",size:"small",onClick:q=>{q.stopPropagation(),c($)},children:R("federated.status.pending")},"auditSite"),$.status==="approved"&&e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation(),l($)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),$.status==="revoked"&&e.jsx(J,{variant:"contained",color:"warning",size:"small",onClick:q=>{q.stopPropagation(),d($)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),w},[t.appId,u,o,R]),f=_e(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(w,{dataIndex:P}){const $=u[P];r($)}}),[]),k=E(()=>{const w=x.environments.find(P=>P.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);w?.value?C.current?.open({link:w.value}):B.error(R("federated.failedToGetFederatedLoginLink"))},[x.site?.domainAliases?.[0]?.href]),S=E(()=>{s.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(w){await m.quitFederatedLogin({input:{did:x.appPid}}),w()}})}),h=E(()=>{s.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(w){await m.disbandFederatedLogin({input:{did:x.appPid}}),w()}})}),b=E(async()=>{try{n.loadingSync=!0,await Promise.all([await m.syncFederatedConfig({input:{did:x.appPid}}),Bn(500)]),B.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),j=[];return a.status!=="pending"&&j.push(e.jsx(oe,{title:R("federated.syncConfig"),children:e.jsx(ce,{size:"small",onClick:b,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(re,{icon:ji,style:{fontSize:24}})},"syncConfig")})),v==="master"?(j.push(e.jsx(J,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),j.push(e.jsx(J,{color:"error",size:"small",variant:"contained",onClick:h,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):j.push(e.jsx(J,{size:"small",variant:"contained",color:"error",onClick:S,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(tt,{className:"main-table",locale:_,data:u,columns:p,customButtons:j,title:e.jsx(O,{className:"table-toolbar-left",children:R("authentication.federated")}),options:f}),g,e.jsx(Lt,{ref:C}),e.jsx(Fr,{ref:A})]})}Zr.propTypes={mode:T.oneOf(["member","master"])};function Wr({ref:v=null}){const{t:C}=D.useContext(he),{api:A}=Q(),{blocklet:R}=ie(),_=R?.appPid,y=$e()?.transitions?.duration?.leavingScreen||300,s=pe({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:G}),g=E(()=>{s.appUrl="",s.appUrlError="",s.callback=G}),m=E(()=>{s.show=!1,setTimeout(()=>{g()},y)}),u=E((a=G)=>{s.show=!0,s.callback=a});D.useImperativeHandle(v,()=>({open:u,close:m}),[u,m]);const t=E(a=>{if(!a)throw new Error(C("federated.federatedJoinAppUrlRequired"));if(!Hn(a))throw new Error(C("federated.federatedJoinAppUrlInvalid"))}),o=E(async()=>{try{t(s.appUrl),s.loading=!0;const a=await A.joinFederatedLogin({input:{did:_,appUrl:s.appUrl}});s.show=!1,m(),s?.callback(a)}catch(a){s.appUrlError=a.message}finally{s.loading=!1}});return e.jsxs(we,{open:s.show,title:C("federated.joinFederatedLogin"),onClose:m,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:o,disabled:s.loading,children:[s.loading?e.jsx(ze,{size:16,sx:{mr:1},color:"grey"}):null,C("common.confirm")]}),children:[e.jsx(O,{sx:{mb:1},children:C("federated.joinFederatedLoginDescription")}),e.jsx(N,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:C("federated.federatedJoinAppUrl"),label:C("federated.federatedJoinAppUrl"),value:s.appUrl,error:!!s.appUrlError,helperText:s.appUrlError||"eg: https://www.arcblock.io",onChange:a=>{s.appUrl=a.target.value}})]})}Wr.propTypes={ref:T.any};function ki(){const{t:v}=D.useContext(he);return e.jsxs(ae,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(_s,{fontSize:"large",color:"primary"}),e.jsxs(O,{children:[e.jsx(X,{variant:"h6",gutterBottom:!0,children:v("federated.title")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:v("federated.description")}),e.jsx(Nn,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:v("federated.link")})]})]})}function Si(){const v=D.useRef(null),C=D.useRef(null),{t:A}=D.useContext(he),{blocklet:R,actions:{refreshBlocklet:_}}=ie(),x=E(()=>{const s=R.site?.domainAliases?.[0]?.href;if(s)try{const g=new URL(s);v.current?.open({link:g.origin})}catch{B.error(A("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),y=E(()=>{C.current?.open(()=>{_()})});if(R.settings.federated?.sites.length>0){const s=R.settings.federated?.config.isMaster!==!1;return e.jsx(Zr,{mode:s?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(O,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(ki,{}),e.jsx(te,{sx:{width:1}}),e.jsxs(ae,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(J,{variant:"contained",onClick:x,sx:{width:1},children:A("federated.inviteJoinFederatedLogin")}),e.jsx(J,{variant:"outlined",onClick:y,sx:{width:1},children:A("federated.joinFederatedLogin")})]})]})}),e.jsx(Lt,{ref:v}),e.jsx(Wr,{ref:C})]})}const rr={showDidColor:!0,showAppInfo:!0};function nr(v){return e.jsx(xr,{...v,sx:{transform:"scale(0.75)"}})}function Ci(){const{api:v}=Q(),{blocklet:C}=ie(),A=C?.meta?.did,{handleSubmit:R,control:_,formState:x,reset:y}=fe({defaultValues:dr({},rr,C?.settings?.didConnect||{})}),{t:s}=ne(),g=E(async m=>{try{const{blocklet:u}=await v.configDidConnect({input:{did:A,didConnect:JSON.stringify(m)}}),t=Object.assign({},rr,u?.settings?.didConnect||{});y(t),B.success(s("common.configSuccess"))}catch(u){B.error(u.message)}});return e.jsx(Ri,{onSubmit:R(g),children:e.jsxs(ae,{direction:"column",sx:{gap:4},children:[e.jsx(O,{children:e.jsxs(ae,{sx:{gap:2},children:[e.jsx(M,{title:s("authentication.didConnect.showDidColor"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"showDidColor",control:_,render:({field:m})=>e.jsx(nr,{...m,checked:m.value})})})}),e.jsx(M,{title:s("authentication.didConnect.showAppInfo"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"showAppInfo",control:_,render:({field:m})=>e.jsx(nr,{...m,checked:m.value})})})})]})}),e.jsx(O,{children:e.jsx(le,{type:"submit",variant:"contained",disabled:!x.isDirty,children:s("common.save")})})]})})}const Ri=ve.form`
|
|
122
|
+
`,ji={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var yt,tr;function _i(){if(tr)return yt;tr=1;const{DEFAULT_IP_DOMAIN_SUFFIX:v,SLOT_FOR_IP_DNS_SITE:C,DEFAULT_DID_DOMAIN:A}=Dn(),{encode:R}=qn();return yt={getIpDnsDomainForBlocklet:y=>`${R(y.meta.did)}-${C}.${v}`,getDidDomainForBlocklet:({did:y,didDomain:s=A})=>`${R(y)}.${s}`},yt}var wi=_i();function Fr({ref:v=null}){const{t:C}=D.useContext(he),{blocklet:A}=ie(),{api:R}=Q(),_=pe({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:G}),y=$e()?.transitions?.duration?.leavingScreen||300,s=E(()=>{_.mode="view",_.data={},_.callback=G}),g=E(()=>{_.show=!1,setTimeout(()=>{s()},y)}),m=E(r=>{_.mode="view",_.show=!0,_.data=r}),u=E((r,c=G)=>{_.mode="approve",_.show=!0,_.data=r,_.callback=c});D.useImperativeHandle(v,()=>({open:m,close:g,approve:u}),[m,g,u]);const t=_e(()=>{if(!_.show)return[];_.data.migratedFrom=[_.data.appId,_.data.appPid];const r=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return _.data.isMaster!==!1&&qs(r,"appliedAt","status"),r.map(c=>{const i=C(`federated.info.${c}`);let l=_.data[c];if(c==="appName"&&_.data.isMaster&&(l=e.jsxs(P,{children:[e.jsx(ur,{component:wr}),l]})),["appId","appPid","serverId"].includes(c)&&(l=e.jsx(jt,{children:l})),["appUrl"].includes(c)&&(l=e.jsx(P,{component:"a",href:l,target:"_blank",children:l})),["appLogo"].includes(c)){const d=ke(`https://${wi.getDidDomainForBlocklet({did:_.data.appPid})}`,V.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const p=new URL(d);p.searchParams.set("imageFilter","resize"),p.searchParams.set("w","80"),p.searchParams.set("h","80"),l=e.jsx("img",{src:p.href,width:"60",height:"60",alt:_.data.appName})}catch{l=e.jsx("img",{src:d,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(l=l&&C(`federated.status.${l}`)),c==="migratedFrom"&&(l=(_.data.migratedFrom||[]).filter(f=>![_.data.appId,_.data.appPid].includes(f)).map(f=>e.jsx(jt,{children:f}))),Mn(l)&&(l="-"),{name:i,value:l}})},[_.data]),o=_.mode==="approve",a=E(async()=>{try{_.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:A.appPid,status:"rejected"}}),g(),_?.callback(!1)}finally{_.loadingReject=!1}}),n=E(async()=>{try{_.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:A.appPid,status:"approved"}}),g(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(we,{open:_.show,title:C(o?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:g,actions:o?e.jsxs(e.Fragment,{children:[e.jsxs(le,{color:"error",variant:"contained",onClick:a,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(Be,{size:16,color:"grey"}):null,C("common.reject")]}),e.jsxs(le,{variant:"contained",onClick:n,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(Be,{size:16,color:"grey"}):null,C("common.approve")]})]}):e.jsx(le,{variant:"outlined",onClick:g,children:C("common.close")}),children:t.map(r=>e.jsx(yr,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:r.name,children:r.value},r.name))})}Fr.propTypes={ref:T.any};function Lt({ref:v=null}){const A=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=D.useContext(he),_=pe({show:!1,data:{link:""}}),x=E(()=>{_.data.link=""}),y=E(()=>{_.show=!1,setTimeout(()=>{x()},A)}),s=E(({link:m})=>{_.show=!0,_.data.link=m});D.useImperativeHandle(v,()=>({open:s,close:y}),[s,y]);const g=E(()=>{Bn(_.data.link),y()});return e.jsxs(we,{open:_.show,title:R("federated.joinFederatedLogin"),onClose:y,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:g,children:R("common.copyAndClose")}),children:[e.jsx(P,{sx:{mb:2},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(P,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(gr,{children:_.data.link})})]})}Lt.propTypes={ref:T.any};function Zr({mode:v="member"}){const C=D.useRef(null),A=D.useRef(null),{t:R,locale:_}=D.useContext(he),{blocklet:x,actions:{refreshBlocklet:y}}=ie(),{confirmApi:s,confirmHolder:g}=Ee(),{api:m}=Q(),u=x.settings.federated?.sites||[],t=x.settings.federated?.config||{},o=t.isMaster!==!1,a=u.find(w=>w.appPid===x.appPid),n=pe({loadingSync:!1}),r=E(w=>{A.current?.open(w)}),c=E(w=>{A.current?.approve(w,y)}),i=E(w=>{s.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await m.quitFederatedLogin({input:{did:x.appPid,targetDid:w.appPid}}),O()}})}),l=E(w=>{s.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await m.auditFederatedLogin({input:{memberPid:w.appPid,did:x.appPid,status:"revoked"}}),O()}})}),d=E(w=>{s.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(O){await m.auditFederatedLogin({input:{memberPid:w.appPid,did:x.appPid,status:"approved"}}),O()}})}),p=_e(()=>{const w=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:O=>{const $=u[O],I=$.isMaster!==!1;return e.jsx(P,{sx:{display:"inline-block"},children:e.jsxs(P,{component:"a",href:$.appUrl,target:"_blank",onClick:q=>{q.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[I&&e.jsx(ur,{component:wr,style:{marginRight:"4px"}}),$.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:O=>{const $=u[O];return e.jsx(jt,{children:$.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:O=>{const $=u[O],I=$.isMaster!==!1;return e.jsx(P,{children:I?"-":R(`federated.status.${$.status}`)})}}}];return o&&w.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:O=>{const $=u[O],I=$.isMaster!==!1;return e.jsx(P,{sx:{display:"flex",gap:1},children:I?e.jsxs(e.Fragment,{children:[$.status==="rejected"&&e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation()},children:R("federated.status.rejected")}),$.status==="revoked"&&e.jsx(J,{variant:"contained",color:"secondary",size:"small",onClick:q=>{q.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation(),i($)},children:R("federated.quitMember")},"quiteSite"),$.status==="pending"&&e.jsx(J,{variant:"contained",color:"primary",size:"small",onClick:q=>{q.stopPropagation(),c($)},children:R("federated.status.pending")},"auditSite"),$.status==="approved"&&e.jsx(J,{variant:"contained",color:"error",size:"small",onClick:q=>{q.stopPropagation(),l($)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),$.status==="revoked"&&e.jsx(J,{variant:"contained",color:"warning",size:"small",onClick:q=>{q.stopPropagation(),d($)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),w},[t.appId,u,o,R]),f=_e(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(w,{dataIndex:O}){const $=u[O];r($)}}),[]),k=E(()=>{const w=x.environments.find(O=>O.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);w?.value?C.current?.open({link:w.value}):z.error(R("federated.failedToGetFederatedLoginLink"))},[x.site?.domainAliases?.[0]?.href]),S=E(()=>{s.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(w){await m.quitFederatedLogin({input:{did:x.appPid}}),w()}})}),h=E(()=>{s.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(w){await m.disbandFederatedLogin({input:{did:x.appPid}}),w()}})}),b=E(async()=>{try{n.loadingSync=!0,await Promise.all([await m.syncFederatedConfig({input:{did:x.appPid}}),zn(500)]),z.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),j=[];return a.status!=="pending"&&j.push(e.jsx(oe,{title:R("federated.syncConfig"),children:e.jsx(ce,{size:"small",onClick:b,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(re,{icon:ji,style:{fontSize:24}})},"syncConfig")})),v==="master"?(j.push(e.jsx(J,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),j.push(e.jsx(J,{color:"error",size:"small",variant:"contained",onClick:h,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):j.push(e.jsx(J,{size:"small",variant:"contained",color:"error",onClick:S,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(tt,{className:"main-table",locale:_,data:u,columns:p,customButtons:j,title:e.jsx(P,{className:"table-toolbar-left",children:R("authentication.federated")}),options:f}),g,e.jsx(Lt,{ref:C}),e.jsx(Fr,{ref:A})]})}Zr.propTypes={mode:T.oneOf(["member","master"])};function Wr({ref:v=null}){const{t:C}=D.useContext(he),{api:A}=Q(),{blocklet:R}=ie(),_=R?.appPid,y=$e()?.transitions?.duration?.leavingScreen||300,s=pe({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:G}),g=E(()=>{s.appUrl="",s.appUrlError="",s.callback=G}),m=E(()=>{s.show=!1,setTimeout(()=>{g()},y)}),u=E((a=G)=>{s.show=!0,s.callback=a});D.useImperativeHandle(v,()=>({open:u,close:m}),[u,m]);const t=E(a=>{if(!a)throw new Error(C("federated.federatedJoinAppUrlRequired"));if(!Hn(a))throw new Error(C("federated.federatedJoinAppUrlInvalid"))}),o=E(async()=>{try{t(s.appUrl),s.loading=!0;const a=await A.joinFederatedLogin({input:{did:_,appUrl:s.appUrl}});s.show=!1,m(),s?.callback(a)}catch(a){s.appUrlError=a.message}finally{s.loading=!1}});return e.jsxs(we,{open:s.show,title:C("federated.joinFederatedLogin"),onClose:m,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:o,disabled:s.loading,children:[s.loading?e.jsx(Be,{size:16,sx:{mr:1},color:"grey"}):null,C("common.confirm")]}),children:[e.jsx(P,{sx:{mb:1},children:C("federated.joinFederatedLoginDescription")}),e.jsx(N,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:C("federated.federatedJoinAppUrl"),label:C("federated.federatedJoinAppUrl"),value:s.appUrl,error:!!s.appUrlError,helperText:s.appUrlError||"eg: https://www.arcblock.io",onChange:a=>{s.appUrl=a.target.value}})]})}Wr.propTypes={ref:T.any};function ki(){const{t:v}=D.useContext(he);return e.jsxs(ae,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(_s,{fontSize:"large",color:"primary"}),e.jsxs(P,{children:[e.jsx(X,{variant:"h6",gutterBottom:!0,children:v("federated.title")}),e.jsx(X,{variant:"body2",sx:{color:"text.secondary"},children:v("federated.description")}),e.jsx(Nn,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:v("federated.link")})]})]})}function Si(){const v=D.useRef(null),C=D.useRef(null),{t:A}=D.useContext(he),{blocklet:R,actions:{refreshBlocklet:_}}=ie(),x=E(()=>{const s=R.site?.domainAliases?.[0]?.href;if(s)try{const g=new URL(s);v.current?.open({link:g.origin})}catch{z.error(A("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),y=E(()=>{C.current?.open(()=>{_()})});if(R.settings.federated?.sites.length>0){const s=R.settings.federated?.config.isMaster!==!1;return e.jsx(Zr,{mode:s?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(P,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(P,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(ki,{}),e.jsx(te,{sx:{width:1}}),e.jsxs(ae,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(J,{variant:"contained",onClick:x,sx:{width:1},children:A("federated.inviteJoinFederatedLogin")}),e.jsx(J,{variant:"outlined",onClick:y,sx:{width:1},children:A("federated.joinFederatedLogin")})]})]})}),e.jsx(Lt,{ref:v}),e.jsx(Wr,{ref:C})]})}const rr={showDidColor:!0,showAppInfo:!0};function nr(v){return e.jsx(xr,{...v,sx:{transform:"scale(0.75)"}})}function Ci(){const{api:v}=Q(),{blocklet:C}=ie(),A=C?.meta?.did,{handleSubmit:R,control:_,formState:x,reset:y}=fe({defaultValues:dr({},rr,C?.settings?.didConnect||{})}),{t:s}=ne(),g=E(async m=>{try{const{blocklet:u}=await v.configDidConnect({input:{did:A,didConnect:JSON.stringify(m)}}),t=Object.assign({},rr,u?.settings?.didConnect||{});y(t),z.success(s("common.configSuccess"))}catch(u){z.error(u.message)}});return e.jsx(Ri,{onSubmit:R(g),children:e.jsxs(ae,{direction:"column",sx:{gap:4},children:[e.jsx(P,{children:e.jsxs(ae,{sx:{gap:2},children:[e.jsx(M,{title:s("authentication.didConnect.showDidColor"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"showDidColor",control:_,render:({field:m})=>e.jsx(nr,{...m,checked:m.value})})})}),e.jsx(M,{title:s("authentication.didConnect.showAppInfo"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"showAppInfo",control:_,render:({field:m})=>e.jsx(nr,{...m,checked:m.value})})})})]})}),e.jsx(P,{children:e.jsx(le,{type:"submit",variant:"contained",disabled:!x.isDirty,children:s("common.save")})})]})})}const Ri=ve.form`
|
|
123
123
|
max-width: 1536px;
|
|
124
124
|
|
|
125
125
|
.advanced-config {
|
|
@@ -159,15 +159,15 @@ ${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
159
159
|
.form-item {
|
|
160
160
|
margin-top: 0;
|
|
161
161
|
}
|
|
162
|
-
`;function Ze({label:v}){return e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:v})}Ze.propTypes={label:T.any.isRequired};function Ur({orientation:v="horizontal"}){const{t:C}=D.useContext(he),A=vr({key:"lg"}),R=[{label:e.jsx(Ze,{label:C("authentication.didConnectSettings")}),value:"didConnect"},{label:e.jsx(Ze,{label:C("authentication.loginProviders")}),value:"loginProviders"},{label:e.jsx(Ze,{label:C("authentication.federated")}),value:"federated"},{label:e.jsx(Ze,{label:C("authentication.sessionSettings")}),value:"session"}],[_,x]=D.useState(R[0].value),y=_e(()=>({didConnect:e.jsx(Ci,{}),loginProviders:e.jsx(xi,{}),federated:e.jsx(Si,{}),session:e.jsx(vi,{})}),[C]);return v==="vertical"?e.jsx(O,{sx:{".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal",div:{textAlign:"left"}},".Mui-selected":{fontWeight:"bold"}},children:e.jsxs(ae,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(O,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ue,{tabs:R,current:_,orientation:A?"horizontal":"vertical",onChange:x,sx:{borderRight:A?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(O,{sx:{flexGrow:1,minWidth:0},children:e.jsx(O,{sx:{maxWidth:"1200px"},children:y[_]})})]})}):e.jsxs(O,{children:[e.jsx(Ue,{tabs:R,current:_,onChange:x}),e.jsx(O,{sx:{marginTop:"10px"},children:y[_]})]})}Ur.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const Ai={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},Oi={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'};function Vr({enabled:v,showUp:C=!0,showDown:A=!0,showSwitch:R=!0,showDelete:_=!0,showEdit:x=!0,disableEdit:y=!1,disableSwitch:s=!1,onClickUp:g=()=>{},onClickDown:m=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:o=()=>{}}){const{t:a}=ne();return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[x?e.jsx(oe,{title:a("common.edit"),children:e.jsx(ce,{size:"small",onClick:o,color:"success",disabled:y,children:e.jsx(re,{icon:nt,fontSize:18})})}):null,_?e.jsx(oe,{title:a("common.delete"),children:e.jsx(ce,{size:"small",onClick:t,color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})}):null,R?e.jsx(oe,{title:a(v?"common.enabled":"common.disabled"),children:e.jsx(me,{size:"small",checked:v,onClick:u,disabled:s})}):null,C?e.jsx(oe,{title:a("common.moveUp"),children:e.jsx(ce,{size:"small",onClick:g,disabled:y,children:e.jsx(re,{icon:Oi,fontSize:20})})}):null,A?e.jsx(oe,{title:a("common.moveDown"),children:e.jsx(ce,{size:"small",onClick:m,disabled:y,children:e.jsx(re,{icon:Ai,fontSize:20})})}):null]})}Vr.propTypes={enabled:T.bool.isRequired,showUp:T.bool,showDown:T.bool,showSwitch:T.bool,showDelete:T.bool,showEdit:T.bool,disableEdit:T.bool,disableSwitch:T.bool,onClickUp:T.func,onClickDown:T.func,onClickSwitch:T.func,onClickDelete:T.func,onClickEdit:T.func};function Kr({ref:v=null}){const{t:C}=D.useContext(he),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,y=$e()?.transitions?.duration?.leavingScreen||300,s=pe({mode:"add",show:!1,isDefaultRule:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("securityRule.edit"):this.mode==="view"?C("securityRule.view"):C("securityRule.add")}}),g=We(async()=>{const{accessPolicies:w}=await R.getBlockletAccessPolicies({input:{did:_}});return Xe(w,P=>P.isProtected?1:0)},{manual:!0}),m=We(async()=>{const{responseHeaderPolicies:w}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Xe(w,P=>P.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:o,setValue:a,getValues:n,reset:r,formState:{errors:c}}=fe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),i=E(()=>{r(),s.mode="add"}),l=E(()=>{s.show=!1,setTimeout(()=>{i()},y)}),d=E((w,P=null)=>{s.show=!0,P&&(s.isDefaultRule=P.id===U.SECURITY_RULE_DEFAULT_ID,s.mode="edit",a("componentDid",P.componentDid),a("pathPattern",P.pathPattern),a("responseHeaderPolicyId",P.responseHeaderPolicyId),a("accessPolicyId",P.accessPolicyId),a("remark",P.remark||"")),w?s.callback=w:s.mode="view",g.run(),m.run()});D.useImperativeHandle(v,()=>({open:d,close:l}),[d,l]);const p=E(()=>{const[w,P]=n(["accessPolicyId","responseHeaderPolicyId"]);return!w&&!P?C("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),f=E(w=>{const P=p();if(P===!0){const $=s.isDefaultRule?Oe(w,"componentDid"):w;s.callback($,l)}else B.error(P)}),k=o("componentDid"),S=E(w=>{const P=w?.trim();if(!P)return C("common.requiredErrorText",{name:C("securityRule.form.pathPattern")});if(k){if(P.startsWith("/"))return C("securityRule.form.pathPatternErrorText")}else if(!P.startsWith("/")&&P!=="*")return C("securityRule.form.pathPatternErrorText");return!0}),h=E(w=>w?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.accessPolicy")})),b=E(w=>w?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.responseHeaderPolicy")})),j=_e(()=>{const P=(A?.children||[]).find($=>$.meta.did===k);return P?.mountPoint?Fn(P.mountPoint):null},[A,k]);return e.jsx(we,{open:s.show,title:s.dialogTitle,onClose:l,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:u(f),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[s.isDefaultRule?null:e.jsx(z,{name:"componentDid",control:t,render:({field:w})=>e.jsx(Ye,{fullWidth:!0,margin:"dense",size:"small",label:C("securityRule.form.component"),placeholder:C("securityRule.form.componentPlaceholder"),options:A.children.map(P=>({title:P.meta.title,value:P.meta.did,description:P.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Oe(w,"ref"),readOnly:s.mode==="view"})}),e.jsx(z,{name:"pathPattern",control:t,rules:{validate:S},render:({field:w})=>e.jsx(N,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:C("securityRule.form.pathPatternPlaceholder"),label:C("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...w,disabled:s.isDefaultRule||s.mode==="view",slotProps:{input:{startAdornment:j?e.jsx(cr,{position:"start",children:j}):null}}})}),e.jsx(z,{name:"accessPolicyId",control:t,rules:{validate:s.isDefaultRule?h:G},render:({field:w})=>e.jsx(Ye,{fullWidth:!0,required:s.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.accessPolicy"),placeholder:C("securityRule.form.accessPolicyPlaceholder"),options:(g.data||[]).map(P=>({value:P.id,title:P.name,description:P.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||C("securityRule.form.accessPolicyHelperText"),...Oe(w,"ref"),disabled:s.mode==="view"})}),e.jsx(z,{name:"responseHeaderPolicyId",control:t,rules:{validate:s.isDefaultRule?b:G},render:({field:w})=>e.jsx(Ye,{fullWidth:!0,required:s.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.responseHeaderPolicy"),placeholder:C("securityRule.form.responseHeaderPolicyPlaceholder"),options:(m.data||[]).map(P=>({title:P.name,value:P.id,description:P.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||C("securityRule.form.responseHeaderPolicyHelperText"),...Oe(w,"ref"),disabled:s.mode==="view"})}),e.jsx(z,{name:"remark",control:t,render:({field:w})=>e.jsx(N,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:C("securityRule.form.remarkPlaceholder"),label:C("securityRule.form.remark"),helperText:c?.message,...w,disabled:s.mode==="view"})})]})})}Kr.propTypes={ref:T.any};const xe=async(v,C="Failed to saved")=>{try{await v()}catch(A){B.error(A?.message||C)}};function Pi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,x=$e(),y=D.useRef(null),s=D.useRef(null),{confirmApi:g,confirmHolder:m}=Ee(),u=We(async()=>{const{securityRules:h}=await R.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return h}),t=h=>h.id===U.SECURITY_RULE_DEFAULT_ID,o=E(h=>(A?.children||[]).find(j=>j.meta.did===h)?.mountPoint),a=(u.data||[]).map(h=>{if(h.componentDid){const b=o(h.componentDid);h._disabled=b===void 0}return h}),n=a.filter(h=>!t(h)),r=(h,b)=>{xe(async()=>{const j=h.target.checked;await R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,enabled:j}}}),B.success(v("common.succeeded")),u.run()})},c=(h,b,j)=>{xe(async()=>{const w=j-1,P=a[w];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,priority:P.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:P.id,priority:b.priority}}})]),B.success(v("common.succeeded")),u.run()})},i=(h,b,j)=>{xe(async()=>{const w=j+1,P=a[w];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,priority:P.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:P.id,priority:b.priority}}})]),B.success(v("common.succeeded")),u.run()})},l=()=>{y.current.open((h,b)=>{xe(async()=>{await R.addBlockletSecurityRule({input:{did:_,data:h}}),B.success(v("common.succeeded")),u.run(),b()})})},d=(h,b)=>{y.current.open((j,w)=>{xe(async()=>{await R.updateBlockletSecurityRule({input:{did:_,data:{...j,id:b.id}}}),B.success(v("common.succeeded")),u.run(),w()})},b)},p=(h,b)=>{g.open({title:v("securityRule.delete.title"),content:v("securityRule.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(j){xe(async()=>{await R.deleteBlockletSecurityRule({input:{did:_,id:b.id}}),B.success(v("common.succeeded")),u.run(),j()})}})},f={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(h,{dataIndex:b},j){if(s.current?.contains(j.target)){const w=a[b];y.current.open(void 0,w)}},setRowProps:(h,b)=>a[b]._disabled?{title:v("securityRule.useless"),style:{backgroundColor:x.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:l,children:v("common.add")})],S=[{label:v("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(h){const b=a[h];return e.jsx(O,{sx:{whiteSpace:"nowrap"},children:b.id===U.SECURITY_RULE_DEFAULT_ID?"Default":ke(o(b.componentDid),b.pathPattern)})}}},{label:v("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(h){return a[h].responseHeaderPolicy?.name}}},{label:v("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(h){return a[h].accessPolicy?.name}}},{label:v("securityRule.form.remark"),name:"remark"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(h){const b=a[h],j=t(b);return e.jsx(Vr,{disableEdit:b._disabled,disableSwitch:b._disabled,enabled:b.enabled,showSwitch:!j,showDelete:!j,showUp:h>0&&!j,showDown:h<n.length-1&&!j,onClickSwitch:w=>{r(w,b)},onClickUp:w=>{c(w,b,h)},onClickDown:w=>{i(w,b,h)},onClickEdit:w=>{d(w,b)},onClickDelete:w=>{p(w,b)}})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:s,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[v("securityRule.title")," ",e.jsx(X,{variant:"body2",children:v("securityRule.sortByDescription")})]}),data:a,columns:S,customButtons:k,options:f,loading:u.loading}),e.jsx(Kr,{ref:y}),m]})}const Jr={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'},Gr=[{value:U.WHO_CAN_ACCESS.ALL,icon:ms,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:U.WHO_CAN_ACCESS.INVITED,icon:ws,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:U.WHO_CAN_ACCESS.ADMIN,icon:Os,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:U.WHO_CAN_ACCESS.OWNER,icon:wt,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function Yr({value:v,onChange:C,...A}){const R="roles",_="roles_reverse",{t:x,locale:y}=ne(),s=[...Gr,{value:R,icon:ks,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:Ss,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(N,{...A,label:x("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:C,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:g=>{const m=s.find(u=>u.value===g);return m?e.jsxs(O,{children:[e.jsx(O,{component:m.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),m.title[y]||m.title.en]}):null},IconComponent:g=>e.jsx(Wn,{...g,width:20,height:20})}},children:s.map(g=>e.jsxs(Zn,{value:g.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:m})=>m.palette.text.secondary}`}},children:[e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{component:g.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(O,{children:g.title[y]||g.title.en})]}),e.jsx(O,{className:"tip",children:g.description[y]||g.description.en})]}))})}Yr.propTypes={value:T.string,onChange:T.func};const Xr=v=>{const C={name:v.name,description:v.description},{roles:A=null,reverse:R}=v;return A===null?R===!1&&(C.whoCanAccess=U.WHO_CAN_ACCESS.ALL,C.roles=null):A.length===0&&R===!0?(C.whoCanAccess=U.WHO_CAN_ACCESS.INVITED,C.roles=[]):zt(A,[U.WHO_CAN_ACCESS.OWNER])&&R===!1?(C.whoCanAccess=U.WHO_CAN_ACCESS.OWNER,C.roles=[U.WHO_CAN_ACCESS.OWNER]):zt(A,[U.WHO_CAN_ACCESS.OWNER,U.WHO_CAN_ACCESS.ADMIN])&&R===!1?(C.whoCanAccess=U.WHO_CAN_ACCESS.ADMIN,C.roles=[U.WHO_CAN_ACCESS.OWNER,U.WHO_CAN_ACCESS.ADMIN]):(C.whoCanAccess=R?"roles_reverse":"roles",C.roles=A),C},$i=v=>{const C={name:v.name,description:v.description},{roles:A=null,whoCanAccess:R}=v;return R==="roles"?(C.roles=A,C.reverse=!1):R==="roles_reverse"?(C.roles=A,C.reverse=!0):R===U.WHO_CAN_ACCESS.ALL?(C.roles=null,C.reverse=!1):R===U.WHO_CAN_ACCESS.INVITED?(C.roles=[],C.reverse=!0):R===U.WHO_CAN_ACCESS.OWNER?(C.roles=[U.WHO_CAN_ACCESS.OWNER],C.reverse=!1):R===U.WHO_CAN_ACCESS.ADMIN&&(C.roles=[U.WHO_CAN_ACCESS.OWNER,U.WHO_CAN_ACCESS.ADMIN],C.reverse=!1),C},Ti=v=>v instanceof Object?{origin:v.origin?{override:v.origin?.override??!0,value:v.origin?.value?.join(`
|
|
162
|
+
`;function Ze({label:v}){return e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:v})}Ze.propTypes={label:T.any.isRequired};function Vr({orientation:v="horizontal"}){const{t:C}=D.useContext(he),A=vr({key:"lg"}),R=[{label:e.jsx(Ze,{label:C("authentication.didConnectSettings")}),value:"didConnect"},{label:e.jsx(Ze,{label:C("authentication.loginProviders")}),value:"loginProviders"},{label:e.jsx(Ze,{label:C("authentication.federated")}),value:"federated"},{label:e.jsx(Ze,{label:C("authentication.sessionSettings")}),value:"session"}],[_,x]=D.useState(R[0].value),y=_e(()=>({didConnect:e.jsx(Ci,{}),loginProviders:e.jsx(xi,{}),federated:e.jsx(Si,{}),session:e.jsx(vi,{})}),[C]);return v==="vertical"?e.jsx(P,{sx:{".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal",div:{textAlign:"left"}},".Mui-selected":{fontWeight:"bold"}},children:e.jsxs(ae,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(P,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ve,{tabs:R,current:_,orientation:A?"horizontal":"vertical",onChange:x,sx:{borderRight:A?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(P,{sx:{flexGrow:1,minWidth:0},children:e.jsx(P,{sx:{maxWidth:"1200px"},children:y[_]})})]})}):e.jsxs(P,{children:[e.jsx(Ve,{tabs:R,current:_,onChange:x}),e.jsx(P,{sx:{marginTop:"10px"},children:y[_]})]})}Vr.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const Ai={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},Pi={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'};function Ur({enabled:v,showUp:C=!0,showDown:A=!0,showSwitch:R=!0,showDelete:_=!0,showEdit:x=!0,disableEdit:y=!1,disableSwitch:s=!1,onClickUp:g=()=>{},onClickDown:m=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:o=()=>{}}){const{t:a}=ne();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[x?e.jsx(oe,{title:a("common.edit"),children:e.jsx(ce,{size:"small",onClick:o,color:"success",disabled:y,children:e.jsx(re,{icon:nt,fontSize:18})})}):null,_?e.jsx(oe,{title:a("common.delete"),children:e.jsx(ce,{size:"small",onClick:t,color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})}):null,R?e.jsx(oe,{title:a(v?"common.enabled":"common.disabled"),children:e.jsx(me,{size:"small",checked:v,onClick:u,disabled:s})}):null,C?e.jsx(oe,{title:a("common.moveUp"),children:e.jsx(ce,{size:"small",onClick:g,disabled:y,children:e.jsx(re,{icon:Pi,fontSize:20})})}):null,A?e.jsx(oe,{title:a("common.moveDown"),children:e.jsx(ce,{size:"small",onClick:m,disabled:y,children:e.jsx(re,{icon:Ai,fontSize:20})})}):null]})}Ur.propTypes={enabled:T.bool.isRequired,showUp:T.bool,showDown:T.bool,showSwitch:T.bool,showDelete:T.bool,showEdit:T.bool,disableEdit:T.bool,disableSwitch:T.bool,onClickUp:T.func,onClickDown:T.func,onClickSwitch:T.func,onClickDelete:T.func,onClickEdit:T.func};function Kr({ref:v=null}){const{t:C}=D.useContext(he),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,y=$e()?.transitions?.duration?.leavingScreen||300,s=pe({mode:"add",show:!1,isDefaultRule:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("securityRule.edit"):this.mode==="view"?C("securityRule.view"):C("securityRule.add")}}),g=We(async()=>{const{accessPolicies:w}=await R.getBlockletAccessPolicies({input:{did:_}});return Xe(w,O=>O.isProtected?1:0)},{manual:!0}),m=We(async()=>{const{responseHeaderPolicies:w}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Xe(w,O=>O.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:o,setValue:a,getValues:n,reset:r,formState:{errors:c}}=fe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),i=E(()=>{r(),s.mode="add"}),l=E(()=>{s.show=!1,setTimeout(()=>{i()},y)}),d=E((w,O=null)=>{s.show=!0,O&&(s.isDefaultRule=O.id===V.SECURITY_RULE_DEFAULT_ID,s.mode="edit",a("componentDid",O.componentDid),a("pathPattern",O.pathPattern),a("responseHeaderPolicyId",O.responseHeaderPolicyId),a("accessPolicyId",O.accessPolicyId),a("remark",O.remark||"")),w?s.callback=w:s.mode="view",g.run(),m.run()});D.useImperativeHandle(v,()=>({open:d,close:l}),[d,l]);const p=E(()=>{const[w,O]=n(["accessPolicyId","responseHeaderPolicyId"]);return!w&&!O?C("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),f=E(w=>{const O=p();if(O===!0){const $=s.isDefaultRule?Pe(w,"componentDid"):w;s.callback($,l)}else z.error(O)}),k=o("componentDid"),S=E(w=>{const O=w?.trim();if(!O)return C("common.requiredErrorText",{name:C("securityRule.form.pathPattern")});if(k){if(O.startsWith("/"))return C("securityRule.form.pathPatternErrorText")}else if(!O.startsWith("/")&&O!=="*")return C("securityRule.form.pathPatternErrorText");return!0}),h=E(w=>w?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.accessPolicy")})),b=E(w=>w?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.responseHeaderPolicy")})),j=_e(()=>{const O=(A?.children||[]).find($=>$.meta.did===k);return O?.mountPoint?Fn(O.mountPoint):null},[A,k]);return e.jsx(we,{open:s.show,title:s.dialogTitle,onClose:l,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:u(f),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[s.isDefaultRule?null:e.jsx(B,{name:"componentDid",control:t,render:({field:w})=>e.jsx(Ye,{fullWidth:!0,margin:"dense",size:"small",label:C("securityRule.form.component"),placeholder:C("securityRule.form.componentPlaceholder"),options:A.children.map(O=>({title:O.meta.title,value:O.meta.did,description:O.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Pe(w,"ref"),readOnly:s.mode==="view"})}),e.jsx(B,{name:"pathPattern",control:t,rules:{validate:S},render:({field:w})=>e.jsx(N,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:C("securityRule.form.pathPatternPlaceholder"),label:C("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...w,disabled:s.isDefaultRule||s.mode==="view",slotProps:{input:{startAdornment:j?e.jsx(cr,{position:"start",children:j}):null}}})}),e.jsx(B,{name:"accessPolicyId",control:t,rules:{validate:s.isDefaultRule?h:G},render:({field:w})=>e.jsx(Ye,{fullWidth:!0,required:s.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.accessPolicy"),placeholder:C("securityRule.form.accessPolicyPlaceholder"),options:(g.data||[]).map(O=>({value:O.id,title:O.name,description:O.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||C("securityRule.form.accessPolicyHelperText"),...Pe(w,"ref"),disabled:s.mode==="view"})}),e.jsx(B,{name:"responseHeaderPolicyId",control:t,rules:{validate:s.isDefaultRule?b:G},render:({field:w})=>e.jsx(Ye,{fullWidth:!0,required:s.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.responseHeaderPolicy"),placeholder:C("securityRule.form.responseHeaderPolicyPlaceholder"),options:(m.data||[]).map(O=>({title:O.name,value:O.id,description:O.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||C("securityRule.form.responseHeaderPolicyHelperText"),...Pe(w,"ref"),disabled:s.mode==="view"})}),e.jsx(B,{name:"remark",control:t,render:({field:w})=>e.jsx(N,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:C("securityRule.form.remarkPlaceholder"),label:C("securityRule.form.remark"),helperText:c?.message,...w,disabled:s.mode==="view"})})]})})}Kr.propTypes={ref:T.any};const xe=async(v,C="Failed to saved")=>{try{await v()}catch(A){z.error(A?.message||C)}};function Oi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,x=$e(),y=D.useRef(null),s=D.useRef(null),{confirmApi:g,confirmHolder:m}=Ee(),u=We(async()=>{const{securityRules:h}=await R.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return h}),t=h=>h.id===V.SECURITY_RULE_DEFAULT_ID,o=E(h=>(A?.children||[]).find(j=>j.meta.did===h)?.mountPoint),a=(u.data||[]).map(h=>{if(h.componentDid){const b=o(h.componentDid);h._disabled=b===void 0}return h}),n=a.filter(h=>!t(h)),r=(h,b)=>{xe(async()=>{const j=h.target.checked;await R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,enabled:j}}}),z.success(v("common.succeeded")),u.run()})},c=(h,b,j)=>{xe(async()=>{const w=j-1,O=a[w];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:b.priority}}})]),z.success(v("common.succeeded")),u.run()})},i=(h,b,j)=>{xe(async()=>{const w=j+1,O=a[w];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:b.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:b.priority}}})]),z.success(v("common.succeeded")),u.run()})},l=()=>{y.current.open((h,b)=>{xe(async()=>{await R.addBlockletSecurityRule({input:{did:_,data:h}}),z.success(v("common.succeeded")),u.run(),b()})})},d=(h,b)=>{y.current.open((j,w)=>{xe(async()=>{await R.updateBlockletSecurityRule({input:{did:_,data:{...j,id:b.id}}}),z.success(v("common.succeeded")),u.run(),w()})},b)},p=(h,b)=>{g.open({title:v("securityRule.delete.title"),content:v("securityRule.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(j){xe(async()=>{await R.deleteBlockletSecurityRule({input:{did:_,id:b.id}}),z.success(v("common.succeeded")),u.run(),j()})}})},f={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(h,{dataIndex:b},j){if(s.current?.contains(j.target)){const w=a[b];y.current.open(void 0,w)}},setRowProps:(h,b)=>a[b]._disabled?{title:v("securityRule.useless"),style:{backgroundColor:x.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:l,children:v("common.add")})],S=[{label:v("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(h){const b=a[h];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:b.id===V.SECURITY_RULE_DEFAULT_ID?"Default":ke(o(b.componentDid),b.pathPattern)})}}},{label:v("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(h){return a[h].responseHeaderPolicy?.name}}},{label:v("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(h){return a[h].accessPolicy?.name}}},{label:v("securityRule.form.remark"),name:"remark"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(h){const b=a[h],j=t(b);return e.jsx(Ur,{disableEdit:b._disabled,disableSwitch:b._disabled,enabled:b.enabled,showSwitch:!j,showDelete:!j,showUp:h>0&&!j,showDown:h<n.length-1&&!j,onClickSwitch:w=>{r(w,b)},onClickUp:w=>{c(w,b,h)},onClickDown:w=>{i(w,b,h)},onClickEdit:w=>{d(w,b)},onClickDelete:w=>{p(w,b)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:s,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[v("securityRule.title")," ",e.jsx(X,{variant:"body2",children:v("securityRule.sortByDescription")})]}),data:a,columns:S,customButtons:k,options:f,loading:u.loading}),e.jsx(Kr,{ref:y}),m]})}const Jr={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'},Gr=[{value:V.WHO_CAN_ACCESS.ALL,icon:ms,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:V.WHO_CAN_ACCESS.INVITED,icon:ws,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:V.WHO_CAN_ACCESS.ADMIN,icon:Ps,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:V.WHO_CAN_ACCESS.OWNER,icon:wt,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function Yr({value:v,onChange:C,...A}){const R="roles",_="roles_reverse",{t:x,locale:y}=ne(),s=[...Gr,{value:R,icon:ks,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:Ss,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(N,{...A,label:x("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:C,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:g=>{const m=s.find(u=>u.value===g);return m?e.jsxs(P,{children:[e.jsx(P,{component:m.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),m.title[y]||m.title.en]}):null},IconComponent:g=>e.jsx(Wn,{...g,width:20,height:20})}},children:s.map(g=>e.jsxs(Zn,{value:g.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:m})=>m.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:g.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:g.title[y]||g.title.en})]}),e.jsx(P,{className:"tip",children:g.description[y]||g.description.en})]}))})}Yr.propTypes={value:T.string,onChange:T.func};const Xr=v=>{const C={name:v.name,description:v.description},{roles:A=null,reverse:R}=v;return A===null?R===!1&&(C.whoCanAccess=V.WHO_CAN_ACCESS.ALL,C.roles=null):A.length===0&&R===!0?(C.whoCanAccess=V.WHO_CAN_ACCESS.INVITED,C.roles=[]):Bt(A,[V.WHO_CAN_ACCESS.OWNER])&&R===!1?(C.whoCanAccess=V.WHO_CAN_ACCESS.OWNER,C.roles=[V.WHO_CAN_ACCESS.OWNER]):Bt(A,[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN])&&R===!1?(C.whoCanAccess=V.WHO_CAN_ACCESS.ADMIN,C.roles=[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN]):(C.whoCanAccess=R?"roles_reverse":"roles",C.roles=A),C},$i=v=>{const C={name:v.name,description:v.description},{roles:A=null,whoCanAccess:R}=v;return R==="roles"?(C.roles=A,C.reverse=!1):R==="roles_reverse"?(C.roles=A,C.reverse=!0):R===V.WHO_CAN_ACCESS.ALL?(C.roles=null,C.reverse=!1):R===V.WHO_CAN_ACCESS.INVITED?(C.roles=[],C.reverse=!0):R===V.WHO_CAN_ACCESS.OWNER?(C.roles=[V.WHO_CAN_ACCESS.OWNER],C.reverse=!1):R===V.WHO_CAN_ACCESS.ADMIN&&(C.roles=[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN],C.reverse=!1),C},Ti=v=>v instanceof Object?{origin:v.origin?{override:v.origin?.override??!0,value:v.origin?.value?.join(`
|
|
163
163
|
`),smart:v.origin?.smart??!0}:void 0,methods:v.methods,allowedHeaders:v.allowedHeaders?{override:v.allowedHeaders?.override??!0,value:v.allowedHeaders?.value?.join(`
|
|
164
164
|
`)}:void 0,exposedHeaders:v.exposedHeaders?{override:v.exposedHeaders?.override??!0,value:v.exposedHeaders?.value?.join(`
|
|
165
165
|
`)}:void 0,maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Ei=v=>v instanceof Object?{origin:{override:v.origin?.override,value:v.origin?.value?.split(`
|
|
166
166
|
`).filter(A=>A),smart:v.origin?.smart},methods:v.methods,allowedHeaders:{override:v.allowedHeaders?.override,value:v.allowedHeaders?.value?.split(`
|
|
167
167
|
`).filter(A=>A)},exposedHeaders:{override:v.exposedHeaders?.override,value:v.exposedHeaders?.value?.split(`
|
|
168
|
-
`).filter(A=>A)},maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Ii=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Li=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Di=v=>{const C=hr(v);if(v.securityHeader)try{C.securityHeader=JSON.parse(v.securityHeader)}catch{C.securityHeader=null}if(v.cors)try{C.cors=JSON.parse(v.cors)}catch{C.cors=null}return C};function Qr({ref:v=null}){const{t:C}=D.useContext(he),{roles:A}=et(),_=$e()?.transitions?.duration?.leavingScreen||300,x=pe({mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("accessPolicy.edit"):this.mode==="view"?C("accessPolicy.view"):C("accessPolicy.add")}}),{handleSubmit:y,control:s,watch:g,setValue:m,reset:u,formState:{errors:t}}=fe({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),o=E(()=>{u(),x.mode="add"}),a=E(()=>{x.show=!1,setTimeout(()=>{o()},_)}),n=E((f=G,k=null)=>{if(x.callback=f,x.show=!0,k){k.id?x.mode="edit":x.mode="view";const S=Xr(k);m("name",S.name),m("description",S.description),m("roles",S.roles),m("whoCanAccess",S.whoCanAccess)}});D.useImperativeHandle(v,()=>({open:n,close:a}),[n,a]);const r=E(f=>{x.callback($i(f),a)}),c=E(f=>f?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),i=g("whoCanAccess"),l=x.mode==="view",d=E(f=>["roles","roles_reverse"].includes(i)&&(!f||f?.length===0)?C("common.requiredErrorText",{name:C("accessPolicy.form.roles")}):!0),p=E(f=>f?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.accessType")}));return e.jsx(we,{open:x.show,title:x.dialogTitle,onClose:a,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:y(r),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(z,{name:"name",control:s,rules:{validate:c},render:({field:f})=>e.jsx(N,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:l,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...f})}),e.jsx(z,{name:"whoCanAccess",control:s,rules:{validate:p},render:({field:f})=>e.jsx(Yr,{required:!0,size:"small",margin:"dense",disabled:l,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...f})}),["roles","roles_reverse"].includes(i)?e.jsx(z,{name:"roles",rules:{validate:d},control:s,render:({field:f})=>e.jsxs(V,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Qe,{sx:{display:"flex",flexDirection:"row",mt:-3},children:A.map(k=>e.jsx(se,{control:e.jsx(qe,{disabled:l,size:"small",checked:f.value?.includes(k.name),sx:{p:.75},onChange:(S,h)=>{const b=f.value||[];h?f.onChange([...b,k.name]):f.onChange(b.filter(j=>j!==k.name))}}),label:k.title},k.name))}),e.jsx(sr,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(z,{name:"description",control:s,render:({field:f})=>e.jsx(N,{fullWidth:!0,multiline:!0,disabled:l,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:C("accessPolicy.form.descriptionPlaceholder"),label:C("accessPolicy.form.description"),helperText:t?.message,...f})})]})})}Qr.propTypes={ref:T.any};function qi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),{roles:_}=et(),x=A?.meta?.did,y=D.useRef(null),s=D.useRef(null),{confirmApi:g,confirmHolder:m}=Ee(),u=()=>{},t=We(async()=>{const{accessPolicies:p}=await R.getBlockletAccessPolicies({input:{did:x}});return Xe(p,f=>f.isProtected?1:0)}),o=t.data||[],a=E(()=>{s.current.open((p,f)=>{xe(async()=>{await R.addBlockletAccessPolicy({input:{did:x,data:p}}),B.success(v("common.succeeded")),t.run(),f()})})}),n=E(p=>{s.current.open((f,k)=>{xe(async()=>{await R.updateBlockletAccessPolicy({input:{did:x,data:{...f,id:p.id}}}),B.success(v("common.succeeded")),t.run(),k()})},p)}),r=E(p=>{s.current.open((f,k)=>{k()},Oe(p,["id"]))}),c=E(p=>{g.open({title:v("accessPolicy.delete.title"),content:v("accessPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(f){xe(async()=>{await R.deleteBlockletAccessPolicy({input:{did:x,id:p.id}}),B.success(v("common.succeeded")),t.run(),f()})}})}),i={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:f},k){if(y.current?.contains(k.target)){const S=o[f];r(S)}}},l=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:a,children:v("common.add")})],d=[{label:v("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(p){const f=o[p],k=f.isProtected?e.jsx(oe,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:re,icon:mr,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",f.name]})}}},{label:v("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(p){const f=o[p],k=Xr(f);if([U.WHO_CAN_ACCESS.ALL,U.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const h=Gr.find(b=>b.value===k.whoCanAccess);return h.title?.[C]||h.title?.en}const S=_.filter(h=>f.reverse?!k.roles?.includes(h.name):k.roles?.includes(h.name));return e.jsx(O,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:S.map(h=>e.jsx(oe,{title:h.description,children:e.jsx(Rt,{size:"small",label:h.title},h.name)}))})}}},{label:v("accessPolicy.form.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const f=o[p];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[f.isProtected?e.jsx(oe,{title:v("common.view"),children:e.jsx(ce,{size:"small",onClick:()=>{r(f,p)},children:e.jsx(re,{icon:Jr,fontSize:18})})}):null,f.isProtected?null:e.jsx(oe,{title:v("common.edit"),children:e.jsx(ce,{size:"small",onClick:()=>{n(f,p)},color:"success",children:e.jsx(re,{icon:nt,fontSize:18})})}),f.isProtected?null:e.jsx(oe,{title:v("common.delete"),children:e.jsx(ce,{size:"small",onClick:()=>{c(f,p)},color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:y,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:v("accessPolicy.title"),data:o,columns:d,customButtons:l,options:i,loading:t.loading,onChange:u}),e.jsx(Qr,{ref:s}),m]})}const Mi={width:24,height:24,body:'<path fill="currentColor" d="m12 15.375l-6-6l1.4-1.4l4.6 4.6l4.6-4.6l1.4 1.4l-6 6Z"/>'};function St({title:v,actions:C,children:A=null,defaultValue:R=!0,value:_,onChange:x,showExpand:y=!0}){const s=!Pe(_),g=pe({open:R}),m=_e(()=>s?_:g.open,[_,s,g.open]),u=E(()=>{s?x(!m):g.open=!g.open});return e.jsxs(ir,{variant:"outlined",children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(O,{sx:{fontWeight:"bold"},children:v}),e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[C,y?e.jsx(O,{component:re,icon:Mi,sx:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(Un,{in:m,children:e.jsx(js,{children:A})})]})}St.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const Ct={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'};function en({config:v={},onChange:C=()=>{},disabled:A=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...R]},allowedHeaders:{override:!1,value:"*"},exposedHeaders:{override:!1,value:"*"},maxAge:{override:!1,value:void 0},optionsSuccessStatus:{override:!1,value:204},preflightContinue:{override:!1,value:!1},credentials:{override:!1,value:!1},...fr(v,Pe)},{t:x}=ne(),y=(m,{override:u,value:t,smart:o})=>{const a={..._?.[m]};!Pe(o)&&m==="origin"&&(a.smart=o),Pe(u)||(a.override=u),Pe(t)||(a.value=t),C({..._,[m]:a})},s=[{title:x("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(V,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:4,maxRows:10,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:m=>{y("origin",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Qe,{sx:{flexDirection:"row"},children:R.map(m=>e.jsx(se,{control:e.jsx(qe,{size:"small",disabled:A,checked:_.methods.value.includes(m),onChange:(u,t)=>{y("methods",{value:t?[..._.methods.value,m]:_.methods.value.filter(o=>o!==m)})}}),label:m},m))})},{title:x("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(V,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:m=>{y("allowedHeaders",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(V,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:m=>{y("exposedHeaders",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(V,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{type:"number",variant:"outlined",size:"small",disabled:A,value:_.maxAge.value,onChange:m=>{y("maxAge",{value:m.target.value})},helperText:x("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:x("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(V,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{type:"number",variant:"outlined",size:"small",disabled:A,value:_.optionsSuccessStatus.value,onChange:m=>{y("optionsSuccessStatus",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(me,{size:"small",disabled:A,checked:_.preflightContinue.value,onChange:(m,u)=>{y("preflightContinue",{value:u})}})},{title:x("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(me,{size:"small",disabled:A,checked:_.credentials.value,onChange:(m,u)=>{y("credentials",{value:u})}})}];pr(()=>{C(_)});const g={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Qe,{children:s.map((m,u)=>e.jsxs(D.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(se,{sx:{mt:u===0?0:1},control:m.control||e.jsx(O,{sx:{pl:1.35}}),label:m.title,required:m.required},`${m.name}_form`),e.jsxs(O,{children:[m.name==="origin"?e.jsx(se,{control:e.jsx(qe,{size:"small",checked:m.smart,color:"primary",disabled:A,onChange:()=>{y(m.name,{smart:!m.smart})}}),label:e.jsxs(e.Fragment,{children:[x("responseHeaderPolicy.form.cors.smartMode"),e.jsx(oe,{title:x("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(O,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:g},`${m.name}_smart`):null,e.jsx(se,{control:e.jsx(qe,{size:"small",checked:m.override,color:"warning",disabled:A,onChange:()=>{y(m.name,{override:!m.override})}}),label:e.jsxs(e.Fragment,{children:[x("responseHeaderPolicy.form.originOverride"),e.jsx(oe,{title:x("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...g,mr:0}},`${m.name}_override`)]})]}),m.content?e.jsx(O,{sx:{ml:3.5},children:m.content},`${m.name}_content`):null]},m.name))})}en.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function tn({value:v,onChange:C=()=>{},disabled:A=!1}){const R="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],x=y=>{C({action:y.target.value})};return D.useEffect(()=>{v===!0&&C({action:R})},[v]),e.jsx(O,{children:e.jsx(V,{children:e.jsx(br,{row:!0,children:_.map(y=>e.jsx(se,{value:y.value,control:e.jsx(jr,{size:"small",disabled:A,checked:y.value===v?.action,onChange:x,sx:{p:.75}}),label:y.label},y.value))})})})}tn.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function rn({value:v,onChange:C=()=>{},disabled:A=!1}){const R="strict-origin-when-cross-origin",_=[{label:"no-referrer",value:"no-referrer"},{label:"no-referrer-when-downgrade",value:"no-referrer-when-downgrade"},{label:"origin",value:"origin"},{label:"origin-when-cross-origin",value:"origin-when-cross-origin"},{label:"same-origin",value:"same-origin"},{label:"strict-origin",value:"strict-origin"},{label:"strict-origin-when-cross-origin (default)",value:"strict-origin-when-cross-origin"},{label:"unsafe-url",value:"unsafe-url"}],x=y=>{C({policy:y.target.value})};return D.useEffect(()=>{v===!0&&C({policy:R})},[v]),e.jsx(O,{children:e.jsx(V,{children:e.jsx(br,{children:_.map(y=>e.jsx(se,{value:y.value,control:e.jsx(jr,{size:"small",disabled:A,checked:y.value===v?.policy,onChange:x,sx:{p:.75}}),label:y.label},y.value))})})})}rn.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function nn({value:v,onChange:C=()=>{},disabled:A=!1}){const R={"default-src":["'self'"],"base-uri":["'self'"],"font-src":["'self'","https:","data:"],"form-action":["'self'"],"frame-ancestors":["'self'"],"img-src":["'self'","data:"],"object-src":["'none'"],"script-src":["'self'"],"script-src-attr":["'none'"],"style-src":["'self'","https:","'unsafe-inline'"],"upgrade-insecure-requests":[]};function _(m){return Object.keys(m).map(u=>[u,m[u].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
|
|
168
|
+
`).filter(A=>A)},maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Ii=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Li=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Di=v=>{const C=hr(v);if(v.securityHeader)try{C.securityHeader=JSON.parse(v.securityHeader)}catch{C.securityHeader=null}if(v.cors)try{C.cors=JSON.parse(v.cors)}catch{C.cors=null}return C};function Qr({ref:v=null}){const{t:C}=D.useContext(he),{roles:A}=et(),_=$e()?.transitions?.duration?.leavingScreen||300,x=pe({mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("accessPolicy.edit"):this.mode==="view"?C("accessPolicy.view"):C("accessPolicy.add")}}),{handleSubmit:y,control:s,watch:g,setValue:m,reset:u,formState:{errors:t}}=fe({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),o=E(()=>{u(),x.mode="add"}),a=E(()=>{x.show=!1,setTimeout(()=>{o()},_)}),n=E((f=G,k=null)=>{if(x.callback=f,x.show=!0,k){k.id?x.mode="edit":x.mode="view";const S=Xr(k);m("name",S.name),m("description",S.description),m("roles",S.roles),m("whoCanAccess",S.whoCanAccess)}});D.useImperativeHandle(v,()=>({open:n,close:a}),[n,a]);const r=E(f=>{x.callback($i(f),a)}),c=E(f=>f?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),i=g("whoCanAccess"),l=x.mode==="view",d=E(f=>["roles","roles_reverse"].includes(i)&&(!f||f?.length===0)?C("common.requiredErrorText",{name:C("accessPolicy.form.roles")}):!0),p=E(f=>f?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.accessType")}));return e.jsx(we,{open:x.show,title:x.dialogTitle,onClose:a,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:y(r),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(B,{name:"name",control:s,rules:{validate:c},render:({field:f})=>e.jsx(N,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:l,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...f})}),e.jsx(B,{name:"whoCanAccess",control:s,rules:{validate:p},render:({field:f})=>e.jsx(Yr,{required:!0,size:"small",margin:"dense",disabled:l,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...f})}),["roles","roles_reverse"].includes(i)?e.jsx(B,{name:"roles",rules:{validate:d},control:s,render:({field:f})=>e.jsxs(U,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Qe,{sx:{display:"flex",flexDirection:"row",mt:-3},children:A.map(k=>e.jsx(se,{control:e.jsx(qe,{disabled:l,size:"small",checked:f.value?.includes(k.name),sx:{p:.75},onChange:(S,h)=>{const b=f.value||[];h?f.onChange([...b,k.name]):f.onChange(b.filter(j=>j!==k.name))}}),label:k.title},k.name))}),e.jsx(sr,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(B,{name:"description",control:s,render:({field:f})=>e.jsx(N,{fullWidth:!0,multiline:!0,disabled:l,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:C("accessPolicy.form.descriptionPlaceholder"),label:C("accessPolicy.form.description"),helperText:t?.message,...f})})]})})}Qr.propTypes={ref:T.any};function qi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),{roles:_}=et(),x=A?.meta?.did,y=D.useRef(null),s=D.useRef(null),{confirmApi:g,confirmHolder:m}=Ee(),u=()=>{},t=We(async()=>{const{accessPolicies:p}=await R.getBlockletAccessPolicies({input:{did:x}});return Xe(p,f=>f.isProtected?1:0)}),o=t.data||[],a=E(()=>{s.current.open((p,f)=>{xe(async()=>{await R.addBlockletAccessPolicy({input:{did:x,data:p}}),z.success(v("common.succeeded")),t.run(),f()})})}),n=E(p=>{s.current.open((f,k)=>{xe(async()=>{await R.updateBlockletAccessPolicy({input:{did:x,data:{...f,id:p.id}}}),z.success(v("common.succeeded")),t.run(),k()})},p)}),r=E(p=>{s.current.open((f,k)=>{k()},Pe(p,["id"]))}),c=E(p=>{g.open({title:v("accessPolicy.delete.title"),content:v("accessPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(f){xe(async()=>{await R.deleteBlockletAccessPolicy({input:{did:x,id:p.id}}),z.success(v("common.succeeded")),t.run(),f()})}})}),i={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:f},k){if(y.current?.contains(k.target)){const S=o[f];r(S)}}},l=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:a,children:v("common.add")})],d=[{label:v("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(p){const f=o[p],k=f.isProtected?e.jsx(oe,{title:"Built-in policy, can't edit",children:e.jsx(P,{component:re,icon:mr,sx:{fontSize:16}})}):null;return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",f.name]})}}},{label:v("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(p){const f=o[p],k=Xr(f);if([V.WHO_CAN_ACCESS.ALL,V.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const h=Gr.find(b=>b.value===k.whoCanAccess);return h.title?.[C]||h.title?.en}const S=_.filter(h=>f.reverse?!k.roles?.includes(h.name):k.roles?.includes(h.name));return e.jsx(P,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:S.map(h=>e.jsx(oe,{title:h.description,children:e.jsx(Rt,{size:"small",label:h.title},h.name)}))})}}},{label:v("accessPolicy.form.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const f=o[p];return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[f.isProtected?e.jsx(oe,{title:v("common.view"),children:e.jsx(ce,{size:"small",onClick:()=>{r(f,p)},children:e.jsx(re,{icon:Jr,fontSize:18})})}):null,f.isProtected?null:e.jsx(oe,{title:v("common.edit"),children:e.jsx(ce,{size:"small",onClick:()=>{n(f,p)},color:"success",children:e.jsx(re,{icon:nt,fontSize:18})})}),f.isProtected?null:e.jsx(oe,{title:v("common.delete"),children:e.jsx(ce,{size:"small",onClick:()=>{c(f,p)},color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:y,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:v("accessPolicy.title"),data:o,columns:d,customButtons:l,options:i,loading:t.loading,onChange:u}),e.jsx(Qr,{ref:s}),m]})}const Mi={width:24,height:24,body:'<path fill="currentColor" d="m12 15.375l-6-6l1.4-1.4l4.6 4.6l4.6-4.6l1.4 1.4l-6 6Z"/>'};function St({title:v,actions:C,children:A=null,defaultValue:R=!0,value:_,onChange:x,showExpand:y=!0}){const s=!Oe(_),g=pe({open:R}),m=_e(()=>s?_:g.open,[_,s,g.open]),u=E(()=>{s?x(!m):g.open=!g.open});return e.jsxs(ir,{variant:"outlined",children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(P,{sx:{fontWeight:"bold"},children:v}),e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[C,y?e.jsx(P,{component:re,icon:Mi,sx:{transform:m?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(Vn,{in:m,children:e.jsx(js,{children:A})})]})}St.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const Ct={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'};function en({config:v={},onChange:C=()=>{},disabled:A=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...R]},allowedHeaders:{override:!1,value:"*"},exposedHeaders:{override:!1,value:"*"},maxAge:{override:!1,value:void 0},optionsSuccessStatus:{override:!1,value:204},preflightContinue:{override:!1,value:!1},credentials:{override:!1,value:!1},...fr(v,Oe)},{t:x}=ne(),y=(m,{override:u,value:t,smart:o})=>{const a={..._?.[m]};!Oe(o)&&m==="origin"&&(a.smart=o),Oe(u)||(a.override=u),Oe(t)||(a.value=t),C({..._,[m]:a})},s=[{title:x("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(U,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:4,maxRows:10,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:m=>{y("origin",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Qe,{sx:{flexDirection:"row"},children:R.map(m=>e.jsx(se,{control:e.jsx(qe,{size:"small",disabled:A,checked:_.methods.value.includes(m),onChange:(u,t)=>{y("methods",{value:t?[..._.methods.value,m]:_.methods.value.filter(o=>o!==m)})}}),label:m},m))})},{title:x("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(U,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:m=>{y("allowedHeaders",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(U,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:x("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:x("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:m=>{y("exposedHeaders",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(U,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{type:"number",variant:"outlined",size:"small",disabled:A,value:_.maxAge.value,onChange:m=>{y("maxAge",{value:m.target.value})},helperText:x("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:x("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(U,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(N,{type:"number",variant:"outlined",size:"small",disabled:A,value:_.optionsSuccessStatus.value,onChange:m=>{y("optionsSuccessStatus",{value:m.target.value})}})})},{title:x("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(me,{size:"small",disabled:A,checked:_.preflightContinue.value,onChange:(m,u)=>{y("preflightContinue",{value:u})}})},{title:x("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(me,{size:"small",disabled:A,checked:_.credentials.value,onChange:(m,u)=>{y("credentials",{value:u})}})}];pr(()=>{C(_)});const g={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Qe,{children:s.map((m,u)=>e.jsxs(D.Fragment,{children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(se,{sx:{mt:u===0?0:1},control:m.control||e.jsx(P,{sx:{pl:1.35}}),label:m.title,required:m.required},`${m.name}_form`),e.jsxs(P,{children:[m.name==="origin"?e.jsx(se,{control:e.jsx(qe,{size:"small",checked:m.smart,color:"primary",disabled:A,onChange:()=>{y(m.name,{smart:!m.smart})}}),label:e.jsxs(e.Fragment,{children:[x("responseHeaderPolicy.form.cors.smartMode"),e.jsx(oe,{title:x("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(P,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:g},`${m.name}_smart`):null,e.jsx(se,{control:e.jsx(qe,{size:"small",checked:m.override,color:"warning",disabled:A,onChange:()=>{y(m.name,{override:!m.override})}}),label:e.jsxs(e.Fragment,{children:[x("responseHeaderPolicy.form.originOverride"),e.jsx(oe,{title:x("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(P,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...g,mr:0}},`${m.name}_override`)]})]}),m.content?e.jsx(P,{sx:{ml:3.5},children:m.content},`${m.name}_content`):null]},m.name))})}en.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function tn({value:v,onChange:C=()=>{},disabled:A=!1}){const R="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],x=y=>{C({action:y.target.value})};return D.useEffect(()=>{v===!0&&C({action:R})},[v]),e.jsx(P,{children:e.jsx(U,{children:e.jsx(br,{row:!0,children:_.map(y=>e.jsx(se,{value:y.value,control:e.jsx(jr,{size:"small",disabled:A,checked:y.value===v?.action,onChange:x,sx:{p:.75}}),label:y.label},y.value))})})})}tn.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function rn({value:v,onChange:C=()=>{},disabled:A=!1}){const R="strict-origin-when-cross-origin",_=[{label:"no-referrer",value:"no-referrer"},{label:"no-referrer-when-downgrade",value:"no-referrer-when-downgrade"},{label:"origin",value:"origin"},{label:"origin-when-cross-origin",value:"origin-when-cross-origin"},{label:"same-origin",value:"same-origin"},{label:"strict-origin",value:"strict-origin"},{label:"strict-origin-when-cross-origin (default)",value:"strict-origin-when-cross-origin"},{label:"unsafe-url",value:"unsafe-url"}],x=y=>{C({policy:y.target.value})};return D.useEffect(()=>{v===!0&&C({policy:R})},[v]),e.jsx(P,{children:e.jsx(U,{children:e.jsx(br,{children:_.map(y=>e.jsx(se,{value:y.value,control:e.jsx(jr,{size:"small",disabled:A,checked:y.value===v?.policy,onChange:x,sx:{p:.75}}),label:y.label},y.value))})})})}rn.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function nn({value:v,onChange:C=()=>{},disabled:A=!1}){const R={"default-src":["'self'"],"base-uri":["'self'"],"font-src":["'self'","https:","data:"],"form-action":["'self'"],"frame-ancestors":["'self'"],"img-src":["'self'","data:"],"object-src":["'none'"],"script-src":["'self'"],"script-src-attr":["'none'"],"style-src":["'self'","https:","'unsafe-inline'"],"upgrade-insecure-requests":[]};function _(m){return Object.keys(m).map(u=>[u,m[u].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
|
|
169
169
|
`)}const x=_(v?.directives||R),[y,s]=D.useState(x),g=m=>{s(m.target.value);const u=m.target.value.split(`
|
|
170
|
-
`).reduce((t,o)=>{const[a,...n]=o.split(" ");return t[a]=n.filter(r=>r!==""),t},{});C({useDefaults:!1,directives:u})};return D.useEffect(()=>{v===!0&&(C({useDefaults:!1,directives:R}),s(_(R)))},[v]),e.jsx(O,{sx:{mt:1},children:e.jsx(V,{fullWidth:!0,children:e.jsx(N,{fullWidth:!0,multiline:!0,disabled:A,rows:12,size:"small",value:y,onChange:g})})})}nn.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function sn({config:v={},onChange:C=()=>{},disabled:A=!1}){const R={contentSecurityPolicy:{override:!1,value:!1},referrerPolicy:{override:!1,value:!1},xFrameOptions:{override:!1,value:!1},xPoweredBy:{override:!1,value:!0},xXssProtection:{override:!1,value:!1},...fr(v,Pe)},{t:_}=ne(),x=(g,{override:m,value:u})=>{const t={...R?.[g]};Pe(m)||(t.override=m),Pe(u)||(t.value=u),C({...R,[g]:t})},y=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(nn,{disabled:A,value:R.contentSecurityPolicy.value,onChange:g=>{x("contentSecurityPolicy",{value:g})}}),onChange(g){x("contentSecurityPolicy",{value:g})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(rn,{disabled:A,value:R.referrerPolicy.value,onChange:g=>{x("referrerPolicy",{value:g})}}),onChange(g){x("referrerPolicy",{value:g})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(tn,{disabled:A,value:R.xFrameOptions.value,onChange:g=>{x("xFrameOptions",{value:g})}}),onChange(g){x("xFrameOptions",{value:g})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(g){x("xPoweredBy",{value:g})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(g){x("xXssProtection",{value:g})}}];pr(()=>{C(R)});const s={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Qe,{children:y.map((g,m)=>e.jsxs(D.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(se,{sx:{mt:m===0?0:1},control:e.jsx(me,{size:"small",disabled:A,checked:g.value,onChange:()=>{g.onChange(!g.value)}},`${g.name}_switch`),label:g.title},`${g.name}_form`),g.value?e.jsx(se,{control:e.jsx(qe,{size:"small",checked:g.override,color:"warning",disabled:A,onChange:()=>{x(g.name,{override:!g.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(oe,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...s,mr:0}}):null]}),g.value&&g.content?e.jsx(O,{sx:{ml:3.7},children:g.content},`${g.name}_content`):null]},g.name))})}sn.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function an({ref:v=null}){const{t:C}=D.useContext(he),R=$e()?.transitions?.duration?.leavingScreen||300,_=pe({mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("responseHeaderPolicy.edit"):this.mode==="view"?C("responseHeaderPolicy.view"):C("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:x,control:y,setValue:s,reset:g,formState:{errors:m}}=fe({mode:"onChange",defaultValues:{name:"",description:""}}),u=E(()=>{g(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{u()},R)}),o=E((l=G,d=null)=>{_.callback=l,_.show=!0,d&&(d.id?_.mode="edit":_.mode="view",s("name",d.name),s("description",d.description),_.cors=Ti(d.cors),_.securityHeader=Ii(d.securityHeader),_.enableCORS=!!d.cors)});D.useImperativeHandle(v,()=>({open:o,close:t}),[o,t]);const a=_.mode==="view",n=E(l=>{const d=Ei(_.cors),p=Li(_.securityHeader),f=hr({...l,cors:_.enableCORS?JSON.stringify(d):null,securityHeader:JSON.stringify(p)});_.callback(f,t)}),r=E(l=>l?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),c=l=>{_.securityHeader=l},i=l=>{_.cors=l};return e.jsx(we,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:x(n),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(z,{name:"name",control:y,rules:{validate:r},render:({field:l})=>e.jsx(N,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:a,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!m?.name?.message,helperText:m?.name?.message||" ",...l})}),e.jsx(z,{name:"description",control:y,render:({field:l})=>e.jsx(N,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:a,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:m?.description?.message||" ",...l})}),e.jsx(St,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:l=>{a||(_.enableCORS=l)},showExpand:!1,actions:e.jsx(me,{size:"small",disabled:a,checked:_.enableCORS}),children:e.jsx(en,{config:_.cors,onChange:i,disabled:a})}),e.jsx("br",{}),e.jsx(St,{title:"Security Headers",children:e.jsx(sn,{config:_.securityHeader,onChange:c,disabled:a})})]})})}an.propTypes={ref:T.any};function zi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,x=D.useRef(null),y=D.useRef(null),{confirmApi:s,confirmHolder:g}=Ee(),m=()=>{},u=We(async()=>{const{responseHeaderPolicies:d}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Xe(d.map(p=>Di(p)),p=>p.isProtected?1:0)}),t=u.data||[],o=E(()=>{x.current.open((d,p)=>{xe(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:_,data:d}}),B.success(v("common.succeeded")),u.run(),p()})})}),a=E(d=>{x.current.open((p,f)=>{f()},Oe(d,["id"]))}),n=E(d=>{x.current.open((p,f)=>{xe(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...p,id:d.id}}}),B.success(v("common.succeeded")),u.run(),f()})},d)}),r=E(d=>{s.open({title:v("responseHeaderPolicy.delete.title"),content:v("responseHeaderPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(p){xe(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:_,id:d.id}}),B.success(v("common.succeeded")),u.run(),p()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:p},f){if(y.current?.contains(f.target)){const k=t[p];a(k)}}},i=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:o,children:v("common.add")},"add")],l=[{label:v("common.name"),name:"name",options:{customBodyRenderLite(d){const p=t[d],f=p.isProtected?e.jsx(oe,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:re,icon:mr,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[f," ",p.name]})}}},{label:v("common.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const p=t[d];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:f=>f.stopPropagation(),children:[p.isProtected?e.jsx(oe,{title:v("common.view"),children:e.jsx(ce,{size:"small",onClick:()=>{a(p,d)},children:e.jsx(re,{icon:Jr,fontSize:18})})}):null,p.isProtected?null:e.jsx(oe,{title:v("common.edit"),children:e.jsx(ce,{size:"small",onClick:()=>{n(p,d)},color:"success",children:e.jsx(re,{icon:nt,fontSize:18})})}),p.isProtected?null:e.jsx(oe,{title:v("common.delete"),children:e.jsx(ce,{size:"small",onClick:()=>{r(p,d)},color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:y,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:v("responseHeaderPolicy.title"),data:t,columns:l,customButtons:i,options:c,loading:u.loading,onChange:m}),e.jsx(an,{ref:x}),g]})}const on=({tabs:v,blocklet:C,ancestors:A=[],depth:R=1,t:_})=>{const x=[...A.map(s=>s.meta.did),C.meta.did].join("/"),y=!A?.length;v.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[y?e.jsx(Gn,{size:24,blocklet:C,style:{borderRadius:0}}):e.jsx(Yn,{size:24,blocklet:C,ancestors:A,style:{borderRadius:0}}),e.jsx(O,{sx:{ml:2},children:e.jsx(O,{sx:{color:"text.primary"},children:y?_("blocklet.component.container"):lr.getDisplayName(C,!0)})})]},x),value:x}),C.children.length>0&&C.children.forEach(s=>{on({tabs:v,blocklet:s,ancestors:[...A,C],depth:R+1,t:_})})};function Bi({blocklet:v,onUpdate:C=()=>{},...A}){const{t:R}=ne(),_=pe({expandPref:!0,expandSecurity:!0}),[x,y]=Vn(),s=x.get("tab")||"general",g=vr(),[m,u]=D.useState(!1),t=[];t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Ts,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(Bt,{fontSize:"inherit"}):e.jsx(Ht,{fontSize:"inherit"})}),e.jsx(wt,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(wt,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Rs,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(re,{fontSize:24,style:{flexShrink:0},icon:Ms}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(Ps,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx($s,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(Bt,{fontSize:"inherit"}):e.jsx(Ht,{fontSize:"inherit"})}),e.jsx(Xn,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const o=t.find(c=>c.value===s);_.expandPref&&on({tabs:t,blocklet:v,t:R});const a=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:y(i=>(c==="general"?i.delete("tab"):i.set("tab",c),i)),u(!1)};let n=null;s==="general"?n=e.jsx(ii,{blocklet:v,onUpdate:C}):s==="security"?n=e.jsx(Pi,{}):s==="accessPolicy"?n=e.jsx(qi,{}):s==="responseHeaderPolicy"?n=e.jsx(zi,{}):s==="authentication"?n=e.jsx(Ur,{}):s==="notification"?n=e.jsx(gi,{}):n=e.jsx(os,{id:s});const r=D.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(Hi,{...A,children:[g&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{color:"primary.main",position:"sticky",top:0,zIndex:2,bgcolor:"background.default",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[e.jsx(ce,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(Kn,{})}),e.jsx(O,{children:o?.label})]}),e.jsx(Jn,{anchor:"left",open:m,onClose:()=>u(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Ue,{tabs:t,current:s,orientation:"vertical",onChange:a,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(at,{container:!0,spacing:4,columns:24,children:[!g&&e.jsx(at,{size:{xs:24,sm:7,md:5},children:e.jsx(Ue,{tabs:t,current:s,orientation:"vertical",onChange:a,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(at,{size:{xs:24,sm:17,md:19},children:e.jsx(O,{style:r,children:n})})]})]})}Bi.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const Hi=ve.div`
|
|
170
|
+
`).reduce((t,o)=>{const[a,...n]=o.split(" ");return t[a]=n.filter(r=>r!==""),t},{});C({useDefaults:!1,directives:u})};return D.useEffect(()=>{v===!0&&(C({useDefaults:!1,directives:R}),s(_(R)))},[v]),e.jsx(P,{sx:{mt:1},children:e.jsx(U,{fullWidth:!0,children:e.jsx(N,{fullWidth:!0,multiline:!0,disabled:A,rows:12,size:"small",value:y,onChange:g})})})}nn.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function sn({config:v={},onChange:C=()=>{},disabled:A=!1}){const R={contentSecurityPolicy:{override:!1,value:!1},referrerPolicy:{override:!1,value:!1},xFrameOptions:{override:!1,value:!1},xPoweredBy:{override:!1,value:!0},xXssProtection:{override:!1,value:!1},...fr(v,Oe)},{t:_}=ne(),x=(g,{override:m,value:u})=>{const t={...R?.[g]};Oe(m)||(t.override=m),Oe(u)||(t.value=u),C({...R,[g]:t})},y=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(nn,{disabled:A,value:R.contentSecurityPolicy.value,onChange:g=>{x("contentSecurityPolicy",{value:g})}}),onChange(g){x("contentSecurityPolicy",{value:g})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(rn,{disabled:A,value:R.referrerPolicy.value,onChange:g=>{x("referrerPolicy",{value:g})}}),onChange(g){x("referrerPolicy",{value:g})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(tn,{disabled:A,value:R.xFrameOptions.value,onChange:g=>{x("xFrameOptions",{value:g})}}),onChange(g){x("xFrameOptions",{value:g})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(g){x("xPoweredBy",{value:g})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(g){x("xXssProtection",{value:g})}}];pr(()=>{C(R)});const s={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Qe,{children:y.map((g,m)=>e.jsxs(D.Fragment,{children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(se,{sx:{mt:m===0?0:1},control:e.jsx(me,{size:"small",disabled:A,checked:g.value,onChange:()=>{g.onChange(!g.value)}},`${g.name}_switch`),label:g.title},`${g.name}_form`),g.value?e.jsx(se,{control:e.jsx(qe,{size:"small",checked:g.override,color:"warning",disabled:A,onChange:()=>{x(g.name,{override:!g.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(oe,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(P,{component:re,icon:Ct,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...s,mr:0}}):null]}),g.value&&g.content?e.jsx(P,{sx:{ml:3.7},children:g.content},`${g.name}_content`):null]},g.name))})}sn.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function an({ref:v=null}){const{t:C}=D.useContext(he),R=$e()?.transitions?.duration?.leavingScreen||300,_=pe({mode:"add",show:!1,callback:G,get dialogTitle(){return this.mode==="edit"?C("responseHeaderPolicy.edit"):this.mode==="view"?C("responseHeaderPolicy.view"):C("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:x,control:y,setValue:s,reset:g,formState:{errors:m}}=fe({mode:"onChange",defaultValues:{name:"",description:""}}),u=E(()=>{g(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{u()},R)}),o=E((l=G,d=null)=>{_.callback=l,_.show=!0,d&&(d.id?_.mode="edit":_.mode="view",s("name",d.name),s("description",d.description),_.cors=Ti(d.cors),_.securityHeader=Ii(d.securityHeader),_.enableCORS=!!d.cors)});D.useImperativeHandle(v,()=>({open:o,close:t}),[o,t]);const a=_.mode==="view",n=E(l=>{const d=Ei(_.cors),p=Li(_.securityHeader),f=hr({...l,cors:_.enableCORS?JSON.stringify(d):null,securityHeader:JSON.stringify(p)});_.callback(f,t)}),r=E(l=>l?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),c=l=>{_.securityHeader=l},i=l=>{_.cors=l};return e.jsx(we,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(J,{color:"primary",autoFocus:!0,variant:"contained",onClick:x(n),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(B,{name:"name",control:y,rules:{validate:r},render:({field:l})=>e.jsx(N,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:a,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!m?.name?.message,helperText:m?.name?.message||" ",...l})}),e.jsx(B,{name:"description",control:y,render:({field:l})=>e.jsx(N,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:a,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:m?.description?.message||" ",...l})}),e.jsx(St,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:l=>{a||(_.enableCORS=l)},showExpand:!1,actions:e.jsx(me,{size:"small",disabled:a,checked:_.enableCORS}),children:e.jsx(en,{config:_.cors,onChange:i,disabled:a})}),e.jsx("br",{}),e.jsx(St,{title:"Security Headers",children:e.jsx(sn,{config:_.securityHeader,onChange:c,disabled:a})})]})})}an.propTypes={ref:T.any};function Bi(){const{t:v,locale:C}=ne(),{blocklet:A}=ie(),{api:R}=Q(),_=A?.meta?.did,x=D.useRef(null),y=D.useRef(null),{confirmApi:s,confirmHolder:g}=Ee(),m=()=>{},u=We(async()=>{const{responseHeaderPolicies:d}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Xe(d.map(p=>Di(p)),p=>p.isProtected?1:0)}),t=u.data||[],o=E(()=>{x.current.open((d,p)=>{xe(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:_,data:d}}),z.success(v("common.succeeded")),u.run(),p()})})}),a=E(d=>{x.current.open((p,f)=>{f()},Pe(d,["id"]))}),n=E(d=>{x.current.open((p,f)=>{xe(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...p,id:d.id}}}),z.success(v("common.succeeded")),u.run(),f()})},d)}),r=E(d=>{s.open({title:v("responseHeaderPolicy.delete.title"),content:v("responseHeaderPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(p){xe(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:_,id:d.id}}),z.success(v("common.succeeded")),u.run(),p()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:p},f){if(y.current?.contains(f.target)){const k=t[p];a(k)}}},i=[e.jsx(le,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(le,{size:"small",variant:"contained",onClick:o,children:v("common.add")},"add")],l=[{label:v("common.name"),name:"name",options:{customBodyRenderLite(d){const p=t[d],f=p.isProtected?e.jsx(oe,{title:"Built-in policy, can't edit",children:e.jsx(P,{component:re,icon:mr,sx:{fontSize:16}})}):null;return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[f," ",p.name]})}}},{label:v("common.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const p=t[d];return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:f=>f.stopPropagation(),children:[p.isProtected?e.jsx(oe,{title:v("common.view"),children:e.jsx(ce,{size:"small",onClick:()=>{a(p,d)},children:e.jsx(re,{icon:Jr,fontSize:18})})}):null,p.isProtected?null:e.jsx(oe,{title:v("common.edit"),children:e.jsx(ce,{size:"small",onClick:()=>{n(p,d)},color:"success",children:e.jsx(re,{icon:nt,fontSize:18})})}),p.isProtected?null:e.jsx(oe,{title:v("common.delete"),children:e.jsx(ce,{size:"small",onClick:()=>{r(p,d)},color:"error",children:e.jsx(re,{icon:rt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:y,children:[e.jsx(tt,{verticalKeyWidth:100,locale:C,title:v("responseHeaderPolicy.title"),data:t,columns:l,customButtons:i,options:c,loading:u.loading,onChange:m}),e.jsx(an,{ref:x}),g]})}const on=({tabs:v,blocklet:C,ancestors:A=[],depth:R=1,t:_})=>{const x=[...A.map(s=>s.meta.did),C.meta.did].join("/"),y=!A?.length;v.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[y?e.jsx(Gn,{size:24,blocklet:C,style:{borderRadius:0}}):e.jsx(Yn,{size:24,blocklet:C,ancestors:A,style:{borderRadius:0}}),e.jsx(P,{sx:{ml:2},children:e.jsx(P,{sx:{color:"text.primary"},children:y?_("blocklet.component.container"):lr.getDisplayName(C,!0)})})]},x),value:x}),C.children.length>0&&C.children.forEach(s=>{on({tabs:v,blocklet:s,ancestors:[...A,C],depth:R+1,t:_})})};function zi({blocklet:v,onUpdate:C=()=>{},...A}){const{t:R}=ne(),_=pe({expandPref:!0,expandSecurity:!0}),[x,y]=Un(),s=x.get("tab")||"general",g=vr(),[m,u]=D.useState(!1),t=[];t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Ts,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(zt,{fontSize:"inherit"}):e.jsx(Ht,{fontSize:"inherit"})}),e.jsx(wt,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(wt,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Rs,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(re,{fontSize:24,style:{flexShrink:0},icon:Ms}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(Os,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx($s,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(zt,{fontSize:"inherit"}):e.jsx(Ht,{fontSize:"inherit"})}),e.jsx(Xn,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const o=t.find(c=>c.value===s);_.expandPref&&on({tabs:t,blocklet:v,t:R});const a=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:y(i=>(c==="general"?i.delete("tab"):i.set("tab",c),i)),u(!1)};let n=null;s==="general"?n=e.jsx(ii,{blocklet:v,onUpdate:C}):s==="security"?n=e.jsx(Oi,{}):s==="accessPolicy"?n=e.jsx(qi,{}):s==="responseHeaderPolicy"?n=e.jsx(Bi,{}):s==="authentication"?n=e.jsx(Vr,{}):s==="notification"?n=e.jsx(gi,{}):n=e.jsx(os,{id:s});const r=D.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(Hi,{...A,children:[g&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{sx:{color:"primary.main",position:"sticky",top:0,zIndex:2,bgcolor:"background.default",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[e.jsx(ce,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(Kn,{})}),e.jsx(P,{children:o?.label})]}),e.jsx(Jn,{anchor:"left",open:m,onClose:()=>u(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Ve,{tabs:t,current:s,orientation:"vertical",onChange:a,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(at,{container:!0,spacing:4,columns:24,children:[!g&&e.jsx(at,{size:{xs:24,sm:7,md:5},children:e.jsx(Ve,{tabs:t,current:s,orientation:"vertical",onChange:a,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(at,{size:{xs:24,sm:17,md:19},children:e.jsx(P,{style:r,children:n})})]})]})}zi.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const Hi=ve.div`
|
|
171
171
|
.MuiTab-root {
|
|
172
172
|
text-align: left;
|
|
173
173
|
align-items: flex-start;
|
|
@@ -176,4 +176,4 @@ ${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
176
176
|
.Mui-selected {
|
|
177
177
|
font-weight: bold;
|
|
178
178
|
}
|
|
179
|
-
`;export{
|
|
179
|
+
`;export{zi as default};
|