@abtnode/webapp 1.16.21-beta-46c675eb → 1.16.21-beta-e828f413

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.
Files changed (64) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +36 -35
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/js/1294.5b08d5e3.chunk.js +1 -0
  7. package/build/static/js/{1667.3001639f.chunk.js → 1667.488a600b.chunk.js} +1 -1
  8. package/build/static/js/{1685.00ac41cb.chunk.js → 1685.c6f7a83f.chunk.js} +2 -2
  9. package/build/static/js/2183.e57ce8a2.chunk.js +1 -0
  10. package/build/static/js/2435.88762f30.chunk.js +1 -0
  11. package/build/static/js/2443.00426c01.chunk.js +1 -0
  12. package/build/static/js/{3389.72b7e591.chunk.js → 3389.282a0683.chunk.js} +1 -1
  13. package/build/static/js/3883.f14e204a.chunk.js +1 -0
  14. package/build/static/js/4382.0d3258d7.chunk.js +2 -0
  15. package/build/static/js/4471.a41284d9.chunk.js +1 -0
  16. package/build/static/js/{6490.8f3553c2.chunk.js → 4509.231da63f.chunk.js} +2 -2
  17. package/build/static/js/4549.5fda7728.chunk.js +1 -0
  18. package/build/static/js/{4775.b0cede7b.chunk.js → 4775.19ec4c25.chunk.js} +1 -1
  19. package/build/static/js/4906.aced1b76.chunk.js +1 -0
  20. package/build/static/js/5059.b85795c1.chunk.js +1 -0
  21. package/build/static/js/{5672.b32c024f.chunk.js → 5672.19e3e3e6.chunk.js} +1 -1
  22. package/build/static/js/{5804.996e83bb.chunk.js → 5804.c02bc104.chunk.js} +2 -2
  23. package/build/static/js/{5979.bd3d3c0f.chunk.js → 5979.4e4ebbf1.chunk.js} +1 -1
  24. package/build/static/js/6230.b1753197.chunk.js +1 -0
  25. package/build/static/js/6511.623f368a.chunk.js +1 -0
  26. package/build/static/js/{6580.8cdb4aa4.chunk.js → 6580.fc3c74eb.chunk.js} +1 -1
  27. package/build/static/js/{6931.e9297d29.chunk.js → 6931.a2586ea5.chunk.js} +1 -1
  28. package/build/static/js/{7020.2fd6f467.chunk.js → 7020.ccd573af.chunk.js} +1 -1
  29. package/build/static/js/{7022.02d74e90.chunk.js → 7022.9d96c66f.chunk.js} +1 -1
  30. package/build/static/js/{7150.9849325f.chunk.js → 7150.ff7c498c.chunk.js} +1 -1
  31. package/build/static/js/{7657.380e09e9.chunk.js → 7657.ec1da0b4.chunk.js} +2 -2
  32. package/build/static/js/7706.74e51876.chunk.js +2 -0
  33. package/build/static/js/7718.b0d91373.chunk.js +1 -0
  34. package/build/static/js/8537.b03e14a8.chunk.js +1 -0
  35. package/build/static/js/{8986.0c6ecc50.chunk.js → 8986.d64838dd.chunk.js} +1 -1
  36. package/build/static/js/95.08f81beb.chunk.js +1 -0
  37. package/build/static/js/{9552.82c09530.chunk.js → 9552.3effa95b.chunk.js} +1 -1
  38. package/build/static/js/main.b3ba7d08.js +2 -0
  39. package/build/static/js/{main.c88b220e.js.LICENSE.txt → main.b3ba7d08.js.LICENSE.txt} +1 -1
  40. package/package.json +1 -1
  41. package/build/static/js/1294.8ccea539.chunk.js +0 -1
  42. package/build/static/js/1633.5c43bf43.chunk.js +0 -2
  43. package/build/static/js/3826.d40f6fa7.chunk.js +0 -2
  44. package/build/static/js/3883.46d0ebdd.chunk.js +0 -1
  45. package/build/static/js/4435.5212440d.chunk.js +0 -1
  46. package/build/static/js/4448.d67840f3.chunk.js +0 -1
  47. package/build/static/js/4471.c2380391.chunk.js +0 -1
  48. package/build/static/js/4906.b8af826c.chunk.js +0 -1
  49. package/build/static/js/6511.978080d1.chunk.js +0 -1
  50. package/build/static/js/7718.49194e44.chunk.js +0 -1
  51. package/build/static/js/8382.e1c429ed.chunk.js +0 -1
  52. package/build/static/js/8537.d5e4e119.chunk.js +0 -1
  53. package/build/static/js/8973.639c0cf3.chunk.js +0 -1
  54. package/build/static/js/9277.babc5673.chunk.js +0 -1
  55. package/build/static/js/95.f2b78229.chunk.js +0 -1
  56. package/build/static/js/main.c88b220e.js +0 -2
  57. /package/build/static/css/{3826.a5e3e6d6.chunk.css → 4382.a5e3e6d6.chunk.css} +0 -0
  58. /package/build/static/css/{8973.9cab926a.chunk.css → 6230.9cab926a.chunk.css} +0 -0
  59. /package/build/static/js/{1685.00ac41cb.chunk.js.LICENSE.txt → 1685.c6f7a83f.chunk.js.LICENSE.txt} +0 -0
  60. /package/build/static/js/{3826.d40f6fa7.chunk.js.LICENSE.txt → 4382.0d3258d7.chunk.js.LICENSE.txt} +0 -0
  61. /package/build/static/js/{5804.996e83bb.chunk.js.LICENSE.txt → 4509.231da63f.chunk.js.LICENSE.txt} +0 -0
  62. /package/build/static/js/{6490.8f3553c2.chunk.js.LICENSE.txt → 5804.c02bc104.chunk.js.LICENSE.txt} +0 -0
  63. /package/build/static/js/{7657.380e09e9.chunk.js.LICENSE.txt → 7657.ec1da0b4.chunk.js.LICENSE.txt} +0 -0
  64. /package/build/static/js/{1633.5c43bf43.chunk.js.LICENSE.txt → 7706.74e51876.chunk.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[8537],{18537:(e,t,r)=>{r.r(t),r.d(t,{Experimental_CssVarsProvider:()=>ge,StyledEngineProvider:()=>Z.Z,THEME_ID:()=>n.Z,ThemeProvider:()=>A.Z,adaptV4Theme:()=>m,alpha:()=>g.Fq,createMuiTheme:()=>u.A,createStyles:()=>S,createTheme:()=>u.Z,css:()=>h.css,darken:()=>g._j,decomposeColor:()=>g.tB,duration:()=>b.x9,easing:()=>b.Ui,emphasize:()=>g._4,experimentalStyled:()=>x.ZP,experimental_extendTheme:()=>ie,experimental_sx:()=>pe,getContrastRatio:()=>g.mi,getInitColorSchemeScript:()=>ue,getLuminance:()=>g.H3,getOverlayAlpha:()=>ee.Z,hexToRgb:()=>g.oo,hslToRgb:()=>g.ve,keyframes:()=>h.keyframes,lighten:()=>g.$n,makeStyles:()=>B,private_createTypography:()=>se.Z,private_excludeVariablesFromRoot:()=>de,recomposeColor:()=>g.wy,responsiveFontSizes:()=>k.Z,rgbToHex:()=>g.vq,shouldSkipGeneratingVar:()=>X,styled:()=>x.ZP,unstable_createMuiStrictModeTheme:()=>f,unstable_getUnit:()=>C.Wy,unstable_toUnitless:()=>C.YL,useColorScheme:()=>he,useTheme:()=>v.Z,useThemeProps:()=>w.Z,withStyles:()=>T,withTheme:()=>I});var o=r(88637),n=r(98406),a=r(7896),c=r(31461),l=r(54148),i=r(35191);const s=["defaultProps","mixins","overrides","palette","props","styleOverrides"],d=["type","mode"];function m(e){const{defaultProps:t={},mixins:r={},overrides:o={},palette:n={},props:m={},styleOverrides:g={}}=e,h=(0,c.Z)(e,s),u=(0,a.Z)({},h,{components:{}});Object.keys(t).forEach((e=>{const r=u.components[e]||{};r.defaultProps=t[e],u.components[e]=r})),Object.keys(m).forEach((e=>{const t=u.components[e]||{};t.defaultProps=m[e],u.components[e]=t})),Object.keys(g).forEach((e=>{const t=u.components[e]||{};t.styleOverrides=g[e],u.components[e]=t})),Object.keys(o).forEach((e=>{const t=u.components[e]||{};t.styleOverrides=o[e],u.components[e]=t})),u.spacing=(0,l.Z)(e.spacing);const p=(0,i.Z)(e.breakpoints||{}),f=u.spacing;u.mixins=(0,a.Z)({gutters:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({paddingLeft:f(2),paddingRight:f(2)},e,{[p.up("sm")]:(0,a.Z)({paddingLeft:f(3),paddingRight:f(3)},e[p.up("sm")])})}},r);const{type:y,mode:S}=n,C=(0,c.Z)(n,d),k=S||y||"light";return u.palette=(0,a.Z)({text:{hint:"dark"===k?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:k,type:k},C),u}var g=r(66685),h=r(21371),u=r(38185),p=r(34612);function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return(0,u.Z)((0,p.Z)({unstable_strictMode:!0},e),...r)}let y=!1;function S(e){return y||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join("\n")),y=!0),e}var C=r(32493),k=r(93199),b=r(75940),v=r(96366),w=r(42908),x=r(62773),A=r(55161),Z=r(178);function B(){throw new Error((0,o.Z)(14))}function T(){throw new Error((0,o.Z)(15))}function I(){throw new Error((0,o.Z)(16))}var P=r(5057),j=r(67198),E=r(12378),L=r(57963),q=r(96266);const F="mode",M="color-scheme",D="data-color-scheme";function V(e){if("undefined"!==typeof window&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function O(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function _(e,t){if("undefined"===typeof window)return;let r;try{r=localStorage.getItem(e)||void 0,r||localStorage.setItem(e,t)}catch(o){}return r||t}function R(e){const{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:n=[],modeStorageKey:c=F,colorSchemeStorageKey:l=M,storageWindow:i=("undefined"===typeof window?void 0:window)}=e,s=n.join(","),[d,m]=P.useState((()=>{const e=_(c,t),n=_("".concat(l,"-light"),r),a=_("".concat(l,"-dark"),o);return{mode:e,systemMode:V(e),lightColorScheme:n,darkColorScheme:a}})),g=function(e){return O(e,(t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0))}(d),h=P.useCallback((e=>{m((r=>{if(e===r.mode)return r;const o=e||t;try{localStorage.setItem(c,o)}catch(n){}return(0,a.Z)({},r,{mode:o,systemMode:V(o)})}))}),[c,t]),u=P.useCallback((e=>{e?"string"===typeof e?e&&!s.includes(e)?console.error("`".concat(e,"` does not exist in `theme.colorSchemes`.")):m((t=>{const r=(0,a.Z)({},t);return O(t,(t=>{try{localStorage.setItem("".concat(l,"-").concat(t),e)}catch(o){}"light"===t&&(r.lightColorScheme=e),"dark"===t&&(r.darkColorScheme=e)})),r})):m((t=>{const n=(0,a.Z)({},t),c=null===e.light?r:e.light,i=null===e.dark?o:e.dark;if(c)if(s.includes(c)){n.lightColorScheme=c;try{localStorage.setItem("".concat(l,"-light"),c)}catch(d){}}else console.error("`".concat(c,"` does not exist in `theme.colorSchemes`."));if(i)if(s.includes(i)){n.darkColorScheme=i;try{localStorage.setItem("".concat(l,"-dark"),i)}catch(d){}}else console.error("`".concat(i,"` does not exist in `theme.colorSchemes`."));return n})):m((e=>{try{localStorage.setItem("".concat(l,"-light"),r),localStorage.setItem("".concat(l,"-dark"),o)}catch(t){}return(0,a.Z)({},e,{lightColorScheme:r,darkColorScheme:o})}))}),[s,l,r,o]),p=P.useCallback((e=>{"system"===d.mode&&m((t=>(0,a.Z)({},t,{systemMode:null!=e&&e.matches?"dark":"light"})))}),[d.mode]),f=P.useRef(p);return f.current=p,P.useEffect((()=>{const e=function(){return f.current(...arguments)},t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>t.removeListener(e)}),[]),P.useEffect((()=>{const e=e=>{const r=e.newValue;"string"!==typeof e.key||!e.key.startsWith(l)||r&&!s.match(r)||(e.key.endsWith("light")&&u({light:r}),e.key.endsWith("dark")&&u({dark:r})),e.key!==c||r&&!["light","dark","system"].includes(r)||h(r||t)};if(i)return i.addEventListener("storage",e),()=>i.removeEventListener("storage",e)}),[u,h,c,l,s,t,i]),(0,a.Z)({},d,{colorScheme:g,setMode:h,setColorScheme:u})}const K=["colorSchemes","components","generateCssVars","cssVarPrefix"];var W=r(82655);function H(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";function t(){for(var r=arguments.length,o=new Array(r),n=0;n<r;n++)o[n]=arguments[n];if(!o.length)return"";const a=o[0];return"string"!==typeof a||a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?", ".concat(a):", var(--".concat(e?"".concat(e,"-"):"").concat(a).concat(t(...o.slice(1)),")")}return function(r){for(var o=arguments.length,n=new Array(o>1?o-1:0),a=1;a<o;a++)n[a-1]=arguments[a];return"var(--".concat(e?"".concat(e,"-"):"").concat(r).concat(t(...n),")")}}const z=function(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],n=e;t.forEach(((e,a)=>{a===t.length-1?Array.isArray(n)?n[Number(e)]=r:n&&"object"===typeof n&&(n[e]=r):n&&"object"===typeof n&&(n[e]||(n[e]=o.includes(e)?[]:{}),n=n[e])}))},U=(e,t,r)=>{!function e(o){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object.entries(o).forEach((o=>{let[c,l]=o;(!r||r&&!r([...n,c]))&&void 0!==l&&null!==l&&("object"===typeof l&&Object.keys(l).length>0?e(l,[...n,c],Array.isArray(l)?[...a,c]:a):t([...n,c],l,a))}))}(e)},G=(e,t)=>{if("number"===typeof t){if(["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t))))return t;return e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:"".concat(t,"px")}return t};function N(e,t){const{prefix:r,shouldSkipGeneratingVar:o}=t||{},n={},a={},c={};return U(e,((e,t,l)=>{if(("string"===typeof t||"number"===typeof t)&&(!o||!o(e,t))){const o="--".concat(r?"".concat(r,"-"):"").concat(e.join("-"));Object.assign(n,{[o]:G(e,t)}),z(a,e,"var(".concat(o,")"),l),z(c,e,"var(".concat(o,", ").concat(t,")"),l)}}),(e=>"vars"===e[0])),{css:n,vars:a,varsWithDefaults:c}}const $=["colorSchemes","components"],Y=["light"];const J=function(e,t){const{colorSchemes:r={}}=e,o=(0,c.Z)(e,$),{vars:n,css:l,varsWithDefaults:i}=N(o,t);let s=i;const d={},{light:m}=r,g=(0,c.Z)(r,Y);if(Object.entries(g||{}).forEach((e=>{let[r,o]=e;const{vars:n,css:a,varsWithDefaults:c}=N(o,t);s=(0,p.Z)(s,c),d[r]={css:a,vars:n}})),m){const{css:e,vars:r,varsWithDefaults:o}=N(m,t);s=(0,p.Z)(s,o),d.light={css:e,vars:r}}return{vars:s,generateCssVars:e=>e?{css:(0,a.Z)({},d[e].css),vars:d[e].vars}:{css:(0,a.Z)({},l),vars:n}}};var Q=r(53682);function X(e){var t;return!!e[0].match(/(cssVarPrefix|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!(null==(t=e[1])||!t.match(/(mode|contrastThreshold|tonalOffset)/))}var ee=r(62437);const te=["colorSchemes","cssVarPrefix","shouldSkipGeneratingVar"],re=["palette"],oe=[...Array(25)].map(((e,t)=>{if(0===t)return;const r=(0,ee.Z)(t);return"linear-gradient(rgba(255 255 255 / ".concat(r,"), rgba(255 255 255 / ").concat(r,"))")}));function ne(e,t,r){!e[t]&&r&&(e[t]=r)}function ae(e,t){"".concat(t,"Channel")in e||(e["".concat(t,"Channel")]=(0,g.LR)(e[t],"MUI: Can't create `palette.".concat(t,"Channel` because `palette.").concat(t,"` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().")+"\n"+"To suppress this warning, you need to explicitly provide the `palette.".concat(t,'Channel` as a string (in rgb format, e.g. "12 12 12") or undefined if you want to remove the channel token.')))}const ce=e=>{try{return e()}catch(t){}},le=function(){return H(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mui")};function ie(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,r,o,n,l,i;const{colorSchemes:s={},cssVarPrefix:d="mui",shouldSkipGeneratingVar:m=X}=e,h=(0,c.Z)(e,te),f=le(d),y=(0,u.Z)((0,a.Z)({},h,s.light&&{palette:null==(t=s.light)?void 0:t.palette})),{palette:S}=y,C=(0,c.Z)(y,re),{palette:k}=(0,u.Z)({palette:(0,a.Z)({mode:"dark"},null==(r=s.dark)?void 0:r.palette)});let b=(0,a.Z)({},C,{cssVarPrefix:d,getCssVar:f,colorSchemes:(0,a.Z)({},s,{light:(0,a.Z)({},s.light,{palette:S,opacity:(0,a.Z)({inputPlaceholder:.42,inputUnderline:.42,switchTrackDisabled:.12,switchTrack:.38},null==(o=s.light)?void 0:o.opacity),overlays:(null==(n=s.light)?void 0:n.overlays)||[]}),dark:(0,a.Z)({},s.dark,{palette:k,opacity:(0,a.Z)({inputPlaceholder:.5,inputUnderline:.7,switchTrackDisabled:.2,switchTrack:.3},null==(l=s.dark)?void 0:l.opacity),overlays:(null==(i=s.dark)?void 0:i.overlays)||oe})})});Object.keys(b.colorSchemes).forEach((e=>{const t=b.colorSchemes[e].palette,r=e=>{const r=e.split("-"),o=r[1],n=r[2];return f(e,t[o][n])};var o;if("light"===e?(ne(t.common,"background","#fff"),ne(t.common,"onBackground","#000")):(ne(t.common,"background","#000"),ne(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{o[e]||(o[e]={})})),"light"===e){ne(t.Alert,"errorColor",(0,g.q8)(t.error.light,.6)),ne(t.Alert,"infoColor",(0,g.q8)(t.info.light,.6)),ne(t.Alert,"successColor",(0,g.q8)(t.success.light,.6)),ne(t.Alert,"warningColor",(0,g.q8)(t.warning.light,.6)),ne(t.Alert,"errorFilledBg",r("palette-error-main")),ne(t.Alert,"infoFilledBg",r("palette-info-main")),ne(t.Alert,"successFilledBg",r("palette-success-main")),ne(t.Alert,"warningFilledBg",r("palette-warning-main")),ne(t.Alert,"errorFilledColor",ce((()=>S.getContrastText(t.error.main)))),ne(t.Alert,"infoFilledColor",ce((()=>S.getContrastText(t.info.main)))),ne(t.Alert,"successFilledColor",ce((()=>S.getContrastText(t.success.main)))),ne(t.Alert,"warningFilledColor",ce((()=>S.getContrastText(t.warning.main)))),ne(t.Alert,"errorStandardBg",(0,g.ux)(t.error.light,.9)),ne(t.Alert,"infoStandardBg",(0,g.ux)(t.info.light,.9)),ne(t.Alert,"successStandardBg",(0,g.ux)(t.success.light,.9)),ne(t.Alert,"warningStandardBg",(0,g.ux)(t.warning.light,.9)),ne(t.Alert,"errorIconColor",r("palette-error-main")),ne(t.Alert,"infoIconColor",r("palette-info-main")),ne(t.Alert,"successIconColor",r("palette-success-main")),ne(t.Alert,"warningIconColor",r("palette-warning-main")),ne(t.AppBar,"defaultBg",r("palette-grey-100")),ne(t.Avatar,"defaultBg",r("palette-grey-400")),ne(t.Button,"inheritContainedBg",r("palette-grey-300")),ne(t.Button,"inheritContainedHoverBg",r("palette-grey-A100")),ne(t.Chip,"defaultBorder",r("palette-grey-400")),ne(t.Chip,"defaultAvatarColor",r("palette-grey-700")),ne(t.Chip,"defaultIconColor",r("palette-grey-700")),ne(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ne(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ne(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ne(t.LinearProgress,"primaryBg",(0,g.ux)(t.primary.main,.62)),ne(t.LinearProgress,"secondaryBg",(0,g.ux)(t.secondary.main,.62)),ne(t.LinearProgress,"errorBg",(0,g.ux)(t.error.main,.62)),ne(t.LinearProgress,"infoBg",(0,g.ux)(t.info.main,.62)),ne(t.LinearProgress,"successBg",(0,g.ux)(t.success.main,.62)),ne(t.LinearProgress,"warningBg",(0,g.ux)(t.warning.main,.62)),ne(t.Skeleton,"bg","rgba(".concat(r("palette-text-primaryChannel")," / 0.11)")),ne(t.Slider,"primaryTrack",(0,g.ux)(t.primary.main,.62)),ne(t.Slider,"secondaryTrack",(0,g.ux)(t.secondary.main,.62)),ne(t.Slider,"errorTrack",(0,g.ux)(t.error.main,.62)),ne(t.Slider,"infoTrack",(0,g.ux)(t.info.main,.62)),ne(t.Slider,"successTrack",(0,g.ux)(t.success.main,.62)),ne(t.Slider,"warningTrack",(0,g.ux)(t.warning.main,.62));const e=(0,g.fk)(t.background.default,.8);ne(t.SnackbarContent,"bg",e),ne(t.SnackbarContent,"color",ce((()=>S.getContrastText(e)))),ne(t.SpeedDialAction,"fabHoverBg",(0,g.fk)(t.background.paper,.15)),ne(t.StepConnector,"border",r("palette-grey-400")),ne(t.StepContent,"border",r("palette-grey-400")),ne(t.Switch,"defaultColor",r("palette-common-white")),ne(t.Switch,"defaultDisabledColor",r("palette-grey-100")),ne(t.Switch,"primaryDisabledColor",(0,g.ux)(t.primary.main,.62)),ne(t.Switch,"secondaryDisabledColor",(0,g.ux)(t.secondary.main,.62)),ne(t.Switch,"errorDisabledColor",(0,g.ux)(t.error.main,.62)),ne(t.Switch,"infoDisabledColor",(0,g.ux)(t.info.main,.62)),ne(t.Switch,"successDisabledColor",(0,g.ux)(t.success.main,.62)),ne(t.Switch,"warningDisabledColor",(0,g.ux)(t.warning.main,.62)),ne(t.TableCell,"border",(0,g.ux)((0,g.zp)(t.divider,1),.88)),ne(t.Tooltip,"bg",(0,g.zp)(t.grey[700],.92))}else{ne(t.Alert,"errorColor",(0,g.ux)(t.error.light,.6)),ne(t.Alert,"infoColor",(0,g.ux)(t.info.light,.6)),ne(t.Alert,"successColor",(0,g.ux)(t.success.light,.6)),ne(t.Alert,"warningColor",(0,g.ux)(t.warning.light,.6)),ne(t.Alert,"errorFilledBg",r("palette-error-dark")),ne(t.Alert,"infoFilledBg",r("palette-info-dark")),ne(t.Alert,"successFilledBg",r("palette-success-dark")),ne(t.Alert,"warningFilledBg",r("palette-warning-dark")),ne(t.Alert,"errorFilledColor",ce((()=>k.getContrastText(t.error.dark)))),ne(t.Alert,"infoFilledColor",ce((()=>k.getContrastText(t.info.dark)))),ne(t.Alert,"successFilledColor",ce((()=>k.getContrastText(t.success.dark)))),ne(t.Alert,"warningFilledColor",ce((()=>k.getContrastText(t.warning.dark)))),ne(t.Alert,"errorStandardBg",(0,g.q8)(t.error.light,.9)),ne(t.Alert,"infoStandardBg",(0,g.q8)(t.info.light,.9)),ne(t.Alert,"successStandardBg",(0,g.q8)(t.success.light,.9)),ne(t.Alert,"warningStandardBg",(0,g.q8)(t.warning.light,.9)),ne(t.Alert,"errorIconColor",r("palette-error-main")),ne(t.Alert,"infoIconColor",r("palette-info-main")),ne(t.Alert,"successIconColor",r("palette-success-main")),ne(t.Alert,"warningIconColor",r("palette-warning-main")),ne(t.AppBar,"defaultBg",r("palette-grey-900")),ne(t.AppBar,"darkBg",r("palette-background-paper")),ne(t.AppBar,"darkColor",r("palette-text-primary")),ne(t.Avatar,"defaultBg",r("palette-grey-600")),ne(t.Button,"inheritContainedBg",r("palette-grey-800")),ne(t.Button,"inheritContainedHoverBg",r("palette-grey-700")),ne(t.Chip,"defaultBorder",r("palette-grey-700")),ne(t.Chip,"defaultAvatarColor",r("palette-grey-300")),ne(t.Chip,"defaultIconColor",r("palette-grey-300")),ne(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ne(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ne(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ne(t.LinearProgress,"primaryBg",(0,g.q8)(t.primary.main,.5)),ne(t.LinearProgress,"secondaryBg",(0,g.q8)(t.secondary.main,.5)),ne(t.LinearProgress,"errorBg",(0,g.q8)(t.error.main,.5)),ne(t.LinearProgress,"infoBg",(0,g.q8)(t.info.main,.5)),ne(t.LinearProgress,"successBg",(0,g.q8)(t.success.main,.5)),ne(t.LinearProgress,"warningBg",(0,g.q8)(t.warning.main,.5)),ne(t.Skeleton,"bg","rgba(".concat(r("palette-text-primaryChannel")," / 0.13)")),ne(t.Slider,"primaryTrack",(0,g.q8)(t.primary.main,.5)),ne(t.Slider,"secondaryTrack",(0,g.q8)(t.secondary.main,.5)),ne(t.Slider,"errorTrack",(0,g.q8)(t.error.main,.5)),ne(t.Slider,"infoTrack",(0,g.q8)(t.info.main,.5)),ne(t.Slider,"successTrack",(0,g.q8)(t.success.main,.5)),ne(t.Slider,"warningTrack",(0,g.q8)(t.warning.main,.5));const e=(0,g.fk)(t.background.default,.98);ne(t.SnackbarContent,"bg",e),ne(t.SnackbarContent,"color",ce((()=>k.getContrastText(e)))),ne(t.SpeedDialAction,"fabHoverBg",(0,g.fk)(t.background.paper,.15)),ne(t.StepConnector,"border",r("palette-grey-600")),ne(t.StepContent,"border",r("palette-grey-600")),ne(t.Switch,"defaultColor",r("palette-grey-300")),ne(t.Switch,"defaultDisabledColor",r("palette-grey-600")),ne(t.Switch,"primaryDisabledColor",(0,g.q8)(t.primary.main,.55)),ne(t.Switch,"secondaryDisabledColor",(0,g.q8)(t.secondary.main,.55)),ne(t.Switch,"errorDisabledColor",(0,g.q8)(t.error.main,.55)),ne(t.Switch,"infoDisabledColor",(0,g.q8)(t.info.main,.55)),ne(t.Switch,"successDisabledColor",(0,g.q8)(t.success.main,.55)),ne(t.Switch,"warningDisabledColor",(0,g.q8)(t.warning.main,.55)),ne(t.TableCell,"border",(0,g.q8)((0,g.zp)(t.divider,1),.68)),ne(t.Tooltip,"bg",(0,g.zp)(t.grey[700],.92))}ae(t.background,"default"),ae(t.common,"background"),ae(t.common,"onBackground"),ae(t,"divider"),Object.keys(t).forEach((e=>{const r=t[e];r&&"object"===typeof r&&(r.main&&ne(t[e],"mainChannel",(0,g.LR)(r.main)),r.light&&ne(t[e],"lightChannel",(0,g.LR)(r.light)),r.dark&&ne(t[e],"darkChannel",(0,g.LR)(r.dark)),r.contrastText&&ne(t[e],"contrastTextChannel",(0,g.LR)(r.contrastText)),"text"===e&&(ae(t[e],"primary"),ae(t[e],"secondary")),"action"===e&&(r.active&&ae(t[e],"active"),r.selected&&ae(t[e],"selected")))}))}));for(var v=arguments.length,w=new Array(v>1?v-1:0),x=1;x<v;x++)w[x-1]=arguments[x];b=w.reduce(((e,t)=>(0,p.Z)(e,t)),b);const A={prefix:d,shouldSkipGeneratingVar:m},{vars:Z,generateCssVars:B}=J(b,A);return b.vars=Z,b.generateCssVars=B,b.shouldSkipGeneratingVar=m,b.unstable_sxConfig=(0,a.Z)({},Q.Z,null==h?void 0:h.unstable_sxConfig),b.unstable_sx=function(e){return(0,W.Z)({sx:e,theme:this})},b}var se=r(66754);const de=e=>[...[...Array(24)].map(((t,r)=>"--".concat(e?"".concat(e,"-"):"","overlays-").concat(r+1))),"--".concat(e?"".concat(e,"-"):"","palette-AppBar-darkBg"),"--".concat(e?"".concat(e,"-"):"","palette-AppBar-darkColor")],me=ie(),{CssVarsProvider:ge,useColorScheme:he,getInitColorSchemeScript:ue}=function(e){const{themeId:t,theme:r={},attribute:n=D,modeStorageKey:l=F,colorSchemeStorageKey:i=M,defaultMode:s="light",defaultColorScheme:d,disableTransitionOnChange:m=!1,resolveTheme:g,excludeVariablesFromRoot:h}=e;(!r.colorSchemes||"string"===typeof d&&!r.colorSchemes[d]||"object"===typeof d&&!r.colorSchemes[null==d?void 0:d.light]||"object"===typeof d&&!r.colorSchemes[null==d?void 0:d.dark])&&console.error("MUI: `".concat(d,"` does not exist in `theme.colorSchemes`."));const u=P.createContext(void 0),f="string"===typeof d?d:d.light,y="string"===typeof d?d:d.dark;return{CssVarsProvider:function(e){let{children:o,theme:f=r,modeStorageKey:y=l,colorSchemeStorageKey:S=i,attribute:C=n,defaultMode:k=s,defaultColorScheme:b=d,disableTransitionOnChange:v=m,storageWindow:w=("undefined"===typeof window?void 0:window),documentNode:x=("undefined"===typeof document?void 0:document),colorSchemeNode:A=("undefined"===typeof document?void 0:document.documentElement),colorSchemeSelector:Z=":root",disableNestedContext:B=!1,disableStyleSheetGeneration:T=!1}=e;const I=P.useRef(!1),F=(0,E.Z)(),M=P.useContext(u),D=!!M&&!B,V=f[t],O=V||f,{colorSchemes:_={},components:W={},generateCssVars:H=(()=>({vars:{},css:{}})),cssVarPrefix:z}=O,U=(0,c.Z)(O,K),G=Object.keys(_),N="string"===typeof b?b:b.light,$="string"===typeof b?b:b.dark,{mode:Y,setMode:J,systemMode:Q,lightColorScheme:X,darkColorScheme:ee,colorScheme:te,setColorScheme:re}=R({supportedColorSchemes:G,defaultLightColorScheme:N,defaultDarkColorScheme:$,modeStorageKey:y,colorSchemeStorageKey:S,defaultMode:k,storageWindow:w});let oe=Y,ne=te;D&&(oe=M.mode,ne=M.colorScheme);const ae=ne||("dark"===(oe||("system"===k?s:k))?$:N),{css:ce,vars:le}=H(),ie=(0,a.Z)({},U,{components:W,colorSchemes:_,cssVarPrefix:z,vars:le,getColorSchemeSelector:e=>"[".concat(C,'="').concat(e,'"] &')}),se={},de={};Object.entries(_).forEach((e=>{let[t,r]=e;const{css:o,vars:n}=H(t);ie.vars=(0,p.Z)(ie.vars,n),t===ae&&(Object.keys(r).forEach((e=>{r[e]&&"object"===typeof r[e]?ie[e]=(0,a.Z)({},ie[e],r[e]):ie[e]=r[e]})),ie.palette&&(ie.palette.colorScheme=t));if(t===("string"===typeof b?b:"dark"===k?b.dark:b.light)){if(h){const e={};h(z).forEach((t=>{e[t]=o[t],delete o[t]})),se["[".concat(C,'="').concat(t,'"]')]=e}se["".concat(Z,", [").concat(C,'="').concat(t,'"]')]=o}else de["".concat(":root"===Z?"":Z,"[").concat(C,'="').concat(t,'"]')]=o})),ie.vars=(0,p.Z)(ie.vars,le),P.useEffect((()=>{ne&&A&&A.setAttribute(C,ne)}),[ne,C,A]),P.useEffect((()=>{let e;if(v&&I.current&&x){const t=x.createElement("style");t.appendChild(x.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),x.head.appendChild(t),window.getComputedStyle(x.body),e=setTimeout((()=>{x.head.removeChild(t)}),1)}return()=>{clearTimeout(e)}}),[ne,v,x]),P.useEffect((()=>(I.current=!0,()=>{I.current=!1})),[]);const me=P.useMemo((()=>({mode:oe,systemMode:Q,setMode:J,lightColorScheme:X,darkColorScheme:ee,colorScheme:ne,setColorScheme:re,allColorSchemes:G})),[G,ne,ee,X,oe,re,J,Q]);let ge=!0;(T||D&&(null==F?void 0:F.cssVarPrefix)===z)&&(ge=!1);const he=(0,q.jsxs)(P.Fragment,{children:[ge&&(0,q.jsxs)(P.Fragment,{children:[(0,q.jsx)(j.Z,{styles:{[Z]:ce}}),(0,q.jsx)(j.Z,{styles:se}),(0,q.jsx)(j.Z,{styles:de})]}),(0,q.jsx)(L.Z,{themeId:V?t:void 0,theme:g?g(ie):ie,children:o})]});return D?he:(0,q.jsx)(u.Provider,{value:me,children:he})},useColorScheme:()=>{const e=P.useContext(u);if(!e)throw new Error((0,o.Z)(19));return e},getInitColorSchemeScript:e=>function(e){const{defaultMode:t="light",defaultLightColorScheme:r="light",defaultDarkColorScheme:o="dark",modeStorageKey:n=F,colorSchemeStorageKey:a=M,attribute:c=D,colorSchemeNode:l="document.documentElement"}=e||{};return(0,q.jsx)("script",{dangerouslySetInnerHTML:{__html:"(function() {\ntry {\n var mode = localStorage.getItem('".concat(n,"') || '").concat(t,"';\n var colorScheme = '';\n if (mode === 'system') {\n // handle system mode\n var mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = localStorage.getItem('").concat(a,"-dark') || '").concat(o,"';\n } else {\n colorScheme = localStorage.getItem('").concat(a,"-light') || '").concat(r,"';\n }\n }\n if (mode === 'light') {\n colorScheme = localStorage.getItem('").concat(a,"-light') || '").concat(r,"';\n }\n if (mode === 'dark') {\n colorScheme = localStorage.getItem('").concat(a,"-dark') || '").concat(o,"';\n }\n if (colorScheme) {\n ").concat(l,".setAttribute('").concat(c,"', colorScheme);\n }\n} catch(e){}})();")}},"mui-color-scheme-init")}((0,a.Z)({attribute:n,colorSchemeStorageKey:i,defaultMode:s,defaultLightColorScheme:f,defaultDarkColorScheme:y,modeStorageKey:l},e))}}({themeId:n.Z,theme:me,attribute:"data-mui-color-scheme",modeStorageKey:"mui-mode",colorSchemeStorageKey:"mui-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{const t=(0,a.Z)({},e,{typography:(0,se.Z)(e.palette,e.typography)});return t.unstable_sx=function(e){return(0,W.Z)({sx:e,theme:this})},t},excludeVariablesFromRoot:de});function pe(){throw new Error((0,o.Z)(20))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[8973],{80378:(e,n,t)=>{t.d(n,{Z:()=>p});var i=t(55898),o=t.n(i),a=t(62681),l=t(72333),r=t(6352),s=t.n(r),c=t(35432),d=t(58238),m=t(14491);var u=t(96266);function p(e){let{blocklet:n,style:t,size:i,ancestors:o,...r}=e;const p=(0,d.h6)(),{logoUrl:h,inService:f}=function(e){var n;let{blocklet:t,ancestors:i=[]}=e;const o=(0,d.h6)(),{inService:a}=o,l="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,m.XN)(null===t||void 0===t?void 0:t.status)?"~":"");let r=a?s()(m.zn,c.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",l):s()(o.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)r=s()(t.deployedFrom,(0,m.lk)(t.meta.bundleDid,t.meta.logo),l);else{const e=window.env.apiPrefix||"/",n=i.concat(t),o=a?n.slice(1):n;r=s()(e,"/blocklet/logo-bundle".concat(o.map((e=>"/".concat(e.meta.did))).join("")),l)}return{logoUrl:r,inService:a}}({blocklet:n,ancestors:o}),{variant:g}=r,x=f?()=>{}:e=>{e.target.src="".concat(p.imgPrefix,"/blocklet.png")};let b=(0,u.jsx)("img",{src:h,onError:x,alt:n.meta.name,style:{width:i}});return n.meta.logo||(b=(0,u.jsx)(l.Z,{did:n.meta.did||"",responsive:!0})),(0,u.jsx)(a.Z,{variant:g||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},t),...r,children:b})}p.propTypes={blocklet:o().object.isRequired,style:o().object,size:o().oneOfType([o().number,o().string]),ancestors:o().array},p.defaultProps={style:{},size:40,ancestors:[]}},74286:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(55898),o=t.n(i),a=t(39948),l=t(96266);function r(e){let{depth:n}=e;return(0,l.jsx)(a.Z,{ml:Math.max(2*(n-1),0),sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}r.propTypes={depth:o().number},r.defaultProps={depth:1}},44784:(e,n,t)=>{t.d(n,{Z:()=>d});var i,o=t(71171),a=t(33518),l=t(82790),r=t(96266);function s(e){let{labelProps:n,className:t,style:i,...o}=e;const a={...n,labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"};return(0,r.jsx)(c,{className:t,style:i,children:(0,r.jsx)(l.Z,{labelProps:a,...o})})}s.propTypes=l.Z.propTypes,s.defaultProps=l.Z.defaultProps;const c=a.Z.div(i||(i=(0,o.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(e=>{let{theme:n}=e;return n.breakpoints.down("sm")})),d=s},59375:(e,n,t)=>{t.d(n,{Z:()=>Z});var i,o=t(71171),a=t(5057),l=t(55898),r=t.n(l),s=t(6352),c=t.n(s),d=t(33518),m=t(92706),u=t.n(m),p=t(39948),h=t(52277),f=t.n(h),g=t(68420),x=t(96266);const b=(0,a.lazy)((()=>Promise.all([t.e(1294),t.e(3826)]).then(t.bind(t,23826)).then((e=>({default:e.Uploader}))))),v="/blocklet/logo/upload";function Z(e){let{url:n,height:t,width:i,enabled:o,type:l,did:r,prefix:s,headers:d,onUploaded:m}=e;const{t:u}=(0,g.PE)(),h=(0,a.useRef)(null),Z={cursor:o?"pointer":"default","&::after":{content:'"'.concat(u("common.switch"),'"')}};return(0,x.jsxs)(j,{id:"uploader-".concat(r,"-").concat(l),children:[(0,x.jsx)(b,{ref:h,popup:!0,onUploadFinish:()=>{var e;m(),null===(e=h.current)||void 0===e||e.close()},plugins:["ImageEditor"],apiPathProps:{uploader:c()(s,v,l,r),disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:d}}),(0,x.jsx)(p.Z,{className:f()("uploader-wrapper",o&&"enabled"),sx:Z,onClick:()=>{var e;null===(e=h.current)||void 0===e||e.open()},children:(0,x.jsx)("img",{alt:"Logo",src:n,style:{height:t,width:i}})})]},"uploader-".concat(r,"-").concat(l))}Z.propTypes={url:r().string.isRequired,type:r().oneOf(["square","rect","favicon"]).isRequired,did:r().string.isRequired,prefix:r().string.isRequired,headers:r().func,onUploaded:r().func,height:r().number,width:r().any,enabled:r().bool},Z.defaultProps={height:80,width:"auto",enabled:!0,headers:()=>({}),onUploaded:u()};const j=d.Z.div(i||(i=(0,o.Z)(["\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])))},5119:(e,n,t)=>{t.r(n),t.d(n,{default:()=>rt});var i=t(71171),o=t(5057),a=t(33518),l=t(55898),r=t.n(l),s=t(96181),c=t(6352),d=t.n(c),m=t(35432),u=t(39948),p=t(55402),h=t(82275),f=t(96399),g=t(65688),x=t(37633),b=t(48037),v=t(92273),Z=t(76720),j=t(15849),y=t(68420),C=t(94464),k=t(38242),w=t(80378),S=t(1722),E=t(43681),L=t.n(E),P=t(50482),R=t.n(P),T=t(16147),_=t(29034),A=t(28726),N=t(80578),O=t(76811),I=t(86229),F=t(28641),B=t(44846),z=t(13727),D=t(56184),U=t(67680),K=t(74490),W=t(51177),q=t(19654),G=t(96366),V=t(90067),H=t(35406),M=t(11875),Y=t(95890),J=t(96266);const Q={PaperProps:{style:{maxHeight:224,width:250}}},X=(e,n,t)=>({fontWeight:-1===n.indexOf(e)?t.typography.fontWeightRegular:t.typography.fontWeightMedium});function $(e){let{label:n,disabled:t,required:i,initialValue:a,onChange:l,style:r,onSubmit:s,triggers:c,options:d,formatterBeforeSubmit:m,helperText:p,...h}=e;const f=(0,G.Z)(),[g,x]=(0,o.useState)(!1),[b,v]=(0,o.useState)(!1),[Z,j]=(0,o.useState)(a),[y,C]=(0,o.useState)(Z),k=g?(0,J.jsx)(W.Z,{value:y,onChange:e=>{let{value:n}=e.target;n="string"===typeof n?n.split(","):n,C(n),l(n)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",renderValue:e=>(0,J.jsx)(u.Z,{sx:{display:"flex",flexWrap:"wrap"},children:e.filter((e=>d.some((n=>n.code===e)))).map((e=>(0,J.jsx)(q.Z,{label:d.find((n=>n.code===e)).name,style:{marginRight:8},size:"small"},e)))}),MenuProps:Q,...h,children:d.map((e=>(0,J.jsx)(K.Z,{value:e.code,style:X(e.code,y,f),children:e.name},e.code)))}):(0,J.jsx)(u.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:y.filter((e=>d.some((n=>n.code===e)))).map((e=>(0,J.jsx)(q.Z,{label:d.find((n=>n.code===e)).name,style:{marginRight:8},size:"small"},e)))});return(0,J.jsx)(M.Z,{className:"form",style:r,children:(0,J.jsxs)(u.Z,{className:"form-item",children:[(0,J.jsxs)(u.Z,{className:"form-item-label",children:[n,i&&(0,J.jsx)(H.Z,{})]}),(0,J.jsxs)(u.Z,{className:"form-item-body",children:[(0,J.jsx)(u.Z,{className:"form-item-input",children:k}),(0,J.jsx)(u.Z,{className:"form-item-action",children:g?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(U.Z,{"data-cy":"schema-form-item-confirm",onClick:async()=>{v(!0);try{!1===await s("function"===typeof m?m(y):y)?C(Z):(C(y),j(y))}catch(e){C(Z)}finally{v(!1),x(!1)}},disabled:t||b,size:"large",children:b?(0,J.jsx)(B.Z,{size:24}):(0,J.jsx)(D.Z,{})}),(0,J.jsx)(U.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{C(Z),x(!1)},disabled:t||b,size:"large",children:(0,J.jsx)(z.default,{})})]}):(0,J.jsx)(Y.Z,{triggers:c,onEnterEdit:()=>x(!0),disabled:t})})]}),g&&p&&(0,J.jsx)(V.Z,{children:p})]})})}$.propTypes={style:r().object,onSubmit:r().func,onChange:r().func,label:r().string,initialValue:r().string,required:r().bool,disabled:r().bool,triggers:r().array,options:r().array,helperText:r().string,formatterBeforeSubmit:r().func},$.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(",")};var ee,ne=t(58238),te=t(14491),ie=t(54063),oe=t(63406),ae=t(78410),le=t(31853),re=t(49983),se=t(70461),ce=t(73545),de=t(29054);function me(e){let{initialValue:n,onChange:t,disabled:i,loading:o}=e;const{t:a}=(0,y.PE)(),{api:l}=(0,ce.T)(),{blocklet:r}=(0,de.y0)(),[s,c]=(0,le.Z)({newAppSk:"",isConnectOpen:!1}),d=()=>c({isConnectOpen:!1}),p=r.structVersion===m.APP_STRUCT_VERSION?[{key:"rotate-with-did-wallet",title:"Migrate with DID Wallet",handler:()=>{(0,te.An)(r.status)?I.Z.error(a("blocklet.error.isRunning")):(0,k.isInProgress)(r.status)?I.Z.error(a("blocklet.error.isInProgress")):c({isConnectOpen:!0})}}]:[];return[(0,J.jsx)(F.Z,{disabled:i,loading:o,initialValue:n,onSubmit:e=>(c({newAppSk:e}),!1),triggers:p,secure:!0}),s.newAppSk&&(0,J.jsx)(se.Z,{title:a("blocklet.config.appSkTitle"),description:(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(u.Z,{children:a("blocklet.config.appSkChangeTip")}),(0,J.jsx)(u.Z,{fontWeight:"bold",mt:2,children:a("blocklet.config.appDidChangeTip")}),(0,J.jsxs)(ue,{children:[(0,J.jsx)("li",{children:a("blocklet.config.appDidChangeTipL1")}),(0,J.jsx)("li",{children:a("blocklet.config.appDidChangeTipL2")})]})]}),confirm:a("confirm"),cancel:a("cancel"),onConfirm:()=>(async e=>{try{await t(e)}finally{c({newAppSk:""})}})(s.newAppSk),onCancel:()=>c({newAppSk:""})}),(0,J.jsx)(re.Z,{popup:!0,open:s.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:l.get,checkTimeout:3e5,onSuccess:d,extraParams:{appDid:r.appDid},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:d})]}me.propTypes={initialValue:r().string,onChange:r().func,disabled:r().bool,loading:r().bool},me.defaultProps={initialValue:"default",onChange:()=>{},disabled:!1,loading:!1};const ue=(0,a.Z)("ul")(ee||(ee=(0,i.Z)(["\n padding-left: 16px;\n li {\n margin-top: 8px;\n list-style: disk;\n font-weight: bold;\n }\n"])));var pe,he=t(13128),fe=t(55372),ge=t(11750),xe=t(88574),be=t(26174),ve=t(88092),Ze=t(50185),je=t(17425);function ye(e){let{onCancel:n,onSuccess:t,onError:i}=e;const{api:a}=(0,o.useContext)(ce.B),[l,r]=(0,o.useState)(!1),{t:s,locale:c}=(0,y.PE)(),[d,m]=(0,o.useState)(""),[p,h]=(0,o.useState)(!1),[f,g]=(0,o.useState)(0),[x,b]=(0,o.useState)(""),{endpoint:v}=(0,je.DJ)(),[Z,j]=(0,o.useState)(!1),C=e=>{m(null),r(!0);try{b(e.result),g(w.length-1)}catch(n){const e=(0,te.Z)(n);m(e),i(n)}finally{r(!1)}},k=()=>{h(!1),g(0)},w=[{body:(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(ge.Z,{children:s("team.transferApp.transferDialog.tips.progress")}),(0,J.jsx)(ge.Z,{mt:3,mb:2,children:s("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:s("common.cancel"),confirm:s("team.transferApp.transferDialog.createTransferLink"),onCancel:n,onConfirm:()=>{h(!0),g(1)}},{body:()=>(0,J.jsx)(re.Z,{action:"transfer-app-owner",open:p,locale:c,checkFn:a.get,onClose:k,onSuccess:C,checkTimeout:3e5,extraParams:{},messages:{title:s("team.transferApp.connectDialog.title"),scan:s("team.transferApp.connectDialog.scan"),confirm:s("team.transferApp.connectDialog.confirm"),success:s("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const e=(0,te.VP)({transferId:x.transferId,endpoint:v});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(u.Z,{component:Ce,dangerouslySetInnerHTML:{__html:s("team.transferApp.transferDialog.createSuccessTip1")}}),(0,J.jsx)(u.Z,{component:Ce,mt:2,children:(0,J.jsx)(Ce,{children:s("team.transferApp.transferDialog.createSuccessTip3")})}),(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(u.Z,{component:Ce,mt:2,children:(0,J.jsx)(Ce,{children:s("team.transferApp.transferDialog.createSuccessTip2",{expireDate:(0,te.B2)(x.expireDate,c)})})}),(0,J.jsx)(u.Z,{my:1,children:(0,J.jsx)(Ze.Z,{children:e})})]}),(0,J.jsx)("div",{children:(0,J.jsx)(be.Z,{value:"end",control:(0,J.jsx)(ve.Z,{checked:Z,onChange:e=>j(e.target.checked)}),label:s("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:s("common.confirm"),onConfirm:t}],S=w[f];return(0,J.jsxs)(he.ZP,{title:(0,J.jsx)(Ce,{className:"title",children:s("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,J.jsxs)(J.Fragment,{children:[S.cancel&&(0,J.jsx)(A.Z,{onClick:S.onCancel,color:"inherit",children:S.cancel}),(0,J.jsxs)(A.Z,{onClick:S.onConfirm,color:"error",disabled:l||f===w.length-1&&!Z,variant:"contained",autoFocus:!0,children:[l&&(0,J.jsx)(B.Z,{size:16}),S.confirm]})]}),children:[(0,J.jsx)(fe.Z,{component:"div",children:"function"===typeof S.body?S.body():S.body}),!!d&&(0,J.jsx)(xe.Z,{type:"error",variant:"icon",children:d})]})}ye.propTypes={onCancel:r().func.isRequired,onSuccess:r().func.isRequired,onError:r().func},ye.defaultProps={onError:()=>{}};const Ce=a.Z.div(pe||(pe=(0,i.Z)(["\n font-size: 16px;\n font-weight: bold;\n &.title {\n font-size: 20px;\n }\n"])));var ke,we=t(49522),Se=t(59375);const Ee=Object.keys(O.SUPPORTED_LANGUAGES).map((e=>({code:e,name:O.SUPPORTED_LANGUAGES[e].nativeName})));function Le(e){var n;let{blocklet:t,onUpdate:i,hasPermission:a,...l}=e;const{api:r,inService:s,prefix:c,getSessionInHeader:d,ws:{useSubscription:p}}=(0,ne.h6)(),{t:h}=(0,o.useContext)(y.RD),[f,g]=(0,o.useState)(""),[x,b]=(0,o.useState)(""),[v,Z]=(0,o.useState)(!1),j=(0,k.getWhoCanAccess)(t),C=null===t||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.publicToStore,w=x||!a,{logoUrl:S,rectLogoUrl:E,faviconUrl:P}=(0,we.Z)({blocklet:t}),{did:B}=t.meta,{site:z}=t,D=L()(t.meta,"capabilities.clusterMode",!1);if(p(m.EVENTS.NODE_RUNTIME_INFO,(e=>{D&&g(L()(e,"cpu.physicalCores",""))})),(0,te.wS)(t.status))return null;const U=t.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE)),K=!U||"yes"===U.value,W=t.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES)),q=t.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL)),G=t.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)),V=t.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)),H=[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:h("blocklet.config.name"),value:t.environments.find((e=>"BLOCKLET_APP_NAME"===e.key)).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:h("blocklet.config.description"),value:t.environments.find((e=>"BLOCKLET_APP_DESCRIPTION"===e.key)).value},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,description:h("blocklet.config.appUrl"),value:q?q.value:""},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,description:h("blocklet.config.copyrightOwner"),value:G?G.value:""},{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,description:h("blocklet.config.copyrightYear"),value:V?V.value:""}];if(D){const e=t.configs.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE)),n=e?e.value:f;H.push({key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,description:h("blocklet.config.clusterSize"),value:n,cpuCores:f})}const M=async(e,n)=>{if(e===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const e=(0,te.I)({value:n,cpuCores:f});if(e)return void I.Z.error(e)}const o=[{key:e,value:n}];try{b(!0);const{blocklet:e}=await r.configBlocklet({input:{did:t.meta.did,configs:o}});i(e)}catch(a){I.Z.error(a.message)}finally{b(!1)}};return(0,J.jsxs)(_e,{...l,children:[H.map((e=>(0,J.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:e.description}),(0,J.jsx)(F.Z,{style:{marginTop:0},disabled:x||w,loading:x,initialValue:e.value,onSubmit:n=>M(e.key,n)})]}))),(0,J.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mb:1,sx:{flexGrow:0,width:"auto"},children:h("blocklet.config.logoSquare")}),(0,J.jsx)(Se.Z,{did:t.meta.did,height:80,width:80,type:"square",prefix:c,url:S,enabled:a,headers:d}),(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mt:4,children:h("blocklet.config.logoRect")}),(0,J.jsx)(u.Z,{mb:1.5,className:"config-desc",children:h("blocklet.config.logoRectDesc")}),(0,J.jsx)(Se.Z,{did:t.meta.did,height:80,type:"rect",prefix:c,url:E,enabled:a,headers:d}),(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mt:4,children:h("blocklet.config.logoFavicon")}),(0,J.jsx)(u.Z,{mb:1.5,className:"config-desc",children:h("blocklet.config.logoFaviconDesc")}),(0,J.jsx)(Se.Z,{did:t.meta.did,height:25,width:25,type:"favicon",prefix:c,url:P,enabled:a,headers:d}),(0,J.jsx)(u.Z,{className:"config-form",children:"all"===j&&"registry"===t.source&&(0,J.jsxs)(u.Z,{className:"config-item",children:[(0,J.jsxs)(u.Z,{className:"config-label",children:[h("blocklet.config.access.publicToStore"),(0,J.jsx)(u.Z,{className:"config-desc",children:h("blocklet.config.access.publicInstanceTip")})]}),(0,J.jsx)(T.Z,{disabled:w,checked:C,defaultChecked:!0,onChange:async e=>{if(!x){b(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configPublicToStore({input:{did:t.meta.did,publicToStore:n}});i(o)}catch(n){I.Z.error(n.message)}finally{b(!1)}}}})]})}),(0,J.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,J.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:h("blocklet.config.languages")}),(0,J.jsx)($,{style:{marginTop:0},disabled:x||w,loading:x,options:Ee,initialValue:W?W.value.split(","):["en","zh"],onSubmit:e=>M("BLOCKLET_APP_LANGUAGES",e),helperText:h("blocklet.config.selectLanguagesTip")})]}),(0,J.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,J.jsx)(u.Z,{className:"config-form",mt:2,children:(0,J.jsx)(u.Z,{className:"config-label",mb:0,children:h("common.security")})}),(0,J.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:h("router.domainSecurity.cors.title")}),(0,J.jsx)(u.Z,{mb:1.5,className:"config-desc",children:h("router.domainSecurity.cors.description",{name:"the blocklet"})}),(0,J.jsx)(F.Z,{style:{marginTop:0},disabled:x||w,loading:x,initialValue:(z.corsAllowedOrigins||[]).join(", "),onSubmit:async e=>{const n=z.corsAllowedOrigins||[],i=e.split(",").map((e=>e.trim())).filter(Boolean);if(R()(n,i))return!1;try{b(!0);const e=i.length?i:["__none__"];await r.updateRoutingSite({input:{id:z.id,corsAllowedOrigins:e,teamDid:t.meta.did}}),b(!1)}catch(o){return I.Z.error(o.message),b(!1),!1}return!0}})]}),(0,J.jsx)(u.Z,{className:"config-form",component:_.Z,my:3}),(0,J.jsx)(u.Z,{mb:2,className:"config-label",fontSize:20,children:h("blocklet.config.dangerZone")}),(0,J.jsxs)(u.Z,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},children:[(0,J.jsx)(u.Z,{className:"config-form",mt:2,children:!s&&(0,J.jsxs)(u.Z,{className:"config-item",children:[(0,J.jsxs)(u.Z,{className:"config-label",children:[h("blocklet.config.deletable.name"),(0,J.jsx)(u.Z,{className:"config-desc",children:h(K?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),(0,J.jsx)(T.Z,{disabled:w,checked:!K,defaultChecked:!0,onChange:async e=>{if(!x){b(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE,value:n?"no":"yes"}]}});i(o)}catch(n){I.Z.error(n.message)}finally{b(!1)}}}})]})}),(0,J.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,J.jsx)(u.Z,{className:"config-label",fontSize:14,mb:0,children:h("blocklet.config.sk")}),(0,J.jsx)(me,{disabled:x||w,loading:x,initialValue:t.environments.find((e=>"BLOCKLET_APP_SK"===e.key)).value,onChange:async e=>{if(!x){b(!0);try{const{blocklet:n}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SK,value:e}]}});i(n)}catch(n){I.Z.error(n.message)}finally{b(!1)}}}})]}),s&&(0,J.jsx)(oe.Z,{role:"owner",children:e=>(e||ie.C)&&(0,J.jsxs)(u.Z,{className:"config-form",mt:2,children:[(0,J.jsxs)(u.Z,{className:"config-item",children:[(0,J.jsx)(u.Z,{className:"config-label",mb:0,children:h("team.transferApp.name")}),(0,J.jsxs)(A.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"transfer-app",onClick:()=>Z(!0),children:[(0,J.jsx)(N.Z,{style:{fontSize:"1.3em",marginRight:4}}),h("team.transferApp.name")]})]}),v&&(0,J.jsx)(ye,{onCancel:()=>Z(!1),onSuccess:()=>Z(!1)})]})}),(0,J.jsx)(u.Z,{className:"config-form",mt:2,children:(0,J.jsxs)(u.Z,{className:"config-item",children:[(0,J.jsxs)(u.Z,{className:"config-label",children:[h("blocklet.config.clearCache.name"),(0,J.jsx)(u.Z,{className:"config-desc",children:h("blocklet.config.clearCache.purpose")})]}),(0,J.jsx)(ae.Z,{teamDid:B})]})})]})]})}const Pe=(0,oe.V)(Le,"mutate_blocklets"),Re=(0,oe.V)(Le,"",te.Wf);function Te(e){const{inService:n}=(0,ne.h6)();return n?(0,J.jsx)(Re,{...e}):(0,J.jsx)(Pe,{...e})}Le.propTypes={blocklet:r().object.isRequired,onUpdate:r().func,hasPermission:r().bool},Le.defaultProps={onUpdate:()=>{},hasPermission:!1};const _e=a.Z.div(ke||(ke=(0,i.Z)(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n"])),(e=>e.theme.breakpoints.down("md")));var Ae=t(25710),Ne=t(93066),Oe=t(47020),Ie=t(80576),Fe=t(8708),Be=t.n(Fe),ze=t(12673),De=t(99360),Ue=t(80506),Ke=t(766),We=t.n(Ke),qe=t(24529),Ge=t.n(qe),Ve=t(16727),He=t.n(Ve),Me=t(92706),Ye=t.n(Me);const Je=(0,o.forwardRef)(((e,n)=>{const{t:t}=(0,o.useContext)(y.RD),i=(0,ze.Z)({show:!1,title:"",content:"",onConfirm:Ye(),onCancel:Ye(),loading:!1}),a=(0,De.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.show=!0,i.title=e.title,i.content=e.content,i.onConfirm=e.onConfirm||Ye(),i.onCancel=e.onCancel||Ye(),i.loading=!1})),l=(0,De.Z)((()=>{i.title="",i.content="",i.onConfirm=Ye(),i.onCancel=Ye()})),r=(0,De.Z)((()=>{i.show=!1,setTimeout((()=>{l()}),300)})),s=(0,De.Z)((()=>{r(),null===i||void 0===i||i.onCancel()}),[]),c=(0,De.Z)((async()=>{i.loading=!0;try{await(null===i||void 0===i?void 0:i.onConfirm(r))}finally{i.loading=!1}}),[]);return(0,o.useImperativeHandle)(n,(()=>({open:a,close:r})),[a,r]),(0,J.jsx)(he.I4,{open:i.show,title:i.title,onConfirm:c,onCancel:s,confirmButton:{text:t("common.confirm"),props:{variant:"contained",color:"primary",loading:i.loading}},cancelButton:{text:t("common.cancel"),props:{variant:"outlined",color:"primary"}},children:i.content instanceof Function?i.content():i.content})}));function Qe(){const e=(0,o.useRef)(null),n=(0,De.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.open(...i)})),t=(0,De.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.close(...i)})),i={open:n,close:t};return{confirmHolder:(0,J.jsx)(Je,{ref:e}),confirmApi:i}}const Xe={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};const $e=function(){var e,n,t;const{api:i}=(0,ne.h6)(),{blocklet:o}=(0,de.y0)(),{t:a}=(0,y.PE)(),{confirmApi:l,confirmHolder:r}=Qe(),s=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,c=Object.assign({...Xe},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.notification)||void 0===t?void 0:t.email)||{}),{handleSubmit:d,control:m,formState:p,watch:h,reset:f}=(0,Ue.cI)({defaultValues:Be()(c,Object.keys(Xe))}),g=(0,ze.Z)({testReceiver:"",testReceiverError:""}),x=h("enabled"),b=(0,De.Z)((async function(e,n){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{var o,l;const{blocklet:n}=await i.configNotification({input:{did:s,notification:JSON.stringify({email:e})}}),r=Object.assign({...Xe},(null===n||void 0===n||null===(o=n.settings)||void 0===o||null===(l=o.notification)||void 0===l?void 0:l.email)||{});f(r),t&&I.Z.success(a("oauth.saveSuccess"))}catch(r){if(!t)throw r;I.Z.error(r.message||a("oauth.saveFailed"))}})),v=(0,De.Z)((async(e,n,t)=>{try{p.isDirty&&await b(e,n,!1),await i.sendEmail({input:{did:s,receiver:t,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),I.Z.success(a("notification.email.testSuccess"))}catch(o){I.Z.error(o.message||a("notification.email.testfailed"))}})),Z=(0,De.Z)(((e,n)=>{g.testReceiver="",g.testReceiverError="",l.open({title:a("notification.email.testSendEmail"),content:()=>(0,J.jsx)(u.Z,{sx:{width:"300px"},children:(0,J.jsx)(Oe.Z,{fullWidth:!0,name:"testReceiver",label:a("notification.email.inputTestReceiver"),value:g.testReceiver,onChange:e=>{g.testReceiver=e.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||"\u3000"})}),async onConfirm(t){var i;const o=null===(i=g.testReceiver)||void 0===i?void 0:i.trim();o?We()(o)?(g.testReceiverError="",await v(e,n,o),t()):g.testReceiverError=a("notification.email.receiverInvalid"):g.testReceiverError=a("notification.email.receiverRequired")}})})),j=(0,De.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!We()(n)||a("notification.email.fromInvalid"):a("notification.email.fromRequired")})),C=(0,De.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!Ge()(n,{require_host:!1,protocols:[]})||a("notification.email.hostInvalid"):a("notification.email.hostRequired")})),k=(0,De.Z)((e=>e?!!He()(e)||a("notification.email.portInvalid"):a("notification.email.portRequired"))),w=(0,De.Z)((e=>!(null===e||void 0===e||!e.trim())||a("notification.email.userRequired"))),S=(0,De.Z)((e=>!(null===e||void 0===e||!e.trim())||a("notification.email.passwordRequired"))),E=(0,De.Z)((()=>!0));return(0,J.jsxs)(u.Z,{children:[(0,J.jsxs)("form",{onSubmit:d(b),disabled:!0,children:[(0,J.jsx)(Ue.Qr,{name:"enabled",control:m,render:e=>{let{field:n}=e;return(0,J.jsx)(be.Z,{control:(0,J.jsx)(T.Z,{checked:n.value,...n}),label:a("notification.email.enable"),sx:{marginBottom:"8px"}})}}),(0,J.jsx)(Ue.Qr,{name:"from",control:m,rules:{validate:x?j:E},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,label:a("notification.email.from"),error:!!p.errors[t.name],helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,J.jsx)(Ue.Qr,{name:"host",control:m,rules:{validate:x?C:E},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,error:!!p.errors[t.name],label:a("notification.email.host"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,J.jsx)(Ue.Qr,{name:"port",control:m,rules:{validate:x?k:E},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,type:"number",error:!!p.errors[t.name],label:a("notification.email.port"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,J.jsx)(Ue.Qr,{name:"user",control:m,rules:{validate:x?w:E},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,error:!!p.errors[t.name],label:a("notification.email.user"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,J.jsx)(Ue.Qr,{name:"password",control:m,rules:{validate:x?S:E},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,type:"password",error:!!p.errors[t.name],label:a("notification.email.password"),helperText:(null===(n=p.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!x})})}}),(0,J.jsx)(Ue.Qr,{name:"secure",control:m,rules:{validate:E},render:e=>{let{field:n}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(be.Z,{control:(0,J.jsx)(T.Z,{checked:n.value,...n,disabled:!x}),label:a("notification.email.secure"),style:{marginBottom:16}})})}}),(0,J.jsx)(A.Z,{variant:"outlined",color:"warning",onClick:d(Z),sx:{mr:2},disabled:!x,children:a("oauth.runTest")}),(0,J.jsx)(A.Z,{type:"submit",variant:"contained",disabled:!p.isDirty,children:a("oauth.save")})]}),r]})},en=[{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:"More"}),value:"more"}];const nn=function(){const[e,n]=(0,o.useState)(en[0].value),{t:t}=(0,o.useContext)(y.RD),i=(0,Ne.Z)((()=>({email:(0,J.jsx)($e,{}),more:(0,J.jsx)(u.Z,{children:(0,J.jsx)(Ae.Z,{children:t("notification.comingSoon")})})})),[t]);return(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(C.Z,{tabs:en,current:e,onChange:n}),(0,J.jsx)(u.Z,{marginTop:"10px",children:i[e]})]})};var tn=t(75239),on=t(48342),an=t(94552),ln=t(24558),rn=t(74286),sn=t(76667),cn=t(70648),dn=t(44067),mn=t(7664),un=t(44123),pn=t(53906);const hn=[{value:m.WHO_CAN_ACCESS.ALL,icon:pn.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:m.WHO_CAN_ACCESS.INVITED,icon:un.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:m.WHO_CAN_ACCESS.OWNER,icon:mn.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}];var fn,gn;const xn="roles",bn=[...hn,{value:xn,icon:cn.Z,title:{zh:"\u6307\u5b9a\u901a\u884c\u8bc1\u53ef\u8bbf\u95ee",en:"Accessible to selected passports"},description:{zh:"\u53ea\u6709\u6307\u5b9a\u7684\u901a\u884c\u8bc1\u53ef\u4ee5\u8bbf\u95ee",en:"Only specified passports can access"}}],vn=(e,n)=>{if(e&&e.startsWith(m.WHO_CAN_ACCESS_PREFIX_ROLES)){const t=(0,k.getRolesFromAuthConfig)({whoCanAccess:e}),i=n.filter((e=>t.includes(e.name)));return{access:xn,roles:i}}return{access:e,roles:[]}},Zn=function(e,n){let{roles:t=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(e.configs||[]).find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO));if(i)return vn(i.value,t);if(n&&L()(n,"settings.whoCanAccess")&&L()(n,"settings.whoCanAccess")!==m.WHO_CAN_ACCESS.ALL)return vn(L()(n,"settings.whoCanAccess"),t);const o=(0,k.findServiceFromMeta)(e.meta,m.NODE_SERVICES.AUTH);return L()(o,"config.whoCanAccess")?vn(o.config.whoCanAccess,t):{access:m.WHO_CAN_ACCESS.ALL,roles:[]}};function jn(e){let{blocklet:n,ancestors:t,children:i}=e;const a=(0,G.Z)(),[l,r]=(0,o.useState)(""),{t:s,locale:c}=(0,y.PE)(),{api:d}=(0,ne.h6)(),{roles:p}=(0,je.DJ)(),[h,f]=(0,o.useState)(""),g=t[0]||n,{access:x,roles:b}=Zn(n,g,{roles:p}),[v,Z]=(0,o.useState)(x),[j,C]=(0,o.useState)(b),w=[...t.map((e=>e.meta.did)),n.meta.did],S={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:a.palette.text.secondary},E=t.concat(n).map((e=>(0,k.getDisplayName)(e,!0))).join(" / ");if((0,te.wS)(n.status))return null;if("unknown"===n.status&&(0,te.wS)(n.status))return null;const L=()=>{r(!1)},P=e=>{e.stopPropagation(),r(!0)},R=h||v===xn&&!j.length;return["function"===typeof i?i({open:P}):(0,J.jsx)(U.Z,{onClick:P,"data-cy":"action-config-component",children:(0,J.jsx)(sn.default,{})}),l&&(0,J.jsxs)(yn,{open:!0,fullWidth:!0,title:E,onClose:L,PaperProps:{style:{minHeight:"auto"}},actions:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A.Z,{onClick:L,color:"inherit","data-cy":"config-access-cancel",children:s("common.cancel")}),(0,J.jsxs)(A.Z,{onClick:async()=>{if(!h){f(!0);try{let e=v;e===xn&&(e="".concat(m.WHO_CAN_ACCESS_PREFIX_ROLES).concat(j.map((e=>e.name)).join(","))),await d.updateWhoCanAccess({input:{did:w,whoCanAccess:e}}),I.Z.success(s("blocklet.config.access.updatedTip")),L(),f(!1)}catch(e){f(!1),I.Z.error((0,te.Z)(e))}}},color:"primary",disabled:R,variant:"contained",autoFocus:!0,"data-cy":"config-access-confirm",children:[h&&(0,J.jsx)(B.Z,{size:16}),s("common.confirm")]})]}),children:[(0,J.jsx)(u.Z,{mt:4,mb:3,children:(0,J.jsx)(Oe.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:e=>{const{value:n}=e.target;Z(n)},"data-cy":"config-access-select",SelectProps:{renderValue:e=>{const n=bn.find((n=>n.value===e));return n?(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(n.icon,{style:S}),n.title[c]]}):null}},children:bn.map((e=>(0,J.jsxs)(Cn,{value:e.value,sx:{display:"block"},"data-cy":"config-access-opt-".concat(e.value),children:[(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,J.jsx)(e.icon,{style:S}),(0,J.jsx)(u.Z,{children:e.title[c]})]}),(0,J.jsx)(u.Z,{children:(0,J.jsx)(u.Z,{className:"tip",children:e.description[c]})})]})))})}),v===xn&&(0,J.jsx)(u.Z,{mt:4,mb:3,children:(0,J.jsx)(Oe.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:j.map((e=>e.name)),onChange:e=>{C(p.filter((n=>(e.target.value||[]).includes(n.name))))},SelectProps:{multiple:!0,renderValue:e=>(0,J.jsx)(u.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const n=p.find((n=>n.name===e));return(0,J.jsx)(q.Z,{label:n.title},n.text)}))})},children:p.map((e=>{let{name:n,title:t}=e;return(0,J.jsxs)(K.Z,{value:n,children:[(0,J.jsx)(ve.Z,{checked:j.some((e=>e.name===n))}),(0,J.jsx)(dn.Z,{primary:t})]},n)}))})})]})]}jn.propTypes={blocklet:r().object.isRequired,ancestors:r().array,children:r().any},jn.defaultProps={ancestors:[],children:null};const yn=(0,a.Z)(he.ZP)(fn||(fn=(0,i.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),Cn=(0,a.Z)(K.Z)(gn||(gn=(0,i.Z)(["\n .tip {\n font-size: 12px;\n color: ",";\n }\n"])),(e=>e.theme.palette.text.secondary));var kn;function wn(e){var n;let{blocklet:t,ancestors:i,depth:a}=e;const l=(0,G.Z)(),{t:r,locale:s}=(0,y.PE)(),{roles:c}=(0,je.DJ)(),[d,m]=(0,o.useState)(!0),{recommendedDomain:p}=(0,de.y0)(),h=i[0]||t,f="/".concat(i.map((e=>e.mountPoint||"/")).join("/"),"/").concat(t.mountPoint||"/").replace(/\/+/g,"/"),g=(0,te.vH)({blocklet:h,domain:{value:p},mountPoint:f,params:(0,te.f0)(h,s)}),x={fill:l.palette.text.secondary},b=a>0&&t.children.length>0,j=(0,J.jsx)(U.Z,{size:"small",children:d?(0,J.jsx)(Z.Z,{fontSize:"inherit"}):(0,J.jsx)(v.default,{fontSize:"inherit"})}),{access:C,roles:S}=Zn(t,h,{roles:c});let E;if("roles"!==C)E=hn.find((e=>e.value===C))||hn[2];else{const e=S.map((e=>e.title)).join("/");E={title:{zh:"\u53ea\u6709 ".concat(e," \u53ef\u4ee5\u8bbf\u95ee"),en:"Only ".concat(e," can access")}}}return[(a>0||"gateway"!==t.meta.group)&&(0,J.jsxs)(u.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,J.jsxs)(u.Z,{pl:Math.max(2*(a-1),0),width:{xs:300,md:400},display:"flex",alignItems:"center",style:{cursor:b?"pointer":"cursor"},onClick:()=>b&&m(!d),children:[b?j:(0,J.jsx)(u.Z,{width:28}),(0,J.jsx)(w.Z,{blocklet:t,ancestors:i}),(0,J.jsxs)(u.Z,{ml:"16px",children:[(0,J.jsx)(u.Z,{style:{color:"#222",fontSize:18},children:(0,k.getDisplayName)(t,!0)}),(0,J.jsx)(u.Z,{display:"flex",alignItems:"center",children:(0,J.jsx)(u.Z,{color:"text.secondary",children:E.title[s]})})]})]},t),(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(tn.Z,{title:r("common.visit"),children:(0,J.jsx)("a",{target:"_blank",href:g,rel:"noopener noreferrer",title:g,children:(0,J.jsx)(U.Z,{children:(0,J.jsx)(an.Z,{})})})}),(0,J.jsx)(jn,{blocklet:t,ancestors:i,children:e=>{let{open:n}=e;return(0,J.jsx)(tn.Z,{title:r("common.edit"),children:(0,J.jsx)(U.Z,{onClick:n,"data-cy":"btn-edit-".concat(t.meta.did),children:(0,J.jsx)(ln.Z,{style:x})})})}})]},"actions")]},"group-not-gateway-box"),(0,J.jsx)(rn.Z,{depth:a},"line"),null!==(n=t.children)&&void 0!==n&&n.length?(0,J.jsx)(on.Z,{in:d,children:t.children.map((e=>(0,J.jsx)(wn,{blocklet:e,ancestors:[...i,t],depth:a+1},"".concat(a+1,"-").concat(e.meta.did))))},"blocklet-collapse"):null]}function Sn(){const{t:e}=(0,y.PE)(),{blocklet:n}=(0,de.y0)(),t=[...n.children]||[];return"gateway"!==n.meta.group&&t.unshift(n),(0,J.jsx)(En,{component:"div",children:t&&t.length?[(0,J.jsx)(u.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},style:{maxWidth:1080},children:(0,J.jsx)(wn,{blocklet:n},"0-".concat(n.meta.did))},"top-blocklet-".concat(n.meta.did))]:(0,J.jsx)(u.Z,{mt:8,children:(0,J.jsx)(Ae.Z,{children:e("blocklet.component.noComponent")})})})}wn.propTypes={blocklet:r().object.isRequired,ancestors:r().array,depth:r().number},wn.defaultProps={ancestors:[],depth:0},Sn.propTypes={};const En=(0,a.Z)(u.Z)(kn||(kn=(0,i.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)));var Ln=t(56556),Pn=t(44784);const Rn=function(){var e,n,t;const{api:i}=(0,ne.h6)(),{blocklet:o}=(0,de.y0)(),{t:a}=(0,y.PE)(),l=null===o||void 0===o||null===(e=o.meta)||void 0===e?void 0:e.did,r=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{}),{handleSubmit:s,control:c,formState:d,watch:m,reset:p}=(0,Ue.cI)({defaultValues:Be()(r,["domain","clientId","enabled"])}),h=m("enabled"),f=(0,De.Z)((async e=>{try{var n,t;const{blocklet:o}=await i.configOAuth({input:{did:l,oauth:JSON.stringify({auth0:e})}}),r=Object.assign({enabled:!1,domain:"",clientId:""},(null===o||void 0===o||null===(n=o.settings)||void 0===n||null===(t=n.oauth)||void 0===t?void 0:t.auth0)||{});p(r),I.Z.success(a("oauth.saveSuccess"))}catch(o){I.Z.error(o.message||a("oauth.saveFailed"))}})),g=(0,De.Z)((e=>!(null===e||void 0===e||!e.trim())||a("oauth.auth0.domainDescribe"))),x=(0,De.Z)((e=>!(null===e||void 0===e||!e.trim())||a("oauth.auth0.clientIdDescribe"))),b=(0,De.Z)((()=>!0));return(0,J.jsx)(u.Z,{children:(0,J.jsxs)("form",{onSubmit:s(f),disabled:!0,children:[(0,J.jsx)(Ue.Qr,{name:"enabled",control:c,render:e=>{let{field:n}=e;return(0,J.jsx)(be.Z,{control:(0,J.jsx)(Pn.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:a("oauth.auth0.enable"),sx:{marginBottom:2,ml:1}})}}),(0,J.jsx)(Ue.Qr,{name:"domain",control:c,rules:{validate:h?g:b},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,label:a("oauth.auth0.domain"),error:!!d.errors[t.name],helperText:(null===(n=d.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h})})}}),(0,J.jsx)(Ue.Qr,{name:"clientId",control:c,rules:{validate:h?x:b},render:e=>{var n;let{field:t}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,children:(0,J.jsx)(Oe.Z,{...t,error:!!d.errors[t.name],label:a("oauth.auth0.clientId"),helperText:(null===(n=d.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!h})})}}),(0,J.jsx)(Ln.Z,{type:"submit",variant:"contained",onSubmit:s(f),disabled:!d.isDirty,children:a("oauth.save")})]})})};var Tn=t(77150),_n=t(24103);const An={ttl:604800};function Nn(e){const n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?86400*e.ttl:e.ttl/86400;return{...e,ttl:n}}function On(){var e,n;const{api:t}=(0,ne.h6)(),{blocklet:i}=(0,de.y0)(),o=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({},An,(null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{}),{handleSubmit:l,control:r,formState:s,reset:c}=(0,Ue.cI)({defaultValues:Be()(Nn(a),["ttl"])}),{t:d}=(0,y.PE)(),m=(0,De.Z)((async e=>{try{var n;const{blocklet:i}=await t.updateAppSessionConfig({input:{did:o,config:Nn(e,!0)}}),a=Object.assign({},An,Be()((null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{},["ttl"]));c(Nn(a)),I.Z.success(d("common.configSuccess"))}catch(i){I.Z.error(i.message)}}));return(0,J.jsx)(u.Z,{children:(0,J.jsxs)("form",{onSubmit:l(m),disabled:!0,children:[(0,J.jsx)(Ue.Qr,{name:"ttl",control:r,render:e=>{let{field:n}=e;return(0,J.jsx)(Ie.Z,{fullWidth:!0,sx:{mb:2},children:(0,J.jsxs)(_n.Z,{px:3,children:[(0,J.jsx)(u.Z,{mx:-3,my:.5,children:d("blocklet.config.session.ttl",{day:n.value})}),(0,J.jsx)(Tn.ZP,{...n,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto",style:{maxWidth:"360px"}})]})})}}),(0,J.jsx)(Ln.Z,{type:"submit",variant:"contained",onSubmit:l(m),disabled:!s.isDirty,children:d("oauth.save")})]})})}var In=t(82555),Fn=t(30333),Bn=t(75760),zn=t(97038),Dn=t(64886),Un=t(42080),Kn=t.n(Un),Wn=t(75506),qn=t.n(Wn),Gn=t(47685),Vn=t(13260),Hn=t(82434),Mn=t.n(Hn);const Yn=(0,o.forwardRef)(((e,n)=>{var t,i;const{t:a}=(0,o.useContext)(y.RD),{blocklet:l}=(0,de.y0)(),{api:r}=(0,ne.h6)(),s=(0,ze.Z)({mode:"view",show:!1,data:{},callback:Ye()}),c=(0,Gn.Fg)(),m=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,p=(0,De.Z)((()=>{s.mode="view",s.data={},s.callback=Ye()}),[]),h=(0,De.Z)((()=>{s.show=!1,setTimeout((()=>{p()}),m)}),[]),f=(0,De.Z)((e=>{s.mode="view",s.show=!0,s.data=e}),[]),g=(0,De.Z)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ye();s.mode="approve",s.show=!0,s.data=e,s.callback=n}),[]);(0,o.useImperativeHandle)(n,(()=>({open:f,close:h,approve:g})),[f,h,g]);const x=(0,Ne.Z)((()=>{if(!s.show)return[];s.data.migratedFrom=[s.data.appId,s.data.appPid];const e=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return!1!==s.data.isMaster&&Kn()(e,"appliedAt","status"),e.map((e=>{const n=a("federated.info.".concat(e));let t=s.data[e];if("appName"===e&&s.data.isMaster&&(t=(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(In.Z,{component:Fn.Z}),t]})),["appId","appPid","serverId"].includes(e)&&(t=(0,J.jsx)(Vn.kL,{children:t})),["appUrl"].includes(e)&&(t=(0,J.jsx)(u.Z,{component:"a",href:t,target:"_blank",children:t})),["appLogo"].includes(e)){const e=Mn()(t)?t:d()(s.data.appUrl||"",t||"");try{const n=new URL(e);n.searchParams.set("imageFilter","resize"),n.searchParams.set("w","80"),n.searchParams.set("h","80"),t=(0,J.jsx)("img",{src:n.href,width:"60",height:"60",alt:s.data.appName})}catch{t=(0,J.jsx)("img",{src:e,width:"60",height:"60",alt:s.data.appName})}}if("status"===e&&(t=t&&a("federated.status.".concat(t))),"migratedFrom"===e){t=(s.data.migratedFrom||[]).filter((e=>![s.data.appId,s.data.appPid].includes(e))).map((e=>(0,J.jsx)(Vn.kL,{children:e})))}return qn()(t)&&(t="-"),{name:n,value:t}}))}),[s.data]),b="approve"===s.mode,v=(0,De.Z)((async()=>{await r.auditFederatedLogin({input:{memberPid:s.data.appPid,did:l.appPid,status:"rejected"}}),h(),null===s||void 0===s||s.callback(!1)})),Z=(0,De.Z)((async()=>{await r.auditFederatedLogin({input:{memberPid:s.data.appPid,did:l.appPid,status:"approved"}}),h(),null===s||void 0===s||s.callback(!0)}));return(0,J.jsx)(he.ZP,{open:s.show,title:a(b?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:h,actions:b?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ln.Z,{color:"error",variant:"contained",onClick:v,children:a("common.reject")}),(0,J.jsx)(Ln.Z,{variant:"contained",onClick:Z,children:a("common.approve")})]}):(0,J.jsx)(Ln.Z,{variant:"outlined",onClick:h,children:a("common.close")}),children:x.map((e=>(0,J.jsx)(Dn.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:e.name,children:e.value},e.name)))})}));var Jn=t(79842),Qn=t(85408),Xn=t.n(Qn);const $n=(0,o.forwardRef)(((e,n)=>{var t,i;const a=(0,Gn.Fg)(),l=(null===a||void 0===a||null===(t=a.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,{t:r}=(0,o.useContext)(y.RD),s=(0,ze.Z)({show:!1,data:{link:""}}),c=(0,De.Z)((()=>{s.data.link=""}),[]),d=(0,De.Z)((()=>{s.show=!1,setTimeout((()=>{c()}),l)}),[]),m=(0,De.Z)((e=>{let{link:n}=e;s.show=!0,s.data.link=n}),[]);(0,o.useImperativeHandle)(n,(()=>({open:m,close:d})),[m,d]);const p=(0,De.Z)((()=>{Xn()(s.data.link),d()}),[d]);return(0,J.jsxs)(he.ZP,{open:s.show,title:r("federated.joinFederatedLogin"),onClose:d,PaperProps:{style:{minHeight:"unset"}},actions:(0,J.jsx)(A.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:r("common.copyAndClose")}),children:[(0,J.jsx)(u.Z,{mb:1,children:r("federated.inviteJoinFederatedLoginDescription")}),(0,J.jsx)(u.Z,{sx:{"& .copy-button":{display:"none !important"}},children:(0,J.jsx)(Jn.Z,{language:"shell",style:{marginBottom:0},children:s.data.link})})]})}));function et(e){var n,t,i,a,l;let{mode:r}=e;const s=(0,o.useRef)(null),c=(0,o.useRef)(null),{t:d,locale:m}=(0,o.useContext)(y.RD),{blocklet:p,actions:{refreshBlocklet:h}}=(0,de.y0)(),{confirmApi:f,confirmHolder:g}=Qe(),{api:x}=(0,ne.h6)(),b=(null===(n=p.settings.federated)||void 0===n?void 0:n.sites)||[],v=(null===(t=p.settings.federated)||void 0===t?void 0:t.config)||{},Z=!1!==v.isMaster,j=(0,De.Z)((e=>{var n;null===(n=c.current)||void 0===n||n.open(e)})),C=(0,De.Z)((e=>{var n;null===(n=c.current)||void 0===n||n.approve(e,h)})),k=(0,De.Z)((e=>{f.open({title:d("federated.disableFederatedLogin"),content:d("federated.disableFederatedLoginDescription"),async onConfirm(n){await x.auditFederatedLogin({input:{memberPid:e.appPid,did:p.appPid,status:"revoked"}}),n()}})})),w=(0,De.Z)((e=>{f.open({title:d("federated.enableFederatedLogin"),content:d("federated.enableFederatedLoginDescription"),async onConfirm(n){await x.auditFederatedLogin({input:{memberPid:e.appPid,did:p.appPid,status:"approved"}}),n()}})})),S=(0,Ne.Z)((()=>{const e=[{label:d("common.name"),name:"appName",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,J.jsx)(u.Z,{display:"inline-block",children:(0,J.jsxs)(u.Z,{component:"a",display:"flex",alignItems:"center",href:n.appUrl,target:"_blank",onClick:e=>{e.stopPropagation()},children:[t&&(0,J.jsx)(In.Z,{component:Fn.Z,style:{marginRight:"4px"}}),n.appName]})})}}},{label:d("common.did"),name:"appId",options:{customBodyRenderLite:e=>{const n=b[e];return(0,J.jsx)(zn.Z,{children:n.appId})}}},{label:d("common.status"),name:"status",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,J.jsx)(u.Z,{children:t?"-":d("federated.status.".concat(n.status))})}}}];return Z&&e.push({label:d("common.actions"),name:"actions",options:{customBodyRenderLite:e=>{const n=b[e],t=!1!==n.isMaster;return(0,J.jsx)(u.Z,{display:"flex",gap:1,children:t?(0,J.jsxs)(J.Fragment,{children:["rejected"===n.status&&(0,J.jsx)(A.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation()},children:d("federated.status.rejected")}),"revoked"===n.status&&(0,J.jsx)(A.Z,{variant:"contained",color:"secondary",size:"small",onClick:e=>{e.stopPropagation()},children:d("federated.status.revoked")})]}):(0,J.jsxs)(J.Fragment,{children:["pending"===n.status&&(0,J.jsx)(A.Z,{variant:"contained",color:"primary",size:"small",onClick:e=>{e.stopPropagation(),C(n)},children:d("federated.status.pending")}),"approved"===n.status&&(0,J.jsx)(A.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation(),k(n)},style:{whiteSpace:"nowrap"},children:d("federated.revoke")}),"revoked"===n.status&&(0,J.jsx)(A.Z,{variant:"contained",color:"warning",size:"small",onClick:e=>{e.stopPropagation(),w(n)},style:{whiteSpace:"nowrap"},children:d("federated.approve")})]})})}}}),e}),[v.appId,b,Z,d]),E=(0,Ne.Z)((()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(e,n){let{dataIndex:t}=n;const i=b[t];j(i)}})),[]),L=(0,De.Z)((()=>{const e=p.environments.find((e=>e.key===O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL));var n;null!==e&&void 0!==e&&e.value?null===(n=s.current)||void 0===n||n.open({link:e.value}):I.Z.error(d("federated.failedToGetFederatedLoginLink"))}),[null===(i=p.site)||void 0===i||null===(a=i.domainAliases)||void 0===a||null===(l=a[0])||void 0===l?void 0:l.href]),P=(0,De.Z)((()=>{f.open({title:d("federated.quitFederatedLogin"),content:d("federated.quitFederatedLoginDescription"),async onConfirm(e){await x.quitFederatedLogin({input:{did:p.appPid}}),e()}})})),R=(0,De.Z)((()=>{f.open({title:d("federated.disbandFederatedLogin"),content:d("federated.disbandFederatedLoginDescription"),async onConfirm(e){await x.disbandFederatedLogin({input:{did:p.appPid}}),e()}})})),T=[];return"master"!==r?T.push((0,J.jsx)(A.Z,{size:"small",variant:"contained",color:"error",onClick:P,sx:{ml:1},children:d("federated.quitFederatedLogin")},"quitFederatedLogin")):(T.push((0,J.jsx)(A.Z,{size:"small",variant:"contained",onClick:L,sx:{ml:1},children:d("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),T.push((0,J.jsx)(A.Z,{color:"error",size:"small",variant:"contained",onClick:R,sx:{ml:1},children:d("federated.disbandFederatedLogin")},"disbandFederatedLogin"))),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Bn.Z,{className:"main-table",locale:m,data:b,columns:S,customButtons:T,title:(0,J.jsx)(u.Z,{className:"table-toolbar-left",children:d("oauth.federated")}),options:E}),g,(0,J.jsx)($n,{ref:s}),(0,J.jsx)(Yn,{ref:c})]})}et.propTypes={mode:r().oneOf(["member","master"])},et.defaultProps={mode:"member"};const nt=et,tt=(0,o.forwardRef)(((e,n)=>{var t,i;const{t:a}=(0,o.useContext)(y.RD),{api:l}=(0,ne.h6)(),{blocklet:r}=(0,de.y0)(),s=null===r||void 0===r?void 0:r.appPid,c=(0,Gn.Fg)(),d=(null===c||void 0===c||null===(t=c.transitions)||void 0===t||null===(i=t.duration)||void 0===i?void 0:i.leavingScreen)||300,m=(0,ze.Z)({show:!1,appUrl:"",appUrlError:"",callback:Ye()}),p=(0,De.Z)((()=>{m.appUrl="",m.appUrlError="",m.callback=Ye()}),[]),h=(0,De.Z)((()=>{m.show=!1,setTimeout((()=>{p()}),d)}),[]),f=(0,De.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ye();m.show=!0,m.callback=e}),[]);(0,o.useImperativeHandle)(n,(()=>({open:f,close:h})),[f,h]);const g=(0,De.Z)((e=>{if(!e)throw new Error(a("federated.federatedJoinAppUrlRequired"));if(!Mn()(e))throw new Error(a("federated.federatedJoinAppUrlInvalid"))})),x=(0,De.Z)((async()=>{try{g(m.appUrl);const e=await l.joinFederatedLogin({input:{did:s,appUrl:m.appUrl}});m.show=!1,h(),null===m||void 0===m||m.callback(e)}catch(e){m.appUrlError=e.message}}),[h,s]);return(0,J.jsxs)(he.ZP,{open:m.show,title:a("federated.joinFederatedLogin"),onClose:h,PaperProps:{style:{minHeight:"unset"}},actions:(0,J.jsx)(A.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:x,children:a("common.confirm")}),children:[(0,J.jsx)(u.Z,{mb:1,children:a("federated.joinFederatedLoginDescription")}),(0,J.jsx)(Oe.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:a("federated.federatedJoinAppUrl"),label:a("federated.federatedJoinAppUrl"),value:m.appUrl,error:!!m.appUrlError,helperText:m.appUrlError||"eg: https://www.arcblock.io",onChange:e=>{m.appUrl=e.target.value}})]})}));function it(){var e,n,t,i;const a=(0,o.useRef)(null),l=(0,o.useRef)(null),{t:r}=(0,o.useContext)(y.RD),{blocklet:s,actions:{refreshBlocklet:c}}=(0,de.y0)(),d=(0,De.Z)((()=>{var e,n,t;const i=null===(e=s.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href;if(i)try{var o;const e=new URL(i);null===(o=a.current)||void 0===o||o.open({link:e.origin})}catch{I.Z.error(r("federated.failedToGetFederatedLoginLink"))}}),[null===(e=s.site)||void 0===e||null===(n=e.domainAliases)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.href]),m=(0,De.Z)((()=>{var e;null===(e=l.current)||void 0===e||e.open((()=>{c()}))}),[c]);if((null===(i=s.settings.federated)||void 0===i?void 0:i.sites.length)>0){var p;const e=!1!==(null===(p=s.settings.federated)||void 0===p?void 0:p.config.isMaster);return(0,J.jsx)(nt,{mode:e?"master":"member"})}return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(u.Z,{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px",children:[(0,J.jsx)(A.Z,{variant:"contained",onClick:d,children:r("federated.inviteJoinFederatedLogin")}),(0,J.jsx)(_.Z,{sx:{width:"150px",color:"rgba(0, 0, 0, 0.3)"},children:"OR"}),(0,J.jsx)(A.Z,{variant:"outlined",onClick:m,children:r("federated.joinFederatedLogin")})]}),(0,J.jsx)($n,{ref:a}),(0,J.jsx)(tt,{ref:l})]})}const ot=function(){const{t:e}=(0,o.useContext)(y.RD),n=[{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.commonSettings")}),value:"settings"},{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.federated")}),value:"federated"},{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:"Auth0"}),value:"auth0"},{label:(0,J.jsx)(u.Z,{textAlign:"center",width:"100%",children:e("oauth.moreLogin")}),value:"more"}],[t,i]=(0,o.useState)(n[0].value),a=(0,Ne.Z)((()=>({auth0:(0,J.jsx)(Rn,{}),federated:(0,J.jsx)(it,{}),more:(0,J.jsx)(u.Z,{children:(0,J.jsx)(Ae.Z,{children:e("oauth.comingSoon")})}),settings:(0,J.jsx)(u.Z,{children:(0,J.jsx)(On,{})})})),[e]);return(0,J.jsxs)(u.Z,{children:[(0,J.jsx)(C.Z,{tabs:n,current:t,onChange:i}),(0,J.jsx)(u.Z,{marginTop:"10px",children:a[t]})]})};var at;const lt=e=>{let{tabs:n,blocklet:t,ancestors:i=[],depth:o=1,t:a}=e;const l=[...i.map((e=>e.meta.did)),t.meta.did].join("/"),r=!(null!==i&&void 0!==i&&i.length);n.push({label:(0,J.jsxs)(u.Z,{pl:2*Math.max(1,o-1),display:"flex",alignItems:"center",justifyContent:"flex-start",children:[r?(0,J.jsx)(S.Z,{size:24,blocklet:t}):(0,J.jsx)(w.Z,{size:24,blocklet:t,ancestors:i}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:r?a("blocklet.component.container"):(0,k.getDisplayName)(t,!0)})})]},l),value:l}),t.children.length>0&&t.children.forEach((e=>{lt({tabs:n,blocklet:e,ancestors:[...i,t],depth:o+1,t:a})}))};function rt(e){let{blocklet:n,onUpdate:t,...i}=e;const{t:a}=(0,o.useContext)(y.RD),{info:l,inService:r}=(0,ne.h6)(),[c,k]=(0,o.useState)(!0),[w,S]=(0,j.useSearchParams)(),E=w.get("tab")||"general",L=[{label:(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-general",children:[(0,J.jsx)(h.Z,{sx:{fontSize:24}}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:a("common.general")})})]},"general"),value:"general"},{label:(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-access",children:[(0,J.jsx)(f.Z,{sx:{fontSize:24}}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:a("common.access")})})]},"access"),value:"access"},{label:(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-oauth",children:[(0,J.jsx)(g.Z,{sx:{fontSize:24}}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:a("common.login")})})]},"oauth"),value:"oauth"},{label:(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-notification",children:[(0,J.jsx)(x.Z,{sx:{fontSize:24}}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:a("common.notification")})})]},"notification"),value:"notification"},{label:(0,J.jsxs)(u.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-preference",children:[(0,J.jsx)(u.Z,{ml:-2,style:{transform:"translateY(2px)"},children:c?(0,J.jsx)(Z.Z,{fontSize:"inherit"}):(0,J.jsx)(v.default,{fontSize:"inherit"})}),(0,J.jsx)(b.Z,{sx:{fontSize:24}}),(0,J.jsx)(u.Z,{ml:"16px",children:(0,J.jsx)(u.Z,{style:{color:"#222"},children:a("common.preferences")})})]},"preference"),value:"preference"}];c&&lt({tabs:L,blocklet:n,t:a});let P=null;if("general"===E)P=(0,J.jsx)(Te,{blocklet:n,onUpdate:t});else if("access"===E)P=(0,J.jsx)(Sn,{});else if("oauth"===E)P=(0,J.jsx)(ot,{});else if("notification"===E)P=(0,J.jsx)(nn,{});else{const e=r?m.WELLKNOWN_SERVICE_PATH_PREFIX:l.routing.adminPath,n=new URLSearchParams;r||n.set("authKey","__sst"),n.set("schemaKey",d()(window.location.origin,e,"/api/preferences?id=".concat(encodeURIComponent(E)))),P=(0,J.jsx)(s.Z,{url:"".concat(d()(window.location.origin,e,"/hosted/form-collector/"),"?").concat(n.toString()),width:"100%",height:"100%",frameBorder:0,styles:{border:0}})}return(0,J.jsx)(st,{...i,children:(0,J.jsxs)(p.ZP,{container:!0,spacing:4,columns:24,children:[(0,J.jsx)(p.ZP,{item:!0,sm:7,md:5,children:(0,J.jsx)(C.Z,{tabs:L,current:E,orientation:"vertical",onChange:e=>{"preference"===e?k(!c):S((n=>("general"===e?n.delete("tab"):n.set("tab",e),n)))},sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),(0,J.jsx)(p.ZP,{item:!0,sm:17,md:19,children:(0,J.jsx)(u.Z,{style:{minHeight:"66vh",height:"100%",position:"relative",overflow:"hidden"},children:P})})]})})}rt.propTypes={blocklet:r().object.isRequired,onUpdate:r().func},rt.defaultProps={onUpdate:()=>{}};const st=a.Z.div(at||(at=(0,i.Z)(["\n .MuiTab-root {\n text-align: left;\n align-items: flex-start;\n font-weight: normal;\n }\n .Mui-selected {\n font-weight: bold;\n }\n"])))},78410:(e,n,t)=>{t.d(n,{Z:()=>u});var i=t(5057),o=t(86229),a=t(28726),l=t(44846),r=t(68420),s=t(14491),c=t(58238),d=t(70461),m=t(96266);function u(e){let{teamDid:n,size:t="small",...u}=e;const{t:p}=(0,r.PE)(),{api:h}=(0,c.h6)(),[f,g]=(0,i.useState)(!1),[x,b]=(0,i.useState)(null),v={title:p("blocklet.config.clearCache.title"),description:p("blocklet.config.clearCache.description"),confirm:p("common.confirm"),cancel:p("common.cancel"),onConfirm:async()=>{try{var e;g(!0);const t=await h.clearCache({input:{teamDid:n}});o.Z.success(p("blocklet.config.clearCache.success",{count:(null===(e=t.removed)||void 0===e?void 0:e.length)||0}))}catch(t){o.Z.error((0,s.Z)(t))}finally{g(!1),b(null)}},onCancel:()=>{g(!1),b(null)}};return(0,m.jsxs)("div",{...u,children:[(0,m.jsxs)(a.Z,{onClick:()=>b(v),color:"error",variant:"outlined",size:t,children:[f?(0,m.jsx)(l.Z,{size:16,style:{marginRight:5}}):null,p("blocklet.config.clearCache.action")]}),x&&(0,m.jsx)(d.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}},50185:(e,n,t)=>{t.d(n,{Z:()=>c});var i=t(5057),o=t(55898),a=t.n(o),l=t(12937),r=t(68420),s=t(96266);function c(e){let{children:n,...t}=e;const{t:o}=(0,i.useContext)(r.RD);return(0,s.jsx)(l.Z,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...t,children:n})}c.propTypes={children:a().any.isRequired}},28641:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),a=t.n(o),l=t(39948),r=t(47020),s=t(44846),c=t(13727),d=t(56184),m=t(67680),u=t(35406),p=t(11875),h=t(95890),f=t(96266);const g=(e,n,t)=>null===e&&n&&t?"******":e?n?"******":e:"";function x(e){let{label:n,disabled:t,required:o,initialValue:a,onChange:x,placeholder:b,style:v,onSubmit:Z,secure:j,triggers:y,formatterBeforeSubmit:C,...k}=e;const[w,S]=(0,i.useState)(!1),[E,L]=(0,i.useState)(!1),[P,R]=(0,i.useState)(j&&"__encrypted__"===a?null:a),[T,_]=(0,i.useState)(P),A=async()=>{L(!0);try{if(!1===await Z(T))_(P);else{let e=T;"function"===typeof C&&(e=C(T)),_(e),R(e)}}catch(e){_(P)}finally{L(!1),S(!1)}},N=w?(0,f.jsx)(r.Z,{style:{flex:1},fullWidth:!0,value:T,onChange:e=>{var n;n=e.target.value,_(n),x(n)},autoFocus:!0,size:"small",variant:"outlined",placeholder:b,onKeyDown:e=>{"Enter"===e.key&&A()},disabled:t,type:j?"password":"text",...k}):(0,f.jsx)(l.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:g(T,j,a)});return(0,f.jsx)(p.Z,{className:"form",style:v,children:(0,f.jsxs)(l.Z,{className:"form-item",children:[(0,f.jsxs)(l.Z,{className:"form-item-label",children:[n,o&&(0,f.jsx)(u.Z,{})]}),(0,f.jsxs)(l.Z,{className:"form-item-body",children:[(0,f.jsx)(l.Z,{className:"form-item-input",children:N}),(0,f.jsx)(l.Z,{className:"form-item-action",children:w?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(m.Z,{"data-cy":"schema-form-item-confirm",onClick:A,disabled:t||E,size:"large",children:E?(0,f.jsx)(s.Z,{size:24}):(0,f.jsx)(d.Z,{})}),(0,f.jsx)(m.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(P),S(!1)},disabled:t||E,size:"large",children:(0,f.jsx)(c.default,{})})]}):(0,f.jsx)(h.Z,{triggers:y,onEnterEdit:()=>S(!0),disabled:t})})]})]})})}x.propTypes={style:a().object,onSubmit:a().func,onChange:a().func,label:a().string,initialValue:a().string,placeholder:a().string,required:a().bool,disabled:a().bool,secure:a().bool,triggers:a().array,formatterBeforeSubmit:a().func},x.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},11875:(e,n,t)=>{t.d(n,{Z:()=>r});var i,o=t(71171),a=t(33518),l=t(39948);const r=(0,a.Z)(l.Z)(i||(i=(0,o.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")))},95890:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),a=t.n(o),l=t(24558),r=t(67680),s=t(56556),c=t(49127),d=t(49390),m=t(37200),u=t(25228),p=t(24202),h=t(74490),f=t(1733),g=t(96266);function x(e){let{triggers:n,onEnterEdit:t,disabled:o}=e;const a=i.useRef(null),[x,b]=i.useState(!1);return 0===n.length?(0,g.jsx)(r.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(l.Z,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(c.Z,{variant:"outlined",ref:a,"aria-label":"split button",children:[(0,g.jsx)(s.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(l.Z,{})}),(0,g.jsx)(s.Z,{size:"small","aria-controls":x?"split-button-menu":void 0,"aria-expanded":x?"true":void 0,onClick:()=>{b((e=>!e))},children:(0,g.jsx)(d.Z,{})})]}),(0,g.jsx)(p.Z,{sx:{zIndex:9999},open:x,anchorEl:a.current,role:void 0,placement:"bottom-end",children:(0,g.jsx)(u.Z,{children:(0,g.jsx)(m.d,{onClickAway:e=>{a.current&&a.current.contains(e.target)||b(!1)},children:(0,g.jsx)(f.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((e=>(0,g.jsx)(h.Z,{onClick:()=>{return n=e.handler,b(!1),void n();var n},children:e.title},e.key)))})})})})]})}x.propTypes={triggers:a().arrayOf(a().shape({key:a().string.isRequired,title:a().string.isRequired,handler:a().func.isRequired})),onEnterEdit:a().func.isRequired,disabled:a().bool.isRequired},x.defaultProps={triggers:[]}},35406:(e,n,t)=>{t.d(n,{Z:()=>a});var i,o=t(71171);const a=t(33518).Z.span(i||(i=(0,o.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(e=>e.theme.palette.error.main))},54063:(e,n,t)=>{t.d(n,{C:()=>i});const i="true"===localStorage.getItem("enableDebug")}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9277],{56742:(e,n,i)=>{const{toBuffer:t,toAddress:o}=i(49394),{base32:r}=i(46422);e.exports={encode:e=>{if(!e)return e;const n=t(o(e));return r.encode(n)}}},44543:(e,n,i)=>{const t=i(57156);e.exports=(e,n)=>t(e)===t(n)},92726:(e,n,i)=>{"use strict";i.d(n,{Z:()=>x});var t,o=i(71171),r=i(5057),a=i(55898),s=i.n(a),l=i(33518),d=i(67680),c=i(61533),m=i(74490),u=i(45267),p=i(46954),f=i(44067),h=i(96266);function x(e){let{actions:n,size:i,...t}=e;const[o,a]=(0,r.useState)(null),s=Boolean(o),l=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(null)};return(0,h.jsxs)(g,{...t,children:[(0,h.jsx)(d.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(e.currentTarget)},size:i,children:(0,h.jsx)(u.Z,{})}),(0,h.jsx)(c.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:o,keepMounted:!0,open:s,onClose:l,PaperProps:{},children:n.map(((e,n)=>{if("function"===typeof e)return e({close:l});const{icon:i,text:t,onClick:o,disabled:a=!1,...s}=e;return(0,r.createElement)(m.Z,{...s,disabled:a,dense:!0,onClick:async e=>{await o(e),l()},key:n,"data-cy":"actions-menu-".concat(n)},(0,h.jsx)(p.Z,{style:{minWidth:24,marginRight:8},children:i}),(0,h.jsx)(f.Z,{primary:t}))}))})]})}x.propTypes={actions:s().array,size:s().oneOf(["small","medium","large"])},x.defaultProps={actions:[],size:"small"};const g=l.Z.div(t||(t=(0,o.Z)([""])))},99277:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>Le});var t=i(71171),o=i(28726),r=i(33518),a=i(5057),s=i(17655),l=i(76720),d=i(64886),c=i(68420),m=i(19778),u=i(38242),p=i(11750),f=i(29054),h=i(58238),x=i(17450),g=i(14491),v=i(81010),j=i(4651),y=i(55898),b=i.n(y),Z=i(44919),k=i(76416),D=i(93938),P=i(39948),C=i(38763),T=i(75392),S=i(67680),R=i(11819),w=i(75239),A=i(96366),E=i(72904),I=i(56742),F=i(49714),q=i(18067),z=i(25710),N=i(44846),L=i(63406),_=i(74511),B=i(88574),O=i(86229),M=i(76811),W=i(70461),U=i(96266);const H=e=>["waiting","creating","renewaling"].includes(e);function K(e){var n,i;const{t:t}=(0,c.PE)(),[o,r]=(0,a.useState)(!1),{inService:s}=(0,h.h6)(),[l,d]=(0,a.useState)(null),{siteId:m,domain:u,onAdd:p,children:x,did:g}=e,[v,j]=(0,a.useState)(!1),{api:y,ws:{useSubscription:b}}=(0,h.h6)(),{mode:Z,actions:{refreshDomainStatus:k}}=(0,f.y0)(),D=(0,_.Z)((async()=>{const{cert:e}=await y.findCertificateByDomain({input:{domain:u,did:g}});return e})),P=(e,n)=>{e.domain===u&&(j(!1),r(!1),s&&"setup"!==Z&&("success"===n?O.Z.success(t("setup.domain.genCertSuccess",{domain:e.domain})):"error"===n&&O.Z.error(t("setup.domain.genCertFailed",{domain:e.domain,message:e.message}))))};if((0,a.useEffect)((()=>{var e;D.loading||j(H(null===(e=D.value)||void 0===e?void 0:e.status))}),[D.loading,null===(n=D.value)||void 0===n?void 0:n.status]),b(M.BlockletEvents.certError,(e=>P(e,"error"))),b(M.BlockletEvents.certIssued,(e=>{D.retry(),k(e.domain),P(e,"success")})),D.loading)return"";if("normal"===(null===(i=D.value)||void 0===i?void 0:i.status))return"";const C={title:t("router.cert.genLetsEncryptCert.title"),description:(0,U.jsxs)("div",{children:[(0,U.jsx)(B.Z,{type:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:async()=>{r(!0);try{await y.issueLetsEncryptCert({input:{siteId:m,domain:u,did:g,inBlockletSetup:"setup"===Z}}),p(),j(!0)}catch(e){console.error(e),j(!1)}finally{r(!1),d(null)}},onCancel:()=>{r(!1),d(null)}};return(0,U.jsxs)(U.Fragment,{children:[v?(0,U.jsx)(w.Z,{title:t("router.cert.issuing"),children:(0,U.jsx)(N.Z,{size:12})}):x({loading:o,open:e=>{e.stopPropagation(),d(C)}}),l&&(0,U.jsx)(W.Z,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function V(e){const{domain:n,domainStatus:i,...t}=e;return!(0,g.rM)(n)||null!==i&&void 0!==i&&i.isHttps?"":(0,U.jsx)(K,{domain:n,...t})}K.propTypes={domain:b().string.isRequired,did:b().string.isRequired,siteId:b().string.isRequired,onAdd:b().func,children:b().any},K.defaultProps={onAdd:()=>{},children:null},V.propTypes={domain:b().string.isRequired,domainStatus:b().shape({isHttps:b().bool}).isRequired,did:b().string.isRequired,onAdd:b().func,children:b().any},V.defaultProps={onAdd:()=>{},children:null};var Y=i(11593),G=i(74490),X=i(31853),J=i(51233),Q=i(49983),$=i(96538),ee=i(38898),ne=i(47020),ie=i(92706),te=i.n(ie),oe=i(11854),re=i.n(oe),ae=i(6352),se=i.n(ae),le=i(60344),de=i(12937);function ce(e){let{domain:n,resolvedTarget:i,...t}=e;const{t:o,locale:r}=(0,c.PE)();return(0,U.jsxs)(P.Z,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...t,children:[(0,U.jsxs)(P.Z,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&(0,U.jsx)(P.Z,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),(0,U.jsxs)(P.Z,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[(0,U.jsx)(me,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:r}),(0,U.jsx)(me,{label:o("router.domain.setup.recordValue"),value:i,locale:r})]})]})}function me(e){let{locale:n,label:i,value:t}=e;const o=(0,E.Z)((e=>e.breakpoints.down("md"))),r=(0,A.Z)();return(0,U.jsx)(d.Z,{name:i,nameWidth:120,children:(0,U.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[(0,U.jsx)(p.Z,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:t}),(0,U.jsx)(de.q,{content:t,locale:n,style:{marginLeft:"4px",color:r.palette.text.secondary}})]})})}function ue(e){let{siteId:n,teamDid:i,cnameDomain:t,defaultCustomDomain:r,onInputDomain:a,appId:s,appPk:l,onSuccess:d,disabled:m,autoFocus:u,inBlockletSetup:p,...f}=e;const{t:x,locale:v}=(0,c.PE)(),{api:j,info:y}=(0,h.h6)(),[b,Z]=(0,X.Z)({domain:r,error:null,type:null!==y&&void 0!==y&&y.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1});let k="";y.nftDomainUrl&&(k=se()(y.nftDomainUrl,"/api"));const D=async e=>{let{domain:t,nftDid:o,chainHost:r}=e;try{const e=(0,J.sf)(t);await j.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:e,nftDid:o,chainHost:r,teamDid:i,inBlockletSetup:p}}),await(0,g._v)(2e3),Z({confirmSetting:null,showNFTDomainAuth:!1}),d({domain:e,type:b.type,nftDid:o,chainHost:r})}finally{Z({openAuthNFTDomain:!1})}},C={inputDomain:{name:x("router.domainAlias.inputDomain"),component:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ne.Z,{label:x("router.domainAlias.add.domainDescription"),helperText:b.error||x("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:m,value:b.domain,onChange:e=>{var n;const i=re()(null===(n=e.target)||void 0===n?void 0:n.value);Z({domain:i});const t=(0,g.ub)(i,v);Z({domain:i,error:t}),a({domain:i,error:t})},autoFocus:u,onBlur:()=>{b.domain||Z({error:null})},size:"small",variant:"outlined",error:!!b.error}),(0,U.jsx)(ce,{domain:b.domain,resolvedTarget:t,style:{marginTop:"8px"}})]})}};null!==y&&void 0!==y&&y.nftDomainUrl&&(C.nftDomain={name:x("router.domainAlias.nftDomain"),component:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(P.Z,{sx:{maxWidth:"640px",color:"text.secondary",fontSize:"14px"},children:[(0,U.jsx)("div",{children:x("router.domainAlias.addDomainNFT.tips")}),(0,U.jsxs)("div",{children:[x("router.domainAlias.addDomainNFT.buyTip"),(0,U.jsxs)(ee.Z,{href:y.nftDomainUrl,sx:{fontSize:"14px",display:"inline-flex",alignItems:"center"},target:"_blank",children:[(0,U.jsx)("i",{children:x("router.domainAlias.addDomainNFT.buy")}),(0,U.jsx)($.Z,{fontSize:"small"})]})]})]}),(0,U.jsx)(o.Z,{sx:{marginTop:"8px"},disabled:m,onClick:()=>Z({showNFTDomainAuth:!0}),variant:"contained",children:x("router.domainAlias.addDomainNFT.showNFT")}),(0,U.jsx)(Q.Z,{open:b.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:k,checkFn:le.od.create({baseURL:k}).get,extraParams:{delegatee:s,delegateePk:l},onSuccess:D,onClose:()=>Z({showNFTDomainAuth:!1}),checkTimeout:3e5,showDownload:!1,messages:{title:x("router.domainAlias.addDomainNFT.connect.title"),scan:x("router.domainAlias.addDomainNFT.connect.scan"),confirm:x("router.domainAlias.addDomainNFT.connect.confirm"),success:x("router.domainAlias.addDomainNFT.connect.success")}})]})});const T=Object.keys(C);return T.sort((e=>"inputDomain"===e?1:-1)),(0,U.jsx)(P.Z,{...f,children:(0,U.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:T.map(((e,n)=>{var i,t;return(0,U.jsxs)(P.Z,{children:[T.length>1&&(0,U.jsx)(P.Z,{children:"".concat(x("optionsOrder.".concat(n+1)),": ").concat(null===(i=C[e])||void 0===i?void 0:i.name)}),(0,U.jsx)(P.Z,{sx:{marginTop:"8px"},children:null===(t=C[e])||void 0===t?void 0:t.component})]},e)}))})})}function pe(e){let{id:n,children:i,title:t,teamDid:o,systemDomains:r,appId:a,appPk:s}=e;const{t:l}=(0,c.PE)(),{api:d}=(0,h.h6)(),[m,u]=(0,X.Z)({loading:!1,confirmSetting:null}),p=r.find((e=>(0,F.isDidDomain)(e))),f={title:t||l("router.domainAlias.add.title"),description:function(e,i,t){return(0,U.jsx)(ue,{siteId:n,teamDid:o,cnameDomain:p,onSuccess:()=>u({confirmSetting:null}),onInputDomain:n=>{let{domain:o,error:r}=n;i({...e,domain:o,__disableConfirm:!!r}),t(r)},appId:a,appPk:s})},confirm:l("common.confirm"),cancel:l("common.cancel"),params:{domain:"",__disableConfirm:!0},onConfirm:async e=>{if(!m.loading){u({loading:!0});try{await d.addDomainAlias({input:{id:n,domainAlias:(0,J.sf)(e.domain),teamDid:o}}),await(0,g._v)(2e3),u({confirmSetting:null})}finally{u({loading:!1})}}},onCancel:()=>{u({loading:!1,confirmSetting:null})}},x=e=>{e.stopPropagation(),u({confirmSetting:f})};return(0,U.jsxs)(U.Fragment,{children:["function"===typeof i?i({loading:m.loading,open:x}):(0,U.jsxs)(G.Z,{onClick:x,className:"rule-action","data-cy":"action-add-domain-alias",children:[m.loading?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(Y.Z,{style:{fontSize:18,marginRight:5}}),l("router.domainAlias.add.title")]}),m.confirmSetting&&(0,U.jsx)(W.Z,{title:m.confirmSetting.title,description:m.confirmSetting.description,confirm:m.confirmSetting.confirm,cancel:m.confirmSetting.cancel,params:m.confirmSetting.params,onConfirm:m.confirmSetting.onConfirm,onCancel:m.confirmSetting.onCancel,color:"primary",loading:m.loading,maxWidth:"lg"})]})}ce.propTypes={domain:b().string,resolvedTarget:b().string.isRequired},ce.defaultProps={domain:""},me.propTypes={locale:b().string.isRequired,label:b().string.isRequired,value:b().string.isRequired},ue.propTypes={siteId:b().string.isRequired,teamDid:b().string.isRequired,cnameDomain:b().string.isRequired,defaultCustomDomain:b().string,onInputDomain:b().func,onSuccess:b().func,appId:b().string,appPk:b().string,disabled:b().bool,autoFocus:b().bool,inBlockletSetup:b().bool},ue.defaultProps={defaultCustomDomain:"",onInputDomain:te(),onSuccess:te(),appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1},pe.propTypes={id:b().string.isRequired,children:b().any,title:b().string,teamDid:b().string,systemDomains:b().arrayOf(b().string).isRequired,appId:b().string,appPk:b().string.isRequired},pe.defaultProps={children:null,title:"",teamDid:"",appId:null};var fe=i(46954),he=i(44067),xe=i(27773),ge=i(92726);function ve(e){const{t:n}=(0,c.PE)(),[i,t]=(0,a.useState)(!1),[r,s]=(0,a.useState)(null),{id:l,domain:d,children:m,teamDid:u}=e,{api:p}=(0,h.h6)(),f={title:n("router.domainAlias.delete.title"),description:n("router.domainAlias.delete.description"),confirm:n("common.confirm"),onConfirm:async()=>{t(!0);try{await p.deleteDomainAlias({input:{id:l,domainAlias:d,teamDid:u}}),await(0,g._v)(2e3)}catch(e){O.Z.error(e.message)}finally{s(null),t(!1)}},onCancel:()=>{t(!1),s(null)}},x=e=>{e.stopPropagation(),s(f)};return(0,U.jsxs)(U.Fragment,{children:["function"===typeof m?m({loading:i,open:x}):(0,U.jsxs)(o.Z,{edge:"end",onClick:x,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(xe.default,{style:{fontSize:16}}),n("router.domainAlias.delete.title")]}),r&&(0,U.jsx)(W.Z,{title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}function je(e){let{site:n,domain:i,blocklet:t}=e;const{t:o}=(0,c.PE)(),r=i.value===window.location.hostname;return(0,U.jsx)(ge.Z,{"data-cy":"domain-actions",size:"large",actions:[e=>{var a;let{close:s}=e;return(0,U.jsx)(ve,{id:n.id,domain:i.value,teamDid:null===t||void 0===t||null===(a=t.meta)||void 0===a?void 0:a.did,children:e=>{let{open:n}=e;return(0,U.jsx)(w.Z,{title:r?o("blocklet.router.currentDomainTip"):"",children:(0,U.jsx)("span",{children:(0,U.jsxs)(G.Z,{disabled:i.isProtected||r,dense:!0,onClick:e=>{s(),n(e)},"data-cy":"action-toggle-block",children:[(0,U.jsx)(fe.Z,{style:{minWidth:24,marginRight:8},children:(0,U.jsx)(xe.default,{})}),(0,U.jsx)(he.Z,{primary:o("common.delete")})]},"remove")})})}})}]})}ve.propTypes={id:b().string.isRequired,domain:b().string.isRequired,children:b().any,teamDid:b().string},ve.defaultProps={children:null,teamDid:""},je.propTypes={site:b().object.isRequired,domain:b().object.isRequired,blocklet:b().object.isRequired},je.defaultProps={};var ye=i(31942),be=i(69569);const Ze=b().shape({href:b().string,accessibility:b().shape({loading:b().bool,accessible:b().bool}),domainStatus:b().shape({isHttps:b().bool,matchedCert:b().object}),dns:b().shape({resolved:b().bool,ip:b().string})});var ke,De=i(43681),Pe=i.n(De);function Ce(e){let{certificate:n}=e;const[i,t]=(0,a.useState)(null),o=(0,h.h6)(),{t:r,locale:s}=(0,c.PE)(),l=()=>{t(null)},d=Boolean(i);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ye.Z,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:e=>{t(e.currentTarget)},onMouseLeave:l,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),(0,U.jsx)(R.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:(0,U.jsx)(C.Z,{children:(0,U.jsxs)(T.Z,{style:{display:"flex"},children:[(0,U.jsx)("div",{children:(0,U.jsx)("img",{src:"".concat(o.imgPrefix,"/https-certificate-icon.png"),alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),(0,U.jsxs)(p.Z,{component:"div",style:{marginLeft:"16px"},children:[(0,U.jsx)(p.Z,{component:"div",style:{fontWeight:"bold"},children:n.domain}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("common.issuer"),": ").concat(Pe()(n,"issuer.commonName",""))}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.issuedOn"),": ").concat((0,g.pz)(n.validFrom,s))}),(0,U.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.expiryOn"),": ").concat((0,g.pz)(n.validTo,s))})]})]})})})]})}function Te(e){let{domain:n,filters:i}=e;const{t:t}=(0,c.PE)(),{value:o,domainStatus:r}=n;if(!(0,g.rM)(o))return null;let s=null,l=null;const{isHttps:d,matchedCert:m}=r;if(!(0,g.ao)(o)){const{dns:{resolved:e,ip:n}={}}=r;s=e||"127.0.0.1"===n?(0,U.jsx)(w.Z,{title:t("router.domain.verify.ok"),children:(0,U.jsx)(be.Z,{color:"success"})}):(0,U.jsx)(w.Z,{title:t("router.domain.verify.notResolved"),children:(0,U.jsx)(be.Z,{color:"error"})})}l=d?(0,U.jsx)(Ce,{certificate:m}):(0,U.jsx)(w.Z,{title:t("router.domain.https.bad"),children:(0,U.jsx)(ye.Z,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const u=i.map((e=>"domain"===e?s:"http"===e?l:null));return(0,a.createElement)(a.Fragment,null,...u)}Ce.propTypes={certificate:b().object},Ce.defaultProps={certificate:{}},Te.propTypes={domain:Ze.isRequired,filters:b().array},Te.defaultProps={filters:["domain","http"]};const Se=(0,L.V)(Ae,"mutate_blocklets"),Re=(0,L.V)(Ae,"",g.Wf);function we(e){const{inService:n}=(0,h.h6)(),{blocklet:i,loadingRuntimeInfo:t}=(0,f.y0)();let o=Se;return n&&(o=Re),(0,U.jsx)(o,{...e,blocklet:i,inService:n,loadingRuntimeInfo:t})}function Ae(e){var n,i,t,r;let{hasPermission:d,blocklet:m,loadingRuntimeInfo:p,inService:f,listOnly:h}=e;const{t:x}=(0,c.PE)(),[v,y]=(0,a.useState)(!1),b=(0,E.Z)((e=>e.breakpoints.down("md"))),k=(0,a.useMemo)((()=>{let e=d;return(0,j.ep)(m)&&(e=e&&f),e}),[d,f,m]),{site:C}=m,T=(0,a.useMemo)((()=>{var e;return(0,g.oE)(null===(e=m.site)||void 0===e?void 0:e.domainAliases)}),[null===(n=m.site)||void 0===n?void 0:n.domainAliases]),S=[],R=[],w=(0,I.encode)(m.appPid),A=null===(i=m.environments)||void 0===i||null===(t=i.find((e=>"BLOCKLET_APP_PK"===e.key)))||void 0===t?void 0:t.value,q=(0,g.M6)(T);return T.forEach((e=>{const n=e.value||"";(0,F.isDidDomain)(n)&&!n.startsWith(w)?R.push(e):S.push(e)})),(0,U.jsxs)(U.Fragment,{children:[!h&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(P.Z,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,U.jsx)(P.Z,{children:x("common.domain")}),k&&(0,U.jsx)(pe,{id:C.id,title:x("router.domain.add.title"),teamDid:null===(r=m.meta)||void 0===r?void 0:r.did,appId:m.appPid,appPk:A,systemDomains:null===q||void 0===q?void 0:q.map((e=>e.value)),children:e=>{let{open:n}=e;return(0,U.jsxs)(o.Z,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:n,disabled:(0,u.isInProgress)(m.status),children:[(0,U.jsx)(Z.Z,{style:{fontSize:"1.3em",marginRight:4}}),x("common.add")]})}})]}),!1===(0,u.isAccessible)(m.status)&&(0,U.jsx)(P.Z,{mt:1.5,mb:1.5,children:(0,U.jsx)(D.Z,{severity:"warning",children:x("blocklet.router.noRunning")})})]}),(0,U.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:(v?T:S).map((e=>{var n,i;const t=e.value;return(0,U.jsxs)(a.Fragment,{children:[b&&(0,U.jsxs)(P.Z,{display:"flex",flexDirection:"column",children:[(0,U.jsx)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:(0,U.jsx)(Ee,{domain:e,target:"_blank",children:e.value})}),(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[(0,U.jsx)(Te,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,U.jsx)(qe,{siteId:null===(n=m.site)||void 0===n?void 0:n.id,domain:e,blocklet:m,hasMutatePermission:k})]}),(0,U.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,U.jsx)(Fe,{hasMutatePermission:k,site:C,domain:e,blocklet:m})})]})]},t),!b&&(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[(0,U.jsx)(Te,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,U.jsx)(P.Z,{sx:{ml:2,mr:.5},children:(0,U.jsx)(Ee,{domain:e,target:"_blank",children:e.value})}),(0,U.jsx)(qe,{siteId:null===(i=m.site)||void 0===i?void 0:i.id,domain:e,blocklet:m,hasMutatePermission:k})]}),(0,U.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,U.jsx)(Fe,{hasMutatePermission:k,site:C,domain:e,blocklet:m})})]},t)]},t)}))}),R.length>0&&(0,U.jsx)("div",{style:{marginLeft:"20px",marginTop:"12px"},children:(0,U.jsx)(o.Z,{endIcon:v?(0,U.jsx)(s.Z,{}):(0,U.jsx)(l.Z,{}),onClick:()=>y(!v),children:x(v?"common.collapseAll":"blocklet.router.showAllDomains")})}),!T.length&&(p?(0,U.jsx)(N.Z,{size:16}):(0,U.jsx)(z.Z,{children:x("common.empty")}))]})}function Ee(e){let{domain:n,children:i,...t}=e;const{t:o}=(0,c.PE)(),{href:r,accessibility:a}=n;return!a||a.loading?(0,U.jsxs)(Ie,{...t,children:[i,(0,U.jsx)(w.Z,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:(0,U.jsx)("span",{className:"status",children:(0,U.jsx)(N.Z,{size:12})})})]}):a.accessible?(0,U.jsx)(Ie,{...t,children:(0,U.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:i})}):(0,U.jsx)(Ie,{...t,children:(0,U.jsx)(w.Z,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:(0,U.jsx)("span",{children:i})})})}we.propTypes={listOnly:b().bool},we.defaultProps={listOnly:!1},Ae.propTypes={hasPermission:b().bool,blocklet:b().object.isRequired,loadingRuntimeInfo:b().bool,inService:b().bool.isRequired,listOnly:b().bool},Ae.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1},Ee.propTypes={domain:Ze.isRequired,children:b().any.isRequired};const Ie=r.Z.span(ke||(ke=(0,t.Z)(["\n &,\n & > * {\n color: #222;\n font-size: 18px;\n word-break: break-all;\n }\n\n .status {\n margin-left: 8px;\n }\n"])));function Fe(e){let{hasMutatePermission:n,site:i,domain:t,blocklet:o}=e;const r=(0,A.Z)(),{t:a}=(0,c.PE)();return n&&!t.isProtected?(0,U.jsx)(je,{site:i,domain:t,blocklet:o}):(0,U.jsx)(w.Z,{title:a("blocklet.router.domainLockTooltip"),placement:"top",children:(0,U.jsx)(S.Z,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:(0,U.jsx)(q.Z,{style:{fill:r.palette.text.disabled}})})})}function qe(e){let{siteId:n,domain:i,blocklet:t,hasMutatePermission:r}=e;const s=(0,A.Z)(),{t:l}=(0,c.PE)(),[d,m]=(0,a.useState)(null),u=()=>{m(null)};return(0,U.jsxs)(P.Z,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:["nft-domain"===i.type&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(k.Z,{onMouseEnter:e=>{m(e.currentTarget)},onMouseLeave:u,style:{cursor:"pointer",fill:s.palette.primary.main}}),(0,U.jsx)(R.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:Boolean(d),anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:u,disableRestoreFocus:!0,children:(0,U.jsx)(C.Z,{children:(0,U.jsxs)(T.Z,{style:{display:"flex",flexDirection:"column"},children:[(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex",alignItems:"center"},children:[(0,U.jsx)(k.Z,{style:{fill:s.palette.primary.main}}),(0,U.jsx)(p.Z,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex",marginTop:"12px"},children:[(0,U.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),(0,U.jsx)(p.Z,{component:"span",children:i.value})]}),(0,U.jsxs)(p.Z,{component:"div",style:{display:"flex"},children:[(0,U.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),(0,U.jsx)(x.Z,{did:i.nftDid})]})]})})})]}),(0,U.jsx)(Te,{domain:i,filters:["http"]},"".concat(i.value,"-http")),r&&(0,U.jsx)(V,{siteId:n,domain:i.value,domainStatus:i.domainStatus,did:t.meta.did,children:e=>{let{open:n}=e;return(0,U.jsx)(o.Z,{sx:{padding:0},size:"small",onClick:e=>n(e),children:l("router.cert.genLetsEncryptCert.title")})}})]})}var ze;Fe.propTypes={hasMutatePermission:b().bool.isRequired,site:b().object.isRequired,domain:Ze.isRequired,blocklet:b().object.isRequired},qe.propTypes={siteId:b().string.isRequired,domain:Ze.isRequired,blocklet:b().object.isRequired,hasMutatePermission:b().bool.isRequired};const Ne={arcblock:"ArcBlock",ethereum:"Ethereum"};function Le(){var e,n,i,t,r;const{t:p,locale:y}=(0,c.PE)(),{info:b,inService:Z}=(0,h.h6)(),[k,D]=(0,a.useState)(!1),{blocklet:P}=(0,f.y0)(),{appDid:C,appPid:T,migratedFrom:S=[]}=P,R=null===(e=P.environments.find((e=>"BLOCKLET_APP_CHAIN_TYPE"===e.key)))||void 0===e?void 0:e.value,w=[C?{name:p("blocklet.appId"),value:(0,U.jsx)(x.Z,{did:C})}:null,T?{name:p("blocklet.appPid"),value:(0,U.jsx)(x.Z,{did:T})}:null,(null===S||void 0===S?void 0:S.length)>1?{name:p("blocklet.alsoKnownAs"),value:(0,U.jsxs)("div",{children:[(k?S.slice(1):S.slice(1,2)).map((e=>(0,U.jsx)(x.Z,{did:e.appDid}))),S.length>2&&(0,U.jsx)(o.Z,{style:{marginLeft:"18px"},endIcon:k?(0,U.jsx)(s.Z,{}):(0,U.jsx)(l.Z,{}),onClick:()=>D(!k),children:p(k?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:p("common.name"),value:(0,u.getDisplayName)(P,!0)},{name:p("common.status"),value:(0,U.jsx)(v.Z,{status:P.status,source:P.source})},(0,j.ep)(P)?{name:"NFT",value:(0,U.jsx)(x.Z,{external:!0,href:(0,g.E8)(null===P||void 0===P||null===(n=P.controller)||void 0===n?void 0:n.chainHost,null===P||void 0===P||null===(i=P.controller)||void 0===i?void 0:i.nftId,"asset"),did:null===P||void 0===P||null===(t=P.controller)||void 0===t?void 0:t.nftId})}:null,{name:p("blocklet.installedAt"),value:(0,g.B2)(P.installedAt,y)},{name:p("blocklet.overview.accessControl"),value:p("team.whoCanAccess.".concat((0,u.getWhoCanAccess)(P),".title"))},{name:p("common.owner"),value:null!==(r=P.settings)&&void 0!==r&&r.owner?(0,U.jsx)(x.Z,{did:P.settings.owner.did}):"--"},{name:p("blocklet.config.walletType.name"),value:Ne[R||"arcblock"]||R},P.externalSkSource?{name:p("blocklet.skSource"),value:P.externalSkSource}:null].filter(Boolean);Z&&w.push({name:p("common.serverDid"),value:(0,U.jsx)(x.Z,{did:b.did})},{name:p("common.serverVersion"),value:(0,U.jsx)(m.Z,{children:b.version})});return(0,U.jsxs)(_e,{component:"div",children:[(0,U.jsx)(we,{}),(0,U.jsx)("div",{className:"title",children:(0,U.jsx)("span",{children:p("common.basicInfo")})}),(0,U.jsx)("div",{className:"basicInfo",children:(A=w,A.map((e=>(0,U.jsx)(d.Z,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>e.name,children:e.value},e.name))))})]});var A}Le.propTypes={};const _e=(0,r.Z)(p.Z)(ze||(ze=(0,t.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)))},51233:(e,n,i)=>{"use strict";i.d(n,{Rw:()=>c,fX:()=>d,sf:()=>m});var t=i(35432),o=i(44543),r=i.n(o),a=i(76811),s=i(32828);const l=(e,n)=>{if(e.type===t.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===t.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},d=(e,n)=>{const i=l(e,n);return i||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},c=e=>{let{params:n,blocklets:i,blocklet:t,locale:o="en"}=e;if(t){let e=(t.children||[]).find((e=>(0,s.default)(e.meta)&&r()(e.mountPoint,n.pathPrefix)));if("gateway"!==t.meta.group&&"/"===n.pathPrefix&&(e="/"),e)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[o]}const l=i.find((e=>e.meta.did===n.did));if(!l)return"";const d=l.meta.interfaces.find((e=>"web"===e.type));return d&&d.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==d.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(d.prefix),en:"This blocklet can only be mounted on ".concat(d.prefix)}[o]:""},m=e=>{if(!e||"string"!==typeof e)return e;let n=e.trim();try{return n=n.toLowerCase(),n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(i){return console.error("format domain failed",i),n}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[95],{69902:(e,t,a)=>{var o=a(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(a(56930)),l=a(96266),r=(0,s.default)((0,l.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList");t.default=r},33225:(e,t,a)=>{var o=a(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(a(56930)),l=a(96266),r=(0,s.default)((0,l.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove");t.default=r},57201:(e,t,a)=>{var o=a(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(a(56930)),l=a(96266),r=(0,s.default)((0,l.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=r},30770:(e,t,a)=>{var o=a(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(a(56930)),l=a(96266),r=(0,s.default)((0,l.jsx)("path",{d:"M14.67 5v14H9.33V5h5.34zm1 14H21V5h-5.33v14zm-7.34 0V5H3v14h5.33z"}),"ViewColumn");t.default=r},66816:(e,t,a)=>{a.r(t),a.d(t,{buttonClasses:()=>s.Z,default:()=>o.Z,getButtonUtilityClass:()=>s.F});var o=a(56556),s=a(11986)},77328:(e,t,a)=>{a.r(t),a.d(t,{checkboxClasses:()=>s.Z,default:()=>o.Z,getCheckboxUtilityClass:()=>s.y});var o=a(88092),s=a(88971)},13167:(e,t,a)=>{a.r(t),a.d(t,{chipClasses:()=>s.Z,default:()=>o.Z,getChipUtilityClass:()=>s.z});var o=a(19654),s=a(50465)},11302:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,formControlClasses:()=>l.Z,getFormControlUtilityClasses:()=>l.e,useFormControl:()=>s.Z});var o=a(80576),s=a(38038),l=a(89701)},12588:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,formControlLabelClasses:()=>s.Z,getFormControlLabelUtilityClasses:()=>s.r});var o=a(26174),s=a(34674)},90762:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,formGroupClasses:()=>s.Z,getFormGroupUtilityClass:()=>s.y});var o=a(25506),s=a(81937)},33321:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getIconButtonUtilityClass:()=>s.r,iconButtonClasses:()=>s.Z});var o=a(67680),s=a(25532)},41183:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getInputLabelUtilityClasses:()=>s.Y,inputLabelClasses:()=>s.Z});var o=a(6041),s=a(12823)},3909:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getListItemTextUtilityClass:()=>s.L,listItemTextClasses:()=>s.Z});var o=a(44067),s=a(15293)},51280:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getMenuItemUtilityClass:()=>s.K,menuItemClasses:()=>s.Z});var o=a(74490),s=a(11521)},66942:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getPaperUtilityClass:()=>s.J,paperClasses:()=>s.Z});var o=a(25228),s=a(56836)},90211:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getSelectUtilityClasses:()=>s.o,selectClasses:()=>s.Z});var o=a(51177),s=a(10688)},34126:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTableUtilityClass:()=>s.K,tableClasses:()=>s.Z});var o=a(82266),s=a(94158)},6729:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTableBodyUtilityClass:()=>s.j,tableBodyClasses:()=>s.Z});var o=a(30067),s=a(65378)},77105:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTableCellUtilityClass:()=>s.U,tableCellClasses:()=>s.Z});var o=a(28627),s=a(80799)},32200:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C,getTableFooterUtilityClass:()=>Z,tableFooterClasses:()=>v});var o=a(7896),s=a(31461),l=a(5057),r=a(9978),n=a(91213),i=a(27864),c=a(42908),d=a(62773),u=a(31821),p=a(18561);function Z(e){return(0,p.Z)("MuiTableFooter",e)}const v=(0,u.Z)("MuiTableFooter",["root"]);var b=a(96266);const g=["className","component"],m=(0,d.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),h={variant:"footer"},f="tfoot",C=l.forwardRef((function(e,t){const a=(0,c.Z)({props:e,name:"MuiTableFooter"}),{className:l,component:d=f}=a,u=(0,s.Z)(a,g),p=(0,o.Z)({},a,{component:d}),v=(e=>{const{classes:t}=e;return(0,n.Z)({root:["root"]},Z,t)})(p);return(0,b.jsx)(i.Z.Provider,{value:h,children:(0,b.jsx)(m,(0,o.Z)({as:d,className:(0,r.Z)(v.root,l),ref:t,role:d===f?null:"rowgroup",ownerState:p},u))})}))},88064:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C,getTableHeadUtilityClass:()=>Z,tableHeadClasses:()=>v});var o=a(7896),s=a(31461),l=a(5057),r=a(9978),n=a(91213),i=a(27864),c=a(42908),d=a(62773),u=a(31821),p=a(18561);function Z(e){return(0,p.Z)("MuiTableHead",e)}const v=(0,u.Z)("MuiTableHead",["root"]);var b=a(96266);const g=["className","component"],m=(0,d.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),h={variant:"head"},f="thead",C=l.forwardRef((function(e,t){const a=(0,c.Z)({props:e,name:"MuiTableHead"}),{className:l,component:d=f}=a,u=(0,s.Z)(a,g),p=(0,o.Z)({},a,{component:d}),v=(e=>{const{classes:t}=e;return(0,n.Z)({root:["root"]},Z,t)})(p);return(0,b.jsx)(i.Z.Provider,{value:h,children:(0,b.jsx)(m,(0,o.Z)({as:d,className:(0,r.Z)(v.root,l),ref:t,role:d===f?null:"rowgroup",ownerState:p},u))})}))},9246:(e,t,a)=>{a.r(t),a.d(t,{default:()=>X,getTablePaginationUtilityClass:()=>N,tablePaginationClasses:()=>z});var o,s,l,r,n,i,c,d,u=a(31461),p=a(7896),Z=a(5057),v=a(9978),b=a(91213),g=a(17517),m=a(62773),h=a(42908),f=a(20624),C=a(74490),P=a(51177),x=a(28627),y=a(95301),w=a(4601),R=a(50999),I=a(96366),M=a(67680),L=a(54665),j=a(96646),S=a(96266);const T=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slotProps"],B=Z.forwardRef((function(e,t){var a,Z,v,b;const{backIconButtonProps:g,count:m,disabled:h=!1,getItemAriaLabel:f,nextIconButtonProps:C,onPageChange:P,page:x,rowsPerPage:y,showFirstButton:B,showLastButton:U,slotProps:k}=e,F=(0,u.Z)(e,T),N=(0,I.Z)();return(0,S.jsxs)("div",(0,p.Z)({ref:t},F,{children:[B&&(0,S.jsx)(M.Z,(0,p.Z)({onClick:e=>{P(e,0)},disabled:h||0===x,"aria-label":f("first",x),title:f("first",x)},null!=(a=null==k?void 0:k.firstButton)?a:{},{children:"rtl"===N.direction?o||(o=(0,S.jsx)(L.Z,{})):s||(s=(0,S.jsx)(j.Z,{}))})),(0,S.jsx)(M.Z,(0,p.Z)({onClick:e=>{P(e,x-1)},disabled:h||0===x,color:"inherit","aria-label":f("previous",x),title:f("previous",x)},null!=(Z=null==k?void 0:k.previousButton)?Z:g,{children:"rtl"===N.direction?l||(l=(0,S.jsx)(R.Z,{})):r||(r=(0,S.jsx)(w.Z,{}))})),(0,S.jsx)(M.Z,(0,p.Z)({onClick:e=>{P(e,x+1)},disabled:h||-1!==m&&x>=Math.ceil(m/y)-1,color:"inherit","aria-label":f("next",x),title:f("next",x)},null!=(v=null==k?void 0:k.nextButton)?v:C,{children:"rtl"===N.direction?n||(n=(0,S.jsx)(w.Z,{})):i||(i=(0,S.jsx)(R.Z,{}))})),U&&(0,S.jsx)(M.Z,(0,p.Z)({onClick:e=>{P(e,Math.max(0,Math.ceil(m/y)-1))},disabled:h||x>=Math.ceil(m/y)-1,"aria-label":f("last",x),title:f("last",x)},null!=(b=null==k?void 0:k.lastButton)?b:{},{children:"rtl"===N.direction?c||(c=(0,S.jsx)(j.Z,{})):d||(d=(0,S.jsx)(L.Z,{}))}))]}))}));var U=a(80538),k=a(31821),F=a(18561);function N(e){return(0,F.Z)("MuiTablePagination",e)}const z=(0,k.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var H;const _=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps"],A=(0,m.ZP)(x.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),D=(0,m.ZP)(y.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,p.Z)({["& .".concat(z.actions)]:t.actions},t.toolbar)})((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,["".concat(t.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(z.actions)]:{flexShrink:0,marginLeft:20}}})),O=(0,m.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),V=(0,m.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((e=>{let{theme:t}=e;return(0,p.Z)({},t.typography.body2,{flexShrink:0})})),G=(0,m.ZP)(P.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,p.Z)({["& .".concat(z.selectIcon)]:t.selectIcon,["& .".concat(z.select)]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(z.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),K=(0,m.ZP)(C.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),E=(0,m.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((e=>{let{theme:t}=e;return(0,p.Z)({},t.typography.body2,{flexShrink:0})}));function J(e){let{from:t,to:a,count:o}=e;return"".concat(t,"\u2013").concat(a," of ").concat(-1!==o?o:"more than ".concat(a))}function Q(e){return"Go to ".concat(e," page")}const X=Z.forwardRef((function(e,t){var a;const o=(0,h.Z)({props:e,name:"MuiTablePagination"}),{ActionsComponent:s=B,backIconButtonProps:l,className:r,colSpan:n,component:i=x.Z,count:c,disabled:d=!1,getItemAriaLabel:m=Q,labelDisplayedRows:C=J,labelRowsPerPage:P="Rows per page:",nextIconButtonProps:y,onPageChange:w,onRowsPerPageChange:R,page:I,rowsPerPage:M,rowsPerPageOptions:L=[10,25,50,100],SelectProps:j={},showFirstButton:T=!1,showLastButton:k=!1,slotProps:F}=o,z=(0,u.Z)(o,_),X=o,Y=(e=>{const{classes:t}=e;return(0,b.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},N,t)})(X),q=null!=(a=null==F?void 0:F.select)?a:j,W=q.native?"option":K;let $;i!==x.Z&&"td"!==i||($=n||1e3);const ee=(0,U.Z)(q.id),te=(0,U.Z)(q.labelId);return(0,S.jsx)(A,(0,p.Z)({colSpan:$,ref:t,as:i,ownerState:X,className:(0,v.Z)(Y.root,r)},z,{children:(0,S.jsxs)(D,{className:Y.toolbar,children:[(0,S.jsx)(O,{className:Y.spacer}),L.length>1&&(0,S.jsx)(V,{className:Y.selectLabel,id:te,children:P}),L.length>1&&(0,S.jsx)(G,(0,p.Z)({variant:"standard"},!q.variant&&{input:H||(H=(0,S.jsx)(f.ZP,{}))},{value:M,onChange:R,id:ee,labelId:te},q,{classes:(0,p.Z)({},q.classes,{root:(0,v.Z)(Y.input,Y.selectRoot,(q.classes||{}).root),select:(0,v.Z)(Y.select,(q.classes||{}).select),icon:(0,v.Z)(Y.selectIcon,(q.classes||{}).icon)}),disabled:d,children:L.map((e=>(0,Z.createElement)(W,(0,p.Z)({},!(0,g.X)(W)&&{ownerState:X},{className:Y.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,S.jsx)(E,{className:Y.displayedRows,children:C({from:0===c?0:I*M+1,to:-1===c?(I+1)*M:-1===M?c:Math.min(c,(I+1)*M),count:-1===c?-1:c,page:I})}),(0,S.jsx)(s,{className:Y.actions,backIconButtonProps:l,count:c,nextIconButtonProps:y,onPageChange:w,page:I,rowsPerPage:M,showFirstButton:T,showLastButton:k,slotProps:null==F?void 0:F.actions,getItemAriaLabel:m,disabled:d})]})}))}))},23232:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTableRowUtilityClass:()=>s.G,tableRowClasses:()=>s.Z});var o=a(83366),s=a(55865)},90363:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x,getTableSortLabelUtilityClass:()=>m,tableSortLabelClasses:()=>h});var o=a(31461),s=a(7896),l=a(91213),r=a(9978),n=a(5057),i=a(66230),c=a(57471),d=a(96266);const u=(0,c.Z)((0,d.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var p=a(62773),Z=a(42908),v=a(6285),b=a(31821),g=a(18561);function m(e){return(0,g.Z)("MuiTableSortLabel",e)}const h=(0,b.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),f=["active","children","className","direction","hideSortIcon","IconComponent"],C=(0,p.ZP)(i.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.active&&t.active]}})((e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(h.icon)]:{opacity:.5}},["&.".concat(h.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(h.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}})),P=(0,p.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.icon,t["iconDirection".concat((0,v.Z)(a.direction))]]}})((e=>{let{theme:t,ownerState:a}=e;return(0,s.Z)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===a.direction&&{transform:"rotate(0deg)"},"asc"===a.direction&&{transform:"rotate(180deg)"})})),x=n.forwardRef((function(e,t){const a=(0,Z.Z)({props:e,name:"MuiTableSortLabel"}),{active:n=!1,children:i,className:c,direction:p="asc",hideSortIcon:b=!1,IconComponent:g=u}=a,h=(0,o.Z)(a,f),x=(0,s.Z)({},a,{active:n,direction:p,hideSortIcon:b,IconComponent:g}),y=(e=>{const{classes:t,direction:a,active:o}=e,s={root:["root",o&&"active"],icon:["icon","iconDirection".concat((0,v.Z)(a))]};return(0,l.Z)(s,m,t)})(x);return(0,d.jsxs)(C,(0,s.Z)({className:(0,r.Z)(y.root,c),component:"span",disableRipple:!0,ownerState:x,ref:t},h,{children:[i,b&&!n?null:(0,d.jsx)(P,{as:g,className:(0,r.Z)(y.icon),ownerState:x})]}))}))},7037:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTextFieldUtilityClass:()=>s.I,textFieldClasses:()=>s.Z});var o=a(47020),s=a(13421)},30542:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getToolbarUtilityClass:()=>s.N,toolbarClasses:()=>s.Z});var o=a(95301),s=a(28751)},15747:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTooltipUtilityClass:()=>s.Q,tooltipClasses:()=>s.Z});var o=a(75239),s=a(79350)},67623:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o.Z,getTypographyUtilityClass:()=>s.f,typographyClasses:()=>s.Z});var o=a(11750),s=a(3737)},96646:(e,t,a)=>{a.d(t,{Z:()=>l});a(5057);var o=a(57471),s=a(96266);const l=(0,o.Z)((0,s.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage")},54665:(e,t,a)=>{a.d(t,{Z:()=>l});a(5057);var o=a(57471),s=a(96266);const l=(0,o.Z)((0,s.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage")}}]);