@abtnode/blocklet-services 1.16.39-beta-20250213-123635-cabff5af → 1.16.39-beta-20250218-110004-a308c501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +6 -2
- package/api/libs/email.js +2 -2
- package/api/services/notification/index.js +4 -2
- package/api/services/notification/notification-queue.js +671 -0
- package/api/socket/channel/did.js +146 -473
- package/dist/assets/{Add-TglZpKpw.js → Add-eTw9dWVa.js} +1 -1
- package/dist/assets/{ArrowDropDown-DCM27ed6.js → ArrowDropDown-D-RD-2MB.js} +1 -1
- package/dist/assets/{CheckCircle-CH8SYy4d.js → CheckCircle-fnIa_Tjy.js} +1 -1
- package/dist/assets/{ChevronLeft-B7m8AFzR.js → ChevronLeft-B6BBtJvf.js} +1 -1
- package/dist/assets/{ChevronRight-DeRklga5.js → ChevronRight-BO6iBxGF.js} +1 -1
- package/dist/assets/{DeleteOutline-DZA1YKE4.js → DeleteOutline-6B6Fe5fo.js} +1 -1
- package/dist/assets/{Done-CVdTMvGH.js → Done-BpK9makc.js} +1 -1
- package/dist/assets/{Download-DECMRaRC.js → Download-CHVAgVy8.js} +1 -1
- package/dist/assets/{Error-B61ZB0Rr.js → Error-kGbi4Zxj.js} +1 -1
- package/dist/assets/{Google-D_UbrpMW.js → Google-T-9fe6qI.js} +1 -1
- package/dist/assets/{InfoOutlined-QBw5AmWP.js → InfoOutlined-BgLmQpjA.js} +1 -1
- package/dist/assets/{Launch-Cpp3LVnV.js → Launch-C9zEVLvk.js} +1 -1
- package/dist/assets/{LaunchOutlined-WdAKKV2H.js → LaunchOutlined-Cql1NmZZ.js} +1 -1
- package/dist/assets/{Loop-CbPhaPlF.js → Loop-CawJEzLG.js} +1 -1
- package/dist/assets/{MoreHoriz-BsTY94ce.js → MoreHoriz-M9rI-Gh1.js} +1 -1
- package/dist/assets/{PlayArrow-BgVzxA9Q.js → PlayArrow-BAowUCpY.js} +1 -1
- package/dist/assets/{ViewList-DBUe2NSG.js → ViewList-BPtSTNst.js} +1 -1
- package/dist/assets/{access-control-Bi0VTaOk.js → access-control-DEUU0fDz.js} +1 -1
- package/dist/assets/{actions-DP_Rm54e.js → actions-wYAFmtYW.js} +1 -1
- package/dist/assets/{add-component-core-BEey6wbp.js → add-component-core-C36Oh0S_.js} +1 -1
- package/dist/assets/{add-resource-FReSj-BV.js → add-resource-Xm48tGBR.js} +1 -1
- package/dist/assets/{addon-DH34oI6i.js → addon-DJRfOF39.js} +1 -1
- package/dist/assets/{analytics-Ca_QfsU9.js → analytics-BxMLe4sZ.js} +1 -1
- package/dist/assets/{ar-BJD4HTM3.js → ar-BFUPmTkR.js} +1 -1
- package/dist/assets/audit-logs-QI7Dc290.js +35 -0
- package/dist/assets/{base32-CwwDjweV.js → base32-BMSr-Oor.js} +1 -1
- package/dist/assets/{branding-CPKpYWoE.js → branding-BiBArxE7.js} +2 -2
- package/dist/assets/{bundle-avatar-fBOGFPuw.js → bundle-avatar-CcKbW8ZA.js} +1 -1
- package/dist/assets/{button-4qfNeG4u.js → button-hN0nkg5h.js} +1 -1
- package/dist/assets/{click-to-copy-886R1sA9.js → click-to-copy-DlRwVMBE.js} +1 -1
- package/dist/assets/{complete-DV_B2Akx.js → complete-BCHhjgui.js} +2 -2
- package/dist/assets/{component-BFuSJ7_N.js → component---BohhtR.js} +1 -1
- package/dist/assets/{config-BBRmjpUL.js → config-BT7DA9eX.js} +1 -1
- package/dist/assets/{config-DjP6h0XJ.js → config-Chtg5c7S.js} +1 -1
- package/dist/assets/{config-navigation-ObpJPhkA.js → config-navigation-DGQXESo8.js} +3 -3
- package/dist/assets/config-space-D3_ddjoK.js +1 -0
- package/dist/assets/{confirm-BGxdRdSL.js → confirm-BUf2FX6y.js} +1 -1
- package/dist/assets/{connect-Clh-D5g-.js → connect-9ktVrhs9.js} +1 -1
- package/dist/assets/{connect-CVdbQs_b.js → connect-Bg1fiX7Q.js} +1 -1
- package/dist/assets/{connect-to-QEsnDZMk.js → connect-to-6-yxL1od.js} +1 -1
- package/dist/assets/{dashboard-7MqA_6AS.js → dashboard-CRO3eTt1.js} +4 -4
- package/dist/assets/{de-CaPBInxb.js → de-hV0yD3gq.js} +1 -1
- package/dist/assets/{did-address-CgDvtQbT.js → did-address-Rncailh0.js} +1 -1
- package/dist/assets/{domain-DwtXLEdV.js → domain-CiQ58Nbb.js} +1 -1
- package/dist/assets/{domain-list-D-ZZFmEQ.js → domain-list-DlMnYtcT.js} +2 -2
- package/dist/assets/{email-BmLIq6Hu.js → email-C7B2iQRL.js} +1 -1
- package/dist/assets/{es-hhXhgxGX.js → es-BcSAobJW.js} +1 -1
- package/dist/assets/{exchange-passport-C8_WcBsP.js → exchange-passport-DvgnrFhH.js} +1 -1
- package/dist/assets/{form-text-input-DM0E2BGK.js → form-text-input-B3XB3R1O.js} +1 -1
- package/dist/assets/{fr-BwQvAhhM.js → fr-8qti32p1.js} +1 -1
- package/dist/assets/{fuel-B78lL2Fn.js → fuel-De_bc9rw.js} +1 -1
- package/dist/assets/{fullpage-DLk_Ap1u.js → fullpage-ClwEgpoB.js} +1 -1
- package/dist/assets/{get-safe-url-BzE2b8Zw.js → get-safe-url-3FtlbQXR.js} +1 -1
- package/dist/assets/{get-safe-url-C2hTfmjV.js → get-safe-url-DgnUmHPg.js} +1 -1
- package/dist/assets/{hi-CRWmR5oy.js → hi-DDEUhQcX.js} +1 -1
- package/dist/assets/{home-B30MMEWW.js → home-s4XxyP6G.js} +1 -1
- package/dist/assets/{id-Dlr6Q1sk.js → id-DkUYINLx.js} +1 -1
- package/dist/assets/{iframe-DvysnY8O.js → iframe-DkAOGH82.js} +1 -1
- package/dist/assets/index-AKILhCB1.js +104 -0
- package/dist/assets/{index-DZevAS4q.js → index-BM6MW3P4.js} +1 -1
- package/dist/assets/{index-CYDwuSY3.js → index-BQD1ktrC.js} +1 -1
- package/dist/assets/{index-V7v6XM-s.js → index-BuAHCrPZ.js} +1 -1
- package/dist/assets/{index-BaTH8sfn.js → index-C3Z6Hby2.js} +1 -1
- package/dist/assets/{index-xzyguKIp.js → index-C3cP3eho.js} +1 -1
- package/dist/assets/{index-B4_ve2gt.js → index-CKmE0Sqg.js} +1 -1
- package/dist/assets/index-CctdI8X8.js +125 -0
- package/dist/assets/{index-BnU6Au83.js → index-DEkiPG8Y.js} +1 -1
- package/dist/assets/{index-p_TKo4z5.js → index-DFzh5oL0.js} +1 -1
- package/dist/assets/index-DiLNptzT.js +5 -0
- package/dist/assets/{index-DnUMPb7W.js → index-IC1Rf7BW.js} +1 -1
- package/dist/assets/{index-DaNBEDBM.js → index-Pdt8JY75.js} +2 -2
- package/dist/assets/{index-BXJDCni0.js → index-XjSUrEf9.js} +1 -1
- package/dist/assets/{index-DbZgctRe.js → index-vSb5bw1I.js} +4 -4
- package/dist/assets/{invitation-CLUC3FWC.js → invitation-398ugOww.js} +1 -1
- package/dist/assets/{invite-upfjzZhU.js → invite-CxctjCks.js} +1 -1
- package/dist/assets/{issue-passport-a41Odi7S.js → issue-passport-BzEXCFP0.js} +1 -1
- package/dist/assets/{item-DFHyV0HY.js → item-BzigISWG.js} +1 -1
- package/dist/assets/{ja-CmKylH6K.js → ja-C2LP4WQG.js} +1 -1
- package/dist/assets/{ko-Blp8936a.js → ko-C-DMeONa.js} +1 -1
- package/dist/assets/{layout-Ctv3Y3ew.js → layout-N5xbN7Ti.js} +1 -1
- package/dist/assets/{list-eFeJihdG.js → list-QwzSO7Cs.js} +1 -1
- package/dist/assets/{list-header-BBHpD8dC.js → list-header-bKaZ4zsu.js} +1 -1
- package/dist/assets/{localization-Ciwo-y3M.js → localization-CNvFSQc0.js} +1 -1
- package/dist/assets/{log-BsBzWP3w.js → log-Bz9TkxcV.js} +1 -1
- package/dist/assets/{login-m03_Nf1G.js → login-DbJD9Sgu.js} +1 -1
- package/dist/assets/{login-oauth-callback-D_bP2yYx.js → login-oauth-callback-BagCPt1j.js} +1 -1
- package/dist/assets/{logo-uploader-CMRcZtFG.js → logo-uploader-QnBnkpOO.js} +3 -3
- package/dist/assets/{lost-passport-PcFxL_2W.js → lost-passport-se4N22vE.js} +1 -1
- package/dist/assets/{open-window-Q0PVNWdu.js → open-window-BWPlSJZK.js} +1 -1
- package/dist/assets/{overview-O8Z47dUY.js → overview-u84fbCZU.js} +1 -1
- package/dist/assets/{page-header-BDwGXuEW.js → page-header-CVCtfFXY.js} +1 -1
- package/dist/assets/{permission-Cqed8iP-.js → permission-CoRqvd18.js} +1 -1
- package/dist/assets/{preferences-CBm0eML7.js → preferences-CCm3JuB9.js} +1 -1
- package/dist/assets/{pt-BbwAvpfn.js → pt-CbxvF__Z.js} +1 -1
- package/dist/assets/publish-resource-Cmlpn7H3.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-BTWrOgJp.js → react-beautiful-dnd.esm-CrvlS-3X.js} +1 -1
- package/dist/assets/{relative-time-BcL7VB-n.js → relative-time-IDiRzYUd.js} +1 -1
- package/dist/assets/{ru-DgfLeWul.js → ru-DLHrAeE7.js} +1 -1
- package/dist/assets/sdk-DRntvOGy.js +1 -0
- package/dist/assets/{session-BKdZFtFw.js → session-BzY_i5lZ.js} +1 -1
- package/dist/assets/{setup-DcoLUEuM.js → setup-CFL-k7o4.js} +3 -3
- package/dist/assets/{start-iucPKmSu.js → start-Bnol7r-4.js} +1 -1
- package/dist/assets/{step-actions-DXTmms_Q.js → step-actions-vFuOlgmX.js} +1 -1
- package/dist/assets/{studio-BzK2t7MU.js → studio-D8dNrjXX.js} +1 -1
- package/dist/assets/{switch-control-BSKk9hbF.js → switch-control-DTOAJIEb.js} +1 -1
- package/dist/assets/{th-DXRi_ppC.js → th-Dil9kwjH.js} +1 -1
- package/dist/assets/{traffic-Dg0xCbfH.js → traffic-C-Or__6J.js} +1 -1
- package/dist/assets/{transfer-DW5JevxW.js → transfer-tWhnvLV8.js} +1 -1
- package/dist/assets/{unsubscribe-BxmY3IWn.js → unsubscribe-8PpNeEGq.js} +1 -1
- package/dist/assets/{useLocalStorage-Bx8dJwZw.js → useLocalStorage-DDsWbihG.js} +1 -1
- package/dist/assets/{user-center-BSOPivqw.js → user-center-FVVJclAc.js} +1 -1
- package/dist/assets/util-CqwLA_zk.js +1 -0
- package/dist/assets/{util-7Hs7DKO_.js → util-DfAqJble.js} +1 -1
- package/dist/assets/{vendor-arcblock-HzAExiTd.js → vendor-arcblock-naCuSDgJ.js} +5 -5
- package/dist/assets/{vi-nO7JrO24.js → vi-B46hyfUM.js} +1 -1
- package/dist/assets/wrap-locale-JORvcC3E.js +1 -0
- package/dist/assets/{zh-CEvYioAt.js → zh-DWWuPzr1.js} +1 -1
- package/dist/assets/{zh-tw-BjfRYnXu.js → zh-tw-Ci21sS2Y.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/service-worker.js +1 -1
- package/package.json +24 -24
- package/dist/assets/audit-logs-97b1Xxh-.js +0 -18
- package/dist/assets/config-space-BbJdWcbl.js +0 -1
- package/dist/assets/index-BGAIEQ8H.js +0 -104
- package/dist/assets/index-Bg0fGJqy.js +0 -5
- package/dist/assets/index-JiEuwDJt.js +0 -123
- package/dist/assets/publish-resource-HnBr77fP.js +0 -1
- package/dist/assets/sdk-B4wNFenI.js +0 -1
- package/dist/assets/util-BtA4vTl6.js +0 -1
- package/dist/assets/wrap-locale--wnFaGbc.js +0 -1
|
@@ -6,7 +6,7 @@ var is=Object.defineProperty;var zo=_=>{throw TypeError(_)};var os=(_,C,T)=>C in
|
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
align-items: center;
|
|
9
|
-
`;var relativeTime$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){return function(T,I,M){T=T||{};var D=I.prototype,B={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function L(V,F,U,H){return D.fromToBase(V,F,U,H)}M.en.relativeTime=B,D.fromToBase=function(V,F,U,H,G){for(var Y,Z,Q,X=U.$locale().relativeTime||B,oe=T.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],ae=oe.length,le=0;le<ae;le+=1){var pe=oe[le];pe.d&&(Y=H?M(V).diff(U,pe.d,!0):U.diff(V,pe.d,!0));var me=(T.rounding||Math.round)(Math.abs(Y));if(Q=Y>0,me<=pe.r||!pe.r){me<=1&&le>0&&(pe=oe[le-1]);var ve=X[pe.l];G&&(me=G(""+me)),Z=typeof ve=="string"?ve.replace("%d",me):ve(me,F,pe.l,Q);break}}if(F)return Z;var _e=Q?X.future:X.past;return typeof _e=="function"?_e(Z):_e.replace("%s",Z)},D.to=function(V,F){return L(V,F,this,!0)},D.from=function(V,F){return L(V,F,this)};var N=function(V){return V.$u?M.utc():M()};D.toNow=function(V){return this.to(N(this),V)},D.fromNow=function(V){return this.from(N(this),V)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var localizedFormat={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(I,M,D){var B=M.prototype,L=B.format;D.en.formats=T,B.format=function(N){N===void 0&&(N="YYYY-MM-DDTHH:mm:ssZ");var V=this.$locale().formats,F=function(U,H){return U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(G,Y,Z){var Q=Z&&Z.toUpperCase();return Y||H[Z]||T[Z]||H[Q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(X,oe,ae){return oe||ae.slice(1)})})}(N,V===void 0?{}:V);return L.call(this,F)}}})})(localizedFormat);var localizedFormatExports=localizedFormat.exports;const localizedFormatPlugin=getDefaultExportFromCjs(localizedFormatExports);var utc$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T="minute",I=/[+-]\d\d(?::?\d\d)?/g,M=/([+-]|\d\d)/g;return function(D,B,L){var N=B.prototype;L.utc=function(Z){var Q={date:Z,utc:!0,args:arguments};return new B(Q)},N.utc=function(Z){var Q=L(this.toDate(),{locale:this.$L,utc:!0});return Z?Q.add(this.utcOffset(),T):Q},N.local=function(){return L(this.toDate(),{locale:this.$L,utc:!1})};var V=N.parse;N.parse=function(Z){Z.utc&&(this.$u=!0),this.$utils().u(Z.$offset)||(this.$offset=Z.$offset),V.call(this,Z)};var F=N.init;N.init=function(){if(this.$u){var Z=this.$d;this.$y=Z.getUTCFullYear(),this.$M=Z.getUTCMonth(),this.$D=Z.getUTCDate(),this.$W=Z.getUTCDay(),this.$H=Z.getUTCHours(),this.$m=Z.getUTCMinutes(),this.$s=Z.getUTCSeconds(),this.$ms=Z.getUTCMilliseconds()}else F.call(this)};var U=N.utcOffset;N.utcOffset=function(Z,Q){var X=this.$utils().u;if(X(Z))return this.$u?0:X(this.$offset)?U.call(this):this.$offset;if(typeof Z=="string"&&(Z=function(pe){pe===void 0&&(pe="");var me=pe.match(I);if(!me)return null;var ve=(""+me[0]).match(M)||["-",0,0],_e=ve[0],Re=60*+ve[1]+ +ve[2];return Re===0?0:_e==="+"?Re:-Re}(Z),Z===null))return this;var oe=Math.abs(Z)<=16?60*Z:Z,ae=this;if(Q)return ae.$offset=oe,ae.$u=Z===0,ae;if(Z!==0){var le=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ae=this.local().add(oe+le,T)).$offset=oe,ae.$x.$localOffset=le}else ae=this.utc();return ae};var H=N.format;N.format=function(Z){var Q=Z||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return H.call(this,Q)},N.valueOf=function(){var Z=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Z},N.isUTC=function(){return!!this.$u},N.toISOString=function(){return this.toDate().toISOString()},N.toString=function(){return this.toDate().toUTCString()};var G=N.toDate;N.toDate=function(Z){return Z==="s"&&this.$offset?L(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():G.call(this)};var Y=N.diff;N.diff=function(Z,Q,X){if(Z&&this.$u===Z.$u)return Y.call(this,Z,Q,X);var oe=this.local(),ae=L(Z).local();return Y.call(oe,ae,Q,X)}}})})(utc$1);var utcExports=utc$1.exports;const utc=getDefaultExportFromCjs(utcExports);var timezone$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T={year:0,month:1,day:2,hour:3,minute:4,second:5},I={};return function(M,D,B){var L,N=function(H,G,Y){Y===void 0&&(Y={});var Z=new Date(H),Q=function(X,oe){oe===void 0&&(oe={});var ae=oe.timeZoneName||"short",le=X+"|"+ae,pe=I[le];return pe||(pe=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:X,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:ae}),I[le]=pe),pe}(G,Y);return Q.formatToParts(Z)},V=function(H,G){for(var Y=N(H,G),Z=[],Q=0;Q<Y.length;Q+=1){var X=Y[Q],oe=X.type,ae=X.value,le=T[oe];le>=0&&(Z[le]=parseInt(ae,10))}var pe=Z[3],me=pe===24?0:pe,ve=Z[0]+"-"+Z[1]+"-"+Z[2]+" "+me+":"+Z[4]+":"+Z[5]+":000",_e=+H;return(B.utc(ve).valueOf()-(_e-=_e%1e3))/6e4},F=D.prototype;F.tz=function(H,G){H===void 0&&(H=L);var Y,Z=this.utcOffset(),Q=this.toDate(),X=Q.toLocaleString("en-US",{timeZone:H}),oe=Math.round((Q-new Date(X))/1e3/60),ae=15*-Math.round(Q.getTimezoneOffset()/15)-oe;if(!Number(ae))Y=this.utcOffset(0,G);else if(Y=B(X,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(ae,!0),G){var le=Y.utcOffset();Y=Y.add(Z-le,"minute")}return Y.$x.$timezone=H,Y},F.offsetName=function(H){var G=this.$x.$timezone||B.tz.guess(),Y=N(this.valueOf(),G,{timeZoneName:H}).find(function(Z){return Z.type.toLowerCase()==="timezonename"});return Y&&Y.value};var U=F.startOf;F.startOf=function(H,G){if(!this.$x||!this.$x.$timezone)return U.call(this,H,G);var Y=B(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return U.call(Y,H,G).tz(this.$x.$timezone,!0)},B.tz=function(H,G,Y){var Z=Y&&G,Q=Y||G||L,X=V(+B(),Q);if(typeof H!="string")return B(H).tz(Q);var oe=function(me,ve,_e){var Re=me-60*ve*1e3,Ve=V(Re,_e);if(ve===Ve)return[Re,ve];var Ne=V(Re-=60*(Ve-ve)*1e3,_e);return Ve===Ne?[Re,Ve]:[me-60*Math.min(Ve,Ne)*1e3,Math.max(Ve,Ne)]}(B.utc(H,Z).valueOf(),X,Q),ae=oe[0],le=oe[1],pe=B(ae).utcOffset(le);return pe.$x.$timezone=Q,pe},B.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},B.tz.setDefault=function(H){L=H}}})})(timezone$1);var timezoneExports=timezone$1.exports;const timezone=getDefaultExportFromCjs(timezoneExports),NODE_SERVICES=Object.freeze({AUTH:"auth"}),ROLES=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),SERVER_ROLES=Object.freeze({...ROLES,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),SERVICES_ROLES=Object.freeze({BLOCKLET_GUEST:"blocklet-guest"}),BLOCKLET_ROLES=[SERVER_ROLES.BLOCKLET_OWNER,SERVER_ROLES.BLOCKLET_ADMIN,SERVER_ROLES.BLOCKLET_MEMBER,SERVER_ROLES.BLOCKLET_SDK],isBlockletRole=_=>_&&BLOCKLET_ROLES.includes(_),BLOCKLET_MULTIPLE_TENANT_ROLES=[SERVER_ROLES.BLOCKLET_OWNER,SERVER_ROLES.BLOCKLET_ADMIN,SERVER_ROLES.BLOCKLET_MEMBER,SERVER_ROLES.BLOCKLET_SDK,SERVICES_ROLES.BLOCKLET_GUEST],isBlockletMultipleTenantRole=_=>_&&BLOCKLET_MULTIPLE_TENANT_ROLES.includes(_),AUTH_CERT_TYPE={USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},RBAC_CONFIG={roles:Object.freeze([{name:SERVER_ROLES.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:SERVER_ROLES.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:SERVER_ROLES.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:SERVER_ROLES.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:SERVER_ROLES.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:SERVER_ROLES.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:SERVER_ROLES.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:SERVER_ROLES.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:SERVER_ROLES.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:SERVER_ROLES.BLOCKLET_SDK,title:"Blocklet SDK"},{name:SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:SERVER_ROLES.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[SERVER_ROLES.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[SERVER_ROLES.MEMBER]:[SERVER_ROLES.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[SERVER_ROLES.ADMIN]:[SERVER_ROLES.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[SERVER_ROLES.OWNER]:[ROLES.ADMIN],[SERVER_ROLES.CI]:["query_blocklets","mutate_blocklets"],[SERVER_ROLES.CERTIFICATE]:["query_certificate","mutate_certificate"],[SERVER_ROLES.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[SERVER_ROLES.BLOCKLET_OWNER]:[SERVER_ROLES.BLOCKLET_ADMIN],[SERVER_ROLES.BLOCKLET_ADMIN]:[SERVER_ROLES.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[SERVER_ROLES.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[SERVER_ROLES.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},DAY_IN_MS=24*60*60*1e3,EVENTS$1={NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload"},WHO_CAN_ACCESS=Object.freeze({OWNER:"owner",ADMIN:"admin",INVITED:"invited",ALL:"all"}),BLOCKLET_STORE_URL="https://store.blocklet.dev",BLOCKLET_STORE_URL_DEV="https://dev.store.blocklet.dev",MAIN_CHAIN_ENDPOINT="https://main.abtnetwork.io/api/",USER_TYPE=Object.freeze({DERIVED:"derived",WALLET:"wallet"}),BACKUPS={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},CHECK_UPDATE={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},MONITOR_RECORD_INTERVAL_SEC=10,MONITOR_HISTORY_LENGTH=86400/MONITOR_RECORD_INTERVAL_SEC,FEDERATED={SYNC_LIMIT:3},ROUTING_RESPONSE_TYPES=[{text:"Plain Text",value:"text/plain"},{text:"JSON",value:"application/json"},{text:"XML",value:"application/xml"},{text:"HTML Document",value:"text/html"},{text:"YAML",value:"application/x-yaml"},{text:"TOML",value:"application/toml"},{text:"CSS",value:"text/css"},{text:"JavaScript",value:"application/javascript"},{text:"CSV",value:"text/csv"},{text:"Markdown",value:"text/markdown"},{text:"SVG",value:"image/svg+xml"}],SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS=30,LAUNCH_SESSION_STATUS=Object.freeze({created:0,selected:10,connected:20,timeout:25,paid:30,nftMinted:35,allocated:40,consuming:46,installed:50,overdue:60,canceled:65,terminated:70,transferred:90}),SECURITY_RULE_DEFAULT_ID="default",ACCESS_POLICY_PUBLIC="public",ACCESS_POLICY_INVITED_ONLY="invited-only",ACCESS_POLICY_OWNER_ONLY="owner-only",ACCESS_POLICY_ADMIN_ONLY="admin-only",RESPONSE_HEADER_POLICY_SIMPLE_CORS="simple-cors",RESPONSE_HEADER_POLICY_SECURITY_HEADER="security-header",RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER="simple-cors-and-security-header";var constant=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",USER_MAX_INVITE_DEPTH:8,PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL,BLOCKLET_STORE_URL_DEV,BLOCKLET_STORE_DID:"z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ",BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{id:"zNKqX7D8ZAYa77HgzpoFfnV3BFbcmSRrE9aT",name:"Official Store",description:"ArcBlock official blocklet registry",url:BLOCKLET_STORE_URL,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{id:"zNKmfUatDhzfMVACfr3u97eqndj8f1yXXw3m",name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:BLOCKLET_STORE_URL_DEV,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_BLACKLIST_PREFIX:"/.well-known/blacklist",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:10*DAY_IN_MS,ROUTING_RESPONSE_TYPES,ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES,SERVER_ROLES,BLOCKLET_ROLES,isBlockletRole,isBlockletMultipleTenantRole,AUTH_CERT_TYPE,RBAC_CONFIG,genPermissionName:(_,C="access")=>`${C}_${_.replace("_","-")}`,PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:EVENTS$1,WHO_CAN_ACCESS,WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,MAX_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT,USER_TYPE,SERVER_CACHE_TTL:300*1e3,BLOCKLET_CACHE_TTL:3600*1e3,SESSION_CACHE_TTL:3600,SESSION_TTL:7*86400,BACKUPS,CHECK_UPDATE,MONITOR_HISTORY_LENGTH,MONITOR_RECORD_INTERVAL_SEC,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED,SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token",SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS,LAUNCH_SESSION_STATUS,UNOWNED_DID:"z".repeat(35),STUDIO_CONNECTED_STORE:"studio_connected_store",STUDIO_CONNECTED_AND_DEVELOPED:"studio_connected_and_developed",VERIFY_CODE_LENGTH:6,VERIFY_CODE_TTL:30*60*1e3,VERIFY_SEND_TTL:1*60*1e3,SECURITY_RULE_DEFAULT_ID,ACCESS_POLICY_PUBLIC,ACCESS_POLICY_INVITED_ONLY,ACCESS_POLICY_OWNER_ONLY,ACCESS_POLICY_ADMIN_ONLY,RESPONSE_HEADER_POLICY_SIMPLE_CORS,RESPONSE_HEADER_POLICY_SECURITY_HEADER,RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER,MFA_PROTECTED_METHODS:["deleteBlocklet","deleteComponent","rotateSessionKey","upgradeNodeVersion","removeUser","updateUserApproval"],STUDIO_ALLOWED_METHODS:{getBlocklet:!0,createProject:!0,getProjects:!0,getProject:!0,updateProject:!0,deleteProject:!0,getReleases:!0,getRelease:!0,createRelease:!0,deleteRelease:!0,addBlockletStore:!0,deleteBlockletStore:!0,publishToStore:!0,connectToStore:!0,connectByStudio:!0,disconnectFromStore:!0,getSelectedResources:!0,updateSelectedResources:!0,getBlockletRuntimeHistory:!0,checkDomains:!0},SKIP_ACCESS_VERIFY_METHODS:{makeAllNotificationsAsRead:!0,readNotifications:!0,unreadNotifications:!0},NOTIFICATION_SEND_STATUS:{PENDING:0,SENT:1,FAILED:2},NOTIFICATION_SEND_FAILED_REASON:{USER_DISABLED:"user_disabled",CHANNEL_UNAVAILABLE:"channel_unavailable",CHANNEL_DISABLED:"channel_disabled",NOT_ONLINE:"not_online"},NOTIFICATION_SEND_CHANNEL:{WALLET:"app",EMAIL:"email",PUSH:"push",WEBHOOK:"webhook"},BLACKLIST_SCOPE:{ROUTER:"router"}});function _interopDefault(_){return _&&typeof _=="object"&&"default"in _?_.default:_}var React=reactExports,React__default=_interopDefault(React);function _defineProperty$g(_,C,T){return C in _?Object.defineProperty(_,C,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[C]=T,_}function _inheritsLoose$2(_,C){_.prototype=Object.create(C.prototype),_.prototype.constructor=_,_.__proto__=C}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement);function withSideEffect(_,C,T){if(typeof _!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof C!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof T<"u"&&typeof T!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function I(M){return M.displayName||M.name||"Component"}return function(D){if(typeof D!="function")throw new Error("Expected WrappedComponent to be a React component.");var B=[],L;function N(){L=_(B.map(function(F){return F.props})),V.canUseDOM?C(L):T&&(L=T(L))}var V=function(F){_inheritsLoose$2(U,F);function U(){return F.apply(this,arguments)||this}U.peek=function(){return L},U.rewind=function(){if(U.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var Y=L;return L=void 0,B=[],Y};var H=U.prototype;return H.UNSAFE_componentWillMount=function(){B.push(this),N()},H.componentDidUpdate=function(){N()},H.componentWillUnmount=function(){var Y=B.indexOf(this);B.splice(Y,1),N()},H.render=function(){return React__default.createElement(D,this.props)},U}(React.PureComponent);return _defineProperty$g(V,"displayName","SideEffect("+I(D)+")"),_defineProperty$g(V,"canUseDOM",canUseDOM),V}}var lib$8=withSideEffect;const withSideEffect$1=getDefaultExportFromCjs(lib$8);/*
|
|
9
|
+
`;var relativeTime$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){return function(T,I,M){T=T||{};var D=I.prototype,B={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function L(V,F,U,H){return D.fromToBase(V,F,U,H)}M.en.relativeTime=B,D.fromToBase=function(V,F,U,H,G){for(var Y,Z,Q,X=U.$locale().relativeTime||B,oe=T.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],ae=oe.length,le=0;le<ae;le+=1){var pe=oe[le];pe.d&&(Y=H?M(V).diff(U,pe.d,!0):U.diff(V,pe.d,!0));var me=(T.rounding||Math.round)(Math.abs(Y));if(Q=Y>0,me<=pe.r||!pe.r){me<=1&&le>0&&(pe=oe[le-1]);var ve=X[pe.l];G&&(me=G(""+me)),Z=typeof ve=="string"?ve.replace("%d",me):ve(me,F,pe.l,Q);break}}if(F)return Z;var _e=Q?X.future:X.past;return typeof _e=="function"?_e(Z):_e.replace("%s",Z)},D.to=function(V,F){return L(V,F,this,!0)},D.from=function(V,F){return L(V,F,this)};var N=function(V){return V.$u?M.utc():M()};D.toNow=function(V){return this.to(N(this),V)},D.fromNow=function(V){return this.from(N(this),V)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var localizedFormat={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(I,M,D){var B=M.prototype,L=B.format;D.en.formats=T,B.format=function(N){N===void 0&&(N="YYYY-MM-DDTHH:mm:ssZ");var V=this.$locale().formats,F=function(U,H){return U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(G,Y,Z){var Q=Z&&Z.toUpperCase();return Y||H[Z]||T[Z]||H[Q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(X,oe,ae){return oe||ae.slice(1)})})}(N,V===void 0?{}:V);return L.call(this,F)}}})})(localizedFormat);var localizedFormatExports=localizedFormat.exports;const localizedFormatPlugin=getDefaultExportFromCjs(localizedFormatExports);var utc$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T="minute",I=/[+-]\d\d(?::?\d\d)?/g,M=/([+-]|\d\d)/g;return function(D,B,L){var N=B.prototype;L.utc=function(Z){var Q={date:Z,utc:!0,args:arguments};return new B(Q)},N.utc=function(Z){var Q=L(this.toDate(),{locale:this.$L,utc:!0});return Z?Q.add(this.utcOffset(),T):Q},N.local=function(){return L(this.toDate(),{locale:this.$L,utc:!1})};var V=N.parse;N.parse=function(Z){Z.utc&&(this.$u=!0),this.$utils().u(Z.$offset)||(this.$offset=Z.$offset),V.call(this,Z)};var F=N.init;N.init=function(){if(this.$u){var Z=this.$d;this.$y=Z.getUTCFullYear(),this.$M=Z.getUTCMonth(),this.$D=Z.getUTCDate(),this.$W=Z.getUTCDay(),this.$H=Z.getUTCHours(),this.$m=Z.getUTCMinutes(),this.$s=Z.getUTCSeconds(),this.$ms=Z.getUTCMilliseconds()}else F.call(this)};var U=N.utcOffset;N.utcOffset=function(Z,Q){var X=this.$utils().u;if(X(Z))return this.$u?0:X(this.$offset)?U.call(this):this.$offset;if(typeof Z=="string"&&(Z=function(pe){pe===void 0&&(pe="");var me=pe.match(I);if(!me)return null;var ve=(""+me[0]).match(M)||["-",0,0],_e=ve[0],Re=60*+ve[1]+ +ve[2];return Re===0?0:_e==="+"?Re:-Re}(Z),Z===null))return this;var oe=Math.abs(Z)<=16?60*Z:Z,ae=this;if(Q)return ae.$offset=oe,ae.$u=Z===0,ae;if(Z!==0){var le=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ae=this.local().add(oe+le,T)).$offset=oe,ae.$x.$localOffset=le}else ae=this.utc();return ae};var H=N.format;N.format=function(Z){var Q=Z||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return H.call(this,Q)},N.valueOf=function(){var Z=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Z},N.isUTC=function(){return!!this.$u},N.toISOString=function(){return this.toDate().toISOString()},N.toString=function(){return this.toDate().toUTCString()};var G=N.toDate;N.toDate=function(Z){return Z==="s"&&this.$offset?L(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():G.call(this)};var Y=N.diff;N.diff=function(Z,Q,X){if(Z&&this.$u===Z.$u)return Y.call(this,Z,Q,X);var oe=this.local(),ae=L(Z).local();return Y.call(oe,ae,Q,X)}}})})(utc$1);var utcExports=utc$1.exports;const utc=getDefaultExportFromCjs(utcExports);var timezone$1={exports:{}};(function(_,C){(function(T,I){_.exports=I()})(commonjsGlobal,function(){var T={year:0,month:1,day:2,hour:3,minute:4,second:5},I={};return function(M,D,B){var L,N=function(H,G,Y){Y===void 0&&(Y={});var Z=new Date(H),Q=function(X,oe){oe===void 0&&(oe={});var ae=oe.timeZoneName||"short",le=X+"|"+ae,pe=I[le];return pe||(pe=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:X,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:ae}),I[le]=pe),pe}(G,Y);return Q.formatToParts(Z)},V=function(H,G){for(var Y=N(H,G),Z=[],Q=0;Q<Y.length;Q+=1){var X=Y[Q],oe=X.type,ae=X.value,le=T[oe];le>=0&&(Z[le]=parseInt(ae,10))}var pe=Z[3],me=pe===24?0:pe,ve=Z[0]+"-"+Z[1]+"-"+Z[2]+" "+me+":"+Z[4]+":"+Z[5]+":000",_e=+H;return(B.utc(ve).valueOf()-(_e-=_e%1e3))/6e4},F=D.prototype;F.tz=function(H,G){H===void 0&&(H=L);var Y,Z=this.utcOffset(),Q=this.toDate(),X=Q.toLocaleString("en-US",{timeZone:H}),oe=Math.round((Q-new Date(X))/1e3/60),ae=15*-Math.round(Q.getTimezoneOffset()/15)-oe;if(!Number(ae))Y=this.utcOffset(0,G);else if(Y=B(X,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(ae,!0),G){var le=Y.utcOffset();Y=Y.add(Z-le,"minute")}return Y.$x.$timezone=H,Y},F.offsetName=function(H){var G=this.$x.$timezone||B.tz.guess(),Y=N(this.valueOf(),G,{timeZoneName:H}).find(function(Z){return Z.type.toLowerCase()==="timezonename"});return Y&&Y.value};var U=F.startOf;F.startOf=function(H,G){if(!this.$x||!this.$x.$timezone)return U.call(this,H,G);var Y=B(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return U.call(Y,H,G).tz(this.$x.$timezone,!0)},B.tz=function(H,G,Y){var Z=Y&&G,Q=Y||G||L,X=V(+B(),Q);if(typeof H!="string")return B(H).tz(Q);var oe=function(me,ve,_e){var Re=me-60*ve*1e3,Ve=V(Re,_e);if(ve===Ve)return[Re,ve];var Ne=V(Re-=60*(Ve-ve)*1e3,_e);return Ve===Ne?[Re,Ve]:[me-60*Math.min(Ve,Ne)*1e3,Math.max(Ve,Ne)]}(B.utc(H,Z).valueOf(),X,Q),ae=oe[0],le=oe[1],pe=B(ae).utcOffset(le);return pe.$x.$timezone=Q,pe},B.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},B.tz.setDefault=function(H){L=H}}})})(timezone$1);var timezoneExports=timezone$1.exports;const timezone=getDefaultExportFromCjs(timezoneExports),NODE_SERVICES=Object.freeze({AUTH:"auth"}),ROLES=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),SERVER_ROLES=Object.freeze({...ROLES,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),SERVICES_ROLES=Object.freeze({BLOCKLET_GUEST:"blocklet-guest"}),BLOCKLET_ROLES=[SERVER_ROLES.BLOCKLET_OWNER,SERVER_ROLES.BLOCKLET_ADMIN,SERVER_ROLES.BLOCKLET_MEMBER,SERVER_ROLES.BLOCKLET_SDK],isBlockletRole=_=>_&&BLOCKLET_ROLES.includes(_),BLOCKLET_MULTIPLE_TENANT_ROLES=[SERVER_ROLES.BLOCKLET_OWNER,SERVER_ROLES.BLOCKLET_ADMIN,SERVER_ROLES.BLOCKLET_MEMBER,SERVER_ROLES.BLOCKLET_SDK,SERVICES_ROLES.BLOCKLET_GUEST],isBlockletMultipleTenantRole=_=>_&&BLOCKLET_MULTIPLE_TENANT_ROLES.includes(_),AUTH_CERT_TYPE={USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},RBAC_CONFIG={roles:Object.freeze([{name:SERVER_ROLES.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:SERVER_ROLES.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:SERVER_ROLES.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:SERVER_ROLES.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:SERVER_ROLES.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:SERVER_ROLES.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:SERVER_ROLES.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:SERVER_ROLES.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:SERVER_ROLES.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:SERVER_ROLES.BLOCKLET_SDK,title:"Blocklet SDK"},{name:SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:SERVER_ROLES.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[SERVER_ROLES.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[SERVER_ROLES.MEMBER]:[SERVER_ROLES.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[SERVER_ROLES.ADMIN]:[SERVER_ROLES.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[SERVER_ROLES.OWNER]:[ROLES.ADMIN],[SERVER_ROLES.CI]:["query_blocklets","mutate_blocklets"],[SERVER_ROLES.CERTIFICATE]:["query_certificate","mutate_certificate"],[SERVER_ROLES.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[SERVER_ROLES.BLOCKLET_OWNER]:[SERVER_ROLES.BLOCKLET_ADMIN],[SERVER_ROLES.BLOCKLET_ADMIN]:[SERVER_ROLES.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[SERVER_ROLES.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[SERVER_ROLES.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},DAY_IN_MS=24*60*60*1e3,EVENTS$1={NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload",NOTIFICATION_CREATE_QUEUED:"notification.create.queued"},WHO_CAN_ACCESS=Object.freeze({OWNER:"owner",ADMIN:"admin",INVITED:"invited",ALL:"all"}),BLOCKLET_STORE_URL="https://store.blocklet.dev",BLOCKLET_STORE_URL_DEV="https://dev.store.blocklet.dev",MAIN_CHAIN_ENDPOINT="https://main.abtnetwork.io/api/",USER_TYPE=Object.freeze({DERIVED:"derived",WALLET:"wallet"}),BACKUPS={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},CHECK_UPDATE={STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:2*60*60}},MONITOR_RECORD_INTERVAL_SEC=10,MONITOR_HISTORY_LENGTH=86400/MONITOR_RECORD_INTERVAL_SEC,FEDERATED={SYNC_LIMIT:3},ROUTING_RESPONSE_TYPES=[{text:"Plain Text",value:"text/plain"},{text:"JSON",value:"application/json"},{text:"XML",value:"application/xml"},{text:"HTML Document",value:"text/html"},{text:"YAML",value:"application/x-yaml"},{text:"TOML",value:"application/toml"},{text:"CSS",value:"text/css"},{text:"JavaScript",value:"application/javascript"},{text:"CSV",value:"text/csv"},{text:"Markdown",value:"text/markdown"},{text:"SVG",value:"image/svg+xml"}],SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS=30,LAUNCH_SESSION_STATUS=Object.freeze({created:0,selected:10,connected:20,timeout:25,paid:30,nftMinted:35,allocated:40,consuming:46,installed:50,overdue:60,canceled:65,terminated:70,transferred:90}),SECURITY_RULE_DEFAULT_ID="default",ACCESS_POLICY_PUBLIC="public",ACCESS_POLICY_INVITED_ONLY="invited-only",ACCESS_POLICY_OWNER_ONLY="owner-only",ACCESS_POLICY_ADMIN_ONLY="admin-only",RESPONSE_HEADER_POLICY_SIMPLE_CORS="simple-cors",RESPONSE_HEADER_POLICY_SECURITY_HEADER="security-header",RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER="simple-cors-and-security-header";var constant=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",USER_MAX_INVITE_DEPTH:8,PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL,BLOCKLET_STORE_URL_DEV,BLOCKLET_STORE_DID:"z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ",BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{id:"zNKqX7D8ZAYa77HgzpoFfnV3BFbcmSRrE9aT",name:"Official Store",description:"ArcBlock official blocklet registry",url:BLOCKLET_STORE_URL,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{id:"zNKmfUatDhzfMVACfr3u97eqndj8f1yXXw3m",name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:BLOCKLET_STORE_URL_DEV,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_BLACKLIST_PREFIX:"/.well-known/blacklist",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:10*DAY_IN_MS,ROUTING_RESPONSE_TYPES,ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES,SERVER_ROLES,BLOCKLET_ROLES,isBlockletRole,isBlockletMultipleTenantRole,AUTH_CERT_TYPE,RBAC_CONFIG,genPermissionName:(_,C="access")=>`${C}_${_.replace("_","-")}`,PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:EVENTS$1,WHO_CAN_ACCESS,WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,MAX_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT,USER_TYPE,SERVER_CACHE_TTL:300*1e3,BLOCKLET_CACHE_TTL:3600*1e3,SESSION_CACHE_TTL:3600,SESSION_TTL:7*86400,BACKUPS,CHECK_UPDATE,MONITOR_HISTORY_LENGTH,MONITOR_RECORD_INTERVAL_SEC,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED,SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token",SERVERLESS_BLOCKLET_DATA_RETENTION_DAYS,LAUNCH_SESSION_STATUS,UNOWNED_DID:"z".repeat(35),STUDIO_CONNECTED_STORE:"studio_connected_store",STUDIO_CONNECTED_AND_DEVELOPED:"studio_connected_and_developed",VERIFY_CODE_LENGTH:6,VERIFY_CODE_TTL:30*60*1e3,VERIFY_SEND_TTL:1*60*1e3,SECURITY_RULE_DEFAULT_ID,ACCESS_POLICY_PUBLIC,ACCESS_POLICY_INVITED_ONLY,ACCESS_POLICY_OWNER_ONLY,ACCESS_POLICY_ADMIN_ONLY,RESPONSE_HEADER_POLICY_SIMPLE_CORS,RESPONSE_HEADER_POLICY_SECURITY_HEADER,RESPONSE_HEADER_POLICY_SIMPLE_CORS_AND_SECURITY_HEADER,MFA_PROTECTED_METHODS:["deleteBlocklet","deleteComponent","rotateSessionKey","upgradeNodeVersion","removeUser","updateUserApproval"],STUDIO_ALLOWED_METHODS:{getBlocklet:!0,createProject:!0,getProjects:!0,getProject:!0,updateProject:!0,deleteProject:!0,getReleases:!0,getRelease:!0,createRelease:!0,deleteRelease:!0,addBlockletStore:!0,deleteBlockletStore:!0,publishToStore:!0,connectToStore:!0,connectByStudio:!0,disconnectFromStore:!0,getSelectedResources:!0,updateSelectedResources:!0,getBlockletRuntimeHistory:!0,checkDomains:!0},SKIP_ACCESS_VERIFY_METHODS:{makeAllNotificationsAsRead:!0,readNotifications:!0,unreadNotifications:!0},NOTIFICATION_SEND_STATUS:{PENDING:0,SENT:1,FAILED:2},NOTIFICATION_SEND_FAILED_REASON:{USER_DISABLED:"user_disabled",CHANNEL_UNAVAILABLE:"channel_unavailable",CHANNEL_DISABLED:"channel_disabled",NOT_ONLINE:"not_online"},NOTIFICATION_SEND_CHANNEL:{WALLET:"app",EMAIL:"email",PUSH:"push",WEBHOOK:"webhook"},BLACKLIST_SCOPE:{ROUTER:"router"}});function _interopDefault(_){return _&&typeof _=="object"&&"default"in _?_.default:_}var React=reactExports,React__default=_interopDefault(React);function _defineProperty$g(_,C,T){return C in _?Object.defineProperty(_,C,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[C]=T,_}function _inheritsLoose$2(_,C){_.prototype=Object.create(C.prototype),_.prototype.constructor=_,_.__proto__=C}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement);function withSideEffect(_,C,T){if(typeof _!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof C!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof T<"u"&&typeof T!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function I(M){return M.displayName||M.name||"Component"}return function(D){if(typeof D!="function")throw new Error("Expected WrappedComponent to be a React component.");var B=[],L;function N(){L=_(B.map(function(F){return F.props})),V.canUseDOM?C(L):T&&(L=T(L))}var V=function(F){_inheritsLoose$2(U,F);function U(){return F.apply(this,arguments)||this}U.peek=function(){return L},U.rewind=function(){if(U.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var Y=L;return L=void 0,B=[],Y};var H=U.prototype;return H.UNSAFE_componentWillMount=function(){B.push(this),N()},H.componentDidUpdate=function(){N()},H.componentWillUnmount=function(){var Y=B.indexOf(this);B.splice(Y,1),N()},H.render=function(){return React__default.createElement(D,this.props)},U}(React.PureComponent);return _defineProperty$g(V,"displayName","SideEffect("+I(D)+")"),_defineProperty$g(V,"canUseDOM",canUseDOM),V}}var lib$8=withSideEffect;const withSideEffect$1=getDefaultExportFromCjs(lib$8);/*
|
|
10
10
|
object-assign
|
|
11
11
|
(c) Sindre Sorhus
|
|
12
12
|
@license MIT
|
|
@@ -3197,19 +3197,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3197
3197
|
margin-left: 10px;
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
|
-
`;var uaParser={exports:{}};(function(_,C){(function(T,I){var M="1.0.38",D="",B="?",L="function",N="undefined",V="object",F="string",U="major",H="model",G="name",Y="type",Z="vendor",Q="version",X="architecture",oe="console",ae="mobile",le="tablet",pe="smarttv",me="wearable",ve="embedded",_e=500,Re="Amazon",Ve="Apple",Ne="ASUS",We="BlackBerry",fe="Browser",W="Chrome",J="Edge",te="Firefox",ie="Google",ne="Huawei",se="LG",he="Microsoft",ce="Motorola",ee="Opera",ue="Samsung",Oe="Sharp",ge="Sony",we="Xiaomi",Se="Zebra",Ce="Facebook",Te="Chromium OS",Be="Mac OS",ye=function(xt,st){var rt={};for(var kt in xt)st[kt]&&st[kt].length%2===0?rt[kt]=st[kt].concat(xt[kt]):rt[kt]=xt[kt];return rt},de=function(xt){for(var st={},rt=0;rt<xt.length;rt++)st[xt[rt].toUpperCase()]=xt[rt];return st},Ee=function(xt,st){return typeof xt===F?xe(st).indexOf(xe(xt))!==-1:!1},xe=function(xt){return xt.toLowerCase()},Pe=function(xt){return typeof xt===F?xt.replace(/[^\d\.]/g,D).split(".")[0]:I},qe=function(xt,st){if(typeof xt===F)return xt=xt.replace(/^\s\s*/,D),typeof st===N?xt:xt.substring(0,_e)},Fe=function(xt,st){for(var rt=0,kt,ht,Ct,Ht,Et,Qt;rt<st.length&&!Et;){var Br=st[rt],Gt=st[rt+1];for(kt=ht=0;kt<Br.length&&!Et&&Br[kt];)if(Et=Br[kt++].exec(xt),Et)for(Ct=0;Ct<Gt.length;Ct++)Qt=Et[++ht],Ht=Gt[Ct],typeof Ht===V&&Ht.length>0?Ht.length===2?typeof Ht[1]==L?this[Ht[0]]=Ht[1].call(this,Qt):this[Ht[0]]=Ht[1]:Ht.length===3?typeof Ht[1]===L&&!(Ht[1].exec&&Ht[1].test)?this[Ht[0]]=Qt?Ht[1].call(this,Qt,Ht[2]):I:this[Ht[0]]=Qt?Qt.replace(Ht[1],Ht[2]):I:Ht.length===4&&(this[Ht[0]]=Qt?Ht[3].call(this,Qt.replace(Ht[1],Ht[2])):I):this[Ht]=Qt||I;rt+=2}},Ie=function(xt,st){for(var rt in st)if(typeof st[rt]===V&&st[rt].length>0){for(var kt=0;kt<st[rt].length;kt++)if(Ee(st[rt][kt],xt))return rt===B?I:rt}else if(Ee(st[rt],xt))return rt===B?I:rt;return xt},De={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Xe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ke={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Q,[G,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Q,[G,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[G,Q],[/opios[\/ ]+([\w\.]+)/i],[Q,[G,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Q,[G,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[Q,[G,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Q,[G,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[G,Q],[/\bddg\/([\w\.]+)/i],[Q,[G,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Q,[G,"UC"+fe]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Q,[G,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Q,[G,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Q,[G,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Q,[G,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Q,[G,"Smart Lenovo "+fe]],[/(avast|avg)\/([\w\.]+)/i],[[G,/(.+)/,"$1 Secure "+fe],Q],[/\bfocus\/([\w\.]+)/i],[Q,[G,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[Q,[G,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Q,[G,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Q,[G,"Dolphin"]],[/coast\/([\w\.]+)/i],[Q,[G,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Q,[G,"MIUI "+fe]],[/fxios\/([-\w\.]+)/i],[Q,[G,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[G,"360 "+fe]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[G,/(.+)/,"$1 "+fe],Q],[/samsungbrowser\/([\w\.]+)/i],[Q,[G,ue+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[G,/_/g," "],Q],[/metasr[\/ ]?([\d\.]+)/i],[Q,[G,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[G,"Sogou Mobile"],Q],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[G,Q],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[G],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[G,Ce],Q],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[G,Q],[/\bgsa\/([\w\.]+) .*safari\//i],[Q,[G,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Q,[G,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[Q,[G,W+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[G,W+" WebView"],Q],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Q,[G,"Android "+fe]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[G,Q],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[Q,[G,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[Q,G],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[G,[Q,Ie,De]],[/(webkit|khtml)\/([\w\.]+)/i],[G,Q],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[G,"Netscape"],Q],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Q,[G,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[G,Q],[/(cobalt)\/([\w\.]+)/i],[G,[Q,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[X,"amd64"]],[/(ia32(?=;))/i],[[X,xe]],[/((?:i[346]|x)86)[;\)]/i],[[X,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[X,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[X,"armhf"]],[/windows (ce|mobile); ppc;/i],[[X,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[X,/ower/,D,xe]],[/(sun4\w)[;\)]/i],[[X,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[X,xe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[H,[Z,ue],[Y,le]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[H,[Z,ue],[Y,ae]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[H,[Z,Ve],[Y,ae]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[H,[Z,Ve],[Y,le]],[/(macintosh);/i],[H,[Z,Ve]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[H,[Z,Oe],[Y,ae]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[H,[Z,ne],[Y,le]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[H,[Z,ne],[Y,ae]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[H,/_/g," "],[Z,we],[Y,ae]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[H,/_/g," "],[Z,we],[Y,le]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[H,[Z,"OPPO"],[Y,ae]],[/\b(opd2\d{3}a?) bui/i],[H,[Z,"OPPO"],[Y,le]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[H,[Z,"Vivo"],[Y,ae]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[H,[Z,"Realme"],[Y,ae]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[H,[Z,ce],[Y,ae]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[H,[Z,ce],[Y,le]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[H,[Z,se],[Y,le]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[H,[Z,se],[Y,ae]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[H,[Z,"Lenovo"],[Y,le]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[H,/_/g," "],[Z,"Nokia"],[Y,ae]],[/(pixel c)\b/i],[H,[Z,ie],[Y,le]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[H,[Z,ie],[Y,ae]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[H,[Z,ge],[Y,ae]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[H,"Xperia Tablet"],[Z,ge],[Y,le]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[H,[Z,"OnePlus"],[Y,ae]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[H,[Z,Re],[Y,le]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[H,/(.+)/g,"Fire Phone $1"],[Z,Re],[Y,ae]],[/(playbook);[-\w\),; ]+(rim)/i],[H,Z,[Y,le]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[H,[Z,We],[Y,ae]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[H,[Z,Ne],[Y,le]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[H,[Z,Ne],[Y,ae]],[/(nexus 9)/i],[H,[Z,"HTC"],[Y,le]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[H,/_/g," "],[Y,ae]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[H,[Z,"Acer"],[Y,le]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[H,[Z,"Meizu"],[Y,ae]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[H,[Z,"Ulefone"],[Y,ae]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[Z,H,[Y,ae]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[Z,H,[Y,le]],[/(surface duo)/i],[H,[Z,he],[Y,le]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[H,[Z,"Fairphone"],[Y,ae]],[/(u304aa)/i],[H,[Z,"AT&T"],[Y,ae]],[/\bsie-(\w*)/i],[H,[Z,"Siemens"],[Y,ae]],[/\b(rct\w+) b/i],[H,[Z,"RCA"],[Y,le]],[/\b(venue[\d ]{2,7}) b/i],[H,[Z,"Dell"],[Y,le]],[/\b(q(?:mv|ta)\w+) b/i],[H,[Z,"Verizon"],[Y,le]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[H,[Z,"Barnes & Noble"],[Y,le]],[/\b(tm\d{3}\w+) b/i],[H,[Z,"NuVision"],[Y,le]],[/\b(k88) b/i],[H,[Z,"ZTE"],[Y,le]],[/\b(nx\d{3}j) b/i],[H,[Z,"ZTE"],[Y,ae]],[/\b(gen\d{3}) b.+49h/i],[H,[Z,"Swiss"],[Y,ae]],[/\b(zur\d{3}) b/i],[H,[Z,"Swiss"],[Y,le]],[/\b((zeki)?tb.*\b) b/i],[H,[Z,"Zeki"],[Y,le]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[Z,"Dragon Touch"],H,[Y,le]],[/\b(ns-?\w{0,9}) b/i],[H,[Z,"Insignia"],[Y,le]],[/\b((nxa|next)-?\w{0,9}) b/i],[H,[Z,"NextBook"],[Y,le]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[Z,"Voice"],H,[Y,ae]],[/\b(lvtel\-)?(v1[12]) b/i],[[Z,"LvTel"],H,[Y,ae]],[/\b(ph-1) /i],[H,[Z,"Essential"],[Y,ae]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[H,[Z,"Envizen"],[Y,le]],[/\b(trio[-\w\. ]+) b/i],[H,[Z,"MachSpeed"],[Y,le]],[/\btu_(1491) b/i],[H,[Z,"Rotor"],[Y,le]],[/(shield[\w ]+) b/i],[H,[Z,"Nvidia"],[Y,le]],[/(sprint) (\w+)/i],[Z,H,[Y,ae]],[/(kin\.[onetw]{3})/i],[[H,/\./g," "],[Z,he],[Y,ae]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[H,[Z,Se],[Y,le]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[H,[Z,Se],[Y,ae]],[/smart-tv.+(samsung)/i],[Z,[Y,pe]],[/hbbtv.+maple;(\d+)/i],[[H,/^/,"SmartTV"],[Z,ue],[Y,pe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,se],[Y,pe]],[/(apple) ?tv/i],[Z,[H,Ve+" TV"],[Y,pe]],[/crkey/i],[[H,W+"cast"],[Z,ie],[Y,pe]],[/droid.+aft(\w+)( bui|\))/i],[H,[Z,Re],[Y,pe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[H,[Z,Oe],[Y,pe]],[/(bravia[\w ]+)( bui|\))/i],[H,[Z,ge],[Y,pe]],[/(mitv-\w{5}) bui/i],[H,[Z,we],[Y,pe]],[/Hbbtv.*(technisat) (.*);/i],[Z,H,[Y,pe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,qe],[H,qe],[Y,pe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[Y,pe]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[Z,H,[Y,oe]],[/droid.+; (shield) bui/i],[H,[Z,"Nvidia"],[Y,oe]],[/(playstation [345portablevi]+)/i],[H,[Z,ge],[Y,oe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[H,[Z,he],[Y,oe]],[/((pebble))app/i],[Z,H,[Y,me]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[H,[Z,Ve],[Y,me]],[/droid.+; (glass) \d/i],[H,[Z,ie],[Y,me]],[/droid.+; (wt63?0{2,3})\)/i],[H,[Z,Se],[Y,me]],[/(quest( \d| pro)?)/i],[H,[Z,Ce],[Y,me]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[Y,ve]],[/(aeobc)\b/i],[H,[Z,Re],[Y,ve]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[H,[Y,ae]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[H,[Y,le]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Y,le]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Y,ae]],[/(android[-\w\. ]{0,9});.+buil/i],[H,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Q,[G,J+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Q,[G,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[G,Q],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Q,G]],os:[[/microsoft (windows) (vista|xp)/i],[G,Q],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[G,[Q,Ie,Xe]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Q,Ie,Xe],[G,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Q,/_/g,"."],[G,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[G,Be],[Q,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Q,G],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[G,Q],[/\(bb(10);/i],[Q,[G,We]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[Q,[G,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Q,[G,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Q,[G,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Q,[G,"watchOS"]],[/crkey\/([\d\.]+)/i],[Q,[G,W+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[G,Te],Q],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[G,Q],[/(sunos) ?([\w\.\d]*)/i],[[G,"Solaris"],Q],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[G,Q]]},pt=function(xt,st){if(typeof xt===V&&(st=xt,xt=I),!(this instanceof pt))return new pt(xt,st).getResult();var rt=typeof T!==N&&T.navigator?T.navigator:I,kt=xt||(rt&&rt.userAgent?rt.userAgent:D),ht=rt&&rt.userAgentData?rt.userAgentData:I,Ct=st?ye(Ke,st):Ke,Ht=rt&&rt.userAgent==kt;return this.getBrowser=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.browser),Et[U]=Pe(Et[Q]),Ht&&rt&&rt.brave&&typeof rt.brave.isBrave==L&&(Et[G]="Brave"),Et},this.getCPU=function(){var Et={};return Et[X]=I,Fe.call(Et,kt,Ct.cpu),Et},this.getDevice=function(){var Et={};return Et[Z]=I,Et[H]=I,Et[Y]=I,Fe.call(Et,kt,Ct.device),Ht&&!Et[Y]&&ht&&ht.mobile&&(Et[Y]=ae),Ht&&Et[H]=="Macintosh"&&rt&&typeof rt.standalone!==N&&rt.maxTouchPoints&&rt.maxTouchPoints>2&&(Et[H]="iPad",Et[Y]=le),Et},this.getEngine=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.engine),Et},this.getOS=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.os),Ht&&!Et[G]&&ht&&ht.platform&&ht.platform!="Unknown"&&(Et[G]=ht.platform.replace(/chrome os/i,Te).replace(/macos/i,Be)),Et},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return kt},this.setUA=function(Et){return kt=typeof Et===F&&Et.length>_e?qe(Et,_e):Et,this},this.setUA(kt),this};pt.VERSION=M,pt.BROWSER=de([G,Q,U]),pt.CPU=de([X]),pt.DEVICE=de([H,Z,Y,oe,ae,pe,le,me,ve]),pt.ENGINE=pt.OS=de([G,Q]),_.exports&&(C=_.exports=pt),C.UAParser=pt;var At=typeof T!==N&&(T.jQuery||T.Zepto);if(At&&!At.ua){var vt=new pt;At.ua=vt.getResult(),At.ua.get=function(){return vt.getUA()},At.ua.set=function(xt){vt.setUA(xt);var st=vt.getResult();for(var rt in st)At.ua[rt]=st[rt]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs(uaParserExports);class AbortError extends Error{constructor(C){super(),this.name="AbortError",this.message=C}}const getDOMException=_=>globalThis.DOMException===void 0?new AbortError(_):new DOMException(_),getAbortedReason=_=>{const C=_.reason===void 0?getDOMException("This operation was aborted."):_.reason;return C instanceof Error?C:getDOMException(C)};async function pMap(_,C,{concurrency:T=Number.POSITIVE_INFINITY,stopOnError:I=!0,signal:M}={}){return new Promise((D,B)=>{if(_[Symbol.iterator]===void 0&&_[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof _})`);if(typeof C!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(T)||T===Number.POSITIVE_INFINITY)&&T>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${T}\` (${typeof T})`);const L=[],N=[],V=new Map;let F=!1,U=!1,H=!1,G=0,Y=0;const Z=_[Symbol.iterator]===void 0?_[Symbol.asyncIterator]():_[Symbol.iterator](),Q=oe=>{F=!0,U=!0,B(oe)};M&&(M.aborted&&Q(getAbortedReason(M)),M.addEventListener("abort",()=>{Q(getAbortedReason(M))}));const X=async()=>{if(U)return;const oe=await Z.next(),ae=Y;if(Y++,oe.done){if(H=!0,G===0&&!U){if(!I&&N.length>0){Q(new AggregateError(N));return}if(U=!0,V.size===0){D(L);return}const le=[];for(const[pe,me]of L.entries())V.get(pe)!==pMapSkip&&le.push(me);D(le)}return}G++,(async()=>{try{const le=await oe.value;if(U)return;const pe=await C(le,ae);pe===pMapSkip&&V.set(ae,pe),L[ae]=pe,G--,await X()}catch(le){if(I)Q(le);else{N.push(le),G--;try{await X()}catch(pe){Q(pe)}}}})()};(async()=>{for(let oe=0;oe<T;oe++){try{await X()}catch(ae){Q(ae);break}if(H||F)break}})()})}const pMapSkip=Symbol("skip");async function pAll(_,C){return pMap(_,T=>T(),C)}function useMobile$1({key:_="sm"}={}){const C=useTheme();return useMediaQuery(C.breakpoints.down(_))}function UserSessionInfo({user:_,sessionUser:C}){const T=useCreation(()=>{var I;return(I=(_==null?void 0:_.passports)||[])==null?void 0:I.find(M=>M.name===C.role)},[_==null?void 0:_.passports,C==null?void 0:C.role]);return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{size:40,variant:"circle",shape:"circle",src:C.avatar,did:C.did,sx:{flexShrink:0}}),jsxRuntimeExports.jsxs(Box,{sx:{flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Tooltip,{title:C.fullName,children:jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:C.fullName})}),jsxRuntimeExports.jsx(Chip,{label:(T==null?void 0:T.title)||(T==null?void 0:T.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:colors$1.textBase,borderColor:colors$1.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),jsxRuntimeExports.jsx(Tooltip,{title:C.email,children:jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:C.email})})]})]})}const translations$1={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},RESERVED_IP="Reserved IP",IP_REGION_CACHE="ip-region-cache";async function getIpRegionFromIpApi(_){const C=`https://ipapi.co/${_}/json/`,I=await(await fetch(C)).json();let M="";return I.error?I.reserved&&(M=RESERVED_IP):M=[I.country_name,I.region,I.city].filter(Boolean).join("/"),M}async function getIpRegionFromIpSb(_){const C=`https://api.ip.sb/geoip/${_}`,I=await(await fetch(C)).json();let M="";return I.error?I.reserved&&(M=RESERVED_IP):M=[I.country,I.region,I.city].filter(Boolean).join("/"),M}async function ip2Region(_){let C="",T={};try{const I=localStorage.getItem(IP_REGION_CACHE);I&&(T=JSON.parse(I))}catch{T={}}if(T[_])C=T[_];else{try{C=await getIpRegionFromIpSb(_)}catch{console.warn("Fail to get ip region from ip.sb")}if(!C)try{C=await getIpRegionFromIpApi(_)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(C){const I=Object.keys(T);I.length>100&&delete T[I[0]],T[_]&&delete T[_],T[_]=C,localStorage.setItem(IP_REGION_CACHE,JSON.stringify(T))}return C}const parseUa=_=>new UAParser(_,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[UAParser.BROWSER.NAME,UAParser.BROWSER.VERSION]]}).getResult(),queue=new _default$2({concurrency:1}),UserSessionIp=reactExports.memo(({userSession:_})=>{const C=useReactive({loading:!0,ipRegion:""}),{t:T}=useLocaleContext();return reactExports.useEffect(()=>{queue.add(async()=>{try{C.ipRegion=await ip2Region(_.lastLoginIp)}finally{C.loading=!1}})},[C,_.lastLoginIp]),jsxRuntimeExports.jsx(Box,{children:C.ipRegion?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography$1,{variant:"body2",children:C.ipRegion}),jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",children:_.lastLoginIp||T("unknown")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography$1,{children:_.lastLoginIp||T("unknown")}),C.loading?jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",sx:{textAlign:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{size:12,color:"inherit"})}):null]})})});function UserSessions({user:_,showAction:C=!0,showUser:T=!0}){const{session:I}=reactExports.useContext(SessionContext),M=getVisitorId$2(),{locale:D}=useLocaleContext(),B=useMobile$1({key:"md"}),L=useMediaQuery(le=>le.breakpoints.down("lg")),{confirmApi:N,confirmHolder:V}=useConfirm(),F=useMemoizedFn((le,pe={})=>translate(translations$1,le,D,"en",pe)),U=useMemoizedFn(async()=>{let le=(_==null?void 0:_.userSessions)||[];try{!(_!=null&&_.userSessions)&&I.user&&(le=await client.userSession.getMyLoginSessions())}catch(me){console.warn("Failed to convert ip to region"),console.error(me)}const pe=new Date().getTime();return sortBy(le,me=>me.visitorId===M?-1:pe-new Date(me.updatedAt).getTime())}),H=useRequest(U),G=useCreation(()=>H.data||[],[H.data]),Y=useMemoizedFn(({visitorId:le})=>{N.open({title:F("logoutThisSession"),content:F("logoutThisSessionConfirm"),confirmButtonText:F("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:F("cancel"),onConfirm:async()=>{await client.user.logout({visitorId:le}),H.refresh(),N.close()}})}),Z=useCreation(()=>G.filter(pe=>pe.visitorId!==M),[G]),Q=useMemoizedFn(()=>{N.open({title:F("logoutAllSession"),content:F("logoutAllSessionConfirm"),confirmButtonText:F("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:F("cancel"),onConfirm:async()=>{const le=Z.map(pe=>()=>client.user.logout({visitorId:pe.visitorId}));await pAll(le,{concurrency:3,stopOnError:!1}),H.refresh(),N.close()}})}),X=[];C&&X.push(jsxRuntimeExports.jsx(Tooltip,{title:F("logoutAllTips"),children:jsxRuntimeExports.jsx(Button$1,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:Q,disabled:Z.length===0,children:F("logoutAll")})},"logoutAll"));const oe=useCreation(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),ae=[{label:F("platform"),name:"platform",options:{customBodyRenderLite:le=>{var ve,_e;const pe=G[le],me=parseUa(pe.ua);return jsxRuntimeExports.jsx(Box,{children:[(ve=me.os)==null?void 0:ve.name,(_e=me.os)==null?void 0:_e.version].filter(Boolean).join("/")||F("unknown")})}}},{label:F("deviceType"),name:"deviceType",options:{customBodyRenderLite:le=>{var ve,_e;const pe=G[le],me=parseUa(pe.ua);return jsxRuntimeExports.jsx(Box,{children:[(ve=me.browser)==null?void 0:ve.name,(_e=me.browser)==null?void 0:_e.version].filter(Boolean).join("/")||F("unknown")})}}},{label:F("walletOS"),name:"walletOS",options:{customBodyRenderLite:le=>{var me;const pe=G[le];return jsxRuntimeExports.jsx(Box,{children:((me=pe.extra)==null?void 0:me.walletOS)||F("unknown")})}}},T&&{label:F("user"),name:"user",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(Box,{sx:{minWidth:150,maxWidth:250},children:jsxRuntimeExports.jsx(UserSessionInfo,{sessionUser:pe.user,user:_})})}}},{label:F("createdAt"),name:"createdAt",options:{customBodyRenderLite:le=>{const pe=G[le];return pe.createdAt?jsxRuntimeExports.jsx(RelativeTime,{value:pe.createdAt,relativeRange:3*86400*1e3,locale:D}):F("unknown")}}},{label:F("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:le=>{const pe=G[le];return pe.status==="expired"?F("expired"):jsxRuntimeExports.jsx(RelativeTime,{value:pe.updatedAt,relativeRange:3*86400*1e3,locale:D})}}},{label:F("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(UserSessionIp,{userSession:pe})}}},C&&{label:F("actions"),name:"actions",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(Button$1,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:M===pe.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>Y({visitorId:pe.visitorId}),children:pe.status==="expired"?F("remove"):M===pe.visitorId?F("currentSession"):F("logout")})})}}}].filter(Boolean);return jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:B?"unset":L?"calc(100vw - 300px)":"920px",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px"}},children:[V,jsxRuntimeExports.jsx(DataTable,{locale:D,data:G,columns:ae,customButtons:X,options:oe,loading:H.loading})]})}const data$3={width:24,height:24,body:'<path fill="currentColor" d="M7 17q-2.075 0-3.538-1.463T2 12q0-2.075 1.463-3.538T7 7h3q.425 0 .713.288T11 8q0 .425-.288.713T10 9H7q-1.25 0-2.125.875T4 12q0 1.25.875 2.125T7 15h3q.425 0 .713.288T11 16q0 .425-.288.713T10 17H7Zm2-4q-.425 0-.713-.288T8 12q0-.425.288-.713T9 11h6q.425 0 .713.288T16 12q0 .425-.288.713T15 13H9Zm5 4q-.425 0-.713-.288T13 16q0-.425.288-.713T14 15h3q1.25 0 2.125-.875T20 12q0-1.25-.875-2.125T17 9h-3q-.425 0-.713-.288T13 8q0-.425.288-.713T14 7h3q2.075 0 3.538 1.463T22 12q0 2.075-1.463 3.538T17 17h-3Z"/>'},LinkRoundedIcon=data$3,data$2={width:24,height:24,body:'<path fill="currentColor" d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.713T12 11q-.425 0-.713.288T11 12v4q0 .425.288.713T12 17Zm0-8q.425 0 .713-.288T13 8q0-.425-.288-.713T12 7q-.425 0-.713.288T11 8q0 .425.288.713T12 9Zm0 13q-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-8Z"/>'},InfoOutlineRoundedIcon=data$2,data$1={width:24,height:24,body:'<path fill="currentColor" d="M3 20v-2.8q0-.85.438-1.563T4.6 14.55q1.55-.775 3.15-1.163T11 13q.5 0 1 .038t1 .112q-.1 1.45.525 2.738T15.35 18v2H3Zm16 3l-1.5-1.5v-4.65q-1.1-.325-1.8-1.238T15 13.5q0-1.45 1.025-2.475T18.5 10q1.45 0 2.475 1.025T22 13.5q0 1.125-.638 2t-1.612 1.25L21 18l-1.5 1.5L21 21l-2 2Zm-8-11q-1.65 0-2.825-1.175T7 8q0-1.65 1.175-2.825T11 4q1.65 0 2.825 1.175T15 8q0 1.65-1.175 2.825T11 12Zm7.5 2q.425 0 .713-.288T19.5 13q0-.425-.288-.713T18.5 12q-.425 0-.713.288T17.5 13q0 .425.288.713T18.5 14Z"/>'},PasskeyIcon=data$1,data={width:24,height:24,body:'<path fill="currentColor" d="M2 20V4h20v16H2ZM4 8h16V6H4v2Zm11.775 6.075L20 10.525V10H4v1.225l11.775 2.85Z"/>'},WalletIcon=data;function ThirdPartyItem({item:_}){var Q,X,oe,ae,le;const{confirmApi:C,confirmHolder:T}=useConfirm(),I=useReactive({loading:!1}),{locale:M}=useLocaleContext(),D=useMemoizedFn((pe,me={})=>translate(translations$2,pe,M,"en",me)),{session:B}=reactExports.useContext(SessionContext),{bindOAuth:L,unbindOAuth:N,setBaseUrl:V,baseUrl:F}=B.useOAuth(),{disconnectPasskey:U}=B.usePasskey(),H={[LOGIN_PROVIDER.AUTH0]:data$x,[LOGIN_PROVIDER.APPLE]:data$v,[LOGIN_PROVIDER.GITHUB]:data$u,[LOGIN_PROVIDER.GOOGLE]:data$t,[LOGIN_PROVIDER.PASSKEY]:PasskeyIcon,[LOGIN_PROVIDER.WALLET]:WalletIcon},G=useCreation(()=>H[_==null?void 0:_.provider],[_==null?void 0:_.provider]),Y=useCreation(()=>LOGIN_PROVIDER_NAME[_==null?void 0:_.provider]||"unknown",[_==null?void 0:_.provider]),Z=useMemoizedFn(async()=>{if((_==null?void 0:_.provider)===LOGIN_PROVIDER.PASSKEY){await new Promise((pe,me)=>{C.open({title:D("thirdPartyLogin.disconnectPasskey",{name:Y}),content:D("thirdPartyLogin.disconnectPasskeyDescription",{name:Y}),confirmButtonText:D("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:D("common.cancel"),onConfirm(ve){U({session:B,connectedAccount:_}).then(pe).catch(me),ve()},onCancel:pe})});return}try{I.loading=!0,await new Promise((pe,me)=>{var ve;if(_!=null&&_._bind)C.open({title:D("thirdPartyLogin.confirmUnbind",{name:Y}),content:D("thirdPartyLogin.confirmUnbindDescription",{name:Y}),confirmButtonText:D("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:D("common.cancel"),onConfirm(_e){N({session:B,connectedAccount:{...pick$1(_,["did","pk"]),showProvider:_.provider,provider:_._rawProvider}}).then(pe).catch(me),_e()},onCancel:pe});else{const _e=F,Re=window==null?void 0:window.blocklet;let Ve="/";const Ne=getFederatedEnabled(Re),We=getMaster(Re);Ne&&(We!=null&&We.appPid)&&((ve=B==null?void 0:B.user)!=null&&ve.sourceAppPid)&&(Ve=We.appUrl),V(Ve),L({session:B,oauthItem:{..._,provider:_._rawProvider}}).then(pe).catch(me).finally(()=>{V(_e)})}})}catch(pe){console.error(`Failed to ${_!=null&&_._bind?"unbind":"bind"} oauth account`,pe)}finally{I.loading=!1}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{sx:{borderRadius:2,border:`1px solid ${colors$1.strokeBorderBase}`,background:colors$1.backgroundsBgField,display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1,overflow:"hidden"},children:[jsxRuntimeExports.jsx(Box,{component:Icon$3,icon:G,width:"1em",height:"1em",sx:{flexShrink:0,fontSize:16}}),jsxRuntimeExports.jsx(Box,{sx:{flex:1},children:Y}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsxRuntimeExports.jsx(Box,{sx:{flex:1,textOverflow:"ellipsis",overflow:"hidden",lineHeight:"normal"},children:((Q=_.userInfo)==null?void 0:Q.email)||_.did}),(X=_.userInfo)!=null&&X.name?jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{size:36,variant:"circle",shape:"circle",src:(oe=_.userInfo)==null?void 0:oe.picture,did:_.did}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(ae=_.userInfo)==null?void 0:ae.name}),jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(le=_.userInfo)==null?void 0:le.email})]})]})}),children:jsxRuntimeExports.jsx(Box,{component:Icon$3,icon:InfoOutlineRoundedIcon,color:colors$1.textSubtitle,fontSize:16,sx:{cursor:"pointer",flexShrink:0}})}):null]})]}),jsxRuntimeExports.jsx(Tooltip,{title:_._mainProvider?D("thirdPartyLogin.mainProviderCantRemove"):"",children:jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(ButtonComponent,{variant:"outlined",size:"small",sx:{color:_!=null&&_._bind?colors$1.red:colors$1.foregroundsFgBase,borderColor:_!=null&&_._bind?colors$1.red:colors$1.strokeBorderBase,backgroundColor:colors$1.buttonsButtonNeutral,"&:hover":{borderColor:_!=null&&_._bind?colors$1.red:colors$1.strokeBorderBase,backgroundColor:colors$1.buttonsButtonNeutralHover},py:.5,borderRadius:2,fontWeight:500,whiteSpace:"nowrap"},fullWidth:!0,startIcon:I.loading?null:jsxRuntimeExports.jsx(Icon$3,{icon:LinkRoundedIcon}),onClick:Z,disabled:_._mainProvider,loading:I.loading,children:_!=null&&_._bind?D("thirdPartyLogin.disconnect"):D("thirdPartyLogin.connect")})})}),T]})}function ThirdPartyLogin({user:_}){const{session:C}=reactExports.useContext(SessionContext),[T,I]=reactExports.useState({}),{getOAuthConfigs:M}=C.useOAuth();useAsyncEffect(async()=>{const V=await M({sourceAppPid:_==null?void 0:_.sourceAppPid});I(V)},[_==null?void 0:_.sourceAppPid]);const D=useCreation(()=>Object.keys(T).map(F=>({...T[F],provider:F})).filter(F=>F.enabled),[T]),B=useCreation(()=>{const V=getConnectedAccounts$1(_);let F=!1,U="",H=getSourceProvider$1(_);const G=V.find(Z=>Z.provider===LOGIN_PROVIDER.AUTH0);return G&&(G.id.startsWith("google-oauth2|")&&(V.some(Z=>Z.provider==="google")||(F=!0,U=LOGIN_PROVIDER.GOOGLE,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.GOOGLE))),G.id.startsWith("appleid|")&&(V.some(Z=>Z.provider===LOGIN_PROVIDER.APPLE)||(F=!0,U=LOGIN_PROVIDER.APPLE,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.APPLE))),G.id.startsWith("github|")&&(V.some(Z=>Z.provider===LOGIN_PROVIDER.GITHUB)||(F=!0,U=LOGIN_PROVIDER.GITHUB,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.GITHUB)))),D.map(Z=>{if(Z.provider===LOGIN_PROVIDER.AUTH0&&F)return null;const Q=F&&Z.provider===U?V.find(X=>X.provider===LOGIN_PROVIDER.AUTH0):V.find(X=>X.provider===Z.provider);return Q?{...Z,provider:Z.provider,did:Q.did,pk:Q.pk,userInfo:Q.userInfo,_bind:!0,_rawProvider:Q.provider,_mainProvider:Z.provider===H}:{...Z,provider:Z.provider,_rawProvider:Z.provider,_mainProvider:Z.provider===H}}).filter(Boolean).sort((Z,Q)=>(Z==null?void 0:Z.order)!==void 0&&(Q==null?void 0:Q.order)!==void 0?Z.order-Q.order:(Z==null?void 0:Z.order)!==void 0?-1:1)},[_==null?void 0:_.connectedAccounts,D]),L=useCreation(()=>getConnectedAccounts$1(_).filter(U=>U.provider===LOGIN_PROVIDER.PASSKEY&&U.did!==(_==null?void 0:_.did)).map(U=>({...U,_bind:!0})),[_]),N=useCreation(()=>getConnectedAccounts$1(_).filter(U=>U.provider===LOGIN_PROVIDER.WALLET&&U.did!==(_==null?void 0:_.did)).map(U=>({...U,_mainProvider:!0})),[_]);return jsxRuntimeExports.jsx(Box,{sx:{gap:1,display:"grid",gridTemplateColumns:"1fr min-content"},children:!B.length&&!L.length&&!N.length?jsxRuntimeExports.jsx(PasskeyActions,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add Passkey",onSuccess:noop$6,onError:noop$6,dense:!0}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[B.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V==null?void 0:V.provider)),L.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V.id)),N.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V.id)),jsxRuntimeExports.jsx(PasskeyActions,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add Passkey",onSuccess:noop$6,onError:noop$6,dense:!0})]})})}const languages=[{name:"English",code:"en"},{name:"中文",code:"zh"}];function ConfigProfile({user:_,onSave:C}){const{locale:T,changeLocale:I}=useLocaleContext(),M=useMemoizedFn((L,N={})=>translate(translations$2,L,T,"en",N)),D=useReactive({locale:_.locale,loading:!1}),B=useMemoizedFn(async L=>{try{const{value:N}=L.target;D.loading=!0,await client.user.saveProfile({locale:N}),await C("profile"),I(N),D.locale=N}catch(N){Toast$1.error(formatAxiosError(N))}finally{D.loading=!1}});return jsxRuntimeExports.jsxs(Box,{sx:{gap:1,display:"grid",alignItems:"center",gridTemplateColumns:{xs:"1fr",sm:"max-content 1fr"}},children:[jsxRuntimeExports.jsx(Box,{children:M("commonSetting.locale")}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(LinearProgress,{color:"primary",sx:{visibility:D.loading?"visible":"hidden",height:2}}),jsxRuntimeExports.jsx(Select,{value:D.locale,onChange:B,size:"small",sx:{minWidth:300},children:(window.blocklet.languages||languages).map(L=>jsxRuntimeExports.jsx(MenuItem$1,{value:L.code,children:L.name},L.code))})]})]})}function Settings({user:_,settings:C,onSave:T,...I}){const{locale:M}=useLocaleContext(),D=useMemoizedFn((N,V={})=>translate(translations$2,N,M,"en",V)),B=useCreation(()=>((C==null?void 0:C.userCenterTabs)||[]).map(V=>({key:V.value,name:V.label,value:V.protected,isPrivate:V.isPrivate})),[C==null?void 0:C.userCenterTabs]),L=useCreation(()=>[{label:D("commonSetting.title"),value:"common",content:jsxRuntimeExports.jsx(ConfigProfile,{user:_,onSave:T})},{label:D("notificationManagement"),value:"notification",content:jsxRuntimeExports.jsx(Notification,{user:_})},{label:D("thirdPartyLogin.title"),value:"thirdPartyLogin",content:jsxRuntimeExports.jsx(ThirdPartyLogin,{user:_})},{label:D("privacyManagement"),value:"privacy",content:jsxRuntimeExports.jsx(Privacy,{configList:B,onSave:T})},{label:D("sessionManagement"),value:"session",content:jsxRuntimeExports.jsx(UserSessions,{user:_,showUser:!1})}].filter(Boolean),[_,B]);return reactExports.useEffect(()=>{const N=window.location.hash.slice(1);if(N){const V=document.getElementById(N);V==null||V.scrollIntoView({behavior:"smooth"})}},[]),jsxRuntimeExports.jsx(Box,{...I,sx:{...I==null?void 0:I.sx,minWidth:{md:500},maxWidth:"100%"},children:L.map((N,V)=>jsxRuntimeExports.jsxs(Box,{id:N.value,children:[jsxRuntimeExports.jsx(Typography$1,{sx:{color:colors$1.foregroundsFgBase,fontWeight:600},children:N.label}),jsxRuntimeExports.jsx(Box,{mt:2.5,children:N.content}),V<L.length-1?jsxRuntimeExports.jsx(Divider,{sx:{mt:2.5,mb:2.5,borderColor:colors$1.dividerColor}}):null]},N.value))})}const ConfigUserSpaceContext=reactExports.createContext({}),{Provider,Consumer}=ConfigUserSpaceContext;function ConfigUserSpaceProvider({children:_}){const[C]=reactExports.useState(!1),{session:T}=reactExports.useContext(SessionContext),{user:I}=T,[M,D]=reactExports.useState(),B=reactExports.useMemo(()=>{var U;return(U=I==null?void 0:I.didSpace)==null?void 0:U.endpoint},[I==null?void 0:I.didSpace]);reactExports.useEffect(()=>{D(I==null?void 0:I.didSpace)},[I==null?void 0:I.didSpace]);const L=async()=>{D(void 0)},N=U=>{},V=async U=>{D(U),await N(U.endpoint)},F=!!(B&&M);return jsxRuntimeExports.jsx(Provider,{value:{loading:C,spaceGateway:M,session:T,deleteSpaceGateway:L,updateSpaceGateway:V,storageEndpoint:B,settingStorageEndpoint:N,hasStorageEndpoint:F},children:_})}function useConfigUserSpaceContext(){return reactExports.useContext(ConfigUserSpaceContext)}const api=createAxios$2({});function useMobile({key:_}={key:"md"}){const C=useTheme();return useMediaQuery(C.breakpoints.down(_))}const SPACE_CONNECT_ERROR_CODE={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008};function useSpaceInfo({endpoint:_,deps:C=[]}){return useRequest(async()=>{if(!isUrl$2(_))return;const{headers:T}=await api.head(_,{timeout:1e3*30,params:{withExtras:!0}}),[I,M,D,B,L,N="legacy",V,F,U]=[T["x-space-name"],T["x-subscription-id"],T["x-listable"]==="true",T["x-readable"]==="true",T["x-writeable"]==="true",T["x-space-version"],T["x-space-owner-did"],T["x-space-is-available"],T["x-error-code"]],H=I?decodeURIComponent(I):"";if(F===void 0||U===void 0){const G=D&&B&&L;return{version:N,name:H,subscriptionId:M,ownerDid:V||"",isAvailable:G,errorCode:G?0:SPACE_CONNECT_ERROR_CODE.UNAUTHORIZED}}return{version:N,name:H,subscriptionId:M,ownerDid:V,isAvailable:F==="true",errorCode:parseInt(U,10)}},{refreshDeps:[_].concat(C),onError(T){console.error(T)}})}const en=flat.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",corsBlocked:`The connection request may fail due to CORS restrictions:
|
|
3200
|
+
`;var uaParser={exports:{}};(function(_,C){(function(T,I){var M="1.0.38",D="",B="?",L="function",N="undefined",V="object",F="string",U="major",H="model",G="name",Y="type",Z="vendor",Q="version",X="architecture",oe="console",ae="mobile",le="tablet",pe="smarttv",me="wearable",ve="embedded",_e=500,Re="Amazon",Ve="Apple",Ne="ASUS",We="BlackBerry",fe="Browser",W="Chrome",J="Edge",te="Firefox",ie="Google",ne="Huawei",se="LG",he="Microsoft",ce="Motorola",ee="Opera",ue="Samsung",Oe="Sharp",ge="Sony",we="Xiaomi",Se="Zebra",Ce="Facebook",Te="Chromium OS",Be="Mac OS",ye=function(xt,st){var rt={};for(var kt in xt)st[kt]&&st[kt].length%2===0?rt[kt]=st[kt].concat(xt[kt]):rt[kt]=xt[kt];return rt},de=function(xt){for(var st={},rt=0;rt<xt.length;rt++)st[xt[rt].toUpperCase()]=xt[rt];return st},Ee=function(xt,st){return typeof xt===F?xe(st).indexOf(xe(xt))!==-1:!1},xe=function(xt){return xt.toLowerCase()},Pe=function(xt){return typeof xt===F?xt.replace(/[^\d\.]/g,D).split(".")[0]:I},qe=function(xt,st){if(typeof xt===F)return xt=xt.replace(/^\s\s*/,D),typeof st===N?xt:xt.substring(0,_e)},Fe=function(xt,st){for(var rt=0,kt,ht,Ct,Ht,Et,Qt;rt<st.length&&!Et;){var Br=st[rt],Gt=st[rt+1];for(kt=ht=0;kt<Br.length&&!Et&&Br[kt];)if(Et=Br[kt++].exec(xt),Et)for(Ct=0;Ct<Gt.length;Ct++)Qt=Et[++ht],Ht=Gt[Ct],typeof Ht===V&&Ht.length>0?Ht.length===2?typeof Ht[1]==L?this[Ht[0]]=Ht[1].call(this,Qt):this[Ht[0]]=Ht[1]:Ht.length===3?typeof Ht[1]===L&&!(Ht[1].exec&&Ht[1].test)?this[Ht[0]]=Qt?Ht[1].call(this,Qt,Ht[2]):I:this[Ht[0]]=Qt?Qt.replace(Ht[1],Ht[2]):I:Ht.length===4&&(this[Ht[0]]=Qt?Ht[3].call(this,Qt.replace(Ht[1],Ht[2])):I):this[Ht]=Qt||I;rt+=2}},Ie=function(xt,st){for(var rt in st)if(typeof st[rt]===V&&st[rt].length>0){for(var kt=0;kt<st[rt].length;kt++)if(Ee(st[rt][kt],xt))return rt===B?I:rt}else if(Ee(st[rt],xt))return rt===B?I:rt;return xt},De={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Xe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ke={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Q,[G,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Q,[G,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[G,Q],[/opios[\/ ]+([\w\.]+)/i],[Q,[G,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Q,[G,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[Q,[G,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Q,[G,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[G,Q],[/\bddg\/([\w\.]+)/i],[Q,[G,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Q,[G,"UC"+fe]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Q,[G,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Q,[G,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Q,[G,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Q,[G,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Q,[G,"Smart Lenovo "+fe]],[/(avast|avg)\/([\w\.]+)/i],[[G,/(.+)/,"$1 Secure "+fe],Q],[/\bfocus\/([\w\.]+)/i],[Q,[G,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[Q,[G,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Q,[G,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Q,[G,"Dolphin"]],[/coast\/([\w\.]+)/i],[Q,[G,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Q,[G,"MIUI "+fe]],[/fxios\/([-\w\.]+)/i],[Q,[G,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[G,"360 "+fe]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[G,/(.+)/,"$1 "+fe],Q],[/samsungbrowser\/([\w\.]+)/i],[Q,[G,ue+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[G,/_/g," "],Q],[/metasr[\/ ]?([\d\.]+)/i],[Q,[G,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[G,"Sogou Mobile"],Q],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[G,Q],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[G],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[G,Ce],Q],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[G,Q],[/\bgsa\/([\w\.]+) .*safari\//i],[Q,[G,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Q,[G,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[Q,[G,W+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[G,W+" WebView"],Q],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Q,[G,"Android "+fe]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[G,Q],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[Q,[G,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[Q,G],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[G,[Q,Ie,De]],[/(webkit|khtml)\/([\w\.]+)/i],[G,Q],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[G,"Netscape"],Q],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Q,[G,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[G,Q],[/(cobalt)\/([\w\.]+)/i],[G,[Q,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[X,"amd64"]],[/(ia32(?=;))/i],[[X,xe]],[/((?:i[346]|x)86)[;\)]/i],[[X,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[X,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[X,"armhf"]],[/windows (ce|mobile); ppc;/i],[[X,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[X,/ower/,D,xe]],[/(sun4\w)[;\)]/i],[[X,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[X,xe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[H,[Z,ue],[Y,le]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[H,[Z,ue],[Y,ae]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[H,[Z,Ve],[Y,ae]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[H,[Z,Ve],[Y,le]],[/(macintosh);/i],[H,[Z,Ve]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[H,[Z,Oe],[Y,ae]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[H,[Z,ne],[Y,le]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[H,[Z,ne],[Y,ae]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[H,/_/g," "],[Z,we],[Y,ae]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[H,/_/g," "],[Z,we],[Y,le]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[H,[Z,"OPPO"],[Y,ae]],[/\b(opd2\d{3}a?) bui/i],[H,[Z,"OPPO"],[Y,le]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[H,[Z,"Vivo"],[Y,ae]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[H,[Z,"Realme"],[Y,ae]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[H,[Z,ce],[Y,ae]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[H,[Z,ce],[Y,le]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[H,[Z,se],[Y,le]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[H,[Z,se],[Y,ae]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[H,[Z,"Lenovo"],[Y,le]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[H,/_/g," "],[Z,"Nokia"],[Y,ae]],[/(pixel c)\b/i],[H,[Z,ie],[Y,le]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[H,[Z,ie],[Y,ae]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[H,[Z,ge],[Y,ae]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[H,"Xperia Tablet"],[Z,ge],[Y,le]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[H,[Z,"OnePlus"],[Y,ae]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[H,[Z,Re],[Y,le]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[H,/(.+)/g,"Fire Phone $1"],[Z,Re],[Y,ae]],[/(playbook);[-\w\),; ]+(rim)/i],[H,Z,[Y,le]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[H,[Z,We],[Y,ae]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[H,[Z,Ne],[Y,le]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[H,[Z,Ne],[Y,ae]],[/(nexus 9)/i],[H,[Z,"HTC"],[Y,le]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[H,/_/g," "],[Y,ae]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[H,[Z,"Acer"],[Y,le]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[H,[Z,"Meizu"],[Y,ae]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[H,[Z,"Ulefone"],[Y,ae]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[Z,H,[Y,ae]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[Z,H,[Y,le]],[/(surface duo)/i],[H,[Z,he],[Y,le]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[H,[Z,"Fairphone"],[Y,ae]],[/(u304aa)/i],[H,[Z,"AT&T"],[Y,ae]],[/\bsie-(\w*)/i],[H,[Z,"Siemens"],[Y,ae]],[/\b(rct\w+) b/i],[H,[Z,"RCA"],[Y,le]],[/\b(venue[\d ]{2,7}) b/i],[H,[Z,"Dell"],[Y,le]],[/\b(q(?:mv|ta)\w+) b/i],[H,[Z,"Verizon"],[Y,le]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[H,[Z,"Barnes & Noble"],[Y,le]],[/\b(tm\d{3}\w+) b/i],[H,[Z,"NuVision"],[Y,le]],[/\b(k88) b/i],[H,[Z,"ZTE"],[Y,le]],[/\b(nx\d{3}j) b/i],[H,[Z,"ZTE"],[Y,ae]],[/\b(gen\d{3}) b.+49h/i],[H,[Z,"Swiss"],[Y,ae]],[/\b(zur\d{3}) b/i],[H,[Z,"Swiss"],[Y,le]],[/\b((zeki)?tb.*\b) b/i],[H,[Z,"Zeki"],[Y,le]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[Z,"Dragon Touch"],H,[Y,le]],[/\b(ns-?\w{0,9}) b/i],[H,[Z,"Insignia"],[Y,le]],[/\b((nxa|next)-?\w{0,9}) b/i],[H,[Z,"NextBook"],[Y,le]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[Z,"Voice"],H,[Y,ae]],[/\b(lvtel\-)?(v1[12]) b/i],[[Z,"LvTel"],H,[Y,ae]],[/\b(ph-1) /i],[H,[Z,"Essential"],[Y,ae]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[H,[Z,"Envizen"],[Y,le]],[/\b(trio[-\w\. ]+) b/i],[H,[Z,"MachSpeed"],[Y,le]],[/\btu_(1491) b/i],[H,[Z,"Rotor"],[Y,le]],[/(shield[\w ]+) b/i],[H,[Z,"Nvidia"],[Y,le]],[/(sprint) (\w+)/i],[Z,H,[Y,ae]],[/(kin\.[onetw]{3})/i],[[H,/\./g," "],[Z,he],[Y,ae]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[H,[Z,Se],[Y,le]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[H,[Z,Se],[Y,ae]],[/smart-tv.+(samsung)/i],[Z,[Y,pe]],[/hbbtv.+maple;(\d+)/i],[[H,/^/,"SmartTV"],[Z,ue],[Y,pe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,se],[Y,pe]],[/(apple) ?tv/i],[Z,[H,Ve+" TV"],[Y,pe]],[/crkey/i],[[H,W+"cast"],[Z,ie],[Y,pe]],[/droid.+aft(\w+)( bui|\))/i],[H,[Z,Re],[Y,pe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[H,[Z,Oe],[Y,pe]],[/(bravia[\w ]+)( bui|\))/i],[H,[Z,ge],[Y,pe]],[/(mitv-\w{5}) bui/i],[H,[Z,we],[Y,pe]],[/Hbbtv.*(technisat) (.*);/i],[Z,H,[Y,pe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,qe],[H,qe],[Y,pe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[Y,pe]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[Z,H,[Y,oe]],[/droid.+; (shield) bui/i],[H,[Z,"Nvidia"],[Y,oe]],[/(playstation [345portablevi]+)/i],[H,[Z,ge],[Y,oe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[H,[Z,he],[Y,oe]],[/((pebble))app/i],[Z,H,[Y,me]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[H,[Z,Ve],[Y,me]],[/droid.+; (glass) \d/i],[H,[Z,ie],[Y,me]],[/droid.+; (wt63?0{2,3})\)/i],[H,[Z,Se],[Y,me]],[/(quest( \d| pro)?)/i],[H,[Z,Ce],[Y,me]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[Y,ve]],[/(aeobc)\b/i],[H,[Z,Re],[Y,ve]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[H,[Y,ae]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[H,[Y,le]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Y,le]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Y,ae]],[/(android[-\w\. ]{0,9});.+buil/i],[H,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Q,[G,J+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Q,[G,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[G,Q],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Q,G]],os:[[/microsoft (windows) (vista|xp)/i],[G,Q],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[G,[Q,Ie,Xe]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Q,Ie,Xe],[G,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Q,/_/g,"."],[G,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[G,Be],[Q,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Q,G],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[G,Q],[/\(bb(10);/i],[Q,[G,We]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[Q,[G,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Q,[G,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Q,[G,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Q,[G,"watchOS"]],[/crkey\/([\d\.]+)/i],[Q,[G,W+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[G,Te],Q],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[G,Q],[/(sunos) ?([\w\.\d]*)/i],[[G,"Solaris"],Q],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[G,Q]]},pt=function(xt,st){if(typeof xt===V&&(st=xt,xt=I),!(this instanceof pt))return new pt(xt,st).getResult();var rt=typeof T!==N&&T.navigator?T.navigator:I,kt=xt||(rt&&rt.userAgent?rt.userAgent:D),ht=rt&&rt.userAgentData?rt.userAgentData:I,Ct=st?ye(Ke,st):Ke,Ht=rt&&rt.userAgent==kt;return this.getBrowser=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.browser),Et[U]=Pe(Et[Q]),Ht&&rt&&rt.brave&&typeof rt.brave.isBrave==L&&(Et[G]="Brave"),Et},this.getCPU=function(){var Et={};return Et[X]=I,Fe.call(Et,kt,Ct.cpu),Et},this.getDevice=function(){var Et={};return Et[Z]=I,Et[H]=I,Et[Y]=I,Fe.call(Et,kt,Ct.device),Ht&&!Et[Y]&&ht&&ht.mobile&&(Et[Y]=ae),Ht&&Et[H]=="Macintosh"&&rt&&typeof rt.standalone!==N&&rt.maxTouchPoints&&rt.maxTouchPoints>2&&(Et[H]="iPad",Et[Y]=le),Et},this.getEngine=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.engine),Et},this.getOS=function(){var Et={};return Et[G]=I,Et[Q]=I,Fe.call(Et,kt,Ct.os),Ht&&!Et[G]&&ht&&ht.platform&&ht.platform!="Unknown"&&(Et[G]=ht.platform.replace(/chrome os/i,Te).replace(/macos/i,Be)),Et},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return kt},this.setUA=function(Et){return kt=typeof Et===F&&Et.length>_e?qe(Et,_e):Et,this},this.setUA(kt),this};pt.VERSION=M,pt.BROWSER=de([G,Q,U]),pt.CPU=de([X]),pt.DEVICE=de([H,Z,Y,oe,ae,pe,le,me,ve]),pt.ENGINE=pt.OS=de([G,Q]),_.exports&&(C=_.exports=pt),C.UAParser=pt;var At=typeof T!==N&&(T.jQuery||T.Zepto);if(At&&!At.ua){var vt=new pt;At.ua=vt.getResult(),At.ua.get=function(){return vt.getUA()},At.ua.set=function(xt){vt.setUA(xt);var st=vt.getResult();for(var rt in st)At.ua[rt]=st[rt]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs(uaParserExports);class AbortError extends Error{constructor(C){super(),this.name="AbortError",this.message=C}}const getDOMException=_=>globalThis.DOMException===void 0?new AbortError(_):new DOMException(_),getAbortedReason=_=>{const C=_.reason===void 0?getDOMException("This operation was aborted."):_.reason;return C instanceof Error?C:getDOMException(C)};async function pMap(_,C,{concurrency:T=Number.POSITIVE_INFINITY,stopOnError:I=!0,signal:M}={}){return new Promise((D,B)=>{if(_[Symbol.iterator]===void 0&&_[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof _})`);if(typeof C!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(T)||T===Number.POSITIVE_INFINITY)&&T>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${T}\` (${typeof T})`);const L=[],N=[],V=new Map;let F=!1,U=!1,H=!1,G=0,Y=0;const Z=_[Symbol.iterator]===void 0?_[Symbol.asyncIterator]():_[Symbol.iterator](),Q=oe=>{F=!0,U=!0,B(oe)};M&&(M.aborted&&Q(getAbortedReason(M)),M.addEventListener("abort",()=>{Q(getAbortedReason(M))}));const X=async()=>{if(U)return;const oe=await Z.next(),ae=Y;if(Y++,oe.done){if(H=!0,G===0&&!U){if(!I&&N.length>0){Q(new AggregateError(N));return}if(U=!0,V.size===0){D(L);return}const le=[];for(const[pe,me]of L.entries())V.get(pe)!==pMapSkip&&le.push(me);D(le)}return}G++,(async()=>{try{const le=await oe.value;if(U)return;const pe=await C(le,ae);pe===pMapSkip&&V.set(ae,pe),L[ae]=pe,G--,await X()}catch(le){if(I)Q(le);else{N.push(le),G--;try{await X()}catch(pe){Q(pe)}}}})()};(async()=>{for(let oe=0;oe<T;oe++){try{await X()}catch(ae){Q(ae);break}if(H||F)break}})()})}const pMapSkip=Symbol("skip");async function pAll(_,C){return pMap(_,T=>T(),C)}function useMobile$1({key:_="sm"}={}){const C=useTheme();return useMediaQuery(C.breakpoints.down(_))}function UserSessionInfo({user:_,sessionUser:C}){const T=useCreation(()=>{var I;return(I=(_==null?void 0:_.passports)||[])==null?void 0:I.find(M=>M.name===C.role)},[_==null?void 0:_.passports,C==null?void 0:C.role]);return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{size:40,variant:"circle",shape:"circle",src:C.avatar,did:C.did,sx:{flexShrink:0}}),jsxRuntimeExports.jsxs(Box,{sx:{flex:1,overflow:"hidden"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(Tooltip,{title:C.fullName,children:jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:C.fullName})}),jsxRuntimeExports.jsx(Chip,{label:(T==null?void 0:T.title)||(T==null?void 0:T.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:colors$1.textBase,borderColor:colors$1.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),jsxRuntimeExports.jsx(Tooltip,{title:C.email,children:jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:C.email})})]})]})}const translations$1={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},RESERVED_IP="Reserved IP",IP_REGION_CACHE="ip-region-cache";async function getIpRegionFromIpApi(_){const C=`https://ipapi.co/${_}/json/`,I=await(await fetch(C)).json();let M="";return I.error?I.reserved&&(M=RESERVED_IP):M=[I.country_name,I.region,I.city].filter(Boolean).join("/"),M}async function getIpRegionFromIpSb(_){const C=`https://api.ip.sb/geoip/${_}`,I=await(await fetch(C)).json();let M="";return I.error?I.reserved&&(M=RESERVED_IP):M=[I.country,I.region,I.city].filter(Boolean).join("/"),M}async function ip2Region(_){let C="",T={};try{const I=localStorage.getItem(IP_REGION_CACHE);I&&(T=JSON.parse(I))}catch{T={}}if(T[_])C=T[_];else{try{C=await getIpRegionFromIpSb(_)}catch{console.warn("Fail to get ip region from ip.sb")}if(!C)try{C=await getIpRegionFromIpApi(_)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(C){const I=Object.keys(T);I.length>100&&delete T[I[0]],T[_]&&delete T[_],T[_]=C,localStorage.setItem(IP_REGION_CACHE,JSON.stringify(T))}return C}const parseUa=_=>new UAParser(_,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[UAParser.BROWSER.NAME,UAParser.BROWSER.VERSION]]}).getResult(),queue=new _default$2({concurrency:1}),UserSessionIp=reactExports.memo(({userSession:_})=>{const C=useReactive({loading:!0,ipRegion:""}),{t:T}=useLocaleContext();return reactExports.useEffect(()=>{queue.add(async()=>{try{C.ipRegion=await ip2Region(_.lastLoginIp)}finally{C.loading=!1}})},[C,_.lastLoginIp]),jsxRuntimeExports.jsx(Box,{children:C.ipRegion?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography$1,{variant:"body2",children:C.ipRegion}),jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",children:_.lastLoginIp||T("unknown")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography$1,{children:_.lastLoginIp||T("unknown")}),C.loading?jsxRuntimeExports.jsx(Typography$1,{variant:"body2",color:"grey",sx:{textAlign:"center"},children:jsxRuntimeExports.jsx(CircularProgress,{size:12,color:"inherit"})}):null]})})});function UserSessions({user:_,showAction:C=!0,showUser:T=!0}){const{session:I}=reactExports.useContext(SessionContext),M=getVisitorId$2(),{locale:D}=useLocaleContext(),B=useMobile$1({key:"md"}),L=useMediaQuery(le=>le.breakpoints.down("lg")),{confirmApi:N,confirmHolder:V}=useConfirm(),F=useMemoizedFn((le,pe={})=>translate(translations$1,le,D,"en",pe)),U=useMemoizedFn(async()=>{let le=(_==null?void 0:_.userSessions)||[];try{!(_!=null&&_.userSessions)&&I.user&&(le=await client.userSession.getMyLoginSessions())}catch(me){console.warn("Failed to convert ip to region"),console.error(me)}const pe=new Date().getTime();return sortBy(le,me=>me.visitorId===M?-1:pe-new Date(me.updatedAt).getTime())}),H=useRequest(U),G=useCreation(()=>H.data||[],[H.data]),Y=useMemoizedFn(({visitorId:le})=>{N.open({title:F("logoutThisSession"),content:F("logoutThisSessionConfirm"),confirmButtonText:F("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:F("cancel"),onConfirm:async()=>{await client.user.logout({visitorId:le}),H.refresh(),N.close()}})}),Z=useCreation(()=>G.filter(pe=>pe.visitorId!==M),[G]),Q=useMemoizedFn(()=>{N.open({title:F("logoutAllSession"),content:F("logoutAllSessionConfirm"),confirmButtonText:F("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:F("cancel"),onConfirm:async()=>{const le=Z.map(pe=>()=>client.user.logout({visitorId:pe.visitorId}));await pAll(le,{concurrency:3,stopOnError:!1}),H.refresh(),N.close()}})}),X=[];C&&X.push(jsxRuntimeExports.jsx(Tooltip,{title:F("logoutAllTips"),children:jsxRuntimeExports.jsx(Button$1,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:Q,disabled:Z.length===0,children:F("logoutAll")})},"logoutAll"));const oe=useCreation(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),ae=[{label:F("platform"),name:"platform",options:{customBodyRenderLite:le=>{var ve,_e;const pe=G[le],me=parseUa(pe.ua);return jsxRuntimeExports.jsx(Box,{children:[(ve=me.os)==null?void 0:ve.name,(_e=me.os)==null?void 0:_e.version].filter(Boolean).join("/")||F("unknown")})}}},{label:F("deviceType"),name:"deviceType",options:{customBodyRenderLite:le=>{var ve,_e;const pe=G[le],me=parseUa(pe.ua);return jsxRuntimeExports.jsx(Box,{children:[(ve=me.browser)==null?void 0:ve.name,(_e=me.browser)==null?void 0:_e.version].filter(Boolean).join("/")||F("unknown")})}}},{label:F("walletOS"),name:"walletOS",options:{customBodyRenderLite:le=>{var me;const pe=G[le];return jsxRuntimeExports.jsx(Box,{children:((me=pe.extra)==null?void 0:me.walletOS)||F("unknown")})}}},T&&{label:F("user"),name:"user",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(Box,{sx:{minWidth:150,maxWidth:250},children:jsxRuntimeExports.jsx(UserSessionInfo,{sessionUser:pe.user,user:_})})}}},{label:F("createdAt"),name:"createdAt",options:{customBodyRenderLite:le=>{const pe=G[le];return pe.createdAt?jsxRuntimeExports.jsx(RelativeTime,{value:pe.createdAt,relativeRange:3*86400*1e3,locale:D}):F("unknown")}}},{label:F("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:le=>{const pe=G[le];return pe.status==="expired"?F("expired"):jsxRuntimeExports.jsx(RelativeTime,{value:pe.updatedAt,relativeRange:3*86400*1e3,locale:D})}}},{label:F("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(UserSessionIp,{userSession:pe})}}},C&&{label:F("actions"),name:"actions",options:{customBodyRenderLite:le=>{const pe=G[le];return jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(Button$1,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:M===pe.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>Y({visitorId:pe.visitorId}),children:pe.status==="expired"?F("remove"):M===pe.visitorId?F("currentSession"):F("logout")})})}}}].filter(Boolean);return jsxRuntimeExports.jsxs(Box,{sx:{maxWidth:B?"unset":L?"calc(100vw - 300px)":"920px",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px"}},children:[V,jsxRuntimeExports.jsx(DataTable,{locale:D,data:G,columns:ae,customButtons:X,options:oe,loading:H.loading})]})}const data$3={width:24,height:24,body:'<path fill="currentColor" d="M7 17q-2.075 0-3.538-1.463T2 12q0-2.075 1.463-3.538T7 7h3q.425 0 .713.288T11 8q0 .425-.288.713T10 9H7q-1.25 0-2.125.875T4 12q0 1.25.875 2.125T7 15h3q.425 0 .713.288T11 16q0 .425-.288.713T10 17H7Zm2-4q-.425 0-.713-.288T8 12q0-.425.288-.713T9 11h6q.425 0 .713.288T16 12q0 .425-.288.713T15 13H9Zm5 4q-.425 0-.713-.288T13 16q0-.425.288-.713T14 15h3q1.25 0 2.125-.875T20 12q0-1.25-.875-2.125T17 9h-3q-.425 0-.713-.288T13 8q0-.425.288-.713T14 7h3q2.075 0 3.538 1.463T22 12q0 2.075-1.463 3.538T17 17h-3Z"/>'},LinkRoundedIcon=data$3,data$2={width:24,height:24,body:'<path fill="currentColor" d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.713T12 11q-.425 0-.713.288T11 12v4q0 .425.288.713T12 17Zm0-8q.425 0 .713-.288T13 8q0-.425-.288-.713T12 7q-.425 0-.713.288T11 8q0 .425.288.713T12 9Zm0 13q-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-8Z"/>'},InfoOutlineRoundedIcon=data$2,data$1={width:24,height:24,body:'<path fill="currentColor" d="M3 20v-2.8q0-.85.438-1.563T4.6 14.55q1.55-.775 3.15-1.163T11 13q.5 0 1 .038t1 .112q-.1 1.45.525 2.738T15.35 18v2H3Zm16 3l-1.5-1.5v-4.65q-1.1-.325-1.8-1.238T15 13.5q0-1.45 1.025-2.475T18.5 10q1.45 0 2.475 1.025T22 13.5q0 1.125-.638 2t-1.612 1.25L21 18l-1.5 1.5L21 21l-2 2Zm-8-11q-1.65 0-2.825-1.175T7 8q0-1.65 1.175-2.825T11 4q1.65 0 2.825 1.175T15 8q0 1.65-1.175 2.825T11 12Zm7.5 2q.425 0 .713-.288T19.5 13q0-.425-.288-.713T18.5 12q-.425 0-.713.288T17.5 13q0 .425.288.713T18.5 14Z"/>'},PasskeyIcon=data$1,data={width:24,height:24,body:'<path fill="currentColor" d="M2 20V4h20v16H2ZM4 8h16V6H4v2Zm11.775 6.075L20 10.525V10H4v1.225l11.775 2.85Z"/>'},WalletIcon=data;function ThirdPartyItem({item:_}){var Q,X,oe,ae,le;const{confirmApi:C,confirmHolder:T}=useConfirm(),I=useReactive({loading:!1}),{locale:M}=useLocaleContext(),D=useMemoizedFn((pe,me={})=>translate(translations$2,pe,M,"en",me)),{session:B}=reactExports.useContext(SessionContext),{bindOAuth:L,unbindOAuth:N,setBaseUrl:V,baseUrl:F}=B.useOAuth(),{disconnectPasskey:U}=B.usePasskey(),H={[LOGIN_PROVIDER.AUTH0]:data$x,[LOGIN_PROVIDER.APPLE]:data$v,[LOGIN_PROVIDER.GITHUB]:data$u,[LOGIN_PROVIDER.GOOGLE]:data$t,[LOGIN_PROVIDER.PASSKEY]:PasskeyIcon,[LOGIN_PROVIDER.WALLET]:WalletIcon},G=useCreation(()=>H[_==null?void 0:_.provider],[_==null?void 0:_.provider]),Y=useCreation(()=>LOGIN_PROVIDER_NAME[_==null?void 0:_.provider]||"unknown",[_==null?void 0:_.provider]),Z=useMemoizedFn(async()=>{if((_==null?void 0:_.provider)===LOGIN_PROVIDER.PASSKEY){await new Promise((pe,me)=>{C.open({title:D("thirdPartyLogin.disconnectPasskey",{name:Y}),content:D("thirdPartyLogin.disconnectPasskeyDescription",{name:Y}),confirmButtonText:D("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:D("common.cancel"),onConfirm(ve){U({session:B,connectedAccount:_}).then(pe).catch(me),ve()},onCancel:pe})});return}try{I.loading=!0,await new Promise((pe,me)=>{var ve;if(_!=null&&_._bind)C.open({title:D("thirdPartyLogin.confirmUnbind",{name:Y}),content:D("thirdPartyLogin.confirmUnbindDescription",{name:Y}),confirmButtonText:D("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:D("common.cancel"),onConfirm(_e){N({session:B,connectedAccount:{...pick$1(_,["did","pk"]),showProvider:_.provider,provider:_._rawProvider}}).then(pe).catch(me),_e()},onCancel:pe});else{const _e=F,Re=window==null?void 0:window.blocklet;let Ve="/";const Ne=getFederatedEnabled(Re),We=getMaster(Re);Ne&&(We!=null&&We.appPid)&&((ve=B==null?void 0:B.user)!=null&&ve.sourceAppPid)&&(Ve=We.appUrl),V(Ve),L({session:B,oauthItem:{..._,provider:_._rawProvider}}).then(pe).catch(me).finally(()=>{V(_e)})}})}catch(pe){console.error(`Failed to ${_!=null&&_._bind?"unbind":"bind"} oauth account`,pe)}finally{I.loading=!1}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{sx:{borderRadius:2,border:`1px solid ${colors$1.strokeBorderBase}`,background:colors$1.backgroundsBgField,display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1,overflow:"hidden"},children:[jsxRuntimeExports.jsx(Box,{component:Icon$3,icon:G,width:"1em",height:"1em",sx:{flexShrink:0,fontSize:16}}),jsxRuntimeExports.jsx(Box,{sx:{flex:1},children:Y}),jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsxRuntimeExports.jsx(Box,{sx:{flex:1,textOverflow:"ellipsis",overflow:"hidden",lineHeight:"normal"},children:((Q=_.userInfo)==null?void 0:Q.email)||_.did}),(X=_.userInfo)!=null&&X.name?jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(AvatarWithErrorBoundary,{size:36,variant:"circle",shape:"circle",src:(oe=_.userInfo)==null?void 0:oe.picture,did:_.did}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(ae=_.userInfo)==null?void 0:ae.name}),jsxRuntimeExports.jsx(Typography$1,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(le=_.userInfo)==null?void 0:le.email})]})]})}),children:jsxRuntimeExports.jsx(Box,{component:Icon$3,icon:InfoOutlineRoundedIcon,color:colors$1.textSubtitle,fontSize:16,sx:{cursor:"pointer",flexShrink:0}})}):null]})]}),jsxRuntimeExports.jsx(Tooltip,{title:_._mainProvider?D("thirdPartyLogin.mainProviderCantRemove"):"",children:jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(ButtonComponent,{variant:"outlined",size:"small",sx:{color:_!=null&&_._bind?colors$1.red:colors$1.foregroundsFgBase,borderColor:_!=null&&_._bind?colors$1.red:colors$1.strokeBorderBase,backgroundColor:colors$1.buttonsButtonNeutral,"&:hover":{borderColor:_!=null&&_._bind?colors$1.red:colors$1.strokeBorderBase,backgroundColor:colors$1.buttonsButtonNeutralHover},py:.5,borderRadius:2,fontWeight:500,whiteSpace:"nowrap"},fullWidth:!0,startIcon:I.loading?null:jsxRuntimeExports.jsx(Icon$3,{icon:LinkRoundedIcon}),onClick:Z,disabled:_._mainProvider,loading:I.loading,children:_!=null&&_._bind?D("thirdPartyLogin.disconnect"):D("thirdPartyLogin.connect")})})}),T]})}function ThirdPartyLogin({user:_}){const{session:C}=reactExports.useContext(SessionContext),[T,I]=reactExports.useState({}),{getOAuthConfigs:M}=C.useOAuth();useAsyncEffect(async()=>{const V=await M({sourceAppPid:_==null?void 0:_.sourceAppPid});I(V)},[_==null?void 0:_.sourceAppPid]);const D=useCreation(()=>Object.keys(T).map(F=>({...T[F],provider:F})).filter(F=>F.enabled),[T]),B=useCreation(()=>{const V=getConnectedAccounts$1(_);let F=!1,U="",H=getSourceProvider$1(_);const G=V.find(Z=>Z.provider===LOGIN_PROVIDER.AUTH0);return G&&(G.id.startsWith("google-oauth2|")&&(V.some(Z=>Z.provider==="google")||(F=!0,U=LOGIN_PROVIDER.GOOGLE,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.GOOGLE))),G.id.startsWith("appleid|")&&(V.some(Z=>Z.provider===LOGIN_PROVIDER.APPLE)||(F=!0,U=LOGIN_PROVIDER.APPLE,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.APPLE))),G.id.startsWith("github|")&&(V.some(Z=>Z.provider===LOGIN_PROVIDER.GITHUB)||(F=!0,U=LOGIN_PROVIDER.GITHUB,H===LOGIN_PROVIDER.AUTH0&&(H=LOGIN_PROVIDER.GITHUB)))),D.map(Z=>{if(Z.provider===LOGIN_PROVIDER.AUTH0&&F)return null;const Q=F&&Z.provider===U?V.find(X=>X.provider===LOGIN_PROVIDER.AUTH0):V.find(X=>X.provider===Z.provider);return Q?{...Z,provider:Z.provider,did:Q.did,pk:Q.pk,userInfo:Q.userInfo,_bind:!0,_rawProvider:Q.provider,_mainProvider:Z.provider===H}:{...Z,provider:Z.provider,_rawProvider:Z.provider,_mainProvider:Z.provider===H}}).filter(Boolean).sort((Z,Q)=>(Z==null?void 0:Z.order)!==void 0&&(Q==null?void 0:Q.order)!==void 0?Z.order-Q.order:(Z==null?void 0:Z.order)!==void 0?-1:1)},[_==null?void 0:_.connectedAccounts,D]),L=useCreation(()=>getConnectedAccounts$1(_).filter(U=>U.provider===LOGIN_PROVIDER.PASSKEY&&U.did!==(_==null?void 0:_.did)).map(U=>({...U,_bind:!0})),[_]),N=useCreation(()=>getConnectedAccounts$1(_).filter(U=>U.provider===LOGIN_PROVIDER.WALLET&&U.did!==(_==null?void 0:_.did)).map(U=>({...U,_mainProvider:!0})),[_]);return jsxRuntimeExports.jsx(Box,{sx:{gap:1,display:"grid",gridTemplateColumns:"1fr min-content"},children:!B.length&&!L.length&&!N.length?jsxRuntimeExports.jsx(PasskeyActions,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add Passkey",onSuccess:noop$6,onError:noop$6,dense:!0}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[B.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V==null?void 0:V.provider)),L.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V.id)),N.map(V=>jsxRuntimeExports.jsx(ThirdPartyItem,{item:V},V.id)),jsxRuntimeExports.jsx(PasskeyActions,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add Passkey",onSuccess:noop$6,onError:noop$6,dense:!0})]})})}const languages=[{name:"English",code:"en"},{name:"中文",code:"zh"}];function ConfigProfile({user:_,onSave:C}){const{locale:T,changeLocale:I}=useLocaleContext(),M=useMemoizedFn((L,N={})=>translate(translations$2,L,T,"en",N)),D=useReactive({locale:_.locale,loading:!1}),B=useMemoizedFn(async L=>{try{const{value:N}=L.target;D.loading=!0,await client.user.saveProfile({locale:N}),await C("profile"),I(N),D.locale=N}catch(N){Toast$1.error(formatAxiosError(N))}finally{D.loading=!1}});return jsxRuntimeExports.jsxs(Box,{sx:{gap:1,display:"grid",alignItems:"center",gridTemplateColumns:{xs:"1fr",sm:"max-content 1fr"}},children:[jsxRuntimeExports.jsx(Box,{children:M("commonSetting.locale")}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(LinearProgress,{color:"primary",sx:{visibility:D.loading?"visible":"hidden",height:2}}),jsxRuntimeExports.jsx(Select,{value:D.locale,onChange:B,size:"small",sx:{minWidth:300},children:(window.blocklet.languages||languages).map(L=>jsxRuntimeExports.jsx(MenuItem$1,{value:L.code,children:L.name},L.code))})]})]})}function Settings({user:_,settings:C,onSave:T,...I}){const{locale:M}=useLocaleContext(),D=useMemoizedFn((N,V={})=>translate(translations$2,N,M,"en",V)),B=useCreation(()=>((C==null?void 0:C.userCenterTabs)||[]).map(V=>({key:V.value,name:V.label,value:V.protected,isPrivate:V.isPrivate})),[C==null?void 0:C.userCenterTabs]),L=useCreation(()=>[{label:D("commonSetting.title"),value:"common",content:jsxRuntimeExports.jsx(ConfigProfile,{user:_,onSave:T})},{label:D("notificationManagement"),value:"notification",content:jsxRuntimeExports.jsx(Notification,{user:_})},{label:D("thirdPartyLogin.title"),value:"thirdPartyLogin",content:jsxRuntimeExports.jsx(ThirdPartyLogin,{user:_})},{label:D("privacyManagement"),value:"privacy",content:jsxRuntimeExports.jsx(Privacy,{configList:B,onSave:T})},{label:D("sessionManagement"),value:"session",content:jsxRuntimeExports.jsx(UserSessions,{user:_,showUser:!1})}].filter(Boolean),[_,B]);return reactExports.useEffect(()=>{const N=window.location.hash.slice(1);if(N){const V=document.getElementById(N);V==null||V.scrollIntoView({behavior:"smooth"})}},[]),jsxRuntimeExports.jsx(Box,{...I,sx:{...I==null?void 0:I.sx,minWidth:{md:500},maxWidth:"100%"},children:L.map((N,V)=>jsxRuntimeExports.jsxs(Box,{id:N.value,children:[jsxRuntimeExports.jsx(Typography$1,{sx:{color:colors$1.foregroundsFgBase,fontWeight:600},children:N.label}),jsxRuntimeExports.jsx(Box,{mt:2.5,children:N.content}),V<L.length-1?jsxRuntimeExports.jsx(Divider,{sx:{mt:2.5,mb:2.5,borderColor:colors$1.dividerColor}}):null]},N.value))})}const ConfigUserSpaceContext=reactExports.createContext({}),{Provider,Consumer}=ConfigUserSpaceContext;function ConfigUserSpaceProvider({children:_}){const[C]=reactExports.useState(!1),{session:T}=reactExports.useContext(SessionContext),{user:I}=T,[M,D]=reactExports.useState(),B=reactExports.useMemo(()=>{var U;return(U=I==null?void 0:I.didSpace)==null?void 0:U.endpoint},[I==null?void 0:I.didSpace]);reactExports.useEffect(()=>{D(I==null?void 0:I.didSpace)},[I==null?void 0:I.didSpace]);const L=async()=>{D(void 0)},N=U=>{},V=async U=>{D(U),await N(U.endpoint)},F=!!(B&&M);return jsxRuntimeExports.jsx(Provider,{value:{loading:C,spaceGateway:M,session:T,deleteSpaceGateway:L,updateSpaceGateway:V,storageEndpoint:B,settingStorageEndpoint:N,hasStorageEndpoint:F},children:_})}function useConfigUserSpaceContext(){return reactExports.useContext(ConfigUserSpaceContext)}const api=createAxios$2({});function useMobile({key:_}={key:"md"}){const C=useTheme();return useMediaQuery(C.breakpoints.down(_))}const SPACE_CONNECT_ERROR_CODE={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008};function useSpaceInfo({endpoint:_,deps:C=[]}){return useRequest(async()=>{if(!isUrl$2(_))return;const{headers:T}=await api.head(_,{timeout:1e3*30,params:{withExtras:!0}}),[I,M,D,B,L,N,V,F,U]=[T["x-space-name"],T["x-subscription-id"],T["x-listable"]==="true",T["x-readable"]==="true",T["x-writeable"]==="true",T["x-space-version"],T["x-space-owner-did"],T["x-space-is-available"],T["x-error-code"]],H=I?decodeURIComponent(I):"";if(F===void 0||U===void 0){const G=D&&B&&L;return{version:N,name:H,subscriptionId:M,ownerDid:V||"",isAvailable:G,errorCode:G?0:SPACE_CONNECT_ERROR_CODE.UNAUTHORIZED}}return{version:N,name:H,subscriptionId:M,ownerDid:V,isAvailable:F==="true",errorCode:parseInt(U,10)}},{refreshDeps:[_].concat(C),onError(T){console.error(T)}})}const en=flat.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",corsBlocked:`The connection request may fail due to CORS restrictions:
|
|
3201
3201
|
1. Please contact the DID Space administrator to verify the relevant configuration.
|
|
3202
3202
|
2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"Network error",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
|
|
3203
3203
|
If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),zh=flat.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",corsBlocked:`连接请求可能因 CORS 限制而失败:
|
|
3204
3204
|
1. 请联系 DID Space 管理员确认相关配置是否正确。
|
|
3205
3205
|
2. 如果您是管理员,可以点击下方链接,查看详细的配置指南并解决问题。`,networkError:"网络错误",incompatible:`当前连接的 DID Spaces 版本({spaceVersion}) 与组件版本({expectVersion})不兼容。请联系管理员进行调整。
|
|
3206
|
-
如果您是管理员,可以单击下面的链接进行操作。`},gateway:{add:{invalidUrl:"无效的 DID Spaces 网关地址",label:"输入 DID Spaces 的地址",title:"添加 DID Spaces"}},provideNFT:{title:"请为 {appName} 出示 DID Spaces NFT",scan:"使用你的 DID Wallet 扫描下面的二维码为应用 {appName} 出示 DID Spaces NFT",success:"连接成功"},helperText:{fixCorsError:"修复连接 DID Spaces 时的 CORS 错误"}}},auditLog:{backup:{description:"在 {relativeTime} 完成了备份操作"},restore:{description:"在 {relativeTime} 完成了还原操作"},connected:{description:"在 {relativeTime} 完成了连接操作"},disconnected:{description:"在 {relativeTime} 断开了连接"},objectsSync:{description:"{totalCount} 个对象({size})在 {relativeTime} 完成了同步"}}}),translations={zh,en};function useLocale(){const{locale:_}=useLocaleContext();return{t:useMemoizedFn((T,I={})=>translate(translations,T,_,"en",I)),locale:_}}var OpenInNew={},_interopRequireDefault$4=interopRequireDefaultExports;Object.defineProperty(OpenInNew,"__esModule",{value:!0});var default_1$3=OpenInNew.default=void 0,_createSvgIcon$3=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports;default_1$3=OpenInNew.default=(0,_createSvgIcon$3.default)((0,_jsxRuntime$4.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");const version$1="1.0.12",AUTHORIZE={DEFAULT_SCOPE:"list:object read:object write:object"},copyGatewayPageUrl="https://www.arcblock.io/content/docs/did-spaces/how-to-obtain-space-gateway-url",fixCorsErrorPageUrl="https://www.arcblock.io/docs/did-spaces/fixing-cors-errors-when-connecting-to-space";var Yo;const isDebugMode=((Yo=window.blocklet)==null?void 0:Yo.DEBUG_MODE)==="true"||window.localStorage.getItem("debug")==="true";var EN_US=["second","minute","hour","day","week","month","year"];function en_US(_,C){if(C===0)return["just now","right now"];var T=EN_US[Math.floor(C/2)];return _>1&&(T+="s"),[_+" "+T+" ago","in "+_+" "+T]}var ZH_CN=["秒","分钟","小时","天","周","个月","年"];function zh_CN(_,C){if(C===0)return["刚刚","片刻后"];var T=ZH_CN[~~(C/2)];return[_+" "+T+"前",_+" "+T+"后"]}var Locales={},register=function(_,C){Locales[_]=C},getLocale=function(_){return Locales[_]||Locales.en_US},SEC_ARRAY=[60,60,24,7,365/7/12,12];function toDate(_){return _ instanceof Date?_:!isNaN(_)||/^\d+$/.test(_)?new Date(parseInt(_)):(_=(_||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(_))}function formatDiff(_,C){var T=_<0?1:0;_=Math.abs(_);for(var I=_,M=0;_>=SEC_ARRAY[M]&&M<SEC_ARRAY.length;M++)_/=SEC_ARRAY[M];return _=Math.floor(_),M*=2,_>(M===0?9:1)&&(M+=1),C(_,M,I)[T].replace("%s",_.toString())}function diffSec(_,C){var T=new Date;return(+T-+toDate(_))/1e3}var format=function(_,C,T){var I=diffSec(_);return formatDiff(I,getLocale(C))};register("en_US",en_US);register("zh_CN",zh_CN);function classNames(..._){const C=[];return _.forEach(T=>{T&&(typeof T=="string"?C.push(T):Array.isArray(T)?C.push(classNames(...T)):typeof T=="object"&&T!==null&&Object.keys(T).forEach(I=>{T[I]&&C.push(I)}))}),C.join(" ")}function getSpaceEndpointContext(_){const C=_.replace(/\/api\/space\/.+/,""),T=_.replace(/\/$/,"").split("/"),I=T.at(-4),M=T.at(-2);return{baseUrl:C,spaceDid:I,appDid:M}}function getSpaceDidFromEndpoint(_){const{spaceDid:C}=getSpaceEndpointContext(_);return C}function getSpaceUrlFromEndpoint(_){const{baseUrl:C,spaceDid:T}=getSpaceEndpointContext(_);return joinURL(C,"space",T)}function getSpaceNftDisplayUrlFromEndpoint(_){const{baseUrl:C,spaceDid:T}=getSpaceEndpointContext(_);return joinURL(C,`/api/space/nft/display?spaceDid=${T}`)}function getSpaceGatewayUrlFromEndpoint(_){return getSpaceUrlFromEndpoint(_).split("/space/")[0]}function extraDIDSpacesCoreUrl(_){const C=new URL(_);return joinURL(C.origin,C.pathname)}const spaceDidRegex=/\/space\/([^/]+)/;function getSpaceDidFromSpaceUrl(_){var C;return(C=new URL(_).pathname.match(spaceDidRegex))==null?void 0:C[1]}function decryptSpaceGateway(_,C){if(!isEmpty$2(_.spaceGateway))return C?C(_.spaceGateway):_.spaceGateway;const T=C(_.endpoint),I=_.space?C(_.space):{};return{endpoint:T,name:"DID Space",...I}}function isCorsBlockedError(_){return!_.response&&_.message==="Network Error"&&_.code!=="ECONNABORTED"&&new URL(_.config.url).origin!==window.location.origin}function t$1(_,C,T={}){return translate(translations,_,typeof C=="string"?C:"en","en",typeof C=="object"?C:T)}function formatRelativeTime(_,C="en"){let T=C;return C==="zh"&&(T="zh_CN"),C==="en"&&(T="en_US"),format(_,T)}var DIDSpaceStatus=(_=>(_.LOADING="loading",_.CONNECTED="connected",_.DISCONNECTED="disconnected",_.UNAVAILABLE="unavailable",_))(DIDSpaceStatus||{}),_path,_path2,_path3,_g,_defs;function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$4.apply(null,arguments)}var SvgEmptySpaceNft=function _(C){return reactExports.createElement("svg",_extends$4({width:228,height:258,fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},C),reactExports.createElement("g",{filter:"url(#filter0_d_1410_22507)"},_path||(_path=reactExports.createElement("path",{d:"M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z",fill:"#DDDDDD"})),_path2||(_path2=reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.1924 6.22183L8.22182 47.1924C6.15892 49.2553 5 52.0532 5 54.9706V240C5 246.075 9.92487 251 16 251H212C218.075 251 223 246.075 223 240V14C223 7.92486 218.075 3 212 3H56.9706C54.0532 3 51.2553 4.15893 49.1924 6.22183ZM48.4853 5.51472C50.7357 3.26428 53.788 2 56.9706 2H212C218.627 2 224 7.37258 224 14V240C224 246.627 218.627 252 212 252H16C9.37258 252 4 246.627 4 240V54.9706C4 51.788 5.26428 48.7357 7.51472 46.4853L48.4853 5.51472Z",fill:"black",fillOpacity:.08})),reactExports.createElement("mask",{id:"mask0_1410_22507",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:4,y:2,width:220,height:250},_path3||(_path3=reactExports.createElement("path",{d:"M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z",fill:"#D9D9D9"}))),_g||(_g=reactExports.createElement("g",{mask:"url(#mask0_1410_22507)"},reactExports.createElement("rect",{opacity:.5,x:4,y:2,width:220,height:128,fill:"url(#pattern0)"}),reactExports.createElement("rect",{opacity:.1,x:4,y:130,width:220,height:122,fill:"url(#paint0_linear_1410_22507)"}),reactExports.createElement("path",{d:"M33.0455 169H29.2784V157.364H33.1648C34.3049 157.364 35.2841 157.597 36.1023 158.062C36.9205 158.525 37.5473 159.189 37.983 160.057C38.4223 160.92 38.642 161.956 38.642 163.165C38.642 164.377 38.4205 165.419 37.9773 166.29C37.5379 167.161 36.9015 167.831 36.0682 168.301C35.2348 168.767 34.2273 169 33.0455 169ZM31.0341 167.466H32.9489C33.8352 167.466 34.572 167.299 35.1591 166.966C35.7462 166.629 36.1856 166.142 36.4773 165.506C36.7689 164.866 36.9148 164.085 36.9148 163.165C36.9148 162.252 36.7689 161.477 36.4773 160.841C36.1894 160.205 35.7595 159.722 35.1875 159.392C34.6155 159.062 33.9053 158.898 33.0568 158.898H31.0341V167.466ZM42.581 157.364V169H40.8253V157.364H42.581ZM48.9048 169H45.1378V157.364H49.0241C50.1643 157.364 51.1435 157.597 51.9616 158.062C52.7798 158.525 53.4067 159.189 53.8423 160.057C54.2817 160.92 54.5014 161.956 54.5014 163.165C54.5014 164.377 54.2798 165.419 53.8366 166.29C53.3973 167.161 52.7609 167.831 51.9276 168.301C51.0942 168.767 50.0866 169 48.9048 169ZM46.8935 167.466H48.8082C49.6946 167.466 50.4313 167.299 51.0185 166.966C51.6056 166.629 52.045 166.142 52.3366 165.506C52.6283 164.866 52.7741 164.085 52.7741 163.165C52.7741 162.252 52.6283 161.477 52.3366 160.841C52.0488 160.205 51.6188 159.722 51.0469 159.392C50.4749 159.062 49.7647 158.898 48.9162 158.898H46.8935V167.466ZM67.2656 160.42C67.205 159.883 66.955 159.466 66.5156 159.17C66.0762 158.871 65.5232 158.722 64.8565 158.722C64.3793 158.722 63.9664 158.797 63.6179 158.949C63.2694 159.097 62.9986 159.301 62.8054 159.562C62.616 159.82 62.5213 160.114 62.5213 160.443C62.5213 160.72 62.5857 160.958 62.7145 161.159C62.8471 161.36 63.0194 161.528 63.2315 161.665C63.4474 161.797 63.6785 161.909 63.9247 162C64.1709 162.087 64.4077 162.159 64.6349 162.216L65.7713 162.511C66.1425 162.602 66.5232 162.725 66.9134 162.881C67.3035 163.036 67.6652 163.241 67.9986 163.494C68.3319 163.748 68.6009 164.062 68.8054 164.438C69.0137 164.812 69.1179 165.261 69.1179 165.784C69.1179 166.443 68.9474 167.028 68.6065 167.54C68.2694 168.051 67.7789 168.455 67.1349 168.75C66.4948 169.045 65.7202 169.193 64.8111 169.193C63.9399 169.193 63.1861 169.055 62.5497 168.778C61.9134 168.502 61.4152 168.11 61.0554 167.602C60.6955 167.091 60.4967 166.485 60.4588 165.784H62.2202C62.2543 166.205 62.3906 166.555 62.6293 166.835C62.8717 167.112 63.1804 167.318 63.5554 167.455C63.9342 167.587 64.349 167.653 64.7997 167.653C65.2959 167.653 65.7372 167.576 66.1236 167.42C66.5137 167.261 66.8205 167.042 67.044 166.761C67.2675 166.477 67.3793 166.146 67.3793 165.767C67.3793 165.422 67.2808 165.14 67.0838 164.92C66.8906 164.701 66.6274 164.519 66.294 164.375C65.9645 164.231 65.5914 164.104 65.1747 163.994L63.7997 163.619C62.8679 163.366 62.1293 162.992 61.5838 162.5C61.0421 162.008 60.7713 161.356 60.7713 160.545C60.7713 159.875 60.9531 159.29 61.3168 158.79C61.6804 158.29 62.1728 157.902 62.794 157.625C63.4152 157.345 64.116 157.205 64.8963 157.205C65.6842 157.205 66.3793 157.343 66.9815 157.619C67.5876 157.896 68.0649 158.277 68.4134 158.761C68.7618 159.242 68.9437 159.795 68.9588 160.42H67.2656ZM71.0795 172.273V160.273H72.7386V161.688H72.8807C72.9792 161.506 73.1212 161.295 73.3068 161.057C73.4924 160.818 73.75 160.61 74.0795 160.432C74.4091 160.25 74.8447 160.159 75.3864 160.159C76.0909 160.159 76.7197 160.337 77.2727 160.693C77.8258 161.049 78.2595 161.562 78.5739 162.233C78.892 162.903 79.0511 163.71 79.0511 164.653C79.0511 165.597 78.8939 166.405 78.5795 167.08C78.2652 167.75 77.8333 168.267 77.2841 168.631C76.7348 168.991 76.108 169.17 75.4034 169.17C74.8731 169.17 74.4394 169.081 74.1023 168.903C73.7689 168.725 73.5076 168.517 73.3182 168.278C73.1288 168.04 72.983 167.828 72.8807 167.642H72.7784V172.273H71.0795ZM72.7443 164.636C72.7443 165.25 72.8333 165.788 73.0114 166.25C73.1894 166.712 73.447 167.074 73.7841 167.335C74.1212 167.593 74.5341 167.722 75.0227 167.722C75.5303 167.722 75.9545 167.587 76.2955 167.318C76.6364 167.045 76.8939 166.676 77.0682 166.21C77.2462 165.744 77.3352 165.22 77.3352 164.636C77.3352 164.061 77.2481 163.544 77.0739 163.085C76.9034 162.627 76.6458 162.265 76.3011 162C75.9602 161.735 75.5341 161.602 75.0227 161.602C74.5303 161.602 74.1136 161.729 73.7727 161.983C73.4356 162.237 73.1799 162.591 73.0057 163.045C72.8314 163.5 72.7443 164.03 72.7443 164.636ZM83.4943 169.193C82.9413 169.193 82.4413 169.091 81.9943 168.886C81.5473 168.678 81.1932 168.377 80.9318 167.983C80.6742 167.589 80.5455 167.106 80.5455 166.534C80.5455 166.042 80.6402 165.636 80.8295 165.318C81.0189 165 81.2746 164.748 81.5966 164.562C81.9186 164.377 82.2784 164.237 82.6761 164.142C83.0739 164.047 83.4792 163.975 83.892 163.926C84.4148 163.866 84.839 163.816 85.1648 163.778C85.4905 163.737 85.7273 163.67 85.875 163.58C86.0227 163.489 86.0966 163.341 86.0966 163.136V163.097C86.0966 162.6 85.9564 162.216 85.6761 161.943C85.3996 161.67 84.9867 161.534 84.4375 161.534C83.8655 161.534 83.4148 161.661 83.0852 161.915C82.7595 162.165 82.5341 162.443 82.4091 162.75L80.8125 162.386C81.0019 161.856 81.2784 161.428 81.642 161.102C82.0095 160.773 82.4318 160.534 82.9091 160.386C83.3864 160.235 83.8883 160.159 84.4148 160.159C84.7633 160.159 85.1326 160.201 85.5227 160.284C85.9167 160.364 86.2841 160.511 86.625 160.727C86.9697 160.943 87.2519 161.252 87.4716 161.653C87.6913 162.051 87.8011 162.568 87.8011 163.205V169H86.142V167.807H86.0739C85.964 168.027 85.7992 168.242 85.5795 168.455C85.3598 168.667 85.0777 168.843 84.733 168.983C84.3883 169.123 83.9754 169.193 83.4943 169.193ZM83.8636 167.83C84.3333 167.83 84.7348 167.737 85.0682 167.551C85.4053 167.366 85.661 167.123 85.8352 166.824C86.0133 166.521 86.1023 166.197 86.1023 165.852V164.727C86.0417 164.788 85.9242 164.845 85.75 164.898C85.5795 164.947 85.3845 164.991 85.1648 165.028C84.9451 165.062 84.7311 165.095 84.5227 165.125C84.3144 165.152 84.1402 165.174 84 165.193C83.6705 165.235 83.3693 165.305 83.0966 165.403C82.8277 165.502 82.6117 165.644 82.4489 165.83C82.2898 166.011 82.2102 166.254 82.2102 166.557C82.2102 166.977 82.3655 167.295 82.6761 167.511C82.9867 167.723 83.3826 167.83 83.8636 167.83ZM93.7401 169.176C92.8954 169.176 92.1681 168.985 91.5582 168.602C90.9522 168.216 90.4863 167.684 90.1605 167.006C89.8348 166.328 89.6719 165.551 89.6719 164.676C89.6719 163.79 89.8385 163.008 90.1719 162.33C90.5052 161.648 90.9749 161.116 91.581 160.733C92.187 160.35 92.901 160.159 93.723 160.159C94.3859 160.159 94.9768 160.282 95.4957 160.528C96.0147 160.771 96.4332 161.112 96.7514 161.551C97.0734 161.991 97.2647 162.504 97.3253 163.091H95.6719C95.581 162.682 95.3726 162.33 95.0469 162.034C94.7249 161.739 94.2931 161.591 93.7514 161.591C93.2779 161.591 92.8632 161.716 92.5071 161.966C92.1548 162.212 91.8802 162.564 91.6832 163.023C91.4863 163.477 91.3878 164.015 91.3878 164.636C91.3878 165.273 91.4844 165.822 91.6776 166.284C91.8707 166.746 92.1435 167.104 92.4957 167.358C92.8518 167.612 93.2704 167.739 93.7514 167.739C94.0734 167.739 94.3651 167.68 94.6264 167.562C94.8916 167.441 95.1132 167.269 95.2912 167.045C95.473 166.822 95.5999 166.553 95.6719 166.239H97.3253C97.2647 166.803 97.081 167.307 96.7741 167.75C96.4673 168.193 96.0563 168.542 95.5412 168.795C95.0298 169.049 94.4295 169.176 93.7401 169.176ZM102.903 169.176C102.044 169.176 101.303 168.992 100.682 168.625C100.064 168.254 99.5871 167.733 99.25 167.062C98.9167 166.388 98.75 165.598 98.75 164.693C98.75 163.799 98.9167 163.011 99.25 162.33C99.5871 161.648 100.057 161.116 100.659 160.733C101.265 160.35 101.973 160.159 102.784 160.159C103.277 160.159 103.754 160.241 104.216 160.403C104.678 160.566 105.093 160.822 105.46 161.17C105.828 161.519 106.117 161.972 106.33 162.528C106.542 163.081 106.648 163.754 106.648 164.545V165.148H99.7102V163.875H104.983C104.983 163.428 104.892 163.032 104.71 162.688C104.528 162.339 104.273 162.064 103.943 161.864C103.617 161.663 103.235 161.562 102.795 161.562C102.318 161.562 101.902 161.68 101.545 161.915C101.193 162.146 100.92 162.449 100.727 162.824C100.538 163.195 100.443 163.598 100.443 164.034V165.028C100.443 165.612 100.545 166.108 100.75 166.517C100.958 166.926 101.248 167.239 101.619 167.455C101.991 167.667 102.424 167.773 102.92 167.773C103.242 167.773 103.536 167.727 103.801 167.636C104.066 167.542 104.295 167.402 104.489 167.216C104.682 167.03 104.83 166.801 104.932 166.528L106.54 166.818C106.411 167.292 106.18 167.706 105.847 168.062C105.517 168.415 105.102 168.689 104.602 168.886C104.106 169.08 103.54 169.176 102.903 169.176Z",fill:"white"}),reactExports.createElement("path",{d:"M117.604 47.2627L121.523 45H135.79V86.8617H121.523L106.188 78.0079L106.188 53.8537L108.006 52.8045L111.206 54.652L109.388 55.7013V76.1604L122.381 83.6617H132.59V48.2H122.381L120.804 49.1102L117.604 47.2627Z",fill:"url(#paint1_linear_1410_22507)"}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.1604V55.7013L106.409 48.2H96.2V83.6617H106.409L107.991 82.7486L111.191 84.5961L107.267 86.8617H93V45H107.267L122.602 53.8537V78.0079L120.789 79.0543L117.589 77.2068L119.402 76.1604Z",fill:"url(#paint2_linear_1410_22507)"}),reactExports.createElement("g",{clipPath:"url(#clip0_1410_22507)"},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.9284 216.089L51.9616 218.941H49.4587L50.487 216.099C50.5226 216 50.5582 215.888 50.5938 215.761C50.6326 215.635 50.6697 215.498 50.7053 215.352C50.7797 215.649 50.8541 215.894 50.9284 216.089ZM53.2082 221.68H54.0037L51.2292 214.328H50.1863L47.4118 221.68H48.2073C48.2946 221.68 48.369 221.654 48.4304 221.603C48.4919 221.549 48.5339 221.489 48.5565 221.424L49.1725 219.719H52.2429L52.8589 221.424C52.8848 221.499 52.9269 221.561 52.9851 221.608C53.0433 221.656 53.1176 221.68 53.2082 221.68ZM58.031 220.717C57.8466 220.782 57.6235 220.815 57.3616 220.815H55.9064V218.362H57.3616C57.8628 218.362 58.2331 218.468 58.4724 218.68C58.7117 218.888 58.8313 219.175 58.8313 219.54C58.8313 219.724 58.8038 219.895 58.7488 220.052C58.6939 220.205 58.6066 220.339 58.4869 220.451C58.3705 220.564 58.2185 220.653 58.031 220.717ZM55.9064 217.589V215.183H57.1433C57.6413 215.183 58.0083 215.278 58.2444 215.469C58.4804 215.661 58.5985 215.966 58.5985 216.386C58.5985 216.755 58.474 217.048 58.225 217.267C57.9792 217.482 57.6025 217.589 57.0948 217.589H55.9064ZM58.2638 214.461C57.9534 214.372 57.5799 214.328 57.1433 214.328H54.8733V221.68H57.381C57.7723 221.68 58.1215 221.629 58.4287 221.526C58.7359 221.424 58.9946 221.279 59.2048 221.091C59.415 220.903 59.5751 220.682 59.685 220.426C59.7949 220.166 59.8499 219.879 59.8499 219.565C59.8499 218.661 59.3438 218.103 58.3317 217.891C58.5516 217.816 58.7424 217.722 58.9041 217.61C59.0657 217.497 59.1999 217.371 59.3067 217.231C59.4134 217.087 59.4926 216.934 59.5443 216.77C59.5961 216.606 59.6219 216.435 59.6219 216.258C59.6219 215.958 59.5734 215.69 59.4764 215.454C59.3826 215.215 59.2355 215.012 59.035 214.845C58.8345 214.678 58.5775 214.55 58.2638 214.461ZM65.7988 215.239H63.5869V221.68H62.5586V215.239H60.3371V214.328H65.7988V215.239ZM68.2377 215.803H67.1074V216.996H68.2377V215.803ZM67.1074 218.786H68.2377V219.979H67.1074V218.786Z",fill:"white",fillOpacity:.8}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.2472 221.771V214H32.141C33.1319 214.072 33.9063 214.944 33.9063 215.998V219.768C33.9063 220.874 33.0569 221.771 32.0091 221.771H28.2472ZM36.3546 214H35.3436V221.783H36.3546V214ZM29.2582 220.704V215.062H32.0091C32.4986 215.062 32.8953 215.481 32.8953 215.998V219.768C32.8953 220.285 32.4986 220.704 32.0091 220.704H29.2582ZM37.7748 214V221.771H41.5367C42.5845 221.771 43.4339 220.874 43.4339 219.768V215.998C43.4339 214.944 42.6595 214.072 41.6686 214H37.7748ZM44.7205 215.803H45.8508V216.996H44.7205V215.803ZM45.8508 218.786H44.7205V219.979H45.8508V218.786ZM38.7858 215.062V220.704H41.5367C42.0262 220.704 42.4229 220.285 42.4229 219.768V215.998C42.4229 215.481 42.0262 215.062 41.5367 215.062H38.7858Z",fill:"white"})),reactExports.createElement("circle",{cx:191.32,cy:218,r:10,fill:"url(#paint3_radial_1410_22507)"}),reactExports.createElement("path",{d:"M192.064 213.333L193.04 212.769H196.594V223.196H193.308C193.133 223.196 192.96 223.15 192.808 223.062L189.22 220.991L189.22 214.975L189.673 214.713L190.47 215.173L190.017 215.435V220.531L193.254 222.399H195.797V213.566H193.254L192.861 213.793L192.064 213.333Z",fill:"white"}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531V215.435L189.275 213.566H186.732V222.399H189.275L189.669 222.172L190.466 222.632L189.489 223.196H185.935V212.769H189.489L193.309 214.975V220.991L192.857 221.252L192.06 220.791L192.512 220.531Z",fill:"white"})))),_defs||(_defs=reactExports.createElement("defs",null,reactExports.createElement("filter",{id:"filter0_d_1410_22507",x:0,y:0,width:228,height:258,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},reactExports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),reactExports.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),reactExports.createElement("feOffset",{dy:2}),reactExports.createElement("feGaussianBlur",{stdDeviation:2}),reactExports.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),reactExports.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),reactExports.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),reactExports.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})),reactExports.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},reactExports.createElement("use",{xlinkHref:"#image0_1410_22507",transform:"scale(0.00454545 0.0078125)"})),reactExports.createElement("linearGradient",{id:"paint0_linear_1410_22507",x1:114,y1:130,x2:114,y2:252,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"#101010"}),reactExports.createElement("stop",{offset:1,stopColor:"#272727"})),reactExports.createElement("linearGradient",{id:"paint1_linear_1410_22507",x1:120.989,y1:45,x2:120.989,y2:86.8617,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"white",stopOpacity:.4}),reactExports.createElement("stop",{offset:1,stopColor:"white"})),reactExports.createElement("linearGradient",{id:"paint2_linear_1410_22507",x1:107.801,y1:45,x2:107.801,y2:86.8617,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"white"}),reactExports.createElement("stop",{offset:1,stopColor:"white",stopOpacity:.4})),reactExports.createElement("radialGradient",{id:"paint3_radial_1410_22507",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(183.166 221) rotate(-27.2864) scale(19.1285 15.2161)"},reactExports.createElement("stop",{stopColor:"#016BED"}),reactExports.createElement("stop",{offset:.69919,stopColor:"#4498FB"}),reactExports.createElement("stop",{offset:1,stopColor:"#9DFFE8"})),reactExports.createElement("clipPath",{id:"clip0_1410_22507"},reactExports.createElement("rect",{width:40.32,height:8,fill:"white",transform:"translate(28 214)"})),reactExports.createElement("image",{id:"image0_1410_22507",width:220,height:128,xlinkHref:"data:image/png;base64,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"}))))},_circle$2,_circle2$2;function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$3.apply(null,arguments)}var SvgSpaceConnected=function _(C){return reactExports.createElement("svg",_extends$3({width:10,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle$2||(_circle$2=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#d1fae5"})),_circle2$2||(_circle2$2=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#25C99B"})))},_circle$1,_circle2$1;function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$2.apply(null,arguments)}var SvgSpaceDisconnect=function _(C){return reactExports.createElement("svg",_extends$2({width:10,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle$1||(_circle$1=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#f3f4f6"})),_circle2$1||(_circle2$1=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#6b7280"})))},_circle,_circle2;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$1.apply(null,arguments)}var SvgSpaceConnectError=function _(C){return reactExports.createElement("svg",_extends$1({width:10,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle||(_circle=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#ffe4e6"})),_circle2||(_circle2=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#e11d48"})))};SvgEmptySpaceNft.displayName="EmptySpacesNFTIcon";SvgSpaceConnected.displayName="SpacesConnectedIcon";SvgSpaceDisconnect.displayName="SpaceDisconnectedIcon";SvgSpaceConnectError.displayName="SpaceConnectErrorIcon";var CloseOutlined={},_interopRequireDefault$3=interopRequireDefaultExports;Object.defineProperty(CloseOutlined,"__esModule",{value:!0});var default_1$2=CloseOutlined.default=void 0,_createSvgIcon$2=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports;default_1$2=CloseOutlined.default=(0,_createSvgIcon$2.default)((0,_jsxRuntime$3.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined");function DIDSpaceNFTPreview({src:_,width:C="58px",height:T="58px"}){const[I,M]=reactExports.useState(!1),D=()=>M(!0),B=()=>M(!1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{position:"relative"},onClick:D,children:[jsxRuntimeExports.jsx("object",{data:_,width:C,height:T,children:jsxRuntimeExports.jsx(SvgEmptySpaceNft,{viewBox:"0 0 228 258",style:{cursor:"pointer",width:C,height:T}})}),jsxRuntimeExports.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:"1",cursor:"pointer"},onClick:D})]}),jsxRuntimeExports.jsx(Dialog$1,{open:I,onClose:B,"aria-labelledby":"preview-space-nft-display","aria-describedby":"preview space nft display",fullWidth:!0,maxWidth:"md",children:jsxRuntimeExports.jsxs(DialogContent,{style:{padding:"8px 8px",backgroundColor:"rgba(0,0,0,0.8)"},children:[jsxRuntimeExports.jsx(IconButton,{color:"inherit",onClick:B,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:jsxRuntimeExports.jsx(default_1$2,{})}),"(",jsxRuntimeExports.jsx("object",{data:_,style:{width:"100%",height:"75vh",objectFit:"contain"},children:jsxRuntimeExports.jsx(SvgEmptySpaceNft,{viewBox:"0 0 228 258",style:{width:"100%",height:"75vh"}})}),")"]})})]})}var TreeModelType;(function(_){_[_.FOLDER=0]="FOLDER",_[_.FILE=1]="FILE"})(TreeModelType||(TreeModelType={}));var util;(function(_){_.assertEqual=M=>M;function C(M){}_.assertIs=C;function T(M){throw new Error}_.assertNever=T,_.arrayToEnum=M=>{const D={};for(const B of M)D[B]=B;return D},_.getValidEnumValues=M=>{const D=_.objectKeys(M).filter(L=>typeof M[M[L]]!="number"),B={};for(const L of D)B[L]=M[L];return _.objectValues(B)},_.objectValues=M=>_.objectKeys(M).map(function(D){return M[D]}),_.objectKeys=typeof Object.keys=="function"?M=>Object.keys(M):M=>{const D=[];for(const B in M)Object.prototype.hasOwnProperty.call(M,B)&&D.push(B);return D},_.find=(M,D)=>{for(const B of M)if(D(B))return B},_.isInteger=typeof Number.isInteger=="function"?M=>Number.isInteger(M):M=>typeof M=="number"&&isFinite(M)&&Math.floor(M)===M;function I(M,D=" | "){return M.map(B=>typeof B=="string"?`'${B}'`:B).join(D)}_.joinValues=I,_.jsonStringifyReplacer=(M,D)=>typeof D=="bigint"?D.toString():D})(util||(util={}));var objectUtil;(function(_){_.mergeShapes=(C,T)=>({...C,...T})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=_=>{switch(typeof _){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(_)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(_)?ZodParsedType.array:_===null?ZodParsedType.null:_.then&&typeof _.then=="function"&&_.catch&&typeof _.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&_ instanceof Map?ZodParsedType.map:typeof Set<"u"&&_ instanceof Set?ZodParsedType.set:typeof Date<"u"&&_ instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=_=>JSON.stringify(_,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(C){super(),this.issues=[],this.addIssue=I=>{this.issues=[...this.issues,I]},this.addIssues=(I=[])=>{this.issues=[...this.issues,...I]};const T=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,T):this.__proto__=T,this.name="ZodError",this.issues=C}format(C){const T=C||function(D){return D.message},I={_errors:[]},M=D=>{for(const B of D.issues)if(B.code==="invalid_union")B.unionErrors.map(M);else if(B.code==="invalid_return_type")M(B.returnTypeError);else if(B.code==="invalid_arguments")M(B.argumentsError);else if(B.path.length===0)I._errors.push(T(B));else{let L=I,N=0;for(;N<B.path.length;){const V=B.path[N];N===B.path.length-1?(L[V]=L[V]||{_errors:[]},L[V]._errors.push(T(B))):L[V]=L[V]||{_errors:[]},L=L[V],N++}}};return M(this),I}static assert(C){if(!(C instanceof ZodError))throw new Error(`Not a ZodError: ${C}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(C=T=>T.message){const T={},I=[];for(const M of this.issues)M.path.length>0?(T[M.path[0]]=T[M.path[0]]||[],T[M.path[0]].push(C(M))):I.push(C(M));return{formErrors:I,fieldErrors:T}}get formErrors(){return this.flatten()}}ZodError.create=_=>new ZodError(_);const errorMap=(_,C)=>{let T;switch(_.code){case ZodIssueCode.invalid_type:_.received===ZodParsedType.undefined?T="Required":T=`Expected ${_.expected}, received ${_.received}`;break;case ZodIssueCode.invalid_literal:T=`Invalid literal value, expected ${JSON.stringify(_.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:T=`Unrecognized key(s) in object: ${util.joinValues(_.keys,", ")}`;break;case ZodIssueCode.invalid_union:T="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:T=`Invalid discriminator value. Expected ${util.joinValues(_.options)}`;break;case ZodIssueCode.invalid_enum_value:T=`Invalid enum value. Expected ${util.joinValues(_.options)}, received '${_.received}'`;break;case ZodIssueCode.invalid_arguments:T="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:T="Invalid function return type";break;case ZodIssueCode.invalid_date:T="Invalid date";break;case ZodIssueCode.invalid_string:typeof _.validation=="object"?"includes"in _.validation?(T=`Invalid input: must include "${_.validation.includes}"`,typeof _.validation.position=="number"&&(T=`${T} at one or more positions greater than or equal to ${_.validation.position}`)):"startsWith"in _.validation?T=`Invalid input: must start with "${_.validation.startsWith}"`:"endsWith"in _.validation?T=`Invalid input: must end with "${_.validation.endsWith}"`:util.assertNever(_.validation):_.validation!=="regex"?T=`Invalid ${_.validation}`:T="Invalid";break;case ZodIssueCode.too_small:_.type==="array"?T=`Array must contain ${_.exact?"exactly":_.inclusive?"at least":"more than"} ${_.minimum} element(s)`:_.type==="string"?T=`String must contain ${_.exact?"exactly":_.inclusive?"at least":"over"} ${_.minimum} character(s)`:_.type==="number"?T=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`:_.type==="date"?T=`Date must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_.minimum))}`:T="Invalid input";break;case ZodIssueCode.too_big:_.type==="array"?T=`Array must contain ${_.exact?"exactly":_.inclusive?"at most":"less than"} ${_.maximum} element(s)`:_.type==="string"?T=`String must contain ${_.exact?"exactly":_.inclusive?"at most":"under"} ${_.maximum} character(s)`:_.type==="number"?T=`Number must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`:_.type==="bigint"?T=`BigInt must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`:_.type==="date"?T=`Date must be ${_.exact?"exactly":_.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_.maximum))}`:T="Invalid input";break;case ZodIssueCode.custom:T="Invalid input";break;case ZodIssueCode.invalid_intersection_types:T="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:T=`Number must be a multiple of ${_.multipleOf}`;break;case ZodIssueCode.not_finite:T="Number must be finite";break;default:T=C.defaultError,util.assertNever(_)}return{message:T}};let overrideErrorMap=errorMap;function setErrorMap(_){overrideErrorMap=_}function getErrorMap(){return overrideErrorMap}const makeIssue=_=>{const{data:C,path:T,errorMaps:I,issueData:M}=_,D=[...T,...M.path||[]],B={...M,path:D};if(M.message!==void 0)return{...M,path:D,message:M.message};let L="";const N=I.filter(V=>!!V).slice().reverse();for(const V of N)L=V(B,{data:C,defaultError:L}).message;return{...M,path:D,message:L}},EMPTY_PATH=[];function addIssueToContext(_,C){const T=getErrorMap(),I=makeIssue({issueData:C,data:_.data,path:_.path,errorMaps:[_.common.contextualErrorMap,_.schemaErrorMap,T,T===errorMap?void 0:errorMap].filter(M=>!!M)});_.common.issues.push(I)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(C,T){const I=[];for(const M of T){if(M.status==="aborted")return INVALID;M.status==="dirty"&&C.dirty(),I.push(M.value)}return{status:C.value,value:I}}static async mergeObjectAsync(C,T){const I=[];for(const M of T){const D=await M.key,B=await M.value;I.push({key:D,value:B})}return ParseStatus.mergeObjectSync(C,I)}static mergeObjectSync(C,T){const I={};for(const M of T){const{key:D,value:B}=M;if(D.status==="aborted"||B.status==="aborted")return INVALID;D.status==="dirty"&&C.dirty(),B.status==="dirty"&&C.dirty(),D.value!=="__proto__"&&(typeof B.value<"u"||M.alwaysSet)&&(I[D.value]=B.value)}return{status:C.value,value:I}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=_=>({status:"dirty",value:_}),OK=_=>({status:"valid",value:_}),isAborted=_=>_.status==="aborted",isDirty=_=>_.status==="dirty",isValid=_=>_.status==="valid",isAsync=_=>typeof Promise<"u"&&_ instanceof Promise;function __classPrivateFieldGet(_,C,T,I){if(typeof C=="function"?_!==C||!I:!C.has(_))throw new TypeError("Cannot read private member from an object whose class did not declare it");return C.get(_)}function __classPrivateFieldSet(_,C,T,I,M){if(typeof C=="function"?_!==C||!M:!C.has(_))throw new TypeError("Cannot write private member to an object whose class did not declare it");return C.set(_,T),T}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(_){_.errToObj=C=>typeof C=="string"?{message:C}:C||{},_.toString=C=>typeof C=="string"?C:C==null?void 0:C.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(C,T,I,M){this._cachedPath=[],this.parent=C,this.data=T,this._path=I,this._key=M}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(_,C)=>{if(isValid(C))return{success:!0,data:C.value};if(!_.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const T=new ZodError(_.common.issues);return this._error=T,this._error}}};function processCreateParams(_){if(!_)return{};const{errorMap:C,invalid_type_error:T,required_error:I,description:M}=_;if(C&&(T||I))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return C?{errorMap:C,description:M}:{errorMap:(B,L)=>{var N,V;const{message:F}=_;return B.code==="invalid_enum_value"?{message:F??L.defaultError}:typeof L.data>"u"?{message:(N=F??I)!==null&&N!==void 0?N:L.defaultError}:B.code!=="invalid_type"?{message:L.defaultError}:{message:(V=F??T)!==null&&V!==void 0?V:L.defaultError}},description:M}}class ZodType{get description(){return this._def.description}_getType(C){return getParsedType(C.data)}_getOrReturnCtx(C,T){return T||{common:C.parent.common,data:C.data,parsedType:getParsedType(C.data),schemaErrorMap:this._def.errorMap,path:C.path,parent:C.parent}}_processInputParams(C){return{status:new ParseStatus,ctx:{common:C.parent.common,data:C.data,parsedType:getParsedType(C.data),schemaErrorMap:this._def.errorMap,path:C.path,parent:C.parent}}}_parseSync(C){const T=this._parse(C);if(isAsync(T))throw new Error("Synchronous parse encountered promise.");return T}_parseAsync(C){const T=this._parse(C);return Promise.resolve(T)}parse(C,T){const I=this.safeParse(C,T);if(I.success)return I.data;throw I.error}safeParse(C,T){var I;const M={common:{issues:[],async:(I=T==null?void 0:T.async)!==null&&I!==void 0?I:!1,contextualErrorMap:T==null?void 0:T.errorMap},path:(T==null?void 0:T.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)},D=this._parseSync({data:C,path:M.path,parent:M});return handleResult(M,D)}"~validate"(C){var T,I;const M={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)};if(!this["~standard"].async)try{const D=this._parseSync({data:C,path:[],parent:M});return isValid(D)?{value:D.value}:{issues:M.common.issues}}catch(D){!((I=(T=D==null?void 0:D.message)===null||T===void 0?void 0:T.toLowerCase())===null||I===void 0)&&I.includes("encountered")&&(this["~standard"].async=!0),M.common={issues:[],async:!0}}return this._parseAsync({data:C,path:[],parent:M}).then(D=>isValid(D)?{value:D.value}:{issues:M.common.issues})}async parseAsync(C,T){const I=await this.safeParseAsync(C,T);if(I.success)return I.data;throw I.error}async safeParseAsync(C,T){const I={common:{issues:[],contextualErrorMap:T==null?void 0:T.errorMap,async:!0},path:(T==null?void 0:T.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)},M=this._parse({data:C,path:I.path,parent:I}),D=await(isAsync(M)?M:Promise.resolve(M));return handleResult(I,D)}refine(C,T){const I=M=>typeof T=="string"||typeof T>"u"?{message:T}:typeof T=="function"?T(M):T;return this._refinement((M,D)=>{const B=C(M),L=()=>D.addIssue({code:ZodIssueCode.custom,...I(M)});return typeof Promise<"u"&&B instanceof Promise?B.then(N=>N?!0:(L(),!1)):B?!0:(L(),!1)})}refinement(C,T){return this._refinement((I,M)=>C(I)?!0:(M.addIssue(typeof T=="function"?T(I,M):T),!1))}_refinement(C){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:C}})}superRefine(C){return this._refinement(C)}constructor(C){this.spa=this.safeParseAsync,this._def=C,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:T=>this["~validate"](T)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(C){return ZodUnion.create([this,C],this._def)}and(C){return ZodIntersection.create(this,C,this._def)}transform(C){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:C}})}default(C){const T=typeof C=="function"?C:()=>C;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:T,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(C){const T=typeof C=="function"?C:()=>C;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:T,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(C){const T=this.constructor;return new T({...this._def,description:C})}pipe(C){return ZodPipeline.create(this,C)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(_){let C="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return _.precision?C=`${C}\\.\\d{${_.precision}}`:_.precision==null&&(C=`${C}(\\.\\d+)?`),C}function timeRegex(_){return new RegExp(`^${timeRegexSource(_)}$`)}function datetimeRegex(_){let C=`${dateRegexSource}T${timeRegexSource(_)}`;const T=[];return T.push(_.local?"Z?":"Z"),_.offset&&T.push("([+-]\\d{2}:?\\d{2})"),C=`${C}(${T.join("|")})`,new RegExp(`^${C}$`)}function isValidIP(_,C){return!!((C==="v4"||!C)&&ipv4Regex.test(_)||(C==="v6"||!C)&&ipv6Regex.test(_))}function isValidJWT(_,C){if(!jwtRegex.test(_))return!1;try{const[T]=_.split("."),I=T.replace(/-/g,"+").replace(/_/g,"/").padEnd(T.length+(4-T.length%4)%4,"="),M=JSON.parse(atob(I));return!(typeof M!="object"||M===null||!M.typ||!M.alg||C&&M.alg!==C)}catch{return!1}}function isValidCidr(_,C){return!!((C==="v4"||!C)&&ipv4CidrRegex.test(_)||(C==="v6"||!C)&&ipv6CidrRegex.test(_))}class ZodString extends ZodType{_parse(C){if(this._def.coerce&&(C.data=String(C.data)),this._getType(C)!==ZodParsedType.string){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:D.parsedType}),INVALID}const I=new ParseStatus;let M;for(const D of this._def.checks)if(D.kind==="min")C.data.length<D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_small,minimum:D.value,type:"string",inclusive:!0,exact:!1,message:D.message}),I.dirty());else if(D.kind==="max")C.data.length>D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_big,maximum:D.value,type:"string",inclusive:!0,exact:!1,message:D.message}),I.dirty());else if(D.kind==="length"){const B=C.data.length>D.value,L=C.data.length<D.value;(B||L)&&(M=this._getOrReturnCtx(C,M),B?addIssueToContext(M,{code:ZodIssueCode.too_big,maximum:D.value,type:"string",inclusive:!0,exact:!0,message:D.message}):L&&addIssueToContext(M,{code:ZodIssueCode.too_small,minimum:D.value,type:"string",inclusive:!0,exact:!0,message:D.message}),I.dirty())}else if(D.kind==="email")emailRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"email",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"emoji",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="uuid")uuidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"uuid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="nanoid")nanoidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="cuid")cuidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cuid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="cuid2")cuid2Regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="ulid")ulidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"ulid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="url")try{new URL(C.data)}catch{M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"url",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()}else D.kind==="regex"?(D.regex.lastIndex=0,D.regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"regex",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty())):D.kind==="trim"?C.data=C.data.trim():D.kind==="includes"?C.data.includes(D.value,D.position)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{includes:D.value,position:D.position},message:D.message}),I.dirty()):D.kind==="toLowerCase"?C.data=C.data.toLowerCase():D.kind==="toUpperCase"?C.data=C.data.toUpperCase():D.kind==="startsWith"?C.data.startsWith(D.value)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{startsWith:D.value},message:D.message}),I.dirty()):D.kind==="endsWith"?C.data.endsWith(D.value)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{endsWith:D.value},message:D.message}),I.dirty()):D.kind==="datetime"?datetimeRegex(D).test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"datetime",message:D.message}),I.dirty()):D.kind==="date"?dateRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"date",message:D.message}),I.dirty()):D.kind==="time"?timeRegex(D).test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"time",message:D.message}),I.dirty()):D.kind==="duration"?durationRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"duration",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="ip"?isValidIP(C.data,D.version)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"ip",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="jwt"?isValidJWT(C.data,D.alg)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"jwt",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="cidr"?isValidCidr(C.data,D.version)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cidr",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="base64"?base64Regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"base64",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="base64url"?base64urlRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"base64url",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):util.assertNever(D);return{status:I.value,value:C.data}}_regex(C,T,I){return this.refinement(M=>C.test(M),{validation:T,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(I)})}_addCheck(C){return new ZodString({...this._def,checks:[...this._def.checks,C]})}email(C){return this._addCheck({kind:"email",...errorUtil.errToObj(C)})}url(C){return this._addCheck({kind:"url",...errorUtil.errToObj(C)})}emoji(C){return this._addCheck({kind:"emoji",...errorUtil.errToObj(C)})}uuid(C){return this._addCheck({kind:"uuid",...errorUtil.errToObj(C)})}nanoid(C){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(C)})}cuid(C){return this._addCheck({kind:"cuid",...errorUtil.errToObj(C)})}cuid2(C){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(C)})}ulid(C){return this._addCheck({kind:"ulid",...errorUtil.errToObj(C)})}base64(C){return this._addCheck({kind:"base64",...errorUtil.errToObj(C)})}base64url(C){return this._addCheck({kind:"base64url",...errorUtil.errToObj(C)})}jwt(C){return this._addCheck({kind:"jwt",...errorUtil.errToObj(C)})}ip(C){return this._addCheck({kind:"ip",...errorUtil.errToObj(C)})}cidr(C){return this._addCheck({kind:"cidr",...errorUtil.errToObj(C)})}datetime(C){var T,I;return typeof C=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:C}):this._addCheck({kind:"datetime",precision:typeof(C==null?void 0:C.precision)>"u"?null:C==null?void 0:C.precision,offset:(T=C==null?void 0:C.offset)!==null&&T!==void 0?T:!1,local:(I=C==null?void 0:C.local)!==null&&I!==void 0?I:!1,...errorUtil.errToObj(C==null?void 0:C.message)})}date(C){return this._addCheck({kind:"date",message:C})}time(C){return typeof C=="string"?this._addCheck({kind:"time",precision:null,message:C}):this._addCheck({kind:"time",precision:typeof(C==null?void 0:C.precision)>"u"?null:C==null?void 0:C.precision,...errorUtil.errToObj(C==null?void 0:C.message)})}duration(C){return this._addCheck({kind:"duration",...errorUtil.errToObj(C)})}regex(C,T){return this._addCheck({kind:"regex",regex:C,...errorUtil.errToObj(T)})}includes(C,T){return this._addCheck({kind:"includes",value:C,position:T==null?void 0:T.position,...errorUtil.errToObj(T==null?void 0:T.message)})}startsWith(C,T){return this._addCheck({kind:"startsWith",value:C,...errorUtil.errToObj(T)})}endsWith(C,T){return this._addCheck({kind:"endsWith",value:C,...errorUtil.errToObj(T)})}min(C,T){return this._addCheck({kind:"min",value:C,...errorUtil.errToObj(T)})}max(C,T){return this._addCheck({kind:"max",value:C,...errorUtil.errToObj(T)})}length(C,T){return this._addCheck({kind:"length",value:C,...errorUtil.errToObj(T)})}nonempty(C){return this.min(1,errorUtil.errToObj(C))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(C=>C.kind==="datetime")}get isDate(){return!!this._def.checks.find(C=>C.kind==="date")}get isTime(){return!!this._def.checks.find(C=>C.kind==="time")}get isDuration(){return!!this._def.checks.find(C=>C.kind==="duration")}get isEmail(){return!!this._def.checks.find(C=>C.kind==="email")}get isURL(){return!!this._def.checks.find(C=>C.kind==="url")}get isEmoji(){return!!this._def.checks.find(C=>C.kind==="emoji")}get isUUID(){return!!this._def.checks.find(C=>C.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(C=>C.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(C=>C.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(C=>C.kind==="cuid2")}get isULID(){return!!this._def.checks.find(C=>C.kind==="ulid")}get isIP(){return!!this._def.checks.find(C=>C.kind==="ip")}get isCIDR(){return!!this._def.checks.find(C=>C.kind==="cidr")}get isBase64(){return!!this._def.checks.find(C=>C.kind==="base64")}get isBase64url(){return!!this._def.checks.find(C=>C.kind==="base64url")}get minLength(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxLength(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}}ZodString.create=_=>{var C;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(C=_==null?void 0:_.coerce)!==null&&C!==void 0?C:!1,...processCreateParams(_)})};function floatSafeRemainder(_,C){const T=(_.toString().split(".")[1]||"").length,I=(C.toString().split(".")[1]||"").length,M=T>I?T:I,D=parseInt(_.toFixed(M).replace(".","")),B=parseInt(C.toFixed(M).replace(".",""));return D%B/Math.pow(10,M)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(C){if(this._def.coerce&&(C.data=Number(C.data)),this._getType(C)!==ZodParsedType.number){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:D.parsedType}),INVALID}let I;const M=new ParseStatus;for(const D of this._def.checks)D.kind==="int"?util.isInteger(C.data)||(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:D.message}),M.dirty()):D.kind==="min"?(D.inclusive?C.data<D.value:C.data<=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:D.value,type:"number",inclusive:D.inclusive,exact:!1,message:D.message}),M.dirty()):D.kind==="max"?(D.inclusive?C.data>D.value:C.data>=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:D.value,type:"number",inclusive:D.inclusive,exact:!1,message:D.message}),M.dirty()):D.kind==="multipleOf"?floatSafeRemainder(C.data,D.value)!==0&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_multiple_of,multipleOf:D.value,message:D.message}),M.dirty()):D.kind==="finite"?Number.isFinite(C.data)||(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_finite,message:D.message}),M.dirty()):util.assertNever(D);return{status:M.value,value:C.data}}gte(C,T){return this.setLimit("min",C,!0,errorUtil.toString(T))}gt(C,T){return this.setLimit("min",C,!1,errorUtil.toString(T))}lte(C,T){return this.setLimit("max",C,!0,errorUtil.toString(T))}lt(C,T){return this.setLimit("max",C,!1,errorUtil.toString(T))}setLimit(C,T,I,M){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:C,value:T,inclusive:I,message:errorUtil.toString(M)}]})}_addCheck(C){return new ZodNumber({...this._def,checks:[...this._def.checks,C]})}int(C){return this._addCheck({kind:"int",message:errorUtil.toString(C)})}positive(C){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(C)})}negative(C){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(C)})}nonpositive(C){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(C)})}nonnegative(C){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(C)})}multipleOf(C,T){return this._addCheck({kind:"multipleOf",value:C,message:errorUtil.toString(T)})}finite(C){return this._addCheck({kind:"finite",message:errorUtil.toString(C)})}safe(C){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(C)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(C)})}get minValue(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxValue(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}get isInt(){return!!this._def.checks.find(C=>C.kind==="int"||C.kind==="multipleOf"&&util.isInteger(C.value))}get isFinite(){let C=null,T=null;for(const I of this._def.checks){if(I.kind==="finite"||I.kind==="int"||I.kind==="multipleOf")return!0;I.kind==="min"?(T===null||I.value>T)&&(T=I.value):I.kind==="max"&&(C===null||I.value<C)&&(C=I.value)}return Number.isFinite(T)&&Number.isFinite(C)}}ZodNumber.create=_=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(_==null?void 0:_.coerce)||!1,...processCreateParams(_)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(C){if(this._def.coerce)try{C.data=BigInt(C.data)}catch{return this._getInvalidInput(C)}if(this._getType(C)!==ZodParsedType.bigint)return this._getInvalidInput(C);let I;const M=new ParseStatus;for(const D of this._def.checks)D.kind==="min"?(D.inclusive?C.data<D.value:C.data<=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_small,type:"bigint",minimum:D.value,inclusive:D.inclusive,message:D.message}),M.dirty()):D.kind==="max"?(D.inclusive?C.data>D.value:C.data>=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_big,type:"bigint",maximum:D.value,inclusive:D.inclusive,message:D.message}),M.dirty()):D.kind==="multipleOf"?C.data%D.value!==BigInt(0)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_multiple_of,multipleOf:D.value,message:D.message}),M.dirty()):util.assertNever(D);return{status:M.value,value:C.data}}_getInvalidInput(C){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:T.parsedType}),INVALID}gte(C,T){return this.setLimit("min",C,!0,errorUtil.toString(T))}gt(C,T){return this.setLimit("min",C,!1,errorUtil.toString(T))}lte(C,T){return this.setLimit("max",C,!0,errorUtil.toString(T))}lt(C,T){return this.setLimit("max",C,!1,errorUtil.toString(T))}setLimit(C,T,I,M){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:C,value:T,inclusive:I,message:errorUtil.toString(M)}]})}_addCheck(C){return new ZodBigInt({...this._def,checks:[...this._def.checks,C]})}positive(C){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(C)})}negative(C){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(C)})}nonpositive(C){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(C)})}nonnegative(C){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(C)})}multipleOf(C,T){return this._addCheck({kind:"multipleOf",value:C,message:errorUtil.toString(T)})}get minValue(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxValue(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}}ZodBigInt.create=_=>{var C;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(C=_==null?void 0:_.coerce)!==null&&C!==void 0?C:!1,...processCreateParams(_)})};class ZodBoolean extends ZodType{_parse(C){if(this._def.coerce&&(C.data=!!C.data),this._getType(C)!==ZodParsedType.boolean){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:I.parsedType}),INVALID}return OK(C.data)}}ZodBoolean.create=_=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(_==null?void 0:_.coerce)||!1,...processCreateParams(_)});class ZodDate extends ZodType{_parse(C){if(this._def.coerce&&(C.data=new Date(C.data)),this._getType(C)!==ZodParsedType.date){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:D.parsedType}),INVALID}if(isNaN(C.data.getTime())){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_date}),INVALID}const I=new ParseStatus;let M;for(const D of this._def.checks)D.kind==="min"?C.data.getTime()<D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_small,message:D.message,inclusive:!0,exact:!1,minimum:D.value,type:"date"}),I.dirty()):D.kind==="max"?C.data.getTime()>D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_big,message:D.message,inclusive:!0,exact:!1,maximum:D.value,type:"date"}),I.dirty()):util.assertNever(D);return{status:I.value,value:new Date(C.data.getTime())}}_addCheck(C){return new ZodDate({...this._def,checks:[...this._def.checks,C]})}min(C,T){return this._addCheck({kind:"min",value:C.getTime(),message:errorUtil.toString(T)})}max(C,T){return this._addCheck({kind:"max",value:C.getTime(),message:errorUtil.toString(T)})}get minDate(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C!=null?new Date(C):null}get maxDate(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C!=null?new Date(C):null}}ZodDate.create=_=>new ZodDate({checks:[],coerce:(_==null?void 0:_.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(_)});class ZodSymbol extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.symbol){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:I.parsedType}),INVALID}return OK(C.data)}}ZodSymbol.create=_=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(_)});class ZodUndefined extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.undefined){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:I.parsedType}),INVALID}return OK(C.data)}}ZodUndefined.create=_=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(_)});class ZodNull extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.null){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:I.parsedType}),INVALID}return OK(C.data)}}ZodNull.create=_=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(_)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(C){return OK(C.data)}}ZodAny.create=_=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(_)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(C){return OK(C.data)}}ZodUnknown.create=_=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(_)});class ZodNever extends ZodType{_parse(C){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:T.parsedType}),INVALID}}ZodNever.create=_=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(_)});class ZodVoid extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.undefined){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:I.parsedType}),INVALID}return OK(C.data)}}ZodVoid.create=_=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(_)});class ZodArray extends ZodType{_parse(C){const{ctx:T,status:I}=this._processInputParams(C),M=this._def;if(T.parsedType!==ZodParsedType.array)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:T.parsedType}),INVALID;if(M.exactLength!==null){const B=T.data.length>M.exactLength.value,L=T.data.length<M.exactLength.value;(B||L)&&(addIssueToContext(T,{code:B?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:L?M.exactLength.value:void 0,maximum:B?M.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:M.exactLength.message}),I.dirty())}if(M.minLength!==null&&T.data.length<M.minLength.value&&(addIssueToContext(T,{code:ZodIssueCode.too_small,minimum:M.minLength.value,type:"array",inclusive:!0,exact:!1,message:M.minLength.message}),I.dirty()),M.maxLength!==null&&T.data.length>M.maxLength.value&&(addIssueToContext(T,{code:ZodIssueCode.too_big,maximum:M.maxLength.value,type:"array",inclusive:!0,exact:!1,message:M.maxLength.message}),I.dirty()),T.common.async)return Promise.all([...T.data].map((B,L)=>M.type._parseAsync(new ParseInputLazyPath(T,B,T.path,L)))).then(B=>ParseStatus.mergeArray(I,B));const D=[...T.data].map((B,L)=>M.type._parseSync(new ParseInputLazyPath(T,B,T.path,L)));return ParseStatus.mergeArray(I,D)}get element(){return this._def.type}min(C,T){return new ZodArray({...this._def,minLength:{value:C,message:errorUtil.toString(T)}})}max(C,T){return new ZodArray({...this._def,maxLength:{value:C,message:errorUtil.toString(T)}})}length(C,T){return new ZodArray({...this._def,exactLength:{value:C,message:errorUtil.toString(T)}})}nonempty(C){return this.min(1,C)}}ZodArray.create=(_,C)=>new ZodArray({type:_,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(C)});function deepPartialify(_){if(_ instanceof ZodObject){const C={};for(const T in _.shape){const I=_.shape[T];C[T]=ZodOptional.create(deepPartialify(I))}return new ZodObject({..._._def,shape:()=>C})}else return _ instanceof ZodArray?new ZodArray({..._._def,type:deepPartialify(_.element)}):_ instanceof ZodOptional?ZodOptional.create(deepPartialify(_.unwrap())):_ instanceof ZodNullable?ZodNullable.create(deepPartialify(_.unwrap())):_ instanceof ZodTuple?ZodTuple.create(_.items.map(C=>deepPartialify(C))):_}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const C=this._def.shape(),T=util.objectKeys(C);return this._cached={shape:C,keys:T}}_parse(C){if(this._getType(C)!==ZodParsedType.object){const V=this._getOrReturnCtx(C);return addIssueToContext(V,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:V.parsedType}),INVALID}const{status:I,ctx:M}=this._processInputParams(C),{shape:D,keys:B}=this._getCached(),L=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const V in M.data)B.includes(V)||L.push(V);const N=[];for(const V of B){const F=D[V],U=M.data[V];N.push({key:{status:"valid",value:V},value:F._parse(new ParseInputLazyPath(M,U,M.path,V)),alwaysSet:V in M.data})}if(this._def.catchall instanceof ZodNever){const V=this._def.unknownKeys;if(V==="passthrough")for(const F of L)N.push({key:{status:"valid",value:F},value:{status:"valid",value:M.data[F]}});else if(V==="strict")L.length>0&&(addIssueToContext(M,{code:ZodIssueCode.unrecognized_keys,keys:L}),I.dirty());else if(V!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const V=this._def.catchall;for(const F of L){const U=M.data[F];N.push({key:{status:"valid",value:F},value:V._parse(new ParseInputLazyPath(M,U,M.path,F)),alwaysSet:F in M.data})}}return M.common.async?Promise.resolve().then(async()=>{const V=[];for(const F of N){const U=await F.key,H=await F.value;V.push({key:U,value:H,alwaysSet:F.alwaysSet})}return V}).then(V=>ParseStatus.mergeObjectSync(I,V)):ParseStatus.mergeObjectSync(I,N)}get shape(){return this._def.shape()}strict(C){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...C!==void 0?{errorMap:(T,I)=>{var M,D,B,L;const N=(B=(D=(M=this._def).errorMap)===null||D===void 0?void 0:D.call(M,T,I).message)!==null&&B!==void 0?B:I.defaultError;return T.code==="unrecognized_keys"?{message:(L=errorUtil.errToObj(C).message)!==null&&L!==void 0?L:N}:{message:N}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(C){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...C})})}merge(C){return new ZodObject({unknownKeys:C._def.unknownKeys,catchall:C._def.catchall,shape:()=>({...this._def.shape(),...C._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(C,T){return this.augment({[C]:T})}catchall(C){return new ZodObject({...this._def,catchall:C})}pick(C){const T={};return util.objectKeys(C).forEach(I=>{C[I]&&this.shape[I]&&(T[I]=this.shape[I])}),new ZodObject({...this._def,shape:()=>T})}omit(C){const T={};return util.objectKeys(this.shape).forEach(I=>{C[I]||(T[I]=this.shape[I])}),new ZodObject({...this._def,shape:()=>T})}deepPartial(){return deepPartialify(this)}partial(C){const T={};return util.objectKeys(this.shape).forEach(I=>{const M=this.shape[I];C&&!C[I]?T[I]=M:T[I]=M.optional()}),new ZodObject({...this._def,shape:()=>T})}required(C){const T={};return util.objectKeys(this.shape).forEach(I=>{if(C&&!C[I])T[I]=this.shape[I];else{let D=this.shape[I];for(;D instanceof ZodOptional;)D=D._def.innerType;T[I]=D}}),new ZodObject({...this._def,shape:()=>T})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(_,C)=>new ZodObject({shape:()=>_,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});ZodObject.strictCreate=(_,C)=>new ZodObject({shape:()=>_,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});ZodObject.lazycreate=(_,C)=>new ZodObject({shape:_,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});class ZodUnion extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I=this._def.options;function M(D){for(const L of D)if(L.result.status==="valid")return L.result;for(const L of D)if(L.result.status==="dirty")return T.common.issues.push(...L.ctx.common.issues),L.result;const B=D.map(L=>new ZodError(L.ctx.common.issues));return addIssueToContext(T,{code:ZodIssueCode.invalid_union,unionErrors:B}),INVALID}if(T.common.async)return Promise.all(I.map(async D=>{const B={...T,common:{...T.common,issues:[]},parent:null};return{result:await D._parseAsync({data:T.data,path:T.path,parent:B}),ctx:B}})).then(M);{let D;const B=[];for(const N of I){const V={...T,common:{...T.common,issues:[]},parent:null},F=N._parseSync({data:T.data,path:T.path,parent:V});if(F.status==="valid")return F;F.status==="dirty"&&!D&&(D={result:F,ctx:V}),V.common.issues.length&&B.push(V.common.issues)}if(D)return T.common.issues.push(...D.ctx.common.issues),D.result;const L=B.map(N=>new ZodError(N));return addIssueToContext(T,{code:ZodIssueCode.invalid_union,unionErrors:L}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(_,C)=>new ZodUnion({options:_,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(C)});const getDiscriminator=_=>_ instanceof ZodLazy?getDiscriminator(_.schema):_ instanceof ZodEffects?getDiscriminator(_.innerType()):_ instanceof ZodLiteral?[_.value]:_ instanceof ZodEnum?_.options:_ instanceof ZodNativeEnum?util.objectValues(_.enum):_ instanceof ZodDefault?getDiscriminator(_._def.innerType):_ instanceof ZodUndefined?[void 0]:_ instanceof ZodNull?[null]:_ instanceof ZodOptional?[void 0,...getDiscriminator(_.unwrap())]:_ instanceof ZodNullable?[null,...getDiscriminator(_.unwrap())]:_ instanceof ZodBranded||_ instanceof ZodReadonly?getDiscriminator(_.unwrap()):_ instanceof ZodCatch?getDiscriminator(_._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.object)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:T.parsedType}),INVALID;const I=this.discriminator,M=T.data[I],D=this.optionsMap.get(M);return D?T.common.async?D._parseAsync({data:T.data,path:T.path,parent:T}):D._parseSync({data:T.data,path:T.path,parent:T}):(addIssueToContext(T,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[I]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(C,T,I){const M=new Map;for(const D of T){const B=getDiscriminator(D.shape[C]);if(!B.length)throw new Error(`A discriminator value for key \`${C}\` could not be extracted from all schema options`);for(const L of B){if(M.has(L))throw new Error(`Discriminator property ${String(C)} has duplicate value ${String(L)}`);M.set(L,D)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:C,options:T,optionsMap:M,...processCreateParams(I)})}}function mergeValues(_,C){const T=getParsedType(_),I=getParsedType(C);if(_===C)return{valid:!0,data:_};if(T===ZodParsedType.object&&I===ZodParsedType.object){const M=util.objectKeys(C),D=util.objectKeys(_).filter(L=>M.indexOf(L)!==-1),B={..._,...C};for(const L of D){const N=mergeValues(_[L],C[L]);if(!N.valid)return{valid:!1};B[L]=N.data}return{valid:!0,data:B}}else if(T===ZodParsedType.array&&I===ZodParsedType.array){if(_.length!==C.length)return{valid:!1};const M=[];for(let D=0;D<_.length;D++){const B=_[D],L=C[D],N=mergeValues(B,L);if(!N.valid)return{valid:!1};M.push(N.data)}return{valid:!0,data:M}}else return T===ZodParsedType.date&&I===ZodParsedType.date&&+_==+C?{valid:!0,data:_}:{valid:!1}}class ZodIntersection extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C),M=(D,B)=>{if(isAborted(D)||isAborted(B))return INVALID;const L=mergeValues(D.value,B.value);return L.valid?((isDirty(D)||isDirty(B))&&T.dirty(),{status:T.value,value:L.data}):(addIssueToContext(I,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return I.common.async?Promise.all([this._def.left._parseAsync({data:I.data,path:I.path,parent:I}),this._def.right._parseAsync({data:I.data,path:I.path,parent:I})]).then(([D,B])=>M(D,B)):M(this._def.left._parseSync({data:I.data,path:I.path,parent:I}),this._def.right._parseSync({data:I.data,path:I.path,parent:I}))}}ZodIntersection.create=(_,C,T)=>new ZodIntersection({left:_,right:C,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(T)});class ZodTuple extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.array)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:I.parsedType}),INVALID;if(I.data.length<this._def.items.length)return addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&I.data.length>this._def.items.length&&(addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T.dirty());const D=[...I.data].map((B,L)=>{const N=this._def.items[L]||this._def.rest;return N?N._parse(new ParseInputLazyPath(I,B,I.path,L)):null}).filter(B=>!!B);return I.common.async?Promise.all(D).then(B=>ParseStatus.mergeArray(T,B)):ParseStatus.mergeArray(T,D)}get items(){return this._def.items}rest(C){return new ZodTuple({...this._def,rest:C})}}ZodTuple.create=(_,C)=>{if(!Array.isArray(_))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:_,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(C)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.object)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:I.parsedType}),INVALID;const M=[],D=this._def.keyType,B=this._def.valueType;for(const L in I.data)M.push({key:D._parse(new ParseInputLazyPath(I,L,I.path,L)),value:B._parse(new ParseInputLazyPath(I,I.data[L],I.path,L)),alwaysSet:L in I.data});return I.common.async?ParseStatus.mergeObjectAsync(T,M):ParseStatus.mergeObjectSync(T,M)}get element(){return this._def.valueType}static create(C,T,I){return T instanceof ZodType?new ZodRecord({keyType:C,valueType:T,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(I)}):new ZodRecord({keyType:ZodString.create(),valueType:C,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(T)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.map)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:I.parsedType}),INVALID;const M=this._def.keyType,D=this._def.valueType,B=[...I.data.entries()].map(([L,N],V)=>({key:M._parse(new ParseInputLazyPath(I,L,I.path,[V,"key"])),value:D._parse(new ParseInputLazyPath(I,N,I.path,[V,"value"]))}));if(I.common.async){const L=new Map;return Promise.resolve().then(async()=>{for(const N of B){const V=await N.key,F=await N.value;if(V.status==="aborted"||F.status==="aborted")return INVALID;(V.status==="dirty"||F.status==="dirty")&&T.dirty(),L.set(V.value,F.value)}return{status:T.value,value:L}})}else{const L=new Map;for(const N of B){const V=N.key,F=N.value;if(V.status==="aborted"||F.status==="aborted")return INVALID;(V.status==="dirty"||F.status==="dirty")&&T.dirty(),L.set(V.value,F.value)}return{status:T.value,value:L}}}}ZodMap.create=(_,C,T)=>new ZodMap({valueType:C,keyType:_,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(T)});class ZodSet extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.set)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:I.parsedType}),INVALID;const M=this._def;M.minSize!==null&&I.data.size<M.minSize.value&&(addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:M.minSize.value,type:"set",inclusive:!0,exact:!1,message:M.minSize.message}),T.dirty()),M.maxSize!==null&&I.data.size>M.maxSize.value&&(addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:M.maxSize.value,type:"set",inclusive:!0,exact:!1,message:M.maxSize.message}),T.dirty());const D=this._def.valueType;function B(N){const V=new Set;for(const F of N){if(F.status==="aborted")return INVALID;F.status==="dirty"&&T.dirty(),V.add(F.value)}return{status:T.value,value:V}}const L=[...I.data.values()].map((N,V)=>D._parse(new ParseInputLazyPath(I,N,I.path,V)));return I.common.async?Promise.all(L).then(N=>B(N)):B(L)}min(C,T){return new ZodSet({...this._def,minSize:{value:C,message:errorUtil.toString(T)}})}max(C,T){return new ZodSet({...this._def,maxSize:{value:C,message:errorUtil.toString(T)}})}size(C,T){return this.min(C,T).max(C,T)}nonempty(C){return this.min(1,C)}}ZodSet.create=(_,C)=>new ZodSet({valueType:_,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(C)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.function)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:T.parsedType}),INVALID;function I(L,N){return makeIssue({data:L,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,getErrorMap(),errorMap].filter(V=>!!V),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:N}})}function M(L,N){return makeIssue({data:L,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,getErrorMap(),errorMap].filter(V=>!!V),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:N}})}const D={errorMap:T.common.contextualErrorMap},B=T.data;if(this._def.returns instanceof ZodPromise){const L=this;return OK(async function(...N){const V=new ZodError([]),F=await L._def.args.parseAsync(N,D).catch(G=>{throw V.addIssue(I(N,G)),V}),U=await Reflect.apply(B,this,F);return await L._def.returns._def.type.parseAsync(U,D).catch(G=>{throw V.addIssue(M(U,G)),V})})}else{const L=this;return OK(function(...N){const V=L._def.args.safeParse(N,D);if(!V.success)throw new ZodError([I(N,V.error)]);const F=Reflect.apply(B,this,V.data),U=L._def.returns.safeParse(F,D);if(!U.success)throw new ZodError([M(F,U.error)]);return U.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...C){return new ZodFunction({...this._def,args:ZodTuple.create(C).rest(ZodUnknown.create())})}returns(C){return new ZodFunction({...this._def,returns:C})}implement(C){return this.parse(C)}strictImplement(C){return this.parse(C)}static create(C,T,I){return new ZodFunction({args:C||ZodTuple.create([]).rest(ZodUnknown.create()),returns:T||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(I)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(C){const{ctx:T}=this._processInputParams(C);return this._def.getter()._parse({data:T.data,path:T.path,parent:T})}}ZodLazy.create=(_,C)=>new ZodLazy({getter:_,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(C)});class ZodLiteral extends ZodType{_parse(C){if(C.data!==this._def.value){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{received:T.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:C.data}}get value(){return this._def.value}}ZodLiteral.create=(_,C)=>new ZodLiteral({value:_,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(C)});function createZodEnum(_,C){return new ZodEnum({values:_,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(C)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(C){if(typeof C.data!="string"){const T=this._getOrReturnCtx(C),I=this._def.values;return addIssueToContext(T,{expected:util.joinValues(I),received:T.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(C.data)){const T=this._getOrReturnCtx(C),I=this._def.values;return addIssueToContext(T,{received:T.data,code:ZodIssueCode.invalid_enum_value,options:I}),INVALID}return OK(C.data)}get options(){return this._def.values}get enum(){const C={};for(const T of this._def.values)C[T]=T;return C}get Values(){const C={};for(const T of this._def.values)C[T]=T;return C}get Enum(){const C={};for(const T of this._def.values)C[T]=T;return C}extract(C,T=this._def){return ZodEnum.create(C,{...this._def,...T})}exclude(C,T=this._def){return ZodEnum.create(this.options.filter(I=>!C.includes(I)),{...this._def,...T})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(C){const T=util.getValidEnumValues(this._def.values),I=this._getOrReturnCtx(C);if(I.parsedType!==ZodParsedType.string&&I.parsedType!==ZodParsedType.number){const M=util.objectValues(T);return addIssueToContext(I,{expected:util.joinValues(M),received:I.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(C.data)){const M=util.objectValues(T);return addIssueToContext(I,{received:I.data,code:ZodIssueCode.invalid_enum_value,options:M}),INVALID}return OK(C.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(_,C)=>new ZodNativeEnum({values:_,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(C)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.promise&&T.common.async===!1)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:T.parsedType}),INVALID;const I=T.parsedType===ZodParsedType.promise?T.data:Promise.resolve(T.data);return OK(I.then(M=>this._def.type.parseAsync(M,{path:T.path,errorMap:T.common.contextualErrorMap})))}}ZodPromise.create=(_,C)=>new ZodPromise({type:_,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(C)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(C){const{status:T,ctx:I}=this._processInputParams(C),M=this._def.effect||null,D={addIssue:B=>{addIssueToContext(I,B),B.fatal?T.abort():T.dirty()},get path(){return I.path}};if(D.addIssue=D.addIssue.bind(D),M.type==="preprocess"){const B=M.transform(I.data,D);if(I.common.async)return Promise.resolve(B).then(async L=>{if(T.value==="aborted")return INVALID;const N=await this._def.schema._parseAsync({data:L,path:I.path,parent:I});return N.status==="aborted"?INVALID:N.status==="dirty"||T.value==="dirty"?DIRTY(N.value):N});{if(T.value==="aborted")return INVALID;const L=this._def.schema._parseSync({data:B,path:I.path,parent:I});return L.status==="aborted"?INVALID:L.status==="dirty"||T.value==="dirty"?DIRTY(L.value):L}}if(M.type==="refinement"){const B=L=>{const N=M.refinement(L,D);if(I.common.async)return Promise.resolve(N);if(N instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return L};if(I.common.async===!1){const L=this._def.schema._parseSync({data:I.data,path:I.path,parent:I});return L.status==="aborted"?INVALID:(L.status==="dirty"&&T.dirty(),B(L.value),{status:T.value,value:L.value})}else return this._def.schema._parseAsync({data:I.data,path:I.path,parent:I}).then(L=>L.status==="aborted"?INVALID:(L.status==="dirty"&&T.dirty(),B(L.value).then(()=>({status:T.value,value:L.value}))))}if(M.type==="transform")if(I.common.async===!1){const B=this._def.schema._parseSync({data:I.data,path:I.path,parent:I});if(!isValid(B))return B;const L=M.transform(B.value,D);if(L instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:T.value,value:L}}else return this._def.schema._parseAsync({data:I.data,path:I.path,parent:I}).then(B=>isValid(B)?Promise.resolve(M.transform(B.value,D)).then(L=>({status:T.value,value:L})):B);util.assertNever(M)}}ZodEffects.create=(_,C,T)=>new ZodEffects({schema:_,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:C,...processCreateParams(T)});ZodEffects.createWithPreprocess=(_,C,T)=>new ZodEffects({schema:C,effect:{type:"preprocess",transform:_},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(T)});class ZodOptional extends ZodType{_parse(C){return this._getType(C)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(C)}unwrap(){return this._def.innerType}}ZodOptional.create=(_,C)=>new ZodOptional({innerType:_,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(C)});class ZodNullable extends ZodType{_parse(C){return this._getType(C)===ZodParsedType.null?OK(null):this._def.innerType._parse(C)}unwrap(){return this._def.innerType}}ZodNullable.create=(_,C)=>new ZodNullable({innerType:_,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(C)});class ZodDefault extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C);let I=T.data;return T.parsedType===ZodParsedType.undefined&&(I=this._def.defaultValue()),this._def.innerType._parse({data:I,path:T.path,parent:T})}removeDefault(){return this._def.innerType}}ZodDefault.create=(_,C)=>new ZodDefault({innerType:_,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof C.default=="function"?C.default:()=>C.default,...processCreateParams(C)});class ZodCatch extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I={...T,common:{...T.common,issues:[]}},M=this._def.innerType._parse({data:I.data,path:I.path,parent:{...I}});return isAsync(M)?M.then(D=>({status:"valid",value:D.status==="valid"?D.value:this._def.catchValue({get error(){return new ZodError(I.common.issues)},input:I.data})})):{status:"valid",value:M.status==="valid"?M.value:this._def.catchValue({get error(){return new ZodError(I.common.issues)},input:I.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(_,C)=>new ZodCatch({innerType:_,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof C.catch=="function"?C.catch:()=>C.catch,...processCreateParams(C)});class ZodNaN extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.nan){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:I.parsedType}),INVALID}return{status:"valid",value:C.data}}}ZodNaN.create=_=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(_)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I=T.data;return this._def.type._parse({data:I,path:T.path,parent:T})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.common.async)return(async()=>{const D=await this._def.in._parseAsync({data:I.data,path:I.path,parent:I});return D.status==="aborted"?INVALID:D.status==="dirty"?(T.dirty(),DIRTY(D.value)):this._def.out._parseAsync({data:D.value,path:I.path,parent:I})})();{const M=this._def.in._parseSync({data:I.data,path:I.path,parent:I});return M.status==="aborted"?INVALID:M.status==="dirty"?(T.dirty(),{status:"dirty",value:M.value}):this._def.out._parseSync({data:M.value,path:I.path,parent:I})}}static create(C,T){return new ZodPipeline({in:C,out:T,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(C){const T=this._def.innerType._parse(C),I=M=>(isValid(M)&&(M.value=Object.freeze(M.value)),M);return isAsync(T)?T.then(M=>I(M)):I(T)}unwrap(){return this._def.innerType}}ZodReadonly.create=(_,C)=>new ZodReadonly({innerType:_,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(C)});function cleanParams(_,C){const T=typeof _=="function"?_(C):typeof _=="string"?{message:_}:_;return typeof T=="string"?{message:T}:T}function custom(_,C={},T){return _?ZodAny.create().superRefine((I,M)=>{var D,B;const L=_(I);if(L instanceof Promise)return L.then(N=>{var V,F;if(!N){const U=cleanParams(C,I),H=(F=(V=U.fatal)!==null&&V!==void 0?V:T)!==null&&F!==void 0?F:!0;M.addIssue({code:"custom",...U,fatal:H})}});if(!L){const N=cleanParams(C,I),V=(B=(D=N.fatal)!==null&&D!==void 0?D:T)!==null&&B!==void 0?B:!0;M.addIssue({code:"custom",...N,fatal:V})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(_){_.ZodString="ZodString",_.ZodNumber="ZodNumber",_.ZodNaN="ZodNaN",_.ZodBigInt="ZodBigInt",_.ZodBoolean="ZodBoolean",_.ZodDate="ZodDate",_.ZodSymbol="ZodSymbol",_.ZodUndefined="ZodUndefined",_.ZodNull="ZodNull",_.ZodAny="ZodAny",_.ZodUnknown="ZodUnknown",_.ZodNever="ZodNever",_.ZodVoid="ZodVoid",_.ZodArray="ZodArray",_.ZodObject="ZodObject",_.ZodUnion="ZodUnion",_.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_.ZodIntersection="ZodIntersection",_.ZodTuple="ZodTuple",_.ZodRecord="ZodRecord",_.ZodMap="ZodMap",_.ZodSet="ZodSet",_.ZodFunction="ZodFunction",_.ZodLazy="ZodLazy",_.ZodLiteral="ZodLiteral",_.ZodEnum="ZodEnum",_.ZodEffects="ZodEffects",_.ZodNativeEnum="ZodNativeEnum",_.ZodOptional="ZodOptional",_.ZodNullable="ZodNullable",_.ZodDefault="ZodDefault",_.ZodCatch="ZodCatch",_.ZodPromise="ZodPromise",_.ZodBranded="ZodBranded",_.ZodPipeline="ZodPipeline",_.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(_,C={message:`Input not instance of ${_.name}`})=>custom(T=>T instanceof _,C),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:_=>ZodString.create({..._,coerce:!0}),number:_=>ZodNumber.create({..._,coerce:!0}),boolean:_=>ZodBoolean.create({..._,coerce:!0}),bigint:_=>ZodBigInt.create({..._,coerce:!0}),date:_=>ZodDate.create({..._,coerce:!0})},NEVER=INVALID;var z$1=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError}),AuditLogStatus;(function(_){_.DEFAULT="default",_.SUCCEEDED="succeeded",_.FAILED="failed",_.PENDING="pending"})(AuditLogStatus||(AuditLogStatus={}));var AuditLogAction;(function(_){_.APP_DISCONNECTED="app-disconnected",_.APP_RESTORE="app-restore",_.APP_BACKUP="app-backup",_.APP_CONNECTED="app-connected",_.APP_OBJECTS_SYNC="app-objects-sync"})(AuditLogAction||(AuditLogAction={}));const AppConnectedSchema=z$1.object({spaceDid:z$1.string().min(1),appDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),scopes:z$1.string().min(1),appUrl:z$1.string(),referrer:z$1.string()}),AppDisconnectedSchema=z$1.object({spaceDid:z$1.string().min(1),appDid:z$1.string().min(1),appName:z$1.string().min(1)}),AppBackupSchema=z$1.object({serverDid:z$1.string().min(1),signerDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),referrer:z$1.string()}),AppRestoreSchema=z$1.object({serverDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),referrer:z$1.string()}),AppObjectsSyncSchema=z$1.object({appName:z$1.string().min(1),appDescription:z$1.string(),source:z$1.string().min(1),target:z$1.string().min(1),totalCount:z$1.number(),errorCount:z$1.number(),successCount:z$1.number(),size:z$1.number(),duration:z$1.number(),metadata:z$1.record(z$1.string(),z$1.any()).optional()}),AuditLogSchema=z$1.object({id:z$1.string(),actionType:z$1.nativeEnum(AuditLogAction),entityId:z$1.string().min(1),entityName:z$1.string().optional().default(""),userId:z$1.string().min(1),username:z$1.string().optional().default(""),data:z$1.union([AppConnectedSchema,AppDisconnectedSchema,AppBackupSchema,AppRestoreSchema,AppObjectsSyncSchema]),status:z$1.nativeEnum(AuditLogStatus).optional().default(AuditLogStatus.SUCCEEDED),reason:z$1.string().optional().default(""),env:z$1.record(z$1.any()).optional().default({}),createdAt:z$1.string().optional().default(()=>new Date().toISOString()),updatedAt:z$1.string().optional().default(()=>new Date().toISOString())});AuditLogSchema.extend({id:AuditLogSchema.shape.id.optional()});AuditLogSchema.extend({data:z$1.union([AppConnectedSchema.partial(),AppDisconnectedSchema.partial(),AppBackupSchema.partial(),AppRestoreSchema.partial(),AppObjectsSyncSchema.partial()])}).partial().required({id:!0});function _classCallCheck(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function _defineProperties(_,C){for(var T=0;T<C.length;T++){var I=C[T];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,_toPropertyKey$1(I.key),I)}}function _createClass(_,C,T){return C&&_defineProperties(_.prototype,C),Object.defineProperty(_,"prototype",{writable:!1}),_}function _typeof(_){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof(_)}function ownKeys$1(_,C){var T=Object.keys(_);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(_);C&&(I=I.filter(function(M){return Object.getOwnPropertyDescriptor(_,M).enumerable})),T.push.apply(T,I)}return T}function _objectSpread$1(_){for(var C=1;C<arguments.length;C++){var T=arguments[C]!=null?arguments[C]:{};C%2?ownKeys$1(Object(T),!0).forEach(function(I){_defineProperty$1(_,I,T[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(T)):ownKeys$1(Object(T)).forEach(function(I){Object.defineProperty(_,I,Object.getOwnPropertyDescriptor(T,I))})}return _}function _defineProperty$1(_,C,T){return C=_toPropertyKey$1(C),C in _?Object.defineProperty(_,C,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[C]=T,_}function _toPropertyKey$1(_){var C=_toPrimitive$1(_,"string");return _typeof(C)=="symbol"?C:C+""}function _toPrimitive$1(_,C){if(_typeof(_)!="object"||!_)return _;var T=_[Symbol.toPrimitive];if(T!==void 0){var I=T.call(_,C||"default");if(_typeof(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(_)}function _slicedToArray(_,C){return _arrayWithHoles(_)||_iterableToArrayLimit(_,C)||_unsupportedIterableToArray(_,C)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3206
|
+
如果您是管理员,可以单击下面的链接进行操作。`},gateway:{add:{invalidUrl:"无效的 DID Spaces 网关地址",label:"输入 DID Spaces 的地址",title:"添加 DID Spaces"}},provideNFT:{title:"请为 {appName} 出示 DID Spaces NFT",scan:"使用你的 DID Wallet 扫描下面的二维码为应用 {appName} 出示 DID Spaces NFT",success:"连接成功"},helperText:{fixCorsError:"修复连接 DID Spaces 时的 CORS 错误"}}},auditLog:{backup:{description:"在 {relativeTime} 完成了备份操作"},restore:{description:"在 {relativeTime} 完成了还原操作"},connected:{description:"在 {relativeTime} 完成了连接操作"},disconnected:{description:"在 {relativeTime} 断开了连接"},objectsSync:{description:"{totalCount} 个对象({size})在 {relativeTime} 完成了同步"}}}),translations={zh,en};function useLocale(){const{locale:_}=useLocaleContext();return{t:useMemoizedFn((T,I={})=>translate(translations,T,_,"en",I)),locale:_}}var OpenInNew={},_interopRequireDefault$4=interopRequireDefaultExports;Object.defineProperty(OpenInNew,"__esModule",{value:!0});var default_1$3=OpenInNew.default=void 0,_createSvgIcon$3=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports;default_1$3=OpenInNew.default=(0,_createSvgIcon$3.default)((0,_jsxRuntime$4.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");const version$1="1.0.15",AUTHORIZE={DEFAULT_SCOPE:"list:object read:object write:object"},copyGatewayPageUrl="https://www.arcblock.io/content/docs/did-spaces/how-to-obtain-space-gateway-url",fixCorsErrorPageUrl="https://www.arcblock.io/docs/did-spaces/fixing-cors-errors-when-connecting-to-space";var Yo;const isDebugMode=((Yo=window.blocklet)==null?void 0:Yo.DEBUG_MODE)==="true"||window.localStorage.getItem("debug")==="true";var EN_US=["second","minute","hour","day","week","month","year"];function en_US(_,C){if(C===0)return["just now","right now"];var T=EN_US[Math.floor(C/2)];return _>1&&(T+="s"),[_+" "+T+" ago","in "+_+" "+T]}var ZH_CN=["秒","分钟","小时","天","周","个月","年"];function zh_CN(_,C){if(C===0)return["刚刚","片刻后"];var T=ZH_CN[~~(C/2)];return[_+" "+T+"前",_+" "+T+"后"]}var Locales={},register=function(_,C){Locales[_]=C},getLocale=function(_){return Locales[_]||Locales.en_US},SEC_ARRAY=[60,60,24,7,365/7/12,12];function toDate(_){return _ instanceof Date?_:!isNaN(_)||/^\d+$/.test(_)?new Date(parseInt(_)):(_=(_||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(_))}function formatDiff(_,C){var T=_<0?1:0;_=Math.abs(_);for(var I=_,M=0;_>=SEC_ARRAY[M]&&M<SEC_ARRAY.length;M++)_/=SEC_ARRAY[M];return _=Math.floor(_),M*=2,_>(M===0?9:1)&&(M+=1),C(_,M,I)[T].replace("%s",_.toString())}function diffSec(_,C){var T=new Date;return(+T-+toDate(_))/1e3}var format=function(_,C,T){var I=diffSec(_);return formatDiff(I,getLocale(C))};register("en_US",en_US);register("zh_CN",zh_CN);function classNames(..._){const C=[];return _.forEach(T=>{T&&(typeof T=="string"?C.push(T):Array.isArray(T)?C.push(classNames(...T)):typeof T=="object"&&T!==null&&Object.keys(T).forEach(I=>{T[I]&&C.push(I)}))}),C.join(" ")}function getSpaceEndpointContext(_){const C=_.replace(/\/api\/space\/.+/,""),T=_.replace(/\/$/,"").split("/"),I=T.at(-4),M=T.at(-2);return{baseUrl:C,spaceDid:I,appDid:M}}function getSpaceDidFromEndpoint(_){const{spaceDid:C}=getSpaceEndpointContext(_);return C}function getSpaceUrlFromEndpoint(_){const{baseUrl:C,spaceDid:T}=getSpaceEndpointContext(_);return joinURL(C,"space",T)}function getSpaceNftDisplayUrlFromEndpoint(_){const{baseUrl:C,spaceDid:T}=getSpaceEndpointContext(_);return joinURL(C,`/api/space/nft/display?spaceDid=${T}`)}function getSpaceGatewayUrlFromEndpoint(_){return getSpaceUrlFromEndpoint(_).split("/space/")[0]}function extraDIDSpacesCoreUrl(_){const C=new URL(_);return joinURL(C.origin,C.pathname)}const spaceDidRegex=/\/space\/([^/]+)/;function getSpaceDidFromSpaceUrl(_){var C;return(C=new URL(_).pathname.match(spaceDidRegex))==null?void 0:C[1]}function decryptSpaceGateway(_,C){if(!isEmpty$2(_.spaceGateway))return C?C(_.spaceGateway):_.spaceGateway;const T=C(_.endpoint),I=_.space?C(_.space):{};return{endpoint:T,name:"DID Space",...I}}function isCorsBlockedError(_){return!_.response&&_.message==="Network Error"&&_.code!=="ECONNABORTED"&&new URL(_.config.url).origin!==window.location.origin}function t$1(_,C,T={}){return translate(translations,_,typeof C=="string"?C:"en","en",typeof C=="object"?C:T)}function formatRelativeTime(_,C="en"){let T=C;return C==="zh"&&(T="zh_CN"),C==="en"&&(T="en_US"),format(_,T)}var DIDSpaceStatus=(_=>(_.LOADING="loading",_.CONNECTED="connected",_.DISCONNECTED="disconnected",_.UNAVAILABLE="unavailable",_))(DIDSpaceStatus||{}),_path,_path2,_path3,_g,_defs;function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$4.apply(null,arguments)}var SvgEmptySpaceNft=function _(C){return reactExports.createElement("svg",_extends$4({width:228,height:258,fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},C),reactExports.createElement("g",{filter:"url(#filter0_d_1410_22507)"},_path||(_path=reactExports.createElement("path",{d:"M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z",fill:"#DDDDDD"})),_path2||(_path2=reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.1924 6.22183L8.22182 47.1924C6.15892 49.2553 5 52.0532 5 54.9706V240C5 246.075 9.92487 251 16 251H212C218.075 251 223 246.075 223 240V14C223 7.92486 218.075 3 212 3H56.9706C54.0532 3 51.2553 4.15893 49.1924 6.22183ZM48.4853 5.51472C50.7357 3.26428 53.788 2 56.9706 2H212C218.627 2 224 7.37258 224 14V240C224 246.627 218.627 252 212 252H16C9.37258 252 4 246.627 4 240V54.9706C4 51.788 5.26428 48.7357 7.51472 46.4853L48.4853 5.51472Z",fill:"black",fillOpacity:.08})),reactExports.createElement("mask",{id:"mask0_1410_22507",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:4,y:2,width:220,height:250},_path3||(_path3=reactExports.createElement("path",{d:"M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z",fill:"#D9D9D9"}))),_g||(_g=reactExports.createElement("g",{mask:"url(#mask0_1410_22507)"},reactExports.createElement("rect",{opacity:.5,x:4,y:2,width:220,height:128,fill:"url(#pattern0)"}),reactExports.createElement("rect",{opacity:.1,x:4,y:130,width:220,height:122,fill:"url(#paint0_linear_1410_22507)"}),reactExports.createElement("path",{d:"M33.0455 169H29.2784V157.364H33.1648C34.3049 157.364 35.2841 157.597 36.1023 158.062C36.9205 158.525 37.5473 159.189 37.983 160.057C38.4223 160.92 38.642 161.956 38.642 163.165C38.642 164.377 38.4205 165.419 37.9773 166.29C37.5379 167.161 36.9015 167.831 36.0682 168.301C35.2348 168.767 34.2273 169 33.0455 169ZM31.0341 167.466H32.9489C33.8352 167.466 34.572 167.299 35.1591 166.966C35.7462 166.629 36.1856 166.142 36.4773 165.506C36.7689 164.866 36.9148 164.085 36.9148 163.165C36.9148 162.252 36.7689 161.477 36.4773 160.841C36.1894 160.205 35.7595 159.722 35.1875 159.392C34.6155 159.062 33.9053 158.898 33.0568 158.898H31.0341V167.466ZM42.581 157.364V169H40.8253V157.364H42.581ZM48.9048 169H45.1378V157.364H49.0241C50.1643 157.364 51.1435 157.597 51.9616 158.062C52.7798 158.525 53.4067 159.189 53.8423 160.057C54.2817 160.92 54.5014 161.956 54.5014 163.165C54.5014 164.377 54.2798 165.419 53.8366 166.29C53.3973 167.161 52.7609 167.831 51.9276 168.301C51.0942 168.767 50.0866 169 48.9048 169ZM46.8935 167.466H48.8082C49.6946 167.466 50.4313 167.299 51.0185 166.966C51.6056 166.629 52.045 166.142 52.3366 165.506C52.6283 164.866 52.7741 164.085 52.7741 163.165C52.7741 162.252 52.6283 161.477 52.3366 160.841C52.0488 160.205 51.6188 159.722 51.0469 159.392C50.4749 159.062 49.7647 158.898 48.9162 158.898H46.8935V167.466ZM67.2656 160.42C67.205 159.883 66.955 159.466 66.5156 159.17C66.0762 158.871 65.5232 158.722 64.8565 158.722C64.3793 158.722 63.9664 158.797 63.6179 158.949C63.2694 159.097 62.9986 159.301 62.8054 159.562C62.616 159.82 62.5213 160.114 62.5213 160.443C62.5213 160.72 62.5857 160.958 62.7145 161.159C62.8471 161.36 63.0194 161.528 63.2315 161.665C63.4474 161.797 63.6785 161.909 63.9247 162C64.1709 162.087 64.4077 162.159 64.6349 162.216L65.7713 162.511C66.1425 162.602 66.5232 162.725 66.9134 162.881C67.3035 163.036 67.6652 163.241 67.9986 163.494C68.3319 163.748 68.6009 164.062 68.8054 164.438C69.0137 164.812 69.1179 165.261 69.1179 165.784C69.1179 166.443 68.9474 167.028 68.6065 167.54C68.2694 168.051 67.7789 168.455 67.1349 168.75C66.4948 169.045 65.7202 169.193 64.8111 169.193C63.9399 169.193 63.1861 169.055 62.5497 168.778C61.9134 168.502 61.4152 168.11 61.0554 167.602C60.6955 167.091 60.4967 166.485 60.4588 165.784H62.2202C62.2543 166.205 62.3906 166.555 62.6293 166.835C62.8717 167.112 63.1804 167.318 63.5554 167.455C63.9342 167.587 64.349 167.653 64.7997 167.653C65.2959 167.653 65.7372 167.576 66.1236 167.42C66.5137 167.261 66.8205 167.042 67.044 166.761C67.2675 166.477 67.3793 166.146 67.3793 165.767C67.3793 165.422 67.2808 165.14 67.0838 164.92C66.8906 164.701 66.6274 164.519 66.294 164.375C65.9645 164.231 65.5914 164.104 65.1747 163.994L63.7997 163.619C62.8679 163.366 62.1293 162.992 61.5838 162.5C61.0421 162.008 60.7713 161.356 60.7713 160.545C60.7713 159.875 60.9531 159.29 61.3168 158.79C61.6804 158.29 62.1728 157.902 62.794 157.625C63.4152 157.345 64.116 157.205 64.8963 157.205C65.6842 157.205 66.3793 157.343 66.9815 157.619C67.5876 157.896 68.0649 158.277 68.4134 158.761C68.7618 159.242 68.9437 159.795 68.9588 160.42H67.2656ZM71.0795 172.273V160.273H72.7386V161.688H72.8807C72.9792 161.506 73.1212 161.295 73.3068 161.057C73.4924 160.818 73.75 160.61 74.0795 160.432C74.4091 160.25 74.8447 160.159 75.3864 160.159C76.0909 160.159 76.7197 160.337 77.2727 160.693C77.8258 161.049 78.2595 161.562 78.5739 162.233C78.892 162.903 79.0511 163.71 79.0511 164.653C79.0511 165.597 78.8939 166.405 78.5795 167.08C78.2652 167.75 77.8333 168.267 77.2841 168.631C76.7348 168.991 76.108 169.17 75.4034 169.17C74.8731 169.17 74.4394 169.081 74.1023 168.903C73.7689 168.725 73.5076 168.517 73.3182 168.278C73.1288 168.04 72.983 167.828 72.8807 167.642H72.7784V172.273H71.0795ZM72.7443 164.636C72.7443 165.25 72.8333 165.788 73.0114 166.25C73.1894 166.712 73.447 167.074 73.7841 167.335C74.1212 167.593 74.5341 167.722 75.0227 167.722C75.5303 167.722 75.9545 167.587 76.2955 167.318C76.6364 167.045 76.8939 166.676 77.0682 166.21C77.2462 165.744 77.3352 165.22 77.3352 164.636C77.3352 164.061 77.2481 163.544 77.0739 163.085C76.9034 162.627 76.6458 162.265 76.3011 162C75.9602 161.735 75.5341 161.602 75.0227 161.602C74.5303 161.602 74.1136 161.729 73.7727 161.983C73.4356 162.237 73.1799 162.591 73.0057 163.045C72.8314 163.5 72.7443 164.03 72.7443 164.636ZM83.4943 169.193C82.9413 169.193 82.4413 169.091 81.9943 168.886C81.5473 168.678 81.1932 168.377 80.9318 167.983C80.6742 167.589 80.5455 167.106 80.5455 166.534C80.5455 166.042 80.6402 165.636 80.8295 165.318C81.0189 165 81.2746 164.748 81.5966 164.562C81.9186 164.377 82.2784 164.237 82.6761 164.142C83.0739 164.047 83.4792 163.975 83.892 163.926C84.4148 163.866 84.839 163.816 85.1648 163.778C85.4905 163.737 85.7273 163.67 85.875 163.58C86.0227 163.489 86.0966 163.341 86.0966 163.136V163.097C86.0966 162.6 85.9564 162.216 85.6761 161.943C85.3996 161.67 84.9867 161.534 84.4375 161.534C83.8655 161.534 83.4148 161.661 83.0852 161.915C82.7595 162.165 82.5341 162.443 82.4091 162.75L80.8125 162.386C81.0019 161.856 81.2784 161.428 81.642 161.102C82.0095 160.773 82.4318 160.534 82.9091 160.386C83.3864 160.235 83.8883 160.159 84.4148 160.159C84.7633 160.159 85.1326 160.201 85.5227 160.284C85.9167 160.364 86.2841 160.511 86.625 160.727C86.9697 160.943 87.2519 161.252 87.4716 161.653C87.6913 162.051 87.8011 162.568 87.8011 163.205V169H86.142V167.807H86.0739C85.964 168.027 85.7992 168.242 85.5795 168.455C85.3598 168.667 85.0777 168.843 84.733 168.983C84.3883 169.123 83.9754 169.193 83.4943 169.193ZM83.8636 167.83C84.3333 167.83 84.7348 167.737 85.0682 167.551C85.4053 167.366 85.661 167.123 85.8352 166.824C86.0133 166.521 86.1023 166.197 86.1023 165.852V164.727C86.0417 164.788 85.9242 164.845 85.75 164.898C85.5795 164.947 85.3845 164.991 85.1648 165.028C84.9451 165.062 84.7311 165.095 84.5227 165.125C84.3144 165.152 84.1402 165.174 84 165.193C83.6705 165.235 83.3693 165.305 83.0966 165.403C82.8277 165.502 82.6117 165.644 82.4489 165.83C82.2898 166.011 82.2102 166.254 82.2102 166.557C82.2102 166.977 82.3655 167.295 82.6761 167.511C82.9867 167.723 83.3826 167.83 83.8636 167.83ZM93.7401 169.176C92.8954 169.176 92.1681 168.985 91.5582 168.602C90.9522 168.216 90.4863 167.684 90.1605 167.006C89.8348 166.328 89.6719 165.551 89.6719 164.676C89.6719 163.79 89.8385 163.008 90.1719 162.33C90.5052 161.648 90.9749 161.116 91.581 160.733C92.187 160.35 92.901 160.159 93.723 160.159C94.3859 160.159 94.9768 160.282 95.4957 160.528C96.0147 160.771 96.4332 161.112 96.7514 161.551C97.0734 161.991 97.2647 162.504 97.3253 163.091H95.6719C95.581 162.682 95.3726 162.33 95.0469 162.034C94.7249 161.739 94.2931 161.591 93.7514 161.591C93.2779 161.591 92.8632 161.716 92.5071 161.966C92.1548 162.212 91.8802 162.564 91.6832 163.023C91.4863 163.477 91.3878 164.015 91.3878 164.636C91.3878 165.273 91.4844 165.822 91.6776 166.284C91.8707 166.746 92.1435 167.104 92.4957 167.358C92.8518 167.612 93.2704 167.739 93.7514 167.739C94.0734 167.739 94.3651 167.68 94.6264 167.562C94.8916 167.441 95.1132 167.269 95.2912 167.045C95.473 166.822 95.5999 166.553 95.6719 166.239H97.3253C97.2647 166.803 97.081 167.307 96.7741 167.75C96.4673 168.193 96.0563 168.542 95.5412 168.795C95.0298 169.049 94.4295 169.176 93.7401 169.176ZM102.903 169.176C102.044 169.176 101.303 168.992 100.682 168.625C100.064 168.254 99.5871 167.733 99.25 167.062C98.9167 166.388 98.75 165.598 98.75 164.693C98.75 163.799 98.9167 163.011 99.25 162.33C99.5871 161.648 100.057 161.116 100.659 160.733C101.265 160.35 101.973 160.159 102.784 160.159C103.277 160.159 103.754 160.241 104.216 160.403C104.678 160.566 105.093 160.822 105.46 161.17C105.828 161.519 106.117 161.972 106.33 162.528C106.542 163.081 106.648 163.754 106.648 164.545V165.148H99.7102V163.875H104.983C104.983 163.428 104.892 163.032 104.71 162.688C104.528 162.339 104.273 162.064 103.943 161.864C103.617 161.663 103.235 161.562 102.795 161.562C102.318 161.562 101.902 161.68 101.545 161.915C101.193 162.146 100.92 162.449 100.727 162.824C100.538 163.195 100.443 163.598 100.443 164.034V165.028C100.443 165.612 100.545 166.108 100.75 166.517C100.958 166.926 101.248 167.239 101.619 167.455C101.991 167.667 102.424 167.773 102.92 167.773C103.242 167.773 103.536 167.727 103.801 167.636C104.066 167.542 104.295 167.402 104.489 167.216C104.682 167.03 104.83 166.801 104.932 166.528L106.54 166.818C106.411 167.292 106.18 167.706 105.847 168.062C105.517 168.415 105.102 168.689 104.602 168.886C104.106 169.08 103.54 169.176 102.903 169.176Z",fill:"white"}),reactExports.createElement("path",{d:"M117.604 47.2627L121.523 45H135.79V86.8617H121.523L106.188 78.0079L106.188 53.8537L108.006 52.8045L111.206 54.652L109.388 55.7013V76.1604L122.381 83.6617H132.59V48.2H122.381L120.804 49.1102L117.604 47.2627Z",fill:"url(#paint1_linear_1410_22507)"}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.1604V55.7013L106.409 48.2H96.2V83.6617H106.409L107.991 82.7486L111.191 84.5961L107.267 86.8617H93V45H107.267L122.602 53.8537V78.0079L120.789 79.0543L117.589 77.2068L119.402 76.1604Z",fill:"url(#paint2_linear_1410_22507)"}),reactExports.createElement("g",{clipPath:"url(#clip0_1410_22507)"},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.9284 216.089L51.9616 218.941H49.4587L50.487 216.099C50.5226 216 50.5582 215.888 50.5938 215.761C50.6326 215.635 50.6697 215.498 50.7053 215.352C50.7797 215.649 50.8541 215.894 50.9284 216.089ZM53.2082 221.68H54.0037L51.2292 214.328H50.1863L47.4118 221.68H48.2073C48.2946 221.68 48.369 221.654 48.4304 221.603C48.4919 221.549 48.5339 221.489 48.5565 221.424L49.1725 219.719H52.2429L52.8589 221.424C52.8848 221.499 52.9269 221.561 52.9851 221.608C53.0433 221.656 53.1176 221.68 53.2082 221.68ZM58.031 220.717C57.8466 220.782 57.6235 220.815 57.3616 220.815H55.9064V218.362H57.3616C57.8628 218.362 58.2331 218.468 58.4724 218.68C58.7117 218.888 58.8313 219.175 58.8313 219.54C58.8313 219.724 58.8038 219.895 58.7488 220.052C58.6939 220.205 58.6066 220.339 58.4869 220.451C58.3705 220.564 58.2185 220.653 58.031 220.717ZM55.9064 217.589V215.183H57.1433C57.6413 215.183 58.0083 215.278 58.2444 215.469C58.4804 215.661 58.5985 215.966 58.5985 216.386C58.5985 216.755 58.474 217.048 58.225 217.267C57.9792 217.482 57.6025 217.589 57.0948 217.589H55.9064ZM58.2638 214.461C57.9534 214.372 57.5799 214.328 57.1433 214.328H54.8733V221.68H57.381C57.7723 221.68 58.1215 221.629 58.4287 221.526C58.7359 221.424 58.9946 221.279 59.2048 221.091C59.415 220.903 59.5751 220.682 59.685 220.426C59.7949 220.166 59.8499 219.879 59.8499 219.565C59.8499 218.661 59.3438 218.103 58.3317 217.891C58.5516 217.816 58.7424 217.722 58.9041 217.61C59.0657 217.497 59.1999 217.371 59.3067 217.231C59.4134 217.087 59.4926 216.934 59.5443 216.77C59.5961 216.606 59.6219 216.435 59.6219 216.258C59.6219 215.958 59.5734 215.69 59.4764 215.454C59.3826 215.215 59.2355 215.012 59.035 214.845C58.8345 214.678 58.5775 214.55 58.2638 214.461ZM65.7988 215.239H63.5869V221.68H62.5586V215.239H60.3371V214.328H65.7988V215.239ZM68.2377 215.803H67.1074V216.996H68.2377V215.803ZM67.1074 218.786H68.2377V219.979H67.1074V218.786Z",fill:"white",fillOpacity:.8}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.2472 221.771V214H32.141C33.1319 214.072 33.9063 214.944 33.9063 215.998V219.768C33.9063 220.874 33.0569 221.771 32.0091 221.771H28.2472ZM36.3546 214H35.3436V221.783H36.3546V214ZM29.2582 220.704V215.062H32.0091C32.4986 215.062 32.8953 215.481 32.8953 215.998V219.768C32.8953 220.285 32.4986 220.704 32.0091 220.704H29.2582ZM37.7748 214V221.771H41.5367C42.5845 221.771 43.4339 220.874 43.4339 219.768V215.998C43.4339 214.944 42.6595 214.072 41.6686 214H37.7748ZM44.7205 215.803H45.8508V216.996H44.7205V215.803ZM45.8508 218.786H44.7205V219.979H45.8508V218.786ZM38.7858 215.062V220.704H41.5367C42.0262 220.704 42.4229 220.285 42.4229 219.768V215.998C42.4229 215.481 42.0262 215.062 41.5367 215.062H38.7858Z",fill:"white"})),reactExports.createElement("circle",{cx:191.32,cy:218,r:10,fill:"url(#paint3_radial_1410_22507)"}),reactExports.createElement("path",{d:"M192.064 213.333L193.04 212.769H196.594V223.196H193.308C193.133 223.196 192.96 223.15 192.808 223.062L189.22 220.991L189.22 214.975L189.673 214.713L190.47 215.173L190.017 215.435V220.531L193.254 222.399H195.797V213.566H193.254L192.861 213.793L192.064 213.333Z",fill:"white"}),reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531V215.435L189.275 213.566H186.732V222.399H189.275L189.669 222.172L190.466 222.632L189.489 223.196H185.935V212.769H189.489L193.309 214.975V220.991L192.857 221.252L192.06 220.791L192.512 220.531Z",fill:"white"})))),_defs||(_defs=reactExports.createElement("defs",null,reactExports.createElement("filter",{id:"filter0_d_1410_22507",x:0,y:0,width:228,height:258,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},reactExports.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),reactExports.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),reactExports.createElement("feOffset",{dy:2}),reactExports.createElement("feGaussianBlur",{stdDeviation:2}),reactExports.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),reactExports.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),reactExports.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),reactExports.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})),reactExports.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},reactExports.createElement("use",{xlinkHref:"#image0_1410_22507",transform:"scale(0.00454545 0.0078125)"})),reactExports.createElement("linearGradient",{id:"paint0_linear_1410_22507",x1:114,y1:130,x2:114,y2:252,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"#101010"}),reactExports.createElement("stop",{offset:1,stopColor:"#272727"})),reactExports.createElement("linearGradient",{id:"paint1_linear_1410_22507",x1:120.989,y1:45,x2:120.989,y2:86.8617,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"white",stopOpacity:.4}),reactExports.createElement("stop",{offset:1,stopColor:"white"})),reactExports.createElement("linearGradient",{id:"paint2_linear_1410_22507",x1:107.801,y1:45,x2:107.801,y2:86.8617,gradientUnits:"userSpaceOnUse"},reactExports.createElement("stop",{stopColor:"white"}),reactExports.createElement("stop",{offset:1,stopColor:"white",stopOpacity:.4})),reactExports.createElement("radialGradient",{id:"paint3_radial_1410_22507",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(183.166 221) rotate(-27.2864) scale(19.1285 15.2161)"},reactExports.createElement("stop",{stopColor:"#016BED"}),reactExports.createElement("stop",{offset:.69919,stopColor:"#4498FB"}),reactExports.createElement("stop",{offset:1,stopColor:"#9DFFE8"})),reactExports.createElement("clipPath",{id:"clip0_1410_22507"},reactExports.createElement("rect",{width:40.32,height:8,fill:"white",transform:"translate(28 214)"})),reactExports.createElement("image",{id:"image0_1410_22507",width:220,height:128,xlinkHref:"data:image/png;base64,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"}))))},_circle$2,_circle2$2;function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$3.apply(null,arguments)}var SvgSpaceConnected=function _(C){return reactExports.createElement("svg",_extends$3({width:10,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle$2||(_circle$2=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#d1fae5"})),_circle2$2||(_circle2$2=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#25C99B"})))},_circle$1,_circle2$1;function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$2.apply(null,arguments)}var SvgSpaceDisconnect=function _(C){return reactExports.createElement("svg",_extends$2({width:10,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle$1||(_circle$1=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#f3f4f6"})),_circle2$1||(_circle2$1=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#6b7280"})))},_circle,_circle2;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(_){for(var C=1;C<arguments.length;C++){var T=arguments[C];for(var I in T)({}).hasOwnProperty.call(T,I)&&(_[I]=T[I])}return _},_extends$1.apply(null,arguments)}var SvgSpaceConnectError=function _(C){return reactExports.createElement("svg",_extends$1({width:10,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg"},C),_circle||(_circle=reactExports.createElement("circle",{cx:5,cy:5,r:5,fill:"#ffe4e6"})),_circle2||(_circle2=reactExports.createElement("circle",{cx:5,cy:5,r:2.5,fill:"#e11d48"})))};SvgEmptySpaceNft.displayName="EmptySpacesNFTIcon";SvgSpaceConnected.displayName="SpacesConnectedIcon";SvgSpaceDisconnect.displayName="SpaceDisconnectedIcon";SvgSpaceConnectError.displayName="SpaceConnectErrorIcon";var CloseOutlined={},_interopRequireDefault$3=interopRequireDefaultExports;Object.defineProperty(CloseOutlined,"__esModule",{value:!0});var default_1$2=CloseOutlined.default=void 0,_createSvgIcon$2=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports;default_1$2=CloseOutlined.default=(0,_createSvgIcon$2.default)((0,_jsxRuntime$3.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined");function DIDSpaceNFTPreview({src:_,width:C="58px",height:T="58px"}){const[I,M]=reactExports.useState(!1),D=()=>M(!0),B=()=>M(!1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{style:{position:"relative"},onClick:D,children:[jsxRuntimeExports.jsx("object",{data:_,width:C,height:T,children:jsxRuntimeExports.jsx(SvgEmptySpaceNft,{viewBox:"0 0 228 258",style:{cursor:"pointer",width:C,height:T}})}),jsxRuntimeExports.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:"1",cursor:"pointer"},onClick:D})]}),jsxRuntimeExports.jsx(Dialog$1,{open:I,onClose:B,"aria-labelledby":"preview-space-nft-display","aria-describedby":"preview space nft display",fullWidth:!0,maxWidth:"md",children:jsxRuntimeExports.jsxs(DialogContent,{style:{padding:"8px 8px",backgroundColor:"rgba(0,0,0,0.8)"},children:[jsxRuntimeExports.jsx(IconButton,{color:"inherit",onClick:B,"aria-label":"close",style:{position:"absolute",top:8,right:8,color:"white"},children:jsxRuntimeExports.jsx(default_1$2,{})}),"(",jsxRuntimeExports.jsx("object",{data:_,style:{width:"100%",height:"75vh",objectFit:"contain"},children:jsxRuntimeExports.jsx(SvgEmptySpaceNft,{viewBox:"0 0 228 258",style:{width:"100%",height:"75vh"}})}),")"]})})]})}var TreeModelType;(function(_){_[_.FOLDER=0]="FOLDER",_[_.FILE=1]="FILE"})(TreeModelType||(TreeModelType={}));var util;(function(_){_.assertEqual=M=>M;function C(M){}_.assertIs=C;function T(M){throw new Error}_.assertNever=T,_.arrayToEnum=M=>{const D={};for(const B of M)D[B]=B;return D},_.getValidEnumValues=M=>{const D=_.objectKeys(M).filter(L=>typeof M[M[L]]!="number"),B={};for(const L of D)B[L]=M[L];return _.objectValues(B)},_.objectValues=M=>_.objectKeys(M).map(function(D){return M[D]}),_.objectKeys=typeof Object.keys=="function"?M=>Object.keys(M):M=>{const D=[];for(const B in M)Object.prototype.hasOwnProperty.call(M,B)&&D.push(B);return D},_.find=(M,D)=>{for(const B of M)if(D(B))return B},_.isInteger=typeof Number.isInteger=="function"?M=>Number.isInteger(M):M=>typeof M=="number"&&isFinite(M)&&Math.floor(M)===M;function I(M,D=" | "){return M.map(B=>typeof B=="string"?`'${B}'`:B).join(D)}_.joinValues=I,_.jsonStringifyReplacer=(M,D)=>typeof D=="bigint"?D.toString():D})(util||(util={}));var objectUtil;(function(_){_.mergeShapes=(C,T)=>({...C,...T})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=_=>{switch(typeof _){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(_)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(_)?ZodParsedType.array:_===null?ZodParsedType.null:_.then&&typeof _.then=="function"&&_.catch&&typeof _.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&_ instanceof Map?ZodParsedType.map:typeof Set<"u"&&_ instanceof Set?ZodParsedType.set:typeof Date<"u"&&_ instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=_=>JSON.stringify(_,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(C){super(),this.issues=[],this.addIssue=I=>{this.issues=[...this.issues,I]},this.addIssues=(I=[])=>{this.issues=[...this.issues,...I]};const T=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,T):this.__proto__=T,this.name="ZodError",this.issues=C}format(C){const T=C||function(D){return D.message},I={_errors:[]},M=D=>{for(const B of D.issues)if(B.code==="invalid_union")B.unionErrors.map(M);else if(B.code==="invalid_return_type")M(B.returnTypeError);else if(B.code==="invalid_arguments")M(B.argumentsError);else if(B.path.length===0)I._errors.push(T(B));else{let L=I,N=0;for(;N<B.path.length;){const V=B.path[N];N===B.path.length-1?(L[V]=L[V]||{_errors:[]},L[V]._errors.push(T(B))):L[V]=L[V]||{_errors:[]},L=L[V],N++}}};return M(this),I}static assert(C){if(!(C instanceof ZodError))throw new Error(`Not a ZodError: ${C}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(C=T=>T.message){const T={},I=[];for(const M of this.issues)M.path.length>0?(T[M.path[0]]=T[M.path[0]]||[],T[M.path[0]].push(C(M))):I.push(C(M));return{formErrors:I,fieldErrors:T}}get formErrors(){return this.flatten()}}ZodError.create=_=>new ZodError(_);const errorMap=(_,C)=>{let T;switch(_.code){case ZodIssueCode.invalid_type:_.received===ZodParsedType.undefined?T="Required":T=`Expected ${_.expected}, received ${_.received}`;break;case ZodIssueCode.invalid_literal:T=`Invalid literal value, expected ${JSON.stringify(_.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:T=`Unrecognized key(s) in object: ${util.joinValues(_.keys,", ")}`;break;case ZodIssueCode.invalid_union:T="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:T=`Invalid discriminator value. Expected ${util.joinValues(_.options)}`;break;case ZodIssueCode.invalid_enum_value:T=`Invalid enum value. Expected ${util.joinValues(_.options)}, received '${_.received}'`;break;case ZodIssueCode.invalid_arguments:T="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:T="Invalid function return type";break;case ZodIssueCode.invalid_date:T="Invalid date";break;case ZodIssueCode.invalid_string:typeof _.validation=="object"?"includes"in _.validation?(T=`Invalid input: must include "${_.validation.includes}"`,typeof _.validation.position=="number"&&(T=`${T} at one or more positions greater than or equal to ${_.validation.position}`)):"startsWith"in _.validation?T=`Invalid input: must start with "${_.validation.startsWith}"`:"endsWith"in _.validation?T=`Invalid input: must end with "${_.validation.endsWith}"`:util.assertNever(_.validation):_.validation!=="regex"?T=`Invalid ${_.validation}`:T="Invalid";break;case ZodIssueCode.too_small:_.type==="array"?T=`Array must contain ${_.exact?"exactly":_.inclusive?"at least":"more than"} ${_.minimum} element(s)`:_.type==="string"?T=`String must contain ${_.exact?"exactly":_.inclusive?"at least":"over"} ${_.minimum} character(s)`:_.type==="number"?T=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`:_.type==="date"?T=`Date must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_.minimum))}`:T="Invalid input";break;case ZodIssueCode.too_big:_.type==="array"?T=`Array must contain ${_.exact?"exactly":_.inclusive?"at most":"less than"} ${_.maximum} element(s)`:_.type==="string"?T=`String must contain ${_.exact?"exactly":_.inclusive?"at most":"under"} ${_.maximum} character(s)`:_.type==="number"?T=`Number must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`:_.type==="bigint"?T=`BigInt must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`:_.type==="date"?T=`Date must be ${_.exact?"exactly":_.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_.maximum))}`:T="Invalid input";break;case ZodIssueCode.custom:T="Invalid input";break;case ZodIssueCode.invalid_intersection_types:T="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:T=`Number must be a multiple of ${_.multipleOf}`;break;case ZodIssueCode.not_finite:T="Number must be finite";break;default:T=C.defaultError,util.assertNever(_)}return{message:T}};let overrideErrorMap=errorMap;function setErrorMap(_){overrideErrorMap=_}function getErrorMap(){return overrideErrorMap}const makeIssue=_=>{const{data:C,path:T,errorMaps:I,issueData:M}=_,D=[...T,...M.path||[]],B={...M,path:D};if(M.message!==void 0)return{...M,path:D,message:M.message};let L="";const N=I.filter(V=>!!V).slice().reverse();for(const V of N)L=V(B,{data:C,defaultError:L}).message;return{...M,path:D,message:L}},EMPTY_PATH=[];function addIssueToContext(_,C){const T=getErrorMap(),I=makeIssue({issueData:C,data:_.data,path:_.path,errorMaps:[_.common.contextualErrorMap,_.schemaErrorMap,T,T===errorMap?void 0:errorMap].filter(M=>!!M)});_.common.issues.push(I)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(C,T){const I=[];for(const M of T){if(M.status==="aborted")return INVALID;M.status==="dirty"&&C.dirty(),I.push(M.value)}return{status:C.value,value:I}}static async mergeObjectAsync(C,T){const I=[];for(const M of T){const D=await M.key,B=await M.value;I.push({key:D,value:B})}return ParseStatus.mergeObjectSync(C,I)}static mergeObjectSync(C,T){const I={};for(const M of T){const{key:D,value:B}=M;if(D.status==="aborted"||B.status==="aborted")return INVALID;D.status==="dirty"&&C.dirty(),B.status==="dirty"&&C.dirty(),D.value!=="__proto__"&&(typeof B.value<"u"||M.alwaysSet)&&(I[D.value]=B.value)}return{status:C.value,value:I}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=_=>({status:"dirty",value:_}),OK=_=>({status:"valid",value:_}),isAborted=_=>_.status==="aborted",isDirty=_=>_.status==="dirty",isValid=_=>_.status==="valid",isAsync=_=>typeof Promise<"u"&&_ instanceof Promise;function __classPrivateFieldGet(_,C,T,I){if(typeof C=="function"?_!==C||!I:!C.has(_))throw new TypeError("Cannot read private member from an object whose class did not declare it");return C.get(_)}function __classPrivateFieldSet(_,C,T,I,M){if(typeof C=="function"?_!==C||!M:!C.has(_))throw new TypeError("Cannot write private member to an object whose class did not declare it");return C.set(_,T),T}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(_){_.errToObj=C=>typeof C=="string"?{message:C}:C||{},_.toString=C=>typeof C=="string"?C:C==null?void 0:C.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(C,T,I,M){this._cachedPath=[],this.parent=C,this.data=T,this._path=I,this._key=M}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(_,C)=>{if(isValid(C))return{success:!0,data:C.value};if(!_.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const T=new ZodError(_.common.issues);return this._error=T,this._error}}};function processCreateParams(_){if(!_)return{};const{errorMap:C,invalid_type_error:T,required_error:I,description:M}=_;if(C&&(T||I))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return C?{errorMap:C,description:M}:{errorMap:(B,L)=>{var N,V;const{message:F}=_;return B.code==="invalid_enum_value"?{message:F??L.defaultError}:typeof L.data>"u"?{message:(N=F??I)!==null&&N!==void 0?N:L.defaultError}:B.code!=="invalid_type"?{message:L.defaultError}:{message:(V=F??T)!==null&&V!==void 0?V:L.defaultError}},description:M}}class ZodType{get description(){return this._def.description}_getType(C){return getParsedType(C.data)}_getOrReturnCtx(C,T){return T||{common:C.parent.common,data:C.data,parsedType:getParsedType(C.data),schemaErrorMap:this._def.errorMap,path:C.path,parent:C.parent}}_processInputParams(C){return{status:new ParseStatus,ctx:{common:C.parent.common,data:C.data,parsedType:getParsedType(C.data),schemaErrorMap:this._def.errorMap,path:C.path,parent:C.parent}}}_parseSync(C){const T=this._parse(C);if(isAsync(T))throw new Error("Synchronous parse encountered promise.");return T}_parseAsync(C){const T=this._parse(C);return Promise.resolve(T)}parse(C,T){const I=this.safeParse(C,T);if(I.success)return I.data;throw I.error}safeParse(C,T){var I;const M={common:{issues:[],async:(I=T==null?void 0:T.async)!==null&&I!==void 0?I:!1,contextualErrorMap:T==null?void 0:T.errorMap},path:(T==null?void 0:T.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)},D=this._parseSync({data:C,path:M.path,parent:M});return handleResult(M,D)}"~validate"(C){var T,I;const M={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)};if(!this["~standard"].async)try{const D=this._parseSync({data:C,path:[],parent:M});return isValid(D)?{value:D.value}:{issues:M.common.issues}}catch(D){!((I=(T=D==null?void 0:D.message)===null||T===void 0?void 0:T.toLowerCase())===null||I===void 0)&&I.includes("encountered")&&(this["~standard"].async=!0),M.common={issues:[],async:!0}}return this._parseAsync({data:C,path:[],parent:M}).then(D=>isValid(D)?{value:D.value}:{issues:M.common.issues})}async parseAsync(C,T){const I=await this.safeParseAsync(C,T);if(I.success)return I.data;throw I.error}async safeParseAsync(C,T){const I={common:{issues:[],contextualErrorMap:T==null?void 0:T.errorMap,async:!0},path:(T==null?void 0:T.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:C,parsedType:getParsedType(C)},M=this._parse({data:C,path:I.path,parent:I}),D=await(isAsync(M)?M:Promise.resolve(M));return handleResult(I,D)}refine(C,T){const I=M=>typeof T=="string"||typeof T>"u"?{message:T}:typeof T=="function"?T(M):T;return this._refinement((M,D)=>{const B=C(M),L=()=>D.addIssue({code:ZodIssueCode.custom,...I(M)});return typeof Promise<"u"&&B instanceof Promise?B.then(N=>N?!0:(L(),!1)):B?!0:(L(),!1)})}refinement(C,T){return this._refinement((I,M)=>C(I)?!0:(M.addIssue(typeof T=="function"?T(I,M):T),!1))}_refinement(C){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:C}})}superRefine(C){return this._refinement(C)}constructor(C){this.spa=this.safeParseAsync,this._def=C,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:T=>this["~validate"](T)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(C){return ZodUnion.create([this,C],this._def)}and(C){return ZodIntersection.create(this,C,this._def)}transform(C){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:C}})}default(C){const T=typeof C=="function"?C:()=>C;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:T,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(C){const T=typeof C=="function"?C:()=>C;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:T,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(C){const T=this.constructor;return new T({...this._def,description:C})}pipe(C){return ZodPipeline.create(this,C)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(_){let C="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return _.precision?C=`${C}\\.\\d{${_.precision}}`:_.precision==null&&(C=`${C}(\\.\\d+)?`),C}function timeRegex(_){return new RegExp(`^${timeRegexSource(_)}$`)}function datetimeRegex(_){let C=`${dateRegexSource}T${timeRegexSource(_)}`;const T=[];return T.push(_.local?"Z?":"Z"),_.offset&&T.push("([+-]\\d{2}:?\\d{2})"),C=`${C}(${T.join("|")})`,new RegExp(`^${C}$`)}function isValidIP(_,C){return!!((C==="v4"||!C)&&ipv4Regex.test(_)||(C==="v6"||!C)&&ipv6Regex.test(_))}function isValidJWT(_,C){if(!jwtRegex.test(_))return!1;try{const[T]=_.split("."),I=T.replace(/-/g,"+").replace(/_/g,"/").padEnd(T.length+(4-T.length%4)%4,"="),M=JSON.parse(atob(I));return!(typeof M!="object"||M===null||!M.typ||!M.alg||C&&M.alg!==C)}catch{return!1}}function isValidCidr(_,C){return!!((C==="v4"||!C)&&ipv4CidrRegex.test(_)||(C==="v6"||!C)&&ipv6CidrRegex.test(_))}class ZodString extends ZodType{_parse(C){if(this._def.coerce&&(C.data=String(C.data)),this._getType(C)!==ZodParsedType.string){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:D.parsedType}),INVALID}const I=new ParseStatus;let M;for(const D of this._def.checks)if(D.kind==="min")C.data.length<D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_small,minimum:D.value,type:"string",inclusive:!0,exact:!1,message:D.message}),I.dirty());else if(D.kind==="max")C.data.length>D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_big,maximum:D.value,type:"string",inclusive:!0,exact:!1,message:D.message}),I.dirty());else if(D.kind==="length"){const B=C.data.length>D.value,L=C.data.length<D.value;(B||L)&&(M=this._getOrReturnCtx(C,M),B?addIssueToContext(M,{code:ZodIssueCode.too_big,maximum:D.value,type:"string",inclusive:!0,exact:!0,message:D.message}):L&&addIssueToContext(M,{code:ZodIssueCode.too_small,minimum:D.value,type:"string",inclusive:!0,exact:!0,message:D.message}),I.dirty())}else if(D.kind==="email")emailRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"email",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="emoji")emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"emoji",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="uuid")uuidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"uuid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="nanoid")nanoidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="cuid")cuidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cuid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="cuid2")cuid2Regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="ulid")ulidRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"ulid",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty());else if(D.kind==="url")try{new URL(C.data)}catch{M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"url",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()}else D.kind==="regex"?(D.regex.lastIndex=0,D.regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"regex",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty())):D.kind==="trim"?C.data=C.data.trim():D.kind==="includes"?C.data.includes(D.value,D.position)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{includes:D.value,position:D.position},message:D.message}),I.dirty()):D.kind==="toLowerCase"?C.data=C.data.toLowerCase():D.kind==="toUpperCase"?C.data=C.data.toUpperCase():D.kind==="startsWith"?C.data.startsWith(D.value)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{startsWith:D.value},message:D.message}),I.dirty()):D.kind==="endsWith"?C.data.endsWith(D.value)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:{endsWith:D.value},message:D.message}),I.dirty()):D.kind==="datetime"?datetimeRegex(D).test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"datetime",message:D.message}),I.dirty()):D.kind==="date"?dateRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"date",message:D.message}),I.dirty()):D.kind==="time"?timeRegex(D).test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.invalid_string,validation:"time",message:D.message}),I.dirty()):D.kind==="duration"?durationRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"duration",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="ip"?isValidIP(C.data,D.version)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"ip",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="jwt"?isValidJWT(C.data,D.alg)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"jwt",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="cidr"?isValidCidr(C.data,D.version)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"cidr",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="base64"?base64Regex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"base64",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):D.kind==="base64url"?base64urlRegex.test(C.data)||(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{validation:"base64url",code:ZodIssueCode.invalid_string,message:D.message}),I.dirty()):util.assertNever(D);return{status:I.value,value:C.data}}_regex(C,T,I){return this.refinement(M=>C.test(M),{validation:T,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(I)})}_addCheck(C){return new ZodString({...this._def,checks:[...this._def.checks,C]})}email(C){return this._addCheck({kind:"email",...errorUtil.errToObj(C)})}url(C){return this._addCheck({kind:"url",...errorUtil.errToObj(C)})}emoji(C){return this._addCheck({kind:"emoji",...errorUtil.errToObj(C)})}uuid(C){return this._addCheck({kind:"uuid",...errorUtil.errToObj(C)})}nanoid(C){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(C)})}cuid(C){return this._addCheck({kind:"cuid",...errorUtil.errToObj(C)})}cuid2(C){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(C)})}ulid(C){return this._addCheck({kind:"ulid",...errorUtil.errToObj(C)})}base64(C){return this._addCheck({kind:"base64",...errorUtil.errToObj(C)})}base64url(C){return this._addCheck({kind:"base64url",...errorUtil.errToObj(C)})}jwt(C){return this._addCheck({kind:"jwt",...errorUtil.errToObj(C)})}ip(C){return this._addCheck({kind:"ip",...errorUtil.errToObj(C)})}cidr(C){return this._addCheck({kind:"cidr",...errorUtil.errToObj(C)})}datetime(C){var T,I;return typeof C=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:C}):this._addCheck({kind:"datetime",precision:typeof(C==null?void 0:C.precision)>"u"?null:C==null?void 0:C.precision,offset:(T=C==null?void 0:C.offset)!==null&&T!==void 0?T:!1,local:(I=C==null?void 0:C.local)!==null&&I!==void 0?I:!1,...errorUtil.errToObj(C==null?void 0:C.message)})}date(C){return this._addCheck({kind:"date",message:C})}time(C){return typeof C=="string"?this._addCheck({kind:"time",precision:null,message:C}):this._addCheck({kind:"time",precision:typeof(C==null?void 0:C.precision)>"u"?null:C==null?void 0:C.precision,...errorUtil.errToObj(C==null?void 0:C.message)})}duration(C){return this._addCheck({kind:"duration",...errorUtil.errToObj(C)})}regex(C,T){return this._addCheck({kind:"regex",regex:C,...errorUtil.errToObj(T)})}includes(C,T){return this._addCheck({kind:"includes",value:C,position:T==null?void 0:T.position,...errorUtil.errToObj(T==null?void 0:T.message)})}startsWith(C,T){return this._addCheck({kind:"startsWith",value:C,...errorUtil.errToObj(T)})}endsWith(C,T){return this._addCheck({kind:"endsWith",value:C,...errorUtil.errToObj(T)})}min(C,T){return this._addCheck({kind:"min",value:C,...errorUtil.errToObj(T)})}max(C,T){return this._addCheck({kind:"max",value:C,...errorUtil.errToObj(T)})}length(C,T){return this._addCheck({kind:"length",value:C,...errorUtil.errToObj(T)})}nonempty(C){return this.min(1,errorUtil.errToObj(C))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(C=>C.kind==="datetime")}get isDate(){return!!this._def.checks.find(C=>C.kind==="date")}get isTime(){return!!this._def.checks.find(C=>C.kind==="time")}get isDuration(){return!!this._def.checks.find(C=>C.kind==="duration")}get isEmail(){return!!this._def.checks.find(C=>C.kind==="email")}get isURL(){return!!this._def.checks.find(C=>C.kind==="url")}get isEmoji(){return!!this._def.checks.find(C=>C.kind==="emoji")}get isUUID(){return!!this._def.checks.find(C=>C.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(C=>C.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(C=>C.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(C=>C.kind==="cuid2")}get isULID(){return!!this._def.checks.find(C=>C.kind==="ulid")}get isIP(){return!!this._def.checks.find(C=>C.kind==="ip")}get isCIDR(){return!!this._def.checks.find(C=>C.kind==="cidr")}get isBase64(){return!!this._def.checks.find(C=>C.kind==="base64")}get isBase64url(){return!!this._def.checks.find(C=>C.kind==="base64url")}get minLength(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxLength(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}}ZodString.create=_=>{var C;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(C=_==null?void 0:_.coerce)!==null&&C!==void 0?C:!1,...processCreateParams(_)})};function floatSafeRemainder(_,C){const T=(_.toString().split(".")[1]||"").length,I=(C.toString().split(".")[1]||"").length,M=T>I?T:I,D=parseInt(_.toFixed(M).replace(".","")),B=parseInt(C.toFixed(M).replace(".",""));return D%B/Math.pow(10,M)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(C){if(this._def.coerce&&(C.data=Number(C.data)),this._getType(C)!==ZodParsedType.number){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:D.parsedType}),INVALID}let I;const M=new ParseStatus;for(const D of this._def.checks)D.kind==="int"?util.isInteger(C.data)||(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:D.message}),M.dirty()):D.kind==="min"?(D.inclusive?C.data<D.value:C.data<=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:D.value,type:"number",inclusive:D.inclusive,exact:!1,message:D.message}),M.dirty()):D.kind==="max"?(D.inclusive?C.data>D.value:C.data>=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:D.value,type:"number",inclusive:D.inclusive,exact:!1,message:D.message}),M.dirty()):D.kind==="multipleOf"?floatSafeRemainder(C.data,D.value)!==0&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_multiple_of,multipleOf:D.value,message:D.message}),M.dirty()):D.kind==="finite"?Number.isFinite(C.data)||(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_finite,message:D.message}),M.dirty()):util.assertNever(D);return{status:M.value,value:C.data}}gte(C,T){return this.setLimit("min",C,!0,errorUtil.toString(T))}gt(C,T){return this.setLimit("min",C,!1,errorUtil.toString(T))}lte(C,T){return this.setLimit("max",C,!0,errorUtil.toString(T))}lt(C,T){return this.setLimit("max",C,!1,errorUtil.toString(T))}setLimit(C,T,I,M){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:C,value:T,inclusive:I,message:errorUtil.toString(M)}]})}_addCheck(C){return new ZodNumber({...this._def,checks:[...this._def.checks,C]})}int(C){return this._addCheck({kind:"int",message:errorUtil.toString(C)})}positive(C){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(C)})}negative(C){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(C)})}nonpositive(C){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(C)})}nonnegative(C){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(C)})}multipleOf(C,T){return this._addCheck({kind:"multipleOf",value:C,message:errorUtil.toString(T)})}finite(C){return this._addCheck({kind:"finite",message:errorUtil.toString(C)})}safe(C){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(C)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(C)})}get minValue(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxValue(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}get isInt(){return!!this._def.checks.find(C=>C.kind==="int"||C.kind==="multipleOf"&&util.isInteger(C.value))}get isFinite(){let C=null,T=null;for(const I of this._def.checks){if(I.kind==="finite"||I.kind==="int"||I.kind==="multipleOf")return!0;I.kind==="min"?(T===null||I.value>T)&&(T=I.value):I.kind==="max"&&(C===null||I.value<C)&&(C=I.value)}return Number.isFinite(T)&&Number.isFinite(C)}}ZodNumber.create=_=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(_==null?void 0:_.coerce)||!1,...processCreateParams(_)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(C){if(this._def.coerce)try{C.data=BigInt(C.data)}catch{return this._getInvalidInput(C)}if(this._getType(C)!==ZodParsedType.bigint)return this._getInvalidInput(C);let I;const M=new ParseStatus;for(const D of this._def.checks)D.kind==="min"?(D.inclusive?C.data<D.value:C.data<=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_small,type:"bigint",minimum:D.value,inclusive:D.inclusive,message:D.message}),M.dirty()):D.kind==="max"?(D.inclusive?C.data>D.value:C.data>=D.value)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.too_big,type:"bigint",maximum:D.value,inclusive:D.inclusive,message:D.message}),M.dirty()):D.kind==="multipleOf"?C.data%D.value!==BigInt(0)&&(I=this._getOrReturnCtx(C,I),addIssueToContext(I,{code:ZodIssueCode.not_multiple_of,multipleOf:D.value,message:D.message}),M.dirty()):util.assertNever(D);return{status:M.value,value:C.data}}_getInvalidInput(C){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:T.parsedType}),INVALID}gte(C,T){return this.setLimit("min",C,!0,errorUtil.toString(T))}gt(C,T){return this.setLimit("min",C,!1,errorUtil.toString(T))}lte(C,T){return this.setLimit("max",C,!0,errorUtil.toString(T))}lt(C,T){return this.setLimit("max",C,!1,errorUtil.toString(T))}setLimit(C,T,I,M){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:C,value:T,inclusive:I,message:errorUtil.toString(M)}]})}_addCheck(C){return new ZodBigInt({...this._def,checks:[...this._def.checks,C]})}positive(C){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(C)})}negative(C){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(C)})}nonpositive(C){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(C)})}nonnegative(C){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(C)})}multipleOf(C,T){return this._addCheck({kind:"multipleOf",value:C,message:errorUtil.toString(T)})}get minValue(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C}get maxValue(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C}}ZodBigInt.create=_=>{var C;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(C=_==null?void 0:_.coerce)!==null&&C!==void 0?C:!1,...processCreateParams(_)})};class ZodBoolean extends ZodType{_parse(C){if(this._def.coerce&&(C.data=!!C.data),this._getType(C)!==ZodParsedType.boolean){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:I.parsedType}),INVALID}return OK(C.data)}}ZodBoolean.create=_=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(_==null?void 0:_.coerce)||!1,...processCreateParams(_)});class ZodDate extends ZodType{_parse(C){if(this._def.coerce&&(C.data=new Date(C.data)),this._getType(C)!==ZodParsedType.date){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:D.parsedType}),INVALID}if(isNaN(C.data.getTime())){const D=this._getOrReturnCtx(C);return addIssueToContext(D,{code:ZodIssueCode.invalid_date}),INVALID}const I=new ParseStatus;let M;for(const D of this._def.checks)D.kind==="min"?C.data.getTime()<D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_small,message:D.message,inclusive:!0,exact:!1,minimum:D.value,type:"date"}),I.dirty()):D.kind==="max"?C.data.getTime()>D.value&&(M=this._getOrReturnCtx(C,M),addIssueToContext(M,{code:ZodIssueCode.too_big,message:D.message,inclusive:!0,exact:!1,maximum:D.value,type:"date"}),I.dirty()):util.assertNever(D);return{status:I.value,value:new Date(C.data.getTime())}}_addCheck(C){return new ZodDate({...this._def,checks:[...this._def.checks,C]})}min(C,T){return this._addCheck({kind:"min",value:C.getTime(),message:errorUtil.toString(T)})}max(C,T){return this._addCheck({kind:"max",value:C.getTime(),message:errorUtil.toString(T)})}get minDate(){let C=null;for(const T of this._def.checks)T.kind==="min"&&(C===null||T.value>C)&&(C=T.value);return C!=null?new Date(C):null}get maxDate(){let C=null;for(const T of this._def.checks)T.kind==="max"&&(C===null||T.value<C)&&(C=T.value);return C!=null?new Date(C):null}}ZodDate.create=_=>new ZodDate({checks:[],coerce:(_==null?void 0:_.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(_)});class ZodSymbol extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.symbol){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:I.parsedType}),INVALID}return OK(C.data)}}ZodSymbol.create=_=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(_)});class ZodUndefined extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.undefined){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:I.parsedType}),INVALID}return OK(C.data)}}ZodUndefined.create=_=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(_)});class ZodNull extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.null){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:I.parsedType}),INVALID}return OK(C.data)}}ZodNull.create=_=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(_)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(C){return OK(C.data)}}ZodAny.create=_=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(_)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(C){return OK(C.data)}}ZodUnknown.create=_=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(_)});class ZodNever extends ZodType{_parse(C){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:T.parsedType}),INVALID}}ZodNever.create=_=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(_)});class ZodVoid extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.undefined){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:I.parsedType}),INVALID}return OK(C.data)}}ZodVoid.create=_=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(_)});class ZodArray extends ZodType{_parse(C){const{ctx:T,status:I}=this._processInputParams(C),M=this._def;if(T.parsedType!==ZodParsedType.array)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:T.parsedType}),INVALID;if(M.exactLength!==null){const B=T.data.length>M.exactLength.value,L=T.data.length<M.exactLength.value;(B||L)&&(addIssueToContext(T,{code:B?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:L?M.exactLength.value:void 0,maximum:B?M.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:M.exactLength.message}),I.dirty())}if(M.minLength!==null&&T.data.length<M.minLength.value&&(addIssueToContext(T,{code:ZodIssueCode.too_small,minimum:M.minLength.value,type:"array",inclusive:!0,exact:!1,message:M.minLength.message}),I.dirty()),M.maxLength!==null&&T.data.length>M.maxLength.value&&(addIssueToContext(T,{code:ZodIssueCode.too_big,maximum:M.maxLength.value,type:"array",inclusive:!0,exact:!1,message:M.maxLength.message}),I.dirty()),T.common.async)return Promise.all([...T.data].map((B,L)=>M.type._parseAsync(new ParseInputLazyPath(T,B,T.path,L)))).then(B=>ParseStatus.mergeArray(I,B));const D=[...T.data].map((B,L)=>M.type._parseSync(new ParseInputLazyPath(T,B,T.path,L)));return ParseStatus.mergeArray(I,D)}get element(){return this._def.type}min(C,T){return new ZodArray({...this._def,minLength:{value:C,message:errorUtil.toString(T)}})}max(C,T){return new ZodArray({...this._def,maxLength:{value:C,message:errorUtil.toString(T)}})}length(C,T){return new ZodArray({...this._def,exactLength:{value:C,message:errorUtil.toString(T)}})}nonempty(C){return this.min(1,C)}}ZodArray.create=(_,C)=>new ZodArray({type:_,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(C)});function deepPartialify(_){if(_ instanceof ZodObject){const C={};for(const T in _.shape){const I=_.shape[T];C[T]=ZodOptional.create(deepPartialify(I))}return new ZodObject({..._._def,shape:()=>C})}else return _ instanceof ZodArray?new ZodArray({..._._def,type:deepPartialify(_.element)}):_ instanceof ZodOptional?ZodOptional.create(deepPartialify(_.unwrap())):_ instanceof ZodNullable?ZodNullable.create(deepPartialify(_.unwrap())):_ instanceof ZodTuple?ZodTuple.create(_.items.map(C=>deepPartialify(C))):_}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const C=this._def.shape(),T=util.objectKeys(C);return this._cached={shape:C,keys:T}}_parse(C){if(this._getType(C)!==ZodParsedType.object){const V=this._getOrReturnCtx(C);return addIssueToContext(V,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:V.parsedType}),INVALID}const{status:I,ctx:M}=this._processInputParams(C),{shape:D,keys:B}=this._getCached(),L=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const V in M.data)B.includes(V)||L.push(V);const N=[];for(const V of B){const F=D[V],U=M.data[V];N.push({key:{status:"valid",value:V},value:F._parse(new ParseInputLazyPath(M,U,M.path,V)),alwaysSet:V in M.data})}if(this._def.catchall instanceof ZodNever){const V=this._def.unknownKeys;if(V==="passthrough")for(const F of L)N.push({key:{status:"valid",value:F},value:{status:"valid",value:M.data[F]}});else if(V==="strict")L.length>0&&(addIssueToContext(M,{code:ZodIssueCode.unrecognized_keys,keys:L}),I.dirty());else if(V!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const V=this._def.catchall;for(const F of L){const U=M.data[F];N.push({key:{status:"valid",value:F},value:V._parse(new ParseInputLazyPath(M,U,M.path,F)),alwaysSet:F in M.data})}}return M.common.async?Promise.resolve().then(async()=>{const V=[];for(const F of N){const U=await F.key,H=await F.value;V.push({key:U,value:H,alwaysSet:F.alwaysSet})}return V}).then(V=>ParseStatus.mergeObjectSync(I,V)):ParseStatus.mergeObjectSync(I,N)}get shape(){return this._def.shape()}strict(C){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...C!==void 0?{errorMap:(T,I)=>{var M,D,B,L;const N=(B=(D=(M=this._def).errorMap)===null||D===void 0?void 0:D.call(M,T,I).message)!==null&&B!==void 0?B:I.defaultError;return T.code==="unrecognized_keys"?{message:(L=errorUtil.errToObj(C).message)!==null&&L!==void 0?L:N}:{message:N}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(C){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...C})})}merge(C){return new ZodObject({unknownKeys:C._def.unknownKeys,catchall:C._def.catchall,shape:()=>({...this._def.shape(),...C._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(C,T){return this.augment({[C]:T})}catchall(C){return new ZodObject({...this._def,catchall:C})}pick(C){const T={};return util.objectKeys(C).forEach(I=>{C[I]&&this.shape[I]&&(T[I]=this.shape[I])}),new ZodObject({...this._def,shape:()=>T})}omit(C){const T={};return util.objectKeys(this.shape).forEach(I=>{C[I]||(T[I]=this.shape[I])}),new ZodObject({...this._def,shape:()=>T})}deepPartial(){return deepPartialify(this)}partial(C){const T={};return util.objectKeys(this.shape).forEach(I=>{const M=this.shape[I];C&&!C[I]?T[I]=M:T[I]=M.optional()}),new ZodObject({...this._def,shape:()=>T})}required(C){const T={};return util.objectKeys(this.shape).forEach(I=>{if(C&&!C[I])T[I]=this.shape[I];else{let D=this.shape[I];for(;D instanceof ZodOptional;)D=D._def.innerType;T[I]=D}}),new ZodObject({...this._def,shape:()=>T})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(_,C)=>new ZodObject({shape:()=>_,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});ZodObject.strictCreate=(_,C)=>new ZodObject({shape:()=>_,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});ZodObject.lazycreate=(_,C)=>new ZodObject({shape:_,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(C)});class ZodUnion extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I=this._def.options;function M(D){for(const L of D)if(L.result.status==="valid")return L.result;for(const L of D)if(L.result.status==="dirty")return T.common.issues.push(...L.ctx.common.issues),L.result;const B=D.map(L=>new ZodError(L.ctx.common.issues));return addIssueToContext(T,{code:ZodIssueCode.invalid_union,unionErrors:B}),INVALID}if(T.common.async)return Promise.all(I.map(async D=>{const B={...T,common:{...T.common,issues:[]},parent:null};return{result:await D._parseAsync({data:T.data,path:T.path,parent:B}),ctx:B}})).then(M);{let D;const B=[];for(const N of I){const V={...T,common:{...T.common,issues:[]},parent:null},F=N._parseSync({data:T.data,path:T.path,parent:V});if(F.status==="valid")return F;F.status==="dirty"&&!D&&(D={result:F,ctx:V}),V.common.issues.length&&B.push(V.common.issues)}if(D)return T.common.issues.push(...D.ctx.common.issues),D.result;const L=B.map(N=>new ZodError(N));return addIssueToContext(T,{code:ZodIssueCode.invalid_union,unionErrors:L}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(_,C)=>new ZodUnion({options:_,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(C)});const getDiscriminator=_=>_ instanceof ZodLazy?getDiscriminator(_.schema):_ instanceof ZodEffects?getDiscriminator(_.innerType()):_ instanceof ZodLiteral?[_.value]:_ instanceof ZodEnum?_.options:_ instanceof ZodNativeEnum?util.objectValues(_.enum):_ instanceof ZodDefault?getDiscriminator(_._def.innerType):_ instanceof ZodUndefined?[void 0]:_ instanceof ZodNull?[null]:_ instanceof ZodOptional?[void 0,...getDiscriminator(_.unwrap())]:_ instanceof ZodNullable?[null,...getDiscriminator(_.unwrap())]:_ instanceof ZodBranded||_ instanceof ZodReadonly?getDiscriminator(_.unwrap()):_ instanceof ZodCatch?getDiscriminator(_._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.object)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:T.parsedType}),INVALID;const I=this.discriminator,M=T.data[I],D=this.optionsMap.get(M);return D?T.common.async?D._parseAsync({data:T.data,path:T.path,parent:T}):D._parseSync({data:T.data,path:T.path,parent:T}):(addIssueToContext(T,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[I]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(C,T,I){const M=new Map;for(const D of T){const B=getDiscriminator(D.shape[C]);if(!B.length)throw new Error(`A discriminator value for key \`${C}\` could not be extracted from all schema options`);for(const L of B){if(M.has(L))throw new Error(`Discriminator property ${String(C)} has duplicate value ${String(L)}`);M.set(L,D)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:C,options:T,optionsMap:M,...processCreateParams(I)})}}function mergeValues(_,C){const T=getParsedType(_),I=getParsedType(C);if(_===C)return{valid:!0,data:_};if(T===ZodParsedType.object&&I===ZodParsedType.object){const M=util.objectKeys(C),D=util.objectKeys(_).filter(L=>M.indexOf(L)!==-1),B={..._,...C};for(const L of D){const N=mergeValues(_[L],C[L]);if(!N.valid)return{valid:!1};B[L]=N.data}return{valid:!0,data:B}}else if(T===ZodParsedType.array&&I===ZodParsedType.array){if(_.length!==C.length)return{valid:!1};const M=[];for(let D=0;D<_.length;D++){const B=_[D],L=C[D],N=mergeValues(B,L);if(!N.valid)return{valid:!1};M.push(N.data)}return{valid:!0,data:M}}else return T===ZodParsedType.date&&I===ZodParsedType.date&&+_==+C?{valid:!0,data:_}:{valid:!1}}class ZodIntersection extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C),M=(D,B)=>{if(isAborted(D)||isAborted(B))return INVALID;const L=mergeValues(D.value,B.value);return L.valid?((isDirty(D)||isDirty(B))&&T.dirty(),{status:T.value,value:L.data}):(addIssueToContext(I,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return I.common.async?Promise.all([this._def.left._parseAsync({data:I.data,path:I.path,parent:I}),this._def.right._parseAsync({data:I.data,path:I.path,parent:I})]).then(([D,B])=>M(D,B)):M(this._def.left._parseSync({data:I.data,path:I.path,parent:I}),this._def.right._parseSync({data:I.data,path:I.path,parent:I}))}}ZodIntersection.create=(_,C,T)=>new ZodIntersection({left:_,right:C,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(T)});class ZodTuple extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.array)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:I.parsedType}),INVALID;if(I.data.length<this._def.items.length)return addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&I.data.length>this._def.items.length&&(addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T.dirty());const D=[...I.data].map((B,L)=>{const N=this._def.items[L]||this._def.rest;return N?N._parse(new ParseInputLazyPath(I,B,I.path,L)):null}).filter(B=>!!B);return I.common.async?Promise.all(D).then(B=>ParseStatus.mergeArray(T,B)):ParseStatus.mergeArray(T,D)}get items(){return this._def.items}rest(C){return new ZodTuple({...this._def,rest:C})}}ZodTuple.create=(_,C)=>{if(!Array.isArray(_))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:_,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(C)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.object)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:I.parsedType}),INVALID;const M=[],D=this._def.keyType,B=this._def.valueType;for(const L in I.data)M.push({key:D._parse(new ParseInputLazyPath(I,L,I.path,L)),value:B._parse(new ParseInputLazyPath(I,I.data[L],I.path,L)),alwaysSet:L in I.data});return I.common.async?ParseStatus.mergeObjectAsync(T,M):ParseStatus.mergeObjectSync(T,M)}get element(){return this._def.valueType}static create(C,T,I){return T instanceof ZodType?new ZodRecord({keyType:C,valueType:T,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(I)}):new ZodRecord({keyType:ZodString.create(),valueType:C,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(T)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.map)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:I.parsedType}),INVALID;const M=this._def.keyType,D=this._def.valueType,B=[...I.data.entries()].map(([L,N],V)=>({key:M._parse(new ParseInputLazyPath(I,L,I.path,[V,"key"])),value:D._parse(new ParseInputLazyPath(I,N,I.path,[V,"value"]))}));if(I.common.async){const L=new Map;return Promise.resolve().then(async()=>{for(const N of B){const V=await N.key,F=await N.value;if(V.status==="aborted"||F.status==="aborted")return INVALID;(V.status==="dirty"||F.status==="dirty")&&T.dirty(),L.set(V.value,F.value)}return{status:T.value,value:L}})}else{const L=new Map;for(const N of B){const V=N.key,F=N.value;if(V.status==="aborted"||F.status==="aborted")return INVALID;(V.status==="dirty"||F.status==="dirty")&&T.dirty(),L.set(V.value,F.value)}return{status:T.value,value:L}}}}ZodMap.create=(_,C,T)=>new ZodMap({valueType:C,keyType:_,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(T)});class ZodSet extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.parsedType!==ZodParsedType.set)return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:I.parsedType}),INVALID;const M=this._def;M.minSize!==null&&I.data.size<M.minSize.value&&(addIssueToContext(I,{code:ZodIssueCode.too_small,minimum:M.minSize.value,type:"set",inclusive:!0,exact:!1,message:M.minSize.message}),T.dirty()),M.maxSize!==null&&I.data.size>M.maxSize.value&&(addIssueToContext(I,{code:ZodIssueCode.too_big,maximum:M.maxSize.value,type:"set",inclusive:!0,exact:!1,message:M.maxSize.message}),T.dirty());const D=this._def.valueType;function B(N){const V=new Set;for(const F of N){if(F.status==="aborted")return INVALID;F.status==="dirty"&&T.dirty(),V.add(F.value)}return{status:T.value,value:V}}const L=[...I.data.values()].map((N,V)=>D._parse(new ParseInputLazyPath(I,N,I.path,V)));return I.common.async?Promise.all(L).then(N=>B(N)):B(L)}min(C,T){return new ZodSet({...this._def,minSize:{value:C,message:errorUtil.toString(T)}})}max(C,T){return new ZodSet({...this._def,maxSize:{value:C,message:errorUtil.toString(T)}})}size(C,T){return this.min(C,T).max(C,T)}nonempty(C){return this.min(1,C)}}ZodSet.create=(_,C)=>new ZodSet({valueType:_,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(C)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.function)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:T.parsedType}),INVALID;function I(L,N){return makeIssue({data:L,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,getErrorMap(),errorMap].filter(V=>!!V),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:N}})}function M(L,N){return makeIssue({data:L,path:T.path,errorMaps:[T.common.contextualErrorMap,T.schemaErrorMap,getErrorMap(),errorMap].filter(V=>!!V),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:N}})}const D={errorMap:T.common.contextualErrorMap},B=T.data;if(this._def.returns instanceof ZodPromise){const L=this;return OK(async function(...N){const V=new ZodError([]),F=await L._def.args.parseAsync(N,D).catch(G=>{throw V.addIssue(I(N,G)),V}),U=await Reflect.apply(B,this,F);return await L._def.returns._def.type.parseAsync(U,D).catch(G=>{throw V.addIssue(M(U,G)),V})})}else{const L=this;return OK(function(...N){const V=L._def.args.safeParse(N,D);if(!V.success)throw new ZodError([I(N,V.error)]);const F=Reflect.apply(B,this,V.data),U=L._def.returns.safeParse(F,D);if(!U.success)throw new ZodError([M(F,U.error)]);return U.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...C){return new ZodFunction({...this._def,args:ZodTuple.create(C).rest(ZodUnknown.create())})}returns(C){return new ZodFunction({...this._def,returns:C})}implement(C){return this.parse(C)}strictImplement(C){return this.parse(C)}static create(C,T,I){return new ZodFunction({args:C||ZodTuple.create([]).rest(ZodUnknown.create()),returns:T||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(I)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(C){const{ctx:T}=this._processInputParams(C);return this._def.getter()._parse({data:T.data,path:T.path,parent:T})}}ZodLazy.create=(_,C)=>new ZodLazy({getter:_,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(C)});class ZodLiteral extends ZodType{_parse(C){if(C.data!==this._def.value){const T=this._getOrReturnCtx(C);return addIssueToContext(T,{received:T.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:C.data}}get value(){return this._def.value}}ZodLiteral.create=(_,C)=>new ZodLiteral({value:_,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(C)});function createZodEnum(_,C){return new ZodEnum({values:_,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(C)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(C){if(typeof C.data!="string"){const T=this._getOrReturnCtx(C),I=this._def.values;return addIssueToContext(T,{expected:util.joinValues(I),received:T.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(C.data)){const T=this._getOrReturnCtx(C),I=this._def.values;return addIssueToContext(T,{received:T.data,code:ZodIssueCode.invalid_enum_value,options:I}),INVALID}return OK(C.data)}get options(){return this._def.values}get enum(){const C={};for(const T of this._def.values)C[T]=T;return C}get Values(){const C={};for(const T of this._def.values)C[T]=T;return C}get Enum(){const C={};for(const T of this._def.values)C[T]=T;return C}extract(C,T=this._def){return ZodEnum.create(C,{...this._def,...T})}exclude(C,T=this._def){return ZodEnum.create(this.options.filter(I=>!C.includes(I)),{...this._def,...T})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(C){const T=util.getValidEnumValues(this._def.values),I=this._getOrReturnCtx(C);if(I.parsedType!==ZodParsedType.string&&I.parsedType!==ZodParsedType.number){const M=util.objectValues(T);return addIssueToContext(I,{expected:util.joinValues(M),received:I.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(C.data)){const M=util.objectValues(T);return addIssueToContext(I,{received:I.data,code:ZodIssueCode.invalid_enum_value,options:M}),INVALID}return OK(C.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(_,C)=>new ZodNativeEnum({values:_,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(C)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(C){const{ctx:T}=this._processInputParams(C);if(T.parsedType!==ZodParsedType.promise&&T.common.async===!1)return addIssueToContext(T,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:T.parsedType}),INVALID;const I=T.parsedType===ZodParsedType.promise?T.data:Promise.resolve(T.data);return OK(I.then(M=>this._def.type.parseAsync(M,{path:T.path,errorMap:T.common.contextualErrorMap})))}}ZodPromise.create=(_,C)=>new ZodPromise({type:_,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(C)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(C){const{status:T,ctx:I}=this._processInputParams(C),M=this._def.effect||null,D={addIssue:B=>{addIssueToContext(I,B),B.fatal?T.abort():T.dirty()},get path(){return I.path}};if(D.addIssue=D.addIssue.bind(D),M.type==="preprocess"){const B=M.transform(I.data,D);if(I.common.async)return Promise.resolve(B).then(async L=>{if(T.value==="aborted")return INVALID;const N=await this._def.schema._parseAsync({data:L,path:I.path,parent:I});return N.status==="aborted"?INVALID:N.status==="dirty"||T.value==="dirty"?DIRTY(N.value):N});{if(T.value==="aborted")return INVALID;const L=this._def.schema._parseSync({data:B,path:I.path,parent:I});return L.status==="aborted"?INVALID:L.status==="dirty"||T.value==="dirty"?DIRTY(L.value):L}}if(M.type==="refinement"){const B=L=>{const N=M.refinement(L,D);if(I.common.async)return Promise.resolve(N);if(N instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return L};if(I.common.async===!1){const L=this._def.schema._parseSync({data:I.data,path:I.path,parent:I});return L.status==="aborted"?INVALID:(L.status==="dirty"&&T.dirty(),B(L.value),{status:T.value,value:L.value})}else return this._def.schema._parseAsync({data:I.data,path:I.path,parent:I}).then(L=>L.status==="aborted"?INVALID:(L.status==="dirty"&&T.dirty(),B(L.value).then(()=>({status:T.value,value:L.value}))))}if(M.type==="transform")if(I.common.async===!1){const B=this._def.schema._parseSync({data:I.data,path:I.path,parent:I});if(!isValid(B))return B;const L=M.transform(B.value,D);if(L instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:T.value,value:L}}else return this._def.schema._parseAsync({data:I.data,path:I.path,parent:I}).then(B=>isValid(B)?Promise.resolve(M.transform(B.value,D)).then(L=>({status:T.value,value:L})):B);util.assertNever(M)}}ZodEffects.create=(_,C,T)=>new ZodEffects({schema:_,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:C,...processCreateParams(T)});ZodEffects.createWithPreprocess=(_,C,T)=>new ZodEffects({schema:C,effect:{type:"preprocess",transform:_},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(T)});class ZodOptional extends ZodType{_parse(C){return this._getType(C)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(C)}unwrap(){return this._def.innerType}}ZodOptional.create=(_,C)=>new ZodOptional({innerType:_,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(C)});class ZodNullable extends ZodType{_parse(C){return this._getType(C)===ZodParsedType.null?OK(null):this._def.innerType._parse(C)}unwrap(){return this._def.innerType}}ZodNullable.create=(_,C)=>new ZodNullable({innerType:_,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(C)});class ZodDefault extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C);let I=T.data;return T.parsedType===ZodParsedType.undefined&&(I=this._def.defaultValue()),this._def.innerType._parse({data:I,path:T.path,parent:T})}removeDefault(){return this._def.innerType}}ZodDefault.create=(_,C)=>new ZodDefault({innerType:_,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof C.default=="function"?C.default:()=>C.default,...processCreateParams(C)});class ZodCatch extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I={...T,common:{...T.common,issues:[]}},M=this._def.innerType._parse({data:I.data,path:I.path,parent:{...I}});return isAsync(M)?M.then(D=>({status:"valid",value:D.status==="valid"?D.value:this._def.catchValue({get error(){return new ZodError(I.common.issues)},input:I.data})})):{status:"valid",value:M.status==="valid"?M.value:this._def.catchValue({get error(){return new ZodError(I.common.issues)},input:I.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(_,C)=>new ZodCatch({innerType:_,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof C.catch=="function"?C.catch:()=>C.catch,...processCreateParams(C)});class ZodNaN extends ZodType{_parse(C){if(this._getType(C)!==ZodParsedType.nan){const I=this._getOrReturnCtx(C);return addIssueToContext(I,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:I.parsedType}),INVALID}return{status:"valid",value:C.data}}}ZodNaN.create=_=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(_)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(C){const{ctx:T}=this._processInputParams(C),I=T.data;return this._def.type._parse({data:I,path:T.path,parent:T})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(C){const{status:T,ctx:I}=this._processInputParams(C);if(I.common.async)return(async()=>{const D=await this._def.in._parseAsync({data:I.data,path:I.path,parent:I});return D.status==="aborted"?INVALID:D.status==="dirty"?(T.dirty(),DIRTY(D.value)):this._def.out._parseAsync({data:D.value,path:I.path,parent:I})})();{const M=this._def.in._parseSync({data:I.data,path:I.path,parent:I});return M.status==="aborted"?INVALID:M.status==="dirty"?(T.dirty(),{status:"dirty",value:M.value}):this._def.out._parseSync({data:M.value,path:I.path,parent:I})}}static create(C,T){return new ZodPipeline({in:C,out:T,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(C){const T=this._def.innerType._parse(C),I=M=>(isValid(M)&&(M.value=Object.freeze(M.value)),M);return isAsync(T)?T.then(M=>I(M)):I(T)}unwrap(){return this._def.innerType}}ZodReadonly.create=(_,C)=>new ZodReadonly({innerType:_,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(C)});function cleanParams(_,C){const T=typeof _=="function"?_(C):typeof _=="string"?{message:_}:_;return typeof T=="string"?{message:T}:T}function custom(_,C={},T){return _?ZodAny.create().superRefine((I,M)=>{var D,B;const L=_(I);if(L instanceof Promise)return L.then(N=>{var V,F;if(!N){const U=cleanParams(C,I),H=(F=(V=U.fatal)!==null&&V!==void 0?V:T)!==null&&F!==void 0?F:!0;M.addIssue({code:"custom",...U,fatal:H})}});if(!L){const N=cleanParams(C,I),V=(B=(D=N.fatal)!==null&&D!==void 0?D:T)!==null&&B!==void 0?B:!0;M.addIssue({code:"custom",...N,fatal:V})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(_){_.ZodString="ZodString",_.ZodNumber="ZodNumber",_.ZodNaN="ZodNaN",_.ZodBigInt="ZodBigInt",_.ZodBoolean="ZodBoolean",_.ZodDate="ZodDate",_.ZodSymbol="ZodSymbol",_.ZodUndefined="ZodUndefined",_.ZodNull="ZodNull",_.ZodAny="ZodAny",_.ZodUnknown="ZodUnknown",_.ZodNever="ZodNever",_.ZodVoid="ZodVoid",_.ZodArray="ZodArray",_.ZodObject="ZodObject",_.ZodUnion="ZodUnion",_.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_.ZodIntersection="ZodIntersection",_.ZodTuple="ZodTuple",_.ZodRecord="ZodRecord",_.ZodMap="ZodMap",_.ZodSet="ZodSet",_.ZodFunction="ZodFunction",_.ZodLazy="ZodLazy",_.ZodLiteral="ZodLiteral",_.ZodEnum="ZodEnum",_.ZodEffects="ZodEffects",_.ZodNativeEnum="ZodNativeEnum",_.ZodOptional="ZodOptional",_.ZodNullable="ZodNullable",_.ZodDefault="ZodDefault",_.ZodCatch="ZodCatch",_.ZodPromise="ZodPromise",_.ZodBranded="ZodBranded",_.ZodPipeline="ZodPipeline",_.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(_,C={message:`Input not instance of ${_.name}`})=>custom(T=>T instanceof _,C),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:_=>ZodString.create({..._,coerce:!0}),number:_=>ZodNumber.create({..._,coerce:!0}),boolean:_=>ZodBoolean.create({..._,coerce:!0}),bigint:_=>ZodBigInt.create({..._,coerce:!0}),date:_=>ZodDate.create({..._,coerce:!0})},NEVER=INVALID;var z$1=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError}),AuditLogStatus;(function(_){_.DEFAULT="default",_.SUCCEEDED="succeeded",_.FAILED="failed",_.PENDING="pending"})(AuditLogStatus||(AuditLogStatus={}));var AuditLogAction;(function(_){_.APP_DISCONNECTED="app-disconnected",_.APP_RESTORE="app-restore",_.APP_BACKUP="app-backup",_.APP_CONNECTED="app-connected",_.APP_OBJECTS_SYNC="app-objects-sync"})(AuditLogAction||(AuditLogAction={}));const AppConnectedSchema=z$1.object({spaceDid:z$1.string().min(1),appDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),scopes:z$1.string().min(1),appUrl:z$1.string(),referrer:z$1.string()}),AppDisconnectedSchema=z$1.object({spaceDid:z$1.string().min(1),appDid:z$1.string().min(1),appName:z$1.string().min(1)}),AppBackupSchema=z$1.object({serverDid:z$1.string().min(1),signerDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),referrer:z$1.string()}),AppRestoreSchema=z$1.object({serverDid:z$1.string().min(1),appName:z$1.string().min(1),appDescription:z$1.string(),referrer:z$1.string()}),AppObjectsSyncSchema=z$1.object({appName:z$1.string().min(1),appDescription:z$1.string(),source:z$1.string().min(1),target:z$1.string().min(1),totalCount:z$1.number(),errorCount:z$1.number(),successCount:z$1.number(),size:z$1.number(),duration:z$1.number(),metadata:z$1.record(z$1.string(),z$1.any()).optional()}),AuditLogSchema=z$1.object({id:z$1.string(),actionType:z$1.nativeEnum(AuditLogAction),entityId:z$1.string().min(1),entityName:z$1.string().optional().default(""),userId:z$1.string().min(1),username:z$1.string().optional().default(""),data:z$1.union([AppConnectedSchema,AppDisconnectedSchema,AppBackupSchema,AppRestoreSchema,AppObjectsSyncSchema]),status:z$1.nativeEnum(AuditLogStatus).optional().default(AuditLogStatus.SUCCEEDED),reason:z$1.string().optional().default(""),env:z$1.record(z$1.any()).optional().default({}),createdAt:z$1.string().optional().default(()=>new Date().toISOString()),updatedAt:z$1.string().optional().default(()=>new Date().toISOString())});AuditLogSchema.extend({id:AuditLogSchema.shape.id.optional()});AuditLogSchema.extend({data:z$1.union([AppConnectedSchema.partial(),AppDisconnectedSchema.partial(),AppBackupSchema.partial(),AppRestoreSchema.partial(),AppObjectsSyncSchema.partial()])}).partial().required({id:!0});function _classCallCheck(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")}function _defineProperties(_,C){for(var T=0;T<C.length;T++){var I=C[T];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,_toPropertyKey$1(I.key),I)}}function _createClass(_,C,T){return C&&_defineProperties(_.prototype,C),Object.defineProperty(_,"prototype",{writable:!1}),_}function _typeof(_){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof(_)}function ownKeys$1(_,C){var T=Object.keys(_);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(_);C&&(I=I.filter(function(M){return Object.getOwnPropertyDescriptor(_,M).enumerable})),T.push.apply(T,I)}return T}function _objectSpread$1(_){for(var C=1;C<arguments.length;C++){var T=arguments[C]!=null?arguments[C]:{};C%2?ownKeys$1(Object(T),!0).forEach(function(I){_defineProperty$1(_,I,T[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(T)):ownKeys$1(Object(T)).forEach(function(I){Object.defineProperty(_,I,Object.getOwnPropertyDescriptor(T,I))})}return _}function _defineProperty$1(_,C,T){return C=_toPropertyKey$1(C),C in _?Object.defineProperty(_,C,{value:T,enumerable:!0,configurable:!0,writable:!0}):_[C]=T,_}function _toPropertyKey$1(_){var C=_toPrimitive$1(_,"string");return _typeof(C)=="symbol"?C:C+""}function _toPrimitive$1(_,C){if(_typeof(_)!="object"||!_)return _;var T=_[Symbol.toPrimitive];if(T!==void 0){var I=T.call(_,C||"default");if(_typeof(I)!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(_)}function _slicedToArray(_,C){return _arrayWithHoles(_)||_iterableToArrayLimit(_,C)||_unsupportedIterableToArray(_,C)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3207
3207
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(_,C){if(_){if(typeof _=="string")return _arrayLikeToArray(_,C);var T=Object.prototype.toString.call(_).slice(8,-1);if(T==="Object"&&_.constructor&&(T=_.constructor.name),T==="Map"||T==="Set")return Array.from(_);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return _arrayLikeToArray(_,C)}}function _arrayLikeToArray(_,C){(C==null||C>_.length)&&(C=_.length);for(var T=0,I=new Array(C);T<C;T++)I[T]=_[T];return I}function _iterableToArrayLimit(_,C){var T=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(T!=null){var I,M,D,B,L=[],N=!0,V=!1;try{if(D=(T=T.call(_)).next,C===0){if(Object(T)!==T)return;N=!1}else for(;!(N=(I=D.call(T)).done)&&(L.push(I.value),L.length!==C);N=!0);}catch(F){V=!0,M=F}finally{try{if(!N&&T.return!=null&&(B=T.return(),Object(B)!==B))return}finally{if(V)throw M}}return L}}function _arrayWithHoles(_){if(Array.isArray(_))return _}/**
|
|
3208
3208
|
* @module xbytes
|
|
3209
3209
|
* @license Apache-2.0
|
|
3210
3210
|
* @author Miraculous Owonubi
|
|
3211
3211
|
* @copyright (c) 2019 Miraculous Owonubi
|
|
3212
|
-
*/function xbytes(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,C=arguments.length>1?arguments[1]:void 0;if(Number.isNaN(_=+_)||typeof _!="number")return null;var T=C||{},I=T.iec,M=I===void 0?!1:I,D=T.bits,B=D===void 0?!1:D,L=T.short,N=L===void 0?!0:L,V=T.space,F=V===void 0?!0:V,U=T.fixed,H=U===void 0?2:U,G=T.prefixIndex,Y=T.sticky,Z=Y===void 0?!1:Y;_*=B?8:1;var Q=["-","Kilo","Mega","Giga","Tera","Peta","Exa","Zetta","Yotta"],X=typeof G=="number"?G:function(le){return Z&&Number.isInteger(le)?le-1:Math.floor(le)}(Math.log(Math.abs(_))/Math.log(M?1024:1e3))||0;_/=~X&&X in Q?Math.pow(M?1024:1e3,X):1;var oe=Q[X]||Q[0],ae=N?oe[0].replace(/(-?|[^\w])$/,"".concat(M&&X in Q&&X>0?"i":"").concat(B?"b":"B")):oe.replace(/(\w{2})(\w+)/,"$1".concat(M?"bi":"$2","-")).replace(/-/,B?"Bits":"Bytes");return[_.toFixed(H),ae].join(F?" ":"")}var unitMatcher=/^(?:([kmgtpezy])(i?))?(b)$/i,genericMatcher=new RegExp("([+-]?\\d+(?:\\.\\d+)?(?:e[+-]\\d+)?)\\s*((?:([kmgtpezy])(i?))?(b))\\b"),globalByteFilter=new RegExp(genericMatcher.source,"gi"),byteFilter=new RegExp("^".concat(genericMatcher.source),"i");function parseUnit(_){var C;if(typeof _=="string"&&(C=_.match(unitMatcher))){var T=C,I=_slicedToArray(T,4),M=I[0],D=I[1],B=I[2],L=I[3],N=D?D.toUpperCase():"";C={unitInput:M,prefix:N,iec:!!B,type:L,unit:N.concat(L),bits:L==="b",byte:L==="B",prefixIndex:"BKMGTPEZY".indexOf(N.toUpperCase())}}return C}function parseString(_){var C;if(typeof _=="string"&&(C=_.match(byteFilter))){var T=C,I=_slicedToArray(T,3),M=I[0],D=I[1],B=I[2];C=_objectSpread$1(_objectSpread$1({},parseUnit(B)),{},{input:M,value:parseFloat(D)})}return C}function isBytes(_){return byteFilter.test(_)}function isUnit(_){return unitMatcher.test(_)}function extractBytes(_){return(_.match(globalByteFilter)||[]).filter(isBytes)}function parseSize(_,C){var T,I=C||{},M=I.bits,D=M===void 0?!0:M,B=I.iec,L=B===void 0?!0:B;if(isBytes(_)&&(T=parseString(_)||0)){var N=T.prefixIndex;T=T.value*(L&&!T.iec?Math.pow(10,N*3):Math.pow(2,10*N))/(D&&T.type==="b"?8:1)}return T}function isParsable(_){return isBytes(_)||Number.isFinite(_)&&Math.abs(_)<=12379400392853803e11||parseFloat(_).toString()===_}function hybridResolve(_){if(!isParsable(_))throw Error("<input> argument [".concat(_,"] of type '").concat(_typeof(_),`' must either be a finite number or a ByteString e.g "10 MB"`));return(isBytes(_)?parseSize(_):+_)||0}function parseBytes(_,C){var T;if(!isParsable(_))throw Error("<input> argument [".concat(_,"] of type '").concat(_typeof(_),`' must either be a finite number or a ByteString e.g "10 MB"`));var I=hybridResolve(_);if(isBytes(_)){var M=[parseSize(_),_];I=M[0],T=M[1]}else{var D=[+_||0,xbytes(+_||0)];I=D[0],T=D[1]}return _objectSpread$1(_objectSpread$1({},T=parseString(T)),{},{input:_,bytes:I,size:xbytes(I,_objectSpread$1(_objectSpread$1({},T),C))})}function internalRelationEngine(_,C){var T=_.bytes,I=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!1,bits:!0})),M=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!1,bits:!1})),D=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!0,bits:!0})),B=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!0,bits:!1}));return{bytes:M,iecBytes:B,bits:I,iecBits:D}}function relative(_,C){var T=parseBytes(_),I=internalRelationEngine(T,C);return _objectSpread$1({parsed:T,size:T.size,raw:_},I)}relative.bits=function(_,C){return relative(_,C).bits};relative.bytes=function(_,C){return relative(_,C).bytes};relative.iecBits=function(_,C){return relative(_,C).iecBits};relative.iecBytes=function(_,C){return relative(_,C).iecBytes};relative.size=function(_,C,T){var I=parseBytes(_),M=[],D=M[0],B=M[1];return(D=parseUnit(C))&&(B={iec:D.iec,bits:D.bits,prefixIndex:D.prefixIndex}),xbytes(I.bytes,_objectSpread$1(_objectSpread$1({},T),B))};function createByteParser(_){return function(T){return xbytes(T,_)}}function createSizeParser(_){return function(T){return parseSize(T,_)}}function createRelativeSizer(_,C){return function(I){return relative.size(I,_,C)}}function parseByteOrByteArray(_){return(Array.isArray(_)?_:[_]).map(hybridResolve)}var ByteUnitObject=function(){function _(C){if(_classCallCheck(this,_),!isParsable(C))throw Error("<bytes> argument must be a finite value");this.bytes=hybridResolve(C),this.checkInternalByteVal()}return _createClass(_,[{key:"checkInternalByteVal",value:function(){if(!Number.isFinite(this.bytes))throw Error("Internal container for bytes value invalid, probably corrupted from external source")}},{key:"add",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes+parseByteOrByteArray(T).reduce(function(I,M){return I+M},0))}},{key:"subtract",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes-parseByteOrByteArray(T).reduce(function(I,M){return I+M},0))}},{key:"multiply",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes*parseByteOrByteArray(T).reduce(function(I,M){return I*M},1))}},{key:"divide",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes/parseByteOrByteArray(T).reduce(function(I,M){return I*M},1))}},{key:"toBits",value:function(T){return relative.bits(this.bytes,T)}},{key:"toBytes",value:function(T){return relative.bytes(this.bytes,T)}},{key:"toIECBits",value:function(T){return relative.iecBits(this.bytes,T)}},{key:"toIECBytes",value:function(T){return relative.iecBytes(this.bytes,T)}},{key:"convertTo",value:function(T,I){if(!isUnit(T))throw Error("<unit> argument must be a valid UnitString. See https://github.com/miraclx/xbytes/blob/master/README.md#unitstring");return relative.size(this.bytes,T,I)}},{key:"objectify",value:function(T){return parseBytes(this.bytes,T)}}])}();function parse(_){return new ByteUnitObject(_)}xbytes.byteFilter=byteFilter;xbytes.unitMatcher=unitMatcher;xbytes.genericMatcher=genericMatcher;xbytes.globalByteFilter=globalByteFilter;xbytes.isUnit=isUnit;xbytes.isBytes=isBytes;xbytes.relative=relative;xbytes.isParsable=isParsable;xbytes.extractBytes=extractBytes;xbytes.parseSize=parseSize;xbytes.parseUnit=parseUnit;xbytes.parseBytes=parseBytes;xbytes.parseString=parseString;xbytes.parse=parse;xbytes.ByteUnitObject=ByteUnitObject;xbytes.createByteParser=createByteParser;xbytes.createSizeParser=createSizeParser;xbytes.createRelativeSizer=createRelativeSizer;typeof module<"u"&&(module.exports=xbytes);const TranslateKeyMap={[AuditLogAction.APP_BACKUP]:{description:"auditLog.backup.description"},[AuditLogAction.APP_RESTORE]:{description:"auditLog.restore.description"},[AuditLogAction.APP_CONNECTED]:{description:"auditLog.connected.description"},[AuditLogAction.APP_DISCONNECTED]:{description:"auditLog.disconnected.description"},[AuditLogAction.APP_OBJECTS_SYNC]:{description:"auditLog.objectsSync.description"}};function useAuditLog({endpoint:_,size:C=1,status:T=AuditLogStatus.SUCCEEDED,actionType:I=[AuditLogAction.APP_BACKUP,AuditLogAction.APP_RESTORE,AuditLogAction.APP_OBJECTS_SYNC],deps:M=[]}){const{t:D,locale:B}=useLocale(),{loading:L,data:N,error:V}=useRequest(async()=>{if(!isUrl$2(_))return;const{data:U}=await api.get(joinURL(window.location.origin,"/.well-known/service/api/did-space/audit-log/list"),{timeout:1e3*30,params:{endpoint:_,size:C,status:T,actionType:I}});return U.data.rows},{refreshDeps:[_,C].concat(M),onError(U){console.error(U)}}),F=useCreation(()=>N==null?void 0:N.map(U=>{const H=U.data;return U.actionType===AuditLogAction.APP_OBJECTS_SYNC&&(H.size=xbytes(H.size,{iec:!0})),{...U,description:D(TranslateKeyMap[U.actionType].description,{...H,relativeTime:formatRelativeTime(U.createdAt,B)})}}),[N,B]);return{loading:L,data:F,error:V}}function AuditLogBar({endpoint:_,deps:C=[]}){const{t:T}=useLocale(),{loading:I,data:M}=useAuditLog({endpoint:_,deps:C}),{baseUrl:D,spaceDid:B,appDid:L}=getSpaceEndpointContext(_),N=M==null?void 0:M[0];return I?jsxRuntimeExports.jsx(Skeleton,{variant:"text",sx:{width:"100%",fontSize:"1rem"}}):N?jsxRuntimeExports.jsxs(Box,{sx:{ml:"4px",fontSize:"14px"},children:[N.description,jsxRuntimeExports.jsxs(Link$2,{href:joinURL(D,`space/${B}/apps/${L}/auditLogs`),target:"_blank",underline:"hover",sx:{color:"primary.main",ml:1,display:"inline-flex",alignItems:"center"},children:[T("common.viewMore")," ",jsxRuntimeExports.jsx(default_1$3,{sx:{fontSize:"14px",marginLeft:"4px",verticalAlign:"-2px"}})]})]}):null}const expectVersion=`${version$1}`;function Status({spaceUrl:_,status:C,errorCode:T,refresh:I,sx:M,spaceInfo:D,...B}){const{t:L,locale:N}=useLocale(),V={marginRight:"4px"},F=withQuery(joinURL(_,"overview"),{guide:1}),U=useCreation(()=>({[DIDSpaceStatus.LOADING]:{icon:null,text:null},[DIDSpaceStatus.CONNECTED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnected,{style:V}),text:jsxRuntimeExports.jsx("span",{style:{color:"#047857"},children:L("storage.spaces.connected.tag")})},[DIDSpaceStatus.DISCONNECTED]:{icon:jsxRuntimeExports.jsx(SvgSpaceDisconnect,{style:V}),text:jsxRuntimeExports.jsx("span",{style:{color:"#626a77"},children:L("storage.spaces.disconnected.tag")})}}),[N]),H=reactExports.useMemo(()=>D==null?void 0:D.version,[D]),G=useCreation(()=>({[SPACE_CONNECT_ERROR_CODE.NETWORK_ERROR]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(Box,{sx:{color:"error.main"},children:L("storage.spaces.error.networkError")})},[SPACE_CONNECT_ERROR_CODE.EXPIRED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.expired"),url:F})},[SPACE_CONNECT_ERROR_CODE.PAST_DUE]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.pastDue"),url:F})},[SPACE_CONNECT_ERROR_CODE.INVALID]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.invalid"),url:F})},[SPACE_CONNECT_ERROR_CODE.UNIT_LIMIT]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.unitLimit"),url:F})},[SPACE_CONNECT_ERROR_CODE.CORS_BLOCKED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.corsBlocked"),url:withQuery(fixCorsErrorPageUrl,{locale:N})})},[SPACE_CONNECT_ERROR_CODE.INCOMPATIBLE]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.incompatible",{spaceVersion:H,expectVersion}),url:joinURL(new URL(_).origin,".well-known/service/admin/components")})}}),[N,H]),{icon:Y,text:Z}=C===DIDSpaceStatus.UNAVAILABLE?G[T]:U[C];return reactExports.useEffect(()=>{const Q=()=>{document.hidden||I()};return C!==DIDSpaceStatus.CONNECTED?document.addEventListener("visibilitychange",Q):document.removeEventListener("visibilitychange",Q),()=>document.removeEventListener("visibilitychange",Q)},[C,I]),jsxRuntimeExports.jsxs(Box,{component:"span",sx:{display:"flex",alignItems:"center",color:"primary.main",fontSize:14,...M},...B,children:[Y," ",Z]})}function ErrorLink({title:_,url:C}){const{t:T}=useLocale();return jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx("span",{style:{whiteSpace:"pre-wrap"},children:_}),placement:"top",children:jsxRuntimeExports.jsxs(Link$2,{href:C,target:"_blank",underline:"hover",color:"error",sx:{display:"flex",alignItems:"center",color:"error.main"},children:[jsxRuntimeExports.jsx("span",{children:T("storage.spaces.error.tag")}),jsxRuntimeExports.jsx(default_1$3,{sx:{fontSize:"14px",marginLeft:"4px"}})]})})}function DIDSpaceConnection({endpoint:_,selected:C=!1,compat:T,action:I,footer:M=!1,className:D,deps:B=[],...L}){const N=useMobile(),{t:V}=useLocale();let F=T;isUndefined$1(F)&&(F=N);const U=getSpaceDidFromEndpoint(_),H=getSpaceUrlFromEndpoint(_),G=getSpaceGatewayUrlFromEndpoint(_),[Y,Z]=reactExports.useState(!1),Q=reactExports.useMemo(()=>[Y].concat(B),[Y,B]),X=()=>Z(fe=>!fe),{data:oe,error:ae,loading:le}=useSpaceInfo({endpoint:_,deps:Q});let pe="";const me=(oe==null?void 0:oe.isAvailable)??!1,ve=reactExports.useRef(DIDSpaceStatus.LOADING);let _e=0;if(le)ve.current=DIDSpaceStatus.LOADING,pe=jsxRuntimeExports.jsx(Skeleton,{variant:"text",sx:{width:"180px",fontSize:"1rem"}});else if(ae instanceof AxiosError)pe=V("common.unknown"),ve.current=DIDSpaceStatus.UNAVAILABLE,isCorsBlockedError(ae)?_e=SPACE_CONNECT_ERROR_CODE.CORS_BLOCKED:_e=SPACE_CONNECT_ERROR_CODE.NETWORK_ERROR;else if(oe){pe=oe.name;const fe=oe.version;!fe||semver$1.major(expectVersion)!==semver$1.major(fe)?(ve.current=DIDSpaceStatus.UNAVAILABLE,_e=SPACE_CONNECT_ERROR_CODE.INCOMPATIBLE):me?ve.current=DIDSpaceStatus.CONNECTED:(ve.current=DIDSpaceStatus.UNAVAILABLE,_e=oe.errorCode,_e===SPACE_CONNECT_ERROR_CODE.UNAUTHORIZED&&(ve.current=DIDSpaceStatus.DISCONNECTED))}const Re={spaceGateway:{did:U,name:(oe==null?void 0:oe.name)??"",url:G,endpoint:_,ownerDid:(oe==null?void 0:oe.ownerDid)??""},spaceStatus:ve.current,errorCode:_e,selected:C,compat:F,refresh:X},Ve=()=>le?null:typeof I=="function"?I(Re):I,Ne=jsxRuntimeExports.jsx(AuditLogBar,{endpoint:_,deps:Q}),We=()=>typeof M=="function"?M({...Re,originalFooter:Ne}):M===!0?Ne:null;return jsxRuntimeExports.jsxs(BoxContainer,{className:classNames(D,{selected:C,error:_e>0}),...L,children:[F&&jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",marginBottom:1,children:[C&&jsxRuntimeExports.jsx(Status,{spaceUrl:H,status:ve.current,errorCode:_e,refresh:X,spaceInfo:oe,flexShrink:0,sx:{ml:"4px"}}),jsxRuntimeExports.jsx(Box,{flex:1}),Ve()]}),jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",children:[jsxRuntimeExports.jsx(DIDSpaceNFTPreview,{src:getSpaceNftDisplayUrlFromEndpoint(_),width:"72px",height:"72px"}),jsxRuntimeExports.jsxs(Stack,{ml:2,flex:1,spacing:1,minWidth:0,children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",sx:{whiteSpace:"nowrap"},children:[pe&&jsxRuntimeExports.jsx(Box,{className:"space-name",children:pe}),!F&&C&&jsxRuntimeExports.jsx(Status,{spaceUrl:H,status:ve.current,errorCode:_e,refresh:X,spaceInfo:oe,sx:{mr:1}})]}),jsxRuntimeExports.jsx(DID,{copyable:!1,size:14,compact:!0,responsive:!1,did:U,sx:{".did-address-text":{color:"text.secondary"}}})]}),!F&&Ve()]}),We()]})}const BoxContainer=styled(Box)`
|
|
3212
|
+
*/function xbytes(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,C=arguments.length>1?arguments[1]:void 0;if(Number.isNaN(_=+_)||typeof _!="number")return null;var T=C||{},I=T.iec,M=I===void 0?!1:I,D=T.bits,B=D===void 0?!1:D,L=T.short,N=L===void 0?!0:L,V=T.space,F=V===void 0?!0:V,U=T.fixed,H=U===void 0?2:U,G=T.prefixIndex,Y=T.sticky,Z=Y===void 0?!1:Y;_*=B?8:1;var Q=["-","Kilo","Mega","Giga","Tera","Peta","Exa","Zetta","Yotta"],X=typeof G=="number"?G:function(le){return Z&&Number.isInteger(le)?le-1:Math.floor(le)}(Math.log(Math.abs(_))/Math.log(M?1024:1e3))||0;_/=~X&&X in Q?Math.pow(M?1024:1e3,X):1;var oe=Q[X]||Q[0],ae=N?oe[0].replace(/(-?|[^\w])$/,"".concat(M&&X in Q&&X>0?"i":"").concat(B?"b":"B")):oe.replace(/(\w{2})(\w+)/,"$1".concat(M?"bi":"$2","-")).replace(/-/,B?"Bits":"Bytes");return[_.toFixed(H),ae].join(F?" ":"")}var unitMatcher=/^(?:([kmgtpezy])(i?))?(b)$/i,genericMatcher=new RegExp("([+-]?\\d+(?:\\.\\d+)?(?:e[+-]\\d+)?)\\s*((?:([kmgtpezy])(i?))?(b))\\b"),globalByteFilter=new RegExp(genericMatcher.source,"gi"),byteFilter=new RegExp("^".concat(genericMatcher.source),"i");function parseUnit(_){var C;if(typeof _=="string"&&(C=_.match(unitMatcher))){var T=C,I=_slicedToArray(T,4),M=I[0],D=I[1],B=I[2],L=I[3],N=D?D.toUpperCase():"";C={unitInput:M,prefix:N,iec:!!B,type:L,unit:N.concat(L),bits:L==="b",byte:L==="B",prefixIndex:"BKMGTPEZY".indexOf(N.toUpperCase())}}return C}function parseString(_){var C;if(typeof _=="string"&&(C=_.match(byteFilter))){var T=C,I=_slicedToArray(T,3),M=I[0],D=I[1],B=I[2];C=_objectSpread$1(_objectSpread$1({},parseUnit(B)),{},{input:M,value:parseFloat(D)})}return C}function isBytes(_){return byteFilter.test(_)}function isUnit(_){return unitMatcher.test(_)}function extractBytes(_){return(_.match(globalByteFilter)||[]).filter(isBytes)}function parseSize(_,C){var T,I=C||{},M=I.bits,D=M===void 0?!0:M,B=I.iec,L=B===void 0?!0:B;if(isBytes(_)&&(T=parseString(_)||0)){var N=T.prefixIndex;T=T.value*(L&&!T.iec?Math.pow(10,N*3):Math.pow(2,10*N))/(D&&T.type==="b"?8:1)}return T}function isParsable(_){return isBytes(_)||Number.isFinite(_)&&Math.abs(_)<=12379400392853803e11||parseFloat(_).toString()===_}function hybridResolve(_){if(!isParsable(_))throw Error("<input> argument [".concat(_,"] of type '").concat(_typeof(_),`' must either be a finite number or a ByteString e.g "10 MB"`));return(isBytes(_)?parseSize(_):+_)||0}function parseBytes(_,C){var T;if(!isParsable(_))throw Error("<input> argument [".concat(_,"] of type '").concat(_typeof(_),`' must either be a finite number or a ByteString e.g "10 MB"`));var I=hybridResolve(_);if(isBytes(_)){var M=[parseSize(_),_];I=M[0],T=M[1]}else{var D=[+_||0,xbytes(+_||0)];I=D[0],T=D[1]}return _objectSpread$1(_objectSpread$1({},T=parseString(T)),{},{input:_,bytes:I,size:xbytes(I,_objectSpread$1(_objectSpread$1({},T),C))})}function internalRelationEngine(_,C){var T=_.bytes,I=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!1,bits:!0})),M=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!1,bits:!1})),D=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!0,bits:!0})),B=xbytes(T,_objectSpread$1(_objectSpread$1({},C),{},{iec:!0,bits:!1}));return{bytes:M,iecBytes:B,bits:I,iecBits:D}}function relative(_,C){var T=parseBytes(_),I=internalRelationEngine(T,C);return _objectSpread$1({parsed:T,size:T.size,raw:_},I)}relative.bits=function(_,C){return relative(_,C).bits};relative.bytes=function(_,C){return relative(_,C).bytes};relative.iecBits=function(_,C){return relative(_,C).iecBits};relative.iecBytes=function(_,C){return relative(_,C).iecBytes};relative.size=function(_,C,T){var I=parseBytes(_),M=[],D=M[0],B=M[1];return(D=parseUnit(C))&&(B={iec:D.iec,bits:D.bits,prefixIndex:D.prefixIndex}),xbytes(I.bytes,_objectSpread$1(_objectSpread$1({},T),B))};function createByteParser(_){return function(T){return xbytes(T,_)}}function createSizeParser(_){return function(T){return parseSize(T,_)}}function createRelativeSizer(_,C){return function(I){return relative.size(I,_,C)}}function parseByteOrByteArray(_){return(Array.isArray(_)?_:[_]).map(hybridResolve)}var ByteUnitObject=function(){function _(C){if(_classCallCheck(this,_),!isParsable(C))throw Error("<bytes> argument must be a finite value");this.bytes=hybridResolve(C),this.checkInternalByteVal()}return _createClass(_,[{key:"checkInternalByteVal",value:function(){if(!Number.isFinite(this.bytes))throw Error("Internal container for bytes value invalid, probably corrupted from external source")}},{key:"add",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes+parseByteOrByteArray(T).reduce(function(I,M){return I+M},0))}},{key:"subtract",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes-parseByteOrByteArray(T).reduce(function(I,M){return I+M},0))}},{key:"multiply",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes*parseByteOrByteArray(T).reduce(function(I,M){return I*M},1))}},{key:"divide",value:function(T){if(!isParsable(T))throw Error("<bytes> argument must be a finite value");return this.checkInternalByteVal(),new _(this.bytes/parseByteOrByteArray(T).reduce(function(I,M){return I*M},1))}},{key:"toBits",value:function(T){return relative.bits(this.bytes,T)}},{key:"toBytes",value:function(T){return relative.bytes(this.bytes,T)}},{key:"toIECBits",value:function(T){return relative.iecBits(this.bytes,T)}},{key:"toIECBytes",value:function(T){return relative.iecBytes(this.bytes,T)}},{key:"convertTo",value:function(T,I){if(!isUnit(T))throw Error("<unit> argument must be a valid UnitString. See https://github.com/miraclx/xbytes/blob/master/README.md#unitstring");return relative.size(this.bytes,T,I)}},{key:"objectify",value:function(T){return parseBytes(this.bytes,T)}}])}();function parse(_){return new ByteUnitObject(_)}xbytes.byteFilter=byteFilter;xbytes.unitMatcher=unitMatcher;xbytes.genericMatcher=genericMatcher;xbytes.globalByteFilter=globalByteFilter;xbytes.isUnit=isUnit;xbytes.isBytes=isBytes;xbytes.relative=relative;xbytes.isParsable=isParsable;xbytes.extractBytes=extractBytes;xbytes.parseSize=parseSize;xbytes.parseUnit=parseUnit;xbytes.parseBytes=parseBytes;xbytes.parseString=parseString;xbytes.parse=parse;xbytes.ByteUnitObject=ByteUnitObject;xbytes.createByteParser=createByteParser;xbytes.createSizeParser=createSizeParser;xbytes.createRelativeSizer=createRelativeSizer;typeof module<"u"&&(module.exports=xbytes);const translateKeyMap={[AuditLogAction.APP_BACKUP]:{description:"auditLog.backup.description"},[AuditLogAction.APP_RESTORE]:{description:"auditLog.restore.description"},[AuditLogAction.APP_CONNECTED]:{description:"auditLog.connected.description"},[AuditLogAction.APP_DISCONNECTED]:{description:"auditLog.disconnected.description"},[AuditLogAction.APP_OBJECTS_SYNC]:{description:"auditLog.objectsSync.description"}},unreachableErrorCodes=[SPACE_CONNECT_ERROR_CODE.CORS_BLOCKED,SPACE_CONNECT_ERROR_CODE.NETWORK_ERROR,SPACE_CONNECT_ERROR_CODE.INCOMPATIBLE],defaultActionTypes=[AuditLogAction.APP_BACKUP,AuditLogAction.APP_RESTORE,AuditLogAction.APP_OBJECTS_SYNC];function useAuditLog({endpoint:_,spaceStatus:C,errorCode:T,size:I=1,status:M=AuditLogStatus.SUCCEEDED,actionType:D=defaultActionTypes,deps:B=[]}){const{t:L,locale:N}=useLocale(),{loading:V,data:F,error:U}=useRequest(async()=>{if(!isUrl$2(_)||C===DIDSpaceStatus.LOADING||unreachableErrorCodes.includes(T))return;const{data:G}=await api.get(joinURL(window.location.origin,"/.well-known/service/api/did-space/audit-logs"),{timeout:1e3*30,params:{endpoint:_,size:I,status:M,actionType:D}});return G.data.rows},{refreshDeps:[_,C,T,I,M,D,...B],onError(G){console.error(G)}}),H=useCreation(()=>F==null?void 0:F.map(G=>{const Y=G.data;return G.actionType===AuditLogAction.APP_OBJECTS_SYNC&&(Y.size=xbytes(Y.size,{iec:!0})),{...G,description:L(translateKeyMap[G.actionType].description,{...Y,relativeTime:formatRelativeTime(G.createdAt,N)})}}),[F,N]);return{loading:V,data:H,error:U}}function AuditLogBar({endpoint:_,spaceStatus:C,errorCode:T,deps:I=[]}){const{t:M}=useLocale(),{loading:D,data:B}=useAuditLog({endpoint:_,spaceStatus:C,errorCode:T,deps:I}),{baseUrl:L,spaceDid:N,appDid:V}=getSpaceEndpointContext(_),F=B==null?void 0:B[0];return D||C===DIDSpaceStatus.LOADING?jsxRuntimeExports.jsx(Skeleton,{variant:"text",sx:{width:"100%",fontSize:"1rem"}}):F?jsxRuntimeExports.jsxs(Box,{sx:{ml:"4px",fontSize:"14px"},children:[F.description,jsxRuntimeExports.jsxs(Link$2,{href:joinURL(L,`space/${N}/apps/${V}/auditLogs`),target:"_blank",underline:"hover",sx:{color:"primary.main",ml:1,display:"inline-flex",alignItems:"center"},children:[M("common.viewMore")," ",jsxRuntimeExports.jsx(default_1$3,{sx:{fontSize:"14px",marginLeft:"4px",verticalAlign:"-2px"}})]})]}):null}const expectVersion=`${version$1}`;function Status({spaceUrl:_,status:C,errorCode:T,refresh:I,sx:M,spaceInfo:D,...B}){const{t:L,locale:N}=useLocale(),V={marginRight:"4px"},F=withQuery(joinURL(_,"overview"),{guide:1}),U=useCreation(()=>({[DIDSpaceStatus.LOADING]:{icon:null,text:null},[DIDSpaceStatus.CONNECTED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnected,{style:V}),text:jsxRuntimeExports.jsx("span",{style:{color:"#047857"},children:L("storage.spaces.connected.tag")})},[DIDSpaceStatus.DISCONNECTED]:{icon:jsxRuntimeExports.jsx(SvgSpaceDisconnect,{style:V}),text:jsxRuntimeExports.jsx("span",{style:{color:"#626a77"},children:L("storage.spaces.disconnected.tag")})}}),[N]),H=reactExports.useMemo(()=>D==null?void 0:D.version,[D]),G=useCreation(()=>({[SPACE_CONNECT_ERROR_CODE.NETWORK_ERROR]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(Box,{sx:{color:"error.main"},children:L("storage.spaces.error.networkError")})},[SPACE_CONNECT_ERROR_CODE.EXPIRED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.expired"),url:F})},[SPACE_CONNECT_ERROR_CODE.PAST_DUE]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.pastDue"),url:F})},[SPACE_CONNECT_ERROR_CODE.INVALID]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.invalid"),url:F})},[SPACE_CONNECT_ERROR_CODE.UNIT_LIMIT]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.unitLimit"),url:F})},[SPACE_CONNECT_ERROR_CODE.CORS_BLOCKED]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.corsBlocked"),url:withQuery(fixCorsErrorPageUrl,{locale:N})})},[SPACE_CONNECT_ERROR_CODE.INCOMPATIBLE]:{icon:jsxRuntimeExports.jsx(SvgSpaceConnectError,{style:V}),text:jsxRuntimeExports.jsx(ErrorLink,{title:L("storage.spaces.error.incompatible",{spaceVersion:H||" < 0.5.77",expectVersion}),url:joinURL(new URL(_).origin,".well-known/service/admin/components")})}}),[N,H]),{icon:Y,text:Z}=C===DIDSpaceStatus.UNAVAILABLE?G[T]:U[C];return reactExports.useEffect(()=>{const Q=()=>{document.hidden||I()};return C!==DIDSpaceStatus.CONNECTED?document.addEventListener("visibilitychange",Q):document.removeEventListener("visibilitychange",Q),()=>document.removeEventListener("visibilitychange",Q)},[C,I]),jsxRuntimeExports.jsxs(Box,{component:"span",sx:{display:"flex",alignItems:"center",color:"primary.main",fontSize:14,...M},...B,children:[Y," ",Z]})}function ErrorLink({title:_,url:C}){const{t:T}=useLocale();return jsxRuntimeExports.jsx(Tooltip,{title:jsxRuntimeExports.jsx("span",{style:{whiteSpace:"pre-wrap"},children:_}),placement:"top",children:jsxRuntimeExports.jsxs(Link$2,{href:C,target:"_blank",underline:"hover",color:"error",sx:{display:"flex",alignItems:"center",color:"error.main"},children:[jsxRuntimeExports.jsx("span",{children:T("storage.spaces.error.tag")}),jsxRuntimeExports.jsx(default_1$3,{sx:{fontSize:"14px",marginLeft:"4px"}})]})})}function DIDSpaceConnection({endpoint:_,selected:C=!1,compat:T,action:I,footer:M=!1,className:D,deps:B=[],...L}){const N=useMobile(),{t:V}=useLocale();let F=T;isUndefined$1(F)&&(F=N);const U=getSpaceDidFromEndpoint(_),H=getSpaceUrlFromEndpoint(_),G=getSpaceGatewayUrlFromEndpoint(_),[Y,Z]=reactExports.useState(!1),Q=reactExports.useMemo(()=>[Y].concat(B),[Y,B]),X=()=>Z(fe=>!fe),{data:oe,error:ae,loading:le}=useSpaceInfo({endpoint:_,deps:Q});let pe="";const me=(oe==null?void 0:oe.isAvailable)??!1,ve=reactExports.useRef(DIDSpaceStatus.LOADING);let _e=0;if(le)ve.current=DIDSpaceStatus.LOADING,pe=jsxRuntimeExports.jsx(Skeleton,{variant:"text",sx:{width:"180px",fontSize:"1rem"}});else if(ae instanceof AxiosError)pe=V("common.unknown"),ve.current=DIDSpaceStatus.UNAVAILABLE,isCorsBlockedError(ae)?_e=SPACE_CONNECT_ERROR_CODE.CORS_BLOCKED:_e=SPACE_CONNECT_ERROR_CODE.NETWORK_ERROR;else if(oe){pe=oe.name;const fe=oe.version;!fe||semver$1.major(expectVersion)!==semver$1.major(fe)?(ve.current=DIDSpaceStatus.UNAVAILABLE,_e=SPACE_CONNECT_ERROR_CODE.INCOMPATIBLE):me?ve.current=DIDSpaceStatus.CONNECTED:(ve.current=DIDSpaceStatus.UNAVAILABLE,_e=oe.errorCode,_e===SPACE_CONNECT_ERROR_CODE.UNAUTHORIZED&&(ve.current=DIDSpaceStatus.DISCONNECTED))}const Re={spaceGateway:{did:U,name:(oe==null?void 0:oe.name)??"",url:G,endpoint:_,ownerDid:(oe==null?void 0:oe.ownerDid)??""},spaceStatus:ve.current,errorCode:_e,selected:C,compat:F,refresh:X},Ve=()=>le?null:typeof I=="function"?I(Re):I,Ne=jsxRuntimeExports.jsx(AuditLogBar,{endpoint:_,spaceStatus:ve.current,errorCode:_e,deps:Q}),We=()=>typeof M=="function"?M({...Re,originalFooter:Ne}):M===!0?Ne:null;return jsxRuntimeExports.jsxs(BoxContainer,{className:classNames(D,{selected:C,error:_e>0}),...L,children:[F&&jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",marginBottom:1,children:[C&&jsxRuntimeExports.jsx(Status,{spaceUrl:H,status:ve.current,errorCode:_e,refresh:X,spaceInfo:oe,flexShrink:0,sx:{ml:"4px"}}),jsxRuntimeExports.jsx(Box,{flex:1}),Ve()]}),jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",children:[jsxRuntimeExports.jsx(DIDSpaceNFTPreview,{src:getSpaceNftDisplayUrlFromEndpoint(_),width:"72px",height:"72px"}),jsxRuntimeExports.jsxs(Stack,{ml:2,flex:1,spacing:1,minWidth:0,children:[jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",sx:{whiteSpace:"nowrap"},children:[pe&&jsxRuntimeExports.jsx(Box,{className:"space-name",children:pe}),!F&&C&&jsxRuntimeExports.jsx(Status,{spaceUrl:H,status:ve.current,errorCode:_e,refresh:X,spaceInfo:oe,sx:{mr:1}})]}),jsxRuntimeExports.jsx(DID,{copyable:!1,size:14,compact:!0,responsive:!1,did:U,sx:{".did-address-text":{color:"text.secondary"}}})]}),!F&&Ve()]}),We()]})}const BoxContainer=styled(Box)`
|
|
3213
3213
|
display: flex;
|
|
3214
3214
|
flex-direction: column;
|
|
3215
3215
|
padding: 16px;
|
|
@@ -3509,4 +3509,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ce=ie,he=ne),se===void
|
|
|
3509
3509
|
.hljs * {
|
|
3510
3510
|
white-space: normal; // autowrap
|
|
3511
3511
|
}
|
|
3512
|
-
`;var cjs,hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var _=function(oe){return C(oe)&&!T(oe)};function C(X){return!!X&&typeof X=="object"}function T(X){var oe=Object.prototype.toString.call(X);return oe==="[object RegExp]"||oe==="[object Date]"||D(X)}var I=typeof Symbol=="function"&&Symbol.for,M=I?Symbol.for("react.element"):60103;function D(X){return X.$$typeof===M}function B(X){return Array.isArray(X)?[]:{}}function L(X,oe){return oe.clone!==!1&&oe.isMergeableObject(X)?Z(B(X),X,oe):X}function N(X,oe,ae){return X.concat(oe).map(function(le){return L(le,ae)})}function V(X,oe){if(!oe.customMerge)return Z;var ae=oe.customMerge(X);return typeof ae=="function"?ae:Z}function F(X){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(X).filter(function(oe){return Object.propertyIsEnumerable.call(X,oe)}):[]}function U(X){return Object.keys(X).concat(F(X))}function H(X,oe){try{return oe in X}catch{return!1}}function G(X,oe){return H(X,oe)&&!(Object.hasOwnProperty.call(X,oe)&&Object.propertyIsEnumerable.call(X,oe))}function Y(X,oe,ae){var le={};return ae.isMergeableObject(X)&&U(X).forEach(function(pe){le[pe]=L(X[pe],ae)}),U(oe).forEach(function(pe){G(X,pe)||(H(X,pe)&&ae.isMergeableObject(oe[pe])?le[pe]=V(pe,ae)(X[pe],oe[pe],ae):le[pe]=L(oe[pe],ae))}),le}function Z(X,oe,ae){ae=ae||{},ae.arrayMerge=ae.arrayMerge||N,ae.isMergeableObject=ae.isMergeableObject||_,ae.cloneUnlessOtherwiseSpecified=L;var le=Array.isArray(oe),pe=Array.isArray(X),me=le===pe;return me?le?ae.arrayMerge(X,oe,ae):Y(X,oe,ae):L(oe,ae)}Z.all=function(oe,ae){if(!Array.isArray(oe))throw new Error("first argument should be an array");return oe.reduce(function(le,pe){return Z(le,pe,ae)},{})};var Q=Z;return cjs=Q,cjs}export{getWebWalletUrl as $,
|
|
3512
|
+
`;var cjs,hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var _=function(oe){return C(oe)&&!T(oe)};function C(X){return!!X&&typeof X=="object"}function T(X){var oe=Object.prototype.toString.call(X);return oe==="[object RegExp]"||oe==="[object Date]"||D(X)}var I=typeof Symbol=="function"&&Symbol.for,M=I?Symbol.for("react.element"):60103;function D(X){return X.$$typeof===M}function B(X){return Array.isArray(X)?[]:{}}function L(X,oe){return oe.clone!==!1&&oe.isMergeableObject(X)?Z(B(X),X,oe):X}function N(X,oe,ae){return X.concat(oe).map(function(le){return L(le,ae)})}function V(X,oe){if(!oe.customMerge)return Z;var ae=oe.customMerge(X);return typeof ae=="function"?ae:Z}function F(X){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(X).filter(function(oe){return Object.propertyIsEnumerable.call(X,oe)}):[]}function U(X){return Object.keys(X).concat(F(X))}function H(X,oe){try{return oe in X}catch{return!1}}function G(X,oe){return H(X,oe)&&!(Object.hasOwnProperty.call(X,oe)&&Object.propertyIsEnumerable.call(X,oe))}function Y(X,oe,ae){var le={};return ae.isMergeableObject(X)&&U(X).forEach(function(pe){le[pe]=L(X[pe],ae)}),U(oe).forEach(function(pe){G(X,pe)||(H(X,pe)&&ae.isMergeableObject(oe[pe])?le[pe]=V(pe,ae)(X[pe],oe[pe],ae):le[pe]=L(oe[pe],ae))}),le}function Z(X,oe,ae){ae=ae||{},ae.arrayMerge=ae.arrayMerge||N,ae.isMergeableObject=ae.isMergeableObject||_,ae.cloneUnlessOtherwiseSpecified=L;var le=Array.isArray(oe),pe=Array.isArray(X),me=le===pe;return me?le?ae.arrayMerge(X,oe,ae):Y(X,oe,ae):L(oe,ae)}Z.all=function(oe,ae){if(!Array.isArray(oe))throw new Error("first argument should be an array");return oe.reduce(function(le,pe){return Z(le,pe,ae)},{})};var Q=Z;return cjs=Q,cjs}export{getWebWalletUrl as $,eventemitter3Exports as A,getLocale$1 as B,Center as C,AvatarWithErrorBoundary as D,DID as E,getVisitorId$2 as F,useBrowser as G,HelmetExport as H,useSecurity as I,API_DID_PREFIX as J,getMaster as K,LocaleProvider as L,getFederatedEnabled as M,encodeConnectUrl as N,setVisitorId as O,getAppId$1 as P,updateConnectedInfo as Q,ResultWrapper as R,SessionUser as S,ToastProvider as T,default_1$r as U,logger$1 as V,ErrorFallback as W,PoweredBy as X,getBlockletSDK as Y,decodeConnectUrl as Z,DidConnect as _,formatCacheTtl as a,retry as a$,requireCreateSvgIcon as a0,NFTDisplay$1 as a1,LocaleContext as a2,ButtonComponent as a3,Img as a4,StepProvider as a5,Layout as a6,Dialog as a7,ConnectButton as a8,LocaleSelector as a9,applyMiddleware as aA,compose as aB,joinUrl as aC,Icon$3 as aD,colors$2 as aE,pWaitFor$1 as aF,styled as aG,default_1$c as aH,createAxios$2 as aI,default_1$9 as aJ,default_1$h as aK,default_1$s as aL,Mt as aM,semver$1 as aN,useStepContext as aO,AnimationWaiter as aP,Confirm as aQ,DIDSpaceConnection as aR,DIDSpaceConnect as aS,require$$10 as aT,ClickToCopy as aU,RelativeTime as aV,DataTable as aW,default_1$f as aX,default_1$3 as aY,getCSRFToken as aZ,Switch as a_,default_1$k as aa,default_1$l as ab,Tag$1 as ac,useSnackbar as ad,SnackbarContent as ae,default_1$u as af,colors$1 as ag,BlockletSDK as ah,purify as ai,Dashboard as aj,ErrorBoundary as ak,useFullPage as al,Alert$1 as am,Tabs as an,UserCenter as ao,default_1$8 as ap,DashboardWrapper as aq,util$1 as ar,getSafeUrl as as,getDIDColor as at,SessionContext as au,Empty as av,CopyButton as aw,objectAssign$2 as ax,bindActionCreators as ay,createStore as az,constant as b,ThemeProvider as b$,useMobile$1 as b0,default_1$1 as b1,util$a as b2,requireShams as b3,callBound$2 as b4,objectKeys$8 as b5,esObjectAtoms as b6,hasPropertyDescriptors_1 as b7,defineDataProperty as b8,callBindExports as b9,TableSearch as bA,dist as bB,localizedFormatPlugin as bC,require$$6 as bD,_defineProperty$8 as bE,DndContext as bF,isEqual as bG,DragSource as bH,DropTarget as bI,Icon as bJ,require$$1$2 as bK,require$$9 as bL,loadIcon as bM,Header$1 as bN,Footer$1 as bO,DIDSpaceStatus as bP,defineProperty as bQ,requireCjs as bR,default_1$a as bS,default_1$5 as bT,retry$1 as bU,isNetworkError as bV,pTimeout$2 as bW,TimeoutError_1 as bX,withDeprecated as bY,xbytes as bZ,WrapComponentInstaller as b_,callBound$4 as ba,safeBufferExports as bb,requireBrowser$9 as bc,requireElliptic as bd,requireCryptoBrowserify as be,ripemd160 as bf,lib$5 as bg,default_1$b as bh,PasskeyActions as bi,useConfirm as bj,getDurableData as bk,UserSessions as bl,SplitButton as bm,Typography as bn,useDrop as bo,useDrag as bp,DndProvider as bq,HTML5Backend as br,data$u as bs,data$t as bt,data$v as bu,DidAddressWrapper as bv,CodeBlock as bw,sleep$2 as bx,data$r as by,default_1$i as bz,createSessionContext as c,create$f as d,useLocaleContext as e,flat$1 as f,default_1$n as g,readableBrowserExports as h,inherits_browserExports as i,Toast$1 as j,jsonStableStringify as k,localizedFormatExports as l,lib$6 as m,lib$4 as n,lib$7 as o,browserPonyfillExports as p,require$$2$1 as q,relativeTimeExports as r,semver as s,timezoneExports as t,utcExports as u,browser as v,o$1 as w,lib$2 as x,getCookieOptions as y,isUrl$2 as z};
|