@ttmg/cli 0.4.6-vibe-beta.24 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +46 -17
- package/dist/index.js +312 -134
- package/dist/index.js.map +1 -1
- package/dist/package.json +8 -4
- package/dist/public/assets/{Card-CN2lxY0Y.js → Card-D4FjfZC9.js} +1 -1
- package/dist/public/assets/{Detail-CELZZ-4h.js → Detail-m3nH8XXe.js} +1 -1
- package/dist/public/assets/Detail-m3nH8XXe.js.br +0 -0
- package/dist/public/assets/{MonetizationMode-C7DNqium.js → MonetizationMode-1rShmN0o.js} +1 -1
- package/dist/public/assets/{MonetizationModeSummary-DYE7XUq1.js → MonetizationModeSummary-CVfWOth1.js} +1 -1
- package/dist/public/assets/{SectionHeader-BKc3BWXP.js → SectionHeader-CAuUcT9Q.js} +1 -1
- package/dist/public/assets/{baseForm-I9suIiQn.js → baseForm-C3PqJ30b.js} +1 -1
- package/dist/public/assets/baseForm-C3PqJ30b.js.br +0 -0
- package/dist/public/assets/{col-w9Q-2mgM.js → col-CcZ10DdH.js} +1 -1
- package/dist/public/assets/{compass-D6waJ52O.js → compass-H7uPUHxP.js} +1 -1
- package/dist/public/assets/{index-mjEeEQcC.js → index-B0xVTiB7.js} +1 -1
- package/dist/public/assets/index-B0xVTiB7.js.br +0 -0
- package/dist/public/assets/{index-CgXOkYrX.js → index-BAbIp3cP.js} +1 -1
- package/dist/public/assets/index-BAbIp3cP.js.br +0 -0
- package/dist/public/assets/{index-DDecPuod.js → index-BESASZaa.js} +1 -1
- package/dist/public/assets/{index-YVB9ZW00.js → index-BIZgIFOe.js} +1 -1
- package/dist/public/assets/{index-BIrFkB6r.js → index-BX17swkm.js} +1 -1
- package/dist/public/assets/index-BX17swkm.js.br +0 -0
- package/dist/public/assets/{index-BqwflQml.js → index-Bbsc4UYr.js} +1 -1
- package/dist/public/assets/{index-B6hY5GdS.js → index-BhswTE7o.js} +1 -1
- package/dist/public/assets/{index-DGkgqtgJ.js → index-BntW17GH.js} +1 -1
- package/dist/public/assets/{index-BY3eQmfP.js → index-BswJGTPK.js} +1 -1
- package/dist/public/assets/index-BswJGTPK.js.br +0 -0
- package/dist/public/assets/{index-BvPolBSn.js → index-CCX74BCm.js} +1 -1
- package/dist/public/assets/{index-Q0GC8Irj.js → index-CQ3yj6IA.js} +1 -1
- package/dist/public/assets/index-CQ3yj6IA.js.br +0 -0
- package/dist/public/assets/{index-Csmg5oyu.js → index-CRqInRg3.js} +1 -1
- package/dist/public/assets/{index-BegU9LBT.js → index-C_G_C9eS.js} +10 -10
- package/dist/public/assets/index-C_G_C9eS.js.br +0 -0
- package/dist/public/assets/{index-rLkONFpx.js → index-CqDAcAbN.js} +1 -1
- package/dist/public/assets/{index-Cb4Ja0tZ.js → index-CrRxN4us.js} +1 -1
- package/dist/public/assets/{index-CcUgN29Y.js → index-CyDpw03-.js} +1 -1
- package/dist/public/assets/{index-BrOFdVbv.js → index-D8BnlF58.js} +1 -1
- package/dist/public/assets/{index-DDy4PkWT.js → index-DAY6FKtH.js} +1 -1
- package/dist/public/assets/{index-CsiIrLKY.js → index-DKcAZ6VY.js} +1 -1
- package/dist/public/assets/{index-M8jf-YAZ.js → index-DS5Uafh7.js} +1 -1
- package/dist/public/assets/{index-FVHabbDB.js → index-DdxoW9oQ.js} +1 -1
- package/dist/public/assets/{index-CLKKui8G.js → index-O0yoYI51.js} +1 -1
- package/dist/public/assets/{index-DEQ2hVPA.js → index-aQ98LrVv.js} +1 -1
- package/dist/public/assets/index-aQ98LrVv.js.br +0 -0
- package/dist/public/assets/{index-8sDAOAcS.js → index-ivwHgxUB.js} +1 -1
- package/dist/public/assets/index-ivwHgxUB.js.br +0 -0
- package/dist/public/assets/{index-BwrZjkCc.js → index-sIdIkg5O.js} +1 -1
- package/dist/public/assets/{index-BLWgpW64.js → index-wTaBRIal.js} +1 -1
- package/dist/public/assets/{layers-Dbwq9AyL.js → layers-Bw-W5e-K.js} +1 -1
- package/dist/public/assets/{list-checks-og1usOZf.js → list-checks-ClFMgLBy.js} +1 -1
- package/dist/public/assets/{sparkles-p-dZbjGb.js → sparkles-JXa7CZhS.js} +1 -1
- package/dist/public/assets/{triangle-alert-BZVAEUiL.js → triangle-alert--wDqk97a.js} +1 -1
- package/dist/public/assets/{zap-BAhZUPPa.js → zap-D27jUGUv.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/scripts/dev-remote-resources-smoke.js +80 -0
- package/dist/scripts/remoteResources.js +54 -0
- package/dist/scripts/verify-agent-contract.js +28 -0
- package/dist/scripts/wasm-collect-smoke.js +8 -2
- package/dist/scripts/worker.js +5 -1
- package/package.json +8 -4
- package/vibe-upload.md +4 -4
- package/dist/public/assets/Detail-CELZZ-4h.js.br +0 -0
- package/dist/public/assets/baseForm-I9suIiQn.js.br +0 -0
- package/dist/public/assets/index-8sDAOAcS.js.br +0 -0
- package/dist/public/assets/index-BIrFkB6r.js.br +0 -0
- package/dist/public/assets/index-BY3eQmfP.js.br +0 -0
- package/dist/public/assets/index-BegU9LBT.js.br +0 -0
- package/dist/public/assets/index-CgXOkYrX.js.br +0 -0
- package/dist/public/assets/index-DEQ2hVPA.js.br +0 -0
- package/dist/public/assets/index-Q0GC8Irj.js.br +0 -0
- package/dist/public/assets/index-mjEeEQcC.js.br +0 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as l,j as e,T as s,i,B as t,D as u}from"./index-
|
|
1
|
+
import{h as l,j as e,T as s,i,B as t,D as u}from"./index-C_G_C9eS.js";import{B as b}from"./index-CyDpw03-.js";const n="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",g=[{titleKey:"basicDebugGuide.available.scan.title",descKey:"basicDebugGuide.available.scan.desc"},{titleKey:"basicDebugGuide.available.launch.title",descKey:"basicDebugGuide.available.launch.desc"},{titleKey:"basicDebugGuide.available.preview.title",descKey:"basicDebugGuide.available.preview.desc"},{titleKey:"basicDebugGuide.available.network.title",descKey:"basicDebugGuide.available.network.desc"},{titleKey:"basicDebugGuide.available.manual.title",descKey:"basicDebugGuide.available.manual.desc"}],r=[{titleKey:"basicDebugGuide.locked.project.title",descKey:"basicDebugGuide.locked.project.desc"},{titleKey:"basicDebugGuide.locked.upload.title",descKey:"basicDebugGuide.locked.upload.desc"},{titleKey:"basicDebugGuide.locked.platform.title",descKey:"basicDebugGuide.locked.platform.desc"}],o=["basicDebugGuide.step1","basicDebugGuide.step2","basicDebugGuide.step3","basicDebugGuide.step4"],h=()=>{const d=l();return e.jsxs("div",{className:"basic-debug-guide-page",children:[e.jsx(b,{className:"basic-debug-guide-banner",fullMode:!1,bordered:!1,closeIcon:null,type:"info",description:e.jsxs("div",{className:"basic-debug-guide-banner-copy",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.bannerTitle")}),e.jsx(s.Text,{children:i("basicDebugGuide.bannerDesc")})]})}),e.jsxs("section",{className:"basic-debug-guide-hero",children:[e.jsxs("div",{className:"basic-debug-guide-hero-copy",children:[e.jsx(s.Title,{heading:3,children:i("basicDebugGuide.title")}),e.jsx(s.Paragraph,{className:"basic-debug-guide-hero-desc",children:i("basicDebugGuide.desc")})]}),e.jsxs("div",{className:"basic-debug-guide-actions",children:[e.jsx(t,{theme:"solid",type:"primary",onClick:()=>d("/"),children:i("basicDebugGuide.actionScan")}),e.jsx(t,{theme:"light",onClick:()=>d("/network_diagnostics"),children:i("basicDebugGuide.actionNetwork")}),e.jsx(u,{href:n,children:i("basicDebugGuide.actionProxy")})]})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.availableTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.availableDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:g.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.lockedTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.lockedDesc")})]}),e.jsx("div",{className:"basic-debug-guide-list",children:r.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-item basic-debug-guide-item-muted",children:[e.jsx("span",{className:"basic-debug-guide-item-index",children:a+1}),e.jsxs("div",{className:"basic-debug-guide-item-copy",children:[e.jsx(s.Text,{strong:!0,children:i(c.titleKey)}),e.jsx(s.Text,{children:i(c.descKey)})]})]},c.titleKey))})]}),e.jsxs("section",{className:"basic-debug-guide-section",children:[e.jsxs("div",{className:"basic-debug-guide-section-head",children:[e.jsx(s.Text,{strong:!0,children:i("basicDebugGuide.stepsTitle")}),e.jsx(s.Text,{className:"basic-debug-guide-section-desc",children:i("basicDebugGuide.stepsDesc")})]}),e.jsx("div",{className:"basic-debug-guide-steps",children:o.map((c,a)=>e.jsxs("div",{className:"basic-debug-guide-step",children:[e.jsx("span",{className:"basic-debug-guide-step-index",children:a+1}),e.jsx(s.Text,{children:i(c)})]},c))}),e.jsxs("div",{className:"basic-debug-guide-command-list",children:[e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxy")}),e.jsx("code",{children:"ttmg config set proxy http://127.0.0.1:7890"}),e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandProxyHint")})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandLogin")}),e.jsx("code",{children:"ttmg login"})]}),e.jsxs("div",{className:"basic-debug-guide-command-item",children:[e.jsx(s.Text,{type:"tertiary",children:i("basicDebugGuide.commandDev")}),e.jsx("code",{children:"ttmg dev"})]})]})]})]})};export{h as BasicDebugGuide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,h as c,j as e,P as r,i as a}from"./index-
|
|
1
|
+
import{c as o,h as c,j as e,P as r,i as a}from"./index-C_G_C9eS.js";import{S as t}from"./SectionHeader-CAuUcT9Q.js";import{C as d,m,M as l,a as h,o as p}from"./MonetizationModeSummary-CVfWOth1.js";import"./index-BntW17GH.js";import{L as x,C as v}from"./layers-Bw-W5e-K.js";import{C as y}from"./compass-H7uPUHxP.js";import"./Card-D4FjfZC9.js";const j=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],u=o("credit-card",j);const g=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],k=o("megaphone",g),N={iaa:k,iap:u,iaap:x},C=s=>a(s),A=()=>{const s=c();return e.jsxs("div",{className:"ia-page",children:[e.jsx(r,{title:a("ia.overview.title"),subtitle:a("ia.overview.desc")}),e.jsxs("section",{className:"ia-section ia-section-modes",children:[e.jsx(t,{icon:d,title:a("ia.monetization.title"),subtitle:a("ia.monetization.desc")}),e.jsx("div",{className:"ia-mode-grid",children:m.map(i=>{const n=N[i.key];return e.jsxs("button",{type:"button",className:`ia-mode-card ia-mode-card-${i.key}`,onClick:()=>s(`/integration_assistant/mode/${i.key}`),children:[e.jsxs("header",{className:"ia-mode-card-head",children:[e.jsx("span",{className:"ia-mode-card-badge","aria-hidden":"true",children:e.jsx(n,{size:17,strokeWidth:2})}),e.jsx("h4",{className:"ia-mode-card-title",children:C(i.titleKey)}),e.jsx("span",{className:"ia-mode-card-chevron","aria-hidden":"true",children:e.jsx(v,{size:14,strokeWidth:2})})]}),e.jsx(l,{mode:i,compact:!0})]},i.key)})})]}),e.jsxs("section",{className:"ia-section",children:[e.jsx(t,{icon:y,title:a("ia.overview.groups.title"),subtitle:a("ia.overview.groups.desc")}),e.jsx("div",{className:"ia-section-stack",children:e.jsx(h,{sections:p})})]})]})};export{A as IntegrationAssistant};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as g,w as y,y as E,U as C,R as t,V as $,E as v,z as m,T as u,W as I,l as N,m as x,O as w,J as o}from"./index-
|
|
1
|
+
import{t as g,w as y,y as E,U as C,R as t,V as $,E as v,z as m,T as u,W as I,l as N,m as x,O as w,J as o}from"./index-C_G_C9eS.js";const B={PREFIX:`${g}-banner`},P={TYPE:["info","success","danger","warning"]};class l extends y{constructor(e){super(Object.assign(Object.assign({},l.defaultAdapter),e))}removeBanner(e){this._adapter.notifyClose(e),this._adapter.setVisible()}}const n=B.PREFIX,T=P.TYPE;class h extends E{constructor(e){super(e),this.remove=s=>{s&&s.stopPropagation(),this.foundation.removeBanner(s)},this.state={visible:!0},C("target"in this.props,"[Semi Banner] 'target' has been deprecated, please write JSX directly instead.")}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVisible:()=>{this.setState({visible:!1})},notifyClose:e=>{const{onClose:s}=this.props;s(e)}})}componentDidMount(){this.foundation=new l(this.adapter),this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}renderCloser(){const{closeIcon:e}=this.props;return e===null?e:t.createElement($,{className:`${n}-close`,onClick:this.remove,icon:e||t.createElement(v,{"x-semi-prop":"closeIcon","aria-hidden":!0}),theme:"borderless",size:"small",type:"tertiary","aria-label":"Close"})}renderIcon(){const{type:e,icon:s}=this.props;let a={warning:t.createElement(w,{size:"large","aria-label":"warning"}),success:t.createElement(x,{size:"large","aria-label":"success"}),info:t.createElement(N,{size:"large","aria-label":"info"}),danger:t.createElement(I,{size:"large","aria-label":"danger"})}[e];const r=m({[`${n}-icon`]:!0});return typeof s<"u"&&(a=s),a?t.createElement("div",{className:r,"x-semi-prop":"icon"},a):null}render(){const{children:e,type:s,className:c,style:a,bordered:r,title:p,description:d,fullMode:i}=this.props,{visible:b}=this.state,f=m(n,c,{[`${n}-${s}`]:s,[`${n}-full`]:i,[`${n}-in-container`]:!i,[`${n}-bordered`]:!i&&r});return b?t.createElement("div",Object.assign({className:f,style:a,role:"alert"},this.getDataAttr(this.props)),t.createElement("div",{className:`${n}-content-wrapper`},t.createElement("div",{className:`${n}-content`},this.renderIcon(),t.createElement("div",{className:`${n}-content-body`},p?t.createElement(u.Title,{heading:5,className:`${n}-title`,component:"div","x-semi-prop":"title"},p):null,d?t.createElement(u.Paragraph,{className:`${n}-description`,component:"div","x-semi-prop":"description"},d):null)),this.renderCloser()),e?t.createElement("div",{className:`${n}-extra`,"x-semi-prop":"children"},e):null):null}}h.propTypes={fullMode:o.bool,type:o.oneOf(T),title:o.node,description:o.node,icon:o.node,closeIcon:o.node,children:o.node,style:o.object,className:o.string,onClose:o.func,bordered:o.bool};h.defaultProps={onClose:()=>{},type:"info",fullMode:!0};export{h as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,T as o,i as c,I as s}from"./index-
|
|
1
|
+
import{j as e,T as o,i as c,I as s}from"./index-C_G_C9eS.js";import{D as i}from"./index-Bbsc4UYr.js";const t=[{node:"item",name:c("quickStart"),link:"https://bytedance.sg.larkoffice.com/docx/MarqdNvQLoihvjxN4rFllgjBgwb"},{node:"item",name:c("jsApiList"),link:"https://bytedance.larkoffice.com/wiki/GQscwDOQSiPxyjkbzyfckh2pnDg"},{node:"item",name:c("advancedGuide"),link:"https://bytedance.larkoffice.com/wiki/AGqRwu0qQiXZpVkkToUcRP99nwc"},{node:"item",name:c("faq"),link:"https://bytedance.larkoffice.com/wiki/O6aWwFhDBiEglwkcnJ4ccJpdnmb"}],d=()=>e.jsx(i,{trigger:"hover",position:"bottomRight",render:e.jsx(e.Fragment,{children:t.map(n=>e.jsx(i.Item,{onClick:()=>{window.open(n.link)},children:n.name},n.name))}),children:e.jsxs("div",{className:"access-docs tt-header-chip",role:"button",tabIndex:0,children:[e.jsx(o.Text,{className:"access-docs-text",type:"primary",children:c("docs")}),e.jsx(s,{className:"access-docs-icon"})]})});export{d as AccessDocs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,h as F,u as D,r as o,N as b,j as n,v as q,B as x}from"./index-
|
|
1
|
+
import{i as e,h as F,u as D,r as o,N as b,j as n,v as q,B as x}from"./index-C_G_C9eS.js";import{P as w}from"./index-CCX74BCm.js";import{F as r}from"./baseForm-C3PqJ30b.js";import"./col-CcZ10DdH.js";import"./index-aQ98LrVv.js";const O=[{label:e("scene_scan_qrcode"),value:"scan_qrcode"},{label:e("scene_search"),value:"search"},{label:e("scene_fyf_promotion_direct_feed_play"),value:"fyf_promotion_direct_feed_play"},{label:e("scene_anchor"),value:"anchor"},{label:e("scene_center"),value:"center"},{label:e("scene_ad"),value:"ads"},{label:e("scene_shortcut"),value:"desktop_shortcut"},{label:e("scene_sharing"),value:"dm_sharing"},{label:e("scene_link"),value:"minis_link"},{label:e("scene_inbox"),value:"inbox"}];function M(c){return c.id==="normal"?e("normalLaunchMode"):c.id==="created"?e("createdLaunchMode"):c.name}function A(c){return{...c,name:M(c)}}const B=()=>{const c=F(),{state:{launchOptions:t,selectedLaunchOption:j,packages:_},setLaunchOptions:f,setSelectedLaunchOption:v}=D(),i=o.useRef(null),u=A(j||b),[g,m]=o.useState(u),[h,N]=o.useState(u.id),y=_.map(a=>{if(a.type==="main")return{label:e("gameMainPackage"),value:a.name};if(a.type==="independent")return{label:`${e("independentPackage")}: ${a.name}`,value:a.name}}).filter(Boolean),L=o.useCallback(a=>{const l={...g,...a};l.pkgType==="main"&&l.independentPkg!==void 0&&(l.independentPkg=void 0,i.current&&i.current.setValues({independentPkg:void 0})),m(l)},[g]),k=o.useCallback(()=>{if(!i.current)return;const a=i.current.getValues();a.pkgType==="main"&&(a.independentPkg=void 0);const l=t.findIndex(d=>d.name===a.name&&d.id!=="created"&&d.id!=="normal");let s;l!==-1?(s=[...t],s[l]=a):(a.id=Date.now().toString(),s=[...t.slice(0,-1),a,...t.slice(-1)]),f(s),m(a),v(a),c("/")},[t,c,f,v]),S=o.useCallback(a=>{const l=t.find(s=>s.id===a);if(l){N(a);const s={...l};a==="created"?s.name="":a==="normal"&&(s.name=e("normalLaunchMode")),m(s),i.current?.setValues(s)}},[t]),C=o.useCallback(()=>{const a=h;if(["normal","created"].includes(a))return;const l=t.filter(p=>p.id!==a);f(l);const s=l.find(p=>p.id==="normal")||l.find(p=>p.id==="created")||l[0]||b,d={...s,...s.id==="created"?{name:""}:{},...s.id==="normal"?{name:e("normalLaunchMode")}:{}};v(d),N(d.id),m(d),i.current?.setValues(d)},[t,h,f,v]),V=o.useCallback(()=>{m(u),i.current?.setValues(u),c("/")},[u,c]),P=t.find(a=>a.id===h);return n.jsxs("div",{className:"launch-mode-page",children:[n.jsxs("section",{className:"launch-mode-guide",children:[n.jsx("div",{className:"launch-mode-guide-marker"}),n.jsxs("div",{className:"launch-mode-guide-copy",children:[n.jsx("div",{className:"launch-mode-guide-title",children:e("launchMode")}),n.jsx("div",{className:"launch-mode-guide-desc",children:e("launchModeDesc")})]})]}),n.jsxs(r,{className:"launch-mode-form",initValues:g,onValueChange:L,getFormApi:a=>i.current=a,onSubmit:k,children:[n.jsxs("div",{className:"launch-mode-form-section launch-mode-current-section",children:[n.jsxs("div",{className:"launch-mode-section-head",children:[n.jsx("div",{className:"launch-mode-section-title",children:e("selectLaunchMode")}),n.jsx("div",{className:"launch-mode-section-desc",children:e("launchMode.currentDesc")})]}),n.jsx(r.Select,{className:"launch-mode-control",placeholder:e("selectLaunchMode"),rules:[{required:!0,message:e("selectLaunchMode")}],field:"id",noLabel:!0,optionList:t.map(a=>({label:M(a),value:a.id})),onChange:S,style:{width:"100%"},value:h})]}),n.jsxs("div",{className:"launch-mode-form-section",children:[n.jsxs("div",{className:"launch-mode-section-head",children:[n.jsx("div",{className:"launch-mode-section-title",children:e("customizeLaunchMode")}),n.jsx("div",{className:"launch-mode-section-desc",children:e("launchMode.configDesc")})]}),n.jsxs("div",{className:"launch-mode-field-grid",children:[n.jsx(r.Input,{className:"launch-mode-control",required:!0,placeholder:e("launchModeName"),field:"name",label:e("launchModeName"),rules:[{required:!0,message:e("notEmpty")}],style:{width:"100%"},trigger:"blur"}),n.jsx(r.Select,{className:"launch-mode-control",field:"pkgName",label:e("selectLaunchPkg"),placeholder:e("selectLaunchPkg"),rules:[{required:!0,message:e("notEmpty")}],optionList:y,style:{width:"100%"}}),n.jsx(r.Select,{className:"launch-mode-control",field:"scene",label:e("selectScene"),rules:[{required:!0,message:e("notEmpty")}],placeholder:e("selectScene"),optionList:O,style:{width:"100%"},filter:!0}),n.jsx(r.Input,{className:"launch-mode-control",field:"queries",label:e("launchQueries"),placeholder:e("launchQueriesDesc"),trigger:"blur",rules:[{validator:(a,l)=>{const{isValid:s,message:d}=q(l);return s?Promise.resolve():Promise.reject(d)}}],style:{width:"100%"}})]})]}),n.jsxs("div",{className:"launch-mode-actions",children:[["created","normal"].includes(h)?n.jsx(x,{className:"launch-mode-secondary-action",onClick:V,children:e("cancel")}):n.jsx(w,{title:e("deleteLaunchModeConfirm",{name:P?.name??""}),onConfirm:C,position:"bottomRight",children:n.jsx(x,{className:"launch-mode-danger-action",type:"danger",children:e("delete")})}),n.jsx(x,{className:"launch-mode-primary-action",htmlType:"submit",type:"primary",children:e("saveAndUse")})]})]})]})};export{B as LaunchMode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as U,k as b,r as o,j as e,p as D,i as a,z as y,ad as F,e as A,T as m,d as E,av as I}from"./index-
|
|
1
|
+
import{u as U,k as b,r as o,j as e,p as D,i as a,z as y,ad as F,e as A,T as m,d as E,av as I}from"./index-C_G_C9eS.js";import{I as x,F as g}from"./baseForm-C3PqJ30b.js";import"./col-CcZ10DdH.js";import"./index-aQ98LrVv.js";const B=()=>{const{state:{user:h}}=U(),r=b(h),[f,i]=o.useState(!1),[j,l]=o.useState(!1),[v,c]=o.useState(""),[d,n]=o.useState(""),p=o.useRef(null),u=()=>{l(!1),n(""),c("")},C=()=>{i(!1),u(),p.current?.formApi?.reset?.()},S=()=>{r&&i(!0)},N=s=>{const t=s;if(t?.code===0)I.success({title:a("uploadPlatformSuccess"),content:e.jsxs(e.Fragment,{children:[e.jsx("div",{children:a("uploadPlatformDesc")}),e.jsx("div",{style:{marginTop:12,display:"flex",justifyContent:"flex-end"},children:e.jsx(m.Text,{link:!0,onClick:()=>{window.open(t?.data?.detail,"_blank")},children:a("viewOnPlatform")})})]}),duration:10}),i(!1),u();else{const P=t?.error?.StatusMessage||t?.detail||a("uploadPlatformFailed");n(P),l(!1)}},T=s=>{const t=s?.error?.StatusMessage||s?.response?.detail||s?.message||a("uploadPlatformFailed");n(t),l(!1)},k=()=>{l(!0),E({method:"POST",url:"/game/upload",headers:{"ttmg-game-desc":encodeURIComponent(v||"--")}}).then(s=>{N(s)}).catch(s=>{T(s)})};return e.jsxs(e.Fragment,{children:[e.jsx(D,{content:()=>r?null:e.jsx("div",{className:"uploader-login-tip",children:a("loginToUpload")}),children:e.jsxs("div",{className:y("resource-uploader",{"resource-uploader-disabled":!r}),onClick:S,children:[e.jsx(x,{size:"default"}),e.jsx("div",{className:"uploader-text",children:a("upload")})]})}),e.jsx(F,{footer:null,visible:f,onCancel:C,title:a("uploadToPlatform"),children:e.jsxs("div",{className:"uploader-modal-content",children:[j&&e.jsx("div",{className:"upload-loading-container",children:e.jsx("div",{className:"loading-spin",children:e.jsx(A,{size:"large"})})}),d&&e.jsx(m.Text,{style:{color:"var(--tt-error-text)",marginBottom:12,marginTop:12},children:d}),e.jsxs(g,{ref:p,onChange:({values:s})=>{c(s?.gameDescription||"--"),n("")},children:[e.jsx(g.TextArea,{label:a("gameAssetDescription"),placeholder:a("gameAssetDescription"),field:"gameDescription"}),e.jsxs("div",{className:"uploader-button-container",onClick:k,children:[e.jsx(x,{className:"uploader-button-icon"}),e.jsx("div",{className:"uploader-button-text",children:a("uploadGamePackageTip")})]})]})]})})]})};export{B as GameUploader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,d as N,u as M,r as n,s as S,j as e,e as b,P as v,i as o,T as L,b as m,D as z,o as C}from"./index-
|
|
1
|
+
import{c as x,d as N,u as M,r as n,s as S,j as e,e as b,P as v,i as o,T as L,b as m,D as z,o as C}from"./index-C_G_C9eS.js";import{B as I}from"./index-CyDpw03-.js";import{S as E}from"./SectionHeader-CAuUcT9Q.js";import{C as f}from"./Card-D4FjfZC9.js";import{S as T}from"./sparkles-JXa7CZhS.js";const w=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],B=x("bug",w);const _=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],q=x("wrench",_);function A(){return N({url:"/game/changelog",method:"GET"})}const D=[{key:"feature",icon:T,titleI18n:"changelogFeature",tone:"success"},{key:"optimize",icon:q,titleI18n:"changelogOptimize",tone:"warn"},{key:"bugfix",icon:B,titleI18n:"changelogBugfix",tone:"error"}],G=()=>{const{state:{devToolVersion:r}}=M(),d=C,[h,p]=n.useState([]),[j,l]=n.useState(!0),[c,u]=n.useState("");return n.useEffect(()=>{r&&S(r)},[r]),n.useEffect(()=>{let a=!1;return(async()=>{l(!0),u("");const s=await A();if(!a){if(s?.error||s?.code!==0||!s?.data){p([]),u(typeof s?.error=="object"&&s.error?.errorMsg||"Failed to load changelog."),l(!1);return}p(s.data.items||[]),l(!1)}})(),()=>{a=!0}},[]),j?e.jsx("div",{className:"change-log-container change-log-loading",children:e.jsx(b,{size:"large"})}):e.jsxs("div",{className:"change-log-container",children:[e.jsx(v,{title:o("changelog"),subtitle:o("changelogTip")}),c?e.jsx(I,{fullMode:!1,bordered:!1,closeIcon:null,type:"danger",description:c}):null,!c&&h.length===0?e.jsx(f,{padding:"lg",children:e.jsx(L.Paragraph,{className:"change-log-empty",children:"No changelog entries yet."})}):null,h.map(a=>e.jsxs(f,{padding:"md",className:"change-log-item",children:[e.jsxs("div",{className:"change-log-item-head",children:[e.jsx("h2",{className:"change-log-version",children:a.title}),e.jsxs(m,{tone:"neutral",size:"sm",children:["iOS ",a.target.iOS," · Android ",a.target.Android]})]}),D.map(({key:i,icon:s,titleI18n:y,tone:k})=>{const g=a.changes?.[i]||[];return g.length?e.jsxs("section",{className:"change-log-section",children:[e.jsx(E,{icon:s,title:e.jsxs("span",{className:"change-log-section-title",children:[e.jsx("span",{children:o(y)}),e.jsx(m,{tone:k,size:"sm",children:g.length})]})}),e.jsx("ul",{className:"change-log-changes",children:g.map(t=>e.jsxs("li",{className:"change-log-change",children:[e.jsx("span",{className:"change-log-change-bullet","aria-hidden":!0}),e.jsxs("span",{className:"change-log-change-body",children:[t.desc[d],t?.link?e.jsx(z,{className:"change-log-change-link",href:t.link,iconSize:12,children:o("changelogLink")}):null]})]},t.desc[d]))})]},i):null})]},a.title))]})};export{G as ChangeLog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ag as o,r as c,o as n,j as e,T as h,i as l,m,ah as d,d as g}from"./index-
|
|
1
|
+
import{ag as o,r as c,o as n,j as e,T as h,i as l,m,ah as d,d as g}from"./index-C_G_C9eS.js";import{D as r}from"./index-Bbsc4UYr.js";function u(a){return c.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},a),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m6.62 3.25.44.75H2.6C1.72 4 1 4.67 1 5.5S1.72 7 2.6 7h1.9c0 2.45 1.1 4.71 2.5 6.5-1.1.64-2.63 1-4 1a1.5 1.5 0 1 0 0 3c2.23 0 4.3-.7 6-1.88 1.4.98 3.06 1.62 4.85 1.82l-1.7 3.39a1.5 1.5 0 0 0 2.7 1.34l.58-1.17h4.14l.59 1.17a1.5 1.5 0 0 0 2.68-1.34l-4-8a1.5 1.5 0 0 0-2.68 0l-.85 1.7a1.5 1.5 0 0 0-.31-.03c-1.37 0-2.9-.36-4-1A10.7 10.7 0 0 0 13.5 7h1.9c.88 0 1.6-.67 1.6-1.5S16.28 4 15.4 4h-4.88l-1.3-2.25a1.5 1.5 0 0 0-2.6 1.5ZM7.5 7h3c0 1.69-.56 3.25-1.5 4.5A7.47 7.47 0 0 1 7.5 7Zm10 9.85L18.57 19h-2.14l1.07-2.15Z",fill:"currentColor"}))}const w=o(u,"language"),i=[{code:"zh-CN",labelKey:"langChinese",short:"中"},{code:"en-US",labelKey:"langEnglish",short:"EN"}];async function p(a){if(a!==n){d(a);try{await g({url:"/game/language",method:"POST",data:{lang:a}})}catch{}window.location.reload()}}const f=()=>{const a=i.find(t=>t.code===n)?.short??"EN";return e.jsx(r,{trigger:"hover",position:"bottomRight",render:e.jsx(e.Fragment,{children:i.map(t=>{const s=t.code===n;return e.jsxs(r.Item,{onClick:()=>{p(t.code)},className:"lang-switcher-item"+(s?" lang-switcher-item-active":""),children:[e.jsx("span",{className:"lang-switcher-item-label",children:l(t.labelKey)}),s?e.jsx(m,{className:"lang-switcher-item-check"}):null]},t.code)})}),children:e.jsxs("div",{className:"lang-switcher tt-header-chip","aria-label":l("languageSwitcherLabel"),children:[e.jsx(w,{className:"lang-switcher-icon"}),e.jsx(h.Text,{className:"lang-switcher-text",children:a})]})})};export{f as LangSwitcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as e,S as b,T as k}from"./index-
|
|
1
|
+
import{r as s,j as e,S as b,T as k}from"./index-C_G_C9eS.js";import{C as g}from"./index-aQ98LrVv.js";const S=c=>{const{open:C,onClose:u}=c,[t,n]=s.useState(!0),[o,l]=s.useState(!1),[r,d]=s.useState(!1),[x,m]=s.useState(!1),i=[{label:"是否开启域名校验",description:"开启后,客户端将校验所有请求的域名是否合法,建议开发环境关闭以便调试。",checked:t,onChange:n},{label:"是否开启 IAA Mock",description:"启用后,广告相关接口将返回模拟数据,方便开发和测试广告逻辑。",checked:o,onChange:l},{label:"是否开启 IAP Mock",description:"启用后,内购相关流程将使用模拟支付,避免真实扣费。",checked:r,onChange:d}];return e.jsx("div",{children:e.jsx(b,{vertical:!0,align:"start",spacing:"loose",children:i.map((a,h)=>e.jsxs("div",{children:[e.jsx(g,{checked:a.checked,onChange:p=>a.onChange(p.target.checked),children:a.label}),e.jsx(k.Text,{type:"tertiary",style:{display:"block",marginTop:4},children:a.description})]},h))})})};export{S as DebugSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ag as U,r as T,bF as J,bG as K,aw as H,t as $,w as M,U as _,bt as Q,R as o,z as P,M as I,J as t,y as L,aR as w,aN as ee,aS as te}from"./index-BegU9LBT.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var R,j;function ie(){if(j)return R;j=1;var u=J(),e=K(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return R=s,R}var oe=ie();const de=H(oe),G={PREFIX:`${$}-checkbox`,INPUT:`${$}-checkbox-input`,WRAPPER:""},le={PREFIX:`${$}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends M{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:w({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:w({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:V}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const Z=(this.context.checkboxGroup.value||[]).includes(g);n.checked=Z}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,Y=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:V&&B}),q=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:q,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:Y,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:V&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends M{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class F extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}F.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};F.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=F;export{he as C,de as _,y as a,F as b};
|
|
1
|
+
import{ag as U,r as T,bF as J,bG as K,aw as H,t as $,w as M,U as _,bt as Q,R as o,z as P,M as I,J as t,y as L,aR as w,aN as ee,aS as te}from"./index-C_G_C9eS.js";function ae(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{d:"M5 12.5c0-.83.67-1.5 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 5 12.5Z",fill:"currentColor"}))}const se=U(ae,"checkbox_indeterminate");function ne(u){return T.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},u),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.41 7.3c.66.51.78 1.45.28 2.11l-6.5 8.5a1.5 1.5 0 0 1-2.37.01l-3.5-4.5a1.5 1.5 0 1 1 2.36-1.84L10 14.54l5.32-6.95a1.5 1.5 0 0 1 2.1-.28Z",fill:"currentColor"}))}const re=U(ne,"checkbox_tick");var R,j;function ie(){if(j)return R;j=1;var u=J(),e=K(),a="[object Boolean]";function s(r){return r===!0||r===!1||e(r)&&u(r)==a}return R=s,R}var oe=ie();const de=H(oe),G={PREFIX:`${$}-checkbox`,INPUT:`${$}-checkbox-input`,WRAPPER:""},le={PREFIX:`${$}-checkboxGroup`},p={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class ce extends M{constructor(e){super(Object.assign({},e)),this.clickState=!1,this.handleFocusVisible=a=>{const{target:s}=a;try{if(this.clickState){this.clickState=!1;return}s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{_(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:e,extra:a,extraId:s,addonId:r}=this.getProps();e&&!r&&this._adapter.setAddonId(),a&&!s&&this._adapter.setExtraId()}notifyChange(e,a){const s=this._adapter.generateEvent(e,a);this._adapter.notifyChange(s)}handleChange(e){if(this.getProp("disabled"))return;if(e?.type==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(e);return}const l=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(l,e):(this.setChecked(l),this.notifyChange(l,e))}handleChangeInGroup(e){const{value:a}=this.getProps(),l=!this._adapter.getGroupValue().includes(a),c=this._adapter.generateEvent(l,e);this._adapter.notifyChange(c),this._adapter.notifyGroupChange(c)}handleEnterPress(e){Q(e)&&this.handleChange(e)}setChecked(e){this._adapter.setNativeControlChecked(e)}destroy(){}}const N=o.createContext({});class A extends T.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:e}=this.props;this.inputEntity.focus({preventScroll:e})}render(){const{indeterminate:e,checked:a,disabled:s,prefixCls:r,name:l,isPureCardType:c,addonId:E,extraId:x,focusInner:f,onInputFocus:g,onInputBlur:m}=this.props,h=r||G.PREFIX,v=P({[`${h}-inner`]:!0,[`${h}-inner-checked`]:!!a,[`${h}-inner-pureCardType`]:c},G.WRAPPER),k=P({[`${h}-inner-display`]:!0,[`${h}-focus`]:f,[`${h}-focus-border`]:f&&!a}),C=a?o.createElement(re,null):e?o.createElement(se,null):null,i={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":s,"aria-checked":a,"aria-labelledby":E,"aria-describedby":x||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:G.INPUT,onChange:I,checked:a,disabled:s,onFocus:g,onBlur:m};return l&&(i.name=l),o.createElement("span",{className:v},o.createElement("input",Object.assign({},i,{ref:b=>{this.inputEntity=b}})),o.createElement("span",{className:k},C))}}A.contextType=N;A.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,disabled:t.bool,onChange:t.func,children:t.node,grouped:t.bool,value:t.any,isPureCardType:t.bool,addonId:t.string,extraId:t.string,focusInner:t.bool,onInputFocus:t.func,onInputBlur:t.func,preventScroll:t.bool};A.defaultProps={onChange:I};class y extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:e=>{this.setState({checked:e})},notifyChange:e=>{const{onChange:a}=this.props;a&&a(e)},generateEvent:(e,a)=>{const{props:s}=this;return{target:Object.assign(Object.assign({},s),{checked:e}),stopPropagation:()=>{a.stopPropagation()},preventDefault:()=>{a.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{a.nativeEvent&&typeof a.nativeEvent.stopImmediatePropagation=="function"&&a.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:e=>{this.context.checkboxGroup.onChange(e)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:w({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:w({prefix:"extra"})})},setFocusVisible:e=>{this.setState({focusVisible:e})},focusCheckboxEntity:()=>{this.focus()}})}constructor(e){super(e),this.handleChange=s=>this.foundation.handleChange(s),this.handleEnterPress=s=>this.foundation.handleEnterPress(s),this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()};const a=!1;this.state={checked:e.checked||e.defaultChecked||a,addonId:e.addonId,extraId:e.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new ce(this.adapter)}componentDidUpdate(e){this.props.checked!==e.checked&&(ee(this.props.checked)?this.foundation.setChecked(!1):de(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:e,style:a,prefixCls:s,className:r,indeterminate:l,children:c,onMouseEnter:E,onMouseLeave:x,extra:f,value:g,role:m,tabIndex:h,id:v,type:k}=this.props,{checked:C,addonId:i,extraId:b,focusVisible:V}=this.state,n={checked:C,disabled:e},O=this.isInGroup();if(O){if(this.context.checkboxGroup.value){const Z=(this.context.checkboxGroup.value||[]).includes(g);n.checked=Z}this.context.checkboxGroup.disabled&&(n.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:D,isPureCardType:z}=this.context.checkboxGroup;n.isCardType=D,n.isPureCardType=z,n.name=this.context.checkboxGroup.name}else n.isPureCardType=k===p.TYPE_PURECARD,n.isCardType=k===p.TYPE_CARD||n.isPureCardType;const d=s||G.PREFIX,B=n.isCardType||n.isPureCardType,Y=P(d,{[`${d}-disabled`]:n.disabled,[`${d}-indeterminate`]:l,[`${d}-checked`]:n.checked,[`${d}-unChecked`]:!n.checked,[`${d}-cardType`]:n.isCardType,[`${d}-cardType_disabled`]:n.disabled&&n.isCardType,[`${d}-cardType_enable`]:!(n.disabled&&n.isCardType),[`${d}-cardType_checked`]:n.isCardType&&n.checked&&!n.disabled,[`${d}-cardType_checked_disabled`]:n.isCardType&&n.checked&&n.disabled,[r]:!!r,[`${d}-focus`]:V&&B}),q=P(`${d}-extra`,{[`${d}-cardType_extra_noChildren`]:n.isCardType&&!c});O&&this.context.checkboxGroup.name;const W=this.props["x-semi-children-alias"]||"children",X=()=>!c&&!f?null:o.createElement("div",{className:`${d}-content`},c?o.createElement("span",{id:i,className:`${d}-addon`,"x-semi-prop":W},c):null,f?o.createElement("div",{id:b,className:q,"x-semi-prop":"extra"},f):null);return o.createElement("span",Object.assign({role:m,tabIndex:h,style:a,className:Y,id:v,onMouseEnter:E,onMouseLeave:x,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),o.createElement(A,Object.assign({},this.props,n,{addonId:c&&i,extraId:f&&b,isPureCardType:n.isPureCardType,ref:D=>{this.checkboxEntity=D},focusInner:V&&!B,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),X())}}y.contextType=N;y.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,checked:t.bool,defaultChecked:t.bool,disabled:t.bool,indeterminate:t.bool,onChange:t.func,value:t.any,style:t.object,className:t.string,prefixCls:t.string,onMouseEnter:t.func,onMouseLeave:t.func,extra:t.node,index:t.number,"aria-label":t.string,tabIndex:t.number,preventScroll:t.bool,type:t.string};y.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:I,onMouseEnter:I,onMouseLeave:I,type:"default"};y.elementType="Checkbox";class S extends M{static get checkboxGroupDefaultAdapter(){return{}}constructor(e){super(Object.assign(Object.assign({},S.checkboxGroupDefaultAdapter),e))}init(){const{defaultValue:e,value:a}=this.getProps();typeof e<"u"&&!Array.isArray(e)&&_(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof a<"u"&&!Array.isArray(a)&&_(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(e){this._adapter.notifyChange(e)}handleChange(e){const a=this.getState("value");let s=[];Array.isArray(a)||(s=[a]),e.target.checked?s=[...a,e.target.value]:s=a.filter((l,c)=>l!==e.target.value),"value"in this.getProps()?this.notifyChange(s):(this._adapter.updateGroupValue(s),this.notifyChange(s))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(e){Array.isArray(e)?this._adapter.updateGroupValue(e):(typeof e>"u"&&this._adapter.updateGroupValue([]),_(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}class F extends L{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:e=>{this.setState({value:e})},notifyChange:e=>{this.props.onChange&&this.props.onChange(e)}})}constructor(e){super(e),this.state={value:e.value||e.defaultValue},this.foundation=new S(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(e){te(e.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(e){this.foundation.handleChange(e)}render(){const{children:e,options:a,prefixCls:s,direction:r,className:l,id:c,style:E,type:x,disabled:f}=this.props,g=x===p.TYPE_PURECARD,m=x===p.TYPE_CARD||g,h=s||le.PREFIX,v=P({[h]:!0,[`${h}-wrapper`]:!0,[`${h}-${r}`]:r,[`${h}-${r}-cardType`]:r&&m,[`${h}-${r}-pureCardType`]:r&&g},l),k=this.state.value.slice();let C;return a?C=(a||[]).map((i,b)=>typeof i=="string"?o.createElement(y,{role:"listitem",key:b,disabled:this.props.disabled,value:i,prefixCls:s},i):o.createElement(y,{role:"listitem",key:b,disabled:i.disabled||this.props.disabled,value:i.value,prefixCls:s,extra:i.extra,className:i.className,style:i.style,onChange:i.onChange},i.label)):e&&(C=o.Children.toArray(e).map((i,b)=>o.cloneElement(i,{key:b,role:"listitem"}))),o.createElement("div",Object.assign({id:c,role:"list","aria-label":this.props["aria-label"],className:v,style:E,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),o.createElement(N.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:k,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:m,isPureCardType:g}}},C))}}F.propTypes={"aria-describedby":t.string,"aria-errormessage":t.string,"aria-invalid":t.bool,"aria-labelledby":t.string,"aria-required":t.bool,defaultValue:t.array,disabled:t.bool,name:t.string,options:t.array,value:t.array,onChange:t.func,children:t.node,prefixCls:t.string,direction:t.oneOf(p.DIRECTION_SET),className:t.string,type:t.oneOf([p.TYPE_DEFAULT,p.TYPE_CARD,p.TYPE_PURECARD]),style:t.object};F.defaultProps={disabled:!1,onChange:()=>{},type:p.TYPE_DEFAULT,defaultValue:[],direction:p.DEFAULT_DIRECTION};class he extends y{}he.Group=F;export{he as C,de as _,y as a,F as b};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as f,h as u,j as r,T as i,i as a,B as x,D as M}from"./index-BegU9LBT.js";import{B as Z}from"./index-CcUgN29Y.js";var g=Object.defineProperty,d=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,h=(c,l,t)=>l in c?g(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t,I=(c,l)=>{for(var t in l||(l={}))k.call(l,t)&&h(c,t,l[t]);if(d)for(var t of d(l))w.call(l,t)&&h(c,t,l[t]);return c};function _(c){return e.createElement("svg",I({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},c),e.createElement("rect",{width:200,height:200,fill:"transparent"}),e.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),e.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),e.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),e.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),e.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),e.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),e.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},e.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),e.createElement("g",{mask:"url(#mask_failure_130_526)"},e.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),e.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),e.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),e.createElement("mask",{id:"path-18-inside-1",fill:"white"},e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),e.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),e.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),e.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),e.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),e.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),e.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),e.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),e.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),e.createElement("defs",null,e.createElement("clipPath",{id:"clip_failure_96_39_65"},e.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var N=_;const R=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],P=f("shield-alert",R);const b=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],T=f("wifi-off",b),O="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",L=({errorMsg:c,errorState:l="unknown"})=>{const t=u(),o=l==="notLoggedIn"||l==="loginExpired",m=l==="noPermission",n=l==="networkProxy",y=o?"projectInfo.error.login.title":m?"projectInfo.error.permission.title":n?"projectInfo.error.network.title":"projectInfo.error.general.title",v=o?"projectInfo.error.login.desc":m?"projectInfo.error.permission.desc":n?"projectInfo.error.network.desc":"projectInfo.error.general.desc",E=o?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:m?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:n?["projectInfo.error.network.stepCheck","projectInfo.error.network.stepProxy","projectInfo.error.network.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],p=o?[{label:"projectInfo.error.commandLogin",command:"ttmg login",hint:""},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""},{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"}]:n?[{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""}]:[];return r.jsxs("div",{className:`error-display error-display-${l}`,children:[r.jsx(Z,{className:"error-display-banner",type:m||o||n?"warning":"danger",closeIcon:null,description:r.jsxs("div",{className:"error-display-banner-content",children:[r.jsx(i.Text,{strong:!0,children:a(y)}),r.jsx(i.Text,{children:a(v)})]})}),r.jsxs("div",{className:"error-display-panel",children:[r.jsxs("div",{className:"error-display-hero",children:[r.jsx("div",{className:"error-display-hero-illustration",children:m?r.jsx("div",{className:"error-display-permission-mark",children:r.jsx(P,{size:72,strokeWidth:1.8})}):n?r.jsx("div",{className:"error-display-network-mark",children:r.jsx(T,{size:72,strokeWidth:1.8})}):r.jsx(N,{})}),r.jsxs("div",{className:"error-display-hero-copy",children:[r.jsx(i.Title,{heading:4,children:a("projectInfo.error.guideTitle")}),r.jsx(i.Paragraph,{className:"error-display-main-text",children:c})]})]}),r.jsxs("div",{className:"error-display-guide-grid",children:[r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),r.jsx("div",{className:"error-display-step-list",children:E.map((s,j)=>r.jsxs("div",{className:"error-display-step-item",children:[r.jsx("span",{className:"error-display-step-index",children:j+1}),r.jsx(i.Text,{children:a(s)})]},s))}),p.length>0?r.jsx("div",{className:"error-display-command-list",children:p.map(s=>r.jsxs("div",{className:"error-display-command-item",children:[r.jsx(i.Text,{type:"tertiary",children:a(s.label)}),r.jsx("code",{children:s.command}),s.hint?r.jsx(i.Text,{type:"tertiary",className:"error-display-command-hint",children:a(s.hint)}):null]},s.command))}):null]}),r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.helpTitle")}),r.jsx(i.Paragraph,{className:"error-display-help-text",children:o?a("projectInfo.error.helpLoginDesc"):m?a("projectInfo.error.helpPermissionDesc"):n?a("projectInfo.error.helpNetworkDesc"):a("projectInfo.error.helpGeneralDesc")}),o||n?r.jsxs("div",{className:"error-display-actions",children:[o?r.jsx(x,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(M,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{L as A};
|
|
1
|
+
import{r as e,c as f,h as u,j as r,T as i,i as a,B as x,D as M}from"./index-C_G_C9eS.js";import{B as Z}from"./index-CyDpw03-.js";var g=Object.defineProperty,d=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,h=(c,l,t)=>l in c?g(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t,I=(c,l)=>{for(var t in l||(l={}))k.call(l,t)&&h(c,t,l[t]);if(d)for(var t of d(l))w.call(l,t)&&h(c,t,l[t]);return c};function _(c){return e.createElement("svg",I({width:200,height:200,viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,"aria-hidden":!0},c),e.createElement("rect",{width:200,height:200,fill:"transparent"}),e.createElement("path",{d:"M74.7 78.6c20.78-6.32 57.55-12.26 71.81-9.86 4.21.7 8.12 1.98 11.36 3.42-.51-1.69-.95-3.5-1.38-5.3l-.04-.18c-1.03-4.27-2.05-8.44-3.95-10.55-4.8-5.32.67-10.12.67-10.12l.93-10.53c13.02 4.82 21.65 14.92 27 25.08 4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1.64 2.18 5.44 19.18 7.53 32.66l-46.15.58-7.58-14.68-4.66-12.26c-19.46 7.46-50.77 19.02-64.9 18.44-10.35-.42-15.68-15.68-17.44-28.7a71.55 71.55 0 0 1-.67-9.4c0-5.64.3-12.18 2.22-17.89.74-2.21 1.73-4.3 3.04-6.17a18.1 18.1 0 0 1 4.6-4.59c0 4-1.02 13.54 2.8 14.12 5.06.78 10.4-9.08 13.85-7.06 3.87 2.27-1.65 16.34-1.33 17.2.27.7.53 1.4.76 2.07a48.99 48.99 0 0 1 2.25 8.55C46.59 87.56 60 83.06 74.69 78.6Z",fill:"white"}),e.createElement("path",{d:"M181.1 60.56c4.57 8.67 6.75 17.37 7.25 22.89 1.06 12-8.18 18.86-19.2 18.86-9.74 0-18.36-1.64-24.81-3.1m36.77-38.65c-5.36-10.16-13.99-20.26-27-25.08l-.94 10.53s-5.46 4.8-.67 10.12c1.9 2.11 2.92 6.28 3.95 10.55m24.66-6.12c-6-.37-18.32.8-24.66 6.12m0 0c1.57 6.53 3.15 13.3 7.91 13.3 7.2 0-3.6-8.84-17.85-11.24-14.25-2.4-51.03 3.54-71.82 9.86-20.78 6.32-39.04 12.71-42.77 19.1-3.63 6.23 13.24 10.92 4.49-14.17m0 0c-.23-.67-.49-1.36-.76-2.08-.32-.85 5.2-14.92 1.33-17.19-3.45-2.02-8.8 7.84-13.85 7.06-3.82-.58-2.8-10.12-2.8-14.12a18.1 18.1 0 0 0-4.6 4.6M36.4 83.52c-7.27 1.58-21.92 8.1-25.27 11.73m0 0a71.55 71.55 0 0 1-.67-9.41c0-5.64.3-12.18 2.22-17.89m-1.55 27.3c1.76 13 7.09 28.27 17.45 28.7 14.12.57 45.43-10.99 64.89-18.45l4.66 12.26 7.58 14.68 46.15-.58c-2.09-13.48-6.89-30.48-7.53-32.67M15.73 61.8c-.98 3-1.08 5.5.19 7.8m-.2-7.8a24.08 24.08 0 0 0-3.03 6.16m0 0a5.43 5.43 0 0 0 1.25 4.22m130.4 27.02c-.9-3.08-3.12-9.95-4.76-12.76",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m156.89 15.66-2.04 27.96 2.57 28.1c-7.51-3.07-13.32-4.34-27.25-3.36-11.94.83-31.75 3.95-46.23 7.62-16.66 4.27-37.81 11.64-45.21 15.9-.77-4.64-2.92-10.15-2.92-10.15-.07-.7 2.63-8.32 2.73-13.06.08-3.08-.91-4.45-2.33-4.75a3.47 3.47 0 0 0-2.05.35c-.63.32-.86.48-1.38.84-1.34.98-2.38 2.02-3.95 3.34a17.14 17.14 0 0 1-3.04 2.17 4.6 4.6 0 0 1-2.89.63c-.63-.1-1.21-.47-1.71-1.58l-.07-.89c-.5-5.79-2.7-20.12-2.7-34.91 0-7.74 1.61-10.04 2.7-11.59l.13-.18c3.85-5.53 13.67-6.75 23.12-6.96 2.5-.14 5.2-.2 8.1-.17l.11.15H53.15l-.52.07 18.32 25.49-3.62 14.08 10.2 15.98-2.84-16.49 10-11.99-3.5-27.7s8.78-.5 19.47-1.77c10.69-1.28 18.47-1.9 29.42-1.83 1.64.01 3.4.1 5.23.22 9.64.65 18.55 2.56 21.46 4.4l.13.09h-.01Z",fill:"var(--semi-color-primary-light-default)"}),e.createElement("path",{d:"M143 27.91a1.38 1.38 0 0 1 1.77-.85c.5.18.98.41 1.44.71a1.38 1.38 0 0 1-1.53 2.31c-.26-.17-.53-.3-.82-.4a1.38 1.38 0 0 1-.85-1.77Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M140.65 28.12c.21.74-.21 1.5-.95 1.72-.36.1-.73.22-1.11.36a1.38 1.38 0 1 1-.95-2.6c.43-.16.87-.3 1.3-.43.74-.2 1.5.22 1.71.95Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M134.74 30.4c.37.67.14 1.51-.53 1.89l-1.07.62a1.38 1.38 0 1 1-1.41-2.38l1.12-.65a1.38 1.38 0 0 1 1.89.52Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M97.86 31.43h.76a1.38 1.38 0 1 1-.06 2.77h-.52a6.7 6.7 0 0 0-.57.1 1.38 1.38 0 0 1-.64-2.68c.33-.08.64-.14.94-.18l.09-.01Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M147.78 31.75c.73-.23 1.5.19 1.72.92.13.43.25.88.35 1.35a1.38 1.38 0 0 1-2.7.58c-.1-.4-.19-.78-.3-1.13-.22-.73.2-1.5.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M102.27 33.13c.19-.75.94-1.2 1.68-1.01.45.11.89.23 1.3.37a1.38 1.38 0 0 1-.84 2.63c-.36-.11-.73-.22-1.13-.32a1.38 1.38 0 0 1-1-1.67Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M129.3 33.68c.42.64.25 1.5-.4 1.92l-.52.34-.53.36a1.38 1.38 0 0 1-1.53-2.31l.32-.21.21-.14.3-.2.23-.15c.64-.42 1.5-.25 1.92.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.25 35.22c.36-.67 1.2-.92 1.88-.55a246.5 246.5 0 0 1 1.11.61 1.38 1.38 0 0 1-1.33 2.43l-.5-.28h-.01l-.6-.34a1.38 1.38 0 0 1-.55-1.87Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M92.83 35.77c.76-.01 1.4.6 1.4 1.36.01.16.03.34.07.55a1.38 1.38 0 1 1-2.7.58 5.62 5.62 0 0 1-.13-1.08c-.01-.76.6-1.4 1.36-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M124 37.2c.31.7 0 1.51-.7 1.82a6.07 6.07 0 0 1-1.44.45 1.38 1.38 0 1 1-.67-2.68l.58-.16c.1-.03.24-.07.42-.15.7-.3 1.51.02 1.82.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M113.9 38.14c.15-.75.89-1.22 1.63-1.06.35.07.72.13 1.1.16a1.38 1.38 0 0 1-.26 2.76c-.49-.05-.96-.12-1.41-.22a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.98 37.95c.76-.01 1.4.6 1.4 1.36a38.45 38.45 0 0 1 0 1.42 1.38 1.38 0 0 1-2.77-.08 24.28 24.28 0 0 0 0-1.3c0-.76.6-1.39 1.37-1.4Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M148.6 44.88c.75.16 1.22.9 1.06 1.65-.1.47-.22.94-.34 1.41a1.38 1.38 0 1 1-2.68-.7c.12-.43.22-.87.31-1.3.17-.75.9-1.22 1.65-1.06Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M146.69 51.6c.7.31 1 1.13.7 1.83-.2.44-.41.88-.63 1.31a1.38 1.38 0 0 1-2.48-1.24c.2-.4.4-.8.58-1.2.31-.7 1.13-1.01 1.83-.7Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M41.67 55.45c.07.77-.5 1.44-1.25 1.5-.43.04-.86.1-1.26.19a1.38 1.38 0 1 1-.54-2.72c.5-.1 1.02-.17 1.55-.22.76-.07 1.43.5 1.5 1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M44.58 55.78c.22-.73 1-1.15 1.72-.93l.74.23a1.38 1.38 0 1 1-.9 2.62l-.62-.2a1.38 1.38 0 0 1-.94-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M91.9 56.9c.05.76-.52 1.42-1.29 1.47-.44.02-.89.06-1.32.11a1.38 1.38 0 0 1-.31-2.75c.48-.05.96-.1 1.45-.13.77-.05 1.42.53 1.47 1.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M94.72 56.95c.07-.76.74-1.33 1.5-1.26l1.43.14a1.38 1.38 0 0 1-.32 2.75c-.45-.05-.9-.1-1.35-.13a1.38 1.38 0 0 1-1.26-1.5Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M101.64 57.83c.16-.75.9-1.22 1.64-1.07l1.39.31a1.38 1.38 0 1 1-.62 2.7l-1.34-.3a1.38 1.38 0 0 1-1.07-1.64Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M34.85 57.26c.48.6.39 1.46-.2 1.94-.33.27-.63.55-.9.84a1.38 1.38 0 0 1-2.03-1.89c.36-.39.76-.75 1.18-1.1.6-.48 1.46-.39 1.95.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M85 57.9c.29.71-.06 1.51-.78 1.8a15.8 15.8 0 0 0-1.26.54 1.38 1.38 0 1 1-1.15-2.52 71.64 71.64 0 0 1 1.4-.6c.71-.28 1.52.07 1.8.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M143.4 57.76c.61.47.72 1.34.26 1.95-.3.39-.62.77-.94 1.14a1.38 1.38 0 0 1-2.09-1.81 24 24 0 0 0 .84-1.03c.47-.6 1.33-.71 1.94-.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M108.43 59.46c.22-.74.99-1.15 1.72-.93l1.35.41a1.38 1.38 0 1 1-.82 2.64l-1.32-.4a1.38 1.38 0 0 1-.93-1.72Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M115.08 61.58a1.38 1.38 0 0 1 1.77-.82l1.32.48a1.38 1.38 0 0 1-.97 2.6c-.43-.17-.87-.33-1.3-.48a1.38 1.38 0 0 1-.82-1.78Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M138.67 62.89c.42.64.25 1.5-.4 1.92-.41.27-.85.54-1.29.78a1.38 1.38 0 0 1-1.32-2.43c.37-.2.73-.43 1.1-.66.63-.42 1.49-.25 1.91.39Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M30.5 62.78c.77.07 1.33.74 1.26 1.5l-.03.59.01.75-1.6 1.4a1.38 1.38 0 0 1-1.16-1.32l-.02-.83c0-.28.02-.56.04-.84.07-.76.75-1.32 1.5-1.25Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M121.6 64.07c.3-.7 1.1-1.04 1.8-.75a146.8 146.8 0 0 1 1.26.52 1.38 1.38 0 1 1-.97 2.59 19.62 19.62 0 0 1-1.35-.55c-.7-.3-1.04-1.1-.74-1.81Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M72.11 64.94c.48.6.4 1.47-.2 1.95-.38.3-.74.62-1.09.92A1.38 1.38 0 1 1 69 65.73c.37-.33.76-.66 1.17-.99.59-.48 1.46-.39 1.94.2Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M132.4 65.92c.09.76-.46 1.44-1.22 1.53-.5.05-1.02.08-1.53.09a1.38 1.38 0 1 1-.02-2.77c.42 0 .84-.03 1.25-.07.76-.09 1.44.46 1.53 1.22Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M66.66 69.9c.57.52.6 1.4.09 1.96l-.73.8-.02.02-.16.18-.08.09a1.38 1.38 0 0 1-2.05-1.86l.25-.28.75-.82c.51-.56 1.39-.6 1.95-.09Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M61.6 75.28c.45.61.31 1.48-.3 1.93-.44.31-.88.61-1.36.89a1.38 1.38 0 1 1-1.4-2.4c.4-.22.77-.46 1.12-.72a1.38 1.38 0 0 1 1.94.3Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M37.67 75.97c.42.19.86.37 1.35.53a1.38 1.38 0 0 1-.89 2.62c-.56-.19-1.1-.4-1.6-.63l.72-2.63c.14.01.28.05.42.11Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M55.05 78.57c.12.75-.4 1.46-1.15 1.58-.5.08-1 .15-1.54.2a1.38 1.38 0 1 1-.28-2.75c.49-.05.95-.11 1.39-.18.75-.12 1.46.4 1.58 1.15Z",fill:"var(--semi-color-primary)"}),e.createElement("path",{d:"M43.4 78.87c.06-.76.73-1.33 1.49-1.27a38.43 38.43 0 0 0 1.5.1 1.38 1.38 0 1 1-.12 2.76 62.94 62.94 0 0 1-1.6-.1 1.38 1.38 0 0 1-1.27-1.49Z",fill:"var(--semi-color-primary)"}),e.createElement("g",{clipPath:"url(#clip_failure_96_39_65)"},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.9 46.87a13.45 13.45 0 0 1 9.37-16.53 13.46 13.46 0 0 1 16.52 9.39c2.64 9.56-4.76 29.27-5.14 29.9a.75.75 0 0 1-.99.27c-.64-.34-17.11-13.47-19.76-23.03Zm14.36 1.54a6.1 6.1 0 0 1-3.25-11.75 6.1 6.1 0 0 1 3.25 11.75Z",fill:"var(--semi-color-primary)"})),e.createElement("path",{d:"M102.31 100.69c-2.8 1.55-5.63 2.85-9.36 4.58l1.48 3.92c2.14-.96 6.16-6.03 7.88-8.5Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M121 63.04c8.85 2.1 12.43-6.5 13.12-8.77.68-2.27-5.6-11.86-8-11.2l-.42.12-.23.06c-3.1.82-11.15 2.94-12.35 8-1.3 5.46 2.4 10.49 7.88 11.79Z",fill:"#515151"}),e.createElement("path",{d:"M134.5 64.73c-.43.47-1.2.74-2.33.73a12.7 12.7 0 0 1-4.06-.86 31.25 31.25 0 0 1-9.94-6.22c-3.25-2.97-5.97-5.8-7.59-8.42-1.61-2.61-2.05-4.88-.98-6.84a3.7 3.7 0 0 1 2.11-1.86 4.53 4.53 0 0 1 2.9.15c2.16.76 4.57 2.83 6.48 6.02 3.4 5.63 6.89 8.23 9.7 10.33.49.35.95.7 1.38 1.03a7.29 7.29 0 0 1 2.61 3.48c.34 1.1.16 1.97-.28 2.46Z",fill:"white",stroke:"#515151"}),e.createElement("mask",{id:"mask_failure_130_526","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:98,y:44,width:36,height:27},e.createElement("path",{d:"M130.53 62.1c-.5-3.3-9.52-14.75-16.08-15.03l-12.68 4.52 6.47 14.16 17.25 3.07c1.84-1.14 5.43-4.07 5.04-6.72Z",fill:"#C4C4C4"})),e.createElement("g",{mask:"url(#mask_failure_130_526)"},e.createElement("path",{d:"M127.2 63.62a9.74 9.74 0 0 1-13.76.5 9.74 9.74 0 0 1-.32-13.77 9.74 9.74 0 0 1 13.77-.5 9.74 9.74 0 0 1 .32 13.77Z",fill:"white",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m116.79 47.35-.02.37c2.86.5 8.57 2.59 8.58 6.87 0 5.36-7.44 9.34-14.47 3.46-.34-.28-.66-.53-.95-.74a10.09 10.09 0 0 0 3.17 7.17 10.24 10.24 0 0 0 14.47-.52 10.24 10.24 0 0 0-.34-14.47 10.16 10.16 0 0 0-10.44-2.14Z",fill:"#515151"}),e.createElement("path",{d:"M119.34 55a.79.79 0 1 0-1.1-1.12.79.79 0 0 0 1.1 1.12Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.98 50.72c.21-.09.45.01.54.22a7.87 7.87 0 0 0 1.84 2.65.41.41 0 1 1-.55.62 8.67 8.67 0 0 1-2.05-2.95.41.41 0 0 1 .22-.54Z",fill:"#515151"}),e.createElement("path",{d:"M114.85 52.4a.79.79 0 1 0-1.1-1.1.79.79 0 0 0 1.1 1.1Z",fill:"#515151"}),e.createElement("mask",{id:"path-18-inside-1",fill:"white"},e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)"})),e.createElement("ellipse",{rx:2.97818,ry:2.97818,transform:"matrix(0.727696 0.6859 -0.685903 0.727693 128.435 60.0508)",fill:"white"}),e.createElement("path",{d:"m128.42 60.04.01-.01a.03.03 0 0 1 .02 0l-4.12 4.37a5.98 5.98 0 0 0 8.45-.25l-4.36-4.11Zm.03 0v.02l-4.37-4.11a5.98 5.98 0 0 0 .25 8.45l4.12-4.37Zm0 .03h-.01a.03.03 0 0 1-.02 0l4.12-4.37a5.98 5.98 0 0 0-8.46.25l4.37 4.12Zm-.03 0v-.03l4.37 4.11a5.98 5.98 0 0 0-.25-8.45l-4.12 4.37Z",fill:"#515151",mask:"url(#path-18-inside-1)"})),e.createElement("path",{d:"M145.63 40.19c1.37-2.75 12.75 2.35 16.14 6.78 3.38 4.43 1.48 10.74-1.9 9.68-6.69-2.12-7.56-6.7-7.94-9.48-1.2-1.85-7.67-4.24-6.3-6.98Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"m158.95 41.56 6.64 2.52 1.66 12.47-8.3 1.98-3.47-12.03 3.47-4.94Z",fill:"white"}),e.createElement("path",{d:"M167.3 151.94c5.19 1.66 23.35 35.57 19.05 35.57-13.86 0-34.5.53-71.42.53-15.63 0-17.9-5.16-11.79-22.08a353.23 353.23 0 0 1 6.14-15.76l32.5 1.26c-.43 1.53-.91 3.07-1.38 4.4a26.82 26.82 0 0 1 8.73-1.47c5.27 0 7.04 1.4 11.77 0 2.13-.62 4.8-2.97 6.4-2.45Z",fill:"white",className:""}),e.createElement("path",{d:"M140.4 155.87c.47-1.34.95-2.88 1.38-4.4l-32.5-1.27a353.23 353.23 0 0 0-6.14 15.76c-6.1 16.92-3.84 22.08 11.79 22.08 36.93 0 57.56-.53 71.42-.53 4.3 0-13.86-33.91-19.06-35.57-1.6-.52-4.26 1.83-6.4 2.45-4.72 1.4-6.5 0-11.76 0-3.08 0-6.06.55-8.72 1.48Zm0 0a26.67 26.67 0 0 1-4.44 8.38c-1.7 2.22-3.99 4.43-5.43 4.33-1.44-.1-1.42-3.18 0-5.66 1.97-3.44 6.45-5.87 9.88-7.05Z",stroke:"#1C1F23",className:""}),e.createElement("path",{d:"M149.25 131.7s3.36 19.46-12.34 21.04c-11.53 1.15-40.77-4.55-53.76-7.79 4.72 12.82 9.61 39.86 7 42.16-3.33 2.93-47.55 1.76-55.96 0-8.42-1.75 13.82-11.46 15.45-14.66 2.99-5.84-5.48-21.18-5.75-45.45-.27-24.27 18.18-24.86 34.47-21.64 13.02 2.57 41.63 18.33 52.56 26.86l18.33-.52Z",fill:"white",stroke:"#515151"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151",className:"__web-inspector-hide-shortcut__"}),e.createElement("path",{d:"M141.5 153.87c-3.11 2.55-27.72 5-35.58 3.53l2.75-6.8c20.23 2.85 28.08 3.34 33.46 1.16l-.63 2.11Z",fill:"#515151"}),e.createElement("path",{d:"M126.02 142.7c-3.1-2.99-4.99-7.5-4.16-12.35",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M130.6 95.65c-9.03-10.98-18.97-19.74-25.5-24.56l1.63-2.22c6.7 4.95 16.81 13.86 26 25.02 9.18 11.16 17.54 24.67 20.59 38.83l-2.7.59c-2.91-13.56-10.97-26.67-20.02-37.66Z",fill:"#515151"}),e.createElement("path",{d:"m149.12 107.09-16.36 13.2 22.27 17.8 8.87-19.19c-.14-3.93-2.34-5.34-5.83-4.66l-3.12-2.5c.08-3.5-2.18-5.64-5.83-4.65Z",fill:"#E6E8EA"}),e.createElement("path",{d:"m148.24 128.62 9.45-14.34-2.91-2.33-10.94 13.07 4.4 3.6Z",stroke:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M143.67 127.98a6.93 6.93 0 1 1-10.82-8.65 6.93 6.93 0 0 1 10.82 8.65Zm12.28 9.82a6.93 6.93 0 1 1-10.82-8.66 6.93 6.93 0 0 1 10.82 8.66Z",fill:"#515151"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m133.43 123.46 9.21-1.8.32 1.61-9.2 1.81-.33-1.62Z",fill:"white"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m145.5 133.11 9.21-1.8.32 1.62-9.2 1.8-.33-1.62Z",fill:"white"}),e.createElement("defs",null,e.createElement("clipPath",{id:"clip_failure_96_39_65"},e.createElement("rect",{width:44.4004,height:44.4627,transform:"matrix(0.963965 -0.266028 0.266198 0.963918 18.4214 34.6221)",fill:"white"}))))}var N=_;const R=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],P=f("shield-alert",R);const b=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],T=f("wifi-off",b),O="https://bytedance.larkoffice.com/wiki/PeIawT4M4ia9R8kYyLMcjwHknOg",L=({errorMsg:c,errorState:l="unknown"})=>{const t=u(),o=l==="notLoggedIn"||l==="loginExpired",m=l==="noPermission",n=l==="networkProxy",y=o?"projectInfo.error.login.title":m?"projectInfo.error.permission.title":n?"projectInfo.error.network.title":"projectInfo.error.general.title",v=o?"projectInfo.error.login.desc":m?"projectInfo.error.permission.desc":n?"projectInfo.error.network.desc":"projectInfo.error.general.desc",E=o?["projectInfo.error.login.stepLogin","projectInfo.error.login.stepRestart","projectInfo.error.login.stepProxy"]:m?["projectInfo.error.permission.stepCheckAccount","projectInfo.error.permission.stepApply","projectInfo.error.permission.stepRestart"]:n?["projectInfo.error.network.stepCheck","projectInfo.error.network.stepProxy","projectInfo.error.network.stepRestart"]:["projectInfo.error.general.stepCheck","projectInfo.error.general.stepRetry"],p=o?[{label:"projectInfo.error.commandLogin",command:"ttmg login",hint:""},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""},{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"}]:n?[{label:"projectInfo.error.commandProxy",command:"ttmg config set proxy http://127.0.0.1:7890",hint:"projectInfo.error.commandProxyHint"},{label:"projectInfo.error.commandRestart",command:"ttmg dev",hint:""}]:[];return r.jsxs("div",{className:`error-display error-display-${l}`,children:[r.jsx(Z,{className:"error-display-banner",type:m||o||n?"warning":"danger",closeIcon:null,description:r.jsxs("div",{className:"error-display-banner-content",children:[r.jsx(i.Text,{strong:!0,children:a(y)}),r.jsx(i.Text,{children:a(v)})]})}),r.jsxs("div",{className:"error-display-panel",children:[r.jsxs("div",{className:"error-display-hero",children:[r.jsx("div",{className:"error-display-hero-illustration",children:m?r.jsx("div",{className:"error-display-permission-mark",children:r.jsx(P,{size:72,strokeWidth:1.8})}):n?r.jsx("div",{className:"error-display-network-mark",children:r.jsx(T,{size:72,strokeWidth:1.8})}):r.jsx(N,{})}),r.jsxs("div",{className:"error-display-hero-copy",children:[r.jsx(i.Title,{heading:4,children:a("projectInfo.error.guideTitle")}),r.jsx(i.Paragraph,{className:"error-display-main-text",children:c})]})]}),r.jsxs("div",{className:"error-display-guide-grid",children:[r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.stepTitle")}),r.jsx("div",{className:"error-display-step-list",children:E.map((s,j)=>r.jsxs("div",{className:"error-display-step-item",children:[r.jsx("span",{className:"error-display-step-index",children:j+1}),r.jsx(i.Text,{children:a(s)})]},s))}),p.length>0?r.jsx("div",{className:"error-display-command-list",children:p.map(s=>r.jsxs("div",{className:"error-display-command-item",children:[r.jsx(i.Text,{type:"tertiary",children:a(s.label)}),r.jsx("code",{children:s.command}),s.hint?r.jsx(i.Text,{type:"tertiary",className:"error-display-command-hint",children:a(s.hint)}):null]},s.command))}):null]}),r.jsxs("section",{className:"error-display-guide-card",children:[r.jsx(i.Text,{strong:!0,children:a("projectInfo.error.helpTitle")}),r.jsx(i.Paragraph,{className:"error-display-help-text",children:o?a("projectInfo.error.helpLoginDesc"):m?a("projectInfo.error.helpPermissionDesc"):n?a("projectInfo.error.helpNetworkDesc"):a("projectInfo.error.helpGeneralDesc")}),o||n?r.jsxs("div",{className:"error-display-actions",children:[o?r.jsx(x,{theme:"light",onClick:()=>t("/basic_debug_guide"),children:a("basicDebugGuide.entryAction")}):null,r.jsx(M,{href:O,children:a("projectInfo.error.openProxyDoc")})]}):null]})]})]})]})};export{L as A};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,i as r,X as n,Y as o,j as e,P as d,b as p}from"./index-
|
|
1
|
+
import{h as i,i as r,X as n,Y as o,j as e,P as d,b as p}from"./index-C_G_C9eS.js";import{C as m}from"./Card-D4FjfZC9.js";import{Z as f}from"./zap-D27jUGUv.js";import{L as h,C as u}from"./layers-Bw-W5e-K.js";const N=()=>{const t=i(),l=[{key:"wasm_split",title:r("performance.card.wasmSplit.title"),description:r("performance.card.wasmSplit.desc"),icon:f,path:"/wasm_split",tags:[{label:"Unity",tone:"info"},{label:"Wasm",tone:"neutral"}]},{key:"subpackage_collect",title:r("performance.card.subpackageCollect.title"),description:r("performance.card.subpackageCollect.desc"),icon:h,path:"/subpackage_collect",tags:[{label:r("performance.card.subpackageCollect.status"),tone:"info"},{label:"FP/TTI",tone:"accent"},{label:"Preload",tone:"neutral"}]}].filter(a=>!(a.experimentOnly&&!n()||a.localDevOnly&&!o()));return e.jsxs("div",{className:"perf-page",children:[e.jsx(d,{title:r("performance.overview.title"),subtitle:r("performance.overview.desc")}),e.jsx("section",{className:"perf-section",children:e.jsx("div",{className:"perf-tool-grid",children:l.map(a=>{const c=a.icon;return e.jsxs(m,{interactive:!0,padding:"md",className:"perf-tool-card",onClick:()=>t(a.path),role:"button",tabIndex:0,children:[e.jsxs("div",{className:"perf-tool-card-head",children:[e.jsx("span",{className:"perf-tool-card-glyph","aria-hidden":"true",children:e.jsx(c,{size:18,strokeWidth:1.75})}),e.jsx("div",{className:"perf-tool-card-titlewrap",children:e.jsxs("div",{className:"perf-tool-card-title-row",children:[e.jsx("h3",{className:"perf-tool-card-title",children:a.title}),a.tags.map(s=>e.jsx(p,{tone:s.tone??"neutral",size:"sm",variant:"outline",children:s.label},s.label))]})}),e.jsx("span",{className:"perf-tool-card-chevron","aria-hidden":"true",children:e.jsx(u,{size:16,strokeWidth:2})})]}),e.jsx("p",{className:"perf-tool-card-desc",children:a.description})]},a.key)})})})]})};export{N as Performance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as a,j as e,B as c,i as o,C as r,Z as i}from"./index-
|
|
1
|
+
import{h as t,r as a,j as e,B as c,i as o,C as r,Z as i}from"./index-C_G_C9eS.js";const d=()=>{const n=t();return a.useEffect(()=>{const s=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=s}},[]),e.jsxs("div",{className:"manual-connect-container",children:[e.jsx("div",{className:"manual-connect-back",children:e.jsx(c,{className:"devtool-page-back",theme:"borderless",onClick:()=>n("/network_diagnostics"),children:o("back")})}),e.jsx(r,{title:o("netDiagManualBindEntry"),children:e.jsx(i,{onClose:()=>n("/network_diagnostics"),onSuccess:()=>n("/network_diagnostics")})})]})};export{d as ManualConnect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-C_G_C9eS.js";const o=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=a("chevron-right",o);const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],h=a("layers",e);export{c as C,h as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-C_G_C9eS.js";const e=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],t=c("list-checks",e);export{t as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-C_G_C9eS.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-C_G_C9eS.js";const a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-C_G_C9eS.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
|
package/dist/public/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
/>
|
|
14
14
|
<title>TikTok Mini Games DevTool</title>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-C_G_C9eS.js"></script>
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/index-Ckp_mJJy.css">
|
|
17
17
|
</head>
|
|
18
18
|
<!--
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const assert = require('node:assert/strict');
|
|
2
|
+
const fs = require('node:fs');
|
|
3
|
+
const os = require('node:os');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const { spawn } = require('node:child_process');
|
|
6
|
+
|
|
7
|
+
const delay = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds));
|
|
8
|
+
|
|
9
|
+
async function run() {
|
|
10
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'ttmg-remote-process-'));
|
|
11
|
+
const game = path.join(root, 'game');
|
|
12
|
+
const evidence = path.join(root, 'evidence');
|
|
13
|
+
const clientKey = path.basename(root);
|
|
14
|
+
const outputDirectory = path.join(os.homedir(), '__TTMG__', clientKey);
|
|
15
|
+
const asset = path.join(game, 'remote/resources/config.0eb9a.json');
|
|
16
|
+
fs.mkdirSync(path.dirname(asset), { recursive: true });
|
|
17
|
+
fs.writeFileSync(path.join(game, 'game.js'), 'console.log("LOCAL_REMOTE_PROCESS");');
|
|
18
|
+
fs.writeFileSync(path.join(game, 'game.json'), '{}');
|
|
19
|
+
fs.writeFileSync(path.join(game, 'project.config.json'), JSON.stringify({ remote_cdn_resources: { base_url: 'https://remote-cdn-resources.com/', dirs: ['remote'] } }));
|
|
20
|
+
fs.writeFileSync(asset, '{"version":1}');
|
|
21
|
+
const rc = path.join(root, 'ttmgrc.json');
|
|
22
|
+
fs.writeFileSync(rc, '{}');
|
|
23
|
+
let stdout = '';
|
|
24
|
+
let stderr = '';
|
|
25
|
+
const child = spawn(process.execPath, [path.resolve(__dirname, '../dist/index.js'), 'dev', '--client-key', clientKey, '--events', 'ndjson', '--no-open', '--evidence-dir', evidence, '--timeout', '40'], {
|
|
26
|
+
cwd: game,
|
|
27
|
+
env: { ...process.env, TTMG_DEV_NO_OPEN: '1', TTMGRC_PATH: rc },
|
|
28
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
29
|
+
});
|
|
30
|
+
child.stdout.on('data', chunk => { stdout += chunk; });
|
|
31
|
+
child.stderr.on('data', chunk => { stderr += chunk; });
|
|
32
|
+
const closed = new Promise(resolve => child.once('close', resolve));
|
|
33
|
+
const guard = setTimeout(() => child.kill('SIGKILL'), 45000);
|
|
34
|
+
try {
|
|
35
|
+
const manifestFile = path.join(evidence, 'manifest.json');
|
|
36
|
+
const deadline = Date.now() + 20000;
|
|
37
|
+
while (!fs.existsSync(manifestFile) && Date.now() < deadline) {
|
|
38
|
+
if (child.exitCode !== null) throw new Error(`dev exited: ${stderr}`);
|
|
39
|
+
await delay(50);
|
|
40
|
+
}
|
|
41
|
+
assert.ok(fs.existsSync(manifestFile), stderr);
|
|
42
|
+
const manifest = JSON.parse(fs.readFileSync(manifestFile, 'utf8'));
|
|
43
|
+
const origin = `http://127.0.0.1:${manifest.network.httpPort}`;
|
|
44
|
+
const configResponse = await fetch(`${origin}/game/config`);
|
|
45
|
+
assert.equal(configResponse.status, 200);
|
|
46
|
+
const { data: config } = await configResponse.json();
|
|
47
|
+
assert.equal(config.remoteCdnResources.base_url, 'https://remote-cdn-resources.com/');
|
|
48
|
+
assert.deepEqual(config.remoteCdnResources.resources, [{ root: 'remote', output: 'remote' }]);
|
|
49
|
+
assert.equal(new URL(config.remoteResourceBaseUrl).port, String(manifest.network.httpPort));
|
|
50
|
+
assert.equal(new URL(config.remoteResourceBaseUrl).pathname, '/game/remote-resources/');
|
|
51
|
+
assert.equal(config.nodeStaticBaseUrl, `http://localhost:${manifest.network.httpPort}/game/files`);
|
|
52
|
+
const resourceUrl = `${origin}/game/remote-resources/remote/resources/config.0eb9a.json`;
|
|
53
|
+
const initialResource = await fetch(`${resourceUrl}?v=1`);
|
|
54
|
+
assert.equal(initialResource.status, 200, await initialResource.clone().text());
|
|
55
|
+
assert.deepEqual(await initialResource.json(), { version: 1 });
|
|
56
|
+
assert.equal((await fetch(`${origin}/game/remote-resources/project.config.json`)).status, 404);
|
|
57
|
+
assert.equal((await fetch(`${origin}/game/files/game.json`)).status, 200);
|
|
58
|
+
fs.writeFileSync(asset, '{"version":2}');
|
|
59
|
+
let updated = false;
|
|
60
|
+
const updateDeadline = Date.now() + 15000;
|
|
61
|
+
while (!updated && Date.now() < updateDeadline) {
|
|
62
|
+
const response = await fetch(`${resourceUrl}?v=2`);
|
|
63
|
+
updated = response.ok && (await response.json()).version === 2;
|
|
64
|
+
if (!updated) await delay(100);
|
|
65
|
+
}
|
|
66
|
+
assert.ok(updated, 'changed resource was not served after recompilation');
|
|
67
|
+
child.kill('SIGTERM');
|
|
68
|
+
assert.equal(await closed, 0, stderr);
|
|
69
|
+
const events = stdout.trim().split(/\r?\n/).filter(Boolean).map(JSON.parse);
|
|
70
|
+
assert.ok(events.every(event => event.schemaVersion === '1' && event.sessionId), 'non-event output on NDJSON stdout');
|
|
71
|
+
console.log('remote resource built-CLI process smoke passed: worker, HTTP, config, update and NDJSON');
|
|
72
|
+
} finally {
|
|
73
|
+
if (child.exitCode === null) { child.kill('SIGTERM'); await closed; }
|
|
74
|
+
clearTimeout(guard);
|
|
75
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
76
|
+
fs.rmSync(outputDirectory, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
run().catch(error => { console.error(error); process.exitCode = 1; });
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
4
|
+
const CACHE_DIRECTORY = path.join('__TTMG_TEMP__', 'remote-cdn');
|
|
5
|
+
|
|
6
|
+
function relativeDirectory(value) {
|
|
7
|
+
if (typeof value !== 'string' || !value || /[\\:\x00-\x1f]/.test(value) ||
|
|
8
|
+
value.split('/').some(part => !part || part === '.' || part === '..') ||
|
|
9
|
+
value.split('/')[0] === '__TTMG_TEMP__') {
|
|
10
|
+
throw new Error('Invalid compiled remote resource directory.');
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function copyDirectory(source, destination) {
|
|
16
|
+
const stat = fs.lstatSync(source);
|
|
17
|
+
if (stat.isSymbolicLink() || !stat.isDirectory()) {
|
|
18
|
+
throw new Error('Remote resource directories must not contain symbolic links.');
|
|
19
|
+
}
|
|
20
|
+
fs.mkdirSync(destination, { recursive: true });
|
|
21
|
+
for (const entry of fs.readdirSync(source, { withFileTypes: true })) {
|
|
22
|
+
const from = path.join(source, entry.name);
|
|
23
|
+
const to = path.join(destination, entry.name);
|
|
24
|
+
if (entry.isSymbolicLink()) throw new Error('Remote resources must not contain symbolic links.');
|
|
25
|
+
if (entry.isDirectory()) copyDirectory(from, to);
|
|
26
|
+
else if (entry.isFile()) fs.copyFileSync(from, to);
|
|
27
|
+
else throw new Error('Unsupported remote resource file.');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function prepareRemoteResources(entryDir, outputDir, declaration) {
|
|
32
|
+
const destination = path.join(outputDir, CACHE_DIRECTORY);
|
|
33
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
34
|
+
if (!declaration) return;
|
|
35
|
+
if (!Array.isArray(declaration.resources) || declaration.resources.length === 0) {
|
|
36
|
+
throw new Error('Missing compiled remote resource directories.');
|
|
37
|
+
}
|
|
38
|
+
const sourceRoot = fs.realpathSync(entryDir);
|
|
39
|
+
try {
|
|
40
|
+
for (const resource of declaration.resources) {
|
|
41
|
+
const output = relativeDirectory(resource.output);
|
|
42
|
+
const root = relativeDirectory(resource.root);
|
|
43
|
+
const source = path.join(sourceRoot, output);
|
|
44
|
+
// Reject a symlink in any parent component as well as inside the folder.
|
|
45
|
+
if (fs.realpathSync(source) !== source) throw new Error('Remote resources must not contain symbolic links.');
|
|
46
|
+
copyDirectory(source, path.join(destination, root));
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
fs.rmSync(destination, { recursive: true, force: true });
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
module.exports = { prepareRemoteResources, CACHE_DIRECTORY };
|
|
@@ -139,6 +139,7 @@ assert.equal(capabilities.commands.vibeUpload.skillWorkflow.keepUploadProcessRun
|
|
|
139
139
|
assert.equal(capabilities.commands.vibeUpload.skillWorkflow.realUploadSuccess.simulation, false);
|
|
140
140
|
assert.equal(capabilities.commands.vibeUpload.appInfoFields.defaultedByCli.includes('privacy_policy'), true);
|
|
141
141
|
assert.equal(packageJson.files.includes('vibe-upload.md'), true);
|
|
142
|
+
assert.equal(packageJson.files.includes('CHANGELOG.md'), true);
|
|
142
143
|
assert.equal(capabilities.structuredOutput.stdoutProtocolOnly, true);
|
|
143
144
|
assert.equal(capabilities.commands.check.platformWrite, false);
|
|
144
145
|
assert.equal(capabilities.commands.check.ai.option, '--ai');
|
|
@@ -305,6 +306,33 @@ try {
|
|
|
305
306
|
} finally {
|
|
306
307
|
fs.rmSync(packagingFixture, { recursive: true, force: true });
|
|
307
308
|
}
|
|
309
|
+
const cdnFixture = fs.mkdtempSync(path.join(os.tmpdir(), 'ttmg-installed-cdn-gate-'));
|
|
310
|
+
try {
|
|
311
|
+
fs.writeFileSync(path.join(cdnFixture, 'game.js'), 'console.log("fixture");');
|
|
312
|
+
fs.writeFileSync(path.join(cdnFixture, 'game.json'), '{}');
|
|
313
|
+
fs.mkdirSync(path.join(cdnFixture, 'remote/content-pack'), { recursive: true });
|
|
314
|
+
fs.writeFileSync(path.join(cdnFixture, 'remote/content-pack/asset.bin'), Buffer.alloc(5 * 1024 * 1024));
|
|
315
|
+
fs.writeFileSync(path.join(cdnFixture, 'project.config.json'), JSON.stringify({
|
|
316
|
+
remote_cdn_resources: { base_url: 'https://cdn.example.com/game/', dirs: ['remote/content-pack'] },
|
|
317
|
+
}));
|
|
318
|
+
const checkSizes = () => {
|
|
319
|
+
const checked = runCli(['check', '--dir', cdnFixture, '--format', 'json', '--include-passed']);
|
|
320
|
+
assertExit(checked, 0, 'installed CDN resource size check');
|
|
321
|
+
return parseSingleJson(checked, 'installed CDN resource size check').diagnostics.filter(item => item.type === 'size');
|
|
322
|
+
};
|
|
323
|
+
const hosted = checkSizes();
|
|
324
|
+
for (const name of ['main', 'project']) {
|
|
325
|
+
const diagnostic = hosted.find(item => item.name === name);
|
|
326
|
+
assert.ok(diagnostic?.passed, `installed ttmg-pack counted CDN resources in ${name}`);
|
|
327
|
+
assert.ok(diagnostic.metrics.sizeBytes < 1024, `${name} retained remote resource bytes`);
|
|
328
|
+
}
|
|
329
|
+
fs.writeFileSync(path.join(cdnFixture, 'project.config.json'), '{}');
|
|
330
|
+
const ordinary = checkSizes().find(item => item.name === 'main');
|
|
331
|
+
assert.equal(ordinary?.passed, false, 'undeclared resources must retain the normal main-package limit');
|
|
332
|
+
assert.ok(ordinary.metrics.sizeBytes > 5 * 1024 * 1024);
|
|
333
|
+
} finally {
|
|
334
|
+
fs.rmSync(cdnFixture, { recursive: true, force: true });
|
|
335
|
+
}
|
|
308
336
|
if (process.platform !== 'win32') {
|
|
309
337
|
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'ttmg-evidence-symlink-'));
|
|
310
338
|
try {
|