@doubao-dev/cli 0.0.29 → 0.0.30

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/dist/app.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import{authorizedFetch as t,getApiUrl as o,configuredFetch as a}from"./2168.js";let i="Doubao Agentic Service",n="doubao-agentic-service-development",r="doubao-agentic-service",p="doubao-agentic-service.zip";class s extends Error{operation;serviceCode;serviceMessage;httpStatus;logId;constructor(e){var t;super(void 0!==(t=e).httpStatus?`${t.operation} failed: HTTP ${t.httpStatus} ${t.httpStatusText??""}`.trim():void 0!==t.serviceCode?`${t.operation} failed: [${t.serviceCode}] ${t.serviceMessage??"unknown error"}`:`${t.operation} failed: ${t.serviceMessage??"unknown error"}`),this.name="GatewayResponseError",this.operation=e.operation,this.serviceCode=e.serviceCode,this.serviceMessage=e.serviceMessage,this.httpStatus=e.httpStatus,this.logId=e.logId}}async function d(e,t){let o=e.headers.get("x-tt-logid")??void 0;if(!e.ok)throw new s({operation:t,httpStatus:e.status,httpStatusText:e.statusText,logId:o});let a=await e.json();if("number"!=typeof a.code)throw new s({operation:t,serviceMessage:"invalid gateway response: missing numeric code",logId:a.log_id??o});if(0!==a.code)throw new s({operation:t,serviceCode:a.code,serviceMessage:a.message??"unknown error",logId:a.log_id??o});return a}let c=/^\d+\.\d+\.\d+$/;function u(e){let t=e?.trim();if(t){if(!c.test(t))throw Error(`--app-version-tag 的值 ${JSON.stringify(t)} 格式不正确。请使用三段由点分隔的纯数字,例如 1.2.3;不要添加 v 前缀或 -beta 等预发布后缀。`);return t}}async function l(e){return d(await t(o(`/app_developer/api/sandbox/app/get?sandbox_project_id=${encodeURIComponent(e)}`),{method:"GET"}),"Get sandbox app")}async function f(e,a,i="manifest"){return d(await t(o("/app_developer/api/yaml/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:e,mode:a,yaml_type:i})}),"Verify YAML")}async function v(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions`);return d(await t(a,{method:"GET"}),"List mini app versions")}async function m(a){let{readFile:i}=await import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),n=await i(a.filePath),r=o(`/app_developer/api/apps/${encodeURIComponent(a.appKey)}/draft/upload?source_type=${a.sourceType}`);return d(await t(r,{method:"POST",headers:{"Content-Type":a.contentType??"application/zip","Content-Length":String(n.byteLength)},body:new Blob([n],{type:a.contentType??"application/zip"})}),"Upload agentic service version draft package")}async function g(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/start`);return d(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sha256:e.sha256})}),"Start agentic service version draft source code uploading")}async function h(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/finish`);return d(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({upload_token:e.uploadToken,size:e.size,sha256:e.sha256})}),"Finish agentic service version draft source code uploading")}async function y(t){let[{readFile:o},{createHash:i}]=await Promise.all([import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:crypto"),22)})]),n=await o(t.filePath),r=i("sha256").update(n).digest("hex"),p=(await g({appKey:t.appKey,sha256:r})).data;if(!p?.upload_url||!p.upload_token)throw Error("Start agentic service version draft source code uploading failed: missing upload session");let s=await a(p.upload_url,{method:"PUT",headers:p.upload_headers??{},body:new Blob([n])});if(!s.ok)throw Error(`Upload agentic service version draft source code to TOS failed: HTTP ${s.status} ${s.statusText}`);return h({appKey:t.appKey,uploadToken:p.upload_token,size:n.byteLength,sha256:r})}async function _(e,a={}){let i=u(a.appVersionTag),n=o(`/app_developer/api/apps/${encodeURIComponent(e)}/draft/submit`);return d(await t(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_config_version:process.env.PROJECT_CONFIG_VERSION,app_version_tag:i,dbx_version:"miniapp-version-v2"})}),"Submit agentic service version draft")}async function T(e,a){let i=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions/${encodeURIComponent(a)}/artifact`);return d(await t(i,{method:"GET"}),"Get agentic service version artifact")}export{i as AGENTIC_SERVICE_DISPLAY_NAME,n as AGENTIC_SERVICE_SKILL_NAME,r as DEFAULT_FRONTEND_DIRECTORY,p as FRONTEND_ARCHIVE_FILENAME,s as GatewayResponseError,T as getMiniAppVersionArtifact,l as getSandboxApp,v as listMiniAppVersions,u as normalizeAppVersionTag,_ as submitMiniAppVersionDraft,m as uploadMiniAppVersionDraftPackage,y as uploadMiniAppVersionDraftSourceCode,f as verifyYAML};
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import{authorizedFetch as t,getApiUrl as o,configuredFetch as a}from"./2168.js";let i="Doubao Agentic Service",n="doubao-agentic-service-development",r="doubao-agentic-service",p="doubao-agentic-service.zip";class s extends Error{operation;serviceCode;serviceMessage;httpStatus;logId;constructor(e){var t;super(void 0!==(t=e).httpStatus?`${t.operation} failed: HTTP ${t.httpStatus} ${t.httpStatusText??""}`.trim():void 0!==t.serviceCode?`${t.operation} failed: [${t.serviceCode}] ${t.serviceMessage??"unknown error"}`:`${t.operation} failed: ${t.serviceMessage??"unknown error"}`),this.name="GatewayResponseError",this.operation=e.operation,this.serviceCode=e.serviceCode,this.serviceMessage=e.serviceMessage,this.httpStatus=e.httpStatus,this.logId=e.logId}}async function d(e,t){let o=e.headers.get("x-tt-logid")??void 0;if(!e.ok)throw new s({operation:t,httpStatus:e.status,httpStatusText:e.statusText,logId:o});let a=await e.json();if("number"!=typeof a.code)throw new s({operation:t,serviceMessage:"invalid gateway response: missing numeric code",logId:a.log_id??o});if(0!==a.code)throw new s({operation:t,serviceCode:a.code,serviceMessage:a.message??"unknown error",logId:a.log_id??o});return a}let c=/^\d+\.\d+\.\d+$/;function u(e){let t=e?.trim();if(t){if(!c.test(t))throw Error(`--app-version-tag 的值 ${JSON.stringify(t)} 格式不正确。请使用三段由点分隔的纯数字,例如 1.2.3;不要添加 v 前缀或 -beta 等预发布后缀。`);return t}}async function l(e){return d(await t(o(`/app_developer/api/sandbox/app/get?sandbox_project_id=${encodeURIComponent(e)}`),{method:"GET"}),"Get sandbox app")}async function f(e,a,i="manifest"){return d(await t(o("/app_developer/api/yaml/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:e,mode:a,yaml_type:i})}),"Verify YAML")}async function v(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions`);return d(await t(a,{method:"GET"}),"List mini app versions")}async function m(a){let{readFile:i}=await import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),n=await i(a.filePath),r=o(`/app_developer/api/apps/${encodeURIComponent(a.appKey)}/draft/upload?source_type=${a.sourceType}`);return d(await t(r,{method:"POST",headers:{"Content-Type":a.contentType??"application/zip","Content-Length":String(n.byteLength)},body:new Blob([n],{type:a.contentType??"application/zip"})}),"Upload agentic service version draft package")}async function g(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/start`);return d(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sha256:e.sha256})}),"Start agentic service version draft source code uploading")}async function h(e){let a=o(`/app_developer/api/apps/${encodeURIComponent(e.appKey)}/draft/source_code/upload/finish`);return d(await t(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({upload_token:e.uploadToken,size:e.size,sha256:e.sha256})}),"Finish agentic service version draft source code uploading")}async function y(t){let[{readFile:o},{createHash:i}]=await Promise.all([import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:fs/promises"),22)}),import("node:module").then(function(t){return e.t(t.createRequire(import.meta.url)("node:crypto"),22)})]),n=await o(t.filePath),r=i("sha256").update(n).digest("hex"),p=(await g({appKey:t.appKey,sha256:r})).data;if(!p?.upload_url||!p.upload_token)throw Error("Start agentic service version draft source code uploading failed: missing upload session");let s=await a(p.upload_url,{method:"PUT",headers:p.upload_headers??{},body:new Blob([n])});if(!s.ok)throw Error(`Upload agentic service version draft source code to TOS failed: HTTP ${s.status} ${s.statusText}`);return h({appKey:t.appKey,uploadToken:p.upload_token,size:n.byteLength,sha256:r})}async function _(e,a={}){let i=u(a.appVersionTag),n=o(`/app_developer/api/apps/${encodeURIComponent(e)}/draft/submit`);return d(await t(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_config_version:process.env.PROJECT_CONFIG_VERSION,app_version_tag:i,dbx_version:"miniapp-version-v2"})}),"Submit agentic service version draft")}async function T(e,a){let i=o(`/app_developer/api/apps/${encodeURIComponent(e)}/app_versions/${encodeURIComponent(a)}/artifact`);return d(await t(i,{method:"GET"}),"Get agentic service version artifact")}export{i as AGENTIC_SERVICE_DISPLAY_NAME,n as AGENTIC_SERVICE_SKILL_NAME,r as DEFAULT_FRONTEND_DIRECTORY,p as FRONTEND_ARCHIVE_FILENAME,s as GatewayResponseError,T as getMiniAppVersionArtifact,l as getSandboxApp,v as listMiniAppVersions,u as normalizeAppVersionTag,d as readGatewayJson,_ as submitMiniAppVersionDraft,m as uploadMiniAppVersionDraftPackage,y as uploadMiniAppVersionDraftSourceCode,f as verifyYAML};
package/dist/dev-shell.js CHANGED
@@ -1 +1 @@
1
- import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./6831.js";import"./9635.js";import{source as t,node_modules_figures as r}from"./9679.js";import{use_input as n,Text as l,build_render as a,use_app as s,Static as i,components_Box as o,use_window_size as c}from"./ink.js";import{DEV_SHELL_HELP_ITEMS as u,DEV_SHELL_DEVICE_HELP_ITEMS as _,formatDeviceAppSetupStatus as f}from"./dev.js";import{version_version as m}from"./2168.js";e.add({"../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(e){var t=function(e){var t,n,l;return!!(t=e)&&"object"==typeof t&&(n=e,"[object RegExp]"!==(l=Object.prototype.toString.call(n))&&"[object Date]"!==l&&n.$$typeof!==r)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?i(Array.isArray(e)?[]:{},e,t):e}function l(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function a(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function s(e,t){try{return t in e}catch(e){return!1}}function i(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||l,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var c,u,_=Array.isArray(r);return _!==Array.isArray(e)?n(r,o):_?o.arrayMerge(e,r,o):(u={},(c=o).isMergeableObject(e)&&a(e).forEach(function(t){u[t]=n(e[t],c)}),a(r).forEach(function(t){s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))||(s(e,t)&&c.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return i;var r=t.customMerge(e);return"function"==typeof r?r:i})(t,c)(e[t],r[t],c):u[t]=n(r[t],c))}),u)}i.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return i(e,r,t)},{})},e.exports=i}});let d={info:"blue",success:"green",error:"red",warning:"yellow"},v={success:"green",error:"red",warning:"yellow",info:"blue"},p={success:r.tick,error:r.cross,warning:r.warning,info:r.info},g=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/index.js");e("../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js");let b=(0,g.createContext)({components:{Alert:{styles:{container:({variant:e})=>({flexGrow:1,borderStyle:"round",borderColor:d[e],gap:1,paddingX:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:d[e]}),content:()=>({flexShrink:1,flexGrow:1,minWidth:0,flexDirection:"column",gap:1}),title:()=>({bold:!0}),message:()=>({})},config({variant:e}){let t;return"info"===e&&(t=r.info),"success"===e&&(t=r.tick),"error"===e&&(t=r.cross),"warning"===e&&(t=r.warning),{icon:t}}},Badge:{styles:{container:({color:e})=>({backgroundColor:e}),label:()=>({color:"black"})}},ConfirmInput:{styles:{input:({isFocused:e})=>({dimColor:!e})}},MultiSelect:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let r;return t&&(r="green"),e&&(r="blue"),{color:r}},highlightedText:()=>({bold:!0})}},OrderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})}},ProgressBar:{styles:{container:()=>({flexGrow:1,minWidth:0}),completed:()=>({color:"magenta"}),remaining:()=>({dimColor:!0})},config:()=>({completedCharacter:r.square,remainingCharacter:r.squareLightShade})},Select:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let r;return t&&(r="green"),e&&(r="blue"),{color:r}},highlightedText:()=>({bold:!0})}},Spinner:{styles:{container:()=>({gap:1}),frame:()=>({color:"blue"}),label:()=>({})}},StatusMessage:{styles:{container:()=>({gap:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:v[e]}),message:()=>({})},config:({variant:e})=>({icon:p[e]})},UnorderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})},config:()=>({marker:r.line})},TextInput:{styles:{value:()=>({})}},EmailInput:{styles:{value:()=>({})}},PasswordInput:{styles:{value:()=>({})}}}}),h=e=>(0,g.useContext)(b).components[e],x=r.line;(0,g.createContext)({marker:x}),(0,g.createContext)({depth:0});class y extends Map{first;constructor(e){let t,r,n=[],l=0;for(let a of e){let e={...a,previous:r,next:void 0,index:l};r&&(r.next=e),t||=e,n.push([a.value,e]),l++,r=e}super(n),this.first=t}}let E=e("node:util");function C({isFocused:e,isSelected:t,children:n}){let{styles:a}=h("Select");return g.createElement(o,{...a.option({isFocused:e})},e&&g.createElement(l,{...a.focusIndicator()},r.pointer),g.createElement(l,{...a.label({isFocused:e,isSelected:t})},n),t&&g.createElement(l,{...a.selectedIndicator()},r.tick))}let w=(e,t)=>{switch(t.type){case"focus-next-option":{if(!e.focusedValue)return e;let t=e.optionMap.get(e.focusedValue);if(!t)return e;let r=t.next;if(!r)return e;if(!(r.index>=e.visibleToIndex))return{...e,focusedValue:r.value};let n=Math.min(e.optionMap.size,e.visibleToIndex+1),l=n-e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:l,visibleToIndex:n}}case"focus-previous-option":{if(!e.focusedValue)return e;let t=e.optionMap.get(e.focusedValue);if(!t)return e;let r=t.previous;if(!r)return e;if(!(r.index<=e.visibleFromIndex))return{...e,focusedValue:r.value};let n=Math.max(0,e.visibleFromIndex-1),l=n+e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:n,visibleToIndex:l}}case"select-focused-option":return{...e,previousValue:e.value,value:e.focusedValue};case"reset":return t.state}},S=({visibleOptionCount:e,defaultValue:t,options:r})=>{let n="number"==typeof e?Math.min(e,r.length):r.length,l=new y(r);return{optionMap:l,visibleOptionCount:n,focusedValue:l.first?.value,visibleFromIndex:0,visibleToIndex:n,previousValue:t,value:t}};function O({isDisabled:e=!1,visibleOptionCount:t=5,highlightText:r,options:a,defaultValue:s,onChange:i}){let c=(({visibleOptionCount:e=5,options:t,defaultValue:r,onChange:n})=>{let[l,a]=(0,g.useReducer)(w,{visibleOptionCount:e,defaultValue:r,options:t},S),[s,i]=(0,g.useState)(t);t===s||(0,E.isDeepStrictEqual)(t,s)||(a({type:"reset",state:S({visibleOptionCount:e,defaultValue:r,options:t})}),i(t));let o=(0,g.useCallback)(()=>{a({type:"focus-next-option"})},[]),c=(0,g.useCallback)(()=>{a({type:"focus-previous-option"})},[]),u=(0,g.useCallback)(()=>{a({type:"select-focused-option"})},[]),_=(0,g.useMemo)(()=>t.map((e,t)=>({...e,index:t})).slice(l.visibleFromIndex,l.visibleToIndex),[t,l.visibleFromIndex,l.visibleToIndex]);return(0,g.useEffect)(()=>{l.value&&l.previousValue!==l.value&&n?.(l.value)},[l.previousValue,l.value,t,n]),{focusedValue:l.focusedValue,visibleFromIndex:l.visibleFromIndex,visibleToIndex:l.visibleToIndex,value:l.value,visibleOptions:_,focusNextOption:o,focusPreviousOption:c,selectFocusedOption:u}})({visibleOptionCount:t,options:a,defaultValue:s,onChange:i});(({isDisabled:e=!1,state:t})=>{n((e,r)=>{r.downArrow&&t.focusNextOption(),r.upArrow&&t.focusPreviousOption(),r.return&&t.selectFocusedOption()},{isActive:!e})})({isDisabled:e,state:c});let{styles:u}=h("Select");return g.createElement(o,{...u.container()},c.visibleOptions.map(t=>{let n=t.label;if(r&&t.label.includes(r)){let e=t.label.indexOf(r);n=g.createElement(g.Fragment,null,t.label.slice(0,e),g.createElement(l,{...u.highlightedText()},r),t.label.slice(e+r.length))}return g.createElement(C,{key:t.value,isFocused:!e&&c.focusedValue===t.value,isSelected:c.value===t.value},n)}))}var k=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"frames":["/ "," - "," \\\\ "," |"," |"," \\\\ "," - ","/ "]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\uD83D\uDC97 "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["، ","′ "," \xb4 "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},"fistBump":{"interval":80,"frames":["\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B "," \uD83E\uDD1C  \uD83E\uDD1B  ","  \uD83E\uDD1C\uD83E\uDD1B   "," \uD83E\uDD1C✨\uD83E\uDD1B   ","\uD83E\uDD1C ✨ \uD83E\uDD1B  "]},"soccerHeader":{"interval":80,"frames":[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},"mindblown":{"interval":160,"frames":["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},"orangePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},"bluePulse":{"interval":100,"frames":["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"orangeBluePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"timeTravel":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺ █████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺ ████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺ ███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺ ██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺ █\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺ \xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺░\xa3\xa3 "," ☺░\xa3\xa3 "," ☺ \xa3\xa3 "," ☺\xa3\xa3 "," ☺\xa3\xa3 "," ☺▓\xa3 "," ☺▓\xa3 "," ☺▒\xa3 "," ☺▒\xa3 "," ☺░\xa3 "," ☺░\xa3 "," ☺ \xa3 "," ☺\xa3 "," ☺\xa3 "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & \xa3 "," & ░\xa3 "," & ▒\xa3 "," & ▓\xa3 "," & \xa3\xa3 "," & ░\xa3\xa3 "," & ▒\xa3\xa3 ","& ▓\xa3\xa3 ","& \xa3\xa3\xa3 "," ░\xa3\xa3\xa3 "," ▒\xa3\xa3\xa3 "," ▓\xa3\xa3\xa3 "," █\xa3\xa3\xa3 "," ░█\xa3\xa3\xa3 "," ▒█\xa3\xa3\xa3 "," ▓█\xa3\xa3\xa3 "," ██\xa3\xa3\xa3 "," ░██\xa3\xa3\xa3 "," ▒██\xa3\xa3\xa3 "," ▓██\xa3\xa3\xa3 "," ███\xa3\xa3\xa3 "," ░███\xa3\xa3\xa3 "," ▒███\xa3\xa3\xa3 "," ▓███\xa3\xa3\xa3 "," ████\xa3\xa3\xa3 "," ░████\xa3\xa3\xa3 "," ▒████\xa3\xa3\xa3 "," ▓████\xa3\xa3\xa3 "," █████\xa3\xa3\xa3 "," ░█████\xa3\xa3\xa3 "," ▒█████\xa3\xa3\xa3 "," ▓█████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xba> ~~~~~~~~~~~~~~~~~","(\xba> ~~~~~~~~~~~~~~~~","((\xba> ~~~~~~~~~~~~~~~","<((\xba> ~~~~~~~~~~~~~~","><((\xba> ~~~~~~~~~~~~~"," ><((\xba> ~~~~~~~~~~~~","~ ><((\xba> ~~~~~~~~~~~","~~ <>((\xba> ~~~~~~~~~~","~~~ ><((\xba> ~~~~~~~~~","~~~~ <>((\xba> ~~~~~~~~","~~~~~ ><((\xba> ~~~~~~~","~~~~~~ <>((\xba> ~~~~~~","~~~~~~~ ><((\xba> ~~~~~","~~~~~~~~ <>((\xba> ~~~~","~~~~~~~~~ ><((\xba> ~~~","~~~~~~~~~~ <>((\xba> ~~","~~~~~~~~~~~ ><((\xba> ~","~~~~~~~~~~~~ <>((\xba> ","~~~~~~~~~~~~~ ><((\xba>","~~~~~~~~~~~~~~ <>((\xba","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}');function I({label:e,type:t}){let{frame:r}=function({type:e="dots"}){let[t,r]=(0,g.useState)(0),n=k[e];return(0,g.useEffect)(()=>{let e=setInterval(()=>{r(e=>e===n.frames.length-1?0:e+1)},n.interval);return()=>{clearInterval(e)}},[n]),{frame:n.frames[t]??""}}({type:t}),{styles:n}=h("Spinner");return g.createElement(o,{...n.container()},g.createElement(l,{...n.frame()},r),e&&g.createElement(l,{...n.label()},e))}Object.keys(k);let M=(e,t)=>{switch(t.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+t.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+t.text.length};case"delete":{let t=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,t)+e.value.slice(t+1),cursorOffset:t}}}},A=t.inverse(" ");function D({isDisabled:e=!1,defaultValue:r,placeholder:a="",suggestions:s,onChange:i,onSubmit:o}){let{inputValue:c}=(({isDisabled:e=!1,state:r,placeholder:l=""})=>{let a=(0,g.useMemo)(()=>e?l?t.dim(l):"":l&&l.length>0?t.inverse(l[0])+t.dim(l.slice(1)):A,[e,l]),s=(0,g.useMemo)(()=>{if(e)return r.value;let n=0,l=r.value.length>0?"":A;for(let e of r.value)l+=n===r.cursorOffset?t.inverse(e):e,n++;return r.suggestion?r.cursorOffset===r.value.length?l+=t.inverse(r.suggestion[0])+t.dim(r.suggestion.slice(1)):l+=t.dim(r.suggestion):r.value.length>0&&r.cursorOffset===r.value.length&&(l+=A),l},[e,r.value,r.cursorOffset,r.suggestion]);return n((e,t)=>{if(!t.upArrow&&!t.downArrow&&(!t.ctrl||"c"!==e)&&!t.tab&&(!t.shift||!t.tab)){if(t.return)return void r.submit();t.leftArrow?r.moveCursorLeft():t.rightArrow?r.moveCursorRight():t.backspace||t.delete?r.delete():r.insert(e)}},{isActive:!e}),{inputValue:r.value.length>0?s:a}})({isDisabled:e,placeholder:a,state:(({defaultValue:e="",suggestions:t,onChange:r,onSubmit:n})=>{let[l,a]=(0,g.useReducer)(M,{previousValue:e,value:e,cursorOffset:e.length}),s=(0,g.useMemo)(()=>{if(0!==l.value.length)return t?.find(e=>e.startsWith(l.value))?.replace(l.value,"")},[l.value,t]),i=(0,g.useCallback)(()=>{a({type:"move-cursor-left"})},[]),o=(0,g.useCallback)(()=>{a({type:"move-cursor-right"})},[]),c=(0,g.useCallback)(e=>{a({type:"insert",text:e})},[]),u=(0,g.useCallback)(()=>{a({type:"delete"})},[]),_=(0,g.useCallback)(()=>{if(s){c(s),n?.(l.value+s);return}n?.(l.value)},[l.value,s,c,n]);return(0,g.useEffect)(()=>{l.value!==l.previousValue&&r?.(l.value)},[l.previousValue,l.value,r]),{...l,suggestion:s,moveCursorLeft:i,moveCursorRight:o,insert:c,delete:u,submit:_}})({defaultValue:r,suggestions:s,onChange:i,onSubmit:o})}),{styles:u}=h("TextInput");return g.createElement(l,{...u.value()},c)}(0,g.createContext)({marker:r.line});(0,g.createContext)({marker:""}),t.inverse(" "),t.inverse(" ");let P=e("node:os"),V=e("node:stream"),j="#72A7FF",F="#4B586C",T="#7F8DA6",$="#55D6A9",K="#F2C66D",R=u.map(({command:e})=>e.replace(/\s+\[[^\]]+\]$/,"")),B=_.map(({command:e})=>e.replace(/\s+\[[^\]]+\]$/,"")),L={id:"initial",kind:"initial"};function H(){let e=[],t=-1,r="";return{next:n=>t<0?n:(t-=1)<0?r:e[t],previous:n=>0===e.length?n:(t<0&&(r=n),t=Math.min(t+1,e.length-1),e[t]),record(n){e.unshift(n),e.length>20&&(e.length=20),t=-1,r=""}}}async function U(e){let t=new J,r=new Y(e.toChoices),n=new Q,l=await e.createSession(t,r.selectItem,n.update),s=a(g.createElement(W,{deviceAppSetup:n,selections:r,session:l,subscribeCompileProgress:e.subscribeCompileProgress,transcript:t}),{exitOnCtrlC:!1,maxFps:15,stderr:process.stderr,stdin:e.stdin,stdout:process.stderr});try{await s.waitUntilExit()}finally{r.cancel(),await l.close()}return{status:l.getState().status}}function W({deviceAppSetup:e,session:t,selections:r,subscribeCompileProgress:a,transcript:c}){let{exit:u}=s(),[_,f]=(0,g.useState)(),[m,d]=(0,g.useState)(!1),v=(0,g.useRef)(""),[p,b]=(0,g.useState)(0),h=(0,g.useRef)({device:H(),root:H()}).current,[x,y]=(0,g.useState)("root"),[E,C]=(0,g.useState)(()=>c.snapshot()),[w,S]=(0,g.useState)(),[k,M]=(0,g.useState)(()=>t.getState()),[A,P]=(0,g.useState)(),[V,U]=(0,g.useState)(()=>e.snapshot()),z=(0,g.useCallback)((e,t="执行中")=>{f(e?t:void 0)},[]),J=(0,g.useCallback)(()=>d(!0),[]);(0,g.useEffect)(()=>t.subscribe(e=>{"client-disconnected"===e&&y("root")}),[t]),(0,g.useEffect)(()=>e.subscribe(U),[e]),(0,g.useEffect)(()=>{m&&u()},[u,m]),(0,g.useEffect)(()=>c.subscribe(C),[c]),(0,g.useEffect)(()=>r.subscribe(e=>{S(e)}),[r]),(0,g.useEffect)(()=>a?.(e=>{P(e<1?e:void 0)}),[a]),(0,g.useEffect)(()=>{let e=setInterval(()=>M(t.getState()),500);return t.stopped.then(J,J),()=>clearInterval(e)},[J,t]);let Q=(0,g.useCallback)(e=>{let r=e.trim();if(!r||_)return;v.current="",b(e=>e+1),h[x].record(r),c.appendLine(`${"device"===x?"device ›":"›"} ${r}`);let n=r.toLowerCase(),l=n.split(/\s+/,1)[0];if("device"===x&&("back"===n||".."===r)){z(!0,"正在返回主命令"),t.returnToRoot().finally(()=>{y("root"),z(!1)});return}let a=r;"device"===x&&"status"!==l&&"web"!==l&&(a=`device ${r}`),z(!0),t.execute(a).then(e=>{"root"===x&&"enter-device"===e&&y("device"),M(t.getState())}).finally(()=>z(!1))},[_,h,x,t,z,c]);return n((e,n)=>{if(n.ctrl&&"c"===e){if(r.cancel(),_){t.cancelActiveCommand()&&z(!0,"正在停止");return}z(!0,"正在退出"),t.close().finally(J);return}if(!w&&n.ctrl&&"u"===e){v.current="",b(e=>e+1);return}w?n.escape&&r.resolve(void 0):(e=>{let t=h[x];if(e.upArrow)v.current=t.previous(v.current);else if(e.downArrow)v.current=t.next(v.current);else{if(!e.tab||e.shift)return;let t=("device"===x?B:R).find(e=>e.startsWith(v.current));if(!t||t===v.current)return;v.current=t}b(e=>e+1)})(n)}),g.createElement(g.Fragment,null,g.createElement(i,{items:[L,...E]},e=>{var t;if("initial"===e.kind)return g.createElement(o,{flexDirection:"column",key:e.id},g.createElement(G,{state:k}));let r=e.text.startsWith("⚠");return g.createElement(l,{color:r?void 0:(t=e.text,/^(error|failed|failure_reason|启动真机调试失败|启动豆包开发者工具失败|关闭豆包开发者工具失败)/i.test(t)?"#FF6B7A":/^(warning|toolchain warnings)/i.test(t)?K:/^✓ (下载豆包开发者工具|豆包开发者工具已安装)/.test(t)||/^(status: ok|status: running|page pushed|widget pushed|web_debugger|Web 模拟器已打开)/i.test(t)?$:/^(debug:|(?:device )?›)/i.test(t)?j:void 0),key:e.id,wrap:"wrap"},r&&g.createElement(l,{color:K},"⚠"),r?e.text.slice(1):e.text||" ")}),g.createElement(o,{display:m?"none":"flex",flexDirection:"column"},g.createElement(q,{scope:x}),g.createElement(o,{flexDirection:"column",marginTop:1},V?g.createElement(N,{progress:V}):void 0!==A?g.createElement(I,{label:`应用编译 ${Math.round(100*A)}%`}):_?g.createElement(I,{label:_}):null,w?g.createElement(o,{borderColor:F,borderStyle:"single",flexDirection:"column",paddingX:1},g.createElement(l,{bold:!0,color:j},"versionTag"===w.kind?"选择关联的 versionTag":`Select ${"page"===w.kind?"a page":"a widget"}`),g.createElement(O,{onChange:e=>r.resolve(e),options:w.choices,visibleOptionCount:7}),g.createElement(l,{color:T},"↑↓ move enter select esc cancel")):g.createElement(o,null,g.createElement(l,{bold:!0,color:j},"device"===x?"device › ":"› "),g.createElement(D,{defaultValue:v.current,isDisabled:!!_,key:p,onChange:e=>{v.current=e},onSubmit:Q,placeholder:"device"===x?"back 返回主命令":"Ctrl+C 退出",suggestions:"device"===x?B:R}))),g.createElement(X,{state:k})))}function N({progress:e}){let t=f(e);return"complete"===e.phase?g.createElement(o,null,g.createElement(l,{color:$},"✓ ",t)):g.createElement(o,null,g.createElement(I,{label:t}))}function q({scope:e}){let t="device"===e?_:u;return g.createElement(o,{flexDirection:"column",marginTop:1},g.createElement(l,{bold:!0,color:j},"device"===e?"真机调试命令":"可用命令"),t.map(e=>g.createElement(o,{flexDirection:"row",key:e.command},g.createElement(o,{width:24},g.createElement(l,{color:j},` ${e.command}`)),g.createElement(l,null,e.description))))}function G({state:e}){return g.createElement(o,{borderColor:F,borderStyle:"single",flexDirection:"column",paddingX:1},g.createElement(l,null,g.createElement(l,{color:j},">"),g.createElement(l,{bold:!0}," Doubao Dev CLI"),g.createElement(l,{color:T},` (v${m})`)),g.createElement(l,{wrap:"truncate-middle"},g.createElement(l,{color:T},"Project".padEnd(16)),z(e.projectPath??e.appDir)),g.createElement(l,{wrap:"truncate-middle"},g.createElement(l,{color:T},"App".padEnd(16)),e.appId??"-"))}function X({state:e}){let{columns:t}=c(),r="running"===e.status,n=e.appId??"-",a=z(e.projectPath??e.appDir),s=`${n} \xb7 ${a}`,i=s.length+2<=t?s:n;return g.createElement(l,{color:T,wrap:"truncate-middle"},g.createElement(l,{color:r?$:T},r?"●":"○"),` ${i}`)}function z(e){let t=(0,P.homedir)();return e===t?"~":e.startsWith(`${t}/`)||e.startsWith(`${t}\\`)?`~${e.slice(t.length)}`:e}class J extends V.Writable{carry="";id=0;lines=[];subscribers=new Set;snapshot(){return[...this.lines]}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}appendLine(e){this.appendPart(e),this.notify()}_write(e,t,r){let n=`${this.carry}${e.toString()}`.split(/\r?\n/);for(let e of(this.carry=n.pop()??"",n))this.appendPart(e);this.notify(),r()}appendPart(e){this.lines.push({id:this.id++,kind:"line",text:e})}notify(){let e=this.snapshot();for(let t of this.subscribers)t(e)}}class Q{progress;subscribers=new Set;update=e=>{for(let t of(this.progress=e,this.subscribers))t(e)};snapshot(){return this.progress}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}class Y{toChoices;listener;resolver;constructor(e){this.toChoices=e}selectItem=async(e,t)=>{this.cancel();let r=this.toChoices(e,t);if(r.length)return new Promise(t=>{this.resolver=t,this.listener?.({choices:r,kind:e})})};subscribe(e){return this.listener=e,()=>{this.listener===e&&(this.listener=void 0)}}resolve(e){let t=this.resolver;this.resolver=void 0,this.listener?.(void 0),t?.(e)}cancel(){this.resolve(void 0)}}export{U as runInkDevShell};
1
+ import"node:module";import{__webpack_require__ as e}from"./rslib-runtime.js";import"./6831.js";import"./9635.js";import{source as t,node_modules_figures as r}from"./9679.js";import{use_input as n,Text as l,build_render as a,use_app as s,Static as i,components_Box as o,use_window_size as c}from"./ink.js";import{DEV_SHELL_HELP_ITEMS as u,DEV_SHELL_DEVICE_HELP_ITEMS as _,formatDeviceAppSetupStatus as f}from"./dev.js";import{version_version as m}from"./2168.js";e.add({"../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(e){var t=function(e){var t,n,l;return!!(t=e)&&"object"==typeof t&&(n=e,"[object RegExp]"!==(l=Object.prototype.toString.call(n))&&"[object Date]"!==l&&n.$$typeof!==r)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?i(Array.isArray(e)?[]:{},e,t):e}function l(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function a(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function s(e,t){try{return t in e}catch(e){return!1}}function i(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||l,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var c,u,_=Array.isArray(r);return _!==Array.isArray(e)?n(r,o):_?o.arrayMerge(e,r,o):(u={},(c=o).isMergeableObject(e)&&a(e).forEach(function(t){u[t]=n(e[t],c)}),a(r).forEach(function(t){s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))||(s(e,t)&&c.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return i;var r=t.customMerge(e);return"function"==typeof r?r:i})(t,c)(e[t],r[t],c):u[t]=n(r[t],c))}),u)}i.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return i(e,r,t)},{})},e.exports=i}});let d={info:"blue",success:"green",error:"red",warning:"yellow"},v={success:"green",error:"red",warning:"yellow",info:"blue"},p={success:r.tick,error:r.cross,warning:r.warning,info:r.info},g=e("../../../node_modules/.pnpm/react@19.2.7/node_modules/react/index.js");e("../../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js");let b=(0,g.createContext)({components:{Alert:{styles:{container:({variant:e})=>({flexGrow:1,borderStyle:"round",borderColor:d[e],gap:1,paddingX:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:d[e]}),content:()=>({flexShrink:1,flexGrow:1,minWidth:0,flexDirection:"column",gap:1}),title:()=>({bold:!0}),message:()=>({})},config({variant:e}){let t;return"info"===e&&(t=r.info),"success"===e&&(t=r.tick),"error"===e&&(t=r.cross),"warning"===e&&(t=r.warning),{icon:t}}},Badge:{styles:{container:({color:e})=>({backgroundColor:e}),label:()=>({color:"black"})}},ConfirmInput:{styles:{input:({isFocused:e})=>({dimColor:!e})}},MultiSelect:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let r;return t&&(r="green"),e&&(r="blue"),{color:r}},highlightedText:()=>({bold:!0})}},OrderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})}},ProgressBar:{styles:{container:()=>({flexGrow:1,minWidth:0}),completed:()=>({color:"magenta"}),remaining:()=>({dimColor:!0})},config:()=>({completedCharacter:r.square,remainingCharacter:r.squareLightShade})},Select:{styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:2*!e}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let r;return t&&(r="green"),e&&(r="blue"),{color:r}},highlightedText:()=>({bold:!0})}},Spinner:{styles:{container:()=>({gap:1}),frame:()=>({color:"blue"}),label:()=>({})}},StatusMessage:{styles:{container:()=>({gap:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:v[e]}),message:()=>({})},config:({variant:e})=>({icon:p[e]})},UnorderedList:{styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})},config:()=>({marker:r.line})},TextInput:{styles:{value:()=>({})}},EmailInput:{styles:{value:()=>({})}},PasswordInput:{styles:{value:()=>({})}}}}),h=e=>(0,g.useContext)(b).components[e],x=r.line;(0,g.createContext)({marker:x}),(0,g.createContext)({depth:0});class y extends Map{first;constructor(e){let t,r,n=[],l=0;for(let a of e){let e={...a,previous:r,next:void 0,index:l};r&&(r.next=e),t||=e,n.push([a.value,e]),l++,r=e}super(n),this.first=t}}let E=e("node:util");function C({isFocused:e,isSelected:t,children:n}){let{styles:a}=h("Select");return g.createElement(o,{...a.option({isFocused:e})},e&&g.createElement(l,{...a.focusIndicator()},r.pointer),g.createElement(l,{...a.label({isFocused:e,isSelected:t})},n),t&&g.createElement(l,{...a.selectedIndicator()},r.tick))}let w=(e,t)=>{switch(t.type){case"focus-next-option":{if(!e.focusedValue)return e;let t=e.optionMap.get(e.focusedValue);if(!t)return e;let r=t.next;if(!r)return e;if(!(r.index>=e.visibleToIndex))return{...e,focusedValue:r.value};let n=Math.min(e.optionMap.size,e.visibleToIndex+1),l=n-e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:l,visibleToIndex:n}}case"focus-previous-option":{if(!e.focusedValue)return e;let t=e.optionMap.get(e.focusedValue);if(!t)return e;let r=t.previous;if(!r)return e;if(!(r.index<=e.visibleFromIndex))return{...e,focusedValue:r.value};let n=Math.max(0,e.visibleFromIndex-1),l=n+e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:n,visibleToIndex:l}}case"select-focused-option":return{...e,previousValue:e.value,value:e.focusedValue};case"reset":return t.state}},S=({visibleOptionCount:e,defaultValue:t,options:r})=>{let n="number"==typeof e?Math.min(e,r.length):r.length,l=new y(r);return{optionMap:l,visibleOptionCount:n,focusedValue:l.first?.value,visibleFromIndex:0,visibleToIndex:n,previousValue:t,value:t}};function O({isDisabled:e=!1,visibleOptionCount:t=5,highlightText:r,options:a,defaultValue:s,onChange:i}){let c=(({visibleOptionCount:e=5,options:t,defaultValue:r,onChange:n})=>{let[l,a]=(0,g.useReducer)(w,{visibleOptionCount:e,defaultValue:r,options:t},S),[s,i]=(0,g.useState)(t);t===s||(0,E.isDeepStrictEqual)(t,s)||(a({type:"reset",state:S({visibleOptionCount:e,defaultValue:r,options:t})}),i(t));let o=(0,g.useCallback)(()=>{a({type:"focus-next-option"})},[]),c=(0,g.useCallback)(()=>{a({type:"focus-previous-option"})},[]),u=(0,g.useCallback)(()=>{a({type:"select-focused-option"})},[]),_=(0,g.useMemo)(()=>t.map((e,t)=>({...e,index:t})).slice(l.visibleFromIndex,l.visibleToIndex),[t,l.visibleFromIndex,l.visibleToIndex]);return(0,g.useEffect)(()=>{l.value&&l.previousValue!==l.value&&n?.(l.value)},[l.previousValue,l.value,t,n]),{focusedValue:l.focusedValue,visibleFromIndex:l.visibleFromIndex,visibleToIndex:l.visibleToIndex,value:l.value,visibleOptions:_,focusNextOption:o,focusPreviousOption:c,selectFocusedOption:u}})({visibleOptionCount:t,options:a,defaultValue:s,onChange:i});(({isDisabled:e=!1,state:t})=>{n((e,r)=>{r.downArrow&&t.focusNextOption(),r.upArrow&&t.focusPreviousOption(),r.return&&t.selectFocusedOption()},{isActive:!e})})({isDisabled:e,state:c});let{styles:u}=h("Select");return g.createElement(o,{...u.container()},c.visibleOptions.map(t=>{let n=t.label;if(r&&t.label.includes(r)){let e=t.label.indexOf(r);n=g.createElement(g.Fragment,null,t.label.slice(0,e),g.createElement(l,{...u.highlightedText()},r),t.label.slice(e+r.length))}return g.createElement(C,{key:t.value,isFocused:!e&&c.focusedValue===t.value,isSelected:c.value===t.value},n)}))}var k=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"frames":["/ "," - "," \\\\ "," |"," |"," \\\\ "," - ","/ "]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","\xb4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xb0","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\uD83D\uDC97 "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["، ","′ "," \xb4 "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},"fistBump":{"interval":80,"frames":["\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B ","\uD83E\uDD1C    \uD83E\uDD1B "," \uD83E\uDD1C  \uD83E\uDD1B  ","  \uD83E\uDD1C\uD83E\uDD1B   "," \uD83E\uDD1C✨\uD83E\uDD1B   ","\uD83E\uDD1C ✨ \uD83E\uDD1B  "]},"soccerHeader":{"interval":80,"frames":[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},"mindblown":{"interval":160,"frames":["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ ","  ","  ","  "]},"speaker":{"interval":160,"frames":["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},"orangePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},"bluePulse":{"interval":100,"frames":["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"orangeBluePulse":{"interval":100,"frames":["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},"timeTravel":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺██████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▓█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺▒█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺░█████\xa3\xa3\xa3 ","☺ █████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺█████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▓████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺▒████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺░████\xa3\xa3\xa3 "," ☺ ████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺████\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▓███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺▒███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺░███\xa3\xa3\xa3 "," ☺ ███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺███\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▓██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺▒██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺░██\xa3\xa3\xa3 "," ☺ ██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺██\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▓█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺▒█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺░█\xa3\xa3\xa3 "," ☺ █\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺█\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▓\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺▒\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺░\xa3\xa3\xa3 "," ☺ \xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺\xa3\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▓\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺▒\xa3\xa3 "," ☺░\xa3\xa3 "," ☺░\xa3\xa3 "," ☺ \xa3\xa3 "," ☺\xa3\xa3 "," ☺\xa3\xa3 "," ☺▓\xa3 "," ☺▓\xa3 "," ☺▒\xa3 "," ☺▒\xa3 "," ☺░\xa3 "," ☺░\xa3 "," ☺ \xa3 "," ☺\xa3 "," ☺\xa3 "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & \xa3 "," & ░\xa3 "," & ▒\xa3 "," & ▓\xa3 "," & \xa3\xa3 "," & ░\xa3\xa3 "," & ▒\xa3\xa3 ","& ▓\xa3\xa3 ","& \xa3\xa3\xa3 "," ░\xa3\xa3\xa3 "," ▒\xa3\xa3\xa3 "," ▓\xa3\xa3\xa3 "," █\xa3\xa3\xa3 "," ░█\xa3\xa3\xa3 "," ▒█\xa3\xa3\xa3 "," ▓█\xa3\xa3\xa3 "," ██\xa3\xa3\xa3 "," ░██\xa3\xa3\xa3 "," ▒██\xa3\xa3\xa3 "," ▓██\xa3\xa3\xa3 "," ███\xa3\xa3\xa3 "," ░███\xa3\xa3\xa3 "," ▒███\xa3\xa3\xa3 "," ▓███\xa3\xa3\xa3 "," ████\xa3\xa3\xa3 "," ░████\xa3\xa3\xa3 "," ▒████\xa3\xa3\xa3 "," ▓████\xa3\xa3\xa3 "," █████\xa3\xa3\xa3 "," ░█████\xa3\xa3\xa3 "," ▒█████\xa3\xa3\xa3 "," ▓█████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "," ██████\xa3\xa3\xa3 "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xba> ~~~~~~~~~~~~~~~~~","(\xba> ~~~~~~~~~~~~~~~~","((\xba> ~~~~~~~~~~~~~~~","<((\xba> ~~~~~~~~~~~~~~","><((\xba> ~~~~~~~~~~~~~"," ><((\xba> ~~~~~~~~~~~~","~ ><((\xba> ~~~~~~~~~~~","~~ <>((\xba> ~~~~~~~~~~","~~~ ><((\xba> ~~~~~~~~~","~~~~ <>((\xba> ~~~~~~~~","~~~~~ ><((\xba> ~~~~~~~","~~~~~~ <>((\xba> ~~~~~~","~~~~~~~ ><((\xba> ~~~~~","~~~~~~~~ <>((\xba> ~~~~","~~~~~~~~~ ><((\xba> ~~~","~~~~~~~~~~ <>((\xba> ~~","~~~~~~~~~~~ ><((\xba> ~","~~~~~~~~~~~~ <>((\xba> ","~~~~~~~~~~~~~ ><((\xba>","~~~~~~~~~~~~~~ <>((\xba","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}');function I({label:e,type:t}){let{frame:r}=function({type:e="dots"}){let[t,r]=(0,g.useState)(0),n=k[e];return(0,g.useEffect)(()=>{let e=setInterval(()=>{r(e=>e===n.frames.length-1?0:e+1)},n.interval);return()=>{clearInterval(e)}},[n]),{frame:n.frames[t]??""}}({type:t}),{styles:n}=h("Spinner");return g.createElement(o,{...n.container()},g.createElement(l,{...n.frame()},r),e&&g.createElement(l,{...n.label()},e))}Object.keys(k);let M=(e,t)=>{switch(t.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+t.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+t.text.length};case"delete":{let t=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,t)+e.value.slice(t+1),cursorOffset:t}}}},A=t.inverse(" ");function D({isDisabled:e=!1,defaultValue:r,placeholder:a="",suggestions:s,onChange:i,onSubmit:o}){let{inputValue:c}=(({isDisabled:e=!1,state:r,placeholder:l=""})=>{let a=(0,g.useMemo)(()=>e?l?t.dim(l):"":l&&l.length>0?t.inverse(l[0])+t.dim(l.slice(1)):A,[e,l]),s=(0,g.useMemo)(()=>{if(e)return r.value;let n=0,l=r.value.length>0?"":A;for(let e of r.value)l+=n===r.cursorOffset?t.inverse(e):e,n++;return r.suggestion?r.cursorOffset===r.value.length?l+=t.inverse(r.suggestion[0])+t.dim(r.suggestion.slice(1)):l+=t.dim(r.suggestion):r.value.length>0&&r.cursorOffset===r.value.length&&(l+=A),l},[e,r.value,r.cursorOffset,r.suggestion]);return n((e,t)=>{if(!t.upArrow&&!t.downArrow&&(!t.ctrl||"c"!==e)&&!t.tab&&(!t.shift||!t.tab)){if(t.return)return void r.submit();t.leftArrow?r.moveCursorLeft():t.rightArrow?r.moveCursorRight():t.backspace||t.delete?r.delete():r.insert(e)}},{isActive:!e}),{inputValue:r.value.length>0?s:a}})({isDisabled:e,placeholder:a,state:(({defaultValue:e="",suggestions:t,onChange:r,onSubmit:n})=>{let[l,a]=(0,g.useReducer)(M,{previousValue:e,value:e,cursorOffset:e.length}),s=(0,g.useMemo)(()=>{if(0!==l.value.length)return t?.find(e=>e.startsWith(l.value))?.replace(l.value,"")},[l.value,t]),i=(0,g.useCallback)(()=>{a({type:"move-cursor-left"})},[]),o=(0,g.useCallback)(()=>{a({type:"move-cursor-right"})},[]),c=(0,g.useCallback)(e=>{a({type:"insert",text:e})},[]),u=(0,g.useCallback)(()=>{a({type:"delete"})},[]),_=(0,g.useCallback)(()=>{if(s){c(s),n?.(l.value+s);return}n?.(l.value)},[l.value,s,c,n]);return(0,g.useEffect)(()=>{l.value!==l.previousValue&&r?.(l.value)},[l.previousValue,l.value,r]),{...l,suggestion:s,moveCursorLeft:i,moveCursorRight:o,insert:c,delete:u,submit:_}})({defaultValue:r,suggestions:s,onChange:i,onSubmit:o})}),{styles:u}=h("TextInput");return g.createElement(l,{...u.value()},c)}(0,g.createContext)({marker:r.line});(0,g.createContext)({marker:""}),t.inverse(" "),t.inverse(" ");let P=e("node:os"),V=e("node:stream"),j="#72A7FF",F="#4B586C",T="#7F8DA6",$="#55D6A9",K="#F2C66D",R=u.map(({command:e})=>e.replace(/\s+\[[^\]]+\]$/,"")),B=_.map(({command:e})=>e.replace(/\s+\[[^\]]+\]$/,"")),L={id:"initial",kind:"initial"};function H(){let e=[],t=-1,r="";return{next:n=>t<0?n:(t-=1)<0?r:e[t],previous:n=>0===e.length?n:(t<0&&(r=n),t=Math.min(t+1,e.length-1),e[t]),record(n){e.unshift(n),e.length>20&&(e.length=20),t=-1,r=""}}}async function U(e){let t=new J,r=new Y(e.toChoices),n=new Q,l=await e.createSession(t,r.selectItem,n.update),s=a(g.createElement(W,{deviceAppSetup:n,selections:r,session:l,subscribeCompileProgress:e.subscribeCompileProgress,transcript:t}),{exitOnCtrlC:!1,maxFps:15,stderr:t,stdin:e.stdin,stdout:process.stderr});try{await s.waitUntilExit()}finally{r.cancel(),await l.close()}return{status:l.getState().status}}function W({deviceAppSetup:e,session:t,selections:r,subscribeCompileProgress:a,transcript:c}){let{exit:u}=s(),[_,f]=(0,g.useState)(),[m,d]=(0,g.useState)(!1),v=(0,g.useRef)(""),[p,b]=(0,g.useState)(0),h=(0,g.useRef)({device:H(),root:H()}).current,[x,y]=(0,g.useState)("root"),[E,C]=(0,g.useState)(()=>c.snapshot()),[w,S]=(0,g.useState)(),[k,M]=(0,g.useState)(()=>t.getState()),[A,P]=(0,g.useState)(),[V,U]=(0,g.useState)(()=>e.snapshot()),z=(0,g.useCallback)((e,t="执行中")=>{f(e?t:void 0)},[]),J=(0,g.useCallback)(()=>d(!0),[]);(0,g.useEffect)(()=>t.subscribe(e=>{"client-disconnected"===e&&y("root")}),[t]),(0,g.useEffect)(()=>e.subscribe(U),[e]),(0,g.useEffect)(()=>{m&&u()},[u,m]),(0,g.useEffect)(()=>c.subscribe(C),[c]),(0,g.useEffect)(()=>r.subscribe(e=>{S(e)}),[r]),(0,g.useEffect)(()=>a?.(e=>{P(e<1?e:void 0)}),[a]),(0,g.useEffect)(()=>{let e=setInterval(()=>M(t.getState()),500);return t.stopped.then(J,J),()=>clearInterval(e)},[J,t]);let Q=(0,g.useCallback)(e=>{let r=e.trim();if(!r||_)return;v.current="",b(e=>e+1),h[x].record(r),c.appendLine(`${"device"===x?"device ›":"›"} ${r}`);let n=r.toLowerCase(),l=n.split(/\s+/,1)[0];if("device"===x&&("back"===n||".."===r)){z(!0,"正在返回主命令"),t.returnToRoot().finally(()=>{y("root"),z(!1)});return}let a=r;"device"===x&&"status"!==l&&"web"!==l&&(a=`device ${r}`),z(!0),t.execute(a).then(e=>{"root"===x&&"enter-device"===e&&y("device"),M(t.getState())}).finally(()=>z(!1))},[_,h,x,t,z,c]);return n((e,n)=>{if(n.ctrl&&"c"===e){if(r.cancel(),_){t.cancelActiveCommand()&&z(!0,"正在停止");return}z(!0,"正在退出"),t.close().finally(J);return}if(!w&&n.ctrl&&"u"===e){v.current="",b(e=>e+1);return}w?n.escape&&r.resolve(void 0):(e=>{let t=h[x];if(e.upArrow)v.current=t.previous(v.current);else if(e.downArrow)v.current=t.next(v.current);else{if(!e.tab||e.shift)return;let t=("device"===x?B:R).find(e=>e.startsWith(v.current));if(!t||t===v.current)return;v.current=t}b(e=>e+1)})(n)}),g.createElement(g.Fragment,null,g.createElement(i,{items:[L,...E]},e=>{var t;if("initial"===e.kind)return g.createElement(o,{flexDirection:"column",key:e.id},g.createElement(G,{state:k}));let r=e.text.startsWith("⚠");return g.createElement(l,{color:r?void 0:(t=e.text,/^(error|failed|failure_reason|启动真机调试失败|启动豆包开发者工具失败|关闭豆包开发者工具失败)/i.test(t)?"#FF6B7A":/^(warning|toolchain warnings)/i.test(t)?K:/^✓ (下载豆包开发者工具|豆包开发者工具已安装)/.test(t)||/^(status: ok|status: running|page pushed|widget pushed|web_debugger|Web 模拟器已打开)/i.test(t)?$:/^(debug:|(?:device )?›)/i.test(t)?j:void 0),key:e.id,wrap:"wrap"},r&&g.createElement(l,{color:K},"⚠"),r?e.text.slice(1):e.text||" ")}),g.createElement(o,{display:m?"none":"flex",flexDirection:"column"},g.createElement(q,{scope:x}),g.createElement(o,{flexDirection:"column",marginTop:1},V?g.createElement(N,{progress:V}):void 0!==A?g.createElement(I,{label:`应用编译 ${Math.round(100*A)}%`}):_?g.createElement(I,{label:_}):null,w?g.createElement(o,{borderColor:F,borderStyle:"single",flexDirection:"column",paddingX:1},g.createElement(l,{bold:!0,color:j},"versionTag"===w.kind?"选择关联的 versionTag":`Select ${"page"===w.kind?"a page":"a widget"}`),g.createElement(O,{onChange:e=>r.resolve(e),options:w.choices,visibleOptionCount:7}),g.createElement(l,{color:T},"↑↓ move enter select esc cancel")):g.createElement(o,null,g.createElement(l,{bold:!0,color:j},"device"===x?"device › ":"› "),g.createElement(D,{defaultValue:v.current,isDisabled:!!_,key:p,onChange:e=>{v.current=e},onSubmit:Q,placeholder:"device"===x?"back 返回主命令":"Ctrl+C 退出",suggestions:"device"===x?B:R}))),g.createElement(X,{state:k})))}function N({progress:e}){let t=f(e);return"complete"===e.phase?g.createElement(o,null,g.createElement(l,{color:$},"✓ ",t)):g.createElement(o,null,g.createElement(I,{label:t}))}function q({scope:e}){let t="device"===e?_:u;return g.createElement(o,{flexDirection:"column",marginTop:1},g.createElement(l,{bold:!0,color:j},"device"===e?"真机调试命令":"可用命令"),t.map(e=>g.createElement(o,{flexDirection:"row",key:e.command},g.createElement(o,{width:24},g.createElement(l,{color:j},` ${e.command}`)),g.createElement(l,null,e.description))))}function G({state:e}){return g.createElement(o,{borderColor:F,borderStyle:"single",flexDirection:"column",paddingX:1},g.createElement(l,null,g.createElement(l,{color:j},">"),g.createElement(l,{bold:!0}," Doubao Dev CLI"),g.createElement(l,{color:T},` (v${m})`)),g.createElement(l,{wrap:"truncate-middle"},g.createElement(l,{color:T},"Project".padEnd(16)),z(e.projectPath??e.appDir)),g.createElement(l,{wrap:"truncate-middle"},g.createElement(l,{color:T},"App".padEnd(16)),e.appId??"-"))}function X({state:e}){let{columns:t}=c(),r="running"===e.status,n=e.appId??"-",a=z(e.projectPath??e.appDir),s=`${n} \xb7 ${a}`,i=s.length+2<=t?s:n;return g.createElement(l,{color:T,wrap:"truncate-middle"},g.createElement(l,{color:r?$:T},r?"●":"○"),` ${i}`)}function z(e){let t=(0,P.homedir)();return e===t?"~":e.startsWith(`${t}/`)||e.startsWith(`${t}\\`)?`~${e.slice(t.length)}`:e}class J extends V.Writable{carry="";id=0;lines=[];subscribers=new Set;snapshot(){return[...this.lines]}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}appendLine(e){this.appendPart(e),this.notify()}_write(e,t,r){let n=`${this.carry}${e.toString()}`.split(/\r?\n/);for(let e of(this.carry=n.pop()??"",n))this.appendPart(e);this.notify(),r()}appendPart(e){this.lines.push({id:this.id++,kind:"line",text:e})}notify(){let e=this.snapshot();for(let t of this.subscribers)t(e)}}class Q{progress;subscribers=new Set;update=e=>{for(let t of(this.progress=e,this.subscribers))t(e)};snapshot(){return this.progress}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}}class Y{toChoices;listener;resolver;constructor(e){this.toChoices=e}selectItem=async(e,t)=>{this.cancel();let r=this.toChoices(e,t);if(r.length)return new Promise(t=>{this.resolver=t,this.listener?.({choices:r,kind:e})})};subscribe(e){return this.listener=e,()=>{this.listener===e&&(this.listener=void 0)}}resolve(e){let t=this.resolver;this.resolver=void 0,this.listener?.(void 0),t?.(e)}cancel(){this.resolve(void 0)}}export{U as runInkDevShell};