purplemux 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +13 -13
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/required-server-files.json +1 -1
  5. package/.next/standalone/.next/routes-manifest.json +7 -7
  6. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xgh-_t._.js +1 -1
  7. package/.next/standalone/.next/server/chunks/_13yzrph._.js +1 -1
  8. package/.next/standalone/.next/server/chunks/ssr/_0.~7e5x._.js +1 -1
  9. package/.next/standalone/.next/server/chunks/ssr/_0g4dxt7._.js +1 -1
  10. package/.next/standalone/.next/server/chunks/ssr/_0l_4npy._.js +1 -1
  11. package/.next/standalone/.next/server/chunks/ssr/_0vebac6._.js +1 -1
  12. package/.next/standalone/.next/server/chunks/ssr/src_0n11cm4._.js +1 -1
  13. package/.next/standalone/.next/server/chunks/ssr/src_0pk3amc._.js +1 -1
  14. package/.next/standalone/.next/server/chunks/ssr/src_components_features_stats_token-section_tsx_0_tk.ax._.js +1 -1
  15. package/.next/standalone/.next/server/chunks/ssr/src_components_features_workspace_terminal-page_tsx_0wuq-jl._.js +1 -1
  16. package/.next/standalone/.next/server/middleware-build-manifest.js +13 -13
  17. package/.next/standalone/.next/server/pages/de/404.html +1 -1
  18. package/.next/standalone/.next/server/pages/de/500.html +1 -1
  19. package/.next/standalone/.next/server/pages/en/404.html +1 -1
  20. package/.next/standalone/.next/server/pages/en/500.html +1 -1
  21. package/.next/standalone/.next/server/pages/es/404.html +1 -1
  22. package/.next/standalone/.next/server/pages/es/500.html +1 -1
  23. package/.next/standalone/.next/server/pages/fr/404.html +1 -1
  24. package/.next/standalone/.next/server/pages/fr/500.html +1 -1
  25. package/.next/standalone/.next/server/pages/index/build-manifest.json +3 -3
  26. package/.next/standalone/.next/server/pages/index/client-build-manifest.json +1 -1
  27. package/.next/standalone/.next/server/pages/index/react-loadable-manifest.json +3 -3
  28. package/.next/standalone/.next/server/pages/ja/404.html +1 -1
  29. package/.next/standalone/.next/server/pages/ja/500.html +1 -1
  30. package/.next/standalone/.next/server/pages/ko/404.html +1 -1
  31. package/.next/standalone/.next/server/pages/ko/500.html +1 -1
  32. package/.next/standalone/.next/server/pages/pt-BR/404.html +1 -1
  33. package/.next/standalone/.next/server/pages/pt-BR/500.html +1 -1
  34. package/.next/standalone/.next/server/pages/reports/build-manifest.json +2 -2
  35. package/.next/standalone/.next/server/pages/reports/client-build-manifest.json +1 -1
  36. package/.next/standalone/.next/server/pages/ru/404.html +1 -1
  37. package/.next/standalone/.next/server/pages/ru/500.html +1 -1
  38. package/.next/standalone/.next/server/pages/stats/build-manifest.json +3 -3
  39. package/.next/standalone/.next/server/pages/stats/client-build-manifest.json +1 -1
  40. package/.next/standalone/.next/server/pages/stats/react-loadable-manifest.json +2 -2
  41. package/.next/standalone/.next/server/pages/tr/404.html +1 -1
  42. package/.next/standalone/.next/server/pages/tr/500.html +1 -1
  43. package/.next/standalone/.next/server/pages/webview/build-manifest.json +2 -2
  44. package/.next/standalone/.next/server/pages/webview/client-build-manifest.json +1 -1
  45. package/.next/standalone/.next/server/pages/zh-CN/404.html +1 -1
  46. package/.next/standalone/.next/server/pages/zh-CN/500.html +1 -1
  47. package/.next/standalone/.next/server/pages/zh-TW/404.html +1 -1
  48. package/.next/standalone/.next/server/pages/zh-TW/500.html +1 -1
  49. package/.next/standalone/.next/static/{Fvh2ZScb-GvlCulutSHF4 → 3bUIU98dXJStHWNTemQTG}/_buildManifest.js +4 -4
  50. package/.next/standalone/.next/static/chunks/{0~nc~.u7n58cn.js → 001wx6dl4f0y~.js} +1 -1
  51. package/.next/standalone/.next/static/chunks/{05gba103lqp8r.js → 03r6h6_rs52t_.js} +1 -1
  52. package/.next/standalone/.next/static/chunks/{09-h3tvhahhc~.js → 07xl3u9fdgt-c.js} +2 -2
  53. package/.next/standalone/.next/static/chunks/{00wzy83e7d7gj.js → 0a5r_579fi5f8.js} +3 -3
  54. package/.next/standalone/.next/static/chunks/{0_ybvkygns8mh.js → 0c9rkz3~1u03x.js} +1 -1
  55. package/.next/standalone/.next/static/chunks/{09tnrtb~sgtjh.js → 0du2gvlh1l0s..js} +1 -1
  56. package/.next/standalone/.next/static/chunks/0elygtxbdt6hf.js +1 -0
  57. package/.next/standalone/.next/static/chunks/{14l28wdk~4pdq.js → 0lshe67a2n--l.js} +3 -3
  58. package/.next/standalone/.next/static/chunks/0mfj9gib0w9yz.js +1 -0
  59. package/.next/standalone/.next/static/chunks/{0jlwnzphd~x2n.js → 0slo-qgx0cc3k.js} +1 -1
  60. package/.next/standalone/.next/static/chunks/0voovzaz_7y-5.js +1 -0
  61. package/.next/standalone/.next/static/chunks/{0fq~w9fqllgym.js → 107x2rsh8h2tf.js} +2 -2
  62. package/.next/standalone/.next/static/chunks/15o-850swxf9e.js +1 -0
  63. package/.next/standalone/.next/static/chunks/{turbopack-14age6cyn.1v1.js → turbopack-0b~y_4_sav3pa.js} +1 -1
  64. package/.next/standalone/.next/static/chunks/{turbopack-0x9g~5tbkb3z6.js → turbopack-0op_qn_2xryku.js} +1 -1
  65. package/.next/standalone/.next/static/chunks/{turbopack-17_zn5.-e_pwc.js → turbopack-0p-43vr~rr~xy.js} +1 -1
  66. package/.next/standalone/.next/static/chunks/{turbopack-0hhd0k47o3zqx.js → turbopack-0t~58p.nd.~_x.js} +1 -1
  67. package/.next/standalone/package.json +1 -1
  68. package/.next/standalone/server.js +1 -1
  69. package/dist/server.js +1 -1
  70. package/package.json +1 -1
  71. package/.next/standalone/.next/static/chunks/03eq8u6303wiy.js +0 -1
  72. package/.next/standalone/.next/static/chunks/0_0bwcp~9lea8.js +0 -1
  73. package/.next/standalone/.next/static/chunks/0ot3qpr3oci.i.js +0 -1
  74. package/.next/standalone/.next/static/chunks/0y-6.52zsn5h_.js +0 -1
  75. /package/.next/standalone/.next/static/{Fvh2ZScb-GvlCulutSHF4 → 3bUIU98dXJStHWNTemQTG}/_clientMiddlewareManifest.js +0 -0
  76. /package/.next/standalone/.next/static/{Fvh2ZScb-GvlCulutSHF4 → 3bUIU98dXJStHWNTemQTG}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[552608,a=>{"use strict";let b={"opus-4-7":"Opus 4.7","opus-4-6":"Opus 4.6","opus-4-5":"Opus 4.5","opus-4-1":"Opus 4.1","opus-4":"Opus 4","sonnet-4-6":"Sonnet 4.6","sonnet-4-5":"Sonnet 4.5","sonnet-4":"Sonnet 4","sonnet-3-7":"Sonnet 3.7","sonnet-3-5":"Sonnet 3.5","haiku-4-5":"Haiku 4.5","haiku-3-5":"Haiku 3.5","haiku-3":"Haiku 3","opus-3":"Opus 3"},c=a=>{let b=a.replace(/\[.*?\]$/,"").match(/claude-(\w+-[\d]+(?:-[\d]+)*)(?:-\d{8}|-v\d)?(?:\:\d)?$/);return b?b[1]:null};a.s(["formatCost",0,a=>a<.01?`$${a.toFixed(4)}`:a<1?`$${a.toFixed(3)}`:a>=1e3?`$${a.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",")}`:`$${a.toFixed(2)}`,"formatModelDisplayName",0,a=>{let d=c(a);if(d&&b[d])return b[d];let e=a.match(/claude-(\w+)/);return e?e[1].charAt(0).toUpperCase()+e[1].slice(1):a},"formatTokenCount",0,a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:a.toLocaleString(),"formatTokenDetail",0,a=>a.toLocaleString(),"normalizeModelName",0,a=>{let b=c(a);return b?`claude-${b}`:a}])},340001,a=>{"use strict";var b=a.i(508171),c=a.i(799856);a.s(["Skeleton",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"skeleton",className:(0,c.cn)("animate-pulse rounded-md bg-muted",a),...d})}])},727198,a=>{"use strict";let b=(0,a.i(305162).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);a.s(["AlertCircle",0,b],727198)},319816,986523,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,c],319816);let d=(0,b.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);a.s(["ArrowRight",0,d],986523)},116847,a=>{"use strict";let b=(0,a.i(305162).default)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);a.s(["ListChecks",0,b],116847)},679984,a=>{"use strict";var b=a.i(508171),c=a.i(113952),d=a.i(520562),e=a.i(987441),f=a.i(510414),g=a.i(109254),h=a.i(396465),i=a.i(430409),j=a.i(466180);let k="https://github.com/openai/codex";a.s(["default",0,({open:a,onOpenChange:l})=>{let m=(0,c.useTranslations)("toolsRequired"),n=(0,c.useTranslations)("terminal"),o=(0,c.useTranslations)("common"),p=async a=>{await (0,j.copyToClipboard)(a)&&f.toast.success(n("codexCopied"),{duration:1e3})};return(0,b.jsx)(g.Dialog,{open:a,onOpenChange:l,children:(0,b.jsxs)(g.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(g.DialogHeader,{children:(0,b.jsxs)(g.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(i.default,{className:"h-4 w-4"}),m("codexInstallGuideTitle")]})}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:[m("codexInstallNpm"),m("codexInstallBrew")].map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-md border bg-muted/40 px-3 py-2 font-mono text-xs",children:[(0,b.jsx)("span",{className:"flex-1 truncate",children:a}),(0,b.jsx)("button",{type:"button",onClick:()=>void p(a),"aria-label":n("codexCopyCommand"),className:"text-muted-foreground hover:text-foreground",children:(0,b.jsx)(d.Copy,{className:"h-3.5 w-3.5"})})]},a))}),(0,b.jsxs)(g.DialogFooter,{className:"gap-2",children:[(0,b.jsxs)("a",{href:k,target:"_blank",rel:"noreferrer",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 text-sm font-medium hover:bg-muted",children:[(0,b.jsx)(e.ExternalLink,{className:"h-3.5 w-3.5"}),k.replace("https://","")]}),(0,b.jsx)(h.Button,{onClick:()=>l(!1),children:o("close")})]})]})})}])},665315,a=>{"use strict";var b=a.i(508171),c=a.i(127669),d=a.i(113952),e=a.i(319816),f=a.i(986523);let g=(0,a.i(305162).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var h=a.i(561049),i=a.i(999762),j=a.i(641901),k=a.i(273120),l=a.i(997594),m=a.i(799856),n=a.i(721043),o=a.i(158799);let p="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",q="Mozilla/5.0 (iPad; CPU OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",r=[{id:"iphone-se",name:"iPhone SE",width:375,height:667,deviceScaleFactor:2,userAgent:p},{id:"iphone-14-pro",name:"iPhone 14 Pro",width:393,height:852,deviceScaleFactor:3,userAgent:p},{id:"iphone-14-pro-max",name:"iPhone 14 Pro Max",width:430,height:932,deviceScaleFactor:3,userAgent:p},{id:"pixel-7",name:"Pixel 7",width:412,height:915,deviceScaleFactor:2.625,userAgent:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36"},{id:"galaxy-s20-ultra",name:"Galaxy S20 Ultra",width:412,height:915,deviceScaleFactor:3.5,userAgent:"Mozilla/5.0 (Linux; Android 13; SM-G988B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36"},{id:"ipad-mini",name:"iPad Mini",width:768,height:1024,deviceScaleFactor:2,userAgent:q},{id:"ipad-pro",name:'iPad Pro 12.9"',width:1024,height:1366,deviceScaleFactor:2,userAgent:q}],s=["fit",.5,.75,1,1.25,1.5],t=(a,b)=>"fit"===a?b:`${Math.round(100*a)}%`,u=new Map;a.s(["default",0,({initialUrl:a,onUrlChange:p,tabId:q})=>{let v=(0,d.useTranslations)("webBrowser"),w=a?(a=>{let b=u.get(a);if(b)return b;if(n.default)try{return localStorage.getItem(`webview-last:${a}`)}catch{}return null})(a)??a:"",[x,y]=(0,c.useState)(w),[z,A]=(0,c.useState)(w),[B,C]=(0,c.useState)(n.default),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)("iphone-14-pro"),[L,M]=(0,c.useState)("portrait"),[N,O]=(0,c.useState)("fit"),[P,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)({w:0,h:0}),V=(0,c.useRef)(null),W=(0,c.useRef)(null),X=(0,c.useRef)(null),Y=(0,c.useRef)(null),Z=(0,c.useRef)(p);(0,c.useEffect)(()=>{Z.current=p});let $=(0,c.useRef)(a);(0,c.useEffect)(()=>{$.current=a});let _=(0,c.useMemo)(()=>r.find(a=>a.id===J)??r[0],[J]),aa=(0,c.useMemo)(()=>"landscape"===L?{width:_.height,height:_.width}:{width:_.width,height:_.height},[_,L]),ab=(0,c.useMemo)(()=>0===T.w||0===T.h?1:Math.min(1,(T.w-32)/aa.width,(T.h-32)/aa.height),[T,aa]),ac="fit"===N?ab:N;(0,c.useEffect)(()=>{a&&z&&((a,b)=>{if(u.set(a,b),n.default)try{localStorage.setItem(`webview-last:${a}`,b)}catch{}})(a,z)},[z,a]),(0,c.useEffect)(()=>{if(!n.default||!x||!X.current)return;let a=X.current,b=a.querySelector("webview");b?b.parentElement!==a&&a.appendChild(b):((b=document.createElement("webview")).setAttribute("partition","persist:web-browser"),b.style.width="100%",b.style.height="100%",b.style.border="none",b.setAttribute("src",x),a.appendChild(b)),W.current=b;let c=a=>{A(a.url),E(b.canGoBack()),G(b.canGoForward()),Z.current?.(a.url)},d=a=>{if(!a.isMainFrame)return;let c=b.getURL();A(c),E(b.canGoBack()),G(b.canGoForward()),Z.current?.(c)},e=()=>{if(q)try{b.getWebContentsId()}catch{}};return b.addEventListener("did-navigate",c),b.addEventListener("did-navigate-in-page",d),b.addEventListener("dom-ready",e),()=>{b.removeEventListener("did-navigate",c),b.removeEventListener("did-navigate-in-page",d),b.removeEventListener("dom-ready",e)}},[x,q]),(0,c.useEffect)(()=>{if(n.default&&q)return()=>{}},[q]),(0,c.useRef)(null),(0,c.useEffect)(()=>{n.default},[q,H,_,aa,L]),(0,c.useEffect)(()=>{let a=Y.current;if(!a)return;let b=()=>{U({w:a.clientWidth,h:a.clientHeight})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[H]),(0,c.useEffect)(()=>{let a=W.current;a&&(H?(a.style.width=`${aa.width}px`,a.style.height=`${aa.height}px`,a.style.transformOrigin="top left",a.style.transform=`scale(${ac})`):(a.style.width="100%",a.style.height="100%",a.style.transform="",a.style.transformOrigin=""))},[H,aa,ac,x]),(0,c.useEffect)(()=>{!n.default&&V.current&&x&&(V.current.src=x)},[x]);let ad=(0,c.useCallback)(()=>{let a=V.current;if(!a)return;let b=(a=>{try{let b=a.contentWindow?.location.href;return void 0!==b&&"about:blank"!==b}catch{return!1}})(a);if(C(b),b)try{let b=a.contentWindow?.location.href;b&&"about:blank"!==b&&(A(b),p?.(b))}catch{}},[p]),ae=(0,c.useCallback)(a=>{let b,c=(b=a.trim())?/^https?:\/\//i.test(b)?b:/^localhost(:|\/|$)/.test(b)||/^(\d{1,3}\.){3}\d{1,3}(:|\/|$)/.test(b)?`http://${b}`:`https://${b}`:"";c&&(n.default&&W.current&&W.current.loadURL(c),y(c),A(c),p?.(c))},[p]),af=(0,c.useCallback)(()=>{I(a=>!a)},[]),ag=n.default||B,ah=n.default&&H;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"relative flex h-12 shrink-0 items-center gap-1 border-b border-border px-2",...n.default?{style:{WebkitAppRegion:"drag"}}:{},children:(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-1",...n.default?{style:{WebkitAppRegion:"no-drag"}}:{},children:[ag&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",n.default&&!D?"text-muted-foreground/50":"text-muted-foreground hover:text-foreground"),onClick:()=>{if(n.default)return void W.current?.goBack();try{V.current?.contentWindow?.history.back()}catch{}},disabled:n.default&&!D,"aria-label":v("back"),children:(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",n.default&&!F?"text-muted-foreground/50":"text-muted-foreground hover:text-foreground"),onClick:()=>{if(n.default)return void W.current?.goForward();try{V.current?.contentWindow?.history.forward()}catch{}},disabled:n.default&&!F,"aria-label":v("forward"),children:(0,b.jsx)(f.ArrowRight,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>{if(n.default)return void W.current?.reload();try{V.current?.contentWindow?.location.reload()}catch{if(V.current){let a=V.current.src;V.current.src="",V.current.src=a}}},"aria-label":v("reload"),children:(0,b.jsx)(g,{className:"h-3.5 w-3.5"})})]}),n.default&&(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",H?"text-accent-color":"text-muted-foreground hover:text-foreground"),onClick:af,"aria-label":H?v("switchToDesktop"):v("switchToMobile"),title:H?v("mobileModeTip"):v("desktopModeTip"),children:H?(0,b.jsx)(i.Smartphone,{className:"h-3.5 w-3.5"}):(0,b.jsx)(j.Monitor,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)("div",{className:"ml-1 flex flex-1 items-center gap-2 rounded-md border border-border bg-secondary px-2.5 py-1",children:[(0,b.jsx)(h.Globe,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,b.jsx)("input",{className:(0,m.cn)("min-w-0 flex-1 bg-transparent text-xs outline-none placeholder:text-muted-foreground/50",B?"text-foreground":"text-muted-foreground"),placeholder:v("urlPlaceholder"),value:z,onChange:a=>A(a.target.value),onKeyDown:a=>{"Enter"===a.key&&ae(z)},spellCheck:!1})]})]})}),ah&&(0,b.jsxs)("div",{className:"flex h-9 shrink-0 items-center gap-2 border-b border-border bg-muted/30 px-3 text-xs",children:[(0,b.jsxs)(o.Popover,{open:P,onOpenChange:Q,children:[(0,b.jsxs)(o.PopoverTrigger,{className:"flex h-6 items-center gap-1 rounded px-2 text-foreground hover:bg-accent",title:v("deviceTip"),children:[(0,b.jsx)("span",{className:"font-medium",children:_.name}),(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 text-muted-foreground"})]}),(0,b.jsx)(o.PopoverContent,{align:"start",className:"w-56 p-1",children:r.map(a=>(0,b.jsxs)("button",{className:(0,m.cn)("flex w-full items-center justify-between rounded px-2 py-1.5 text-left text-xs hover:bg-accent",a.id===J&&"bg-accent/50 font-medium"),onClick:()=>{K(a.id),Q(!1)},children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.width,"×",a.height]})]},a.id))})]}),(0,b.jsxs)("span",{className:"font-mono text-muted-foreground",children:[aa.width," × ",aa.height]}),(0,b.jsx)("button",{className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>{M(a=>"portrait"===a?"landscape":"portrait")},"aria-label":v("rotate"),title:v("rotate"),children:(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)(o.Popover,{open:R,onOpenChange:S,children:[(0,b.jsxs)(o.PopoverTrigger,{className:"flex h-6 items-center gap-1 rounded px-2 text-foreground hover:bg-accent",title:v("zoomTip"),children:[(0,b.jsx)("span",{children:t(N,v("zoomFit"))}),(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 text-muted-foreground"})]}),(0,b.jsx)(o.PopoverContent,{align:"end",className:"w-32 p-1",children:s.map(a=>(0,b.jsx)("button",{className:(0,m.cn)("flex w-full items-center rounded px-2 py-1.5 text-left text-xs hover:bg-accent",a===N&&"bg-accent/50 font-medium"),onClick:()=>{O(a),S(!1)},children:t(a,v("zoomFit"))},String(a)))})]})]}),x?n.default?(0,b.jsx)("div",{ref:Y,className:(0,m.cn)("relative min-h-0 flex-1 overflow-auto",H?"flex items-center justify-center bg-muted/20 p-4":""),children:(0,b.jsx)("div",{ref:X,className:(0,m.cn)(H&&"overflow-hidden rounded-sm bg-background shadow-lg ring-1 ring-border"),style:H?{width:aa.width*ac,height:aa.height*ac,flexShrink:0}:{width:"100%",height:"100%"}})}):(0,b.jsx)("iframe",{ref:V,className:"min-h-0 flex-1 border-0",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms allow-modals",allow:"clipboard-read; clipboard-write",title:"Web Browser",onLoad:ad}):(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 text-muted-foreground",children:[(0,b.jsx)(h.Globe,{className:"h-10 w-10 opacity-20"}),(0,b.jsx)("span",{className:"text-sm",children:v("emptyMessage")})]})})]})}],665315)}];
1
+ module.exports=[552608,a=>{"use strict";let b={"opus-4-8":"Opus 4.8","opus-4-7":"Opus 4.7","opus-4-6":"Opus 4.6","opus-4-5":"Opus 4.5","opus-4-1":"Opus 4.1","opus-4":"Opus 4","sonnet-4-6":"Sonnet 4.6","sonnet-4-5":"Sonnet 4.5","sonnet-4":"Sonnet 4","sonnet-3-7":"Sonnet 3.7","sonnet-3-5":"Sonnet 3.5","haiku-4-5":"Haiku 4.5","haiku-3-5":"Haiku 3.5","haiku-3":"Haiku 3","opus-3":"Opus 3"},c=a=>{let b=a.replace(/\[.*?\]$/,"").match(/claude-(\w+-[\d]+(?:-[\d]+)*)(?:-\d{8}|-v\d)?(?:\:\d)?$/);return b?b[1]:null};a.s(["formatCost",0,a=>a<.01?`$${a.toFixed(4)}`:a<1?`$${a.toFixed(3)}`:a>=1e3?`$${a.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",")}`:`$${a.toFixed(2)}`,"formatModelDisplayName",0,a=>{let d=c(a);if(d&&b[d])return b[d];let e=a.match(/claude-(\w+)/);return e?e[1].charAt(0).toUpperCase()+e[1].slice(1):a},"formatTokenCount",0,a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${(a/1e3).toFixed(1)}K`:a.toLocaleString(),"formatTokenDetail",0,a=>a.toLocaleString(),"normalizeModelName",0,a=>{let b=c(a);return b?`claude-${b}`:a}])},340001,a=>{"use strict";var b=a.i(508171),c=a.i(799856);a.s(["Skeleton",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"skeleton",className:(0,c.cn)("animate-pulse rounded-md bg-muted",a),...d})}])},727198,a=>{"use strict";let b=(0,a.i(305162).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);a.s(["AlertCircle",0,b],727198)},319816,986523,a=>{"use strict";var b=a.i(305162);let c=(0,b.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,c],319816);let d=(0,b.default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);a.s(["ArrowRight",0,d],986523)},116847,a=>{"use strict";let b=(0,a.i(305162).default)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);a.s(["ListChecks",0,b],116847)},679984,a=>{"use strict";var b=a.i(508171),c=a.i(113952),d=a.i(520562),e=a.i(987441),f=a.i(510414),g=a.i(109254),h=a.i(396465),i=a.i(430409),j=a.i(466180);let k="https://github.com/openai/codex";a.s(["default",0,({open:a,onOpenChange:l})=>{let m=(0,c.useTranslations)("toolsRequired"),n=(0,c.useTranslations)("terminal"),o=(0,c.useTranslations)("common"),p=async a=>{await (0,j.copyToClipboard)(a)&&f.toast.success(n("codexCopied"),{duration:1e3})};return(0,b.jsx)(g.Dialog,{open:a,onOpenChange:l,children:(0,b.jsxs)(g.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(g.DialogHeader,{children:(0,b.jsxs)(g.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(i.default,{className:"h-4 w-4"}),m("codexInstallGuideTitle")]})}),(0,b.jsx)("div",{className:"flex flex-col gap-3",children:[m("codexInstallNpm"),m("codexInstallBrew")].map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 rounded-md border bg-muted/40 px-3 py-2 font-mono text-xs",children:[(0,b.jsx)("span",{className:"flex-1 truncate",children:a}),(0,b.jsx)("button",{type:"button",onClick:()=>void p(a),"aria-label":n("codexCopyCommand"),className:"text-muted-foreground hover:text-foreground",children:(0,b.jsx)(d.Copy,{className:"h-3.5 w-3.5"})})]},a))}),(0,b.jsxs)(g.DialogFooter,{className:"gap-2",children:[(0,b.jsxs)("a",{href:k,target:"_blank",rel:"noreferrer",className:"inline-flex h-8 items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 text-sm font-medium hover:bg-muted",children:[(0,b.jsx)(e.ExternalLink,{className:"h-3.5 w-3.5"}),k.replace("https://","")]}),(0,b.jsx)(h.Button,{onClick:()=>l(!1),children:o("close")})]})]})})}])},665315,a=>{"use strict";var b=a.i(508171),c=a.i(127669),d=a.i(113952),e=a.i(319816),f=a.i(986523);let g=(0,a.i(305162).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var h=a.i(561049),i=a.i(999762),j=a.i(641901),k=a.i(273120),l=a.i(997594),m=a.i(799856),n=a.i(721043),o=a.i(158799);let p="Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",q="Mozilla/5.0 (iPad; CPU OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",r=[{id:"iphone-se",name:"iPhone SE",width:375,height:667,deviceScaleFactor:2,userAgent:p},{id:"iphone-14-pro",name:"iPhone 14 Pro",width:393,height:852,deviceScaleFactor:3,userAgent:p},{id:"iphone-14-pro-max",name:"iPhone 14 Pro Max",width:430,height:932,deviceScaleFactor:3,userAgent:p},{id:"pixel-7",name:"Pixel 7",width:412,height:915,deviceScaleFactor:2.625,userAgent:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36"},{id:"galaxy-s20-ultra",name:"Galaxy S20 Ultra",width:412,height:915,deviceScaleFactor:3.5,userAgent:"Mozilla/5.0 (Linux; Android 13; SM-G988B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36"},{id:"ipad-mini",name:"iPad Mini",width:768,height:1024,deviceScaleFactor:2,userAgent:q},{id:"ipad-pro",name:'iPad Pro 12.9"',width:1024,height:1366,deviceScaleFactor:2,userAgent:q}],s=["fit",.5,.75,1,1.25,1.5],t=(a,b)=>"fit"===a?b:`${Math.round(100*a)}%`,u=new Map;a.s(["default",0,({initialUrl:a,onUrlChange:p,tabId:q})=>{let v=(0,d.useTranslations)("webBrowser"),w=a?(a=>{let b=u.get(a);if(b)return b;if(n.default)try{return localStorage.getItem(`webview-last:${a}`)}catch{}return null})(a)??a:"",[x,y]=(0,c.useState)(w),[z,A]=(0,c.useState)(w),[B,C]=(0,c.useState)(n.default),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(!1),[H,I]=(0,c.useState)(!1),[J,K]=(0,c.useState)("iphone-14-pro"),[L,M]=(0,c.useState)("portrait"),[N,O]=(0,c.useState)("fit"),[P,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)(!1),[T,U]=(0,c.useState)({w:0,h:0}),V=(0,c.useRef)(null),W=(0,c.useRef)(null),X=(0,c.useRef)(null),Y=(0,c.useRef)(null),Z=(0,c.useRef)(p);(0,c.useEffect)(()=>{Z.current=p});let $=(0,c.useRef)(a);(0,c.useEffect)(()=>{$.current=a});let _=(0,c.useMemo)(()=>r.find(a=>a.id===J)??r[0],[J]),aa=(0,c.useMemo)(()=>"landscape"===L?{width:_.height,height:_.width}:{width:_.width,height:_.height},[_,L]),ab=(0,c.useMemo)(()=>0===T.w||0===T.h?1:Math.min(1,(T.w-32)/aa.width,(T.h-32)/aa.height),[T,aa]),ac="fit"===N?ab:N;(0,c.useEffect)(()=>{a&&z&&((a,b)=>{if(u.set(a,b),n.default)try{localStorage.setItem(`webview-last:${a}`,b)}catch{}})(a,z)},[z,a]),(0,c.useEffect)(()=>{if(!n.default||!x||!X.current)return;let a=X.current,b=a.querySelector("webview");b?b.parentElement!==a&&a.appendChild(b):((b=document.createElement("webview")).setAttribute("partition","persist:web-browser"),b.style.width="100%",b.style.height="100%",b.style.border="none",b.setAttribute("src",x),a.appendChild(b)),W.current=b;let c=a=>{A(a.url),E(b.canGoBack()),G(b.canGoForward()),Z.current?.(a.url)},d=a=>{if(!a.isMainFrame)return;let c=b.getURL();A(c),E(b.canGoBack()),G(b.canGoForward()),Z.current?.(c)},e=()=>{if(q)try{b.getWebContentsId()}catch{}};return b.addEventListener("did-navigate",c),b.addEventListener("did-navigate-in-page",d),b.addEventListener("dom-ready",e),()=>{b.removeEventListener("did-navigate",c),b.removeEventListener("did-navigate-in-page",d),b.removeEventListener("dom-ready",e)}},[x,q]),(0,c.useEffect)(()=>{if(n.default&&q)return()=>{}},[q]),(0,c.useRef)(null),(0,c.useEffect)(()=>{n.default},[q,H,_,aa,L]),(0,c.useEffect)(()=>{let a=Y.current;if(!a)return;let b=()=>{U({w:a.clientWidth,h:a.clientHeight})};b();let c=new ResizeObserver(b);return c.observe(a),()=>c.disconnect()},[H]),(0,c.useEffect)(()=>{let a=W.current;a&&(H?(a.style.width=`${aa.width}px`,a.style.height=`${aa.height}px`,a.style.transformOrigin="top left",a.style.transform=`scale(${ac})`):(a.style.width="100%",a.style.height="100%",a.style.transform="",a.style.transformOrigin=""))},[H,aa,ac,x]),(0,c.useEffect)(()=>{!n.default&&V.current&&x&&(V.current.src=x)},[x]);let ad=(0,c.useCallback)(()=>{let a=V.current;if(!a)return;let b=(a=>{try{let b=a.contentWindow?.location.href;return void 0!==b&&"about:blank"!==b}catch{return!1}})(a);if(C(b),b)try{let b=a.contentWindow?.location.href;b&&"about:blank"!==b&&(A(b),p?.(b))}catch{}},[p]),ae=(0,c.useCallback)(a=>{let b,c=(b=a.trim())?/^https?:\/\//i.test(b)?b:/^localhost(:|\/|$)/.test(b)||/^(\d{1,3}\.){3}\d{1,3}(:|\/|$)/.test(b)?`http://${b}`:`https://${b}`:"";c&&(n.default&&W.current&&W.current.loadURL(c),y(c),A(c),p?.(c))},[p]),af=(0,c.useCallback)(()=>{I(a=>!a)},[]),ag=n.default||B,ah=n.default&&H;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"relative flex h-12 shrink-0 items-center gap-1 border-b border-border px-2",...n.default?{style:{WebkitAppRegion:"drag"}}:{},children:(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-1",...n.default?{style:{WebkitAppRegion:"no-drag"}}:{},children:[ag&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",n.default&&!D?"text-muted-foreground/50":"text-muted-foreground hover:text-foreground"),onClick:()=>{if(n.default)return void W.current?.goBack();try{V.current?.contentWindow?.history.back()}catch{}},disabled:n.default&&!D,"aria-label":v("back"),children:(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",n.default&&!F?"text-muted-foreground/50":"text-muted-foreground hover:text-foreground"),onClick:()=>{if(n.default)return void W.current?.goForward();try{V.current?.contentWindow?.history.forward()}catch{}},disabled:n.default&&!F,"aria-label":v("forward"),children:(0,b.jsx)(f.ArrowRight,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("button",{className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>{if(n.default)return void W.current?.reload();try{V.current?.contentWindow?.location.reload()}catch{if(V.current){let a=V.current.src;V.current.src="",V.current.src=a}}},"aria-label":v("reload"),children:(0,b.jsx)(g,{className:"h-3.5 w-3.5"})})]}),n.default&&(0,b.jsx)("button",{className:(0,m.cn)("flex h-7 w-7 items-center justify-center rounded hover:bg-accent",H?"text-accent-color":"text-muted-foreground hover:text-foreground"),onClick:af,"aria-label":H?v("switchToDesktop"):v("switchToMobile"),title:H?v("mobileModeTip"):v("desktopModeTip"),children:H?(0,b.jsx)(i.Smartphone,{className:"h-3.5 w-3.5"}):(0,b.jsx)(j.Monitor,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)("div",{className:"ml-1 flex flex-1 items-center gap-2 rounded-md border border-border bg-secondary px-2.5 py-1",children:[(0,b.jsx)(h.Globe,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,b.jsx)("input",{className:(0,m.cn)("min-w-0 flex-1 bg-transparent text-xs outline-none placeholder:text-muted-foreground/50",B?"text-foreground":"text-muted-foreground"),placeholder:v("urlPlaceholder"),value:z,onChange:a=>A(a.target.value),onKeyDown:a=>{"Enter"===a.key&&ae(z)},spellCheck:!1})]})]})}),ah&&(0,b.jsxs)("div",{className:"flex h-9 shrink-0 items-center gap-2 border-b border-border bg-muted/30 px-3 text-xs",children:[(0,b.jsxs)(o.Popover,{open:P,onOpenChange:Q,children:[(0,b.jsxs)(o.PopoverTrigger,{className:"flex h-6 items-center gap-1 rounded px-2 text-foreground hover:bg-accent",title:v("deviceTip"),children:[(0,b.jsx)("span",{className:"font-medium",children:_.name}),(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 text-muted-foreground"})]}),(0,b.jsx)(o.PopoverContent,{align:"start",className:"w-56 p-1",children:r.map(a=>(0,b.jsxs)("button",{className:(0,m.cn)("flex w-full items-center justify-between rounded px-2 py-1.5 text-left text-xs hover:bg-accent",a.id===J&&"bg-accent/50 font-medium"),onClick:()=>{K(a.id),Q(!1)},children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsxs)("span",{className:"text-muted-foreground",children:[a.width,"×",a.height]})]},a.id))})]}),(0,b.jsxs)("span",{className:"font-mono text-muted-foreground",children:[aa.width," × ",aa.height]}),(0,b.jsx)("button",{className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>{M(a=>"portrait"===a?"landscape":"portrait")},"aria-label":v("rotate"),title:v("rotate"),children:(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsxs)(o.Popover,{open:R,onOpenChange:S,children:[(0,b.jsxs)(o.PopoverTrigger,{className:"flex h-6 items-center gap-1 rounded px-2 text-foreground hover:bg-accent",title:v("zoomTip"),children:[(0,b.jsx)("span",{children:t(N,v("zoomFit"))}),(0,b.jsx)(l.ChevronDown,{className:"h-3 w-3 text-muted-foreground"})]}),(0,b.jsx)(o.PopoverContent,{align:"end",className:"w-32 p-1",children:s.map(a=>(0,b.jsx)("button",{className:(0,m.cn)("flex w-full items-center rounded px-2 py-1.5 text-left text-xs hover:bg-accent",a===N&&"bg-accent/50 font-medium"),onClick:()=>{O(a),S(!1)},children:t(a,v("zoomFit"))},String(a)))})]})]}),x?n.default?(0,b.jsx)("div",{ref:Y,className:(0,m.cn)("relative min-h-0 flex-1 overflow-auto",H?"flex items-center justify-center bg-muted/20 p-4":""),children:(0,b.jsx)("div",{ref:X,className:(0,m.cn)(H&&"overflow-hidden rounded-sm bg-background shadow-lg ring-1 ring-border"),style:H?{width:aa.width*ac,height:aa.height*ac,flexShrink:0}:{width:"100%",height:"100%"}})}):(0,b.jsx)("iframe",{ref:V,className:"min-h-0 flex-1 border-0",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms allow-modals",allow:"clipboard-read; clipboard-write",title:"Web Browser",onLoad:ad}):(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,b.jsxs)("div",{className:"flex flex-col items-center gap-3 text-muted-foreground",children:[(0,b.jsx)(h.Globe,{className:"h-10 w-10 opacity-20"}),(0,b.jsx)("span",{className:"text-sm",children:v("emptyMessage")})]})})]})}],665315)}];
2
2
 
3
3
  //# sourceMappingURL=_0l_4npy._.js.map