import{j as i,s as S,o as h,r as T,v as he,C as xe,$ as ee,be as te,K as v,f as ge,i as G,cw as ye,bE as ve,h as j,dH as be,T as B,aH as we,V as ne,E as ke,aD as O,bo as re,B as je,A as Ee,aV as Ce,U as Ne,a4 as Te}from"./index-CCv_8omK.js";import{a as ie,h as Se,w as Re,f as Ie,b as Oe,d as Ue,e as De,N as Pe}from"./index-CGtaecKe.js";import{j as V}from"./url-join-DGMfgD17.js";import{g as qe}from"./get-safe-url-B_yWzv49.js";function Ae({children:e,...n}){return i.jsx(Be,{...n,children:e})}Ae.propTypes={children:h.any.isRequired};const Be=S.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;

  .header {
    text-align: center;
  }

  .body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    width: 100%;
    min-height: 200px;
    flex: 1;

    ${e=>e.theme.breakpoints.up("md")} {
      padding: 24px;
    }

    ${e=>e.theme.breakpoints.down("md")} {
      padding: 0 16px 16px;
    }
  }

  .footer {
    display: flex;
    justify-content: center;

    ${e=>e.theme.breakpoints.up("sm")} {
      padding-bottom: 34px;
    }

    ${e=>e.theme.breakpoints.down("md")} {
      margin-top: auto;
      padding-bottom: 10px;
    }
  }
`;function oe({disabled:e=!1,children:n,onConfirm:o}){return T.useEffect(()=>{if(e)return()=>{};const r=l=>{l.code==="Enter"&&(l.metaKey===!0||l.ctrlKey===!0)&&(l.preventDefault(),l.stopPropagation(),o())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,o]),n}oe.propTypes={disabled:h.bool,children:h.any.isRequired,onConfirm:h.func.isRequired};function ae({onContinue:e,nextDisabled:n=!1,launching:o=!1,texts:r={listenName:"",launchingText:"",buttonNext:""},description:l=""}){const[a,t]=T.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx(Le,{children:i.jsxs(oe,{disabled:n,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:()=>t(s=>!s),children:r.listenName}),i.jsx(he,{disabled:n,color:"primary",variant:"contained",className:"next-button",onClick:e,children:o?i.jsxs(i.Fragment,{children:[i.jsx(xe,{size:14}),r.launchingText]}):r.buttonNext})]})}),i.jsx(ee,{open:a,title:r.listenName,onClose:()=>t(!1),children:l})]})}ae.propTypes={onContinue:h.func.isRequired,nextDisabled:h.bool,launching:h.bool,description:h.any,texts:h.object};const Le=S.div`
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;

  @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
    flex-direction: column;
  }

  .eula-trigger {
    cursor: pointer;
    text-decoration: underline;
    ${e=>e.theme.breakpoints.up("md")} {
      padding-right: 24px;
    }
    ${e=>e.theme.breakpoints.down("md")} {
      padding: 16px;
    }
    font-size: 14px;
    white-space: nowrap;
    &:hover {
      color: ${e=>e.theme.palette.primary.main};
    }
  }

  .next-button {
    min-width: 200px;
  }
`;var I={exports:{}},U,X;function _e(){if(X)return U;X=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t=/^[;\s]*/,s=/^\s+|\s+$/g,c=`
`,p="/",m="*",d="",y="comment",g="declaration";U=function(u,b){if(typeof u!="string")throw new TypeError("First argument must be a string");if(!u)return[];b=b||{};var w=1,k=1;function L(x){var f=x.match(n);f&&(w+=f.length);var C=x.lastIndexOf(c);k=~C?x.length-C:k+x.length}function _(){var x={line:w,column:k};return function(f){return f.position=new $(x),z(),f}}function $(x){this.start=x,this.end={line:w,column:k},this.source=b.source}$.prototype.content=u;function M(x){var f=new Error(b.source+":"+w+":"+k+": "+x);if(f.reason=x,f.filename=b.source,f.line=w,f.column=k,f.source=u,!b.silent)throw f}function R(x){var f=x.exec(u);if(f){var C=f[0];return L(C),u=u.slice(C.length),f}}function z(){R(o)}function W(x){var f;for(x=x||[];f=F();)f!==!1&&x.push(f);return x}function F(){var x=_();if(!(p!=u.charAt(0)||m!=u.charAt(1))){for(var f=2;d!=u.charAt(f)&&(m!=u.charAt(f)||p!=u.charAt(f+1));)++f;if(f+=2,d===u.charAt(f-1))return M("End of comment missing");var C=u.slice(2,f-2);return k+=2,L(C),u=u.slice(f),k+=2,x({type:y,comment:C})}}function de(){var x=_(),f=R(r);if(f){if(F(),!R(l))return M("property missing ':'");var C=R(a),me=x({type:g,property:E(f[0].replace(e,d)),value:C?E(C[0].replace(e,d)):d});return R(t),me}}function fe(){var x=[];W(x);for(var f;f=de();)f!==!1&&(x.push(f),W(x));return x}return z(),fe()};function E(u){return u?u.replace(s,d):d}return U}var H;function $e(){if(H)return I.exports;H=1;var e=_e();function n(o,r){var l=null;if(!o||typeof o!="string")return l;for(var a,t=e(o),s=typeof r=="function",c,p,m=0,d=t.length;m<d;m++)a=t[m],c=a.property,p=a.value,s?r(c,p,a):p&&(l||(l={}),l[c]=p);return l}return I.exports=n,I.exports.default=n,I.exports}var Me=$e();const ze=te(Me),We={}.hasOwnProperty;function Fe(e,n,o){if(typeof e!="function")throw new TypeError("h is not a function");const r=Ve(e),l=Ke(e),a=He(e);let t,s;if(typeof o=="string"||typeof o=="boolean"?(t=o,o={}):(o||(o={}),t=o.prefix),n&&n.type==="root"){const c=n.children[0];s=n.children.length===1&&c.type==="element"?c:{type:"element",tagName:"div",properties:{},children:n.children}}else if(n&&n.type==="element")s=n;else throw new Error("Expected root or element, not `"+(n&&n.type||n)+"`");return le(e,s,{schema:o.space==="svg"?ie:Se,prefix:t==null?r||l||a?"h-":void 0:typeof t=="string"?t:t?"h-":void 0,key:0,react:r,vue:l,vdom:a,hyperscript:Xe(e)})}function le(e,n,o){const r=o.schema;let l=r,a=n.tagName;const t={},s=[];let c=-1,p;r.space==="html"&&a.toLowerCase()==="svg"&&(l=ie,o.schema=l);for(p in n.properties)n.properties&&We.call(n.properties,p)&&Ge(t,p,n.properties[p],o,a);if(o.vdom&&(l.space==="html"?a=a.toUpperCase():l.space&&(t.namespace=Re[l.space])),o.prefix&&(o.key++,t.key=o.prefix+o.key),n.children)for(;++c<n.children.length;){const m=n.children[c];m.type==="element"?s.push(le(e,m,o)):m.type==="text"&&s.push(m.value)}return o.schema=r,s.length>0?e.call(n,a,t,s):e.call(n,a,t)}function Ge(e,n,o,r,l){const a=Ie(r.schema,n);let t;o==null||typeof o=="number"&&Number.isNaN(o)||o===!1&&(r.vue||r.vdom||r.hyperscript)||!o&&a.boolean&&(r.vue||r.vdom||r.hyperscript)||(Array.isArray(o)&&(o=a.commaSeparated?Oe(o):Ue(o)),a.boolean&&r.hyperscript&&(o=""),a.property==="style"&&typeof o=="string"&&(r.react||r.vue||r.vdom)&&(o=Ye(o,l)),r.vue?a.property!=="style"&&(t="attrs"):a.mustUseProperty||(r.vdom?a.property!=="style"&&(t="attributes"):r.hyperscript&&(t="attrs")),t?e[t]=Object.assign(e[t]||{},{[a.attribute]:o}):a.space&&r.react?e[De[a.property]||a.property]=o:e[a.attribute]=o)}function Ve(e){const n=e("div",{});return!!(n&&("_owner"in n||"_store"in n)&&(n.key===void 0||n.key===null))}function Xe(e){return"context"in e&&"cleanup"in e}function He(e){return e("div",{}).type==="VirtualNode"}function Ke(e){const n=e("div",{});return!!(n&&n.context&&n.context._isVue)}function Ye(e,n){const o={};try{ze(e,(r,l)=>{r.slice(0,4)==="-ms-"&&(r="ms-"+r.slice(4)),o[r.replace(/-([a-z])/g,(a,t)=>t.toUpperCase())]=l})}catch(r){const l=r;throw l.message=n+"[style]"+l.message.slice(9),l}return o}var D,K;function Qe(){if(K)return D;K=1,D=e;function e(t){if(typeof t=="string")return l(t);if(t==null)return a;if(typeof t=="object")return("length"in t?r:o)(t);if(typeof t=="function")return t;throw new Error("Expected function, string, or object as test")}function n(t){for(var s=[],c=t.length,p=-1;++p<c;)s[p]=e(t[p]);return s}function o(t){return s;function s(c){var p;for(p in t)if(c[p]!==t[p])return!1;return!0}}function r(t){var s=n(t),c=s.length;return p;function p(){for(var m=-1;++m<c;)if(s[m].apply(this,arguments))return!0;return!1}}function l(t){return s;function s(c){return!!(c&&c.type===t)}}function a(){return!0}return D}var P,Y;function Je(){if(Y)return P;Y=1,P=l;var e=Qe(),n=!0,o="skip",r=!1;l.CONTINUE=n,l.SKIP=o,l.EXIT=r;function l(t,s,c,p){var m;typeof s=="function"&&typeof c!="function"&&(p=c,c=s,s=null),m=e(s),d(t,null,[]);function d(g,E,u){var b=[],w;return(!s||m(g,E,u[u.length-1]||null))&&(b=a(c(g,u)),b[0]===r)?b:g.children&&b[0]!==o?(w=a(y(g.children,u.concat(g))),w[0]===r?w:b):b}function y(g,E){for(var u=-1,b=p?-1:1,w=(p?g.length:u)+b,k;w>u&&w<g.length;){if(k=d(g[w],w,E),k[0]===r)return k;w=typeof k[1]=="number"?k[1]:w+b}}}function a(t){return t!==null&&typeof t=="object"&&"length"in t?t:typeof t=="number"?[n,t]:[t]}return P}var q,Q;function Ze(){if(Q)return q;Q=1,q=l;var e=Je(),n=e.CONTINUE,o=e.SKIP,r=e.EXIT;l.CONTINUE=n,l.SKIP=o,l.EXIT=r;function l(a,t,s,c){typeof t=="function"&&typeof s!="function"&&(c=s,s=t,t=null),e(a,t,p,c);function p(m,d){var y=d[d.length-1],g=y?y.children.indexOf(m):null;return s(m,g,y)}}return q}var A,J;function et(){if(J)return A;J=1;var e=Ze(),n=Object.prototype.hasOwnProperty,o={align:"text-align",valign:"vertical-align",height:"height",width:"width"};A=function(t){return e(t,"element",r),t};function r(a){if(!(a.tagName!=="tr"&&a.tagName!=="td"&&a.tagName!=="th")){var t,s;for(t in o)!n.call(o,t)||a.properties[t]===void 0||(s=o[t],l(a,s,a.properties[t]),delete a.properties[t])}}function l(a,t,s){var c=(a.properties.style||"").trim();c&&!/;\s*/.test(c)&&(c+=";"),c&&(c+=" ");var p=c+t+": "+s+";";a.properties.style=p}return A}var tt=et();const nt=te(tt);function rt(e){const n=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof n=="string"&&n.replace(/[ \t\n\f\r]/g,"")===""}const it={}.hasOwnProperty,ot=new Set(["table","thead","tbody","tfoot","tr"]);function at(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const n=e.createElement,o=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:r});function r(a){let t=Fe(l,o?nt(a):a,e.prefix);return a.type==="root"?(t=t&&typeof t=="object"&&"type"in t&&"props"in t&&t.type==="div"&&(a.children.length!==1||a.children[0].type!=="element")?t.props.children:[t],n(e.Fragment||"div",{},t)):t}function l(a,t,s){if(s&&ot.has(a)&&(s=s.filter(c=>!rt(c))),e.components&&it.call(e.components,a)){const c=e.components[a];return e.passNode&&typeof c=="function"&&(t=Object.assign({node:this},t)),n(c,t,s)}return n(a,t,s)}}function se({children:e}){return i.jsx(lt,{children:e})}const Z="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",lt=S(v)`
  .highlight pre,
  pre {
    border-radius: 5px;
  }
  code {
    font-family: ${Z};
  }
  pre code {
    font-size: 14px;
    font-family: ${Z};
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
    margin-bottom: 16px;
    margin-top: 24px;
    border-bottom: initial !important;
  }

  .CodeMirror pre {
    background-color: ${e=>e.theme.palette.grey[50]} !important;
  }

  .anchor {
    display: none;
  }
`;se.propTypes={children:h.any.isRequired};function ce({infoList:e=[]}){return i.jsx(v,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(n=>i.jsxs(i.Fragment,{children:[i.jsx(v,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:n.key}),i.jsx(v,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:n.value})]}))})}ce.propTypes={infoList:h.arrayOf(h.shape({key:h.string,value:h.string}))};const st=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0,ct=new at({createElement:T.createElement}).Compiler,N={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function pe({blockletMeta:e,locale:n,handleDescEle:o=""}){const{data:r}=e,l=ge(),{registryUrl:a,did:t}=r,s=G.getDisplayName({meta:r}),c=ye(()=>a&&t?fetch(V(a,"/api/blocklets",t,"readme")).then(u=>u.json()):null,{refreshDeps:[a,t]}),p=ve(()=>c.data?c.data[n]||c.data.en||c.data[Object.keys(c.data)[0]]:"",[c]),m=r&&r.htmlAst?ct(r.htmlAst):"",d=st(r);let y=j(r,"owner.fullName");if(y){const u=j(r,"owner.did");u&&(y=i.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1},children:[y,i.jsx(be,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:u,compact:!0,size:14,locale:n})]}))}else y=j(r,"author.name");const g=[{key:j(N[n],"appinfo.name"),value:G.getDisplayName({meta:r})},{key:j(N[n],"appinfo.version"),value:r.version},{key:j(N[n],"appinfo.author"),value:y},{type:"description",key:j(N[n],"appinfo.description"),value:r.description}];r.requirements&&g.push({key:j(N[n],"appinfo.requirements"),value:r.requirements.server}),r.community&&g.push({key:j(N[n],"appinfo.community"),value:i.jsx("a",{href:r.community,target:"_blank",rel:"noreferrer",children:r.community})}),r.documentation&&g.push({key:j(N[n],"appinfo.documentation"),value:i.jsx("a",{href:r.documentation,target:"_blank",rel:"noreferrer",children:r.documentation})}),r.support&&g.push({key:j(N[n],"appinfo.support"),value:i.jsx("a",{href:`mailto:${r.support}`,target:"_blank",rel:"noreferrer",children:r.support})}),m&&g.push({key:j(N[n],"appinfo.overview"),value:""});let E;return n==="zh"?E=i.jsxs(i.Fragment,{children:[d?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:s}),"；"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:s}),"；"]}),i.jsx("p",{children:"在应用启动前，需要选择您的节点；"}),i.jsx("p",{children:"如果您没有节点，我们会引导您创建新的节点；"}),i.jsx("p",{children:"下面为该应用的信息："})]}):E=i.jsxs(i.Fragment,{children:[d?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:s})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:s}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(ut,{children:[o||E,i.jsx(ce,{infoList:g}),p?i.jsxs("div",{className:"app-overview",children:[i.jsx(B,{variant:"h5",gutterBottom:!0,children:j(N[n],"appinfo.overview")}),i.jsx(se,{children:i.jsx(pt,{component:"div",className:"content-wrapper post-content",children:i.jsx(Pe,{source:p,wrapperElement:{"data-color-mode":l.palette.mode},urlTransform:(u,b,w)=>u.startsWith("/")?V(a,u):u})})})]}):m?i.jsx("div",{className:"app-overview",children:m}):null]})}const pt=S(B)`
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.5em;
  min-height: 10vh;
  margin-bottom: 40px !important;

  .alert-content {
    max-width: 100%;
    p:last-of-type {
      margin-bottom: 0;
    }
  }

  iframe {
    width: 100% !important;
  }
`,ut=S.div`
  .info-table {
    a {
      word-break: break-all;
    }
  }
  .app-overview {
    font-size: 16px;
    margin: 16px 0 0 16px;
    h1 {
      margin: 8px 0;
      font-size: 20px;
    }
    h2 {
      margin: 8px 0;
      font-size: 18px;
    }
    ul {
      display: block;
      list-style-type: disc;
      padding-left: 2em;
      li {
        display: list-item;
        list-style: disc;
      }
    }
    blockquote {
      margin-left: 2em;
    }
  }
  .wmde-markdown[data-color-mode='dark'] {
    background: transparent;
  }
`;pe.propTypes={blockletMeta:h.object.isRequired,locale:h.string.isRequired,handleDescEle:h.node};function dt({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",we.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function ft(e){return`${e.bundleSource?.store||e.meta.homepage}/assets/${e.meta?.did}/${e.meta?.logo||"logo.png"}?v=${e.meta?.version}`}function ue({installRelated:e=!1,meta:n=null,show:o=!1,onClose:r,components:l,loading:a}){const{t}=ne(),s=ke(d=>d.breakpoints.down("md"));if(!o)return null;const c=!a&&l.length===0,p=!a&&l.length!==0,m=40;return i.jsxs(ee,{title:t("blocklet.component.relatedComponents",{name:n.title}),maxWidth:!1,fullWidth:!1,onClose:(d,y)=>{y!=="backdropClick"&&r(!1)},PaperProps:{style:s?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[a&&i.jsx(v,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(v,{component:O,icon:"line-md:loading-loop",sx:{color:"primary.main",fontSize:32}})}),c&&i.jsx(v,{sx:{textAlign:"center"},children:t("blocklet.component.noDependencies",{name:n.title})}),p&&i.jsx(v,{sx:{marginBottom:2},children:l.map(d=>{if(!d.meta)return null;const{required:y}=d;let g;return e||y?g=1:g=.5,i.jsxs(v,{sx:{opacity:g,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:m,height:m,minWidth:m,minHeight:m},src:ft(d),alt:d.meta.title}),i.jsxs(v,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(v,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{window.open(qe(`${d.bundleSource?.store||d.meta.homepage}/blocklets/${d.meta.did}`,{allowDomains:null}),"_blank")},children:[d.meta.title,i.jsx(v,{sx:{display:y?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:t("blocklet.component.required")}),i.jsxs(v,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[d.meta.version,i.jsx(v,{className:"link-icon",icon:"fluent:open-20-filled",component:O,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(v,{sx:{marginTop:0,opacity:.7},children:d.meta.description})]})]},d.meta.did)})})]})}ue.propTypes={meta:h.object,show:h.bool,onClose:h.func.isRequired,installRelated:h.func,components:h.array.isRequired,loading:h.bool.isRequired};function mt(e){return e&&e.registryUrl&&e.did?`${e.registryUrl}/api/blocklets/${e?.did}/blocklet.json`:""}function ht(e){const{api:n}=re(),[o]=je(),r=o.get("blocklet_meta_url")||mt(e),[l,a]=T.useState([]),[t,s]=T.useState(!1);return T.useEffect(()=>{!r||e?.inputUrl||(s(!0),n.getDynamicComponents({input:{url:r}}).then(c=>{a(c.components)}).finally(()=>{s(!1)}))},[r]),{components:l,loading:t}}function xt(e){const{info:n}=re();return T.useMemo(()=>!e||!e.docker?.image||e.docker?.image&&e.docker?.runBaseScript?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:n.enableDocker&&n.enableDockerNetwork,[e,n])}function gt({installRelated:e=!0,onChangeInstallRelated:n=null,meta:o,onClickNext:r=null,handleDescEle:l=""}){const a=Ee(),{t,locale:s}=ne(),[c,p]=T.useState(!1),{components:m,loading:d}=ht(o),y=xt(o),g=r||(()=>{a(`/launch-blocklet/install${window.location.search}`)}),E=()=>{p(!0)},u=()=>{p(!1)};return i.jsxs(yt,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:y?i.jsx(pe,{blockletMeta:{data:o},locale:s,handleDescEle:l}):i.jsx(v,{sx:{p:3},children:i.jsx(B,{children:t("launchBlocklet.dockerBlockletCantInstall")})})})})}),i.jsxs(v,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[d?i.jsx(O,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,y&&n&&m?.length?i.jsxs(v,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(Ce,{sx:{mr:.5},checked:e,onChange:b=>n(b.currentTarget.checked),control:i.jsx(Ne,{}),label:i.jsx("span",{children:t("launchBlocklet.installRelatedComponents")})}),i.jsx(v,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(Te,{size:"small",onClick:E,children:i.jsx(O,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:y?i.jsx(ae,{onContinue:g,description:i.jsx(dt,{}),texts:{listenName:t("launchBlocklet.license"),buttonNext:t("launchBlocklet.next")}}):null})]}),i.jsx(ue,{installRelated:e,meta:o,show:c,onClose:u,components:m,loading:d})]})}gt.propTypes={meta:h.object.isRequired,onClickNext:h.func,handleDescEle:h.node,installRelated:h.bool,onChangeInstallRelated:h.func};const yt=S.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  flex: 1;
  .app-content {
    padding: 2px 24px 24px;
    ${e=>e.theme.breakpoints.down("md")} {
      padding-top: 10px;
    }
    width: 100%;
    flex: 1;
    letter-spacing: normal;
  }
  .agreement {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 1px solid ${e=>e.theme.palette.grey[100]};
    border-radius: 12px;
    ${e=>e.theme.breakpoints.up("md")} {
      margin-top: 24px;
    }
    ${e=>e.theme.breakpoints.down("md")} {
      margin-top: 16px;
    }
    .agreement-content {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      font-size: 14px;
      overflow-y: auto;
      ${e=>e.theme.breakpoints.up("md")} {
        padding: 0 24px;
      }
      ${e=>e.theme.breakpoints.down("md")} {
        padding: 0 16px;
      }
      &:after {
        display: block;
        content: '';
        height: 24px;
      }
    }
  }
  .agreement-bottom {
    display: flex;
    width: 100%;
    padding: 24px;
    ${e=>e.theme.breakpoints.up("md")} {
      flex-direction: row;
      align-items: center;
      margin-left: auto;
    }
    ${e=>e.theme.breakpoints.down("md")} {
      flex-direction: column;
      align-items: center;
      padding-top: 0;
      padding-bottom: 16px;
    }
  }
  .button-container {
    ${e=>e.theme.breakpoints.up("md")} {
      margin-left: auto;
    }
    ${e=>e.theme.breakpoints.down("md")} {
      padding-top: 0;
      padding-bottom: 16px;
    }
  }
`;export{gt as A,Ae as C,xt as u};
