agenttwin 0.3.24 → 0.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gateway.js CHANGED
@@ -15309,11 +15309,23 @@ async function installationToken(app, installationId) {
15309
15309
  if (!response.ok) throw new Error(`GitHub installation token \u2192 ${response.status}`);
15310
15310
  return (await response.json()).token;
15311
15311
  }
15312
- async function fetchPullRequest(dir, event, token, serverUrl) {
15313
- const git2 = (...args) => exec9("git", ["-C", dir, ...args], { timeout: 12e4, maxBuffer: 20 * 1024 * 1024 });
15312
+ async function mergeBase(event, token, apiUrl = "https://api.github.com") {
15313
+ try {
15314
+ const response = await fetch(`${apiUrl}/repos/${event.repository}/compare/${event.baseSha}...${event.headSha}`, {
15315
+ headers: { authorization: `Bearer ${token}`, accept: "application/vnd.github+json", "x-github-api-version": "2022-11-28", "user-agent": "agenttwin-check" },
15316
+ signal: AbortSignal.timeout(15e3)
15317
+ });
15318
+ const sha4 = response.ok ? (await response.json()).merge_base_commit?.sha : void 0;
15319
+ return sha4 && /^[0-9a-f]{40}$/.test(sha4) ? sha4 : event.baseSha;
15320
+ } catch {
15321
+ return event.baseSha;
15322
+ }
15323
+ }
15324
+ async function fetchPullRequest(dir, event, token, serverUrl, base) {
15325
+ const git2 = (...args) => exec9("git", ["-C", dir, ...args], { timeout: 3e5, maxBuffer: 20 * 1024 * 1024 });
15314
15326
  const auth = `http.extraHeader=Authorization: Basic ${Buffer.from(`x-access-token:${token}`).toString("base64")}`;
15315
15327
  await git2("init", "-q");
15316
- await git2("-c", auth, "fetch", "-q", "--filter=blob:none", "--depth=200", `${serverUrl}/${event.repository}.git`, event.baseSha, event.headSha);
15328
+ await git2("-c", auth, "fetch", "-q", "--depth=1", `${serverUrl}/${event.repository}.git`, .../* @__PURE__ */ new Set([event.headSha, base, event.baseSha]));
15317
15329
  await git2("checkout", "-q", "--detach", event.headSha);
15318
15330
  }
15319
15331
  async function runHostedCheck(event, app, opts = {}) {
@@ -15323,9 +15335,10 @@ async function runHostedCheck(event, app, opts = {}) {
15323
15335
  const dir = await mkdtemp12(join31(tmpdir13(), "agenttwin-pr-"));
15324
15336
  const base = { installationId: event.installationId, repository: event.repository, number: event.number, ...event.title ? { title: event.title } : {}, headSha: event.headSha, baseSha: event.baseSha, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
15325
15337
  try {
15326
- await fetchPullRequest(dir, event, token, opts.serverUrl ?? "https://github.com");
15338
+ const compareBase = await mergeBase(event, token, app.apiUrl);
15339
+ await fetchPullRequest(dir, event, token, opts.serverUrl ?? "https://github.com", compareBase);
15327
15340
  const runtime = opts.runtime ?? (opts.runnerImage ? "docker" : void 0);
15328
- const report = await runPrCheck(dir, { base: event.baseSha, head: event.headSha, execute: !!runtime, ...runtime ? { runtime } : {}, log: opts.log });
15341
+ const report = await runPrCheck(dir, { base: compareBase, head: event.headSha, execute: !!runtime, ...runtime ? { runtime } : {}, log: opts.log });
15329
15342
  const run3 = await publishCheckRun(report, target, runId);
15330
15343
  await upsertComment(report, target).catch((error) => opts.log?.(`PR comment skipped: ${error instanceof Error ? error.message : String(error)}`));
15331
15344
  const untested = report.touched.filter((w) => !w.covered && w.operations.some((o) => o.changed));
@@ -15868,6 +15881,100 @@ function captureAnalytics(event) {
15868
15881
  });
15869
15882
  }
15870
15883
 
15884
+ // package.json
15885
+ var package_default = {
15886
+ name: "agenttwin",
15887
+ version: "0.3.25",
15888
+ description: "AgentTwin builds digital twins for testing AI agents. The current CLI prepares supported Node.js workflows with synthetic services, failures, and outcome checks.",
15889
+ mcpName: "io.github.Sashank-Singh/agenttwin",
15890
+ keywords: [
15891
+ "agent",
15892
+ "ai",
15893
+ "testing",
15894
+ "simulation",
15895
+ "sandbox",
15896
+ "twin",
15897
+ "cli",
15898
+ "agenttwin",
15899
+ "agent-testing",
15900
+ "ai-agent-testing",
15901
+ "workflow-testing",
15902
+ "nodejs",
15903
+ "digital-twin",
15904
+ "test-automation",
15905
+ "agent-testing-tool"
15906
+ ],
15907
+ type: "module",
15908
+ bin: {
15909
+ agenttwin: "dist/cli.js"
15910
+ },
15911
+ files: [
15912
+ "dist",
15913
+ "README.md",
15914
+ "LICENSE"
15915
+ ],
15916
+ engines: {
15917
+ node: ">=20.0.0"
15918
+ },
15919
+ license: "MIT",
15920
+ scripts: {
15921
+ build: "tsup",
15922
+ dev: "tsx src/cli.ts",
15923
+ typecheck: "tsc --noEmit",
15924
+ test: "vitest run",
15925
+ prepublishOnly: "npm run typecheck && npm run build && npm test -- --maxWorkers 2",
15926
+ "start:api": "node dist/gateway.js"
15927
+ },
15928
+ publishConfig: {
15929
+ access: "public"
15930
+ },
15931
+ dependencies: {
15932
+ "@babel/parser": "^7.29.11",
15933
+ "@electric-sql/pglite": "0.5.13",
15934
+ "@electric-sql/pglite-socket": "0.2.16",
15935
+ "@simplewebauthn/browser": "^14.0.0",
15936
+ "@simplewebauthn/server": "^14.0.3",
15937
+ bson: "^6.10.4",
15938
+ e2b: "^2.52.1",
15939
+ esbuild: "0.28.2",
15940
+ "openid-client": "^6.8.8",
15941
+ pg: "^8.23.1",
15942
+ playwright: "1.64.1",
15943
+ postgres: "3.4.9",
15944
+ tsx: "^4.23.15",
15945
+ yaml: "^2.9.1"
15946
+ },
15947
+ devDependencies: {
15948
+ "@anthropic-ai/sdk": "0.133.0",
15949
+ "@aws-sdk/client-dynamodb": "^3.1161.0",
15950
+ "@aws-sdk/client-s3": "^3.1160.0",
15951
+ "@aws-sdk/client-secrets-manager": "^3.1161.0",
15952
+ "@aws-sdk/client-sns": "^3.1161.0",
15953
+ "@aws-sdk/client-sqs": "^3.1161.0",
15954
+ "@composio/core": "0.18.0",
15955
+ "@slack/web-api": "^7.19.0",
15956
+ "@types/node": "^26.6.4",
15957
+ "@types/pg": "^8.23.1",
15958
+ express: "^4.22.3",
15959
+ ioredis: "^5.11.1",
15960
+ mongodb: "^7.8.0",
15961
+ nodemailer: "^10.3.1",
15962
+ openai: "7.32.0",
15963
+ stripe: "^23.0.0",
15964
+ tsup: "^8.5.1",
15965
+ typescript: "^7.0.2",
15966
+ vitest: "^5.0.3"
15967
+ },
15968
+ homepage: "https://agenttwin.si/",
15969
+ repository: {
15970
+ type: "git",
15971
+ url: "git+https://github.com/Sashank-Singh/AgentTwin.git"
15972
+ }
15973
+ };
15974
+
15975
+ // src/lib/version.ts
15976
+ var VERSION = package_default.version;
15977
+
15871
15978
  // src/runtime/gateway.ts
15872
15979
  var hash6 = (value) => createHash25("sha256").update(value).digest("hex");
15873
15980
  function uploadPath(path2) {
@@ -16176,7 +16283,7 @@ async function startGateway(opts) {
16176
16283
  admitted = true;
16177
16284
  if (await oauth(req, res, path2)) return;
16178
16285
  if (path2 === "/healthz" && req.method === "GET") {
16179
- send(res, 200, { status: stopping ? "stopping" : "ok" });
16286
+ send(res, 200, { status: stopping ? "stopping" : "ok", version: VERSION });
16180
16287
  return;
16181
16288
  }
16182
16289
  if (!storageHealthy) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenttwin",
3
- "version": "0.3.24",
3
+ "version": "0.3.25",
4
4
  "description": "AgentTwin builds digital twins for testing AI agents. The current CLI prepares supported Node.js workflows with synthetic services, failures, and outcome checks.",
5
5
  "mcpName": "io.github.Sashank-Singh/agenttwin",
6
6
  "keywords": [
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3031],{3652:e=>{e.exports={footer:"SiteFooter_footer__aUaTs",content:"SiteFooter_content__1J6Jy",navigation:"SiteFooter_navigation__Zsq8o",main:"SiteFooter_main__EWvbi",brand:"SiteFooter_brand__HyIqL",groups:"SiteFooter_groups__tPgIM",group:"SiteFooter_group__FK9ik",more:"SiteFooter_more__LEh69",bottom:"SiteFooter_bottom__ADU2b",srOnly:"SiteFooter_srOnly__e7DbB"}},7729:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(5155),i=n(2115),s=n(9688);async function a(e){var t;if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(e);return}catch(e){}let n=document.createElement("textarea");n.value=e,n.readOnly=!0,n.tabIndex=-1,n.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.append(n),n.select();try{if(!document.execCommand("copy"))throw Error("Copy unavailable")}finally{n.remove()}}function o(){let[e,t]=(0,i.useState)("idle"),n=(0,i.useRef)(!1),s=(0,i.useRef)(void 0);(0,i.useEffect)(()=>()=>clearTimeout(s.current),[]);let o=(0,i.useCallback)(async e=>{let r=e.currentTarget;if(!n.current){n.current=!0,clearTimeout(s.current),t("idle");try{await a(r.querySelector("code").textContent.trim()),t("success"),s.current=setTimeout(()=>t("idle"),3e3)}catch(e){t("error")}finally{n.current=!1}}},[]);return(0,r.jsxs)("div",{className:"command-action",children:[(0,r.jsxs)("button",{className:"button button-outline button-command",type:"button","aria-label":"Copy npx agenttwin init",title:"Copy command","data-copy-state":"idle"===e?void 0:e,onClick:o,children:[(0,r.jsxs)("span",{className:"pearl-spark","aria-hidden":"true",children:[(0,r.jsx)("span",{children:"✧"}),(0,r.jsx)("span",{children:"✦"})]}),(0,r.jsx)("code",{children:"npx agenttwin init"}),(0,r.jsxs)("svg",{className:"copy-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"}),(0,r.jsx)("path",{d:"M16 8V4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h4"})]}),(0,r.jsx)("svg",{className:"copy-done",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,r.jsx)("path",{d:"m5 12 4 4L19 6"})})]}),(0,r.jsx)("span",{className:"copy-feedback",role:"status","aria-live":"polite","aria-atomic":"true",children:"success"===e?"Copied!":"error"===e?"Copy unavailable. Select the command to copy it.":""})]})}function c(){return(0,r.jsxs)("section",{className:"hero scenic-hero","aria-labelledby":"hero-title",children:[(0,r.jsx)(s.A,{}),(0,r.jsxs)("div",{className:"hero-content",children:[(0,r.jsx)("p",{className:"scenic-eyebrow",children:"A safe test world for your agent"}),(0,r.jsxs)("h1",{id:"hero-title",children:["Test production conditions.",(0,r.jsx)("br",{})," Find what breaks before you ship."]}),(0,r.jsxs)("p",{children:["Give your application or AI agent a safe replica.",(0,r.jsx)("br",{className:"mobile-break"})," Run the workflow, introduce failures, and inspect the result."]}),(0,r.jsxs)("div",{className:"actions hero-actions",children:[(0,r.jsxs)("a",{className:"button button-white",href:"/v2/signup/",children:["Get started ",(0,r.jsx)("span",{"aria-hidden":"true",children:"→"})]}),(0,r.jsxs)("a",{className:"button button-outline",href:"/v2/demo/",children:["Explore the demo ",(0,r.jsx)("span",{"aria-hidden":"true",children:"↗"})]}),(0,r.jsx)(o,{})]})]}),(0,r.jsxs)("div",{className:"scenic-product-preview","aria-label":"Workspace preview",children:[(0,r.jsxs)("aside",{"aria-hidden":"true",children:[(0,r.jsx)("img",{src:"assets/logo/mark-twin-rings.svg",width:"22",height:"22",alt:""}),(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"m4 10 8-7 8 7M6 9v11h12V9"})}),(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"m3 8 9-5 9 5-9 5-9-5Zm0 5 9 5 9-5M3 18l9 5 9-5"})}),(0,r.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"6",cy:"5",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"5",r:"2"}),(0,r.jsx)("circle",{cx:"6",cy:"19",r:"2"}),(0,r.jsx)("path",{d:"M6 7v10M18 7v3a4 4 0 0 1-4 4H6"})]}),(0,r.jsxs)("svg",{viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M12 7v5l3 2"})]}),(0,r.jsxs)("svg",{className:"preview-rail-bottom",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M4 7h16M4 17h16"}),(0,r.jsx)("circle",{cx:"9",cy:"7",r:"3"}),(0,r.jsx)("circle",{cx:"15",cy:"17",r:"3"})]})]}),(0,r.jsxs)("div",{className:"scenic-preview-body",children:[(0,r.jsxs)("div",{className:"scenic-preview-header",children:[(0,r.jsxs)("span",{children:["AgentTwin ",(0,r.jsx)("span",{children:"/"})," Your workspace"]}),(0,r.jsx)("span",{children:"Product preview"})]}),(0,r.jsxs)("div",{className:"scenic-preview-greeting",children:[(0,r.jsx)("h2",{children:"What should your agent test?"}),(0,r.jsx)("p",{children:"One place for your project, workflows, and test results."})]}),(0,r.jsxs)("div",{className:"scenic-preview-connect",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"Start with your project"}),(0,r.jsx)("p",{children:"Discover the resources your workflows depend on."})]}),(0,r.jsxs)("a",{href:"/v2/onboarding/",children:["Connect project ",(0,r.jsx)("span",{"aria-hidden":"true",children:"→"})]})]}),(0,r.jsxs)("div",{className:"scenic-preview-cards",children:[(0,r.jsxs)("article",{children:[(0,r.jsx)("span",{children:"01 / Discover"}),(0,r.jsx)("h3",{children:"Know your environment"}),(0,r.jsx)("p",{children:"Services, tools, and workflow candidates from your repository."})]}),(0,r.jsxs)("article",{children:[(0,r.jsx)("span",{children:"02 / Test"}),(0,r.jsx)("h3",{children:"Follow every outcome"}),(0,r.jsx)("p",{children:"Run receipts and observed side effects, together in your workspace."})]}),(0,r.jsxs)("article",{children:[(0,r.jsx)("span",{children:"03 / Improve"}),(0,r.jsx)("h3",{children:"Keep what you learn"}),(0,r.jsx)("p",{children:"Inspect the result and prepare the next workflow to test."})]})]}),(0,r.jsxs)("a",{className:"scenic-preview-link",href:"/v2/dashboard/#home",children:["Explore the workspace ",(0,r.jsx)("span",{"aria-hidden":"true",children:"↗"})]})]})]})]})}},8765:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(5155),i=n(2115),s=n(1719);function a(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{t("light"===document.documentElement.dataset.siteTheme)},[]),(0,r.jsxs)("button",{className:"site-theme-toggle",type:"button","aria-label":e?"Switch to dark mode":"Switch to light mode",title:e?"Switch to dark mode":"Switch to light mode",onClick:()=>{let e="light"!==document.documentElement.dataset.siteTheme,n=e?"light":"dark";document.documentElement.dataset.siteTheme=n,t(e);try{localStorage.setItem("agenttwin-site-theme",n)}catch(e){}},children:[(0,r.jsx)(s.gLX,{className:"site-theme-sun",width:20,height:20,"aria-hidden":"true"}),(0,r.jsx)(s.rRK,{className:"site-theme-moon",width:20,height:20,"aria-hidden":"true"})]})}let o=[{href:"/what-is-agenttwin/",label:"Product"},{href:"/#how",label:"How it works"},{href:"/pricing/",label:"Pricing"},{href:"/about/",label:"About"},{href:"/docs/",label:"Docs"},{href:"/blog/",label:"Blog"}];function c(){let[e,t]=(0,i.useState)(!1),n=(0,i.useRef)(null),s=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=e=>{var r,i;"Escape"===e.key&&(null==(r=s.current)?void 0:r.querySelector("#navlinks.is-open"))&&(t(!1),null==(i=n.current)||i.focus())},r=e=>{var n;(null==(n=s.current)?void 0:n.contains(e.target))||t(!1)},i=matchMedia("(min-width: 1024px)"),a=()=>t(!1);return document.addEventListener("keydown",e),document.addEventListener("click",r),i.addEventListener("change",a),()=>{document.removeEventListener("keydown",e),document.removeEventListener("click",r),i.removeEventListener("change",a)}},[]),(0,r.jsxs)("header",{className:"site-header",ref:s,children:[(0,r.jsxs)("a",{className:"brand",href:"/","aria-label":"AgentTwin home",children:[(0,r.jsx)("img",{src:"assets/logo/mark-twin-rings.svg?v=white-rings",alt:"","aria-hidden":"true",width:29,height:29}),"AgentTwin"]}),(0,r.jsxs)("nav",{className:"main-nav".concat(e?" is-open":""),id:"navlinks","aria-label":"Main navigation",children:[o.map(e=>(0,r.jsx)("a",{href:e.href,onClick:()=>t(!1),children:e.label},e.href)),(0,r.jsx)("a",{className:"nav-mobile-dashboard",href:"/dashboard/",onClick:()=>t(!1),children:"Open dashboard"})]}),(0,r.jsxs)("div",{className:"nav-actions",children:[(0,r.jsx)("a",{href:"/login/",children:"Sign in"}),(0,r.jsxs)("a",{className:"button button-white button-small",href:"/signup/",children:["Get started ",(0,r.jsx)("span",{"aria-hidden":"true",children:"\xbb"})]})]}),(0,r.jsx)(a,{}),(0,r.jsxs)("button",{className:"menu-toggle",ref:n,type:"button","aria-label":e?"Close menu":"Open menu","aria-expanded":e,"aria-controls":"navlinks",onClick:()=>t(!e),children:[(0,r.jsx)("span",{}),(0,r.jsx)("span",{})]})]})}},8864:(e,t,n)=>{"use strict";function r(e){return e>=5&&e<12?"morning":e>=12&&e<17?"afternoon":"evening"}n.d(t,{K:()=>i,w:()=>r});let i={morning:"Morning \xb7 sunrise over the bay",afternoon:"Afternoon \xb7 sunny Golden Gate",evening:"Evening \xb7 moonlit coast"}},9666:(e,t,n)=>{Promise.resolve().then(n.bind(n,7729)),Promise.resolve().then(n.t.bind(n,3652,23)),Promise.resolve().then(n.bind(n,8765))},9688:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5155),i=n(2115),s=n(8864);let a={morning:"bay-morning.webp",afternoon:"golden-gate-afternoon.webp",evening:"moonlit-coast.webp"};function o(e){let{workspace:t=!1,fixedScene:n}=e,[o,c]=(0,i.useState)(null!=n?n:"morning"),[l,d]=(0,i.useState)(!1),h=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(n)return void c(e=>e===n?e:n);let e=e=>{var n;if(!t)return;let r={};try{r=JSON.parse(localStorage.getItem("agenttwin:workspace-preferences:v1")||"{}")||{}}catch(e){}let i=null==e||null==(n=e.detail)?void 0:n.scene,a=r.artwork;c(i||("morning"===a||"afternoon"===a||"evening"===a?a:(0,s.w)(new Date().getHours()))),d(!0===r.reduceMotion)};e();let r=setInterval(e,6e4);return window.addEventListener("agenttwin:preferences",e),window.addEventListener("agenttwin:scene",e),window.addEventListener("storage",e),()=>{clearInterval(r),window.removeEventListener("agenttwin:preferences",e),window.removeEventListener("agenttwin:scene",e),window.removeEventListener("storage",e)}},[t,n]),(0,i.useEffect)(()=>{let e=h.current,t=null==e?void 0:e.getContext("2d");if(!e||!t)return;let n=matchMedia("(prefers-reduced-motion: reduce)"),r=new Image,i=document.createElement("canvas"),s=i.getContext("2d"),c=0,d=0,u=0,m=0,v=!1,p=!0,x=[];function g(e){for(let r of(t.clearRect(0,0,u,m),t.font="9px monospace",t.fillStyle="#fff7e5",x))t.globalAlpha=r.alpha*(l||n.matches?.7:.65+.25*Math.sin(e/2300+r.phase)),t.fillText(r.value,r.x,r.y);t.globalAlpha=1}function w(e){e-d>100&&(g(e),d=e),c=requestAnimationFrame(w)}function f(){if(cancelAnimationFrame(c),!v)return;g(0);let t=!l&&!n.matches&&!document.hidden&&p;e.dataset.motion=t?"running":"paused",t&&(c=requestAnimationFrame(w))}function j(){let n=e.getBoundingClientRect();u=n.width,m=n.height;let a=Math.min(devicePixelRatio||1,2);if(e.width=u*a,e.height=m*a,t.setTransform(a,0,0,a,0,0),!v||!s||!u||!m)return;let o=Math.ceil(u/16),c=Math.ceil(m/16);i.width=o,i.height=c;let l=Math.max(o/r.width,c/r.height);s.drawImage(r,(o-r.width*l)/2,(c-r.height*l)/2,r.width*l,r.height*l);let d=s.getImageData(0,0,o,c).data;x=[];for(let e=0;e<c;e++)for(let t=0;t<o;t++){let n=(e*o+t)*4,r=(d[n]+d[n+1]+d[n+2])/765,i=Math.abs(Math.sin(127.1*t+311.7*e));r<.18||i<.38||x.push({x:16*t,y:16*e,value:".:+*"[Math.min(3,Math.floor(4*r))],alpha:.08+.2*r,phase:8*i})}f()}r.onload=()=>{v=!0,j()},r.src="assets/dashboard/"+a[o];let b=new ResizeObserver(j);b.observe(e);let y=new IntersectionObserver(e=>{p=e[0].isIntersecting,f()});return y.observe(e),n.addEventListener("change",f),document.addEventListener("visibilitychange",f),()=>{r.onload=null,cancelAnimationFrame(c),b.disconnect(),y.disconnect(),n.removeEventListener("change",f),document.removeEventListener("visibilitychange",f)}},[o,l]),(0,r.jsxs)("div",{className:"scenic-backdrop","data-scene":o,"aria-hidden":"true",style:{backgroundImage:"url('assets/dashboard/".concat(a[o],"')")},children:[(0,r.jsx)("canvas",{ref:h}),(0,r.jsx)("div",{className:"scenic-shade"})]})}}},e=>{e.O(0,[4123,5105,8441,1255,7358],()=>e(e.s=9666)),_N_E=e.O()}]);