@abtnode/webapp 1.16.29-beta-a076832b → 1.16.29-beta-bb5685f8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-BhAOgw8n.js → Add-C0jlH_zP.js} +1 -1
- package/dist/assets/{ArrowDropDown-BhDZI_jd.js → ArrowDropDown-DrehtX2f.js} +1 -1
- package/dist/assets/{Autocomplete-chf9WG4F.js → Autocomplete-CdIGu-2l.js} +1 -1
- package/dist/assets/{Breadcrumbs-Un40qFmK.js → Breadcrumbs-Oi4z-7JU.js} +1 -1
- package/dist/assets/{ButtonGroup-BE_QoGeC.js → ButtonGroup-NvrTYf1s.js} +1 -1
- package/dist/assets/{CheckCircle-B2UAY6EW.js → CheckCircle-uTfAh2GX.js} +1 -1
- package/dist/assets/{ChevronLeft-LgQFTPg9.js → ChevronLeft-C-HoTf-Q.js} +1 -1
- package/dist/assets/{ChevronRight-R1AD6T8t.js → ChevronRight-c5xZzIfK.js} +1 -1
- package/dist/assets/{Close-BA4_6LGT.js → Close-C5A1sroQ.js} +1 -1
- package/dist/assets/{Delete-BuQlLthh.js → Delete-BqtdSlNQ.js} +1 -1
- package/dist/assets/DeleteOutline-DWh2h-xw.js +1 -0
- package/dist/assets/{DeleteOutline-CfWsbc1a.js → DeleteOutline-DuzabIUt.js} +1 -1
- package/dist/assets/{Done-CbG1n7TV.js → Done-MfHSISFV.js} +1 -1
- package/dist/assets/{Edit-D2R20RFt.js → Edit-Cn_G48ZU.js} +1 -1
- package/dist/assets/{EditIcon-DWIVTczi.js → EditIcon-B1ovGBjD.js} +1 -1
- package/dist/assets/{FilterList-gGx11q-p.js → FilterList-DiA-6Il8.js} +1 -1
- package/dist/assets/{Google-CpcA0NCN.js → Google-DQdWmIOC.js} +1 -1
- package/dist/assets/{Https-YbDZUE--.js → Https-BRpH0Ae8.js} +1 -1
- package/dist/assets/{InputAdornment-BPwm2dnh.js → InputAdornment-CDb1Pg-S.js} +1 -1
- package/dist/assets/{InputLabel-CfRvg3E0.js → InputLabel-Xa0HFZxn.js} +1 -1
- package/dist/assets/{LastPage-BkIsmfi2.js → LastPage-BtCi2wuv.js} +1 -1
- package/dist/assets/{Launch-BFRTKCgX.js → Launch-BRBdnw92.js} +1 -1
- package/dist/assets/{Link-BZodiBIz.js → Link-B8edwUNQ.js} +1 -1
- package/dist/assets/{LoadingButton-DQ3wXyLh.js → LoadingButton-UpGMfSHA.js} +1 -1
- package/dist/assets/{LockIcon-CF3Yl9tf.js → LockIcon-Bs5dBhg9.js} +1 -1
- package/dist/assets/{Loop-DJX-NWYU.js → Loop-QRcaFYyu.js} +1 -1
- package/dist/assets/{MoreVert-Cw5JqD-n.js → MoreVert-0x6ZKOOm.js} +1 -1
- package/dist/assets/{Pagination-Dw6rLiDa.js → Pagination-BWwDGBkP.js} +1 -1
- package/dist/assets/{Public-4ZipZDUd.js → Public-DBy7o1UF.js} +1 -1
- package/dist/assets/{SchemaReference.es-C2JY9xEh.js → SchemaReference.es-p0gT2gqO.js} +1 -1
- package/dist/assets/{Search-Co3tOmY1.js → Search-DwG5nouB.js} +1 -1
- package/dist/assets/{Select-BHyxLJXO.js → Select-CjUz8jvK.js} +1 -1
- package/dist/assets/{Skeleton-FWWrVymY.js → Skeleton-CDB0GyGY.js} +1 -1
- package/dist/assets/{Slider-CTrqzFQ0.js → Slider-DwYIlYBn.js} +1 -1
- package/dist/assets/{Stepper-BYinN7qr.js → Stepper-antHQYRF.js} +1 -1
- package/dist/assets/{TextField-DsYRZFfL.js → TextField-WEzwgjP0.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-LuLWYYav.js → ToggleButtonGroup-dJuSsWUY.js} +1 -1
- package/dist/assets/{ViewList-IW1QaH_L.js → ViewList-BAMGdQxk.js} +1 -1
- package/dist/assets/actions-Axwta7IP.js +11 -0
- package/dist/assets/{actions-DkgRiPBw.js → actions-BbcoFZjT.js} +1 -1
- package/dist/assets/{agreement-DByQv9ZX.js → agreement-CiDOtCXU.js} +1 -1
- package/dist/assets/api-DgUgGcaK.js +1 -0
- package/dist/assets/{app-avatar-Cx6kCeuS.js → app-avatar-DSkk2bqr.js} +1 -1
- package/dist/assets/{audit-logs-XHAxITYC.js → audit-logs-C-4-t6rX.js} +1 -1
- package/dist/assets/blocklet-CbzARbti.js +1 -0
- package/dist/assets/{brace-fold.es-LH9Jpy3f.js → brace-fold.es-CGT1cM_X.js} +1 -1
- package/dist/assets/{bundle-avatar-D3srwykJ.js → bundle-avatar-BRoQ90__.js} +1 -1
- package/dist/assets/{chart-CwUcOCm9.js → chart-DnmL96Rh.js} +1 -1
- package/dist/assets/{click-to-copy-CPgkX4m2.js → click-to-copy-Pr-Zbrif.js} +1 -1
- package/dist/assets/{closebrackets.es-CZSR_3xe.js → closebrackets.es-DsNYy4i3.js} +1 -1
- package/dist/assets/{codemirror.es-CDBPSM3n.js → codemirror.es-DwAzghgf.js} +1 -1
- package/dist/assets/{comment.es-DGH4itKk.js → comment.es-DhPl6sms.js} +1 -1
- package/dist/assets/{config-navigation-NRSeF0zB.js → config-navigation-DAD-pXS6.js} +1 -1
- package/dist/assets/{delete-confirm-DGNC6LoB.js → delete-confirm-C2q7Vvj-.js} +1 -1
- package/dist/assets/{detail-gUZ7dE3r.js → detail-BTV64Agz.js} +3 -3
- package/dist/assets/{dialog.es-BCpHrEUI.js → dialog.es-Bbrn4b99.js} +1 -1
- package/dist/assets/{download-cKQNB8IS.js → download-B9hXOuXD.js} +1 -1
- package/dist/assets/{foldgutter.es-B4z5FPpx.js → foldgutter.es-BJubswZD.js} +1 -1
- package/dist/assets/getValidReactChildren-CqAGVe_y.js +1 -0
- package/dist/assets/{hint.es-CjtvhU7v.js → hint.es-C-RplnH-.js} +1 -1
- package/dist/assets/{hint.es2-C3fkpJdT.js → hint.es2-CNgpWTT8.js} +1 -1
- package/dist/assets/{iframe-a4uHsJw3.js → iframe-z1F3R-br.js} +1 -1
- package/dist/assets/{index-D3BiJZx7.js → index-3GrPYR-0.js} +1 -1
- package/dist/assets/{index-223JGPy0.js → index-7QaQQyyg.js} +1 -1
- package/dist/assets/{index-B6yK_bzX.js → index-9TIeU8eV.js} +3 -3
- package/dist/assets/{index-Bl4RVAyg.js → index-Amewrci5.js} +1 -1
- package/dist/assets/{index-Asa_0R8u.js → index-B-ejgY6o.js} +1 -1
- package/dist/assets/{index-CaILkSHA.js → index-BDKa_BY3.js} +13 -13
- package/dist/assets/{index-BPGGylov.js → index-BJgIXaX1.js} +1 -1
- package/dist/assets/{index-ByUD-X5g.js → index-BKYjcIDk.js} +1 -1
- package/dist/assets/{index-987rzvE8.js → index-BNcfbTbf.js} +1 -1
- package/dist/assets/{index-DlnomLD1.js → index-BYxffRHK.js} +1 -1
- package/dist/assets/{index-ltfZ8gtL.js → index-Bd27-rFC.js} +1 -1
- package/dist/assets/{index-ZT9QeB3O.js → index-BeATEtzy.js} +1 -1
- package/dist/assets/{index-CuDSWVTP.js → index-BniMuAse.js} +1 -1
- package/dist/assets/{index-D21hPRpg.js → index-BuCL0HpY.js} +1 -1
- package/dist/assets/{index-BdXc-VnA.js → index-C2d2WkHe.js} +1 -1
- package/dist/assets/{index-DLXcR0K0.js → index-C6YaOYlB.js} +1 -1
- package/dist/assets/{index-rDmYbmrh.js → index-CSEZ2el2.js} +1 -1
- package/dist/assets/{index-D2bnoRiO.js → index-CSOdd_os.js} +1 -1
- package/dist/assets/{index-Do9FcEok.js → index-C_LsHXyQ.js} +1 -1
- package/dist/assets/{index-CiHdSPzG.js → index-CdfKqS5O.js} +1 -1
- package/dist/assets/{index-DesqGCgv.js → index-CgtLAydP.js} +1 -1
- package/dist/assets/{index-dI-5DMUE.js → index-Csvz8Imb.js} +1 -1
- package/dist/assets/{index-7DZ48QpY.js → index-D-5tSEIi.js} +1 -1
- package/dist/assets/{index-C7XdmdZm.js → index-D5kwWkvv.js} +1 -1
- package/dist/assets/{index-C32jjYE0.js → index-DKWkPDvp.js} +1 -1
- package/dist/assets/{index-Byw0qEee.js → index-DOduirD-.js} +1 -1
- package/dist/assets/{index-QpveLXno.js → index-DcDo8U3a.js} +1 -1
- package/dist/assets/{index-C4vYMHes.js → index-DdpOtHIy.js} +1 -1
- package/dist/assets/{index-DtSAlyAb.js → index-Ddq4jr_U.js} +2 -2
- package/dist/assets/{index-BsnWcB_C.js → index-DkP2dxtw.js} +1 -1
- package/dist/assets/{index-BH5Du5OK.js → index-DmQo-C54.js} +3 -3
- package/dist/assets/{index-D858U3Qw.js → index-DqaA-1j3.js} +1 -1
- package/dist/assets/{index-CmnxH5_7.js → index-Dx7GtFO4.js} +1 -1
- package/dist/assets/{index-CuQoWTSG.js → index-DyoBof3A.js} +1 -1
- package/dist/assets/{index-CbVpP-kP.js → index-GDpPN-gh.js} +1 -1
- package/dist/assets/{index-9D4yHZMO.js → index-HfmVdk5l.js} +1 -1
- package/dist/assets/{index-DCdEnHXm.js → index-KpJXpdYI.js} +1 -1
- package/dist/assets/{index-iAyUVxpq.js → index-P3idGO87.js} +1 -1
- package/dist/assets/{index-DECoPT7p.js → index-WbmzOgUa.js} +1 -1
- package/dist/assets/{index-BS3cETry.js → index-_bmSdh1U.js} +5 -5
- package/dist/assets/{index-DGMii6rV.js → index-eBDS1eXE.js} +1 -1
- package/dist/assets/{index-Dp7ygnu_.js → index-n9PgzTmH.js} +1 -1
- package/dist/assets/{index-erVE_nO9.js → index-nRTaNnQw.js} +1 -1
- package/dist/assets/{index-BooGyAWJ.js → index-qxGoRIpD.js} +1 -1
- package/dist/assets/{index.es-D7AXw11H.js → index.es-mE5_ixZH.js} +1 -1
- package/dist/assets/{index.esm-UKhIq9Zf.js → index.esm-fGXhVzzq.js} +1 -1
- package/dist/assets/{info-addon.es-BOBKDmMJ.js → info-addon.es-BvVuxhQQ.js} +1 -1
- package/dist/assets/{info.es-TxCSWnxL.js → info.es-MM55o9RA.js} +1 -1
- package/dist/assets/{install-from-url-C2MMBwn8.js → install-from-url-D0Mot9As.js} +1 -1
- package/dist/assets/{invitation-fKgtV8Zz.js → invitation-DQ7pnJkF.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DSWbb6Lw.js → is-path-prefix-equal-DMaJOeQN.js} +1 -1
- package/dist/assets/{isEqual-j-zS_8Gf.js → isEqual-BQFT4gzY.js} +1 -1
- package/dist/assets/{item-DafV54vj.js → item-C7ih-Gxw.js} +1 -1
- package/dist/assets/{javascript.es-Bs8LWftY.js → javascript.es-BiK5ETle.js} +1 -1
- package/dist/assets/{jump-to-line.es-D-yW_11z.js → jump-to-line.es-xLmM6XQj.js} +1 -1
- package/dist/assets/{jump.es-BOkuipP6.js → jump.es-BK7Mo0mV.js} +1 -1
- package/dist/assets/{line-BT-CqrvO.js → line-DRJUtJJ7.js} +3 -3
- package/dist/assets/{lint.es-Bnw9EvpL.js → lint.es-CP-Ar6xo.js} +1 -1
- package/dist/assets/{lint.es2-ClUYPmWE.js → lint.es2-WhVmGalN.js} +1 -1
- package/dist/assets/{lint.es3-Wt4762FH.js → lint.es3-DAPaYml5.js} +1 -1
- package/dist/assets/{list-header-D8gIqGsc.js → list-header-Dyo4DcEh.js} +1 -1
- package/dist/assets/{log-B4RGVLfQ.js → log-Dg18Gkt2.js} +1 -1
- package/dist/assets/{lottie-DPC4uwjn.js → lottie-Bqw4aFON.js} +1 -1
- package/dist/assets/{matchbrackets.es-B_DBzsmq.js → matchbrackets.es-DVUMeePc.js} +1 -1
- package/dist/assets/{memory-BkPehB2B.js → memory-BLxwSKAa.js} +1 -1
- package/dist/assets/{mode.es-Rcfl9bQx.js → mode.es-DvtWXSbp.js} +1 -1
- package/dist/assets/{mode.es2-q3QJyvaG.js → mode.es2-yGA392Ce.js} +1 -1
- package/dist/assets/{mode.es3-BFNoOjTH.js → mode.es3-bF1o4S_X.js} +1 -1
- package/dist/assets/{onlineParser.es-Co9RB_dz.js → onlineParser.es-D8oRG-7l.js} +1 -1
- package/dist/assets/{overview-B0Vrv3iN.js → overview-e30PAYmB.js} +1 -1
- package/dist/assets/{react-DspsQPdu.js → react-Dixc1jm3.js} +3 -3
- package/dist/assets/{redux-CW-2wISG.js → redux-Cw-bFLc5.js} +1 -1
- package/dist/assets/{resource-dialog-B2JtbLNW.js → resource-dialog-C522yqNu.js} +1 -1
- package/dist/assets/{runtime-Cdoj20eA.js → runtime-D6nwOziK.js} +1 -1
- package/dist/assets/{search.es-CZGl1gJE.js → search.es-Cd0QD07l.js} +1 -1
- package/dist/assets/{searchcursor.es-CV5CjRq7.js → searchcursor.es-Bfc4-LPG.js} +1 -1
- package/dist/assets/service-DgYqociD.js +1 -0
- package/dist/assets/{shorten-label-MNOvw9uc.js → shorten-label-DlpxUgCq.js} +1 -1
- package/dist/assets/{show-hint.es-Dv8MKhoo.js → show-hint.es-CN7yg_JP.js} +1 -1
- package/dist/assets/{slicedToArray-BjdTUeMu.js → slicedToArray-CiZnKyCy.js} +1 -1
- package/dist/assets/{spaces-CJAn8A_O.js → spaces-Ca83-jCl.js} +1 -1
- package/dist/assets/{sublime.es-CeJNrSLR.js → sublime.es-DgFQ3pas.js} +1 -1
- package/dist/assets/{switch-control-DRGFY74g.js → switch-control-67XrThc4.js} +1 -1
- package/dist/assets/{table-icons-BL8xSB3P.js → table-icons-CRJe_3MP.js} +2 -2
- package/dist/assets/{tag-BcsNyCIC.js → tag-DAjEEpCa.js} +1 -1
- package/dist/assets/{team-BwAkC099.js → team-CyhoyJ9a.js} +1 -1
- package/dist/assets/{toUpper-Cc1D9AuZ.js → toUpper-CYBV7cHO.js} +1 -1
- package/dist/assets/{traffic-D8r3k_ae.js → traffic-DeHbNL-I.js} +1 -1
- package/dist/assets/{url-evaluation-Ddzyc50Z.js → url-evaluation-CbzEvBzd.js} +1 -1
- package/dist/assets/{url-join-BdHqt1dS.js → url-join-DIhz1PVb.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-ByiBXoYS.js → use-blocklet-info-for-connect-did-spaces-DuQNnaZW.js} +1 -1
- package/dist/assets/{useLocalStorage-xuSREX68.js → useLocalStorage-BRZrZD2R.js} +1 -1
- package/dist/assets/{util-BxfggyNA.js → util-9vU2zZs2.js} +1 -1
- package/dist/assets/{wait-container-Cb5wu-yb.js → wait-container-oqsX_-iJ.js} +1 -1
- package/dist/assets/{withStyles-Bix6STf4.js → withStyles-CBM6laCD.js} +1 -1
- package/dist/assets/{wrap-locale-C2eTlgXw.js → wrap-locale-BFSbv413.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BuR7k_j3.js +0 -1
- package/dist/assets/actions-DCJ-sSPn.js +0 -11
- package/dist/assets/api-Bm6QocBj.js +0 -1
- package/dist/assets/blocklet-sVlwX65X.js +0 -1
- package/dist/assets/getValidReactChildren-CYcUTCCR.js +0 -1
- package/dist/assets/service-DM6evFxx.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cu as b}from"./index-
|
|
1
|
+
import{cu as b}from"./index-Ddq4jr_U.js";function c(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,l=-1,t=0,n,f=0;f<=o.length;++f){if(f<o.length)n=o.charCodeAt(f);else{if(n===47)break;n=47}if(n===47){if(!(l===f-1||t===1))if(l!==f-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),l=f,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,l=f,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(l+1,f):r=o.slice(l+1,f),i=f-l-1;l=f,t=0}else n===46&&t!==-1?++t:t=-1}return r}function h(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,l=arguments.length-1;l>=-1&&!r;l--){var t;l>=0?t=arguments[l]:(i===void 0&&(i=b.cwd()),t=i),c(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(c(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return c(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];c(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(c(e),c(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var l=e.length,t=l-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var f=r.length,s=f-n,v=t<s?t:s,u=-1,a=0;a<=v;++a){if(a===v){if(s>v){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>v&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var m=e.charCodeAt(i+a),C=r.charCodeAt(n+a);if(m!==C)break;m===47&&(u=a)}var d="";for(a=i+u+1;a<=l;++a)(a===l||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(c(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,l=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){l=n;break}}else t=!1;return l===-1?i?"/":".":i&&l===1?"//":e.slice(0,l)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');c(e);var i=0,l=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var v=e.charCodeAt(n);if(v===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),f>=0&&(v===r.charCodeAt(f)?--f===-1&&(l=n):(f=-1,l=s))}return i===l?l=s:l===-1&&(l=e.length),e.slice(i,l)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else l===-1&&(t=!1,l=n+1);return l===-1?"":e.slice(i,l)}},extname:function(e){c(e);for(var r=-1,i=0,l=-1,t=!0,n=0,f=e.length-1;f>=0;--f){var s=e.charCodeAt(f);if(s===47){if(!t){i=f+1;break}continue}l===-1&&(t=!1,l=f+1),s===46?r===-1?r=f:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||l===-1||n===0||n===1&&r===l-1&&r===i+1?"":e.slice(r,l)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return h("/",e)},parse:function(e){c(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),l=i===47,t;l?(r.root="/",t=1):t=0;for(var n=-1,f=0,s=-1,v=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!v){f=u+1;break}continue}s===-1&&(v=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===f+1?s!==-1&&(f===0&&l?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(f,s)):(f===0&&l?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(f,n),r.base=e.slice(f,s)),r.ext=e.slice(n,s)),f>0?r.dir=e.slice(0,f-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g;var y=g;export{y as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-
|
|
1
|
+
import{r as u,bg as _,bh as B,aK as Q,aL as Y,j as e,q as A,c as P,F as b,m as L,S as O,O as k,B as K,C as w,ad as U,P as j,f as E,D as Z,aW as ee,aX as te,n as S,at as I,o as se,u as G,J as ae,K as ne,U as oe,bi as re,z as ce,bf as ie,d as le,bj as me}from"./index-Ddq4jr_U.js";import{T as de}from"./index-C_LsHXyQ.js";import pe from"./audit-logs-C-4-t6rX.js";import{P as ue,M as fe}from"./index-CSEZ2el2.js";import ye from"./index-BniMuAse.js";import{T as ge}from"./team-CyhoyJ9a.js";import{E as xe}from"./index-n9PgzTmH.js";import{d as he}from"./Add-C0jlH_zP.js";import{T as N}from"./TextField-WEzwgjP0.js";import{F as H,S as V}from"./Select-CjUz8jvK.js";import{I as J}from"./InputLabel-Xa0HFZxn.js";import{C as W}from"./click-to-copy-Pr-Zbrif.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-BqtdSlNQ.js";import{C as Ce}from"./delete-confirm-C2q7Vvj-.js";import{d as ke}from"./Edit-Cn_G48ZU.js";import"./index-P3idGO87.js";import"./useLocalStorage-BRZrZD2R.js";import"./Pagination-BWwDGBkP.js";import"./LastPage-BtCi2wuv.js";import"./index-Bd27-rFC.js";import"./Loop-QRcaFYyu.js";import"./ViewList-BAMGdQxk.js";import"./list-header-Dyo4DcEh.js";import"./Search-DwG5nouB.js";import"./index-BYxffRHK.js";import"./FilterList-DiA-6Il8.js";import"./index-D-5tSEIi.js";import"./redux-Cw-bFLc5.js";import"./MoreVert-0x6ZKOOm.js";import"./index-DqaA-1j3.js";import"./resource-dialog-C522yqNu.js";import"./index-3GrPYR-0.js";import"./index-CSOdd_os.js";import"./tag-DAjEEpCa.js";import"./blocklet-CbzARbti.js";import"./index-HfmVdk5l.js";import"./actions-BbcoFZjT.js";import"./shorten-label-DlpxUgCq.js";import"./index-BJgIXaX1.js";import"./ButtonGroup-NvrTYf1s.js";import"./getValidReactChildren-CqAGVe_y.js";import"./EditIcon-B1ovGBjD.js";import"./LockIcon-Bs5dBhg9.js";import"./Google-DQdWmIOC.js";import"./index-GDpPN-gh.js";import"./isEqual-BQFT4gzY.js";import"./index-Csvz8Imb.js";import"./InputAdornment-CDb1Pg-S.js";import"./ToggleButtonGroup-dJuSsWUY.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},R={},Ae=Y;Object.defineProperty(R,"__esModule",{value:!0});var X=R.default=void 0,we=Ae(Q()),Ie=e;X=R.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function T(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=P(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(L,{component:"div",children:[e.jsx(N,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(J,{children:r("common.passport")}),e.jsx(V,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(O,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(U,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}T.propTypes={remark:j.string,onCreate:j.func};T.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(E),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(Z,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(M,{children:[e.jsx(q,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const q=S.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as R,j as o,C,aw as T,cH as U,z as b,q as W,cB as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-
|
|
1
|
+
import{u as R,j as o,C,aw as T,cH as U,z as b,q as W,cB as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-Ddq4jr_U.js";import{I as H}from"./invitation-DQ7pnJkF.js";import"./index-7QaQQyyg.js";import"./index-CgtLAydP.js";import"./CheckCircle-uTfAh2GX.js";import"./wrap-locale-BFSbv413.js";function K(v){const{api:i,session:f}=T(),{info:s}=R(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),L=r.useCallback(()=>{w(!0)},[]),j=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(C,{});const y=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},I=()=>{w(!1)};return o.jsxs(M,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:y,onClose:I,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(H,{...v,getDataFn:j,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?L:null})]})}const M=B.div`
|
|
2
2
|
width: 100vw;
|
|
3
3
|
height: 100%;
|
|
4
4
|
min-height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as D,j as t,fu as jn,ci as X,fv as wn,fb as ue,O,as as Me,ax as Z,m as M,eB as Sn,d8 as Ct,fw as Cn,q as H,fx as qe,fy as In,aG as Pn,ch as An,dO as It,R as ve,bk as q,cn as Vt,S as ye,fz as Dn,fA as Ve,at as me,D as Y,B as U,C as oe,w as He,J as se,K as ee,P as C,fB as Rn,k as Fe,aR as On,x as En,y as Tn,n as V,fa as kn,f as pe,ad as Se,U as Q,cc as te,A as ie,fC as Ln,aK as Ht,aL as Kt,b as J,dc as Nn,t as Qt,F as W,a1 as Pt,W as Ke,ce as Fn,fD as Gt,aN as Bn,aD as _n,a9 as $n,cJ as Un,a2 as zn,bp as Wn,aW as Mn,aX as qn,Q as Vn}from"./index-DtSAlyAb.js";import{c as Hn}from"./index-ltfZ8gtL.js";import{d as be}from"./Add-BhAOgw8n.js";import{d as Kn}from"./Loop-DJX-NWYU.js";import{d as Qn}from"./ViewList-IW1QaH_L.js";import{L as Gn,S as Xn,d as Xt}from"./list-header-D8gIqGsc.js";import{D as Qe,g as Yn}from"./index-DlnomLD1.js";import"./index-D858U3Qw.js";import{c as Ee,U as Te,d as Yt}from"./resource-dialog-B2JtbLNW.js";import{T as Jn}from"./index-Do9FcEok.js";import{E as Jt}from"./index-Dp7ygnu_.js";import"./index-D2bnoRiO.js";import{W as Zt}from"./tag-BcsNyCIC.js";import{a as G}from"./team-BwAkC099.js";import{u as en}from"./blocklet-sVlwX65X.js";import{C as Ce}from"./click-to-copy-CPgkX4m2.js";import{F as Be,S as _e}from"./Select-BHyxLJXO.js";import{I as $e}from"./InputLabel-CfRvg3E0.js";import{T as tn}from"./TextField-DsYRZFfL.js";import{I as Ue}from"./index-9D4yHZMO.js";import{d as Zn}from"./Delete-BuQlLthh.js";import{A as er}from"./actions-DkgRiPBw.js";import{S as tr}from"./shorten-label-MNOvw9uc.js";var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});var nn=Ge.default=void 0;nr(D);var re=t;function nr(e){return e&&e.__esModule?e:{default:e}}function At(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function Dt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?At(Object(r),!0).forEach(function(i){rr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function rr(e,n,r){return n=sr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function sr(e){var n=or(e,"string");return typeof n=="symbol"?n:String(n)}function or(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Xe=function(n){return(0,re.jsxs)("svg",Dt(Dt({},n),{},{children:[(0,re.jsx)("g",{clipPath:"url(#clip0)",children:(0,re.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,re.jsx)("defs",{children:(0,re.jsx)("clipPath",{id:"clip0",children:(0,re.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Xe.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Xe.displayName="person";nn=Ge.default=Xe;var xe={},ir=e=>encodeURIComponent(e).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`),rn="%[a-f0-9]{2}",Rt=new RegExp("("+rn+")|([^%]+?)","gi"),Ot=new RegExp("("+rn+")+","gi");function ze(e,n){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;n=n||1;var r=e.slice(0,n),i=e.slice(n);return Array.prototype.concat.call([],ze(r),ze(i))}function ar(e){try{return decodeURIComponent(e)}catch{for(var n=e.match(Rt)||[],r=1;r<n.length;r++)e=ze(n,r).join(""),n=e.match(Rt)||[];return e}}function lr(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},r=Ot.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch{var i=ar(r[0]);i!==r[0]&&(n[r[0]]=i)}r=Ot.exec(e)}n["%C2"]="�";for(var d=Object.keys(n),S=0;S<d.length;S++){var P=d[S];e=e.replace(new RegExp(P,"g"),n[P])}return e}var cr=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return lr(e)}},ur=(e,n)=>{if(!(typeof e=="string"&&typeof n=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n==="")return[e];const r=e.indexOf(n);return r===-1?[e]:[e.slice(0,r),e.slice(r+n.length)]},dr=function(e,n){for(var r={},i=Object.keys(e),d=Array.isArray(n),S=0;S<i.length;S++){var P=i[S],p=e[P];(d?n.indexOf(P)!==-1:n(P,p,e))&&(r[P]=p)}return r};(function(e){const n=ir,r=cr,i=ur,d=dr,S=s=>s==null;function P(s){switch(s.arrayFormat){case"index":return o=>(a,c)=>{const u=a.length;return c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[",u,"]"].join("")]:[...a,[y(o,s),"[",y(u,s),"]=",y(c,s)].join("")]};case"bracket":return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[]"].join("")]:[...a,[y(o,s),"[]=",y(c,s)].join("")];case"comma":case"separator":return o=>(a,c)=>c==null||c.length===0?a:a.length===0?[[y(o,s),"=",y(c,s)].join("")]:[[a,y(c,s)].join(s.arrayFormatSeparator)];default:return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,y(o,s)]:[...a,[y(o,s),"=",y(c,s)].join("")]}}function p(s){let o;switch(s.arrayFormat){case"index":return(a,c,u)=>{if(o=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!o){u[a]=c;return}u[a]===void 0&&(u[a]={}),u[a][o[1]]=c};case"bracket":return(a,c,u)=>{if(o=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!o){u[a]=c;return}if(u[a]===void 0){u[a]=[c];return}u[a]=[].concat(u[a],c)};case"comma":case"separator":return(a,c,u)=>{const j=typeof c=="string"&&c.includes(s.arrayFormatSeparator),x=typeof c=="string"&&!j&&l(c,s).includes(s.arrayFormatSeparator);c=x?l(c,s):c;const R=j||x?c.split(s.arrayFormatSeparator).map(_=>l(_,s)):c===null?c:l(c,s);u[a]=R};default:return(a,c,u)=>{if(u[a]===void 0){u[a]=c;return}u[a]=[].concat(u[a],c)}}}function f(s){if(typeof s!="string"||s.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function y(s,o){return o.encode?o.strict?n(s):encodeURIComponent(s):s}function l(s,o){return o.decode?r(s):s}function I(s){return Array.isArray(s)?s.sort():typeof s=="object"?I(Object.keys(s)).sort((o,a)=>Number(o)-Number(a)).map(o=>s[o]):s}function m(s){const o=s.indexOf("#");return o!==-1&&(s=s.slice(0,o)),s}function b(s){let o="";const a=s.indexOf("#");return a!==-1&&(o=s.slice(a)),o}function h(s){s=m(s);const o=s.indexOf("?");return o===-1?"":s.slice(o+1)}function A(s,o){return o.parseNumbers&&!Number.isNaN(Number(s))&&typeof s=="string"&&s.trim()!==""?s=Number(s):o.parseBooleans&&s!==null&&(s.toLowerCase()==="true"||s.toLowerCase()==="false")&&(s=s.toLowerCase()==="true"),s}function v(s,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),f(o.arrayFormatSeparator);const a=p(o),c=Object.create(null);if(typeof s!="string"||(s=s.trim().replace(/^[?#&]/,""),!s))return c;for(const u of s.split("&")){if(u==="")continue;let[j,x]=i(o.decode?u.replace(/\+/g," "):u,"=");x=x===void 0?null:["comma","separator"].includes(o.arrayFormat)?x:l(x,o),a(l(j,o),x,c)}for(const u of Object.keys(c)){const j=c[u];if(typeof j=="object"&&j!==null)for(const x of Object.keys(j))j[x]=A(j[x],o);else c[u]=A(j,o)}return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((u,j)=>{const x=c[j];return x&&typeof x=="object"&&!Array.isArray(x)?u[j]=I(x):u[j]=x,u},Object.create(null))}e.extract=h,e.parse=v,e.stringify=(s,o)=>{if(!s)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),f(o.arrayFormatSeparator);const a=x=>o.skipNull&&S(s[x])||o.skipEmptyString&&s[x]==="",c=P(o),u={};for(const x of Object.keys(s))a(x)||(u[x]=s[x]);const j=Object.keys(u);return o.sort!==!1&&j.sort(o.sort),j.map(x=>{const R=s[x];return R===void 0?"":R===null?y(x,o):Array.isArray(R)?R.reduce(c(x),[]).join("&"):y(x,o)+"="+y(R,o)}).filter(x=>x.length>0).join("&")},e.parseUrl=(s,o)=>{o=Object.assign({decode:!0},o);const[a,c]=i(s,"#");return Object.assign({url:a.split("?")[0]||"",query:v(h(s),o)},o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:l(c,o)}:{})},e.stringifyUrl=(s,o)=>{o=Object.assign({encode:!0,strict:!0},o);const a=m(s.url).split("?")[0]||"",c=e.extract(s.url),u=e.parse(c,{sort:!1}),j=Object.assign(u,s.query);let x=e.stringify(j,o);x&&(x=`?${x}`);let R=b(s.url);return s.fragmentIdentifier&&(R=`#${y(s.fragmentIdentifier,o)}`),`${a}${x}${R}`},e.pick=(s,o,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:c,query:u,fragmentIdentifier:j}=e.parseUrl(s,a);return e.stringifyUrl({url:c,query:d(u,o),fragmentIdentifier:j},a)},e.exclude=(s,o,a)=>{const c=Array.isArray(o)?u=>!o.includes(u):(u,j)=>!o(u,j);return e.pick(s,c,a)}})(xe);const ce=wn,mr={parseNumbers:!1,parseBooleans:!1},pr={skipNull:!1,skipEmptyString:!1},fr=(e,n)=>{var r,i;const{navigateMode:d="push",parseOptions:S,stringifyOptions:P}=n||{},p=Object.assign(Object.assign({},mr),S),f=Object.assign(Object.assign({},pr),P),y=ce.useLocation(),l=(r=ce.useHistory)===null||r===void 0?void 0:r.call(ce),I=(i=ce.useNavigate)===null||i===void 0?void 0:i.call(ce),m=jn(),b=D.useRef(typeof e=="function"?e():e||{}),h=D.useMemo(()=>xe.parse(y.search,p),[y.search]),A=D.useMemo(()=>Object.assign(Object.assign({},b.current),h),[h]);return[A,X(s=>{const o=typeof s=="function"?s(A):s;m(),l&&l[d]({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},y.state),I&&I({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},{replace:d==="replace",state:y.state})})]},gr=fr;let hr=class extends Error{constructor(n){super(),this.name="AbortError",this.message=n}};const Et=e=>globalThis.DOMException===void 0?new hr(e):new DOMException(e),Tt=e=>{const n=e.reason===void 0?Et("This operation was aborted."):e.reason;return n instanceof Error?n:Et(n)};async function xr(e,n,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:d}={}){return new Promise((S,P)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof n!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const p=[],f=[],y=new Map;let l=!1,I=!1,m=!1,b=0,h=0;const A=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),v=o=>{l=!0,I=!0,P(o)};d&&(d.aborted&&v(Tt(d)),d.addEventListener("abort",()=>{v(Tt(d))}));const s=async()=>{if(I)return;const o=await A.next(),a=h;if(h++,o.done){if(m=!0,b===0&&!I){if(!i&&f.length>0){v(new AggregateError(f));return}if(I=!0,y.size===0){S(p);return}const c=[];for(const[u,j]of p.entries())y.get(u)!==kt&&c.push(j);S(c)}return}b++,(async()=>{try{const c=await o.value;if(I)return;const u=await n(c,a);u===kt&&y.set(a,u),p[a]=u,b--,await s()}catch(c){if(i)v(c);else{f.push(c),b--;try{await s()}catch(u){v(u)}}}})()};(async()=>{for(let o=0;o<r;o++){try{await s()}catch(a){v(a);break}if(m||l)break}})()})}const kt=Symbol("skip");async function vr(e,n){return xr(e,r=>r(),n)}function yr({user:e,sessionUser:n}){const r=ue(()=>{var i;return(i=(e==null?void 0:e.passports)||[])==null?void 0:i.find(d=>d.name===n.role)},[e==null?void 0:e.passports,n==null?void 0:n.role]);return t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{size:40,variant:"circle",shape:"circle",src:n.avatar,did:n.did,sx:{flexShrink:0}}),t.jsxs(O,{sx:{flex:1,overflow:"hidden"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Z,{title:n.fullName,children:t.jsx(M,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:n.fullName})}),t.jsx(Sn,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Ct.textBase,borderColor:Ct.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),t.jsx(Z,{title:n.email,children:t.jsx(M,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n.email})})]})]})}const br={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?"}},sn="Reserved IP",Lt="ip-region-cache";async function jr(e){const n=`https://ipapi.co/${e}/json/`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country_name,i.region,i.city].filter(Boolean).join("/"),d}async function wr(e){const n=`https://api.ip.sb/geoip/${e}`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country,i.region,i.city].filter(Boolean).join("/"),d}async function Sr(e){let n="",r={};try{const i=localStorage.getItem(Lt);i&&(r=JSON.parse(i))}catch{r={}}if(r[e])n=r[e];else{try{n=await wr(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!n)try{n=await jr(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(n){const i=Object.keys(r);i.length>100&&delete r[i[0]],r[e]&&delete r[e],r[e]=n,localStorage.setItem(Lt,JSON.stringify(r))}return n}async function Cr(e){return Promise.all(e.map(n=>Sr(n)))}const Nt=e=>new Te(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Te.BROWSER.NAME,Te.BROWSER.VERSION]]}).getResult();function Ir({user:e,showAction:n=!0,showUser:r=!0}){const i=Cn(),{locale:d}=H(),{confirmApi:S,confirmHolder:P}=qe(),p=X((o,a={})=>In(br,o,d,"en",a)),f=X(async()=>{let o=e==null?void 0:e.userSessions;o||(o=await Ee.userSession.getUserSessions({did:e.did}));try{const c=o==null?void 0:o.map((x,R)=>[R,x.lastLoginIp]).filter(x=>!!x[1]),u=c==null?void 0:c.map(x=>x[1]),j=await Cr(u);for(let x=0;x<j.length;x++){const R=j[x],_=c[x],z=o[_[0]];z.ipRegion=R}}catch(c){console.warn("Failed to convert ip to region"),console.error(c)}const a=new Date().getTime();return Pn(o,c=>c.visitorId===i?-1:a-new Date(c.updatedAt).getTime())}),y=An(f),l=ue(()=>y.data||[],[y.data]),I=ue(()=>l.reduce((o,a)=>(o[a.lastLoginIp]=a.ipRegion,o),{}),[l]),m=X(({visitorId:o})=>{S.open({title:p("logoutThisSession"),content:p("logoutThisSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{await Ee.user.logout({visitorId:o}),y.refresh(),S.close()}})}),b=ue(()=>l.filter(a=>a.visitorId!==i),[l]),h=X(()=>{S.open({title:p("logoutAllSession"),content:p("logoutAllSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{const o=b.map(a=>()=>Ee.user.logout({visitorId:a.visitorId}));await vr(o,{concurrency:3,stopOnError:!1}),y.refresh(),S.close()}})}),A=[];n&&A.push(t.jsx(Z,{title:p("logoutAllTips"),children:t.jsx(It,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:h,disabled:b.length===0,children:p("logoutAll")})},"logoutAll"));const v=ue(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),s=[{label:p("platform"),name:"platform",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.os)==null?void 0:u.name,(j=c.os)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("deviceType"),name:"deviceType",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.browser)==null?void 0:u.name,(j=c.browser)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("walletOS"),name:"walletOS",options:{customBodyRenderLite:o=>{var c;const a=l[o];return t.jsx(O,{children:((c=a.extra)==null?void 0:c.walletOS)||p("unknown")})}}},r&&{label:p("user"),name:"user",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{sx:{minWidth:150,maxWidth:250},children:t.jsx(yr,{sessionUser:a.user,user:e})})}}},{label:p("createdAt"),name:"createdAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.createdAt?t.jsx(ve,{value:a.createdAt,relativeRange:3*86400*1e3,locale:d}):p("unknown")}}},{label:p("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.status==="expired"?p("expired"):t.jsx(ve,{value:a.updatedAt,relativeRange:3*86400*1e3,locale:d})}}},{label:p("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:I[a.lastLoginIp]?t.jsxs(t.Fragment,{children:[t.jsx(M,{variant:"body2",children:I[a.lastLoginIp]}),t.jsx(M,{variant:"body2",color:"grey",children:a.lastLoginIp||p("unknown")})]}):t.jsx(M,{children:a.lastLoginIp||p("unknown")})})}}},n&&{label:p("actions"),name:"actions",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:t.jsx(It,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:i===a.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>m({visitorId:a.visitorId}),children:a.status==="expired"?p("remove"):i===a.visitorId?p("currentSession"):p("logout")})})}}}].filter(Boolean);return t.jsxs(O,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[P,t.jsx(Qe,{locale:d,data:l,columns:s,customButtons:A,options:v,loading:y.loading})]})}function Ye({teamDid:e,roles:n,apps:r,onCancel:i,onSuccess:d,onError:S,endpoint:P}){const{api:p}=q(),{t:f,locale:y}=H(),l=Vt({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:r.length>0?r[0].appId:null}),I=async()=>{if(!l.role){l.error=f("team.member.error.passportEmpty");return}const h=l.remark.trim();l.error=null,l.loading=!0;try{const{inviteInfo:A}=await p.createMemberInvitation({input:{teamDid:e,role:l.role,remark:h,sourceAppPid:l.sourceAppPid}});l.inviteInfo=A,l.activeStep=1}catch(A){const v=ee(A);l.error=v,S(A)}finally{l.loading=!1}},b=[{body:t.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:3},children:[r.length>1?t.jsxs(Be,{fullWidth:!0,children:[t.jsx($e,{children:f("common.sourceApp")}),t.jsx(_e,{value:l.sourceAppPid,onChange:h=>{l.error=null,l.sourceAppPid=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,children:r.map(h=>t.jsx(ye,{value:h.appId,children:t.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{did:h.appId,size:28}),h.appName]}),t.jsx(Dn,{did:h.appId,compact:!0,responsive:!1})]})},h.appId))})]}):null,t.jsxs(Be,{fullWidth:!0,variant:"outlined",children:[t.jsx($e,{children:f("common.passport")}),t.jsx(_e,{"data-cy":"invite-member-select-role",value:l.role,onChange:h=>{l.error=null,l.role=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,onKeyPress:h=>{h.key==="Enter"&&(h.preventDefault(),I())},children:n.filter(h=>h.name!=="owner").map(h=>t.jsx(ye,{value:h.name,"data-cy":`invite-member-select-option-${h.name}`,children:t.jsx("span",{children:h.title||h.name})},h.name))})]}),t.jsx(tn,{label:f("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:l.remark,onChange:h=>{l.error=null,l.remark=h.target.value},disabled:l.loading,"data-cy":"invite-member-input-remark"})]}),cancel:f("common.cancel"),confirm:f("team.member.inviteDialog.createInviteLink"),onCancel:i,onConfirm:I},{body:()=>{var A,v;const h=Ve({inviteId:(A=l.inviteInfo)==null?void 0:A.inviteId,endpoint:P});return t.jsxs("div",{children:[t.jsx(O,{sx:{fontSize:16,fontWeight:"bold"},children:f("team.member.inviteDialog.createSuccessTip",{expireDate:me((v=l.inviteInfo)==null?void 0:v.expireDate,y)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:h})]})},confirm:f("common.confirm"),onConfirm:d}][l.activeStep];return t.jsxs(Y,{title:f("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[b.cancel&&t.jsx(U,{onClick:b.onCancel,color:"inherit",children:b.cancel}),t.jsxs(U,{onClick:b.onConfirm,color:"primary",disabled:l.loading||!l.role,variant:"contained",autoFocus:!0,children:[l.loading&&t.jsx(oe,{size:16}),b.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof b.body=="function"?b.body():b.body}),!!l.error&&t.jsx(se,{severity:"error",variant:"icon",children:l.error})]})}Ye.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,roles:C.array,apps:C.array,endpoint:C.string};Ye.defaultProps={onError:()=>{},roles:[],apps:[],endpoint:""};function Je({teamDid:e,onCancel:n,onSuccess:r,onError:i,endpoint:d}){const{api:S,info:P}=q(),{api:p}=D.useContext(Rn),[f,y]=D.useState(!1),{t:l,locale:I}=H(),[m,b]=D.useState(""),[h,A]=D.useState(!1),[v,s]=D.useState(0),[o,a]=D.useState(""),[c,u]=D.useState(""),j=!!Fe(P,"ownerNft.did"),x=On(async()=>{if(j){const{state:k}=await S.getDelegationState();return k}return{delegated:!0}});if(x.loading)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx("div",{style:{display:"flex",justifyContent:"center"},children:t.jsx(oe,{})})});if(x.error)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx(se,{severity:"error",variant:"icon",children:ee(x.error)})});const R=async()=>{b(null),y(!0);try{const{inviteInfo:k}=await S.createTransferInvitation({input:{teamDid:e,role:"owner",remark:c.trim()}});a(k),s(K.length-1)}catch(k){const ne=ee(k);b(ne),i(k)}finally{y(!1)}},_=()=>{A(!0),s(1)},z=()=>{A(!1),s(0)},K=[{body:t.jsxs(M,{component:"div",children:[t.jsxs(se,{severity:"warning",children:[t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.progress")}),t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),t.jsx(se,{severity:"warning",children:t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.revoke")})}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(tn,{label:l("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:c,onChange:k=>{b(null),u(k.target.value)},disabled:f,"data-cy":"transfer-node-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:l("common.cancel"),confirm:l("team.transferNode.inviteDialog.createInviteLink"),onCancel:n,onConfirm:j&&!Fe(x,"value.delegated")?_:R},{body:()=>t.jsx(En,{action:"delegate-transfer-nft",open:h,locale:I,checkFn:p.get,onClose:z,onSuccess:R,checkTimeout:5*60*1e3,webWalletUrl:Tn(P),extraParams:{targetDID:P.did},messages:{title:l("team.transferNode.delegateDialog.title"),scan:l("team.transferNode.delegateDialog.scan"),confirm:l("team.transferNode.delegateDialog.confirm"),success:l("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const k=Ve({inviteId:o.inviteId,endpoint:d});return t.jsxs("div",{children:[t.jsx(Pr,{children:l("team.transferNode.inviteDialog.createSuccessTip",{expireDate:me(o.expireDate,I)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:k})]})},confirm:l("common.confirm"),onConfirm:r}],F=K[v];return t.jsxs(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[F.cancel&&t.jsx(U,{onClick:F.onCancel,color:"inherit",children:F.cancel}),t.jsxs(U,{onClick:F.onConfirm,color:"primary",disabled:f,variant:"contained",autoFocus:!0,children:[f&&t.jsx(oe,{size:16}),F.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof F.body=="function"?F.body():F.body}),!!m&&t.jsx(se,{severity:"error",variant:"icon",children:m})]})}Je.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,endpoint:C.string};Je.defaultProps={onError:()=>{},endpoint:""};const Pr=V.div`
|
|
1
|
+
import{r as D,j as t,fu as jn,ci as X,fv as wn,fb as ue,O,as as Me,ax as Z,m as M,eB as Sn,d8 as Ct,fw as Cn,q as H,fx as qe,fy as In,aG as Pn,ch as An,dO as It,R as ve,bk as q,cn as Vt,S as ye,fz as Dn,fA as Ve,at as me,D as Y,B as U,C as oe,w as He,J as se,K as ee,P as C,fB as Rn,k as Fe,aR as On,x as En,y as Tn,n as V,fa as kn,f as pe,ad as Se,U as Q,cc as te,A as ie,fC as Ln,aK as Ht,aL as Kt,b as J,dc as Nn,t as Qt,F as W,a1 as Pt,W as Ke,ce as Fn,fD as Gt,aN as Bn,aD as _n,a9 as $n,cJ as Un,a2 as zn,bp as Wn,aW as Mn,aX as qn,Q as Vn}from"./index-Ddq4jr_U.js";import{c as Hn}from"./index-Bd27-rFC.js";import{d as be}from"./Add-C0jlH_zP.js";import{d as Kn}from"./Loop-QRcaFYyu.js";import{d as Qn}from"./ViewList-BAMGdQxk.js";import{L as Gn,S as Xn,d as Xt}from"./list-header-Dyo4DcEh.js";import{D as Qe,g as Yn}from"./index-BYxffRHK.js";import"./index-DqaA-1j3.js";import{c as Ee,U as Te,d as Yt}from"./resource-dialog-C522yqNu.js";import{T as Jn}from"./index-C_LsHXyQ.js";import{E as Jt}from"./index-n9PgzTmH.js";import"./index-CSOdd_os.js";import{W as Zt}from"./tag-DAjEEpCa.js";import{a as G}from"./team-CyhoyJ9a.js";import{u as en}from"./blocklet-CbzARbti.js";import{C as Ce}from"./click-to-copy-Pr-Zbrif.js";import{F as Be,S as _e}from"./Select-CjUz8jvK.js";import{I as $e}from"./InputLabel-Xa0HFZxn.js";import{T as tn}from"./TextField-WEzwgjP0.js";import{I as Ue}from"./index-HfmVdk5l.js";import{d as Zn}from"./Delete-BqtdSlNQ.js";import{A as er}from"./actions-BbcoFZjT.js";import{S as tr}from"./shorten-label-DlpxUgCq.js";var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});var nn=Ge.default=void 0;nr(D);var re=t;function nr(e){return e&&e.__esModule?e:{default:e}}function At(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function Dt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?At(Object(r),!0).forEach(function(i){rr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function rr(e,n,r){return n=sr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function sr(e){var n=or(e,"string");return typeof n=="symbol"?n:String(n)}function or(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Xe=function(n){return(0,re.jsxs)("svg",Dt(Dt({},n),{},{children:[(0,re.jsx)("g",{clipPath:"url(#clip0)",children:(0,re.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,re.jsx)("defs",{children:(0,re.jsx)("clipPath",{id:"clip0",children:(0,re.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Xe.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Xe.displayName="person";nn=Ge.default=Xe;var xe={},ir=e=>encodeURIComponent(e).replace(/[!'()*]/g,n=>`%${n.charCodeAt(0).toString(16).toUpperCase()}`),rn="%[a-f0-9]{2}",Rt=new RegExp("("+rn+")|([^%]+?)","gi"),Ot=new RegExp("("+rn+")+","gi");function ze(e,n){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;n=n||1;var r=e.slice(0,n),i=e.slice(n);return Array.prototype.concat.call([],ze(r),ze(i))}function ar(e){try{return decodeURIComponent(e)}catch{for(var n=e.match(Rt)||[],r=1;r<n.length;r++)e=ze(n,r).join(""),n=e.match(Rt)||[];return e}}function lr(e){for(var n={"%FE%FF":"��","%FF%FE":"��"},r=Ot.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch{var i=ar(r[0]);i!==r[0]&&(n[r[0]]=i)}r=Ot.exec(e)}n["%C2"]="�";for(var d=Object.keys(n),S=0;S<d.length;S++){var P=d[S];e=e.replace(new RegExp(P,"g"),n[P])}return e}var cr=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return lr(e)}},ur=(e,n)=>{if(!(typeof e=="string"&&typeof n=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n==="")return[e];const r=e.indexOf(n);return r===-1?[e]:[e.slice(0,r),e.slice(r+n.length)]},dr=function(e,n){for(var r={},i=Object.keys(e),d=Array.isArray(n),S=0;S<i.length;S++){var P=i[S],p=e[P];(d?n.indexOf(P)!==-1:n(P,p,e))&&(r[P]=p)}return r};(function(e){const n=ir,r=cr,i=ur,d=dr,S=s=>s==null;function P(s){switch(s.arrayFormat){case"index":return o=>(a,c)=>{const u=a.length;return c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[",u,"]"].join("")]:[...a,[y(o,s),"[",y(u,s),"]=",y(c,s)].join("")]};case"bracket":return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,[y(o,s),"[]"].join("")]:[...a,[y(o,s),"[]=",y(c,s)].join("")];case"comma":case"separator":return o=>(a,c)=>c==null||c.length===0?a:a.length===0?[[y(o,s),"=",y(c,s)].join("")]:[[a,y(c,s)].join(s.arrayFormatSeparator)];default:return o=>(a,c)=>c===void 0||s.skipNull&&c===null||s.skipEmptyString&&c===""?a:c===null?[...a,y(o,s)]:[...a,[y(o,s),"=",y(c,s)].join("")]}}function p(s){let o;switch(s.arrayFormat){case"index":return(a,c,u)=>{if(o=/\[(\d*)\]$/.exec(a),a=a.replace(/\[\d*\]$/,""),!o){u[a]=c;return}u[a]===void 0&&(u[a]={}),u[a][o[1]]=c};case"bracket":return(a,c,u)=>{if(o=/(\[\])$/.exec(a),a=a.replace(/\[\]$/,""),!o){u[a]=c;return}if(u[a]===void 0){u[a]=[c];return}u[a]=[].concat(u[a],c)};case"comma":case"separator":return(a,c,u)=>{const j=typeof c=="string"&&c.includes(s.arrayFormatSeparator),x=typeof c=="string"&&!j&&l(c,s).includes(s.arrayFormatSeparator);c=x?l(c,s):c;const R=j||x?c.split(s.arrayFormatSeparator).map(_=>l(_,s)):c===null?c:l(c,s);u[a]=R};default:return(a,c,u)=>{if(u[a]===void 0){u[a]=c;return}u[a]=[].concat(u[a],c)}}}function f(s){if(typeof s!="string"||s.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function y(s,o){return o.encode?o.strict?n(s):encodeURIComponent(s):s}function l(s,o){return o.decode?r(s):s}function I(s){return Array.isArray(s)?s.sort():typeof s=="object"?I(Object.keys(s)).sort((o,a)=>Number(o)-Number(a)).map(o=>s[o]):s}function m(s){const o=s.indexOf("#");return o!==-1&&(s=s.slice(0,o)),s}function b(s){let o="";const a=s.indexOf("#");return a!==-1&&(o=s.slice(a)),o}function h(s){s=m(s);const o=s.indexOf("?");return o===-1?"":s.slice(o+1)}function A(s,o){return o.parseNumbers&&!Number.isNaN(Number(s))&&typeof s=="string"&&s.trim()!==""?s=Number(s):o.parseBooleans&&s!==null&&(s.toLowerCase()==="true"||s.toLowerCase()==="false")&&(s=s.toLowerCase()==="true"),s}function v(s,o){o=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},o),f(o.arrayFormatSeparator);const a=p(o),c=Object.create(null);if(typeof s!="string"||(s=s.trim().replace(/^[?#&]/,""),!s))return c;for(const u of s.split("&")){if(u==="")continue;let[j,x]=i(o.decode?u.replace(/\+/g," "):u,"=");x=x===void 0?null:["comma","separator"].includes(o.arrayFormat)?x:l(x,o),a(l(j,o),x,c)}for(const u of Object.keys(c)){const j=c[u];if(typeof j=="object"&&j!==null)for(const x of Object.keys(j))j[x]=A(j[x],o);else c[u]=A(j,o)}return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((u,j)=>{const x=c[j];return x&&typeof x=="object"&&!Array.isArray(x)?u[j]=I(x):u[j]=x,u},Object.create(null))}e.extract=h,e.parse=v,e.stringify=(s,o)=>{if(!s)return"";o=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},o),f(o.arrayFormatSeparator);const a=x=>o.skipNull&&S(s[x])||o.skipEmptyString&&s[x]==="",c=P(o),u={};for(const x of Object.keys(s))a(x)||(u[x]=s[x]);const j=Object.keys(u);return o.sort!==!1&&j.sort(o.sort),j.map(x=>{const R=s[x];return R===void 0?"":R===null?y(x,o):Array.isArray(R)?R.reduce(c(x),[]).join("&"):y(x,o)+"="+y(R,o)}).filter(x=>x.length>0).join("&")},e.parseUrl=(s,o)=>{o=Object.assign({decode:!0},o);const[a,c]=i(s,"#");return Object.assign({url:a.split("?")[0]||"",query:v(h(s),o)},o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:l(c,o)}:{})},e.stringifyUrl=(s,o)=>{o=Object.assign({encode:!0,strict:!0},o);const a=m(s.url).split("?")[0]||"",c=e.extract(s.url),u=e.parse(c,{sort:!1}),j=Object.assign(u,s.query);let x=e.stringify(j,o);x&&(x=`?${x}`);let R=b(s.url);return s.fragmentIdentifier&&(R=`#${y(s.fragmentIdentifier,o)}`),`${a}${x}${R}`},e.pick=(s,o,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:c,query:u,fragmentIdentifier:j}=e.parseUrl(s,a);return e.stringifyUrl({url:c,query:d(u,o),fragmentIdentifier:j},a)},e.exclude=(s,o,a)=>{const c=Array.isArray(o)?u=>!o.includes(u):(u,j)=>!o(u,j);return e.pick(s,c,a)}})(xe);const ce=wn,mr={parseNumbers:!1,parseBooleans:!1},pr={skipNull:!1,skipEmptyString:!1},fr=(e,n)=>{var r,i;const{navigateMode:d="push",parseOptions:S,stringifyOptions:P}=n||{},p=Object.assign(Object.assign({},mr),S),f=Object.assign(Object.assign({},pr),P),y=ce.useLocation(),l=(r=ce.useHistory)===null||r===void 0?void 0:r.call(ce),I=(i=ce.useNavigate)===null||i===void 0?void 0:i.call(ce),m=jn(),b=D.useRef(typeof e=="function"?e():e||{}),h=D.useMemo(()=>xe.parse(y.search,p),[y.search]),A=D.useMemo(()=>Object.assign(Object.assign({},b.current),h),[h]);return[A,X(s=>{const o=typeof s=="function"?s(A):s;m(),l&&l[d]({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},y.state),I&&I({hash:y.hash,search:xe.stringify(Object.assign(Object.assign({},h),o),f)||"?"},{replace:d==="replace",state:y.state})})]},gr=fr;let hr=class extends Error{constructor(n){super(),this.name="AbortError",this.message=n}};const Et=e=>globalThis.DOMException===void 0?new hr(e):new DOMException(e),Tt=e=>{const n=e.reason===void 0?Et("This operation was aborted."):e.reason;return n instanceof Error?n:Et(n)};async function xr(e,n,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:d}={}){return new Promise((S,P)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof n!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const p=[],f=[],y=new Map;let l=!1,I=!1,m=!1,b=0,h=0;const A=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),v=o=>{l=!0,I=!0,P(o)};d&&(d.aborted&&v(Tt(d)),d.addEventListener("abort",()=>{v(Tt(d))}));const s=async()=>{if(I)return;const o=await A.next(),a=h;if(h++,o.done){if(m=!0,b===0&&!I){if(!i&&f.length>0){v(new AggregateError(f));return}if(I=!0,y.size===0){S(p);return}const c=[];for(const[u,j]of p.entries())y.get(u)!==kt&&c.push(j);S(c)}return}b++,(async()=>{try{const c=await o.value;if(I)return;const u=await n(c,a);u===kt&&y.set(a,u),p[a]=u,b--,await s()}catch(c){if(i)v(c);else{f.push(c),b--;try{await s()}catch(u){v(u)}}}})()};(async()=>{for(let o=0;o<r;o++){try{await s()}catch(a){v(a);break}if(m||l)break}})()})}const kt=Symbol("skip");async function vr(e,n){return xr(e,r=>r(),n)}function yr({user:e,sessionUser:n}){const r=ue(()=>{var i;return(i=(e==null?void 0:e.passports)||[])==null?void 0:i.find(d=>d.name===n.role)},[e==null?void 0:e.passports,n==null?void 0:n.role]);return t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{size:40,variant:"circle",shape:"circle",src:n.avatar,did:n.did,sx:{flexShrink:0}}),t.jsxs(O,{sx:{flex:1,overflow:"hidden"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Z,{title:n.fullName,children:t.jsx(M,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:n.fullName})}),t.jsx(Sn,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Ct.textBase,borderColor:Ct.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),t.jsx(Z,{title:n.email,children:t.jsx(M,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n.email})})]})]})}const br={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?"}},sn="Reserved IP",Lt="ip-region-cache";async function jr(e){const n=`https://ipapi.co/${e}/json/`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country_name,i.region,i.city].filter(Boolean).join("/"),d}async function wr(e){const n=`https://api.ip.sb/geoip/${e}`,i=await(await fetch(n)).json();let d="";return i.error?i.reserved&&(d=sn):d=[i.country,i.region,i.city].filter(Boolean).join("/"),d}async function Sr(e){let n="",r={};try{const i=localStorage.getItem(Lt);i&&(r=JSON.parse(i))}catch{r={}}if(r[e])n=r[e];else{try{n=await wr(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!n)try{n=await jr(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(n){const i=Object.keys(r);i.length>100&&delete r[i[0]],r[e]&&delete r[e],r[e]=n,localStorage.setItem(Lt,JSON.stringify(r))}return n}async function Cr(e){return Promise.all(e.map(n=>Sr(n)))}const Nt=e=>new Te(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Te.BROWSER.NAME,Te.BROWSER.VERSION]]}).getResult();function Ir({user:e,showAction:n=!0,showUser:r=!0}){const i=Cn(),{locale:d}=H(),{confirmApi:S,confirmHolder:P}=qe(),p=X((o,a={})=>In(br,o,d,"en",a)),f=X(async()=>{let o=e==null?void 0:e.userSessions;o||(o=await Ee.userSession.getUserSessions({did:e.did}));try{const c=o==null?void 0:o.map((x,R)=>[R,x.lastLoginIp]).filter(x=>!!x[1]),u=c==null?void 0:c.map(x=>x[1]),j=await Cr(u);for(let x=0;x<j.length;x++){const R=j[x],_=c[x],z=o[_[0]];z.ipRegion=R}}catch(c){console.warn("Failed to convert ip to region"),console.error(c)}const a=new Date().getTime();return Pn(o,c=>c.visitorId===i?-1:a-new Date(c.updatedAt).getTime())}),y=An(f),l=ue(()=>y.data||[],[y.data]),I=ue(()=>l.reduce((o,a)=>(o[a.lastLoginIp]=a.ipRegion,o),{}),[l]),m=X(({visitorId:o})=>{S.open({title:p("logoutThisSession"),content:p("logoutThisSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{await Ee.user.logout({visitorId:o}),y.refresh(),S.close()}})}),b=ue(()=>l.filter(a=>a.visitorId!==i),[l]),h=X(()=>{S.open({title:p("logoutAllSession"),content:p("logoutAllSessionConfirm"),confirmButtonText:p("confirm"),cancelButtonText:p("cancel"),onConfirm:async()=>{const o=b.map(a=>()=>Ee.user.logout({visitorId:a.visitorId}));await vr(o,{concurrency:3,stopOnError:!1}),y.refresh(),S.close()}})}),A=[];n&&A.push(t.jsx(Z,{title:p("logoutAllTips"),children:t.jsx(It,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:h,disabled:b.length===0,children:p("logoutAll")})},"logoutAll"));const v=ue(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),s=[{label:p("platform"),name:"platform",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.os)==null?void 0:u.name,(j=c.os)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("deviceType"),name:"deviceType",options:{customBodyRenderLite:o=>{var u,j;const a=l[o],c=Nt(a.ua);return t.jsx(O,{children:[(u=c.browser)==null?void 0:u.name,(j=c.browser)==null?void 0:j.version].filter(Boolean).join("/")||p("unknown")})}}},{label:p("walletOS"),name:"walletOS",options:{customBodyRenderLite:o=>{var c;const a=l[o];return t.jsx(O,{children:((c=a.extra)==null?void 0:c.walletOS)||p("unknown")})}}},r&&{label:p("user"),name:"user",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{sx:{minWidth:150,maxWidth:250},children:t.jsx(yr,{sessionUser:a.user,user:e})})}}},{label:p("createdAt"),name:"createdAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.createdAt?t.jsx(ve,{value:a.createdAt,relativeRange:3*86400*1e3,locale:d}):p("unknown")}}},{label:p("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:o=>{const a=l[o];return a.status==="expired"?p("expired"):t.jsx(ve,{value:a.updatedAt,relativeRange:3*86400*1e3,locale:d})}}},{label:p("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:I[a.lastLoginIp]?t.jsxs(t.Fragment,{children:[t.jsx(M,{variant:"body2",children:I[a.lastLoginIp]}),t.jsx(M,{variant:"body2",color:"grey",children:a.lastLoginIp||p("unknown")})]}):t.jsx(M,{children:a.lastLoginIp||p("unknown")})})}}},n&&{label:p("actions"),name:"actions",options:{customBodyRenderLite:o=>{const a=l[o];return t.jsx(O,{children:t.jsx(It,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:i===a.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>m({visitorId:a.visitorId}),children:a.status==="expired"?p("remove"):i===a.visitorId?p("currentSession"):p("logout")})})}}}].filter(Boolean);return t.jsxs(O,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[P,t.jsx(Qe,{locale:d,data:l,columns:s,customButtons:A,options:v,loading:y.loading})]})}function Ye({teamDid:e,roles:n,apps:r,onCancel:i,onSuccess:d,onError:S,endpoint:P}){const{api:p}=q(),{t:f,locale:y}=H(),l=Vt({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:r.length>0?r[0].appId:null}),I=async()=>{if(!l.role){l.error=f("team.member.error.passportEmpty");return}const h=l.remark.trim();l.error=null,l.loading=!0;try{const{inviteInfo:A}=await p.createMemberInvitation({input:{teamDid:e,role:l.role,remark:h,sourceAppPid:l.sourceAppPid}});l.inviteInfo=A,l.activeStep=1}catch(A){const v=ee(A);l.error=v,S(A)}finally{l.loading=!1}},b=[{body:t.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:3},children:[r.length>1?t.jsxs(Be,{fullWidth:!0,children:[t.jsx($e,{children:f("common.sourceApp")}),t.jsx(_e,{value:l.sourceAppPid,onChange:h=>{l.error=null,l.sourceAppPid=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,children:r.map(h=>t.jsx(ye,{value:h.appId,children:t.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[t.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Me,{did:h.appId,size:28}),h.appName]}),t.jsx(Dn,{did:h.appId,compact:!0,responsive:!1})]})},h.appId))})]}):null,t.jsxs(Be,{fullWidth:!0,variant:"outlined",children:[t.jsx($e,{children:f("common.passport")}),t.jsx(_e,{"data-cy":"invite-member-select-role",value:l.role,onChange:h=>{l.error=null,l.role=h.target.value},fullWidth:!0,label:f("common.passport"),disabled:l.loading,onKeyPress:h=>{h.key==="Enter"&&(h.preventDefault(),I())},children:n.filter(h=>h.name!=="owner").map(h=>t.jsx(ye,{value:h.name,"data-cy":`invite-member-select-option-${h.name}`,children:t.jsx("span",{children:h.title||h.name})},h.name))})]}),t.jsx(tn,{label:f("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:l.remark,onChange:h=>{l.error=null,l.remark=h.target.value},disabled:l.loading,"data-cy":"invite-member-input-remark"})]}),cancel:f("common.cancel"),confirm:f("team.member.inviteDialog.createInviteLink"),onCancel:i,onConfirm:I},{body:()=>{var A,v;const h=Ve({inviteId:(A=l.inviteInfo)==null?void 0:A.inviteId,endpoint:P});return t.jsxs("div",{children:[t.jsx(O,{sx:{fontSize:16,fontWeight:"bold"},children:f("team.member.inviteDialog.createSuccessTip",{expireDate:me((v=l.inviteInfo)==null?void 0:v.expireDate,y)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:h})]})},confirm:f("common.confirm"),onConfirm:d}][l.activeStep];return t.jsxs(Y,{title:f("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[b.cancel&&t.jsx(U,{onClick:b.onCancel,color:"inherit",children:b.cancel}),t.jsxs(U,{onClick:b.onConfirm,color:"primary",disabled:l.loading||!l.role,variant:"contained",autoFocus:!0,children:[l.loading&&t.jsx(oe,{size:16}),b.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof b.body=="function"?b.body():b.body}),!!l.error&&t.jsx(se,{severity:"error",variant:"icon",children:l.error})]})}Ye.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,roles:C.array,apps:C.array,endpoint:C.string};Ye.defaultProps={onError:()=>{},roles:[],apps:[],endpoint:""};function Je({teamDid:e,onCancel:n,onSuccess:r,onError:i,endpoint:d}){const{api:S,info:P}=q(),{api:p}=D.useContext(Rn),[f,y]=D.useState(!1),{t:l,locale:I}=H(),[m,b]=D.useState(""),[h,A]=D.useState(!1),[v,s]=D.useState(0),[o,a]=D.useState(""),[c,u]=D.useState(""),j=!!Fe(P,"ownerNft.did"),x=On(async()=>{if(j){const{state:k}=await S.getDelegationState();return k}return{delegated:!0}});if(x.loading)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx("div",{style:{display:"flex",justifyContent:"center"},children:t.jsx(oe,{})})});if(x.error)return t.jsx(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:n,children:t.jsx(se,{severity:"error",variant:"icon",children:ee(x.error)})});const R=async()=>{b(null),y(!0);try{const{inviteInfo:k}=await S.createTransferInvitation({input:{teamDid:e,role:"owner",remark:c.trim()}});a(k),s(K.length-1)}catch(k){const ne=ee(k);b(ne),i(k)}finally{y(!1)}},_=()=>{A(!0),s(1)},z=()=>{A(!1),s(0)},K=[{body:t.jsxs(M,{component:"div",children:[t.jsxs(se,{severity:"warning",children:[t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.progress")}),t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),t.jsx(se,{severity:"warning",children:t.jsx(M,{children:l("team.transferNode.inviteDialog.tips.revoke")})}),t.jsx("div",{style:{marginTop:20,marginBottom:10}}),t.jsx(tn,{label:l("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:c,onChange:k=>{b(null),u(k.target.value)},disabled:f,"data-cy":"transfer-node-input-remark"}),t.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:l("common.cancel"),confirm:l("team.transferNode.inviteDialog.createInviteLink"),onCancel:n,onConfirm:j&&!Fe(x,"value.delegated")?_:R},{body:()=>t.jsx(En,{action:"delegate-transfer-nft",open:h,locale:I,checkFn:p.get,onClose:z,onSuccess:R,checkTimeout:5*60*1e3,webWalletUrl:Tn(P),extraParams:{targetDID:P.did},messages:{title:l("team.transferNode.delegateDialog.title"),scan:l("team.transferNode.delegateDialog.scan"),confirm:l("team.transferNode.delegateDialog.confirm"),success:l("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const k=Ve({inviteId:o.inviteId,endpoint:d});return t.jsxs("div",{children:[t.jsx(Pr,{children:l("team.transferNode.inviteDialog.createSuccessTip",{expireDate:me(o.expireDate,I)})}),t.jsx("div",{style:{marginTop:"40px"}}),t.jsx(Ce,{children:k})]})},confirm:l("common.confirm"),onConfirm:r}],F=K[v];return t.jsxs(Y,{title:l("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:t.jsxs(t.Fragment,{children:[F.cancel&&t.jsx(U,{onClick:F.onCancel,color:"inherit",children:F.cancel}),t.jsxs(U,{onClick:F.onConfirm,color:"primary",disabled:f,variant:"contained",autoFocus:!0,children:[f&&t.jsx(oe,{size:16}),F.confirm]})]}),children:[t.jsx(He,{component:"div",children:typeof F.body=="function"?F.body():F.body}),!!m&&t.jsx(se,{severity:"error",variant:"icon",children:m})]})}Je.propTypes={teamDid:C.string.isRequired,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,endpoint:C.string};Je.defaultProps={onError:()=>{},endpoint:""};const Pr=V.div`
|
|
2
2
|
font-size: 16px;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
`;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0});var et=Ze.default=void 0;Ar(D);var ke=t;function Ar(e){return e&&e.__esModule?e:{default:e}}function Ft(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function Bt(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Ft(Object(r),!0).forEach(function(i){Dr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Dr(e,n,r){return n=Rr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Rr(e){var n=Or(e,"string");return typeof n=="symbol"?n:String(n)}function Or(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var tt=function(n){return(0,ke.jsxs)("svg",Bt(Bt({},n),{},{children:[(0,ke.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,ke.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};tt.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};tt.displayName="forbid-login";et=Ze.default=tt;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});var rt=nt.default=void 0;Er(D);var he=t;function Er(e){return e&&e.__esModule?e:{default:e}}function _t(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,i)}return r}function $t(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?_t(Object(r),!0).forEach(function(i){Tr(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Tr(e,n,r){return n=kr(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function kr(e){var n=Lr(e,"string");return typeof n=="symbol"?n:String(n)}function Lr(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var st=function(n){return(0,he.jsxs)("svg",$t($t({},n),{},{children:[(0,he.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,he.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,he.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};st.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};st.displayName="allow-login";rt=nt.default=st;function je(e){const{passport:n,onDelete:r,...i}=e;return t.jsxs(Nr,{...i,children:[n.title||n.name," ",!!r&&t.jsx(kn,{"data-cy":"delete-issuance",className:"delete",onClick:r})]})}je.propTypes={passport:C.object.isRequired,onDelete:C.func};je.defaultProps={onDelete:null};const Nr=V.span`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as $,bR as x,bL as d,bY as e,bX as y,bZ as k,eP as m,eQ as C,r as M,bP as j,bN as l,j as i,bU as z,fj as R,bV as B,s as P,P as T,aW as E}from"./index-
|
|
1
|
+
import{bQ as $,bR as x,bL as d,bY as e,bX as y,bZ as k,eP as m,eQ as C,r as M,bP as j,bN as l,j as i,bU as z,fj as R,bV as B,s as P,P as T,aW as E}from"./index-Ddq4jr_U.js";function N(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],U=R(),_=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,N,a);return l({},a,g)},D=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),I=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),A=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),L=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=U({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=j(r,O),c=l({},r,{color:u,edge:h,size:b}),n=_(c),w=i.jsx(L,{className:n.thumb,ownerState:c});return i.jsxs(D,{className:z(n.root,p),sx:g,ownerState:c,children:[i.jsx(I,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(A,{className:n.track,ownerState:c})]})}),X=V,v=P(t=>i.jsx(X,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(E,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:T.object};S.defaultProps={labelProps:null};export{S,X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as vt,bR as mt,bL as X,bM as jt,bY as Ht,bN as p,r as d,bS as St,bP as at,bU as $,j as u,bV as gt,d2 as se,d3 as Ot,d4 as At,d5 as Xt,bT as st,ba as ae,d6 as ft,d7 as ie,s as ce,d8 as L,P as z}from"./index-DtSAlyAb.js";import{K as de,a as ue}from"./Delete-BuQlLthh.js";let Y;function _t(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function be(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(_t()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return mt("MuiTab",t)}const fe=vt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),k=fe,he=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ve=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=t,g={root:["root",a&&v&&"labelIcon",`textColor${Ht(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return gt(g,pe,e)},me=X(jt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Ht(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${k.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>p({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Se=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:C,onChange:m,onClick:T,onFocus:F,selected:w,selectionFollowsFocus:x,textColor:_="inherit",value:I,wrapped:it=!1}=s,D=at(s,he),K=p({},s,{disabled:a,disableFocusRipple:v,selected:w,icon:!!b,iconPosition:g,label:!!C,fullWidth:h,textColor:_,wrapped:it}),q=ve(K),j=b&&C&&d.isValidElement(b)?d.cloneElement(b,{className:$(q.iconWrapper,b.props.className)}):b,tt=E=>{!w&&m&&m(E,I),T&&T(E)},U=E=>{x&&!w&&m&&m(E,I),F&&F(E)};return u.jsxs(me,p({focusRipple:!v,className:$(q.root,n),ref:l,role:"tab","aria-selected":w,disabled:a,onClick:tt,onFocus:U,ownerState:K,tabIndex:w?0:-1},D,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[j,C]}):u.jsxs(d.Fragment,{children:[C,j]}),B]}))}),xt=Se;function ge(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function xe(t,e,l,s={},n=()=>{}){const{ease:a=ge,duration:v=300}=s;let h=null;const b=e[t];let g=!1;const B=()=>{g=!0},C=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const T=Math.min(1,(m-h)/v);if(e[t]=a(T)*(l-b)+b,T>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(C)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Ce=["onChange"],ye={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Be(t){const{onChange:e}=t,l=at(t,Ce),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return se(()=>{const v=Ot(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),h=At(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",p({style:ye,ref:n},l))}function Te(t){return mt("MuiTabScrollButton",t)}const we=vt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Me=we,Re=["className","slots","slotProps","direction","orientation","disabled"],Ie=t=>{const{classes:e,orientation:l,disabled:s}=t;return gt({root:["root",l,s&&"disabled"]},Te,e)},Ee=X(jt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>p({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var s,n;const a=St({props:e,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=at(a,Re),C=Xt(),m=p({isRtl:C},a),T=Ie(m),F=(s=h.StartScrollButtonIcon)!=null?s:de,w=(n=h.EndScrollButtonIcon)!=null?n:ue,x=st({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),_=st({elementType:w,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(Ee,p({component:"div",className:$(T.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(F,p({},x)):u.jsx(w,p({},_))}))}),ze=We;function Pe(t){return mt("MuiTabs",t)}const Ne=vt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),ht=Ne,ke=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],kt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,$t=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,nt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},$e=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=t;return gt({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Pe,b)},Le=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${ht.scrollButtons}`]:e.scrollButtons},{[`& .${ht.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${ht.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Fe=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),je=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>p({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),He=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Oe=X(Be)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},Ae=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTabs"}),n=ae(),a=Xt(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:C,component:m="div",allowScrollButtonsMobile:T=!1,indicatorColor:F="primary",onChange:w,orientation:x="horizontal",ScrollButtonComponent:_=ze,scrollButtons:I="auto",selectionFollowsFocus:it,slots:D={},slotProps:K={},TabIndicatorProps:q={},TabScrollButtonProps:j={},textColor:tt="primary",value:U,variant:E="standard",visibleScrollbar:ct=!1}=s,Ut=at(s,ke),M=E==="scrollable",y=x==="vertical",G=y?"scrollTop":"scrollLeft",et=y?"top":"left",ot=y?"bottom":"right",dt=y?"clientHeight":"clientWidth",Q=y?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:T,indicatorColor:F,orientation:x,vertical:y,scrollButtons:I,textColor:tt,variant:E,visibleScrollbar:ct,fixed:!M,hideScrollbar:M&&!ct,scrollableX:M&&!y,scrollableY:M&&y,centered:g&&!M,scrollButtonsHideMobile:!T}),P=$e(H),Yt=st({elementType:D.StartScrollButtonIcon,externalSlotProps:K.startScrollButtonIcon,ownerState:H}),Vt=st({elementType:D.EndScrollButtonIcon,externalSlotProps:K.endScrollButtonIcon,ownerState:H}),[yt,Kt]=d.useState(!1),[O,Bt]=d.useState(Lt),[Tt,Gt]=d.useState(!1),[wt,Qt]=d.useState(!1),[Mt,Jt]=d.useState(!1),[Rt,Zt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,W=d.useRef(null),A=d.useRef(null),Et=()=>{const o=W.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:be(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=A.current.children;if(i.length>0){const f=i[It.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},J=ft(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[Q]:r?r[Q]:0};if(isNaN(O[i])||isNaN(O[Q]))Bt(f);else{const S=Math.abs(O[i]-f[i]),R=Math.abs(O[Q]-f[Q]);(S>=1||R>=1)&&Bt(f)}}),ut=(o,{animation:r=!0}={})=>{r?xe(G,W.current,o,{duration:n.transitions.duration.standard}):W.current[G]=o},Wt=o=>{let r=W.current[G];y?r+=o:(r+=o*(a?-1:1),r*=a&&_t()==="reverse"?-1:1),ut(r)},zt=()=>{const o=W.current[dt];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[dt]>o){i===0&&(r=o);break}r+=f[dt]}return r},te=()=>{Wt(-1*zt())},ee=()=>{Wt(zt())},oe=d.useCallback(o=>{Zt({overflow:null,scrollbarWidth:o})},[]),le=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Oe,{onChange:oe,className:$(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(I==="auto"&&(Tt||wt)||I===!0);return o.scrollButtonStart=c?u.jsx(_,p({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt},orientation:x,direction:a?"right":"left",onClick:te,disabled:!Tt},j,{className:$(P.scrollButtons,j.className)})):null,o.scrollButtonEnd=c?u.jsx(_,p({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:x,direction:a?"left":"right",onClick:ee,disabled:!wt},j,{className:$(P.scrollButtons,j.className)})):null,o},Pt=ft(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[et]<r[et]){const i=r[G]+(c[et]-r[et]);ut(i,{animation:o})}else if(c[ot]>r[ot]){const i=r[G]+(c[ot]-r[ot]);ut(i,{animation:o})}}}),lt=ft(()=>{M&&I!==!1&&Jt(!Mt)});d.useEffect(()=>{const o=Ot(()=>{W.current&&J()});let r;const c=S=>{S.forEach(R=>{R.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),R.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),lt()},i=At(W.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,R;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(R=r)==null||R.disconnect()}},[J,lt]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&I!==!1){const c=o[0],i=o[r-1],f={root:W.current,threshold:.99},S=pt=>{Gt(!pt[0].isIntersecting)},R=new IntersectionObserver(S,f);R.observe(c);const Z=pt=>{Qt(!pt[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{R.disconnect(),N.disconnect()}}},[M,I,Mt,B==null?void 0:B.length]),d.useEffect(()=>{Kt(!0)},[]),d.useEffect(()=>{J()}),d.useEffect(()=>{Pt(Lt!==O)},[Pt,O]),d.useImperativeHandle(b,()=>({updateIndicator:J,updateScrollButtons:lt}),[J,lt]);const Nt=u.jsx(He,p({},q,{className:$(P.indicator,q.className),ownerState:H,style:p({},O,q.style)}));let rt=0;const re=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?rt:o.props.value;It.set(r,rt);const c=r===U;return rt+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!yt&&Nt,selected:c,selectionFollowsFocus:it,onChange:w,textColor:tt,value:r},rt===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),ne=o=>{const r=A.current,c=ie(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),nt(r,c,$t);break;case S:o.preventDefault(),nt(r,c,kt);break;case"Home":o.preventDefault(),nt(r,null,kt);break;case"End":o.preventDefault(),nt(r,null,$t);break}},bt=le();return u.jsxs(Le,p({className:$(P.root,C),ownerState:H,ref:l,as:m},Ut,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,u.jsxs(Fe,{className:P.scroller,ownerState:H,style:{overflow:Rt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ct?void 0:-Rt.scrollbarWidth},ref:W,children:[u.jsx(je,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:ne,ref:A,role:"tablist",children:re}),yt&&Nt]}),bt.scrollButtonEnd]}))}),Ct=Ae,Ft="index",V={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},Xe=ce(Ct)(({theme:t})=>({[`& .${V.tabs}`]:{},[`& .${V.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Dt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Dt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function qt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function _e({tabs:t,current:e,onChange:l,...s}){return s.variant==="card"?u.jsx(Dt,{...s,tabs:t,current:e,onChange:l}):s.variant==="line"?u.jsx(qt,{...s,tabs:t,current:e,onChange:l}):u.jsx(Xe,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[V.tabs,s.className||""].join(" "),children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}_e.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};export{_e as T,Ct as a,xt as b,ht as t};
|
|
1
|
+
import{bQ as vt,bR as mt,bL as X,bM as jt,bY as Ht,bN as p,r as d,bS as St,bP as at,bU as $,j as u,bV as gt,d2 as se,d3 as Ot,d4 as At,d5 as Xt,bT as st,ba as ae,d6 as ft,d7 as ie,s as ce,d8 as L,P as z}from"./index-Ddq4jr_U.js";import{K as de,a as ue}from"./Delete-BqtdSlNQ.js";let Y;function _t(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function be(t,e){const l=t.scrollLeft;if(e!=="rtl")return l;switch(_t()){case"negative":return t.scrollWidth-t.clientWidth+l;case"reverse":return t.scrollWidth-t.clientWidth-l;default:return l}}function pe(t){return mt("MuiTab",t)}const fe=vt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),k=fe,he=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ve=t=>{const{classes:e,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=t,g={root:["root",a&&v&&"labelIcon",`textColor${Ht(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return gt(g,pe,e)},me=X(jt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.label&&l.icon&&e.labelIcon,e[`textColor${Ht(l.textColor)}`],l.fullWidth&&e.fullWidth,l.wrapped&&e.wrapped,{[`& .${k.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>p({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${k.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${k.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Se=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:C,onChange:m,onClick:T,onFocus:F,selected:w,selectionFollowsFocus:x,textColor:_="inherit",value:I,wrapped:it=!1}=s,D=at(s,he),K=p({},s,{disabled:a,disableFocusRipple:v,selected:w,icon:!!b,iconPosition:g,label:!!C,fullWidth:h,textColor:_,wrapped:it}),q=ve(K),j=b&&C&&d.isValidElement(b)?d.cloneElement(b,{className:$(q.iconWrapper,b.props.className)}):b,tt=E=>{!w&&m&&m(E,I),T&&T(E)},U=E=>{x&&!w&&m&&m(E,I),F&&F(E)};return u.jsxs(me,p({focusRipple:!v,className:$(q.root,n),ref:l,role:"tab","aria-selected":w,disabled:a,onClick:tt,onFocus:U,ownerState:K,tabIndex:w?0:-1},D,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[j,C]}):u.jsxs(d.Fragment,{children:[C,j]}),B]}))}),xt=Se;function ge(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function xe(t,e,l,s={},n=()=>{}){const{ease:a=ge,duration:v=300}=s;let h=null;const b=e[t];let g=!1;const B=()=>{g=!0},C=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const T=Math.min(1,(m-h)/v);if(e[t]=a(T)*(l-b)+b,T>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(C)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(C),B)}const Ce=["onChange"],ye={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Be(t){const{onChange:e}=t,l=at(t,Ce),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return se(()=>{const v=Ot(()=>{const b=s.current;a(),b!==s.current&&e(s.current)}),h=At(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[e]),d.useEffect(()=>{a(),e(s.current)},[e]),u.jsx("div",p({style:ye,ref:n},l))}function Te(t){return mt("MuiTabScrollButton",t)}const we=vt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Me=we,Re=["className","slots","slotProps","direction","orientation","disabled"],Ie=t=>{const{classes:e,orientation:l,disabled:s}=t;return gt({root:["root",l,s&&"disabled"]},Te,e)},Ee=X(jt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.root,l.orientation&&e[l.orientation]]}})(({ownerState:t})=>p({width:40,flexShrink:0,opacity:.8,[`&.${Me.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),We=d.forwardRef(function(e,l){var s,n;const a=St({props:e,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=at(a,Re),C=Xt(),m=p({isRtl:C},a),T=Ie(m),F=(s=h.StartScrollButtonIcon)!=null?s:de,w=(n=h.EndScrollButtonIcon)!=null?n:ue,x=st({elementType:F,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),_=st({elementType:w,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(Ee,p({component:"div",className:$(T.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(F,p({},x)):u.jsx(w,p({},_))}))}),ze=We;function Pe(t){return mt("MuiTabs",t)}const Ne=vt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),ht=Ne,ke=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],kt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,$t=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,nt=(t,e,l)=>{let s=!1,n=l(t,e);for(;n;){if(n===t.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(t,n);else{n.focus();return}}},$e=t=>{const{vertical:e,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=t;return gt({root:["root",e&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Pe,b)},Le=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[{[`& .${ht.scrollButtons}`]:e.scrollButtons},{[`& .${ht.scrollButtons}`]:l.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,l.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${ht.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Fe=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.scroller,l.fixed&&e.fixed,l.hideScrollbar&&e.hideScrollbar,l.scrollableX&&e.scrollableX,l.scrollableY&&e.scrollableY]}})(({ownerState:t})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),je=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:l}=t;return[e.flexContainer,l.vertical&&e.flexContainerVertical,l.centered&&e.centered]}})(({ownerState:t})=>p({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),He=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Oe=X(Be)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},Ae=d.forwardRef(function(e,l){const s=St({props:e,name:"MuiTabs"}),n=ae(),a=Xt(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:C,component:m="div",allowScrollButtonsMobile:T=!1,indicatorColor:F="primary",onChange:w,orientation:x="horizontal",ScrollButtonComponent:_=ze,scrollButtons:I="auto",selectionFollowsFocus:it,slots:D={},slotProps:K={},TabIndicatorProps:q={},TabScrollButtonProps:j={},textColor:tt="primary",value:U,variant:E="standard",visibleScrollbar:ct=!1}=s,Ut=at(s,ke),M=E==="scrollable",y=x==="vertical",G=y?"scrollTop":"scrollLeft",et=y?"top":"left",ot=y?"bottom":"right",dt=y?"clientHeight":"clientWidth",Q=y?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:T,indicatorColor:F,orientation:x,vertical:y,scrollButtons:I,textColor:tt,variant:E,visibleScrollbar:ct,fixed:!M,hideScrollbar:M&&!ct,scrollableX:M&&!y,scrollableY:M&&y,centered:g&&!M,scrollButtonsHideMobile:!T}),P=$e(H),Yt=st({elementType:D.StartScrollButtonIcon,externalSlotProps:K.startScrollButtonIcon,ownerState:H}),Vt=st({elementType:D.EndScrollButtonIcon,externalSlotProps:K.endScrollButtonIcon,ownerState:H}),[yt,Kt]=d.useState(!1),[O,Bt]=d.useState(Lt),[Tt,Gt]=d.useState(!1),[wt,Qt]=d.useState(!1),[Mt,Jt]=d.useState(!1),[Rt,Zt]=d.useState({overflow:"hidden",scrollbarWidth:0}),It=new Map,W=d.useRef(null),A=d.useRef(null),Et=()=>{const o=W.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:be(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&U!==!1){const i=A.current.children;if(i.length>0){const f=i[It.get(U)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},J=ft(()=>{const{tabsMeta:o,tabMeta:r}=Et();let c=0,i;if(y)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[Q]:r?r[Q]:0};if(isNaN(O[i])||isNaN(O[Q]))Bt(f);else{const S=Math.abs(O[i]-f[i]),R=Math.abs(O[Q]-f[Q]);(S>=1||R>=1)&&Bt(f)}}),ut=(o,{animation:r=!0}={})=>{r?xe(G,W.current,o,{duration:n.transitions.duration.standard}):W.current[G]=o},Wt=o=>{let r=W.current[G];y?r+=o:(r+=o*(a?-1:1),r*=a&&_t()==="reverse"?-1:1),ut(r)},zt=()=>{const o=W.current[dt];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[dt]>o){i===0&&(r=o);break}r+=f[dt]}return r},te=()=>{Wt(-1*zt())},ee=()=>{Wt(zt())},oe=d.useCallback(o=>{Zt({overflow:null,scrollbarWidth:o})},[]),le=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Oe,{onChange:oe,className:$(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(I==="auto"&&(Tt||wt)||I===!0);return o.scrollButtonStart=c?u.jsx(_,p({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt},orientation:x,direction:a?"right":"left",onClick:te,disabled:!Tt},j,{className:$(P.scrollButtons,j.className)})):null,o.scrollButtonEnd=c?u.jsx(_,p({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Vt},orientation:x,direction:a?"left":"right",onClick:ee,disabled:!wt},j,{className:$(P.scrollButtons,j.className)})):null,o},Pt=ft(o=>{const{tabsMeta:r,tabMeta:c}=Et();if(!(!c||!r)){if(c[et]<r[et]){const i=r[G]+(c[et]-r[et]);ut(i,{animation:o})}else if(c[ot]>r[ot]){const i=r[G]+(c[ot]-r[ot]);ut(i,{animation:o})}}}),lt=ft(()=>{M&&I!==!1&&Jt(!Mt)});d.useEffect(()=>{const o=Ot(()=>{W.current&&J()});let r;const c=S=>{S.forEach(R=>{R.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),R.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),lt()},i=At(W.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,R;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(R=r)==null||R.disconnect()}},[J,lt]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&I!==!1){const c=o[0],i=o[r-1],f={root:W.current,threshold:.99},S=pt=>{Gt(!pt[0].isIntersecting)},R=new IntersectionObserver(S,f);R.observe(c);const Z=pt=>{Qt(!pt[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{R.disconnect(),N.disconnect()}}},[M,I,Mt,B==null?void 0:B.length]),d.useEffect(()=>{Kt(!0)},[]),d.useEffect(()=>{J()}),d.useEffect(()=>{Pt(Lt!==O)},[Pt,O]),d.useImperativeHandle(b,()=>({updateIndicator:J,updateScrollButtons:lt}),[J,lt]);const Nt=u.jsx(He,p({},q,{className:$(P.indicator,q.className),ownerState:H,style:p({},O,q.style)}));let rt=0;const re=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?rt:o.props.value;It.set(r,rt);const c=r===U;return rt+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!yt&&Nt,selected:c,selectionFollowsFocus:it,onChange:w,textColor:tt,value:r},rt===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),ne=o=>{const r=A.current,c=ie(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),nt(r,c,$t);break;case S:o.preventDefault(),nt(r,c,kt);break;case"Home":o.preventDefault(),nt(r,null,kt);break;case"End":o.preventDefault(),nt(r,null,$t);break}},bt=le();return u.jsxs(Le,p({className:$(P.root,C),ownerState:H,ref:l,as:m},Ut,{children:[bt.scrollButtonStart,bt.scrollbarSizeListener,u.jsxs(Fe,{className:P.scroller,ownerState:H,style:{overflow:Rt.overflow,[y?`margin${a?"Left":"Right"}`:"marginBottom"]:ct?void 0:-Rt.scrollbarWidth},ref:W,children:[u.jsx(je,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:ne,ref:A,role:"tablist",children:re}),yt&&Nt]}),bt.scrollButtonEnd]}))}),Ct=Ae,Ft="index",V={tabs:`${Ft}-tabs`,tab:`${Ft}-tab`},Xe=ce(Ct)(({theme:t})=>({[`& .${V.tabs}`]:{},[`& .${V.tab}`]:{fontSize:"0.875rem",[t.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Dt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:L.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:L.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:L.lineBorderBase,color:L.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Dt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function qt({tabs:t,current:e,onChange:l,...s}){return u.jsx(Ct,{scrollButtons:"auto",value:e,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:L.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:L.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:L.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:L.foregroundsFgBase},...s.sx},children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qt.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};function _e({tabs:t,current:e,onChange:l,...s}){return s.variant==="card"?u.jsx(Dt,{...s,tabs:t,current:e,onChange:l}):s.variant==="line"?u.jsx(qt,{...s,tabs:t,current:e,onChange:l}):u.jsx(Xe,{scrollButtons:"auto",variant:"scrollable",value:e,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[V.tabs,s.className||""].join(" "),children:t.map(n=>u.jsx(xt,{className:V.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}_e.propTypes={tabs:z.array.isRequired,current:z.string.isRequired,onChange:z.func.isRequired};export{_e as T,Ct as a,xt as b,ht as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-
|
|
1
|
+
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-Ddq4jr_U.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-HfmVdk5l.js";import{C as I}from"./click-to-copy-Pr-Zbrif.js";import{w as ie}from"./withStyles-CBM6laCD.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
|
|
2
2
|
border-left: 1px solid ${n=>n.theme.typography.color.main};
|
|
3
3
|
padding: 10px 0 10px 16px;
|
|
4
4
|
@media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as s,j as t,B as i,gb as r}from"./index-
|
|
1
|
+
import{P as s,j as t,B as i,gb as r}from"./index-Ddq4jr_U.js";function n({children:e,...o}){return t.jsxs(i,{color:"did",variant:"contained",...o,children:[t.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),t.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}n.propTypes={children:s.any};n.defaultProps={children:""};export{n as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{fh as H,g as L,fi as W}from"./index-
|
|
1
|
+
import{fh as H,g as L,fi as W}from"./index-Ddq4jr_U.js";var d={},A,I;function X(){if(I)return A;I=1;var y,r,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
2
2
|
`,r:"\r",t:" "},c;function s(t){throw{name:"SyntaxError",message:t,at:y,text:c}}function n(t){return t&&t!==r&&s("Expected '"+t+"' instead of '"+r+"'"),r=c.charAt(y),y+=1,r}function h(){var t,i="";for(r==="-"&&(i="-",n("-"));r>="0"&&r<="9";)i+=r,n();if(r===".")for(i+=".";n()&&r>="0"&&r<="9";)i+=r;if(r==="e"||r==="E")for(i+=r,n(),(r==="-"||r==="+")&&(i+=r,n());r>="0"&&r<="9";)i+=r,n();return t=Number(i),isFinite(t)||s("Bad number"),t}function v(){var t,i,f="",g;if(r==='"')for(;n();){if(r==='"')return n(),f;if(r==="\\")if(n(),r==="u"){for(g=0,i=0;i<4&&(t=parseInt(n(),16),!!isFinite(t));i+=1)g=g*16+t;f+=String.fromCharCode(g)}else if(typeof a[r]=="string")f+=a[r];else break;else f+=r}s("Bad string")}function u(){for(;r&&r<=" ";)n()}function o(){switch(r){case"t":return n("t"),n("r"),n("u"),n("e"),!0;case"f":return n("f"),n("a"),n("l"),n("s"),n("e"),!1;case"n":return n("n"),n("u"),n("l"),n("l"),null;default:s("Unexpected '"+r+"'")}}function p(){var t=[];if(r==="["){if(n("["),u(),r==="]")return n("]"),t;for(;r;){if(t.push(e()),u(),r==="]")return n("]"),t;n(","),u()}}s("Bad array")}function l(){var t,i={};if(r==="{"){if(n("{"),u(),r==="}")return n("}"),i;for(;r;){if(t=v(),u(),n(":"),Object.prototype.hasOwnProperty.call(i,t)&&s('Duplicate key "'+t+'"'),i[t]=e(),u(),r==="}")return n("}"),i;n(","),u()}}s("Bad object")}function e(){switch(u(),r){case"{":return l();case"[":return p();case'"':return v();case"-":return h();default:return r>="0"&&r<="9"?h():o()}}return A=function(t,i){var f;return c=t,y=0,r=" ",f=e(),u(),r&&s("Syntax error"),typeof i=="function"?function g(S,m){var b,O,w=S[m];if(w&&typeof w=="object")for(b in e)Object.prototype.hasOwnProperty.call(w,b)&&(O=g(w,b),typeof O>"u"?delete w[b]:w[b]=O);return i.call(S,m,w)}({"":f},""):f},A}var J,_;function Y(){if(_)return J;_=1;var y=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r,a,c={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;function n(v){return y.lastIndex=0,y.test(v)?'"'+v.replace(y,function(u){var o=c[u];return typeof o=="string"?o:"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+v+'"'}function h(v,u){var o,p,l,e,t=r,i,f=u[v];switch(f&&typeof f=="object"&&typeof f.toJSON=="function"&&(f=f.toJSON(v)),typeof s=="function"&&(f=s.call(u,v,f)),typeof f){case"string":return n(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(r+=a,i=[],Object.prototype.toString.apply(f)==="[object Array]"){for(e=f.length,o=0;o<e;o+=1)i[o]=h(o,f)||"null";return l=i.length===0?"[]":r?`[
|
|
3
3
|
`+r+i.join(`,
|
|
4
4
|
`+r)+`
|