droidsembly 0.4.0-beta.1 → 0.4.0-beta.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/LICENSE +21 -21
- package/README.it.md +193 -184
- package/README.md +193 -184
- package/bin/distribution.d.ts +3 -3
- package/bin/distribution.js +48 -48
- package/dist/THIRD_PARTY_LICENSES.txt +240 -240
- package/dist/assets/AccessibilitySettings-HB1JfQbh.js +30 -0
- package/dist/assets/AppViewer-0Bly3EdB.js +5 -0
- package/dist/assets/Balloon-B6odnAlm.js +1 -0
- package/dist/assets/{Batched-BOgjreKO.js → Batched-CTJWq46z.js} +1 -1
- package/dist/assets/Birds-DSS0OIz9.js +1 -0
- package/dist/assets/Blimp-CZt6dddK.js +1 -0
- package/dist/assets/{BufferGeometryUtils-BsmWvcA2.js → BufferGeometryUtils-CmpUrBC5.js} +1 -1
- package/dist/assets/Duck-BnRLkodp.js +1 -0
- package/dist/assets/{Effects-CNyhhFkE.js → Effects-Bkewth1L.js} +2 -2
- package/dist/assets/{Fireworks-CJfDJOeb.js → Fireworks-Cvn8YKWd.js} +2 -2
- package/dist/assets/Helicopter-BDrFQMNX.js +1 -0
- package/dist/assets/{Hurricane-9WqZGyZg.js → Hurricane-C8hyFXjx.js} +2 -2
- package/dist/assets/Kaiju-Bxxe9DG0.js +1 -0
- package/dist/assets/Meteors-UdYL0Tbv.js +1 -0
- package/dist/assets/MissionConsole-DJRtojZP.js +1 -0
- package/dist/assets/Office-9Mank16i.js +563 -0
- package/dist/assets/PhotoPanel-C_njIXp0.js +1 -0
- package/dist/assets/PhotoScene-DwpeJjGe.js +115 -0
- package/dist/assets/Plane-DzvUAUYE.js +1 -0
- package/dist/assets/Pocket-A1iI6Ivy.js +2 -0
- package/dist/assets/{Rainbow-CdcWsmW8.js → Rainbow-CV1rD6rW.js} +2 -2
- package/dist/assets/Roof-DSpKcGXK.js +34 -0
- package/dist/assets/{Shell-BmnZn4UL.js → Shell-GaQY3zre.js} +2 -2
- package/dist/assets/Skywriting-D4B2ZvH7.js +1 -0
- package/dist/assets/TerminalView-DhmLqjYn.js +17 -0
- package/dist/assets/ToyWorld-DeQUxcuy.js +1 -0
- package/dist/assets/Ufo-CitoxReu.js +1 -0
- package/dist/assets/Whale-Btx5ph-T.js +1 -0
- package/dist/assets/all-gw-szDg1.js +11 -0
- package/dist/assets/bloomMarks-DRhDp19k.js +4231 -0
- package/dist/assets/cheerRules-DWb8Qwzg.js +1 -0
- package/dist/assets/{cityLayout-7ckfe3wf.js → cityLayout-aA2Ktgpu.js} +1 -1
- package/dist/assets/{dogState-DiOvoobI.js → dogState-DY7tJEVD.js} +1 -1
- package/dist/assets/{doors-BHKj8tkO.js → doors-BlKvxXVp.js} +1 -1
- package/dist/assets/{gallery-ColCPQQE.js → gallery-COKuWb9E.js} +1 -1
- package/dist/assets/gate-D0uU0wv5.js +2 -0
- package/dist/assets/index-CDJgPTOC.js +10 -0
- package/dist/assets/{instantReplay-DGiLgvkQ.js → instantReplay-BjoV6jrY.js} +1 -1
- package/dist/assets/interact-0jqx03Xr.js +1 -0
- package/dist/assets/jsx-runtime-CXW0f58S.js +1 -0
- package/dist/assets/jukeboxSongs-CUwHJ1cS.js +1 -0
- package/dist/assets/{kit-C6ByUQ-Y.js → kit-n-eqZ1AT.js} +1 -1
- package/dist/assets/mic-BnAa4E99.js +1 -0
- package/dist/assets/photoMode-BybFMLKC.js +1 -0
- package/dist/assets/{pipeline-BOTOZ69L.js → pipeline-BGPWXegt.js} +1 -1
- package/dist/assets/rapier-CrXmTSyE.js +1 -0
- package/dist/assets/rig-DfdntE8m.js +1 -0
- package/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/assets/{speechLanguage-BtfdhZNI.js → speechLanguage-DfsQvU9M.js} +1 -1
- package/dist/assets/store-CXLtXw8e.js +5 -0
- package/dist/assets/useDayTime-BjBDzh_t.js +1 -0
- package/dist/assets/{useGraphics-Cif18p7Q.js → useGraphics-Bg6L4EdS.js} +1 -1
- package/dist/assets/voiceMessages-CFLyZLZ4.js +1 -0
- package/dist/assets/weatherState-BJVm5hU-.js +1 -0
- package/dist/icons/Sora-OFL.txt +93 -93
- package/dist/icons/badge.svg +1 -1
- package/dist/icons/droid-antenna.svg +29 -29
- package/dist/icons/droid-eyes.svg +29 -29
- package/dist/icons/droid-shell.svg +29 -29
- package/dist/icons/droid-spark.svg +29 -29
- package/dist/icons/droid-wire.svg +29 -29
- package/dist/icons/favicon.svg +1 -1
- package/dist/icons/icon.svg +29 -29
- package/dist/icons/logo-dark.svg +29 -29
- package/dist/icons/logo-light.svg +29 -29
- package/dist/index.html +26 -25
- package/dist/manifest.webmanifest +19 -19
- package/dist/third-party-licenses.json +3 -3
- package/dist-server/browser-init.js +24 -24
- package/dist-server/index.js +125 -42
- package/dist-server/index.js.map +4 -4
- package/dist-server/ptyHost.js.map +1 -1
- package/package.json +98 -98
- package/dist/assets/AccessibilitySettings-DSmFk9JC.js +0 -30
- package/dist/assets/AppViewer-alNn4TBB.js +0 -5
- package/dist/assets/Balloon-UTs7npGo.js +0 -1
- package/dist/assets/Birds-BA2HM-AD.js +0 -1
- package/dist/assets/Blimp-CTykuz6B.js +0 -1
- package/dist/assets/Duck-DH63jUrP.js +0 -1
- package/dist/assets/Helicopter-CW_SP7xP.js +0 -1
- package/dist/assets/Kaiju-SpSi_jBg.js +0 -1
- package/dist/assets/Meteors-DvjhLfbF.js +0 -1
- package/dist/assets/MissionConsole-BEP5CdC8.js +0 -1
- package/dist/assets/Office-BBnd6tyn.js +0 -563
- package/dist/assets/PhotoPanel-DehErnsv.js +0 -1
- package/dist/assets/PhotoScene-Ce-dzToM.js +0 -115
- package/dist/assets/Plane-0nfvzL_c.js +0 -1
- package/dist/assets/Pocket-CBoyL0ra.js +0 -2
- package/dist/assets/Roof-mkMKniSZ.js +0 -34
- package/dist/assets/Skywriting-06dZPAfg.js +0 -1
- package/dist/assets/TerminalView-wlhSixSH.js +0 -17
- package/dist/assets/ToyWorld-Cuu9aW-K.js +0 -1
- package/dist/assets/Ufo-iHaoe5t1.js +0 -1
- package/dist/assets/Whale-DZg88zIX.js +0 -1
- package/dist/assets/all-CYErCTCA.js +0 -11
- package/dist/assets/bloomMarks-DariC6lY.js +0 -4231
- package/dist/assets/cheerRules-CZGSrxOB.js +0 -1
- package/dist/assets/gate-BplJKcLG.js +0 -2
- package/dist/assets/index-B6qvKFYN.js +0 -10
- package/dist/assets/interact-0qw7BGhL.js +0 -1
- package/dist/assets/jsx-runtime-BFUkm7bt.js +0 -1
- package/dist/assets/jukeboxSongs-CjbAzAeb.js +0 -1
- package/dist/assets/mic-B316hcCe.js +0 -1
- package/dist/assets/photoMode-CYxQfgUF.js +0 -1
- package/dist/assets/rapier-CXAOW8OC.js +0 -1
- package/dist/assets/rig-wAyl3G1G.js +0 -1
- package/dist/assets/store-FA83kfnc.js +0 -5
- package/dist/assets/useDayTime-0XsqM14Q.js +0 -1
- package/dist/assets/voiceMessages-DtNmUazr.js +0 -1
- package/dist/assets/weatherState-ExG1doW-.js +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,s as n,t as r,u as i}from"./jsx-runtime-BFUkm7bt.js";import{Bt as a,Gt as o,Ht as s,Jt as c,Kt as l,Rt as u,Vt as d,Wt as f,Xt as p,Yt as m,Zt as h,c as g,p as _,qt as v,zt as y}from"./store-FA83kfnc.js";import{c as b,o as x,s as S}from"./index-B6qvKFYN.js";import{L as C,N as w,h as T,m as E,p as D}from"./AccessibilitySettings-DSmFk9JC.js";var O=i(n(),1),k=3e4,A=e(()=>({channels:{}}));function j(e){let t=A(t=>t.channels[e]),n=_(t=>t.repos.find(t=>t.id===e)?.pulls);return o(t,n??[])}function M(e,t){if(_.getState().replaying){_.getState().pushToast(`info`,`▶ Replaying: the PR theatre is live only. Press Esc to go back to the live office.`);return}A.setState(n=>({channels:{...n.channels,[e]:t}})),!(t==null||_.getState().prPreviews[g(e,t)])&&b.startPrPreview(e,t).catch(()=>void 0)}var N=(()=>{try{return crypto.randomUUID()}catch{return`viewer-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`}})();function ee(e,t){(0,O.useEffect)(()=>{let n=()=>void b.watchPreview(N,t==null?null:e,t).catch(()=>void 0);n();let r=setInterval(n,k);return()=>clearInterval(r)},[e,t]),(0,O.useEffect)(()=>()=>void b.watchPreview(N,null,null).catch(()=>void 0),[])}typeof window<`u`&&!Object.getOwnPropertyDescriptor(window,`__swarmPreviews`)&&Object.defineProperty(window,"__swarmPreviews",{configurable:!0,get:()=>{let e=_.getState(),t=A.getState().channels;return{main:e.repos.map(e=>({repoId:e.id,floor:e.floor,status:e.preview.status,url:e.preview.url,ref:e.preview.ref,port:e.preview.port,channel:o(t[e.id],e.pulls)})),prs:Object.values(e.prPreviews).map(e=>({repoId:e.repoId,pr:e.pr,status:e.status,url:e.url,port:e.port,commit:e.commit,watched:e.watched,idleSec:Math.round((Date.now()-e.viewedAt)/1e3),error:e.error}))}}});var P=16e3,F=e=>Object.entries(e).reduce((e,[t,n])=>e+t.length+n.length+2,0);function I(e){let t=F(e);if(t<=16e3)return null;let n=e=>e.toLocaleString(`en-US`);return`The preview env is ${n(t)} characters (${n(Object.keys(e).length)} variables, each counted as KEY=value), over the ${n(P)} a floor's preview may take. Keep only the variables the app needs to run.`}var L=t({AppViewer:()=>oe,PreviewPill:()=>W,PreviewSettings:()=>q}),R=r(),z={unconfigured:`not set up`,stopped:`stopped`,preparing:`checking out`,installing:`installing`,starting:`starting`,running:`running`,error:`error`},B=[`preparing`,`installing`,`starting`,`running`],V=[{status:`preparing`,label:`Check out the code`},{status:`installing`,label:`Install dependencies`},{status:`starting`,label:`Start the app`}],H=`desktop`,U=12e3;function W({status:e}){let t=S();return(0,R.jsx)(`span`,{className:`status status-${e}`,children:t(z[e])})}var G=e=>Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`
|
|
2
|
-
`);function K(e){let t={},n=e.split(/\r?\n/);for(let e=0;e<n.length;e++){let r=n[e].trim();if(!r||r.startsWith(`#`))continue;let i=r.indexOf(`=`),a=i>0?r.slice(0,i).trim():``;if(!a)return{env:t,error:`Line ${e+1}: write it as KEY=value.`};if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(a))return{env:t,error:`Line ${e+1}: “${a}” is not a valid variable name.`};t[a]=r.slice(i+1).trim()}return{env:t,error:null}}function q({repo:e,saveLabel:t=`Save`,onSaved:n}){let r=S(),i={command:e.previewConfig.command??``,env:G(e.previewConfig.env)},[a,o]=(0,O.useState)(i.command),[s,c]=(0,O.useState)(i.env),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(null);(0,O.useEffect)(()=>{o(i.command),c(i.env)},[i.command,i.env]);let p=a.trim()!==i.command||s.trim()!==i.env,m=e.preview.status===`unconfigured`,h=F(K(s).env);return(0,R.jsxs)(`form`,{className:`preview-form`,onSubmit:async t=>{t.preventDefault();let r=K(s);if(r.error)return f(r.error);let i=I(r.env);if(i)return f(i);f(null),u(!0);try{await b.updateRepo(e.id,{previewCommand:a.trim()||null,previewEnv:r.env}),n?.()}catch(e){f(e.message)}finally{u(!1)}},children:[(0,R.jsxs)(`label`,{className:`field`,children:[(0,R.jsx)(`span`,{children:(0,R.jsx)(x,{children:`Run command`})}),(0,R.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:r(m?`e.g. python -m http.server {port}`:`Auto-detected: npm run dev, else npm start, else npm run preview`),spellCheck:!1})]}),(0,R.jsxs)(`label`,{className:`field`,children:[(0,R.jsx)(`span`,{children:(0,R.jsx)(x,{children:`Environment (KEY=value, one per line)`})}),(0,R.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),rows:3,placeholder:`API_URL=http://localhost:{port}/api
|
|
3
|
-
DATA_DIR={tmp}`,spellCheck:!1})]}),(0,R.jsxs)(`p`,{className:`muted small`,children:[(0,R.jsx)(x,{children:`Runs from the repo root in the floor’s own preview worktree.`}),` `,(0,R.jsx)(`code`,{children:`{port}`}),` `,r(`is this floor’s port ({port}) and`,{port:e.preview.port}),` `,(0,R.jsx)(`code`,{children:`PORT`}),` `,(0,R.jsx)(x,{children:`is always set;`}),` `,(0,R.jsx)(`code`,{children:`{tmp}`}),` `,(0,R.jsx)(x,{children:`is a scratch folder.`}),!m&&r(` Leave the command empty to use the auto-detected npm script.`)]}),h>12800&&(0,R.jsx)(`p`,{className:`muted small`,children:r(`Environment: {count} of {max} characters (each variable counts as KEY=value).`,{count:h.toLocaleString(),max:16e3.toLocaleString()})}),d&&(0,R.jsxs)(`div`,{className:`term-error`,children:[`⚠️ `,d]}),(0,R.jsxs)(`div`,{className:`row`,children:[(0,R.jsx)(`button`,{className:`btn btn-small btn-good`,disabled:l||!p&&!n||m&&!a.trim(),children:r(l?`Saving…`:t)}),p&&(0,R.jsx)(`button`,{type:`button`,className:`btn btn-small btn-ghost`,onClick:()=>{o(i.command),c(i.env),f(null)},children:(0,R.jsx)(x,{children:`Undo changes`})})]})]})}var J=`allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads allow-pointer-lock`;function Y({repo:e,preview:t,label:n,src:r,width:i,reloads:a,busy:o,onStart:s,frameRef:c,compact:l}){let u=S(),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(!1),[h,g]=(0,O.useState)(!1),_=t.status===`running`&&!!r,v=`${r}|${t.startedAt}|${a}`;if((0,O.useEffect)(()=>{if(f(!1),m(!1),!_)return;let e=setTimeout(()=>m(!0),U);return()=>clearTimeout(e)},[v,_]),_)return(0,R.jsxs)(`div`,{className:`app-stage ${i===`phone`?`app-stage-phone`:``}`,children:[(0,R.jsx)(`iframe`,{ref:c,className:`app-frame`,src:r,title:u(`{repo} app ({label})`,{repo:e.fullName.split(`/`)[1],label:n}),sandbox:J,allow:`clipboard-read; clipboard-write; fullscreen; autoplay`,onLoad:()=>f(!0),onError:()=>m(!0)},v),p&&!d&&(0,R.jsxs)(`div`,{className:`app-frame-hint`,role:`status`,children:[(0,R.jsx)(`b`,{children:(0,R.jsx)(x,{children:`The app isn’t showing up here.`})}),` `,(0,R.jsx)(x,{children:`It may refuse to be shown inside another page (X-Frame-Options or a CSP frame-ancestors rule).`}),` `,(0,R.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,children:(0,R.jsx)(x,{children:`Open it in a new tab ↗`})})]})]});if(B.includes(t.status)){let e=V.findIndex(e=>e.status===t.status);return(0,R.jsxs)(`div`,{className:`app-state ${l?`app-state-compact`:``}`,role:`status`,children:[(0,R.jsx)(`div`,{className:`app-state-icon app-spin`,children:`⚙️`}),(0,R.jsx)(`h3`,{children:u(`Starting {label}…`,{label:n})}),(0,R.jsx)(`ol`,{className:`app-steps`,children:V.map((n,r)=>(0,R.jsxs)(`li`,{className:r<e?`app-step-done`:r===e?`app-step-now`:``,children:[r<e?`✓`:r===e?`●`:`○`,` `,u(n.label),n.status===`starting`&&t.port?u(` on port {port}`,{port:t.port}):``]},n.status))}),t.logTail.length>0&&(0,R.jsx)(`pre`,{className:`term app-log`,children:t.logTail.slice(-8).join(`
|
|
4
|
-
`)})]})}return t.status===`error`?(0,R.jsxs)(`div`,{className:`app-state app-state-left ${l?`app-state-compact`:``}`,children:[(0,R.jsx)(`h3`,{children:u(`⚠️ {label} didn’t run`,{label:n})}),(0,R.jsx)(`div`,{className:`term-error`,children:t.error??u(`The app stopped unexpectedly.`)}),(0,R.jsx)(`pre`,{className:`term app-log`,"aria-label":u(`Last output`),children:t.logTail.length?t.logTail.join(`
|
|
5
|
-
`):u(`(no output)`)}),(0,R.jsxs)(`div`,{className:`row wrap`,children:[(0,R.jsx)(`button`,{className:`btn btn-good`,disabled:o,onClick:s,children:(0,R.jsx)(x,{children:`↻ Try again`})}),(0,R.jsx)(`button`,{className:`btn`,"aria-expanded":h,onClick:()=>g(e=>!e),children:(0,R.jsx)(x,{children:`⚙️ Run settings`})})]}),h&&(0,R.jsx)(q,{repo:e})]}):t.status===`unconfigured`?(0,R.jsxs)(`div`,{className:`app-state app-state-left`,children:[(0,R.jsx)(`h3`,{children:(0,R.jsx)(x,{children:`🛠️ How should the office run this app?`})}),(0,R.jsxs)(`p`,{className:`muted`,children:[t.error??u(`This floor has no package.json to fall back on.`),` `,(0,R.jsx)(x,{children:`Give it a command that serves the app on the floor’s port.`})]}),(0,R.jsx)(q,{repo:e,saveLabel:`Save & start`,onSaved:s})]}):(0,R.jsxs)(`div`,{className:`app-state ${l?`app-state-compact`:``}`,children:[(0,R.jsx)(`div`,{className:`app-state-icon`,children:`🖥️`}),(0,R.jsx)(`h3`,{children:u(`{label} isn’t running`,{label:n})}),(0,R.jsx)(`p`,{className:`muted`,children:t.pr?u(`Start it to try the PR’s head right here, beside {branch}. It runs from a worktree of its own and stops after a while unwatched.`,{branch:e.defaultBranch}):u(`Start it to use it right here. It runs from the floor’s own preview worktree on port {port}.`,{port:t.port})}),(0,R.jsx)(`button`,{className:`btn btn-good`,disabled:o,onClick:s,children:u(`▶ Start {label}`,{label:n})}),!t.pr&&!l&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{className:`btn btn-ghost btn-small`,"aria-expanded":h,onClick:()=>g(e=>!e),children:(0,R.jsx)(x,{children:`⚙️ Run settings`})}),h&&(0,R.jsx)(`div`,{className:`app-state-left app-settings`,children:(0,R.jsx)(q,{repo:e})})]})]})}function te({repo:e,channel:t,onPick:n}){let r=S(),i=_(e=>e.prPreviews),o=_(e=>e.qa),c=s(e.pulls);return(0,R.jsxs)(`div`,{className:`channels`,role:`tablist`,"aria-label":r(`Channels`),children:[(0,R.jsxs)(`button`,{role:`tab`,"aria-selected":t==null,className:`channel ${t==null?`channel-on`:``}`,onClick:()=>n(null),title:r(`The floor’s app on {branch}`,{branch:e.defaultBranch}),children:[(0,R.jsx)(`span`,{className:`led led-${d(e.preview.status)}`,"aria-hidden":!0}),` `,e.defaultBranch]}),c.map(r=>{let s=a(r,o[g(e.id,r.number)]);return(0,R.jsxs)(`button`,{role:`tab`,"aria-selected":t===r.number,className:`channel ${t===r.number?`channel-on`:``}`,onClick:()=>n(r.number),title:s,children:[(0,R.jsx)(`span`,{className:`led led-${d(i[g(e.id,r.number)]?.status)}`,"aria-hidden":!0}),` `,s]},r.number)}),c.length===0&&(0,R.jsx)(`span`,{className:`muted small channels-empty`,children:r(`No open PRs: each one gets a channel here, to try it running beside {branch}.`,{branch:e.defaultBranch})})]})}var X={passing:`✅ passing`,failing:`❌ failing`,pending:`⏳ running`,none:`none`},Z={pass:`✅`,fail:`❌`,skip:`⏭️`};function ne({repo:e,pull:t,qa:n}){let r=S(),i=n?.shots??[];return(0,R.jsxs)(`aside`,{className:`qa-side`,"aria-label":r(`PR #{number}: checks and QA`,{number:t.number}),children:[(0,R.jsxs)(`h4`,{className:`qa-side-title`,children:[(0,R.jsxs)(`a`,{href:t.url,target:`_blank`,rel:`noreferrer`,children:[`PR #`,t.number,` ↗`]}),` `,t.title]}),(0,R.jsxs)(`div`,{className:`qa-side-meta small`,children:[(0,R.jsxs)(`span`,{children:[`+`,t.additions,` −`,t.deletions]}),(0,R.jsxs)(`a`,{href:`${t.url}/checks`,target:`_blank`,rel:`noreferrer`,children:[(0,R.jsx)(x,{children:`Checks:`}),` `,r(X[t.checks])]}),t.isDraft&&(0,R.jsx)(`span`,{children:(0,R.jsx)(x,{children:`draft`})})]}),t.failedChecks.length>0&&(0,R.jsx)(`ul`,{className:`qa-failed small`,children:t.failedChecks.map(e=>(0,R.jsx)(`li`,{children:e.url?(0,R.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:[`❌ `,e.name]}):`❌ ${e.name}`},e.name))}),n?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`qa-side-status`,children:[(0,R.jsx)(`span`,{className:`qa-badge qa-badge-${n.status}`,children:(0,R.jsx)(x,{children:n.managerRequested&&(n.status===`failed`||n.status===`fixing`)?`Manager-requested changes`:u[n.status]})}),(0,R.jsx)(`span`,{className:`muted small`,children:r(`round {number}`,{number:n.round})}),n.commentUrl&&(0,R.jsx)(`a`,{className:`small`,href:n.commentUrl,target:`_blank`,rel:`noreferrer`,children:(0,R.jsx)(x,{children:`Full report ↗`})})]}),n.summary?(0,R.jsx)(C,{className:`qa-summary`,text:n.summary}):(0,R.jsx)(`p`,{className:`muted small`,children:r(n.status===`testing`?`QA is testing it now.`:`No QA report yet.`)}),n.checks.length>0&&(0,R.jsx)(`ul`,{className:`qa-checks`,children:n.checks.map((e,t)=>(0,R.jsxs)(`li`,{className:`qa-check qa-check-${e.result}`,children:[(0,R.jsx)(`span`,{"aria-label":r(e.result),children:Z[e.result]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`b`,{children:e.name}),e.details&&(0,R.jsx)(`div`,{className:`muted small`,children:e.details})]})]},t))}),i.length>0&&(0,R.jsx)(`div`,{className:`qa-shots`,children:i.map((r,i)=>{let a=m(e.id,t.number,i,n.updatedAt);return(0,R.jsxs)(`a`,{className:`qa-shot`,href:a,target:`_blank`,rel:`noreferrer`,title:r.page??r.caption,children:[(0,R.jsx)(`img`,{src:a,alt:r.caption,loading:`lazy`}),(0,R.jsx)(`span`,{className:`small`,children:r.caption})]},i)})})]}):(0,R.jsx)(`p`,{className:`muted small`,children:(0,R.jsx)(x,{children:`QA hasn’t tested this PR yet.`})})]})}var Q=!0;function $(e,t,n,r){let[i,a]=(0,O.useState)(null);return(0,O.useEffect)(()=>{if(a(null),!r||n.status!==`running`)return;let i=!0;return b.previewSync(e,t).then(e=>i&&a(e.url)).catch(()=>void 0),()=>{i=!1}},[e,t,r,n.status,n.startedAt]),i}function re({repo:e,main:t,pr:n,width:r,reloads:i,busy:a,onStartMain:o,onStartPr:s}){let c=S(),[u,d]=(0,O.useState)(`/`),[m,g]=(0,O.useState)(`/`),[_,v]=(0,O.useState)(0),[b,C]=(0,O.useState)(Q),[w,T]=(0,O.useState)({main:null,pr:null}),E={main:(0,O.useRef)(null),pr:(0,O.useRef)(null)},D=(0,O.useRef)({main:0,pr:0}),k=(0,O.useRef)(l()),A={main:$(e.id,null,t,b),pr:$(e.id,n.pr,n,b)};(0,O.useEffect)(()=>{let e=e=>{let t=e.data;if(!t||t.cubefarmSync!==`scroll`&&t.cubefarmSync!==`path`)return;let n=e.source&&e.source===E.main.current?.contentWindow?`main`:e.source&&e.source===E.pr.current?.contentWindow?`pr`:null;if(!n)return;let r=n===`main`?`pr`:`main`;if(typeof t.path==`string`&&T(e=>e[n]===t.path?e:{...e,[n]:t.path}),!b)return;let i=E[r].current?.contentWindow,a=Date.now();t.cubefarmSync===`scroll`&&a>D.current[n]?(D.current[r]=a+250,i?.postMessage({cubefarmSyncTo:`scroll`,x:t.x,y:t.y},`*`)):t.cubefarmSync===`path`&&typeof t.path==`string`&&h(k.current,n,t.path,a)&&i?.postMessage({cubefarmSyncTo:`path`,path:t.path},`*`)};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[b]);let j=(e,t)=>e.url?y(p(b&&A[t]||e.url,location),u):null,M=(t,n)=>(0,R.jsxs)(`div`,{className:`compare-label`,children:[(0,R.jsx)(`b`,{children:n===`main`?e.defaultBranch:t.ref}),t.commit&&(0,R.jsx)(`code`,{children:t.commit}),w[n]&&(0,R.jsx)(`span`,{className:`muted`,children:w[n]}),b&&w[n]!==null&&(0,R.jsx)(`span`,{className:`compare-synced`,children:(0,R.jsx)(x,{children:`⇅ synced`})})]});return(0,R.jsxs)(`div`,{className:`compare`,children:[(0,R.jsxs)(`form`,{className:`compare-bar`,onSubmit:e=>{e.preventDefault();let t=f(m);g(t),d(t),v(e=>e+1)},children:[(0,R.jsxs)(`label`,{className:`compare-path`,children:[(0,R.jsx)(`span`,{className:`muted small`,children:(0,R.jsx)(x,{children:`Path`})}),(0,R.jsx)(`input`,{value:m,onChange:e=>g(e.target.value),spellCheck:!1,"aria-label":c(`Path to open on both sides`)})]}),(0,R.jsx)(`button`,{className:`btn btn-small`,children:(0,R.jsx)(x,{children:`Open on both`})}),(0,R.jsxs)(`label`,{className:`toggle small`,title:c(`Shows each side through the office so it can follow the other’s scrolling and links. Works for plain web pages that scroll the page itself.`),children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:b,onChange:e=>{Q=e.target.checked,C(e.target.checked),T({main:null,pr:null}),k.current=l()}}),` `,(0,R.jsx)(x,{children:`Sync scrolling`})]})]}),(0,R.jsxs)(`div`,{className:`compare-sides`,children:[(0,R.jsxs)(`div`,{className:`compare-side`,children:[M(t,`main`),(0,R.jsx)(Y,{repo:e,preview:t,label:e.defaultBranch,src:j(t,`main`),width:r,reloads:i+_,busy:a,onStart:o,frameRef:E.main,compact:!0})]}),(0,R.jsxs)(`div`,{className:`compare-side`,children:[M(n,`pr`),(0,R.jsx)(Y,{repo:e,preview:n,label:n.ref??c(`the PR`),src:j(n,`pr`),width:r,reloads:i+_,busy:a,onStart:s,frameRef:E.pr,compact:!0})]})]})]})}var ie=!1,ae=!0;function oe({repoId:e,pr:t}){let n=S(),r=_(t=>t.repos.find(t=>t.id===e)),i=_(e=>e.prPreviews),a=_(e=>e.qa),o=j(e),[s,l]=(0,O.useState)(H),[u,d]=(0,O.useState)(ie),[f,m]=(0,O.useState)(ae),[h,y]=(0,O.useState)(!1),[C,k]=(0,O.useState)(0),[A,N]=(0,O.useState)(!1),P=T(E()),F=(0,O.useRef)(null);if((0,O.useEffect)(()=>{t!==void 0&&M(e,t)},[e,t]),ee(e,o),(0,O.useEffect)(()=>{F.current?.querySelector(`button`)?.focus()},[]),(0,O.useEffect)(()=>{v(location)||navigator.serviceWorker?.register(`/preview/sw.js`,{scope:`/preview/`}).catch(()=>void 0)},[]),!r)return(0,R.jsx)(w,{title:`App`,children:(0,R.jsx)(`p`,{className:`muted`,children:(0,R.jsx)(x,{children:`This floor no longer exists.`})})});let I=async e=>{y(!0);try{await e()}catch{}finally{y(!1)}},L=r.preview,z=o==null?null:c(i[g(r.id,o)],o),V=z??L,U=o==null?void 0:r.pulls.find(e=>e.number===o),G=()=>I(()=>b.startPreview(r.id)),K=(e=!1)=>o!=null&&I(()=>b.startPrPreview(r.id,o,e)),q=e=>{H=e,l(e)},J=B.includes(V.status),X=o==null?r.defaultBranch:`PR #${o}`,Z=r.fullName.split(`/`)[1],Q=u&&z!=null;return(0,R.jsxs)(w,{wide:!0,className:`panel-app`,accent:r.color,title:(0,R.jsxs)(`span`,{className:`app-title`,children:[(0,R.jsxs)(`span`,{className:`app-title-name`,children:[`🖥️ `,Z]}),(0,R.jsx)(W,{status:V.status}),V.ref&&V.status!==`stopped`&&V.status!==`unconfigured`&&(0,R.jsxs)(`span`,{className:`muted small app-title-ref`,children:[V.ref,V.commit?` · ${V.commit}`:``]})]}),children:[(0,R.jsxs)(`div`,{ref:F,children:[(0,R.jsx)(te,{repo:r,channel:o,onPick:e=>M(r.id,e)}),(0,R.jsxs)(`div`,{className:`app-toolbar`,role:`toolbar`,"aria-label":n(`App controls`),children:[(0,R.jsx)(`button`,{className:`btn btn-small`,disabled:P,"aria-expanded":A||P,onClick:()=>N(e=>!e),children:(0,R.jsx)(x,{children:`📱 Phone access`})}),J?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`button`,{className:`btn btn-small`,disabled:h,onClick:()=>void(o==null?G():K(!0)),title:n(o==null?`Restart {label}`:`Restart {label} from the PR’s latest commit`,{label:X}),children:(0,R.jsx)(x,{children:`↻ Restart`})}),(0,R.jsx)(`button`,{className:`btn btn-small btn-bad`,disabled:h,onClick:()=>void I(()=>o==null?b.stopPreview(r.id):b.stopPrPreview(r.id,o)),children:(0,R.jsx)(x,{children:`■ Stop`})})]}):(0,R.jsx)(`button`,{className:`btn btn-small btn-good`,disabled:h||V.status===`unconfigured`,onClick:()=>void(o==null?G():K()),children:(0,R.jsx)(x,{children:`▶ Start`})}),z&&(0,R.jsx)(`button`,{className:`btn btn-small ${Q?`btn-on`:``}`,"aria-pressed":Q,onClick:()=>{ie=!u,d(!u)},title:n(`{branch} on the left, PR #{number} on the right`,{branch:r.defaultBranch,number:o??`?`}),children:n(`⇆ Compare with {branch}`,{branch:r.defaultBranch})}),(0,R.jsx)(`button`,{className:`btn btn-small`,disabled:V.status!==`running`&&!(Q&&L.status===`running`),onClick:()=>k(e=>e+1),title:n(`Reload the app`),children:(0,R.jsx)(x,{children:`⟳ Reload`})}),(0,R.jsxs)(`div`,{className:`seg`,role:`group`,"aria-label":n(`Viewport width`),children:[(0,R.jsx)(`button`,{className:`seg-btn ${s===`desktop`?`seg-on`:``}`,"aria-pressed":s===`desktop`,onClick:()=>q(`desktop`),children:`🖥 Desktop`}),(0,R.jsx)(`button`,{className:`seg-btn ${s===`phone`?`seg-on`:``}`,"aria-pressed":s===`phone`,onClick:()=>q(`phone`),title:n(`390px wide`),children:(0,R.jsx)(x,{children:`📱 Phone`})})]}),(0,R.jsx)(`span`,{className:`spacer`}),z&&(0,R.jsx)(`button`,{className:`btn btn-small ${f?`btn-on`:``}`,"aria-pressed":f,onClick:()=>{ae=!f,m(!f)},children:`📋 QA`}),V.url&&!P?(0,R.jsx)(`a`,{className:`btn btn-small`,href:p(V.url,location),target:`_blank`,rel:`noreferrer`,children:(0,R.jsx)(x,{children:`Open in new tab ↗`})}):(0,R.jsx)(`button`,{className:`btn btn-small`,disabled:!0,children:(0,R.jsx)(x,{children:`Open in new tab ↗`})})]})]}),(A||P)&&(0,R.jsx)(D,{blocked:P}),(0,R.jsxs)(`div`,{className:`app-body`,children:[(0,R.jsx)(`div`,{className:`app-main`,children:P?(0,R.jsx)(`p`,{className:`muted`,children:(0,R.jsx)(x,{children:`The preview is hidden until this browser can route its assets securely. Your running app has not been stopped.`})}):Q?(0,R.jsx)(re,{repo:r,main:L,pr:z,width:s,reloads:C,busy:h,onStartMain:()=>void G(),onStartPr:()=>void K()}):(0,R.jsx)(Y,{repo:r,preview:V,label:X,src:V.url&&p(V.url,location),width:s,reloads:C,busy:h,onStart:()=>void(o==null?G():K())})}),z&&f&&U&&(0,R.jsx)(ne,{repo:r,pull:U,qa:a[g(r.id,U.number)]})]}),V.status===`running`&&(0,R.jsxs)(`p`,{className:`muted small app-foot`,children:[(0,R.jsx)(x,{children:`Blank, or “refused to connect”? The app may block being framed: use`}),` `,(0,R.jsx)(`b`,{children:(0,R.jsx)(x,{children:`Open in new tab`})}),`. `,(0,R.jsx)(x,{children:`Keys typed in the app stay in the app, so`}),` `,(0,R.jsx)(`kbd`,{children:`Esc`}),` `,(0,R.jsx)(x,{children:`only closes this panel when focus is outside it;`}),` `,(0,R.jsx)(`b`,{children:`✕`}),` `,(0,R.jsx)(x,{children:`always does.`}),z&&n(` A PR preview stops after a while with nobody watching it, and when its PR merges or closes.`)]})]})}export{M as a,q as i,L as n,j as o,W as r,oe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{f as r}from"./bloomMarks-DariC6lY.js";import{a as i}from"./director-CrzFgnoP.js";import{i as a,r as o}from"./Office-BBnd6tyn.js";import{a as s,i as c,l,n as u,o as d,r as f}from"./kit-C6ByUQ-Y.js";var p=n(e(),1),m=t(),h=10,g=[[`#e63946`,`#f1faee`,`#ffb703`],[`#2a9d8f`,`#e9c46a`,`#f4a261`],[`#7209b7`,`#f72585`,`#4cc9f0`]];function _({run:e,elevation:t}){let n=(0,p.useRef)(null),_=(0,p.useRef)(null),v=d(e.side),y=(0,p.useMemo)(()=>{let n=i(e.seed);return{dir:n()<.5?1:-1,x:v*(105+n()*35),y:u(t)+18+n()*8,palette:g[Math.floor(n()*g.length)],burns:{next:3+n()*3,until:0}}},[e.seed,v,t]);return r(()=>{let r=e.t,i=n.current;if(!i)return;let l=r/e.seconds,u=y.x+Math.sin(r*.13)*4,d=y.y+l*12+Math.sin(r*.4)*.8,f=s(-y.dir*160,y.dir*160,l);if(i.position.set(u,d,f),i.rotation.z=Math.sin(r*.5)*.04,i.rotation.y=r*.05,r>=y.burns.next){y.burns.until=r+1.4,y.burns.next=r+6+Math.random()*5;let n=o(u,d-t,f,90);a(`burner`,{gain:n.gain*c(r,e.seconds,4),pan:n.pan})}if(_.current){let e=r<y.burns.until;_.current.visible=e,e&&_.current.scale.set(1,.8+Math.sin(r*40)*.25,1)}}),(0,m.jsxs)(`group`,{ref:n,children:[Array.from({length:h},(e,t)=>(0,m.jsx)(`mesh`,{material:l(y.palette[t%y.palette.length]),position:[0,15,0],scale:[1,1.15,1],children:(0,m.jsx)(`sphereGeometry`,{args:[9,3,14,t*Math.PI*2/h,Math.PI*2/h]})},t)),(0,m.jsx)(`mesh`,{material:l(y.palette[0],{side:2}),position:[0,4.6,0],children:(0,m.jsx)(`cylinderGeometry`,{args:[4.4,1.4,4,16,1,!0]})}),[0,1,2,3].map(e=>{let t=e*Math.PI/2+Math.PI/4;return(0,m.jsx)(`mesh`,{material:l(`#6b4a33`),position:[Math.cos(t)*1.1,1.5,Math.sin(t)*1.1],children:(0,m.jsx)(`cylinderGeometry`,{args:[.04,.04,2.4,4]})},e)}),(0,m.jsx)(`mesh`,{material:l(`#a1683a`),position:[0,-.3,0],children:(0,m.jsx)(`boxGeometry`,{args:[2,1.3,2]})}),(0,m.jsx)(`mesh`,{ref:_,material:f(`#ffb347`,{add:!0}),position:[0,3.1,0],visible:!1,children:(0,m.jsx)(`coneGeometry`,{args:[.5,2.2,10]})})]})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{ba as r}from"./store-FA83kfnc.js";import{Bt as i,F as a,f as o,gt as s,tt as c}from"./bloomMarks-DariC6lY.js";import{a as l}from"./director-CrzFgnoP.js";import{i as u,n as d,r as f}from"./Office-BBnd6tyn.js";import{a as p,i as m,l as h,n as g,o as _}from"./kit-C6ByUQ-Y.js";var v=n(e(),1),y=t(),b=26,x=new i(1,1,1),S=22;function C({run:e,elevation:t}){let n=(0,v.useRef)(null),C=(0,v.useRef)(null),w=(0,v.useRef)(null),T=_(e.side),E=(0,v.useMemo)(()=>{let n=l(e.seed),i=n()<.5?1:-1,a=Array.from({length:b},()=>({dx:(n()-.5)*5,dy:(n()-.5)*3.5,dz:(n()-.5)*11,phase:n()*6.28,rate:10+n()*4,wob:n()*6.28}));return{dir:i,x:T*(r+7+n()*5),y:g(t)+1+n()*2.5,birds:a}},[e.seed,T,t]),D=(0,v.useMemo)(()=>({body:new c,wing:new c,tmp:new c,q:new s,e:new a,p:new i,shape:new i(1,.85,1.8),chirpAt:1}),[]),O=(0,v.useMemo)(()=>({flap:null}),[]);(0,v.useEffect)(()=>(O.flap=d(`flap`),()=>O.flap?.stop(.6)),[O]),o(()=>{let r=e.t,i=n.current,a=C.current,o=w.current;if(!i||!a||!o)return;let s=Math.min(1,r/S),c=p(-E.dir*95,E.dir*95,s),l=E.y+Math.sin(s*Math.PI*2)*2.5,d=E.x-T*Math.sin(s*Math.PI)*3,h=E.dir>0?0:Math.PI;for(let e=0;e<b;e++){let t=E.birds[e],n=Math.sin(r*1.7+t.wob);D.p.set(d+t.dx+n*.6,l+t.dy+Math.sin(r*2.3+t.wob)*.5,c+t.dz),D.e.set(.08*n,h+.15*n,.2*n),D.q.setFromEuler(D.e),D.body.compose(D.p,D.q,D.shape),i.setMatrixAt(e,D.body),D.body.compose(D.p,D.q,x);let s=.15+Math.sin(r*t.rate+t.phase)*.55;D.wing.makeRotationZ(-s).premultiply(D.body),a.setMatrixAt(e,D.wing.multiply(D.tmp.makeTranslation(-.26,0,0))),D.wing.makeRotationZ(s).premultiply(D.body),o.setMatrixAt(e,D.wing.multiply(D.tmp.makeTranslation(.26,0,0)))}i.instanceMatrix.needsUpdate=!0,a.instanceMatrix.needsUpdate=!0,o.instanceMatrix.needsUpdate=!0;let g=f(d,l-t,c,25),_=m(r,24,2);O.flap?.set(g.gain*_,g.pan),r>=D.chirpAt&&r<S&&(D.chirpAt=r+.7+Math.random()*1.6,u(`chirps`,{gain:g.gain*_,pan:g.pan+(Math.random()-.5)*.4}))});let k=h(`#3d405b`);return(0,y.jsxs)(`group`,{children:[(0,y.jsx)(`instancedMesh`,{ref:n,args:[void 0,void 0,b],material:k,frustumCulled:!1,children:(0,y.jsx)(`sphereGeometry`,{args:[.1,8,6]})}),(0,y.jsx)(`instancedMesh`,{ref:C,args:[void 0,void 0,b],material:k,frustumCulled:!1,children:(0,y.jsx)(`boxGeometry`,{args:[.48,.015,.16]})}),(0,y.jsx)(`instancedMesh`,{ref:w,args:[void 0,void 0,b],material:k,frustumCulled:!1,children:(0,y.jsx)(`boxGeometry`,{args:[.48,.015,.16]})})]})}export{C as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{p as r}from"./store-FA83kfnc.js";import{Ct as i,f as a,pt as o,st as s,w as c}from"./bloomMarks-DariC6lY.js";import{a as l}from"./director-CrzFgnoP.js";import{n as u,r as d}from"./Office-BBnd6tyn.js";import{a as f,i as p,l as m,n as h,o as g}from"./kit-C6ByUQ-Y.js";import{t as _}from"./news-CrPol-gz.js";var v=n(e(),1),y=t(),b={w:46,h:6,segments:40};function x(e){let t=document.createElement(`canvas`);t.width=2048,t.height=256;let n=t.getContext(`2d`);n.fillStyle=`#fffaf0`,n.fillRect(0,0,t.width,t.height),n.strokeStyle=`#e63946`,n.lineWidth=18,n.strokeRect(9,9,t.width-18,t.height-18),n.fillStyle=`#1f1d2b`,n.textAlign=`center`,n.textBaseline=`middle`;let r=170;do n.font=`bold ${r}px "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", sans-serif`;while(n.measureText(e).width>t.width-120&&(r-=8)>60);n.fillText(e,t.width/2,t.height/2+8);let a=new c(t);return a.colorSpace=i,a.anisotropy=8,a}function S({run:e,elevation:t}){let n=(0,v.useRef)(null),i=(0,v.useRef)(null),c=g(e.side),S=(0,v.useMemo)(()=>{let n=l(e.seed),i=r.getState(),a=_(i.repos,Date.now(),i.settings.companyName,n()),o=n()<.5?1:-1,s=-c*o*Math.PI/2;return{dir:o,x:c*(95+n()*20),y:h(t)+11+n()*5,text:a,turn:s,along:-Math.sin(s)}},[e.seed,c,t]),C=(0,v.useMemo)(()=>{let e=new o(b.w,b.h,b.segments,1),t=Float32Array.from(e.attributes.position.array),n=x(S.text);return{geo:e,base:t,map:n,mat:new s({map:n,side:2,fog:!1})}},[S.text]);(0,v.useEffect)(()=>()=>{C.geo.dispose(),C.map.dispose(),C.mat.dispose()},[C]);let w=(0,v.useMemo)(()=>({engine:null}),[]);(0,v.useEffect)(()=>(w.engine=u(`engine`),()=>w.engine?.stop(1.2)),[w]),a(()=>{let r=e.t,a=n.current;if(!a)return;let o=f(-S.dir*200,S.dir*200,r/e.seconds),s=S.y+Math.sin(r*.35)*.7;a.position.set(S.x,s,o),a.rotation.y=S.dir>0?0:Math.PI,a.rotation.x=Math.sin(r*.3)*.02;let c=i.current?.children;if(c)for(let e=0;e<c.length;e++)c[e].rotation.z=r*14;let l=C.geo.attributes.position,u=l.array;for(let e=0;e<l.count;e++){let t=.5-C.base[e*3]*S.along/b.w;u[e*3+2]=Math.sin(r*3.2-t*7)*t*1.1}l.needsUpdate=!0;let m=d(S.x,s-t,o,110);w.engine?.set(m.gain*p(r,e.seconds,4),m.pan)});let T=m(`#dfe3ea`),E=m(`#e63946`);return(0,y.jsxs)(`group`,{ref:n,children:[(0,y.jsx)(`mesh`,{material:T,scale:[6,6,21],children:(0,y.jsx)(`sphereGeometry`,{args:[1,24,16]})}),(0,y.jsx)(`mesh`,{material:E,scale:[6.05,1.1,18],position:[0,.2,0],children:(0,y.jsx)(`sphereGeometry`,{args:[1,24,8]})}),[0,1,2,3].map(e=>(0,y.jsx)(`mesh`,{material:E,position:[0,0,-18],"rotation-z":e*Math.PI/2,children:(0,y.jsx)(`boxGeometry`,{args:[.4,9,4]})},e)),(0,y.jsx)(`mesh`,{material:m(`#495057`),position:[0,-6.4,2],children:(0,y.jsx)(`boxGeometry`,{args:[2.2,1.6,5]})}),(0,y.jsx)(`group`,{ref:i,children:[-1.6,1.6].map(e=>(0,y.jsx)(`mesh`,{material:m(`#2b2d42`),position:[e,-6.4,-.8],children:(0,y.jsx)(`boxGeometry`,{args:[.2,2.6,.12]})},e))}),(0,y.jsx)(`mesh`,{material:m(`#2b2d42`),position:[0,-3,-26],"rotation-x":Math.PI/2-.25,children:(0,y.jsx)(`cylinderGeometry`,{args:[.05,.05,12,4]})}),(0,y.jsx)(`mesh`,{geometry:C.geo,material:C.mat,position:[0,-5,-32-b.w/2],"rotation-y":S.turn})]})}export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{f as r}from"./bloomMarks-DariC6lY.js";import{a as i}from"./director-CrzFgnoP.js";import{i as a,r as o}from"./Office-BBnd6tyn.js";import{a as s,i as c,l,n as u,o as d}from"./kit-C6ByUQ-Y.js";var f=n(e(),1),p=t(),m=22;function h({run:e,elevation:t}){let n=(0,f.useRef)(null),h=d(e.side),g=(0,f.useMemo)(()=>{let n=i(e.seed);return{dir:n()<.5?1:-1,x:h*(115+n()*30),y:u(t)+6+n()*6,next:4+n()*4}},[e.seed,h,t]);r(()=>{let r=e.t,i=n.current;if(!i)return;let l=s(-g.dir*175,g.dir*175,r/e.seconds),u=g.y+Math.sin(r*.8)*1.6;if(i.position.set(g.x+Math.sin(r*.21)*6,u,l),i.rotation.set(Math.sin(r*.9)*.05,(g.dir>0?0:Math.PI)+Math.sin(r*.33)*.5,Math.sin(r*.7)*.06),r>=g.next){g.next=r+7+Math.random()*6;let n=o(i.position.x,u-t,l,110);a(`squeak`,{gain:n.gain*c(r,e.seconds,3),pan:n.pan,pitch:.8+Math.random()*.3})}});let _=l(`#ffd23f`),v=l(`#ff8c1a`),y=l(`#1f1d2b`);return(0,p.jsx)(`group`,{ref:n,children:(0,p.jsxs)(`group`,{scale:m,children:[(0,p.jsx)(`mesh`,{material:_,scale:[1,.78,1.25],children:(0,p.jsx)(`sphereGeometry`,{args:[.5,22,16]})}),(0,p.jsx)(`mesh`,{material:_,position:[0,.18,-.6],"rotation-x":-.9,children:(0,p.jsx)(`coneGeometry`,{args:[.2,.4,14]})}),[-1,1].map(e=>(0,p.jsx)(`mesh`,{material:_,position:[e*.44,.08,-.05],scale:[.35,.6,1],children:(0,p.jsx)(`sphereGeometry`,{args:[.3,14,10]})},e)),(0,p.jsx)(`mesh`,{material:_,position:[0,.58,.36],children:(0,p.jsx)(`sphereGeometry`,{args:[.32,20,14]})}),(0,p.jsx)(`mesh`,{material:v,position:[0,.5,.68],scale:[1.1,.42,1],children:(0,p.jsx)(`sphereGeometry`,{args:[.16,14,10]})}),[-1,1].map(e=>(0,p.jsxs)(`group`,{children:[(0,p.jsx)(`mesh`,{material:y,position:[e*.14,.68,.6],children:(0,p.jsx)(`sphereGeometry`,{args:[.05,10,8]})}),(0,p.jsx)(`mesh`,{material:l(`#ffffff`),position:[e*.13,.7,.645],children:(0,p.jsx)(`sphereGeometry`,{args:[.015,6,4]})})]},e))]})})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{Va as r,Vo as i,p as a}from"./store-FA83kfnc.js";import{Bt as o,f as s}from"./bloomMarks-DariC6lY.js";import{a as c}from"./director-CrzFgnoP.js";import{n as l,r as u}from"./Office-BBnd6tyn.js";import{a as d,c as f,i as p,l as m,n as h,o as g,s as _}from"./kit-C6ByUQ-Y.js";var v=n(e(),1),y=t(),b=8,x=19,S={approach:20,over:27,down:31,lift:42,up:46},C=1.62*1.6;function w({run:e,elevation:t}){let n=(0,v.useRef)(null),w=(0,v.useRef)(null),T=(0,v.useRef)(null),E=g(e.side),D=(0,v.useMemo)(()=>{let n=c(e.seed),s=a.getState(),l=s.repos.reduce((e,t)=>Math.max(e,t.floor),0),u=s.floor===-1||n()<.5,d={x:r.x,y:i(l)+C,z:r.z};return{cx:E*(85+n()*20),cz:(n()-.5)*40,radius:42+n()*10,y:h(t)+9+n()*8,dir:n()<.5?1:-1,phase:n()*Math.PI*2,far:{x:E*420,z:(n()-.5)*500},land:u,pad:d,from:new o,fromSet:!1,heading:0}},[e.seed,E,t]),O=(0,v.useMemo)(()=>({rotor:null,prev:new o,first:!0,spin:0}),[]);(0,v.useEffect)(()=>(O.rotor=l(`rotor`),()=>O.rotor?.stop(1)),[O]),s((r,i)=>{let a=e.t,o=n.current;if(!o)return;let s=D.phase+D.dir*(a*Math.PI*2)/x,c=D.cx+Math.cos(s)*D.radius,l=D.cz+Math.sin(s)*D.radius,m=D.y,h=_(a/b),g=_((a-(e.seconds-b))/b);c=d(D.far.x,c,h),l=d(-D.far.z,l,h),m+=(1-h)*40;let v=0;if(D.land&&a>=S.approach&&a<e.seconds-b){D.fromSet||D.from.set(c,m,l),D.fromSet=!0;let e=D.pad.y+14,t=f(a,S.approach,S.over);c=d(D.from.x,D.pad.x,t),l=d(D.from.z,D.pad.z,t),m=d(D.from.y,e,t),m=d(m,D.pad.y,f(a,S.over,S.down)-f(a,S.lift,S.up)),v=f(a,S.down-.5,S.down)*(1-f(a,S.lift,S.lift+1))}D.land&&a>=e.seconds-b&&(c=D.pad.x,l=D.pad.z,m=D.pad.y+14),c=d(c,D.far.x,g),l=d(l,D.far.z,g),m+=g*40,O.first&&O.prev.set(c,m,l),O.first=!1;let y=c-O.prev.x,C=l-O.prev.z;y*y+C*C>1e-5&&(D.heading=Math.atan2(y,C)),o.rotation.y=D.heading;let E=D.land?1-f(a,S.approach,S.approach+3)+f(a,e.seconds-b,e.seconds-b+2):1;o.rotation.z=-D.dir*.22*h*(1-g)*Math.min(1,E),o.rotation.x=.12*(1-v),o.position.set(c,m,l),O.prev.set(c,m,l),O.spin+=Math.min(i,.1)*(31-22*v),w.current&&(w.current.rotation.y=O.spin),T.current&&(T.current.rotation.x=O.spin*1.3);let k=u(c,m-t,l,60);O.rotor?.set(k.gain*p(a,e.seconds,2)*(1-.6*v),k.pan,1-.35*v)});let k=m(`#d62828`),A=m(`#2b2d42`);return(0,y.jsxs)(`group`,{ref:n,scale:1.6,children:[(0,y.jsx)(`mesh`,{material:k,scale:[1,.95,1.5],children:(0,y.jsx)(`sphereGeometry`,{args:[1.6,14,10]})}),(0,y.jsx)(`mesh`,{material:m(`#8ecae6`),position:[0,.35,1.25],scale:[1,.7,.8],children:(0,y.jsx)(`sphereGeometry`,{args:[1.05,12,8]})}),(0,y.jsx)(`mesh`,{material:k,position:[0,.3,-3.2],"rotation-x":Math.PI/2,children:(0,y.jsx)(`cylinderGeometry`,{args:[.28,.45,4.2,8]})}),(0,y.jsx)(`mesh`,{material:m(`#f1faee`),position:[0,1,-5.1],children:(0,y.jsx)(`boxGeometry`,{args:[.15,1.4,.9]})}),(0,y.jsx)(`mesh`,{ref:T,material:A,position:[.2,.9,-5.2],children:(0,y.jsx)(`boxGeometry`,{args:[.05,1.6,.18]})}),[-.9,.9].map(e=>(0,y.jsx)(`mesh`,{material:A,position:[e,-1.55,0],children:(0,y.jsx)(`boxGeometry`,{args:[.12,.12,3.4]})},e)),(0,y.jsx)(`mesh`,{material:A,position:[0,1.55,0],children:(0,y.jsx)(`cylinderGeometry`,{args:[.18,.18,.5,8]})}),(0,y.jsxs)(`group`,{ref:w,position:[0,1.85,0],children:[(0,y.jsx)(`mesh`,{material:A,children:(0,y.jsx)(`boxGeometry`,{args:[11,.06,.35]})}),(0,y.jsx)(`mesh`,{material:A,"rotation-y":Math.PI/2,children:(0,y.jsx)(`boxGeometry`,{args:[11,.06,.35]})})]})]})}export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{Lo as r}from"./store-FA83kfnc.js";import{v as i,y as a}from"./index-B6qvKFYN.js";import{f as o}from"./bloomMarks-DariC6lY.js";import{a as s}from"./director-CrzFgnoP.js";import{o as c}from"./cityLayout-7ckfe3wf.js";import{dn as l,i as u,r as d,un as f}from"./Office-BBnd6tyn.js";import{c as p,l as m,o as h,t as g}from"./kit-C6ByUQ-Y.js";import{n as _}from"./billboardLayout-DSKGXPIM.js";var v=n(e(),1),y=t(),b=70,x=1.15,S=4.6,C=[9,33,62],w=2.6,T=9e4;function E({run:e,elevation:t}){let n=(0,v.useRef)(null),E=(0,v.useRef)(null),D=(0,v.useRef)(null),O=(0,v.useRef)([]),k=(0,v.useRef)([]),A=(0,v.useRef)(null),j=(0,v.useRef)(null),M=h(e.side),N=(0,v.useMemo)(()=>{let t=s(e.seed),n=t()<.5?1:-1,r=f().map((e,t)=>({...e,i:t})).filter(e=>M*e.x>_.max+10&&M*e.x<260&&Math.abs(e.z)<160),i=e=>Math.abs(M*e.x-175)+Math.abs(e.z)*.8;r.sort((e,t)=>i(e)-i(t));let a=r[0]??null,o=a?c():null,l=a&&o?o.cylinders[a.cylinder]:null;return{dir:n,x:a?a.x+M*19:M*190,z0:(a?a.z:(t()-.5)*60)-n*S*40,tower:a,tankR:l?l.w/2:1.5}},[e.seed,M]),P=(0,v.useMemo)(()=>({shake:0,lastStep:-1,roared:-1,knocked:-1,crashed:!1}),[]);(0,v.useEffect)(()=>{let e=N.tower;return()=>{e&&P.knocked>=0?setTimeout(()=>l(e.i,!1),T):e&&l(e.i,!1)}},[N,P]),o(({camera:o},s)=>{let c=e.t,f=n.current;if(!f)return;let m=N.z0+N.dir*S*c,h=c/x*Math.PI,_=0,v=-1;for(let e=0;e<C.length;e++)_=Math.max(_,p(c,C[e],C[e]+.4)*(1-p(c,C[e]+w-.5,C[e]+w))),c>=C[e]&&c<C[e]+.5&&(v=e);let y=1-_*.8;f.position.set(N.x,Math.abs(Math.sin(h))*.7*y,m),f.rotation.set(0,(N.dir>0?0:Math.PI)-M*N.dir*.35,Math.sin(h)*.04*y);for(let e=0;e<2;e++){let t=O.current[e];t&&(t.rotation.x=Math.sin(h+e*Math.PI)*.45*y);let n=k.current[e];n&&(n.rotation.x=-.6-_*1.2+Math.sin(h*2+e)*.15)}A.current&&(A.current.rotation.y=Math.sin(h*.5)*.35);let T=E.current;if(T){let e=N.tower&&P.knocked>=0?p(c,P.knocked+.6,P.knocked+1.4)*(1-p(c,P.knocked+4,P.knocked+5)):0;T.rotation.set(-_*.55+e*.15,-M*N.dir*.3+Math.sin(c*.4)*.25+e*-M*N.dir*.6,e*.25)}D.current&&(D.current.scale.y=.25+_*1.6);let F=Math.floor(c/x);if(F!==P.lastStep&&y>.5){P.lastStep=F;let e=d(N.x,-t,m,200);u(`stomp`,{gain:e.gain,pan:e.pan,pitch:.9+Math.random()*.2}),P.shake=1}if(v>=0&&P.roared!==v){P.roared=v;let e=d(N.x,b*.9-t,m,200);u(`roar`,{gain:e.gain,pan:e.pan})}P.shake*=Math.exp(-6*Math.min(.1,s)),P.shake>.01&&i().cameraShake&&!a()&&r(o.position.x)&&(o.rotation.x+=P.shake*.0035*Math.sin(c*41),o.rotation.z+=P.shake*.0025*Math.sin(c*33));let I=N.tower,L=j.current;if(I&&L&&(P.knocked<0&&N.dir*(m-I.z)>-7&&(P.knocked=c,l(I.i,!0)),L.visible=P.knocked>=0,P.knocked>=0)){let e=g((c-P.knocked)/1.3);if(L.rotation.z=M*Math.PI*.5*e*e-(e>=1?M*.06*Math.sin((c-P.knocked-1.3)*12)*Math.exp(-(c-P.knocked-1.3)*4):0),e>=1&&!P.crashed){P.crashed=!0;let e=d(I.x,I.y-t,I.z,180);u(`crash`,{gain:e.gain,pan:e.pan})}}});let F=m(`#6abf69`),I=m(`#f6e7a1`),L=m(`#ff9f1c`),R=m(`#1f1d2b`),z=m(`#ffffff`);return(0,y.jsxs)(`group`,{children:[(0,y.jsx)(`group`,{ref:n,children:(0,y.jsxs)(`group`,{scale:b,children:[(0,y.jsx)(`mesh`,{material:F,position:[0,.5,0],scale:[1,1.25,1.1],children:(0,y.jsx)(`sphereGeometry`,{args:[.28,20,14]})}),(0,y.jsx)(`mesh`,{material:I,position:[0,.47,.13],scale:[.85,1.15,.7],children:(0,y.jsx)(`sphereGeometry`,{args:[.22,16,12]})}),[0,1].map(e=>(0,y.jsxs)(`group`,{ref:t=>void(O.current[e]=t),position:[e?.13:-.13,.3,0],children:[(0,y.jsx)(`mesh`,{material:F,position:[0,-.14,0],children:(0,y.jsx)(`cylinderGeometry`,{args:[.085,.1,.3,10]})}),(0,y.jsx)(`mesh`,{material:F,position:[0,-.29,.04],scale:[1,.5,1.4],children:(0,y.jsx)(`sphereGeometry`,{args:[.1,10,8]})})]},e)),[0,1].map(e=>(0,y.jsx)(`group`,{ref:t=>void(k.current[e]=t),position:[e?.22:-.22,.64,.1],children:(0,y.jsx)(`mesh`,{material:F,position:[0,-.05,.06],"rotation-x":.6,children:(0,y.jsx)(`capsuleGeometry`,{args:[.035,.1,4,8]})})},e)),(0,y.jsx)(`group`,{ref:A,position:[0,.36,-.24],children:[0,1,2,3].map(e=>(0,y.jsx)(`mesh`,{material:F,position:[0,-e*.05,-.1-e*.12],scale:1-e*.2,children:(0,y.jsx)(`sphereGeometry`,{args:[.12,12,8]})},e))}),[0,1,2,3,4].map(e=>(0,y.jsx)(`mesh`,{material:L,position:[0,.84-e*.12,-.1-e*.06],"rotation-x":-.5-e*.12,scale:1-e*.12,children:(0,y.jsx)(`coneGeometry`,{args:[.05,.12,6]})},e)),(0,y.jsxs)(`group`,{ref:E,position:[0,.86,.1],children:[(0,y.jsx)(`mesh`,{material:F,children:(0,y.jsx)(`sphereGeometry`,{args:[.17,18,14]})}),(0,y.jsx)(`mesh`,{material:F,position:[0,-.04,.15],scale:[1,.72,1.15],children:(0,y.jsx)(`sphereGeometry`,{args:[.11,14,10]})}),[-1,1].map(e=>(0,y.jsxs)(`group`,{children:[(0,y.jsx)(`mesh`,{material:z,position:[e*.075,.06,.12],children:(0,y.jsx)(`sphereGeometry`,{args:[.055,12,10]})}),(0,y.jsx)(`mesh`,{material:R,position:[e*.075,.065,.168],children:(0,y.jsx)(`sphereGeometry`,{args:[.027,10,8]})}),(0,y.jsx)(`mesh`,{material:m(`#ff8fab`),position:[e*.11,-.03,.12],scale:[1,.6,.4],children:(0,y.jsx)(`sphereGeometry`,{args:[.03,8,6]})})]},e)),(0,y.jsx)(`mesh`,{ref:D,material:m(`#7a1f3d`),position:[0,-.08,.255],scale:[1,.25,.5],children:(0,y.jsx)(`sphereGeometry`,{args:[.06,12,8]})})]})]})}),N.tower&&(0,y.jsx)(`group`,{ref:j,position:[N.tower.x-M*N.tankR,N.tower.y,N.tower.z],visible:!1,children:(0,y.jsxs)(`group`,{position:[M*N.tankR,0,0],children:[(0,y.jsx)(`mesh`,{material:m(`#5e4a3c`),position:[0,.8,0],children:(0,y.jsx)(`boxGeometry`,{args:[2.6,1.6,2.6]})}),(0,y.jsx)(`mesh`,{material:m(`#a0704a`),position:[0,3.1,0],children:(0,y.jsx)(`cylinderGeometry`,{args:[1.5,1.5,3,12]})}),(0,y.jsx)(`mesh`,{material:m(`#6b4a33`),position:[0,5.3,0],children:(0,y.jsx)(`coneGeometry`,{args:[1.8,1.4,12]})})]})})]})}export{E as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e,t,u as n}from"./jsx-runtime-BFUkm7bt.js";import{Bt as r,f as i,gt as a}from"./bloomMarks-DariC6lY.js";import{a as o}from"./director-CrzFgnoP.js";import{i as s,r as c}from"./Office-BBnd6tyn.js";import{i as l,n as u,o as d,r as f}from"./kit-C6ByUQ-Y.js";var p=n(e(),1),m=t(),h=14,g=new r(0,1,0);function _({run:e,elevation:t}){let n=(0,p.useRef)(null),_=d(e.side),v=(0,p.useMemo)(()=>({meteors:Array.from({length:h},()=>({born:-10,life:0,x:0,y:0,z:0,dir:new r,speed:0,size:1})),next:1,rnd:o(e.seed),q:new a,back:new r}),[e.seed]);return i(()=>{let r=e.t,i=v.rnd;for(;r>=v.next&&r<e.seconds-3;){let n=v.meteors.find(e=>r-e.born>e.life),a=.9+2.2*Math.exp(-(((r/e.seconds-.55)/.12)**2));if(v.next+=-Math.log(1-i()*.98)/a*1.4,n&&(n.born=r,n.life=.7+i()*.8,n.x=_*(180+i()*140),n.y=u(t)+50+i()*120,n.z=(i()-.5)*420,n.dir.set(-_*i()*.3,-.35-i()*.35,i()<.5?1:-1).normalize(),n.speed=110+i()*80,n.size=.6+i()*.8,i()<.3)){let i=c(n.x,n.y-t,n.z,200);s(`whoosh`,{gain:i.gain*l(r,e.seconds,4),pan:i.pan})}}let a=n.current?.children;if(a)for(let e=0;e<h;e++){let t=v.meteors[e],n=a[e],i=r-t.born;if(n.visible=i>=0&&i<t.life,!n.visible)continue;let o=i/t.life,s=Math.min(i*t.speed,30+t.size*10)*(1-o*.5),c=t.x+t.dir.x*t.speed*i,l=t.y+t.dir.y*t.speed*i,u=t.z+t.dir.z*t.speed*i;n.position.set(c-t.dir.x*s/2,l-t.dir.y*s/2,u-t.dir.z*s/2),n.quaternion.copy(v.q.setFromUnitVectors(g,v.back.copy(t.dir).negate()));let d=t.size*(1-o*o);n.scale.set(d,Math.max(.01,s),d)}}),(0,m.jsx)(`group`,{ref:n,children:Array.from({length:h},(e,t)=>(0,m.jsx)(`mesh`,{material:f(`#dfe9ff`,{opacity:.85,add:!0}),visible:!1,frustumCulled:!1,children:(0,m.jsx)(`coneGeometry`,{args:[.9,1,6,1,!0]})},t))})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e,s as t,t as n,u as r}from"./jsx-runtime-BFUkm7bt.js";import{Xo as i,Yo as a,Zo as o,es as s,hs as c,p as l}from"./store-FA83kfnc.js";import{c as u,l as d,o as f,s as p}from"./index-B6qvKFYN.js";var m=r(t(),1),h=n();function g(){let e=l(e=>e.usage.observations),t=l(e=>e.agents),n=l(e=>e.settings.language),r=p(),i=e=>e===null?r(`Not available`):e.toLocaleString(n,{maximumFractionDigits:6});return(0,h.jsxs)(`details`,{children:[(0,h.jsx)(`summary`,{children:(0,h.jsx)(f,{children:`Observed AI usage`})}),(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`Latest 200 observations. Status rows are cumulative session counters, not additional consumption. Reported costs are not subscription charges or remaining quota.`})}),e?.length?[...e].reverse().map(e=>(0,h.jsxs)(`div`,{className:`card`,style:{overflowWrap:`anywhere`},children:[(0,h.jsxs)(`b`,{children:[e.agentId?t[e.agentId]?.name??e.agentId:`—`,` · `,e.tool]}),(0,h.jsxs)(`div`,{children:[e.provider??r(`Not available`),` / `,e.model??r(`Not available`)]}),(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Input tokens`}),`: `,i(e.input),` · `,(0,h.jsx)(f,{children:`Output tokens`}),`: `,i(e.output)]}),(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Reasoning tokens`}),`: `,i(e.reasoning),` · `,(0,h.jsx)(f,{children:`Cache read / write`}),`: `,i(e.cacheRead),` / `,i(e.cacheWrite)]}),(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Reported cost (USD)`}),`: `,i(e.costUsd),` · `,(0,h.jsx)(f,{children:`Remaining quota`}),`: `,(0,h.jsx)(f,{children:`Not available`})]}),(0,h.jsxs)(`div`,{className:`muted small`,children:[new Date(e.at).toLocaleString(n),` · `,e.source]}),(0,h.jsxs)(`div`,{className:`muted small`,children:[(0,h.jsx)(f,{children:`Last observation`}),`: `,e.observedAt?new Date(e.observedAt).toLocaleString(n):r(`Not available`)]})]},JSON.stringify([e.tool,e.sessionId,e.id]))):(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`No usage observations received yet.`})})]})}function _({resume:e}){let t=l(e=>e.usage.resources);return(0,h.jsx)(`div`,{children:t?.map(t=>(0,h.jsx)(v,{resource:t,resume:e},t.key))})}function v({resource:e,resume:t}){let n=p(),r=l(e=>e.agents),i=l(e=>e.settings.language),o=l(e=>e.demo),[s,c]=(0,m.useState)(e.group??``),[g,_]=(0,m.useState)(!1),v={idle:`Idle`,preparing:`Setting up`,working:`Working`,done:`Finished`,error:`Needs help`,stopped:`Stopped`},y=e=>e===null?n(`Not available`):new Date(e).toLocaleString(i),b=async()=>{if(await d({icon:`🔗`,tone:`warn`,title:n(`Confirm shared quota`),body:(0,h.jsx)(`p`,{children:(0,h.jsx)(f,{children:`Use the same label only when these connections share a quota. This does not change provider, model or billing mode.`})}),confirm:n(`Confirm shared quota`)})){_(!0);try{await u.setUsageGroup(e.key,s)}catch{}finally{_(!1)}}};return(0,h.jsxs)(`section`,{className:`card`,style:{overflowWrap:`anywhere`,minWidth:0},"aria-label":`${e.tool} ${e.provider??``}`,children:[(0,h.jsxs)(`div`,{className:`row wrap`,children:[(0,h.jsxs)(`b`,{children:[e.tool,` · `,e.provider??n(`Provider not reported`)]}),(0,h.jsx)(`span`,{className:`pill`,children:n(e.state===`paused`?`Paused`:e.state===`pacing`?`Pacing`:`No active limit signal`)})]}),(0,h.jsxs)(`div`,{children:[e.model??n(`Model not reported`),` · `,n(e.access===`api`?`API`:e.access===`subscription`?`Subscription`:`Access mode not reported`)]}),e.group&&(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Shared quota`}),`: `,e.group]}),(0,h.jsx)(`div`,{className:`muted small`,children:(0,h.jsx)(f,{children:e.observedAt===null?`Configured selection; awaiting session telemetry`:`Observed connection`})}),(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Running sessions`}),`: `,e.running,` · `,(0,h.jsx)(f,{children:`Last observation`}),`: `,y(e.observedAt)]}),(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Last quota signal`}),`: `,y(e.warning?.at??null),` · `,(0,h.jsx)(f,{children:`Reported reset`}),`: `,y(e.warning?.resetsAt??null)]}),e.until!==null&&(0,h.jsxs)(`div`,{className:`small`,children:[(0,h.jsx)(f,{children:`Next scheduling check`}),`: `,y(e.until)]}),e.warning?.pct==null?(0,h.jsxs)(`div`,{className:`muted small`,children:[(0,h.jsx)(f,{children:`Remaining quota`}),`: `,(0,h.jsx)(f,{children:`Not available`})]}):(0,h.jsxs)(`div`,{children:[(0,h.jsx)(f,{children:`Reported usage`}),`: `,e.warning.pct,`% `,(0,h.jsx)(`meter`,{min:0,max:100,value:e.warning.pct,"aria-label":n(`Reported usage`)})]}),(0,h.jsx)(`ul`,{children:e.agentIds.map(e=>{let t=r[e];return(0,h.jsxs)(`li`,{children:[t?.name??e,` · `,t?.role===`ceo`?`CEO`:t?.repoId||`—`,` · `,t?n(v[t.status]??t.status):`—`,t?.startedAt?` · ${a((t.endedAt??Date.now())-t.startedAt)}`:``]},e)})}),(0,h.jsxs)(`div`,{className:`row wrap`,children:[(0,h.jsx)(`button`,{className:`btn btn-small`,disabled:e.state!==`pacing`,onClick:()=>t(e.key),children:(0,h.jsx)(f,{children:`Resume this quota`})}),o&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`button`,{className:`btn btn-small`,onClick:()=>void u.simulateUsage(`warning`,e.agentIds[0]).catch(()=>void 0),children:(0,h.jsx)(f,{children:`Simulate a usage warning`})}),(0,h.jsx)(`button`,{className:`btn btn-small`,onClick:()=>void u.simulateUsage(`limit`,e.agentIds[0]).catch(()=>void 0),children:(0,h.jsx)(f,{children:`Simulate reaching the limit`})})]})]}),(0,h.jsxs)(`details`,{children:[(0,h.jsx)(`summary`,{children:(0,h.jsx)(f,{children:`Quota association`})}),(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`Without an identified account or confirmed association, limits stay isolated. OAuth alone does not identify a subscription.`})}),(0,h.jsxs)(`label`,{children:[(0,h.jsx)(f,{children:`Confirmed shared quota label`}),(0,h.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),maxLength:64,style:{width:`100%`,boxSizing:`border-box`}})]}),(0,h.jsx)(`button`,{className:`btn btn-small`,disabled:g||s===(e.group??``),onClick:()=>void b(),children:(0,h.jsx)(f,{children:`Save quota association`})})]})]})}function y(e,t,n){if(n!==`it`)return e.text;let r=e.kind===`pr`&&e.prNumber!==null?`PR #${e.prNumber} needs you`:e.kind===`agent`&&t?`${t} is stuck on an error`:null;return!r||!(e.text===r||e.text.startsWith(r+`: `))?e.text:(e.kind===`pr`?c(n,`PR #{number} needs you`,{number:e.prNumber}):c(n,`{name} is stuck on an error`,{name:t}))+e.text.slice(r.length)}function b(e,t,n,r){if(!e.startsWith(t)||!e.endsWith(n))return null;let i=/^(\d+) (minute|minutes|hours)$/.exec(e.slice(t.length,-n.length));return i?c(r,`{count} ${i[2]}`,{count:i[1]}):null}function x(e,t,n){if(n!==`it`)return e.text;let r=t??`Someone`,i={name:t??c(n,`Someone`),task:e.prNumber===null?`#${e.issueNumber}`:`PR #${e.prNumber}`,issue:e.issueNumber??`?`,pr:e.prNumber??`?`},a=(e,t={})=>c(n,e,{...i,...t});if(e.kind===`quiet`){let t=b(e.text,`${r} has been quiet for `,` on ${i.task}, even after a nudge. Stop them, or put the work back in line?`,n);if(t)return a(`{name} has been quiet for {duration} on {task}, even after a nudge. Stop them, or put the work back in line?`,{duration:t})}else if(e.kind===`preparing`){let t=b(e.text,`${r} has been setting up a desk for ${i.task} for `,`. Put the work back in line?`,n);if(t)return a(`{name} has been setting up a desk for {task} for {duration}. Put the work back in line?`,{duration:t})}else if(e.kind===`stale`){if(e.text===`${r}'s last task ${i.task} is already merged. Clear the desk?`)return a(`{name}’s last task {task} is already merged. Clear the desk?`);if(e.text===`${r}'s last task ${i.task} is already closed. Clear the desk?`)return a(`{name}’s last task {task} is already closed. Clear the desk?`)}else if(e.kind===`qa-orphan`){if(e.text===`PR #${e.prNumber} is marked as in QA, but nobody is testing it. Test it again?`)return a(`PR #{pr} is marked as in QA, but nobody is testing it. Test it again?`)}else if(e.kind===`fix-orphan`){if(e.text===`PR #${e.prNumber} is waiting for a fix, but ${e.agentId?`${r} is on something else`:`nobody is on it`}. Hand it to a free agent?`)return a(e.agentId?`PR #{pr} is waiting for a fix, but {name} is on something else. Hand it to a free agent?`:`PR #{pr} is waiting for a fix, but nobody is on it. Hand it to a free agent?`)}else if(e.kind===`unclosed`){let t=b(e.text,`Issue #${e.issueNumber} is still open, but PR #${e.prNumber}, which closes it, was merged `,` ago. Close it?`,n);if(t)return a(`Issue #{issue} is still open, but PR #{pr}, which closes it, was merged {duration} ago. Close it?`,{duration:t})}return e.text}var S=e({OpsTab:()=>P,UsageCard:()=>T,confirmResume:()=>w});async function C(e){try{return await e()}catch{return}}async function w(e){let{usage:t,settings:n}=l.getState(),r=(e,t)=>c(n.language,e,t),i=t.resources?.filter(e=>e.state===`pacing`)??[],a=e?i.find(t=>t.key===e):i.length===1?i[0]:void 0;if(!a){l.getState().openOverlay({kind:`manager`,tab:`ops`,card:`usage`});return}document.pointerLockElement&&document.exitPointerLock(),await d({icon:`⏩`,tone:`warn`,title:r(`Resume full speed?`),body:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`p`,{children:[a.tool,` · `,a.provider??r(`Provider not reported`),` · `,a.group??a.model]}),(0,h.jsx)(`p`,{children:r(`Resume only this quota. Hard limits cannot be cleared early; other quotas are unchanged.`)})]}),confirm:r(`Resume full speed`)})&&await C(()=>u.resumeFullSpeed(a.key))}function T({hot:e}){let t=l(e=>e.settings.language),n=l(e=>e.usage),r=s(n,Date.now(),t);return(0,h.jsxs)(`div`,{id:`ops-card-usage`,className:`card usage-card usage-${r.tone} ${e?`ops-card-hot`:``}`,children:[(0,h.jsxs)(`div`,{className:`row wrap`,children:[(0,h.jsx)(`b`,{children:(0,h.jsx)(f,{children:`🤖 AI usage`})}),(0,h.jsx)(`span`,{className:`pill usage-pill-${r.tone}`,children:r.state})]}),(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`Limits apply only to the affected quota. Warnings pace new issues; hard limits also hold QA, fixes and CEO jobs. Running sessions continue. Missing data does not mean unlimited usage.`})}),(0,h.jsx)(_,{resume:e=>void w(e)}),(0,h.jsx)(g,{})]})}function E({alarm:e,repo:t,hot:n}){let r=p(),i=l(e=>e.settings.language),a=l(t=>e.agentId?t.agents[e.agentId]?.name:void 0),o=l(e=>e.openOverlay),s=l(e=>e.goToFloor),c=e.prNumber===null?void 0:t?.pulls.find(t=>t.number===e.prNumber);return(0,h.jsxs)(`div`,{id:`ops-card-${e.id}`,className:`card floor-card alarm-card ${n?`ops-card-hot`:``}`,style:{"--accent":t?.color??`#ef476f`},children:[(0,h.jsxs)(`div`,{className:`row`,children:[(0,h.jsx)(`span`,{className:`floor-badge`,children:e.floor}),(0,h.jsxs)(`div`,{className:`grow`,children:[(0,h.jsxs)(`b`,{children:[`🚨 `,y(e,a,i)]}),(0,h.jsxs)(`div`,{className:`muted small`,children:[t?.fullName??e.repoId,c?` · ${c.title}`:``,` · `,r(`since {time}`,{time:new Date(e.since).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]})]})]}),(0,h.jsxs)(`div`,{className:`row wrap`,children:[e.kind===`pr`&&e.prNumber!==null?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`button`,{className:`btn btn-small`,onClick:()=>o({kind:`kanban`,repoId:e.repoId}),children:(0,h.jsx)(f,{children:`📋 Open the Kanban`})}),(0,h.jsx)(`button`,{className:`btn btn-small btn-good`,onClick:()=>void C(()=>u.sendToQa(e.repoId,e.prNumber)),children:(0,h.jsx)(f,{children:`Retry QA`})}),(0,h.jsx)(`button`,{className:`btn btn-small`,title:r(`Hand it to its author, or any free agent, with QA’s findings`),onClick:()=>void C(()=>u.sendBack(e.repoId,e.prNumber)),children:(0,h.jsx)(f,{children:`Send back for a fix`})}),c&&(0,h.jsx)(`a`,{className:`small`,href:c.url,target:`_blank`,rel:`noreferrer`,children:(0,h.jsx)(f,{children:`PR on GitHub ↗`})})]}):e.agentId&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`button`,{className:`btn btn-small`,onClick:()=>o({kind:`terminal`,agentId:e.agentId}),children:(0,h.jsx)(f,{children:`Terminal`})}),(0,h.jsx)(`button`,{className:`btn btn-small btn-good`,title:r(`Clear their desk so they take new work`),onClick:()=>void C(()=>u.reset(e.agentId)),children:(0,h.jsx)(f,{children:`Clear desk`})})]}),(0,h.jsx)(`span`,{className:`spacer`}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,onClick:()=>s(e.floor),children:r(`Visit floor {floor}`,{floor:e.floor})})]})]})}var D={clear:[`↺ Clear desk`,`Clear their desk so they take new work`],stop:[`■ Stop`,`Stop their session`],requeue:[`↩ Requeue`,`Stop them and put the work back in line, without a strike`],"retry-qa":[`Retry QA`,`Queue the PR for a fresh QA run`],"send-back":[`Send back for a fix`,`Hand the PR to its author, or any free agent`],"close-issue":[`Close issue`,`Close the issue on GitHub as completed`]};async function O(e,t){let n=(e,t)=>c(l.getState().settings.language,e,t);t===`close-issue`&&(document.pointerLockElement&&document.exitPointerLock(),!await d({icon:`🩺`,tone:`warn`,title:n(`Close issue #{number}?`,{number:e.issueNumber??`?`}),body:(0,h.jsx)(`p`,{children:n(`It’s closed on GitHub as completed, with a comment saying PR #{number} resolved it.`,{number:e.prNumber??`?`})}),confirm:n(`Close issue`)}))||await C(()=>u.doctorFix(e.id,t))}function k({finding:e,repo:t}){let n=p(),r=l(e=>e.settings.language),i=l(t=>e.agentId?t.agents[e.agentId]?.name:void 0),a=l(e=>e.openOverlay);return(0,h.jsxs)(`div`,{id:`ops-card-doctor-${e.id}`,className:`card floor-card alarm-card doctor-card`,style:{"--accent":t?.color??`#7c6cf0`},children:[(0,h.jsxs)(`div`,{className:`row`,children:[(0,h.jsx)(`span`,{className:`floor-badge`,children:t?.floor??`?`}),(0,h.jsxs)(`div`,{className:`grow`,children:[(0,h.jsxs)(`b`,{children:[`🩺 `,x(e,i,r)]}),(0,h.jsxs)(`div`,{className:`muted small`,children:[t?.fullName??e.repoId,` · `,n(`since {time}`,{time:new Date(e.since).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]})]})]}),(0,h.jsxs)(`div`,{className:`row wrap`,children:[e.fixes.map((t,r)=>(0,h.jsx)(`button`,{className:`btn btn-small ${r===0?`btn-good`:``}`,title:n(D[t][1]),onClick:()=>void O(e,t),children:n(D[t][0])},t)),e.agentId&&(0,h.jsx)(`button`,{className:`btn btn-small`,onClick:()=>a({kind:`terminal`,agentId:e.agentId}),children:(0,h.jsx)(f,{children:`Terminal`})}),(0,h.jsx)(`span`,{className:`spacer`}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,title:n(`Hide it until it goes away`),onClick:()=>void C(()=>u.doctorIgnore(e.id)),children:(0,h.jsx)(f,{children:`Ignore`})})]})]})}async function A(e){let t=await C(()=>u.demoDoctor(e));t&&l.getState().pushToast(`info`,t.text)}function j({hot:e}){let t=p(),n=l(e=>e.doctor),r=l(e=>e.repos),i=l(e=>e.demo);return(0,h.jsxs)(`div`,{id:`ops-card-doctor`,className:e?`ops-card-hot`:``,children:[(0,h.jsxs)(`h3`,{className:`section`,children:[(0,h.jsx)(f,{children:`🩺 Office doctor`}),` `,n.length>0&&(0,h.jsx)(`span`,{className:`badge`,children:n.length})]}),n.length===0&&(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`Nothing stuck. Every minute the watchdog nudges quiet sessions, frees stuck desks and puts orphaned work back in line by itself; what it can’t safely fix shows up here.`})}),n.map(e=>(0,h.jsx)(k,{finding:e,repo:r.find(t=>t.id===e.repoId)},e.id)),i&&(0,h.jsxs)(`div`,{className:`row wrap`,children:[(0,h.jsx)(`span`,{className:`muted small`,children:`Demo:`}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,title:t(`Restart with desks gone and work finished on GitHub meanwhile`),onClick:()=>void A(`restart`),children:(0,h.jsx)(f,{children:`Simulate a restart`})}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,title:t(`Someone’s session goes quiet for 20 minutes`),onClick:()=>void A(`stuck`),children:(0,h.jsx)(f,{children:`Make a session stuck`})}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,title:t(`Ten more minutes pass for the stuck sessions`),onClick:()=>void A(`later`),children:(0,h.jsx)(f,{children:`10 minutes later`})}),(0,h.jsx)(`button`,{className:`btn btn-small btn-ghost`,title:t(`A merged PR whose issue was never closed`),onClick:()=>void A(`unclosed`),children:(0,h.jsx)(f,{children:`Leave an issue open`})})]})]})}var M=[[`Ready to start`,e=>String(e.ready),`Backlog issues that can start now`],[`Building`,e=>String(e.building)],[`In QA`,e=>String(e.inQa)],[`Fixing`,e=>String(e.fixing),`Back with an agent: QA findings, checks or a conflict`],[`To merge`,e=>String(e.toMerge)],[`Needs you`,e=>`${e.needsYou}${e.triage?` (+${e.triage} 🧭)`:``}`,`🧭: the CEO is looking first`],[`Merged today`,(e,t)=>t(`{count} ({hour} last hour)`,{count:e.mergedToday,hour:e.mergedHour})],[`Lead time`,e=>a(e.leadMs),`Median issue → merge over the last 24 hours`],[`QA wait`,e=>a(e.qaWaitMs),`Median wait for a free agent over the last 24 hours`],[`CI`,e=>e.ciRuns?`${i(e.ciPass)} · ${a(e.ciMs)}`:`—`,`GitHub’s checks over 7 days: pass rate · median time`],[`Team`,(e,t)=>t(`{busy} busy · {idle} idle`,{busy:e.busy,idle:e.idle})+(e.errors?t(` · errors: {count}`,{count:e.errors}):``)],[`Cost today`,e=>`~${o(e.costToday)}`,`An estimate from finished sessions’ reported cost`]];function N(){let e=p(),t=l(e=>e.ops),n=l(e=>e.repos),r=[...t.floors.map(e=>{let t=n.find(t=>t.id===e.repoId);return[`${e.floor} · ${t?.fullName.split(`/`)[1]??e.repoId}`,t?.color??`#ccc`,e]}),[e(`All floors`),`#1f1d2b`,t.total]];return(0,h.jsxs)(`div`,{className:`ops-table-wrap`,children:[(0,h.jsxs)(`table`,{className:`ops-table`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`th`,{}),r.map(([e,t])=>(0,h.jsx)(`th`,{style:{"--accent":t},className:`ops-col`,children:e},e))]})}),(0,h.jsx)(`tbody`,{children:M.map(([t,n,i])=>(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`th`,{title:i?e(i):void 0,children:e(t)}),r.map(([t,,r])=>(0,h.jsx)(`td`,{children:n(r,e)},t))]},t))})]}),t.ceoCostToday>0&&(0,h.jsx)(`div`,{className:`muted small`,children:e(`The CEO’s sessions today: ~{cost} (in All floors’ cost).`,{cost:o(t.ceoCostToday)})})]})}function P({card:e}){let t=l(e=>e.ops.alarms),n=l(e=>e.repos);return(0,m.useEffect)(()=>{e&&document.getElementById(`ops-card-${e}`)?.scrollIntoView({block:`center`})},[e]),(0,h.jsxs)(`div`,{className:`tab-grid`,children:[(0,h.jsxs)(`div`,{children:[(0,h.jsx)(T,{hot:e===`usage`}),(0,h.jsxs)(`h3`,{className:`section`,children:[(0,h.jsx)(f,{children:`🚨 Needs you`}),` `,t.length>0&&(0,h.jsx)(`span`,{className:`badge`,children:t.length})]}),t.length===0&&(0,h.jsx)(`p`,{className:`muted small`,children:(0,h.jsx)(f,{children:`All clear. The beacon on the lobby’s mission control wall spins when a PR needs you or an agent has been stuck on an error for 10 minutes.`})}),t.map(t=>(0,h.jsx)(E,{alarm:t,repo:n.find(e=>e.id===t.repoId),hot:t.id===e},t.id)),(0,h.jsx)(j,{hot:e===`doctor`})]}),(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h3`,{className:`section`,children:(0,h.jsx)(f,{children:`🛰️ The numbers`})}),(0,h.jsx)(N,{})]})]})}export{P as n,w as r,S as t};
|