mobileboost-cli 0.2.2 → 0.2.3
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/.output/nitro.json +1 -1
- package/.output/public/assets/index-wAXRnbNo.js +520 -0
- package/.output/public/assets/{main-BbUrvuLL.js → main-CeoNGsUp.js} +1 -1
- package/.output/server/chunks/_/{_tanstack-start-manifest_v-CCgm5JAL.mjs → _tanstack-start-manifest_v-DA-9ufHl.mjs} +1 -1
- package/.output/server/chunks/_/actions-CszEX8Wv.mjs +1 -0
- package/.output/server/chunks/_/{agent-CUyzfc4e.mjs → agent-CYjOntOE.mjs} +1 -1
- package/.output/server/chunks/_/ai-client-B037VO11.mjs +1 -0
- package/.output/server/chunks/_/{appium-CMKpXGap.mjs → appium-CB7q1F7-.mjs} +1 -1
- package/.output/server/chunks/_/appium-client-NLCErNZG.mjs +1 -0
- package/.output/server/chunks/_/{client-CM5hUS2d.mjs → client-B14sS6WP.mjs} +1 -1
- package/.output/server/chunks/_/{describe-BfbyupMJ.mjs → describe-BN5m4F-F.mjs} +1 -1
- package/.output/server/chunks/_/device-CFbX4Slf.mjs +1 -0
- package/.output/server/chunks/_/files-D27pPBly.mjs +1 -0
- package/.output/server/chunks/_/hierarchy-RZUZWmuO.mjs +1 -0
- package/.output/server/chunks/_/hierarchy-helpers-CR7kKS69.mjs +3 -0
- package/.output/server/chunks/_/index-BwPMhGOi.mjs +502 -0
- package/.output/server/chunks/_/{router-DYcFhNaL.mjs → router-BkeWjFXo.mjs} +1 -1
- package/.output/server/chunks/_/{screenshot-Csbvymnl.mjs → screenshot-BR2gF_yP.mjs} +1 -1
- package/.output/server/chunks/_/server.mjs +3 -3
- package/.output/server/chunks/_/step-BuczzV1F.mjs +1 -0
- package/.output/server/chunks/_/stores-k5WcYw_y.mjs +1 -0
- package/.output/server/index.mjs +4 -4
- package/.output/server/package.json +2 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
- package/.output/public/assets/index-D7JF4301.js +0 -492
- package/.output/server/chunks/_/actions-CvabQsJo.mjs +0 -1
- package/.output/server/chunks/_/ai-client-waGeh-P8.mjs +0 -1
- package/.output/server/chunks/_/appium-client-DiTTrl8p.mjs +0 -1
- package/.output/server/chunks/_/device-CWFVkH1s.mjs +0 -1
- package/.output/server/chunks/_/files-CB9WpUb0.mjs +0 -1
- package/.output/server/chunks/_/hierarchy-DfPTUh7F.mjs +0 -1
- package/.output/server/chunks/_/hierarchy-helpers-BaGN7WBn.mjs +0 -3
- package/.output/server/chunks/_/index-BZ9EyYaV.mjs +0 -474
- package/.output/server/chunks/_/step-D2WQqd4J.mjs +0 -1
- package/.output/server/chunks/_/stores-2rWNmXVj.mjs +0 -1
|
@@ -48,4 +48,4 @@ const theme = ${JSON.stringify(a,null,2)};
|
|
|
48
48
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
49
49
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
50
50
|
|
|
51
|
-
export default theme;`}function m0(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const PA=e=>{if(!Number.isNaN(+e))return+e;const a=e.match(/\d*\.?\d+/g);if(!a)return 0;let i=0;for(let s=0;s<a.length;s+=1)i+=+a[s];return i};function KA(e){Object.assign(e,{alpha(a,i){const s=this||e;return s.colorSpace?`oklch(from ${a} l c h / ${typeof i=="string"?`calc(${i})`:i})`:s.vars?`rgba(${a.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof i=="string"?`calc(${i})`:i})`:Kv(a,PA(i))},lighten(a,i){const s=this||e;return s.colorSpace?`color-mix(in ${s.colorSpace}, ${a}, #fff ${m0(i)})`:su(a,i)},darken(a,i){const s=this||e;return s.colorSpace?`color-mix(in ${s.colorSpace}, ${a}, #000 ${m0(i)})`:lu(a,i)}})}function gd(e={},...a){const{breakpoints:i,mixins:s={},spacing:o,palette:f={},transitions:d={},typography:h={},shape:m,colorSpace:y,...v}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(pr(20));const g=Zd({...f,colorSpace:y}),S=Qv(e);let E=nn(S,{mixins:NA(S.breakpoints,s),palette:g,shadows:kA.slice(),typography:nS(g,h),transitions:YA(d),zIndex:{...VA}});return E=nn(E,v),E=a.reduce((R,_)=>nn(R,_),E),E.unstable_sxConfig={...$l,...v?.unstable_sxConfig},E.unstable_sx=function(_){return Pl({sx:_,theme:this})},E.toRuntimeSource=aS,KA(E),E}function XA(e){let a;return e<1?a=5.11916*e**2:a=4.5*Math.log(e+1)+2,Math.round(a*10)/1e3}const FA=[...Array(25)].map((e,a)=>{if(a===0)return"none";const i=XA(a);return`linear-gradient(rgba(255 255 255 / ${i}), rgba(255 255 255 / ${i}))`});function rS(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function iS(e){return e==="dark"?FA:[]}function ZA(e){const{palette:a={mode:"light"},opacity:i,overlays:s,colorSpace:o,...f}=e,d=Zd({...a,colorSpace:o});return{palette:d,opacity:{...rS(d.mode),...i},overlays:s||iS(d.mode),...f}}function JA(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const IA=e=>[...[...Array(25)].map((a,i)=>`--${e?`${e}-`:""}overlays-${i}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],WA=e=>(a,i)=>{const s=e.rootSelector||":root",o=e.colorSchemeSelector;let f=o;if(o==="class"&&(f=".%s"),o==="data"&&(f="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(f=`[${o}="%s"]`),e.defaultColorScheme===a){if(a==="dark"){const d={};return IA(e.cssVarPrefix).forEach(h=>{d[h]=i[h],delete i[h]}),f==="media"?{[s]:i,"@media (prefers-color-scheme: dark)":{[s]:d}}:f?{[f.replace("%s",a)]:d,[`${s}, ${f.replace("%s",a)}`]:i}:{[s]:{...i,...d}}}if(f&&f!=="media")return`${s}, ${f.replace("%s",String(a))}`}else if(a){if(f==="media")return{[`@media (prefers-color-scheme: ${String(a)})`]:{[s]:i}};if(f)return f.replace("%s",String(a))}return s};function tw(e,a){a.forEach(i=>{e[i]||(e[i]={})})}function P(e,a,i){!e[a]&&i&&(e[a]=i)}function bl(e){return typeof e!="string"||!e.startsWith("hsl")?e:Pv(e)}function ea(e,a){`${a}Channel`in e||(e[`${a}Channel`]=Sl(bl(e[a])))}function ew(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const zn=e=>{try{return e()}catch{}},nw=(e="mui")=>_A(e);function Zf(e,a,i,s,o){if(!i)return;i=i===!0?{}:i;const f=o==="dark"?"dark":"light";if(!s){a[o]=ZA({...i,palette:{mode:f,...i?.palette},colorSpace:e});return}const{palette:d,...h}=gd({...s,palette:{mode:f,...i?.palette},colorSpace:e});return a[o]={...i,palette:d,opacity:{...rS(f),...i?.opacity},overlays:i?.overlays||iS(f)},h}function aw(e={},...a){const{colorSchemes:i={light:!0},defaultColorScheme:s,disableCssColorScheme:o=!1,cssVarPrefix:f="mui",nativeColor:d=!1,shouldSkipGeneratingVar:h=JA,colorSchemeSelector:m=i.light&&i.dark?"media":void 0,rootSelector:y=":root",...v}=e,g=Object.keys(i)[0],S=s||(i.light&&g!=="light"?"light":g),E=nw(f),{[S]:R,light:_,dark:A,...z}=i,G={...z};let Q=R;if((S==="dark"&&!("dark"in i)||S==="light"&&!("light"in i))&&(Q=!0),!Q)throw new Error(pr(21,S));let k;d&&(k="oklch");const j=Zf(k,G,Q,v,S);_&&!G.light&&Zf(k,G,_,void 0,"light"),A&&!G.dark&&Zf(k,G,A,void 0,"dark");let L={defaultColorScheme:S,...j,cssVarPrefix:f,colorSchemeSelector:m,rootSelector:y,getCssVar:E,colorSchemes:G,font:{...LA(j.typography),...j.font},spacing:ew(v.spacing)};Object.keys(L.colorSchemes).forEach(at=>{const C=L.colorSchemes[at].palette,it=ct=>{const U=ct.split("-"),tt=U[1],ot=U[2];return E(ct,C[tt][ot])};C.mode==="light"&&(P(C.common,"background","#fff"),P(C.common,"onBackground","#000")),C.mode==="dark"&&(P(C.common,"background","#000"),P(C.common,"onBackground","#fff"));function W(ct,U,tt){if(k){let ot;return ct===lr&&(ot=`transparent ${((1-tt)*100).toFixed(0)}%`),ct===Ut&&(ot=`#000 ${(tt*100).toFixed(0)}%`),ct===Ht&&(ot=`#fff ${(tt*100).toFixed(0)}%`),`color-mix(in ${k}, ${U}, ${ot})`}return ct(U,tt)}if(tw(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){P(C.Alert,"errorColor",W(Ut,C.error.light,.6)),P(C.Alert,"infoColor",W(Ut,C.info.light,.6)),P(C.Alert,"successColor",W(Ut,C.success.light,.6)),P(C.Alert,"warningColor",W(Ut,C.warning.light,.6)),P(C.Alert,"errorFilledBg",it("palette-error-main")),P(C.Alert,"infoFilledBg",it("palette-info-main")),P(C.Alert,"successFilledBg",it("palette-success-main")),P(C.Alert,"warningFilledBg",it("palette-warning-main")),P(C.Alert,"errorFilledColor",zn(()=>C.getContrastText(C.error.main))),P(C.Alert,"infoFilledColor",zn(()=>C.getContrastText(C.info.main))),P(C.Alert,"successFilledColor",zn(()=>C.getContrastText(C.success.main))),P(C.Alert,"warningFilledColor",zn(()=>C.getContrastText(C.warning.main))),P(C.Alert,"errorStandardBg",W(Ht,C.error.light,.9)),P(C.Alert,"infoStandardBg",W(Ht,C.info.light,.9)),P(C.Alert,"successStandardBg",W(Ht,C.success.light,.9)),P(C.Alert,"warningStandardBg",W(Ht,C.warning.light,.9)),P(C.Alert,"errorIconColor",it("palette-error-main")),P(C.Alert,"infoIconColor",it("palette-info-main")),P(C.Alert,"successIconColor",it("palette-success-main")),P(C.Alert,"warningIconColor",it("palette-warning-main")),P(C.AppBar,"defaultBg",it("palette-grey-100")),P(C.Avatar,"defaultBg",it("palette-grey-400")),P(C.Button,"inheritContainedBg",it("palette-grey-300")),P(C.Button,"inheritContainedHoverBg",it("palette-grey-A100")),P(C.Chip,"defaultBorder",it("palette-grey-400")),P(C.Chip,"defaultAvatarColor",it("palette-grey-700")),P(C.Chip,"defaultIconColor",it("palette-grey-700")),P(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(C.LinearProgress,"primaryBg",W(Ht,C.primary.main,.62)),P(C.LinearProgress,"secondaryBg",W(Ht,C.secondary.main,.62)),P(C.LinearProgress,"errorBg",W(Ht,C.error.main,.62)),P(C.LinearProgress,"infoBg",W(Ht,C.info.main,.62)),P(C.LinearProgress,"successBg",W(Ht,C.success.main,.62)),P(C.LinearProgress,"warningBg",W(Ht,C.warning.main,.62)),P(C.Skeleton,"bg",k?W(lr,C.text.primary,.11):`rgba(${it("palette-text-primaryChannel")} / 0.11)`),P(C.Slider,"primaryTrack",W(Ht,C.primary.main,.62)),P(C.Slider,"secondaryTrack",W(Ht,C.secondary.main,.62)),P(C.Slider,"errorTrack",W(Ht,C.error.main,.62)),P(C.Slider,"infoTrack",W(Ht,C.info.main,.62)),P(C.Slider,"successTrack",W(Ht,C.success.main,.62)),P(C.Slider,"warningTrack",W(Ht,C.warning.main,.62));const ct=k?W(Ut,C.background.default,.6825):vo(C.background.default,.8);P(C.SnackbarContent,"bg",ct),P(C.SnackbarContent,"color",zn(()=>k?pd.text.primary:C.getContrastText(ct))),P(C.SpeedDialAction,"fabHoverBg",vo(C.background.paper,.15)),P(C.StepConnector,"border",it("palette-grey-400")),P(C.StepContent,"border",it("palette-grey-400")),P(C.Switch,"defaultColor",it("palette-common-white")),P(C.Switch,"defaultDisabledColor",it("palette-grey-100")),P(C.Switch,"primaryDisabledColor",W(Ht,C.primary.main,.62)),P(C.Switch,"secondaryDisabledColor",W(Ht,C.secondary.main,.62)),P(C.Switch,"errorDisabledColor",W(Ht,C.error.main,.62)),P(C.Switch,"infoDisabledColor",W(Ht,C.info.main,.62)),P(C.Switch,"successDisabledColor",W(Ht,C.success.main,.62)),P(C.Switch,"warningDisabledColor",W(Ht,C.warning.main,.62)),P(C.TableCell,"border",W(Ht,W(lr,C.divider,1),.88)),P(C.Tooltip,"bg",W(lr,C.grey[700],.92))}if(C.mode==="dark"){P(C.Alert,"errorColor",W(Ht,C.error.light,.6)),P(C.Alert,"infoColor",W(Ht,C.info.light,.6)),P(C.Alert,"successColor",W(Ht,C.success.light,.6)),P(C.Alert,"warningColor",W(Ht,C.warning.light,.6)),P(C.Alert,"errorFilledBg",it("palette-error-dark")),P(C.Alert,"infoFilledBg",it("palette-info-dark")),P(C.Alert,"successFilledBg",it("palette-success-dark")),P(C.Alert,"warningFilledBg",it("palette-warning-dark")),P(C.Alert,"errorFilledColor",zn(()=>C.getContrastText(C.error.dark))),P(C.Alert,"infoFilledColor",zn(()=>C.getContrastText(C.info.dark))),P(C.Alert,"successFilledColor",zn(()=>C.getContrastText(C.success.dark))),P(C.Alert,"warningFilledColor",zn(()=>C.getContrastText(C.warning.dark))),P(C.Alert,"errorStandardBg",W(Ut,C.error.light,.9)),P(C.Alert,"infoStandardBg",W(Ut,C.info.light,.9)),P(C.Alert,"successStandardBg",W(Ut,C.success.light,.9)),P(C.Alert,"warningStandardBg",W(Ut,C.warning.light,.9)),P(C.Alert,"errorIconColor",it("palette-error-main")),P(C.Alert,"infoIconColor",it("palette-info-main")),P(C.Alert,"successIconColor",it("palette-success-main")),P(C.Alert,"warningIconColor",it("palette-warning-main")),P(C.AppBar,"defaultBg",it("palette-grey-900")),P(C.AppBar,"darkBg",it("palette-background-paper")),P(C.AppBar,"darkColor",it("palette-text-primary")),P(C.Avatar,"defaultBg",it("palette-grey-600")),P(C.Button,"inheritContainedBg",it("palette-grey-800")),P(C.Button,"inheritContainedHoverBg",it("palette-grey-700")),P(C.Chip,"defaultBorder",it("palette-grey-700")),P(C.Chip,"defaultAvatarColor",it("palette-grey-300")),P(C.Chip,"defaultIconColor",it("palette-grey-300")),P(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(C.LinearProgress,"primaryBg",W(Ut,C.primary.main,.5)),P(C.LinearProgress,"secondaryBg",W(Ut,C.secondary.main,.5)),P(C.LinearProgress,"errorBg",W(Ut,C.error.main,.5)),P(C.LinearProgress,"infoBg",W(Ut,C.info.main,.5)),P(C.LinearProgress,"successBg",W(Ut,C.success.main,.5)),P(C.LinearProgress,"warningBg",W(Ut,C.warning.main,.5)),P(C.Skeleton,"bg",k?W(lr,C.text.primary,.13):`rgba(${it("palette-text-primaryChannel")} / 0.13)`),P(C.Slider,"primaryTrack",W(Ut,C.primary.main,.5)),P(C.Slider,"secondaryTrack",W(Ut,C.secondary.main,.5)),P(C.Slider,"errorTrack",W(Ut,C.error.main,.5)),P(C.Slider,"infoTrack",W(Ut,C.info.main,.5)),P(C.Slider,"successTrack",W(Ut,C.success.main,.5)),P(C.Slider,"warningTrack",W(Ut,C.warning.main,.5));const ct=k?W(Ht,C.background.default,.985):vo(C.background.default,.98);P(C.SnackbarContent,"bg",ct),P(C.SnackbarContent,"color",zn(()=>k?tS.text.primary:C.getContrastText(ct))),P(C.SpeedDialAction,"fabHoverBg",vo(C.background.paper,.15)),P(C.StepConnector,"border",it("palette-grey-600")),P(C.StepContent,"border",it("palette-grey-600")),P(C.Switch,"defaultColor",it("palette-grey-300")),P(C.Switch,"defaultDisabledColor",it("palette-grey-600")),P(C.Switch,"primaryDisabledColor",W(Ut,C.primary.main,.55)),P(C.Switch,"secondaryDisabledColor",W(Ut,C.secondary.main,.55)),P(C.Switch,"errorDisabledColor",W(Ut,C.error.main,.55)),P(C.Switch,"infoDisabledColor",W(Ut,C.info.main,.55)),P(C.Switch,"successDisabledColor",W(Ut,C.success.main,.55)),P(C.Switch,"warningDisabledColor",W(Ut,C.warning.main,.55)),P(C.TableCell,"border",W(Ut,W(lr,C.divider,1),.68)),P(C.Tooltip,"bg",W(lr,C.grey[700],.92))}ea(C.background,"default"),ea(C.background,"paper"),ea(C.common,"background"),ea(C.common,"onBackground"),ea(C,"divider"),Object.keys(C).forEach(ct=>{const U=C[ct];ct!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&P(C[ct],"mainChannel",Sl(bl(U.main))),U.light&&P(C[ct],"lightChannel",Sl(bl(U.light))),U.dark&&P(C[ct],"darkChannel",Sl(bl(U.dark))),U.contrastText&&P(C[ct],"contrastTextChannel",Sl(bl(U.contrastText))),ct==="text"&&(ea(C[ct],"primary"),ea(C[ct],"secondary")),ct==="action"&&(U.active&&ea(C[ct],"active"),U.selected&&ea(C[ct],"selected")))})}),L=a.reduce((at,C)=>nn(at,C),L);const Y={prefix:f,disableCssColorScheme:o,shouldSkipGeneratingVar:h,getSelector:WA(L),enableContrastVars:d},{vars:F,generateThemeVars:I,generateStyleSheets:nt}=EA(L,Y);return L.vars=F,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([at,C])=>{L[at]=C}),L.generateThemeVars=I,L.generateStyleSheets=nt,L.generateSpacing=function(){return Gv(v.spacing,Yd(this))},L.getColorSchemeSelector=xA(m),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=h,L.unstable_sxConfig={...$l,...v?.unstable_sxConfig},L.unstable_sx=function(C){return Pl({sx:C,theme:this})},L.toRuntimeSource=aS,L}function y0(e,a,i){e.colorSchemes&&i&&(e.colorSchemes[a]={...i!==!0&&i,palette:Zd({...i===!0?{}:i.palette,mode:a})})}function Jd(e={},...a){const{palette:i,cssVariables:s=!1,colorSchemes:o=i?void 0:{light:!0},defaultColorScheme:f=i?.mode,...d}=e,h=f||"light",m=o?.[h],y={...o,...i?{[h]:{...typeof m!="boolean"&&m,palette:i}}:void 0};if(s===!1){if(!("colorSchemes"in e))return gd(e,...a);let v=i;"palette"in e||y[h]&&(y[h]!==!0?v=y[h].palette:h==="dark"&&(v={mode:"dark"}));const g=gd({...e,palette:v},...a);return g.defaultColorScheme=h,g.colorSchemes=y,g.palette.mode==="light"&&(g.colorSchemes.light={...y.light!==!0&&y.light,palette:g.palette},y0(g,"dark",y.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...y.dark!==!0&&y.dark,palette:g.palette},y0(g,"light",y.light)),g}return!i&&!("light"in y)&&h==="light"&&(y.light=!0),aw({...d,colorSchemes:y,defaultColorScheme:h,...typeof s!="boolean"&&s},...a)}const rw=Jd();function iw({theme:e,...a}){const i=dr in e?e[dr]:void 0;return K.jsx(Jv,{...a,themeId:i?dr:void 0,theme:i||e})}const So={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lw}=bA({themeId:dr,theme:()=>Jd({cssVariables:!0}),colorSchemeStorageKey:So.colorSchemeStorageKey,modeStorageKey:So.modeStorageKey,defaultColorScheme:{light:So.defaultLightColorScheme,dark:So.defaultDarkColorScheme},resolveTheme:e=>{const a={...e,typography:nS(e.palette,e.typography)};return a.unstable_sx=function(s){return Pl({sx:s,theme:this})},a}}),sw=lw;function ow({theme:e,...a}){const i=J.useMemo(()=>{if(typeof e=="function")return e;const s=dr in e?e[dr]:e;return"colorSchemes"in s?null:"vars"in s?e:{...e,vars:null}},[e]);return i?K.jsx(iw,{theme:i,...a}):K.jsx(sw,{theme:e,...a})}function uw(e){return K.jsx(Yv,{...e,defaultTheme:rw,themeId:dr})}function lS(e){return function(i){return K.jsx(uw,{styles:typeof e=="function"?s=>e({theme:s,...i}):e})}}function Vw(){return XR}function cw(e){return oA(e)}const vd=typeof lS({})=="function",fw=(e,a)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...a&&!e.vars&&{colorScheme:e.palette.mode}}),dw=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),sS=(e,a=!1)=>{const i={};a&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([f,d])=>{const h=e.getColorSchemeSelector(f);h.startsWith("@")?i[h]={":root":{colorScheme:d.palette?.mode}}:i[h.replace(/\s*&/,"")]={colorScheme:d.palette?.mode}});let s={html:fw(e,a),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...dw(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...i};const o=e.components?.MuiCssBaseline?.styleOverrides;return o&&(s=[s,o]),s},Ao="mui-ecs",hw=e=>{const a=sS(e,!1),i=Array.isArray(a)?a[0]:a;return!e.vars&&i&&(i.html[`:root:has(${Ao})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,o])=>{const f=e.getColorSchemeSelector(s);f.startsWith("@")?i[f]={[`:root:not(:has(.${Ao}))`]:{colorScheme:o.palette?.mode}}:i[f.replace(/\s*&/,"")]={[`&:not(:has(.${Ao}))`]:{colorScheme:o.palette?.mode}}}),a},mw=lS(vd?({theme:e,enableColorScheme:a})=>sS(e,a):({theme:e})=>hw(e));function yw(e){const a=cw({props:e,name:"MuiCssBaseline"}),{children:i,enableColorScheme:s=!1}=a;return K.jsxs(J.Fragment,{children:[vd&&K.jsx(mw,{enableColorScheme:s}),!vd&&!s&&K.jsx("span",{className:Ao,style:{display:"none"}}),i]})}const pw="/assets/index-DcK8FECE.css",gw=Jd({typography:{fontFamily:"'Roboto Variable', sans-serif"}}),oS=DT()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Mobileboost CLI"}],links:[{rel:"stylesheet",href:pw}]}),shellComponent:vw});function vw(){return K.jsx(bw,{children:K.jsx(fv,{})})}function Sw({children:e}){const a=Mv({key:"css"});return K.jsx(zx,{value:a,children:K.jsxs(ow,{theme:gw,children:[K.jsx(yw,{}),e]})})}function bw({children:e}){return K.jsxs("html",{children:[K.jsx("head",{children:K.jsx(ZT,{})}),K.jsxs("body",{children:[K.jsx(Sw,{children:e}),K.jsx(IT,{})]})]})}const _w="modulepreload",Cw=function(e){return"/"+e},p0={},Tw=function(a,i,s){let o=Promise.resolve();if(i&&i.length>0){let m=function(y){return Promise.all(y.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=d?.nonce||d?.getAttribute("nonce");o=m(i.map(y=>{if(y=Cw(y),y in p0)return;p0[y]=!0;const v=y.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${g}`))return;const S=document.createElement("link");if(S.rel=v?"stylesheet":_w,v||(S.as="script"),S.crossOrigin="",S.href=y,h&&S.setAttribute("nonce",h),document.head.appendChild(S),v)return new Promise((E,R)=>{S.addEventListener("load",E),S.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return o.then(d=>{for(const h of d||[])h.status==="rejected"&&f(h.reason);return a().catch(f)})},Ew=()=>Tw(()=>import("./index-D7JF4301.js"),[]),xw=nd("/")({component:BT(Ew,"component")}),Rw=xw.update({id:"/",path:"/",getParentRoute:()=>oS}),Aw={IndexRoute:Rw},ww=oS._addFileChildren(Aw);function Ow({error:e}){const a=ge(),i=Tn({strict:!1,select:s=>s.id===ke});return console.error(e),K.jsxs("div",{className:"min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6",children:[K.jsx(kl,{error:e}),K.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[K.jsx("button",{onClick:()=>{a.invalidate()},className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",children:"Try Again"}),i?K.jsx(Ml,{to:"/",className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",children:"Home"}):K.jsx(Ml,{to:"/",className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",onClick:s=>{s.preventDefault(),window.history.back()},children:"Go Back"})]})]})}function Mw({children:e}){return K.jsxs("div",{className:"space-y-2 p-2",children:[K.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:e||K.jsx("p",{children:"The page you are looking for does not exist."})}),K.jsxs("p",{className:"flex items-center gap-2 flex-wrap",children:[K.jsx("button",{onClick:()=>window.history.back(),className:"bg-emerald-500 text-white px-2 py-1 rounded-sm uppercase font-black text-sm",children:"Go back"}),K.jsx(Ml,{to:"/",className:"bg-cyan-600 text-white px-2 py-1 rounded-sm uppercase font-black text-sm",children:"Start Over"})]})]})}function zw(){const e=new QE,a=VT({routeTree:ww,context:{queryClient:e},defaultPreload:"intent",defaultErrorComponent:Ow,defaultNotFoundComponent:()=>K.jsx(Mw,{})});return PE({router:a,queryClient:e}),a}async function Dw(){const e=await zw();let a;return a=[],window.__TSS_START_OPTIONS__={serializationAdapters:a},a.push(cE),e.options.serializationAdapters&&a.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:a}),e.state.matches.length||await tE(e),e}let Jf;function Lw(){return Jf||(Jf=Dw()),K.jsx(sT,{promise:Jf,children:e=>K.jsx(KT,{router:e})})}J.startTransition(()=>{B1.hydrateRoot(document,K.jsx(J.StrictMode,{children:K.jsx(Lw,{})}))});export{qe as $,Qw as A,na as B,rw as C,cw as D,kv as E,$v as F,Nw as G,GA as H,Kv as I,XA as J,qw as K,Ux as L,fA as M,Vw as N,ov as O,Yw as P,lS as Q,yi as R,Ko as S,dr as T,pr as U,Jd as V,md as W,nn as X,tA as Y,Ul as Z,fd as _,ld as a,q1 as a0,hd as a1,jw as a2,rE as a3,tn as a4,Ge as a5,uE as a6,vT as a7,yE as b,id as c,jE as d,bE as e,pv as f,Me as g,zl as h,Xo as i,kE as j,J as k,Hw as l,Gw as m,Oe as n,Pl as o,EE as p,PR as q,gE as r,Uw as s,pE as t,kw as u,XR as v,K as w,FR as x,Kx as y,Qv as z};
|
|
51
|
+
export default theme;`}function m0(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const PA=e=>{if(!Number.isNaN(+e))return+e;const a=e.match(/\d*\.?\d+/g);if(!a)return 0;let i=0;for(let s=0;s<a.length;s+=1)i+=+a[s];return i};function KA(e){Object.assign(e,{alpha(a,i){const s=this||e;return s.colorSpace?`oklch(from ${a} l c h / ${typeof i=="string"?`calc(${i})`:i})`:s.vars?`rgba(${a.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof i=="string"?`calc(${i})`:i})`:Kv(a,PA(i))},lighten(a,i){const s=this||e;return s.colorSpace?`color-mix(in ${s.colorSpace}, ${a}, #fff ${m0(i)})`:su(a,i)},darken(a,i){const s=this||e;return s.colorSpace?`color-mix(in ${s.colorSpace}, ${a}, #000 ${m0(i)})`:lu(a,i)}})}function gd(e={},...a){const{breakpoints:i,mixins:s={},spacing:o,palette:f={},transitions:d={},typography:h={},shape:m,colorSpace:y,...v}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(pr(20));const g=Zd({...f,colorSpace:y}),S=Qv(e);let E=nn(S,{mixins:NA(S.breakpoints,s),palette:g,shadows:kA.slice(),typography:nS(g,h),transitions:YA(d),zIndex:{...VA}});return E=nn(E,v),E=a.reduce((R,_)=>nn(R,_),E),E.unstable_sxConfig={...$l,...v?.unstable_sxConfig},E.unstable_sx=function(_){return Pl({sx:_,theme:this})},E.toRuntimeSource=aS,KA(E),E}function XA(e){let a;return e<1?a=5.11916*e**2:a=4.5*Math.log(e+1)+2,Math.round(a*10)/1e3}const FA=[...Array(25)].map((e,a)=>{if(a===0)return"none";const i=XA(a);return`linear-gradient(rgba(255 255 255 / ${i}), rgba(255 255 255 / ${i}))`});function rS(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function iS(e){return e==="dark"?FA:[]}function ZA(e){const{palette:a={mode:"light"},opacity:i,overlays:s,colorSpace:o,...f}=e,d=Zd({...a,colorSpace:o});return{palette:d,opacity:{...rS(d.mode),...i},overlays:s||iS(d.mode),...f}}function JA(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const IA=e=>[...[...Array(25)].map((a,i)=>`--${e?`${e}-`:""}overlays-${i}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],WA=e=>(a,i)=>{const s=e.rootSelector||":root",o=e.colorSchemeSelector;let f=o;if(o==="class"&&(f=".%s"),o==="data"&&(f="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(f=`[${o}="%s"]`),e.defaultColorScheme===a){if(a==="dark"){const d={};return IA(e.cssVarPrefix).forEach(h=>{d[h]=i[h],delete i[h]}),f==="media"?{[s]:i,"@media (prefers-color-scheme: dark)":{[s]:d}}:f?{[f.replace("%s",a)]:d,[`${s}, ${f.replace("%s",a)}`]:i}:{[s]:{...i,...d}}}if(f&&f!=="media")return`${s}, ${f.replace("%s",String(a))}`}else if(a){if(f==="media")return{[`@media (prefers-color-scheme: ${String(a)})`]:{[s]:i}};if(f)return f.replace("%s",String(a))}return s};function tw(e,a){a.forEach(i=>{e[i]||(e[i]={})})}function P(e,a,i){!e[a]&&i&&(e[a]=i)}function bl(e){return typeof e!="string"||!e.startsWith("hsl")?e:Pv(e)}function ea(e,a){`${a}Channel`in e||(e[`${a}Channel`]=Sl(bl(e[a])))}function ew(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const zn=e=>{try{return e()}catch{}},nw=(e="mui")=>_A(e);function Zf(e,a,i,s,o){if(!i)return;i=i===!0?{}:i;const f=o==="dark"?"dark":"light";if(!s){a[o]=ZA({...i,palette:{mode:f,...i?.palette},colorSpace:e});return}const{palette:d,...h}=gd({...s,palette:{mode:f,...i?.palette},colorSpace:e});return a[o]={...i,palette:d,opacity:{...rS(f),...i?.opacity},overlays:i?.overlays||iS(f)},h}function aw(e={},...a){const{colorSchemes:i={light:!0},defaultColorScheme:s,disableCssColorScheme:o=!1,cssVarPrefix:f="mui",nativeColor:d=!1,shouldSkipGeneratingVar:h=JA,colorSchemeSelector:m=i.light&&i.dark?"media":void 0,rootSelector:y=":root",...v}=e,g=Object.keys(i)[0],S=s||(i.light&&g!=="light"?"light":g),E=nw(f),{[S]:R,light:_,dark:A,...z}=i,G={...z};let Q=R;if((S==="dark"&&!("dark"in i)||S==="light"&&!("light"in i))&&(Q=!0),!Q)throw new Error(pr(21,S));let k;d&&(k="oklch");const j=Zf(k,G,Q,v,S);_&&!G.light&&Zf(k,G,_,void 0,"light"),A&&!G.dark&&Zf(k,G,A,void 0,"dark");let L={defaultColorScheme:S,...j,cssVarPrefix:f,colorSchemeSelector:m,rootSelector:y,getCssVar:E,colorSchemes:G,font:{...LA(j.typography),...j.font},spacing:ew(v.spacing)};Object.keys(L.colorSchemes).forEach(at=>{const C=L.colorSchemes[at].palette,it=ct=>{const U=ct.split("-"),tt=U[1],ot=U[2];return E(ct,C[tt][ot])};C.mode==="light"&&(P(C.common,"background","#fff"),P(C.common,"onBackground","#000")),C.mode==="dark"&&(P(C.common,"background","#000"),P(C.common,"onBackground","#fff"));function W(ct,U,tt){if(k){let ot;return ct===lr&&(ot=`transparent ${((1-tt)*100).toFixed(0)}%`),ct===Ut&&(ot=`#000 ${(tt*100).toFixed(0)}%`),ct===Ht&&(ot=`#fff ${(tt*100).toFixed(0)}%`),`color-mix(in ${k}, ${U}, ${ot})`}return ct(U,tt)}if(tw(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){P(C.Alert,"errorColor",W(Ut,C.error.light,.6)),P(C.Alert,"infoColor",W(Ut,C.info.light,.6)),P(C.Alert,"successColor",W(Ut,C.success.light,.6)),P(C.Alert,"warningColor",W(Ut,C.warning.light,.6)),P(C.Alert,"errorFilledBg",it("palette-error-main")),P(C.Alert,"infoFilledBg",it("palette-info-main")),P(C.Alert,"successFilledBg",it("palette-success-main")),P(C.Alert,"warningFilledBg",it("palette-warning-main")),P(C.Alert,"errorFilledColor",zn(()=>C.getContrastText(C.error.main))),P(C.Alert,"infoFilledColor",zn(()=>C.getContrastText(C.info.main))),P(C.Alert,"successFilledColor",zn(()=>C.getContrastText(C.success.main))),P(C.Alert,"warningFilledColor",zn(()=>C.getContrastText(C.warning.main))),P(C.Alert,"errorStandardBg",W(Ht,C.error.light,.9)),P(C.Alert,"infoStandardBg",W(Ht,C.info.light,.9)),P(C.Alert,"successStandardBg",W(Ht,C.success.light,.9)),P(C.Alert,"warningStandardBg",W(Ht,C.warning.light,.9)),P(C.Alert,"errorIconColor",it("palette-error-main")),P(C.Alert,"infoIconColor",it("palette-info-main")),P(C.Alert,"successIconColor",it("palette-success-main")),P(C.Alert,"warningIconColor",it("palette-warning-main")),P(C.AppBar,"defaultBg",it("palette-grey-100")),P(C.Avatar,"defaultBg",it("palette-grey-400")),P(C.Button,"inheritContainedBg",it("palette-grey-300")),P(C.Button,"inheritContainedHoverBg",it("palette-grey-A100")),P(C.Chip,"defaultBorder",it("palette-grey-400")),P(C.Chip,"defaultAvatarColor",it("palette-grey-700")),P(C.Chip,"defaultIconColor",it("palette-grey-700")),P(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(C.LinearProgress,"primaryBg",W(Ht,C.primary.main,.62)),P(C.LinearProgress,"secondaryBg",W(Ht,C.secondary.main,.62)),P(C.LinearProgress,"errorBg",W(Ht,C.error.main,.62)),P(C.LinearProgress,"infoBg",W(Ht,C.info.main,.62)),P(C.LinearProgress,"successBg",W(Ht,C.success.main,.62)),P(C.LinearProgress,"warningBg",W(Ht,C.warning.main,.62)),P(C.Skeleton,"bg",k?W(lr,C.text.primary,.11):`rgba(${it("palette-text-primaryChannel")} / 0.11)`),P(C.Slider,"primaryTrack",W(Ht,C.primary.main,.62)),P(C.Slider,"secondaryTrack",W(Ht,C.secondary.main,.62)),P(C.Slider,"errorTrack",W(Ht,C.error.main,.62)),P(C.Slider,"infoTrack",W(Ht,C.info.main,.62)),P(C.Slider,"successTrack",W(Ht,C.success.main,.62)),P(C.Slider,"warningTrack",W(Ht,C.warning.main,.62));const ct=k?W(Ut,C.background.default,.6825):vo(C.background.default,.8);P(C.SnackbarContent,"bg",ct),P(C.SnackbarContent,"color",zn(()=>k?pd.text.primary:C.getContrastText(ct))),P(C.SpeedDialAction,"fabHoverBg",vo(C.background.paper,.15)),P(C.StepConnector,"border",it("palette-grey-400")),P(C.StepContent,"border",it("palette-grey-400")),P(C.Switch,"defaultColor",it("palette-common-white")),P(C.Switch,"defaultDisabledColor",it("palette-grey-100")),P(C.Switch,"primaryDisabledColor",W(Ht,C.primary.main,.62)),P(C.Switch,"secondaryDisabledColor",W(Ht,C.secondary.main,.62)),P(C.Switch,"errorDisabledColor",W(Ht,C.error.main,.62)),P(C.Switch,"infoDisabledColor",W(Ht,C.info.main,.62)),P(C.Switch,"successDisabledColor",W(Ht,C.success.main,.62)),P(C.Switch,"warningDisabledColor",W(Ht,C.warning.main,.62)),P(C.TableCell,"border",W(Ht,W(lr,C.divider,1),.88)),P(C.Tooltip,"bg",W(lr,C.grey[700],.92))}if(C.mode==="dark"){P(C.Alert,"errorColor",W(Ht,C.error.light,.6)),P(C.Alert,"infoColor",W(Ht,C.info.light,.6)),P(C.Alert,"successColor",W(Ht,C.success.light,.6)),P(C.Alert,"warningColor",W(Ht,C.warning.light,.6)),P(C.Alert,"errorFilledBg",it("palette-error-dark")),P(C.Alert,"infoFilledBg",it("palette-info-dark")),P(C.Alert,"successFilledBg",it("palette-success-dark")),P(C.Alert,"warningFilledBg",it("palette-warning-dark")),P(C.Alert,"errorFilledColor",zn(()=>C.getContrastText(C.error.dark))),P(C.Alert,"infoFilledColor",zn(()=>C.getContrastText(C.info.dark))),P(C.Alert,"successFilledColor",zn(()=>C.getContrastText(C.success.dark))),P(C.Alert,"warningFilledColor",zn(()=>C.getContrastText(C.warning.dark))),P(C.Alert,"errorStandardBg",W(Ut,C.error.light,.9)),P(C.Alert,"infoStandardBg",W(Ut,C.info.light,.9)),P(C.Alert,"successStandardBg",W(Ut,C.success.light,.9)),P(C.Alert,"warningStandardBg",W(Ut,C.warning.light,.9)),P(C.Alert,"errorIconColor",it("palette-error-main")),P(C.Alert,"infoIconColor",it("palette-info-main")),P(C.Alert,"successIconColor",it("palette-success-main")),P(C.Alert,"warningIconColor",it("palette-warning-main")),P(C.AppBar,"defaultBg",it("palette-grey-900")),P(C.AppBar,"darkBg",it("palette-background-paper")),P(C.AppBar,"darkColor",it("palette-text-primary")),P(C.Avatar,"defaultBg",it("palette-grey-600")),P(C.Button,"inheritContainedBg",it("palette-grey-800")),P(C.Button,"inheritContainedHoverBg",it("palette-grey-700")),P(C.Chip,"defaultBorder",it("palette-grey-700")),P(C.Chip,"defaultAvatarColor",it("palette-grey-300")),P(C.Chip,"defaultIconColor",it("palette-grey-300")),P(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(C.LinearProgress,"primaryBg",W(Ut,C.primary.main,.5)),P(C.LinearProgress,"secondaryBg",W(Ut,C.secondary.main,.5)),P(C.LinearProgress,"errorBg",W(Ut,C.error.main,.5)),P(C.LinearProgress,"infoBg",W(Ut,C.info.main,.5)),P(C.LinearProgress,"successBg",W(Ut,C.success.main,.5)),P(C.LinearProgress,"warningBg",W(Ut,C.warning.main,.5)),P(C.Skeleton,"bg",k?W(lr,C.text.primary,.13):`rgba(${it("palette-text-primaryChannel")} / 0.13)`),P(C.Slider,"primaryTrack",W(Ut,C.primary.main,.5)),P(C.Slider,"secondaryTrack",W(Ut,C.secondary.main,.5)),P(C.Slider,"errorTrack",W(Ut,C.error.main,.5)),P(C.Slider,"infoTrack",W(Ut,C.info.main,.5)),P(C.Slider,"successTrack",W(Ut,C.success.main,.5)),P(C.Slider,"warningTrack",W(Ut,C.warning.main,.5));const ct=k?W(Ht,C.background.default,.985):vo(C.background.default,.98);P(C.SnackbarContent,"bg",ct),P(C.SnackbarContent,"color",zn(()=>k?tS.text.primary:C.getContrastText(ct))),P(C.SpeedDialAction,"fabHoverBg",vo(C.background.paper,.15)),P(C.StepConnector,"border",it("palette-grey-600")),P(C.StepContent,"border",it("palette-grey-600")),P(C.Switch,"defaultColor",it("palette-grey-300")),P(C.Switch,"defaultDisabledColor",it("palette-grey-600")),P(C.Switch,"primaryDisabledColor",W(Ut,C.primary.main,.55)),P(C.Switch,"secondaryDisabledColor",W(Ut,C.secondary.main,.55)),P(C.Switch,"errorDisabledColor",W(Ut,C.error.main,.55)),P(C.Switch,"infoDisabledColor",W(Ut,C.info.main,.55)),P(C.Switch,"successDisabledColor",W(Ut,C.success.main,.55)),P(C.Switch,"warningDisabledColor",W(Ut,C.warning.main,.55)),P(C.TableCell,"border",W(Ut,W(lr,C.divider,1),.68)),P(C.Tooltip,"bg",W(lr,C.grey[700],.92))}ea(C.background,"default"),ea(C.background,"paper"),ea(C.common,"background"),ea(C.common,"onBackground"),ea(C,"divider"),Object.keys(C).forEach(ct=>{const U=C[ct];ct!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&P(C[ct],"mainChannel",Sl(bl(U.main))),U.light&&P(C[ct],"lightChannel",Sl(bl(U.light))),U.dark&&P(C[ct],"darkChannel",Sl(bl(U.dark))),U.contrastText&&P(C[ct],"contrastTextChannel",Sl(bl(U.contrastText))),ct==="text"&&(ea(C[ct],"primary"),ea(C[ct],"secondary")),ct==="action"&&(U.active&&ea(C[ct],"active"),U.selected&&ea(C[ct],"selected")))})}),L=a.reduce((at,C)=>nn(at,C),L);const Y={prefix:f,disableCssColorScheme:o,shouldSkipGeneratingVar:h,getSelector:WA(L),enableContrastVars:d},{vars:F,generateThemeVars:I,generateStyleSheets:nt}=EA(L,Y);return L.vars=F,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([at,C])=>{L[at]=C}),L.generateThemeVars=I,L.generateStyleSheets=nt,L.generateSpacing=function(){return Gv(v.spacing,Yd(this))},L.getColorSchemeSelector=xA(m),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=h,L.unstable_sxConfig={...$l,...v?.unstable_sxConfig},L.unstable_sx=function(C){return Pl({sx:C,theme:this})},L.toRuntimeSource=aS,L}function y0(e,a,i){e.colorSchemes&&i&&(e.colorSchemes[a]={...i!==!0&&i,palette:Zd({...i===!0?{}:i.palette,mode:a})})}function Jd(e={},...a){const{palette:i,cssVariables:s=!1,colorSchemes:o=i?void 0:{light:!0},defaultColorScheme:f=i?.mode,...d}=e,h=f||"light",m=o?.[h],y={...o,...i?{[h]:{...typeof m!="boolean"&&m,palette:i}}:void 0};if(s===!1){if(!("colorSchemes"in e))return gd(e,...a);let v=i;"palette"in e||y[h]&&(y[h]!==!0?v=y[h].palette:h==="dark"&&(v={mode:"dark"}));const g=gd({...e,palette:v},...a);return g.defaultColorScheme=h,g.colorSchemes=y,g.palette.mode==="light"&&(g.colorSchemes.light={...y.light!==!0&&y.light,palette:g.palette},y0(g,"dark",y.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...y.dark!==!0&&y.dark,palette:g.palette},y0(g,"light",y.light)),g}return!i&&!("light"in y)&&h==="light"&&(y.light=!0),aw({...d,colorSchemes:y,defaultColorScheme:h,...typeof s!="boolean"&&s},...a)}const rw=Jd();function iw({theme:e,...a}){const i=dr in e?e[dr]:void 0;return K.jsx(Jv,{...a,themeId:i?dr:void 0,theme:i||e})}const So={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lw}=bA({themeId:dr,theme:()=>Jd({cssVariables:!0}),colorSchemeStorageKey:So.colorSchemeStorageKey,modeStorageKey:So.modeStorageKey,defaultColorScheme:{light:So.defaultLightColorScheme,dark:So.defaultDarkColorScheme},resolveTheme:e=>{const a={...e,typography:nS(e.palette,e.typography)};return a.unstable_sx=function(s){return Pl({sx:s,theme:this})},a}}),sw=lw;function ow({theme:e,...a}){const i=J.useMemo(()=>{if(typeof e=="function")return e;const s=dr in e?e[dr]:e;return"colorSchemes"in s?null:"vars"in s?e:{...e,vars:null}},[e]);return i?K.jsx(iw,{theme:i,...a}):K.jsx(sw,{theme:e,...a})}function uw(e){return K.jsx(Yv,{...e,defaultTheme:rw,themeId:dr})}function lS(e){return function(i){return K.jsx(uw,{styles:typeof e=="function"?s=>e({theme:s,...i}):e})}}function Vw(){return XR}function cw(e){return oA(e)}const vd=typeof lS({})=="function",fw=(e,a)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...a&&!e.vars&&{colorScheme:e.palette.mode}}),dw=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),sS=(e,a=!1)=>{const i={};a&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([f,d])=>{const h=e.getColorSchemeSelector(f);h.startsWith("@")?i[h]={":root":{colorScheme:d.palette?.mode}}:i[h.replace(/\s*&/,"")]={colorScheme:d.palette?.mode}});let s={html:fw(e,a),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...dw(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...i};const o=e.components?.MuiCssBaseline?.styleOverrides;return o&&(s=[s,o]),s},Ao="mui-ecs",hw=e=>{const a=sS(e,!1),i=Array.isArray(a)?a[0]:a;return!e.vars&&i&&(i.html[`:root:has(${Ao})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([s,o])=>{const f=e.getColorSchemeSelector(s);f.startsWith("@")?i[f]={[`:root:not(:has(.${Ao}))`]:{colorScheme:o.palette?.mode}}:i[f.replace(/\s*&/,"")]={[`&:not(:has(.${Ao}))`]:{colorScheme:o.palette?.mode}}}),a},mw=lS(vd?({theme:e,enableColorScheme:a})=>sS(e,a):({theme:e})=>hw(e));function yw(e){const a=cw({props:e,name:"MuiCssBaseline"}),{children:i,enableColorScheme:s=!1}=a;return K.jsxs(J.Fragment,{children:[vd&&K.jsx(mw,{enableColorScheme:s}),!vd&&!s&&K.jsx("span",{className:Ao,style:{display:"none"}}),i]})}const pw="/assets/index-DcK8FECE.css",gw=Jd({typography:{fontFamily:"'Roboto Variable', sans-serif"}}),oS=DT()({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Mobileboost CLI"}],links:[{rel:"stylesheet",href:pw}]}),shellComponent:vw});function vw(){return K.jsx(bw,{children:K.jsx(fv,{})})}function Sw({children:e}){const a=Mv({key:"css"});return K.jsx(zx,{value:a,children:K.jsxs(ow,{theme:gw,children:[K.jsx(yw,{}),e]})})}function bw({children:e}){return K.jsxs("html",{children:[K.jsx("head",{children:K.jsx(ZT,{})}),K.jsxs("body",{children:[K.jsx(Sw,{children:e}),K.jsx(IT,{})]})]})}const _w="modulepreload",Cw=function(e){return"/"+e},p0={},Tw=function(a,i,s){let o=Promise.resolve();if(i&&i.length>0){let m=function(y){return Promise.all(y.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),h=d?.nonce||d?.getAttribute("nonce");o=m(i.map(y=>{if(y=Cw(y),y in p0)return;p0[y]=!0;const v=y.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${y}"]${g}`))return;const S=document.createElement("link");if(S.rel=v?"stylesheet":_w,v||(S.as="script"),S.crossOrigin="",S.href=y,h&&S.setAttribute("nonce",h),document.head.appendChild(S),v)return new Promise((E,R)=>{S.addEventListener("load",E),S.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${y}`)))})}))}function f(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return o.then(d=>{for(const h of d||[])h.status==="rejected"&&f(h.reason);return a().catch(f)})},Ew=()=>Tw(()=>import("./index-wAXRnbNo.js"),[]),xw=nd("/")({component:BT(Ew,"component")}),Rw=xw.update({id:"/",path:"/",getParentRoute:()=>oS}),Aw={IndexRoute:Rw},ww=oS._addFileChildren(Aw);function Ow({error:e}){const a=ge(),i=Tn({strict:!1,select:s=>s.id===ke});return console.error(e),K.jsxs("div",{className:"min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6",children:[K.jsx(kl,{error:e}),K.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[K.jsx("button",{onClick:()=>{a.invalidate()},className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",children:"Try Again"}),i?K.jsx(Ml,{to:"/",className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",children:"Home"}):K.jsx(Ml,{to:"/",className:"px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded-sm text-white uppercase font-extrabold",onClick:s=>{s.preventDefault(),window.history.back()},children:"Go Back"})]})]})}function Mw({children:e}){return K.jsxs("div",{className:"space-y-2 p-2",children:[K.jsx("div",{className:"text-gray-600 dark:text-gray-400",children:e||K.jsx("p",{children:"The page you are looking for does not exist."})}),K.jsxs("p",{className:"flex items-center gap-2 flex-wrap",children:[K.jsx("button",{onClick:()=>window.history.back(),className:"bg-emerald-500 text-white px-2 py-1 rounded-sm uppercase font-black text-sm",children:"Go back"}),K.jsx(Ml,{to:"/",className:"bg-cyan-600 text-white px-2 py-1 rounded-sm uppercase font-black text-sm",children:"Start Over"})]})]})}function zw(){const e=new QE,a=VT({routeTree:ww,context:{queryClient:e},defaultPreload:"intent",defaultErrorComponent:Ow,defaultNotFoundComponent:()=>K.jsx(Mw,{})});return PE({router:a,queryClient:e}),a}async function Dw(){const e=await zw();let a;return a=[],window.__TSS_START_OPTIONS__={serializationAdapters:a},a.push(cE),e.options.serializationAdapters&&a.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:a}),e.state.matches.length||await tE(e),e}let Jf;function Lw(){return Jf||(Jf=Dw()),K.jsx(sT,{promise:Jf,children:e=>K.jsx(KT,{router:e})})}J.startTransition(()=>{B1.hydrateRoot(document,K.jsx(J.StrictMode,{children:K.jsx(Lw,{})}))});export{qe as $,Qw as A,na as B,rw as C,cw as D,kv as E,$v as F,Nw as G,GA as H,Kv as I,XA as J,qw as K,Ux as L,fA as M,Vw as N,ov as O,Yw as P,lS as Q,yi as R,Ko as S,dr as T,pr as U,Jd as V,md as W,nn as X,tA as Y,Ul as Z,fd as _,ld as a,q1 as a0,hd as a1,jw as a2,rE as a3,tn as a4,Ge as a5,uE as a6,vT as a7,yE as b,id as c,jE as d,bE as e,pv as f,Me as g,zl as h,Xo as i,kE as j,J as k,Hw as l,Gw as m,Oe as n,Pl as o,EE as p,PR as q,gE as r,Uw as s,pE as t,kw as u,XR as v,K as w,FR as x,Kx as y,Qv as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const s=()=>({routes:{__root__:{filePath:"/Users/ricpar11/Documents/mobileboost/mobileboost-cli/src/app/routes/__root.tsx",children:["/"],preloads:["/assets/main-
|
|
1
|
+
const s=()=>({routes:{__root__:{filePath:"/Users/ricpar11/Documents/mobileboost/mobileboost-cli/src/app/routes/__root.tsx",children:["/"],preloads:["/assets/main-CeoNGsUp.js"],assets:[]},"/":{filePath:"/Users/ricpar11/Documents/mobileboost/mobileboost-cli/src/app/routes/index.tsx",assets:[],preloads:["/assets/index-wAXRnbNo.js"]}},clientEntry:"/assets/main-CeoNGsUp.js"});export{s as tsrStartManifest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,a as t}from"./server.mjs";import{u as p,x as f,l as u,d as b,r as _,b as S}from"./device-CFbX4Slf.mjs";import{performDeepLink as h,restartApp as g,getPageSource as $,performSwipe as l,performTap as x,performType as v,performZoom as P}from"./appium-client-NLCErNZG.mjs";import{R as y,L as w,X as F}from"./hierarchy-helpers-CR7kKS69.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"zod";import"./step-BuczzV1F.mjs";import"webdriverio";import"xml2js";import"linkedom";const T=a("605c05774def700303f9889c0f8a28fed026e0b5c36a1563cff2835ee01d26b1",(e,r)=>O.__executeServer(e,r)),O=t({method:"POST"}).inputValidator(b).handler(T,async({data:e})=>(console.log(`Performing tap at ${e.x}, ${e.y}`),await x(e),{success:!0})),L=a("07e23aa87e88d53c6c9e3d8e88de788d27d7b10930150bc4fd510d4447aaf3de",(e,r)=>V.__executeServer(e,r)),V=t({method:"POST"}).inputValidator(_).handler(L,async({data:e})=>(console.log(`Performing type: "${e.text}"`),await v(e),{success:!0})),I=a("2b4a002699960d578addbcf4dd83fedcec62444d7da4bf7c2359be991ed6207e",(e,r)=>k.__executeServer(e,r)),k=t({method:"POST"}).inputValidator(u).handler(I,async({data:e})=>(console.log(`Performing swipe: ${e.x1},${e.y1} -> ${e.x2},${e.y2}`),await l(e),{success:!0})),z=a("10b616f4aacf11bb275166e4ae03f441f1d7c9a68a670dfadb03b74e1d012900",(e,r)=>A.__executeServer(e,r)),A=t({method:"POST"}).inputValidator(f).handler(z,async({data:e})=>{console.log(`Performing scroll until: text="${e.text}", id="${e.elementId}", dir=${e.direction}`);for(let r=0;r<(e.maxScrolls??15);r++){console.log(`Scroll Until Loop: ${r+1}/${e.maxScrolls}`);const m=await $(),i=await y(m);let d=i.hierarchy?.node?.[0];const n=i.hierarchy?.node;if(n){const c=n.find(s=>s.$&&s.$.package!=="com.android.systemui");c&&(d=c)}let o=!1;if(e.elementId&&w(d,e.elementId)&&(o=!0),!o&&e.text&&F(d,e.text)&&(o=!0),o)return console.log("Target found!"),{success:!0,scrolls:r};r<(e.maxScrolls??15)-1&&(await l({direction:e.direction}),await new Promise(c=>setTimeout(c,1e3)))}return console.log("Target NOT found after max scrolls"),{success:!1}}),D=a("c23cd3196f54848abd64a8b8d4660d7826a70cf44169d7bf29fc82e74a2cf612",(e,r)=>R.__executeServer(e,r)),R=t({method:"POST"}).inputValidator(S).handler(D,async({data:e})=>(console.log(`Performing zoom: ${e.direction}`),await P(e),{success:!0})),U=a("566ee4344553ab6300f847f5de346e037f92d986cb824ba1c313346e62345fbe",(e,r)=>N.__executeServer(e,r)),N=t({method:"POST"}).inputValidator(p).handler(U,async({data:e})=>(console.log(`Performing deep link: "${e.url}"`),await h(e.url),{success:!0})),Z=a("74707f0f69b6fbfb702db467d1eb3f8fb90ba2efd5f82338b79ec07903e39dc6",(e,r)=>B.__executeServer(e,r)),B=t({method:"POST"}).handler(Z,async e=>{const r=e.data;return console.log(`Restarting app on device: ${r.deviceId??"default"}`),await g(r.platform,r.deviceId),{success:!0}});export{U as deepLinkFn_createServerFn_handler,Z as restartAppFn_createServerFn_handler,z as scrollUntilFn_createServerFn_handler,I as swipeFn_createServerFn_handler,T as tapFn_createServerFn_handler,L as typeFn_createServerFn_handler,D as zoomFn_createServerFn_handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,a as i}from"./server.mjs";import{F as m,W as p}from"./ai-client-
|
|
1
|
+
import{c as o,a as i}from"./server.mjs";import{F as m,W as p}from"./ai-client-B037VO11.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"zod";import"sharp";import"./constants-Dh9o88yr.mjs";const e=o("5918013064f9b88efb265b30a770275d6c9d52bf42318f451bab8a47bc850917",(t,r)=>a.__executeServer(t,r)),a=i({method:"POST"}).inputValidator(m).handler(e,async({data:t})=>await p(t));export{e as executeAgentStepFn_createServerFn_handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";import j from"node:fs";import v from"node:path";import I from"sharp";import{R as l}from"./constants-Dh9o88yr.mjs";const P=e.object({fullImage:e.string(),croppedImage:e.string(),targetImage:e.string(),type:e.enum(["interaction","assert","tap","swipe","scroll"]).optional(),direction:e.enum(["up","down","left","right"]).optional(),distance:e.string().optional(),elementId:e.string().optional()}),B=e.object({base64_screenshot:e.string(),instruction:e.string(),action_history:e.array(e.any()).optional(),executionId:e.string().optional(),elementId:e.string().optional(),uiHierarchy:e.array(e.any()).optional()});function A(){const t=v.join(process.cwd(),"mobileboost.config.json");if(!j.existsSync(t))throw new Error('mobileboost.config.json not found. Run "mobileboost init" first.');const d=j.readFileSync(t,"utf-8");return JSON.parse(d)}function S(t){return t.replace(/^data:image\/\w+;base64,/,"")}async function F(t){const{fullImage:d,croppedImage:h,targetImage:y,type:n,direction:i,distance:p}=t,a=A().apiKey;if(!a)throw new Error("apiKey not configured in mobileboost.config.json");let r="interaction";n==="assert"?r="assert":(n==="swipe"||n==="scroll")&&(r="slide");let m=i;n==="scroll"&&(m=i==="up"?"down":"up");const g={org_id:a,full_image:S(d),cropped_image:S(h),target_image:S(y),type:r,direction:m,distance:p},o=await fetch("https://api.mobileboost.io/cli/describe_interaction",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)});if(!o.ok){const b=await o.text();throw new Error(`Describe interaction failed: ${o.status} ${b}`)}const s=await o.json();return s.description||s.assertion_description||JSON.stringify(s)}async function H(t){const d="https://api.mobileboost.io/call_lambda",h=A().apiKey;if(!h)throw new Error("apiKey not configured in mobileboost.config.json");const y=Buffer.from(t.base64_screenshot,"base64"),n=await I(y).metadata(),i=n.width??1080,p=n.height??1920,a=Math.round(i/l),r=await I(y).resize({width:a,withoutEnlargement:!0}).toBuffer(),m=await I(r).metadata(),g=m.width??a,o=m.height??p*(a/i),s=l,b=l;console.log(`[AI Client] Resized screenshot: ${i}x${p} -> ${g}x${o} (Scale: ${s.toFixed(2)})`);const C={lambda_flow:"get_next_step",current_date:new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),base64_screenshot:r.toString("base64"),getUI_elements:[],uiHierarchy:t.uiHierarchy??[],test_task_string:JSON.stringify([{id:"step-1",text:`1. ${t.instruction}`,plainText:t.instruction}]),image_width:g,image_height:o,action_history:t.action_history??[],orgKey:h,template_images:{},model_provider:"vellum",model_version:"claude-agent",fallbackModel:"claude-agent",utilize_fullTextAnnotation:!1,enableSortingOCR:!0,enableActionHistoryCut:!0,removeOverlappingText:!1,currentAndPreviousScreenMatch:!1,popupDetectionEnabled:!0,ocrProvider:"gcp",modelResponseDoubleCheckEnabled:!1,modelResponseDoubleCheckModel:"claude-3-5-sonnet-20240620"};console.log(`[AI Client] Sending payload with dimensions: ${g}x${o} (Original: ${i}x${p})`),console.log("[AI Client] Payload:",{payload:C});const c=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":"230948209348203948203948203948"},body:JSON.stringify(C)});if(!c.ok){const f=await c.text();throw console.error(`[AI Client] Backend error (${c.status}):`,f),new Error(`AI Backend Error: ${c.status} ${c.statusText}`)}const u=await c.json();console.log("[AI Client] Raw response from backend:",JSON.stringify(u,null,2)),console.log(`[AI Client] Applying scale factors: X=${s.toFixed(4)}, Y=${b.toFixed(4)}`);const O=f=>f.match(/([xy])=(\d+)/)?f.replace(/([xy])=(\d+)/g,(k,w,$)=>{const _=parseInt($,10),x=Math.round(_*l);return`${w}=${x}`}):f.replace(/(^|;)(\d+);(\d+)(;|$)/,(k,w,$,_,x)=>{const E=parseInt($,10),T=parseInt(_,10),z=Math.round(E*l),R=Math.round(T*l);return`${w}${z};${R}${x}`});return u.appetizeCommands&&(u.appetizeCommands=u.appetizeCommands.map(O)),u}export{B as F,F as K,P,H as W};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as o}from"./server.mjs";import{ensureAppiumSession as m}from"./appium-client-
|
|
1
|
+
import{c as a,a as o}from"./server.mjs";import{ensureAppiumSession as m}from"./appium-client-NLCErNZG.mjs";import{a as i}from"./device-CFbX4Slf.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"webdriverio";import"zod";import"./step-BuczzV1F.mjs";const d=a("eea1073a910f7f023004366aafcef05a8c47a3a1a4a09721f71a2efe311ee70f",(r,e)=>c.__executeServer(r,e)),c=o({method:"POST"}).handler(d,async r=>{const{platform:e="android",deviceId:t}=i.parse(r.data);return await m(e,t),{success:!0}}),n=a("6dbdc2968dc27a948c345034d1e55082b86918953b61da020ea8dd5836c79db3",(r,e)=>s.__executeServer(r,e)),s=o({method:"GET"}).handler(n,async r=>{const{platform:e="android",deviceId:t}=i.parse(r.data),{isAppiumConnected:p}=await import("./appium-client-NLCErNZG.mjs");return{connected:p(e,t)}});export{n as getAppiumStatusFn_createServerFn_handler,d as startAppiumFn_createServerFn_handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{remote as S}from"webdriverio";let c=null;function I(e,t){return!(!c||c.platform!==e||t&&c.deviceId!==t)}function A(){return c?.platform??null}function k(){return c?.windowSize}async function w(){if(c){console.log("Invalidating current Appium session...");try{await c.client.deleteSession()}catch{}c=null}}async function x(){if(!c)return!1;try{const e=await c.client.getWindowRect();return typeof e.width=="number"&&typeof e.height=="number"}catch{return!1}}async function M(e=c?.platform??"android",t){const i=t??c?.deviceId;if(c&&c.platform===e&&(!i||c.deviceId===i)){if(await x())return c.client;console.log("Session expired or invalid, creating new session..."),await w()}c&&(console.log("Switching session from",c.platform,"to",e),await w()),console.log(`Initializing Appium session for ${e} ${i?`(${i})`:""}...`);const a={platformName:"Android","appium:automationName":"UiAutomator2","appium:ensureWebviewsHavePages":!0,"appium:nativeWebScreenshot":!0,"appium:newCommandTimeout":3600,...i?{"appium:udid":i}:{}},o={platformName:"iOS","appium:automationName":"XCUITest","appium:newCommandTimeout":3600,...i?{"appium:udid":i}:{}};try{const s=await S({protocol:"http",hostname:"127.0.0.1",port:4723,path:"/",capabilities:e==="ios"?o:a}),d=await s.getWindowRect();return c={client:s,platform:e,deviceId:i,windowSize:{width:d.width,height:d.height}},console.log("Appium session initialized"),s}catch(s){throw console.error("Failed to initialize Appium session:",s),s}}function y(e){const t=[],i=a=>{if(!a)return;const o=typeof a=="string"?a:JSON.stringify(a);t.push(o)};return i(e?.message),i(e?.cause?.message),i(e?.body?.value?.message),i(e?.body?.value?.error),i(e?.stack),t.filter(Boolean).join(" | ")}function v(e){const t=y(e).toLowerCase(),i=e?.statusCode||e?.status,a=(e?.body?.value?.error||"").toLowerCase();return i===404||a==="invalid session id"||a==="no such session"||t.includes("404")||t.includes("session not found")||t.includes("no such session")||t.includes("invalid session id")||t.includes("a session is either terminated or not started")||t.includes("instrumentation process is not running")||t.includes("ended")||t.includes("closed")||t.includes("connection refused")||t.includes("econnrefused")||t.includes("econnreset")||t.includes("socket hang up")||t.includes("does not exist")||t.includes("timeout")}async function f(e,t,i,a){const o=i??c?.platform??"android",s=a??c?.deviceId,d=async(n=3)=>{let r;for(let p=0;p<n;p++)try{const u=await M(o,s);if(!u.sessionId)throw new Error("No active sessionId after ensureAppiumSession");return u}catch(u){r=u;const h=Math.min(2e3,250*Math.pow(2,p));p<n-1&&(console.warn(`[${t}] Failed to create/verify session (attempt ${p+1}/${n}). Retrying in ${h}ms...`),await new Promise(l=>setTimeout(l,h)))}throw r};try{const n=await d();if(!n.sessionId)throw new Error("Session appears invalid (missing sessionId)");return await e(n)}catch(n){if(v(n)){console.warn(`[${t}] Session error detected: "${y(n)}". Invalidating and retrying...`),await w();const r=await d(4);try{return await e(r)}catch(p){throw v(p)&&console.error(`[${t}] Action failed again after session refresh: ${y(p)}`),p}}throw n}}function m(e,t,i){return Math.max(t,Math.min(i,e))}function g(e,t,i,a,o,s,d){if(i!=="ios")return{x:Math.round(e),y:Math.round(t)};let n=Math.round(e),r=Math.round(t);if(a&&s){const p=a/s,u=o?o/d:p;console.log(`[iOS] Scale: X=${p.toFixed(2)}, Y=${u.toFixed(2)}`),n=Math.round(e/p),r=Math.round(t/u),console.log(`[iOS] Scaled: ${e},${t} (px) -> ${n},${r} (pt)`)}else console.warn("[iOS] Missing screenWidth or windowSize, skipping scale calculation."),(e>s||t>d)&&(n=Math.round(e/3),r=Math.round(t/3),console.log(`[iOS] Scaled (heuristic 3x): ${e},${t} -> ${n},${r}`));return{x:n,y:r}}async function P(e){await f(async t=>{const i=e.platform??"android",{width:a,height:o}=c?.windowSize||await t.getWindowRect();console.log(`[Tap] Platform: ${i}, Input: ${e.x},${e.y}, Window: ${a}x${o}`);const{x:s,y:d}=g(e.x,e.y,i,e.screenshotWidth,e.screenshotHeight,a,o),n=m(s,0,a-1),r=m(d,0,o-1);console.log(`[Tap] Final: ${n},${r}`),await t.performActions([{type:"pointer",id:"finger1",parameters:{pointerType:"touch"},actions:[{type:"pointerMove",duration:0,x:n,y:r},{type:"pointerDown",button:0},{type:"pause",duration:100},{type:"pointerUp",button:0}]}])},"performTap",e.platform,e.deviceId)}async function C(e){await f(async t=>{if((e.platform??"android")==="ios"){const i=e.text.split("").flatMap(a=>[{type:"keyDown",value:a},{type:"keyUp",value:a}]);await t.performActions([{type:"key",id:"keyboard",actions:i}])}else await t.keys(e.text.split(""))},"performType",e.platform,e.deviceId)}async function T(e){await f(async t=>{const i=e.platform??"android",{width:a,height:o}=c?.windowSize||await t.getWindowRect(),s=a/2;let d;e.direction==="down"?d=o*.75:e.direction==="up"?d=o*.25:d=o/2;let n,r;if(e.x1!==void 0||e.y1!==void 0){const l=g(e.x1??s,e.y1??d,i,e.screenshotWidth,e.screenshotHeight,a,o);n=l.x,r=l.y}else n=Math.round(s),r=Math.round(d);n=m(n,0,a-1),r=m(r,0,o-1);let p,u;if(e.x2!==void 0||e.y2!==void 0){const l=g(e.x2??n,e.y2??r,i,e.screenshotWidth,e.screenshotHeight,a,o);p=l.x,u=l.y}else{const l=Math.round(a*.5),$=Math.round(o*.5);switch(e.direction){case"left":p=Math.max(0,n-l),u=r;break;case"right":p=Math.min(a-1,n+l),u=r;break;case"up":p=n,u=Math.min(o-1,r+$);break;case"down":p=n,u=Math.max(0,r-$);break;default:p=n,u=r}}p=m(p,0,a-1),u=m(u,0,o-1),console.log(`[Swipe] Platform: ${i}, Direction: ${e.direction}, Start: ${n},${r}, End: ${p},${u}`);const h=e.duration??500;await t.performActions([{type:"pointer",id:"finger1",parameters:{pointerType:"touch"},actions:[{type:"pointerMove",duration:0,x:n,y:r},{type:"pointerDown",button:0},{type:"pause",duration:100},{type:"pointerMove",duration:h,x:p,y:u},{type:"pointerUp",button:0}]}])},"performSwipe",e.platform,e.deviceId)}async function W(e){await f(async t=>{await t.execute("mobile: deepLink",{url:e.url})},"performDeepLink",e.platform,e.deviceId)}async function R(){return await f(async e=>await e.getPageSource(),"getPageSource")}async function z(e){await f(async t=>{const{width:i,height:a}=c?.windowSize||await t.getWindowRect(),o=Math.floor(i/2),s=Math.floor(a/2),d=Math.floor(i*.2),n=Math.floor(a*.2),r={left:o-d,top:s-n,width:d*2,height:n*2,percent:1,speed:1500};console.log(`[Zoom] dir=${e.direction} center=(${o},${s}) area=(${r.left},${r.top}) ${r.width}x${r.height}`),e.direction==="in"?await t.executeScript("mobile: pinchOpenGesture",[{...r,percent:.5,speed:800}]):await t.executeScript("mobile: pinchCloseGesture",[r])},"performZoom",e.platform,e.deviceId)}async function D(e,t){await f(async i=>{const a=e??c?.platform??"android";let o;const s=i.capabilities;if(a==="ios")o=s.bundleId||s.CFBundleIdentifier||s["appium:bundleId"]||s["appium:app"];else{if(o=s.appPackage||s["appium:appPackage"],!o)try{o=(await i.executeScript("mobile: activeAppInfo",[]))?.appPackage}catch{console.log("[RestartApp] mobile: activeAppInfo not available, trying getCurrentPackage")}if(!o)try{o=await i.getCurrentPackage()}catch(d){console.log("[RestartApp] getCurrentPackage failed:",d)}}if(!o)throw new Error("Could not determine current app package/bundle ID. Please ensure an app is running on the device.");console.log(`[RestartApp] Restarting app: ${o}`),await i.terminateApp(o),await new Promise(d=>setTimeout(d,500)),await i.activateApp(o),console.log(`[RestartApp] App restarted successfully: ${o}`)},"restartApp",e,t)}export{M as ensureAppiumSession,k as getDeviceSize,R as getPageSource,A as getPlatform,I as isAppiumConnected,W as performDeepLink,T as performSwipe,P as performTap,C as performType,z as performZoom,D as restartApp,g as scaleForIOS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,a as $}from"./server.mjs";import w from"node:fs";import M from"node:path";import P from"node:crypto";import l from"sharp";import{a as E,i as F,o as v}from"./cache-CtBF0d8x.mjs";import{R as h}from"./constants-Dh9o88yr.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:url";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"zod";const y="https://cache.mobileboost.io";function x(){const e=M.join(process.cwd(),"mobileboost.config.json");if(!w.existsSync(e))throw new Error("mobileboost.config.json not found");const t=w.readFileSync(e,"utf-8");return JSON.parse(t)}function _(e,t,c,r,n,a){const o=a?`${a.width}x${a.height}`:"",i=`${e}${t||""}${c}${r}${n||""}${o}`;return P.createHash("sha256").update(i).digest("hex")}function S(e,t){return e.match(/([xy])=(\d+)/)?e.replace(/([xy])=(\d+)/g,(c,r,n)=>{const a=parseInt(n,10);let o;return t==="multiply"?o=Math.round(a*h):o=Math.round(a/h),`${r}=${o}`}):e.replace(/(^|;)(\d+);(\d+)(;|$)/,(c,r,n,a,o)=>{const i=parseInt(n,10),s=parseInt(a,10);let d,p;return t==="multiply"?(d=Math.round(i*h),p=Math.round(s*h)):(d=Math.round(i/h),p=Math.round(s/h)),`${r}${d};${p}${o}`})}const B=b("fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde",(e,t)=>O.__executeServer(e,t)),O=$({method:"POST"}).inputValidator(e=>v.parse(e)).handler(B,async({data:e})=>{try{const t=x().apiKey;if(!t)throw new Error("API Key missing");const c=_(t,e.filepath,e.stepNumber,e.stepDescription,e.platform,e.screenResolution),r=await Promise.all(e.executionData.map(async i=>{const s=Buffer.from(i.screenshot.replace(/^data:image\/\w+;base64,/,""),"base64"),d=(await l(s).metadata()).width??1080,p=Math.round(d/h),u=await l(s).resize({width:p,withoutEnlargement:!0}).toBuffer(),f=i.commands.map(g=>S(g,"divide"));return{screenshot:u.toString("base64"),commands:f}})),n=JSON.stringify(r),a=(n.length/(1024*1024)).toFixed(2);console.log(`[Cache Client] Populating cache with payload size: ~${a} MB (Hash: ${c})`);const o=await fetch(`${y}/populate-cache?hash=${c}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n});return o.ok?{success:!0}:(console.error("Failed to populate cache:",await o.text()),{success:!1})}catch(t){return console.error("Error populating cache:",t),{success:!1,error:String(t)}}}),T=b("7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a",(e,t)=>z.__executeServer(e,t)),z=$({method:"POST"}).inputValidator(e=>E.parse(e)).handler(T,async({data:e})=>{try{const t=x().apiKey;if(!t)throw new Error("API Key missing");const c=_(t,e.filepath,e.stepNumber,e.stepDescription,e.platform,e.screenResolution),r=Buffer.from(e.screenshot.replace(/^data:image\/\w+;base64,/,""),"base64"),n=(await l(r).metadata()).width??1080,a=Math.round(n/h),o=await l(r).resize({width:a,withoutEnlargement:!0}).toBuffer(),i=await l(o).metadata();console.log(i.width,i.height);const s=new FormData;s.append("hash",c);const d=new Blob([new Uint8Array(o)],{type:"image/png"}),p=(d.size/(1024*1024)).toFixed(2);console.log(`[Cache Client] Executing from cache with screenshot size: ${p} MB`),s.append("screenshot",d,"screenshot.png"),e.highest_used_index!==void 0&&e.highest_used_index!==null&&(console.log(`[Cache Client] Sending highest_used_index: ${e.highest_used_index} (Type: ${typeof e.highest_used_index})`),s.append("highest_used_index",String(e.highest_used_index)));const u=await fetch(`${y}/execute-from-cache`,{method:"POST",body:s});if(!u.ok){const m=await u.text();return console.warn("Cache lookup failed:",m),{found:!1}}const f=await u.json(),g=F.safeParse(f);if(g.success){const m={...g.data};return m.found&&m.cacheCommands&&(m.cacheCommands=m.cacheCommands.map(C=>S(C,"multiply"))),m}return console.error("Invalid cache response:",f),{found:!1}}catch(t){return console.error("Error executing from cache:",t),{found:!1,error:String(t)}}});export{T as executeFromCacheMutation_createServerFn_handler,B as populateCacheMutation_createServerFn_handler};
|
|
1
|
+
import{c as b,a as $}from"./server.mjs";import w from"node:fs";import M from"node:path";import P from"node:crypto";import l from"sharp";import{a as E,i as F,o as v}from"./cache-CtBF0d8x.mjs";import{R as h}from"./constants-Dh9o88yr.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:url";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"zod";const y="https://cache.mobileboost.io";function x(){const e=M.join(process.cwd(),"mobileboost.config.json");if(!w.existsSync(e))throw new Error("mobileboost.config.json not found");const t=w.readFileSync(e,"utf-8");return JSON.parse(t)}function _(e,t,c,r,n,a){const o=a?`${a.width}x${a.height}`:"",i=`${e}${t||""}${c}${r}${n||""}${o}`;return P.createHash("sha256").update(i).digest("hex")}function S(e,t){return e.match(/([xy])=(\d+)/)?e.replace(/([xy])=(\d+)/g,(c,r,n)=>{const a=parseInt(n,10);let o;return t==="multiply"?o=Math.round(a*h):o=Math.round(a/h),`${r}=${o}`}):e.replace(/(^|;)(\d+);(\d+)(;|$)/,(c,r,n,a,o)=>{const i=parseInt(n,10),s=parseInt(a,10);let d,p;return t==="multiply"?(d=Math.round(i*h),p=Math.round(s*h)):(d=Math.round(i/h),p=Math.round(s/h)),`${r}${d};${p}${o}`})}const B=b("fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde",(e,t)=>O.__executeServer(e,t)),O=$({method:"POST"}).inputValidator(e=>v.parse(e)).handler(B,async({data:e})=>{try{const t=x().apiKey;if(!t)throw new Error("API Key missing");const c=_(t,e.filepath,e.stepNumber,e.stepDescription,e.platform,e.screenResolution),r=await Promise.all(e.executionData.map(async i=>{const s=Buffer.from(i.screenshot.replace(/^data:image\/\w+;base64,/,""),"base64"),d=(await l(s).metadata()).width??1080,p=Math.round(d/h),u=await l(s).resize({width:p,withoutEnlargement:!0}).toBuffer(),f=i.commands.map(g=>S(g,"divide"));return{screenshot:u.toString("base64"),commands:f}})),n=JSON.stringify(r),a=(n.length/(1024*1024)).toFixed(2);console.log(`[Cache Client] Populating cache with payload size: ~${a} MB (Hash: ${c})`);const o=await fetch(`${y}/populate-cache?hash=${c}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n});return o.ok?{success:!0}:(console.error("Failed to populate cache:",await o.text()),{success:!1})}catch(t){return console.error("Error populating cache:",t),{success:!1,error:String(t)}}}),T=b("7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a",(e,t)=>z.__executeServer(e,t)),z=$({method:"POST"}).inputValidator(e=>E.parse(e)).handler(T,async({data:e})=>{try{const t=x().apiKey;if(!t)throw new Error("API Key missing");const c=_(t,e.filepath,e.stepNumber,e.stepDescription,e.platform,e.screenResolution),r=Buffer.from(e.screenshot.replace(/^data:image\/\w+;base64,/,""),"base64"),n=(await l(r).metadata()).width??1080,a=Math.round(n/h),o=await l(r).resize({width:a,withoutEnlargement:!0}).toBuffer(),i=await l(o).metadata();console.log(i.width,i.height);const s=new FormData;s.append("hash",c);const d=new Blob([new Uint8Array(o)],{type:"image/png"}),p=(d.size/(1024*1024)).toFixed(2);console.log(`[Cache Client] Executing from cache with screenshot size: ${p} MB (Hash: ${c})`),s.append("screenshot",d,"screenshot.png"),e.highest_used_index!==void 0&&e.highest_used_index!==null&&(console.log(`[Cache Client] Sending highest_used_index: ${e.highest_used_index} (Type: ${typeof e.highest_used_index})`),s.append("highest_used_index",String(e.highest_used_index)));const u=await fetch(`${y}/execute-from-cache`,{method:"POST",body:s});if(!u.ok){const m=await u.text();return console.warn("Cache lookup failed:",m),{found:!1}}const f=await u.json(),g=F.safeParse(f);if(g.success){const m={...g.data};return m.found&&m.cacheCommands&&(m.cacheCommands=m.cacheCommands.map(C=>S(C,"multiply"))),m}return console.error("Invalid cache response:",f),{found:!1}}catch(t){return console.error("Error executing from cache:",t),{found:!1,error:String(t)}}});export{T as executeFromCacheMutation_createServerFn_handler,B as populateCacheMutation_createServerFn_handler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,a as i}from"./server.mjs";import{P as p,K as m}from"./ai-client-
|
|
1
|
+
import{c as o,a as i}from"./server.mjs";import{P as p,K as m}from"./ai-client-B037VO11.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"zod";import"sharp";import"./constants-Dh9o88yr.mjs";const e=o("f8084cb106c8126bb2deaeef7c98992d9ff9475ad3dc85c6ced04f08c3962b6e",(r,t)=>a.__executeServer(r,t)),a=i({method:"POST"}).inputValidator(p).handler(e,async({data:r})=>({description:await m(r)}));export{e as describeInteractionFn_createServerFn_handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";import{c as n,m as o,i as a,o as d,n as p,a as s,l as r}from"./step-BuczzV1F.mjs";const t=e.object({platform:e.enum(["android","ios"]).optional().default("android"),deviceId:e.string().optional(),screenshotHeight:e.number().optional(),screenshotWidth:e.number().optional()}),i=e.object({x:e.number(),y:e.number()}),x=d.extend(t.shape).extend(i.shape),b=p.extend(t.shape),l=a.extend(t.shape),u=s.extend(t.shape),c=o.extend(t.shape),f=n.extend(t.shape);r.extend(t.shape);e.object({mode:e.enum(["adb","appium"])});export{t as a,u as b,x as d,l,b as r,f as u,c as x};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,a as s}from"./server.mjs";import o from"node:path";import{readFile as w}from"node:fs/promises";import n from"fs-extra";import{z as a}from"zod";import u from"dotenv";import{w as b}from"./stores-k5WcYw_y.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"@tanstack/react-store";import"./step-BuczzV1F.mjs";async function h(){const e=o.join(process.cwd(),"mobileboost.config.json");let t="./tests";if(await n.pathExists(e))try{const r=await n.readJSON(e);r.testDir&&(t=r.testDir)}catch(r){console.error("Error reading config, using default testDir",r)}return o.resolve(process.cwd(),t)}async function f(e){const t=await h(),r=o.resolve(t,e);if(!r.startsWith(t))throw new Error("Invalid path: must be within test directory");return r}a.object({name:a.string(),type:a.enum(["file","directory"]),path:a.string()});const v=c("00fb1fe03e9689cf8c179ba0d5cadc5eeaa6879def224ac38037d70a1a51300d",(e,t)=>y.__executeServer(e,t)),y=s({method:"GET"}).handler(v,async()=>{const e=await h();await n.ensureDir(e);async function t(r){let i=[];const p=await n.readdir(r,{withFileTypes:!0});for(const d of p){const l=o.join(r,d.name),m=o.relative(e,l);d.isDirectory()?(i.push({name:d.name,type:"directory",path:m}),i=i.concat(await t(l))):i.push({name:d.name,type:"file",path:m})}return i}return{files:await t(e)}}),_=a.record(a.string(),a.string()).optional().default({});a.object({testDir:a.string(),driver:a.string(),port:a.number(),apiKey:a.string(),variables:_});const F=c("54b0d7153f4ee4f963b29e7c835e76cedaaf345527fdc912c49030ea79353b5e",(e,t)=>S.__executeServer(e,t)),S=s({method:"GET"}).handler(F,async()=>{let e={};const t=o.join(process.cwd(),"mobileboost.config.json"),r=o.join(process.cwd(),".env");if(await n.pathExists(t))try{e={...(await n.readJSON(t)).variables}}catch{}if(await n.pathExists(r))try{const i=await w(r,"utf-8"),p=u.parse(i);e={...e,...p}}catch{}return e}),g=a.object({name:a.string(),type:a.enum(["file","directory"]),parentPath:a.string().optional()}),j=c("ac7bf7f1d727949cd28713a8f36bb77e7bd8fc0e48854ed8cb1ee93ce80fb6d0",(e,t)=>P.__executeServer(e,t)),P=s({method:"POST"}).inputValidator(g).handler(j,async({data:e})=>{const t=await h(),r=e.parentPath?o.join(t,e.parentPath):t;if(!o.resolve(r).startsWith(t))throw new Error("Invalid parent path");const i=o.join(r,e.name);if(e.type==="directory")await n.ensureDir(i);else{if(await n.pathExists(i))throw new Error("File already exists");await n.writeJSON(i,[],{spaces:2})}return{success:!0}}),x=a.object({path:a.string()}),E=c("b41e844ce533c224e7c720e69d821468deffcbf208fc008a7f5af83cb0596b15",(e,t)=>O.__executeServer(e,t)),O=s({method:"POST"}).inputValidator(x).handler(E,async({data:e})=>{const t=await f(e.path);try{return{content:await n.readJSON(t),path:e.path}}catch(r){throw console.error("Failed to read file",r),new Error("Failed to read file or invalid format")}}),D=a.object({path:a.string(),content:b}),T=c("1b2a0d276d9ce90b2a1d72134c1bf95b9f6b7b049a8f415e8f0da3e6fc5ce4ae",(e,t)=>V.__executeServer(e,t)),V=s({method:"POST"}).inputValidator(D).handler(T,async({data:e})=>{const t=await f(e.path);return await n.writeJSON(t,e.content,{spaces:2}),{success:!0}}),J=a.object({oldPath:a.string(),newPath:a.string()}),N=c("098d52adf25ea567d43facba347871f887828c6ab804021bbfa0f2759209c0c6",(e,t)=>I.__executeServer(e,t)),I=s({method:"POST"}).inputValidator(J).handler(N,async({data:e})=>{const t=await f(e.oldPath),r=await h(),i=o.resolve(r,e.newPath);if(!i.startsWith(r))throw new Error("Invalid new path");return await n.rename(t,i),{success:!0}}),W=a.object({sourcePath:a.string(),targetPath:a.string()}),G=c("efbbc22c41cf491631b07076417c9ec65d5ac71debfcc00b5a7e0d368772104f",(e,t)=>z.__executeServer(e,t)),z=s({method:"POST"}).inputValidator(W).handler(G,async({data:e})=>{const t=await f(e.sourcePath),r=await h(),i=o.resolve(r,e.targetPath);if(!i.startsWith(r))throw new Error("Invalid target path");await n.ensureDir(i);const p=o.basename(t),d=o.join(i,p);return await n.move(t,d,{overwrite:!1}),{success:!0}});export{j as createFileFn_createServerFn_handler,v as fetchFilesFn_createServerFn_handler,F as fetchVariablesFn_createServerFn_handler,G as moveFileFn_createServerFn_handler,E as readFileFn_createServerFn_handler,N as renameFileFn_createServerFn_handler,T as saveFileFn_createServerFn_handler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as d,a as u}from"./server.mjs";import{z as m}from"zod";import{l as x}from"./step-BuczzV1F.mjs";import{getPageSource as f,scaleForIOS as _,getDeviceSize as p,getPlatform as b}from"./appium-client-NLCErNZG.mjs";import{j as g,U as $,q as S,B as F,H as D,K as h}from"./hierarchy-helpers-CR7kKS69.mjs";import"@tanstack/history";import"@tanstack/router-core/ssr/client";import"@tanstack/router-core";import"node:async_hooks";import"@tanstack/router-core/ssr/server";import"../../index.mjs";import"node:http";import"node:stream";import"node:https";import"node:http2";import"node:fs";import"node:url";import"node:path";import"tiny-invariant";import"seroval";import"react/jsx-runtime";import"@tanstack/react-router/ssr/server";import"@tanstack/react-router";import"webdriverio";import"xml2js";import"linkedom";const v=d("1ed4d2aa14be99e8c5a81eefbece63cea629a89f75862c60f9ff19c4d4dc67c5",(e,t)=>w.__executeServer(e,t)),w=u().handler(v,async()=>{const e=await f(),t=b(),i=p(),s=t==="ios"?h(e):g(e),n=F({elements:s,deviceDimensions:i,allowNonClickableItems:!0,ignoredElements:[]}),a=D({items:n});return{...i,elements:a}}),z=m.object({x:m.number(),y:m.number(),screenshotHeight:m.number(),screenshotWidth:m.number()}),E=d("05faf0772038a170c70083fd8de4a8b77a40e4ec46e0bbf6878670f02621b5df",(e,t)=>N.__executeServer(e,t)),N=u({method:"POST"}).inputValidator(z).handler(E,async({data:e})=>{console.log(`Getting element ID at ${e.x}, ${e.y}`);const t=await f();console.log("pageSource",t);const i=b(),s=p(),n=_(e.x,e.y,i,e.screenshotWidth,e.screenshotHeight,s.width,s.height);console.log("scaled",n);const a=i==="ios"?h(t):g(t);console.log("elements",a);const r=$(a,n.x,n.y,s);if(!r)return console.log("No element found at coordinates"),{elementId:""};const l=(r.attributes?.["resource-id"]??r.attributes?.accessibilityIdentifier)?.trim();if(l){let o=l;const c=S(a,r,o);return c>=0?(o=`${o}[${c}]`,console.log(`Found duplicate IDs, using indexed ID: ${o}`)):console.log("Found unique element ID:",o),{elementId:o}}return console.log("Element found but has no resource-id"),{elementId:""}}),O=d("9bcbf5303827d2a25f347c2054b0121655a82322fa07108653f43246875348f7",(e,t)=>P.__executeServer(e,t)),P=u({method:"POST"}).inputValidator(x).handler(O,async({data:e})=>{console.log(`Finding element by ID: ${e.elementId}`);const t=await f(),i=b();p();const s=i==="ios"?h(t):g(t),n=e.elementId.match(/^(.+)\[(\d+)\]$/),a=n?n[1]:e.elementId,r=n?parseInt(n[2],10):-1,l=s.filter(y=>(y.attributes?.["resource-id"]??y.attributes?.accessibilityIdentifier)===a);if(l.length===0)return console.log("No element found with ID:",e.elementId),{found:!1,x:0,y:0};const o=r>=0&&r<l.length?l[r]:l[0],c=o.bounds.x+o.bounds.width/2,I=o.bounds.y+o.bounds.height/2;return console.log(`Found element at center: (${c}, ${I})`),{found:!0,x:c,y:I}});export{O as findElementByIdFn_createServerFn_handler,E as getElementIdFn_createServerFn_handler,v as getVisibleElements_createServerFn_handler};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import L from"xml2js";import{DOMParser as E}from"linkedom";async function R(t){return new Promise((n,i)=>{L.parseString(t,(s,o)=>{s?i(s):n(o)})})}function j(t,n,i,s){if(!t||t.length===0)return null;const o=K({elements:t,deviceDimensions:s,allowNonClickableItems:!0,allowFullScreenItems:!1,ignoredElements:[]}),u=$({items:o,allItems:o}).filter(a=>{if(!a.bounds)return!1;const{x:b,y:e,width:r,height:l}=a.bounds;return n>=b&&n<=b+r&&i>=e&&i<=e+l});return u.length===0?null:(u.sort((a,b)=>{const e=a.drawingOrderPath??a.indexPath??[],r=b.drawingOrderPath??b.indexPath??[];for(let d=0;d<Math.min(e.length,r.length);d++){const g=parseInt(e[d]),c=parseInt(r[d]);if(g!==c)return c-g}if(e.length!==r.length)return r.length-e.length;const l=(a.bounds?.width??0)*(a.bounds?.height??0),h=(b.bounds?.width??0)*(b.bounds?.height??0);return l-h}),u[0])}function N(t,n){if(!t)return null;if(t.$&&t.$["resource-id"]===n)return t;if(t.node)for(const i of t.node){const s=N(i,n);if(s)return s}return null}function X(t,n){if(!t)return null;const i=t.$?.text??"",s=t.$?.["content-desc"]??"";if(i&&i.toLowerCase().includes(n.toLowerCase())||s&&s.toLowerCase().includes(n.toLowerCase()))return t;if(t.node)for(const o of t.node){const u=X(o,n);if(u)return u}return null}function H(t,n,i){const s=t.filter(o=>(o.attributes?.["resource-id"]??o.attributes?.accessibilityIdentifier)===i);return s.length<=1?-1:s.indexOf(n)}const V=t=>{const n=t.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
2
|
+
`),i=e=>{try{const r=parseFloat(e.getAttribute("x")??"0"),l=parseFloat(e.getAttribute("y")??"0"),h=parseFloat(e.getAttribute("width")??"0"),d=parseFloat(e.getAttribute("height")??"0");return{x:r,y:l,width:h,height:d}}catch(r){console.error("Error parsing bounds:",r);return}},s=e=>{const r=e.getAttribute("type")??"",l=e.getAttribute("name")??"",h=e.getAttribute("label")??"";return{text:e.getAttribute("value")??"","resource-id":l,"content-desc":h,hintText:"",accessibilityText:h,visible:e.getAttribute("visible")==="true",index:e.getAttribute("index")??"0",type:r}},o=new E().parseFromString(n,"text/xml"),u=o.querySelector("parsererror");if(u!=null)return console.error("XML parsing error:",u),[];const a=o.querySelector("XCUIElementTypeApplication");if(a==null)return console.error("No application element found in XML"),[];const b=(e,r=0,l=[],h=!1)=>{const d=i(e),g=s(e),c=e.getAttribute("type")??"",f=e.getAttribute("name")??"",m=e.getAttribute("accessible")==="true",w=e.getAttribute("enabled")==="true",x=e.getAttribute("index")??"0",y=Array.from(e.children).filter(M=>M.nodeType===1&&M.nodeName.startsWith("XCUIElementType")&&!["AXFrame"].includes(M.nodeName)),p=g.type==="XCUIElementTypeKeyboard",A=y.map(M=>b(M,r+1,[...l,x],h||p)),I=f.length>0&&(f.includes("button")||c.includes("Button")||c.includes("Control")),P=c.includes("TextField")||c.includes("SearchField")||c.includes("TextInput"),k=m&&w||I||c.includes("Button")||P,v={attributes:g,clickable:k,enabled:e.getAttribute("enabled")==="true",focused:e.getAttribute("focused")==="true",checked:e.getAttribute("checked")==="true",selected:e.getAttribute("selected")==="true",bounds:d,drawingOrderPath:[...l,x],isKeyboardElement:h,isKeyboardParent:p};return A.length>0&&(v.children=A),v};return T(b(a),[])},W=t=>{const n=t.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
3
|
+
`),i=r=>{try{const l=r.match(/\[(\d+),(\d+)\]\[(\d+),(\d+)\]/);if(l==null)return;const[h,d,g,c,f]=l.map(Number);return{x:d,y:g,width:c-d,height:f-g}}catch(l){console.error("Error parsing bounds:",l);return}},s=r=>({text:r.getAttribute("text")??"","resource-id":r.getAttribute("resource-id")??"","content-desc":r.getAttribute("content-desc")??"",hintText:"",hint:r.getAttribute("hint")??"",accessibilityText:r.getAttribute("content-desc")??"",visible:r.getAttribute("displayed")==="true",index:r.getAttribute("index")??"0",class:r.getAttribute("class")??"",package:r.getAttribute("package")??""}),o=(r,l=[],h=[],d=0)=>{const g=r.getAttribute("bounds"),c=g?i(g):void 0;c||console.warn(`Element with missing/invalid bounds: ${r.getAttribute("class")??"unknown"} with resource-id: ${r.getAttribute("resource-id")??"none"}`);const f=s(r),m=r.getAttribute("drawing-order")??"0",w=r.getAttribute("index")??"0",x=[...h,w],y=parseInt(m)*1e3+d,p=[...l,y.toString()],A=Array.from(r.children).filter(P=>P.nodeType===1).map((P,k)=>o(P,p,x,k)),I={attributes:f,clickable:r.getAttribute("clickable")==="true",enabled:r.getAttribute("enabled")==="true",focused:r.getAttribute("focused")==="true",checked:r.getAttribute("checked")==="true",selected:r.getAttribute("selected")==="true",bounds:c,drawingOrderPath:p,indexPath:x,drawingOrder:y};return A.length>0&&(I.children=A),I},u=new E().parseFromString(n,"text/xml"),a=u.querySelector("parsererror");if(a!=null)return console.error("XML parsing error:",a),[];const b=u.querySelector("hierarchy");if(b==null)return console.error("No hierarchy element found in XML"),[];const e=o(b);return T(e,[])},T=(t,n,i)=>{i?.clickable&&!t.clickable&&(t.clickable=!0),((i?.isFixed??!1)||(t.attributes?.type?.includes("NavigationBar")??!1))&&(t.isFixed=!0),t.children!=null&&t.children.forEach(u=>{T(u,n,t)});const{children:s,...o}=t;return n.push(o),n},K=({elements:t,deviceDimensions:n,allowNonClickableItems:i=!1,allowFullScreenItems:s=!1,shouldIncludeKeyboardParentElement:o=!1,ignoredElements:u})=>{const a=n?.width??0,b=n?.height??0;return t.filter(e=>{const r=e.clickable??!1,l=e.attributes?.visible!==!1,h=e.attributes?.text!==""?e.attributes?.text:void 0,d=e.attributes?.accessibilityText??e.attributes?.["content-desc"]??e.attributes?.accessibilityLabel,g=e.attributes?.["resource-id"]??e.attributes?.accessibilityIdentifier;if(u.includes(g))return!1;const c=[h,d,g].some(F=>F!=null&&F.trim()?.length>0),f=e.bounds?.x??0,m=e.bounds?.width??0,w=f+m,x=Math.max(0,f),y=Math.min(a,w),p=Math.max(0,y-x),A=e.bounds?.y??0,I=e.bounds?.height??0,P=A+I,k=Math.max(0,A),v=Math.min(b,P),M=Math.max(0,v-k),O=p>0&&M>0,S=e.bounds?.height===n?.height&&e.bounds?.width===n?.width;return(s||!S)&&(i||r)&&l&&(c||o&&e.isKeyboardParent)&&O}).map(e=>{const r=e.bounds?.x??0,l=e.bounds?.width??0,h=r+l,d=Math.max(0,r),g=Math.min(a,h),c=Math.max(0,g-d),f=e.bounds?.y??0,m=e.bounds?.height??0,w=f+m,x=Math.max(0,f),y=Math.min(b,w),p=Math.max(0,y-x);return{...e,bounds:{x:d,y:x,width:c,height:p}}})},$=({items:t,allItems:n})=>t.filter(i=>i.isFixed?!0:!q({targetElement:i,allElements:n??t,occlusionThreshold:.6})),q=({targetElement:t,allElements:n,occlusionThreshold:i=1})=>{const{x:s,y:o,width:u,height:a}=t.bounds,b=u*a;return n.find(e=>{if(e.bounds==null||e===t||C({potentialChild:t,potentialParent:e})||C({potentialChild:e,potentialParent:t})||!(B(e,t)>0||e.isFixed))return!1;const r=Math.max(s,e.bounds.x),l=Math.max(o,e.bounds.y),h=Math.min(s+u,e.bounds.x+e.bounds.width),d=Math.min(o+a,e.bounds.y+e.bounds.height);if(h<=r||d<=l)return!1;const g=h-r,c=d-l,f=g*c/b,m=f>=i;return m&&console.log("coverageRatio",f),m})??null},C=({potentialChild:t,potentialParent:n})=>{const i=t.drawingOrderPath??t.indexPath??[],s=n.drawingOrderPath??n.indexPath??[];return i.length<=s.length?!1:s.every((o,u)=>o===i[u])},B=(t,n)=>{if(!t.bounds&&!n.bounds)return 0;if(!t.bounds)return-1;if(!n.bounds)return 1;const i=t.drawingOrderPath??t.indexPath??[],s=n.drawingOrderPath??n.indexPath??[];for(let o=0;o<Math.min(i.length,s.length);o++){const u=parseInt(i[o]),a=parseInt(s[o]);if(u!==a)return u-a}return i.length!==s.length?i.length-s.length:n.bounds.width*n.bounds.height-t.bounds.width*t.bounds.height};export{K as B,$ as H,V as K,N as L,R,j as U,X,W as j,H as q};
|